Compare commits

..

No commits in common. "dd32355b98057ef716098aed560bb161c29cb32c" and "3cdb0d62da49908d48164223f41288408639a249" have entirely different histories.

21 changed files with 1556 additions and 2731 deletions

View File

@ -33,14 +33,6 @@ const attendanceUbiDataList = (data) => {
params: data, params: data,
}); });
}; };
const photographyList = (proId) => {
return request({
url: "/manage/photography/finaList/"+proId,
method: "get"
});
};
const updateItemState = (it) => { const updateItemState = (it) => {
let dt0 = +$dt($dt(new Date()).format("YYYY-MM-DD")); //当时时间 let dt0 = +$dt($dt(new Date()).format("YYYY-MM-DD")); //当时时间
let dt1 = it.planStartDate ? +$dt(it.planStartDate) : 0; //计划开始 let dt1 = it.planStartDate ? +$dt(it.planStartDate) : 0; //计划开始
@ -190,7 +182,6 @@ export default {
groupByCraftTypeByAttendance, groupByCraftTypeByAttendance,
subdeptsUsersList, subdeptsUsersList,
attendanceUbiDataList, attendanceUbiDataList,
photographyList,
milestoneList, milestoneList,
costOutputSelectYearAndMonth costOutputSelectYearAndMonth
}; };

View File

@ -1,22 +1,23 @@
<template> <template>
<div class="project-detail main-page"> <div class="project-detail main-page">
<el-col :span="6" class="h100"> <el-col :span="6" class="h100">
<module-one-1-1 label="项目概况"> <module-one-1-1 label="项目概况">
<img src="images/icon2001.png" class="img-openwin" @click="showDetailDlg" /> <img src="images/icon2001.png" class="img-openwin" @click="showDetailDlg" />
<div class="glr-title prj-info-title">{{ selProject?.projectName || "" }}</div> <div class="glr-title prj-info-title">{{ selProject?.projectName || '' }}</div>
<div class="dept-info-list"> <div class="dept-info-list">
<el-row> <el-row>
<el-col :span="12" class="dept-item"> <el-col :span="12" class="dept-item">
<div class="dept-title">建设单位</div> <div class="dept-title">建设单位</div>
<div v-if="deptType1 == null" class="dept-nodata"></div> <div v-if="deptType1 == null" class="dept-nodata">
暂无数据
</div>
<div class="dept-info" v-else> <div class="dept-info" v-else>
<img class="dept-img" src="images/company_3.png" /> <img class="dept-img" src="images/company_3.png" />
<div class="dept-row"> <div class="dept-row">
<div class="dept-name">{{ deptType1.deptName }}</div> <div class="dept-name"> {{ deptType1.deptName }}</div>
<div <div class="dept-leader-phone"
class="dept-leader-phone" :title="(deptType1.leader || '') + ' ' + (deptType1.phone || '')">
:title="(deptType1.leader || '') + ' ' + (deptType1.phone || '')"
>
<span class="dept-leader">{{ deptType1.leader }}</span> <span class="dept-leader">{{ deptType1.leader }}</span>
<span class="dept-phone">{{ deptType1.phone }}</span> <span class="dept-phone">{{ deptType1.phone }}</span>
</div> </div>
@ -25,15 +26,15 @@
</el-col> </el-col>
<el-col :span="12" class="dept-item"> <el-col :span="12" class="dept-item">
<div class="dept-title">设计单位</div> <div class="dept-title">设计单位</div>
<div v-if="deptType2 == null" class="dept-nodata"></div> <div v-if="deptType2 == null" class="dept-nodata">
暂无数据
</div>
<div class="dept-info" v-else> <div class="dept-info" v-else>
<img class="dept-img" src="images/company_2.png" /> <img class="dept-img" src="images/company_2.png" />
<div class="dept-row"> <div class="dept-row">
<div class="dept-name">{{ deptType2.deptName }}</div> <div class="dept-name"> {{ deptType2.deptName }}</div>
<div <div class="dept-leader-phone"
class="dept-leader-phone" :title="(deptType2.leader || '') + ' ' + (deptType2.phone || '')">
:title="(deptType2.leader || '') + ' ' + (deptType2.phone || '')"
>
<span class="dept-leader">{{ deptType2.leader }}</span> <span class="dept-leader">{{ deptType2.leader }}</span>
<span class="dept-phone">{{ deptType2.phone }}</span> <span class="dept-phone">{{ deptType2.phone }}</span>
</div> </div>
@ -44,15 +45,15 @@
<el-row> <el-row>
<el-col :span="12" class="dept-item"> <el-col :span="12" class="dept-item">
<div class="dept-title">总包单位</div> <div class="dept-title">总包单位</div>
<div v-if="deptType3.deptName == null" class="dept-nodata"></div> <div v-if="deptType3.deptName == null" class="dept-nodata">
暂无数据
</div>
<div class="dept-info" v-else> <div class="dept-info" v-else>
<img class="dept-img" src="images/company_3.png" /> <img class="dept-img" src="images/company_3.png" />
<div class="dept-row"> <div class="dept-row">
<div class="dept-name">{{ deptType3.deptName }}</div> <div class="dept-name"> {{ deptType3.deptName }}</div>
<div <div class="dept-leader-phone"
class="dept-leader-phone" :title="(deptType3.leader || '') + ' ' + (deptType3.phone || '')">
:title="(deptType3.leader || '') + ' ' + (deptType3.phone || '')"
>
<span class="dept-leader">{{ deptType3.leader }}</span> <span class="dept-leader">{{ deptType3.leader }}</span>
<span class="dept-phone">{{ deptType3.phone }}</span> <span class="dept-phone">{{ deptType3.phone }}</span>
</div> </div>
@ -61,15 +62,15 @@
</el-col> </el-col>
<el-col :span="12" class="dept-item"> <el-col :span="12" class="dept-item">
<div class="dept-title">监理单位</div> <div class="dept-title">监理单位</div>
<div v-if="deptType4 == null" class="dept-nodata"></div> <div v-if="deptType4 == null" class="dept-nodata">
暂无数据
</div>
<div class="dept-info" v-else> <div class="dept-info" v-else>
<img class="dept-img" src="images/company_11.png" /> <img class="dept-img" src="images/company_11.png" />
<div class="dept-row"> <div class="dept-row">
<div class="dept-name">{{ deptType4.deptName }}</div> <div class="dept-name"> {{ deptType4.deptName }}</div>
<div <div class="dept-leader-phone"
class="dept-leader-phone" :title="(deptType4.leader || '') + ' ' + (deptType4.phone || '')">
:title="(deptType4.leader || '') + ' ' + (deptType4.phone || '')"
>
<span class="dept-leader">{{ deptType4.leader }}</span> <span class="dept-leader">{{ deptType4.leader }}</span>
<span class="dept-phone">{{ deptType4.phone }}</span> <span class="dept-phone">{{ deptType4.phone }}</span>
</div> </div>
@ -80,15 +81,15 @@
<el-row> <el-row>
<el-col :span="12" class="dept-item"> <el-col :span="12" class="dept-item">
<div class="dept-title">检测单位</div> <div class="dept-title">检测单位</div>
<div v-if="deptType5 == null" class="dept-nodata"></div> <div v-if="deptType5 == null" class="dept-nodata">
暂无数据
</div>
<div class="dept-info" v-else> <div class="dept-info" v-else>
<img class="dept-img" src="images/company_12.png" /> <img class="dept-img" src="images/company_12.png" />
<div class="dept-row"> <div class="dept-row">
<div class="dept-name">{{ deptType5.deptName }}</div> <div class="dept-name"> {{ deptType5.deptName }}</div>
<div <div class="dept-leader-phone"
class="dept-leader-phone" :title="(deptType5.leader || '') + ' ' + (deptType5.phone || '')">
:title="(deptType5.leader || '') + ' ' + (deptType5.phone || '')"
>
<span class="dept-leader">{{ deptType5.leader }}</span> <span class="dept-leader">{{ deptType5.leader }}</span>
<span class="dept-phone">{{ deptType5.phone }}</span> <span class="dept-phone">{{ deptType5.phone }}</span>
</div> </div>
@ -98,15 +99,15 @@
<el-col :span="12" class="dept-item"> <el-col :span="12" class="dept-item">
<div class="dept-title">勘察单位</div> <div class="dept-title">勘察单位</div>
<div v-if="deptType6 == null" class="dept-nodata"></div> <div v-if="deptType6 == null" class="dept-nodata">
暂无数据
</div>
<div class="dept-info" v-else> <div class="dept-info" v-else>
<img class="dept-img" src="images/company_10.png" /> <img class="dept-img" src="images/company_10.png" />
<div class="dept-row"> <div class="dept-row">
<div class="dept-name">{{ deptType6.deptName }}</div> <div class="dept-name"> {{ deptType6.deptName }}</div>
<div <div class="dept-leader-phone"
class="dept-leader-phone" :title="(deptType6.leader || '') + ' ' + (deptType6.phone || '')">
:title="(deptType6.leader || '') + ' ' + (deptType6.phone || '')"
>
<span class="dept-leader">{{ deptType6.leader }}</span> <span class="dept-leader">{{ deptType6.leader }}</span>
<span class="dept-phone">{{ deptType6.phone }}</span> <span class="dept-phone">{{ deptType6.phone }}</span>
</div> </div>
@ -117,24 +118,14 @@
</div> </div>
</module-one-1-1> </module-one-1-1>
<module-one-1-1 label="劳务人员概况"> <module-one-1-1 label="劳务人员概况">
<img <img src="images/icon2001.png" class="img-openwin" v-if="attendanceTotal > 0"
src="images/icon2001.png" @click="doShowAttendanceDetail" />
class="img-openwin"
v-if="attendanceTotal > 0"
@click="doShowAttendanceDetail"
/>
<div class="attendance-info warning-info"> <div class="attendance-info warning-info">
<div class="attendance-info-title warning-info-title"> <div class="attendance-info-title warning-info-title">
<div <div :class="attendanceNav == 0 ? 'active' : ''" @click="doAttendanceNav(0, '在岗人员')">
:class="attendanceNav == 0 ? 'active' : ''"
@click="doAttendanceNav(0, '在岗人员')"
>
在岗人员 在岗人员
</div> </div>
<div <div :class="attendanceNav == 1 ? 'active' : ''" @click="doAttendanceNav(1, '今日出勤')">
:class="attendanceNav == 1 ? 'active' : ''"
@click="doAttendanceNav(1, '今日出勤')"
>
今日出勤 今日出勤
</div> </div>
</div> </div>
@ -143,87 +134,77 @@
<div class="survey_content"> <div class="survey_content">
<div class="survey_content_img"> <div class="survey_content_img">
<img <img
:src=" :src="attendanceNav == 0 ? 'images/survey_icon_4.png' : 'images/survey_icon_5.png'" />
attendanceNav == 0
? 'images/survey_icon_4.png'
: 'images/survey_icon_5.png'
"
/>
</div> </div>
</div> </div>
<div class="survey_content_number labour-survey_content_number"> <div class="survey_content_number labour-survey_content_number">
<div class="survey_content_value"> <div class="survey_content_value">
<span>{{ attendanceTotal }}</span> <span>{{ attendanceTotal }}</span>
</div> </div>
<p>{{ attendanceNav == 0 ? "在岗人员" : "今日出勤" }}</p> <p>{{ attendanceNav == 0 ? '在岗人员' : '今日出勤' }}</p>
</div> </div>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<staffSurveyChart <staffSurveyChart :key="chartKey"
:key="chartKey"
:height="$dpi() == '1K' ? '220px' : $dpi() == '2K' ? '330px' : '550px'" :height="$dpi() == '1K' ? '220px' : $dpi() == '2K' ? '330px' : '550px'"
:data="attendanceData" :data="attendanceData" :width="140"></staffSurveyChart>
:width="140"
></staffSurveyChart>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</module-one-1-1> </module-one-1-1>
<module-one-1-1 label="项目全景"> <module-one-1-1 label="设备概览">
<div class="photography-list"> <div class="device-info">
<template v-if="photographyList && photographyList.length > 0"> <div class="survey_title device-title">
<el-carousel height="100%" :autoplay="false"> <div class="survey_title_btn">
<el-carousel-item v-for="(item, idx) in photographyList" :key="idx"> <div :class="deviceNav == 0 ? 'survey_title_btn_min active' : 'survey_title_btn_min'"
<video controls class="photography-video"> @click="doDeviceNav(0)">设备数量</div>
<source :src="item.videoUrl" type="video/mp4" :key="item.videoUrl" />
您的浏览器不支持Video标签
</video>
<div class="photography-list-title">
{{ item.videoDate }}
</div> </div>
</el-carousel-item> <div class="survey_title_btn">
</el-carousel> <div :class="deviceNav == 1 ? 'survey_title_btn_min active' : 'survey_title_btn_min'"
</template> @click="doDeviceNav(1)">绑定数量</div>
<template v-else> </div>
<div class="photography-list-nodata"> <div class="survey_title_btn">
<div> <div :class="deviceNav == 2 ? 'survey_title_btn_min active' : 'survey_title_btn_min'"
<i class="video-play"> @click="doDeviceNav(2)">监测数量</div>
<svg </div>
class="icon" </div>
style=" <div class="device-data">
width: 30px; <el-row>
height: 30px; <el-col :span="12">
vertical-align: middle; <div class="survey_content" style="justify-content: right;">
fill: currentColor; <div class="survey_content_img">
overflow: hidden; <img
" :src="attendanceNav == 0 ? 'images/survey_icon_4.png' : 'images/survey_icon_5.png'" />
viewBox="0 0 1024 1024" </div>
version="1.1" </div>
xmlns="http://www.w3.org/2000/svg" </el-col>
p-id="4551" <el-col :span="12">
> <div class="survey_content_number labour-survey_content_number"
<path style="padding-top:0px;text-align: left;margin-left: 10px;">
d="M128 138.666667c0-47.232 33.322667-66.666667 74.176-43.562667l663.146667 374.954667c40.96 23.168 40.853333 60.8 0 83.882666L202.176 928.896C161.216 952.064 128 932.565333 128 885.333333v-746.666666z" <p>{{ deviceNav == 0 ? '设备数量' : deviceNav == 1 ? '绑定数量' : '监测数量' }}</p>
fill="#3D3D3D" <div class="survey_content_value">
p-id="4552" <span class="sp-number led-number">{{ attendanceTotal }}</span>
></path> <span class="sp-unit" style="font-style: normal;"></span>
</svg> </div>
</i> </div>
</el-col>
</el-row>
</div>
<div class="device-data-list">
<div v-for="(it, idx) in deviceData" :key="idx" class="device-data-item">
<img src="images/legend_weiyi.png" />
<span>{{ it.text }}</span>
<span class="fblue led-number">{{ it.value }}</span>
</div> </div>
<div class="photography-list-no-title">暂无数据</div>
</div> </div>
</template>
</div> </div>
</module-one-1-1> </module-one-1-1>
</el-col> </el-col>
<el-col :span="12" class="h100"> <el-col :span="12" class="h100">
<module-one-2-2 label="" class="no-title no-border"> <module-one-2-2 label="" class="no-title no-border">
<div></div> <div>
<div </div>
class="modify-project-amount" <div class="modify-project-amount" @mouseout="costMouseout" @mouseover="costMouseover">
@mouseout="costMouseout"
@mouseover="costMouseover"
>
<div class="modify-btn"> <div class="modify-btn">
<img src="images/foot_left.png" @click="modifyLeftBtn" /> <img src="images/foot_left.png" @click="modifyLeftBtn" />
</div> </div>
@ -264,8 +245,7 @@
本年完成 本年完成
</p> </p>
<div> <div>
<span class="led-number">{{ costOutData.totalYear || 0 }}</span> <span class="led-number">{{ costOutData.totalYear || 0 }}</span> 万元
万元
</div> </div>
</div> </div>
</div> </div>
@ -279,13 +259,13 @@
开累完成 开累完成
</p> </p>
<div> <div>
<span class="led-number">{{ costOutData.totalMonth || 0 }}</span> <span class="led-number">{{ costOutData.totalMonth || 0 }}</span> 万元
万元
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="project-amount"> <div class="project-amount">
<div class="project-amount-bgd"> <div class="project-amount-bgd">
<div class="project-amount-con"> <div class="project-amount-con">
@ -294,14 +274,14 @@
计划开工日期 计划开工日期
</p> </p>
<div> <div>
<span class="led-number">{{ <span class="led-number">{{ selProject.scheduledStartTime | toDate
selProject.scheduledStartTime | toDate
}}</span> }}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="project-amount"> <div class="project-amount">
<div class="project-amount-bgd"> <div class="project-amount-bgd">
<div class="project-amount-con"> <div class="project-amount-con">
@ -310,8 +290,7 @@
计划竣工日期 计划竣工日期
</p> </p>
<div> <div>
<span class="led-number">{{ <span class="led-number">{{ selProject.plannedCompletionTime | toDate
selProject.plannedCompletionTime | toDate
}}</span> }}</span>
</div> </div>
</div> </div>
@ -326,8 +305,7 @@
实际开工日期 实际开工日期
</p> </p>
<div> <div>
<span class="led-number">{{ <span class="led-number">{{ selProject.actualOperatingTime | toDate
selProject.actualOperatingTime | toDate
}}</span> }}</span>
</div> </div>
</div> </div>
@ -342,15 +320,14 @@
合同工期 合同工期
</p> </p>
<div> <div>
<span class="led-number">{{ <span class="led-number">{{ selProject.projectTimeLimit || '' }}</span>
selProject.projectTimeLimit || ""
}}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="project-amount"> <div class="project-amount">
<div class="project-amount-bgd"> <div class="project-amount-bgd">
<div class="project-amount-con"> <div class="project-amount-con">
@ -359,12 +336,12 @@
建筑面积 建筑面积
</p> </p>
<div> <div>
<span class="led-number">{{ selProject.floorArea || "" }}</span> <span class="led-number">{{ selProject.floorArea || '' }}</span> 平方米
平方米
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modify-btn"> <div class="modify-btn">
@ -373,18 +350,10 @@
</div> </div>
<div class="prj-img-list"> <div class="prj-img-list">
<span class="prj-img-nav" v-if="showImgVideo"> <span class="prj-img-nav" v-if="showImgVideo">
<span <span class="prj-img-nav-item" :class="imgVideoSel == 1 ? 'is-active' : ''"
class="prj-img-nav-item" @click="imgVideoSel = 1">效果图</span>
:class="imgVideoSel == 1 ? 'is-active' : ''" <span class="prj-img-nav-item" :class="imgVideoSel == 2 ? 'is-active' : ''"
@click="imgVideoSel = 1" @click="imgVideoSel = 2">视频</span>
>效果图</span
>
<span
class="prj-img-nav-item"
:class="imgVideoSel == 2 ? 'is-active' : ''"
@click="imgVideoSel = 2"
>视频</span
>
</span> </span>
<el-carousel height="100%" :autoplay="false" v-if="imgVideoSel == 1"> <el-carousel height="100%" :autoplay="false" v-if="imgVideoSel == 1">
<el-carousel-item v-for="(it, idx) in prjImgs" :key="idx"> <el-carousel-item v-for="(it, idx) in prjImgs" :key="idx">
@ -404,11 +373,8 @@
<div class="dangerous-timeline-max w-scroll"> <div class="dangerous-timeline-max w-scroll">
<div class="dangerous-timeline-min" :style="{ width: maxWidth + 'px' }"> <div class="dangerous-timeline-min" :style="{ width: maxWidth + 'px' }">
<template v-if="projectBuildNode && projectBuildNode.length > 0"> <template v-if="projectBuildNode && projectBuildNode.length > 0">
<div <div class="dangerous-timeline-con" v-for="(item, idx) in projectBuildNode"
class="dangerous-timeline-con" :key="idx">
v-for="(item, idx) in projectBuildNode"
:key="idx"
>
<div class="dangerous-text" v-html="item.nodeText"></div> <div class="dangerous-text" v-html="item.nodeText"></div>
<div class="dangerous-dot"> <div class="dangerous-dot">
<div class="dangerous-dot-item"></div> <div class="dangerous-dot-item"></div>
@ -417,16 +383,14 @@
<div class="dangerous-time-min"> <div class="dangerous-time-min">
计划{{ item.planEndDate || "---" }} 计划{{ item.planEndDate || "---" }}
</div> </div>
<div class="dangerous-time-min">实际{{ item.endDate || "--" }}</div> <div class="dangerous-time-min">
<div 实际{{ item.endDate || "--" }}
v-if="item.finishState > 0" </div>
class="project-expect-state dangerous-time-nav" <div v-if="item.finishState > 0"
:class=" class="project-expect-state dangerous-time-nav" :class="(item.finishState == 1 ? 'active' : '') +
(item.finishState == 1 ? 'active' : '') +
' state-' + ' state-' +
item.finishState item.finishState
" ">
>
{{ item.finish }} {{ item.finish }}
</div> </div>
</div> </div>
@ -447,13 +411,10 @@
<div class="analyse-text">安全生产</div> <div class="analyse-text">安全生产</div>
</div> </div>
</div> </div>
<div <div class="work-days" style="display: flex;align-items: center;justify-content: center;">
class="work-days" <div style="margin-right: 10px;"></div> <people-number :number="startDays"
style="display: flex; align-items: center; justify-content: center" unit=""></people-number>
> <div style="margin-left:10px;"></div>
<div style="margin-right: 10px"></div>
<people-number :number="startDays" unit=""></people-number>
<div style="margin-left: 10px"></div>
</div> </div>
<div class="analyse-map"> <div class="analyse-map">
<div class="analyse-title analyse_title_blue"> <div class="analyse-title analyse_title_blue">
@ -466,25 +427,19 @@
<span class="weather-day">今天</span> <span class="weather-day">今天</span>
<span class="weather-info">{{ weathers[0].weather }}</span> <span class="weather-info">{{ weathers[0].weather }}</span>
<img class="weather-img" :src="weathers[0].img" /> <img class="weather-img" :src="weathers[0].img" />
<span class="weather-temp" <span class="weather-temp">{{ weathers[0].highTemp }} {{ weathers[0].lowTemp }}</span>
>{{ weathers[0].highTemp }} {{ weathers[0].lowTemp }}</span
>
</div> </div>
<div v-if="weathers.length > 1" class="weather-item"> <div v-if="weathers.length > 1" class="weather-item">
<span class="weather-day">明天</span> <span class="weather-day">明天</span>
<span class="weather-info">{{ weathers[1].weather }}</span> <span class="weather-info">{{ weathers[1].weather }}</span>
<img class="weather-img" :src="weathers[1].img" /> <img class="weather-img" :src="weathers[1].img" />
<span class="weather-temp" <span class="weather-temp">{{ weathers[1].highTemp }} {{ weathers[1].lowTemp }}</span>
>{{ weathers[1].highTemp }} {{ weathers[1].lowTemp }}</span
>
</div> </div>
<div v-if="weathers.length > 2" class="weather-item"> <div v-if="weathers.length > 2" class="weather-item">
<span class="weather-day">后天</span> <span class="weather-day">后天</span>
<span class="weather-info">{{ weathers[2].weather }}</span> <span class="weather-info">{{ weathers[2].weather }}</span>
<img class="weather-img" :src="weathers[2].img" /> <img class="weather-img" :src="weathers[2].img" />
<span class="weather-temp" <span class="weather-temp">{{ weathers[2].highTemp }} {{ weathers[2].lowTemp }}</span>
>{{ weathers[2].highTemp }} {{ weathers[2].lowTemp }}</span
>
</div> </div>
</div> </div>
<div class="weather-info"> <div class="weather-info">
@ -535,13 +490,13 @@
<div class="wi-data"> <div class="wi-data">
<div class="wi-label">当前风向</div> <div class="wi-label">当前风向</div>
<div class="wi-data-unit"> <div class="wi-data-unit">
<span class="wi-txt" <span class="wi-txt">{{ weatherInfo.windDirection }}{{ weatherInfo.windScale
>{{ weatherInfo.windDirection }}{{ weatherInfo.windScale }}</span }}</span>
>
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</module-one-2-1> </module-one-2-1>
<module-one-1-1 label="项目监测预警"> <module-one-1-1 label="项目监测预警">
@ -551,14 +506,14 @@
<project-info-dialog ref="infoDlg"></project-info-dialog> <project-info-dialog ref="infoDlg"></project-info-dialog>
<attendanceInfoDlg ref="attDlg"></attendanceInfoDlg> <attendanceInfoDlg ref="attDlg"></attendanceInfoDlg>
</div> </div>
</template> </template>
<script> <script>
import projectInfoDialog from "./detail/projectInfoDialog.vue"; import projectInfoDialog from './detail/projectInfoDialog.vue';
import staffSurveyChart from "@/components/staffSurveyChart.vue"; import staffSurveyChart from '@/components/staffSurveyChart.vue';
import MonitAndWarning from "./components/MonitAndWarning.vue"; import MonitAndWarning from './components/MonitAndWarning.vue';
import attendanceInfoDlg from "./detail/attendanceInfoDlg.vue"; import attendanceInfoDlg from './detail/attendanceInfoDlg.vue';
import debounce from "lodash.debounce"; import debounce from 'lodash.debounce'
export default { export default {
components: { components: {
projectInfoDialog, projectInfoDialog,
@ -569,15 +524,15 @@ export default {
data() { data() {
return { return {
chartKey: 0, chartKey: 0,
dpi: "", dpi: '',
selProject: null, selProject: null,
prjInfo: {}, prjInfo: {},
deptType1: [], // deptType1: [],//
deptType2: [], // deptType2: [],//
deptType3: [], // deptType3: [],//
deptType4: [], // deptType4: [],//
deptType5: [], // deptType5: [],//
deptType6: [], // deptType6: [],//
prjImgs: [], prjImgs: [],
prjVideo: null, prjVideo: null,
showImgVideo: false, showImgVideo: false,
@ -585,21 +540,21 @@ export default {
attendanceNav: 0, attendanceNav: 0,
attendanceTotal: 0, attendanceTotal: 0,
attendanceData: [ attendanceData: [
{ text: "普通工种", value: 0, id: 0 }, { text: "普通工种", value: 0, id: 0, },
{ text: "特殊工种", value: 0, id: 0 }, { text: "特殊工种", value: 0, id: 0, },
{ text: "管理人员", value: 0, id: 0 }, { text: "管理人员", value: 0, id: 0, },
], ],
deviceNav: 0, deviceNav: 0,
deviceData: [ deviceData: [
{ text: "自有", value: 45 }, { text: '自有', value: 45 },
{ text: "租赁", value: 55 }, { text: '租赁', value: 55 },
{ text: "分包", value: 65 }, { text: '分包', value: 65 },
], ],
costIndex: 0, costIndex: 0,
direction: "right", direction: "right",
costInterval: undefined, costInterval: undefined,
cityInfo: [], cityInfo: [],
cityId: "", cityId: '',
startDays: 0, startDays: 0,
weathers: [], weathers: [],
weatherInfo: {}, weatherInfo: {},
@ -607,19 +562,15 @@ export default {
maxWidth: 0, maxWidth: 0,
minWidth: 100, minWidth: 100,
costOutData: {}, costOutData: {},
photographyList:[], }
};
}, },
mounted() { mounted() {
window.detailApp = this; window.detailApp = this;
this.$store.dispatch("ChangeNav", 2); this.$store.dispatch('ChangeNav', 2);
this.$bus.$on( this.$bus.$on('projectChange', debounce(prj => {
"projectChange",
debounce((prj) => {
this.selProject = prj; this.selProject = prj;
this.init(); this.init();
}) }));
);
this.selProject = this.$store.getters.selProject; this.selProject = this.$store.getters.selProject;
this.init(); this.init();
this.dpi = this.$dpi(); this.dpi = this.$dpi();
@ -630,99 +581,76 @@ export default {
} }
}); });
this.costInterval = setInterval(this.manufacturingCostRoll, 5000); this.costInterval = setInterval(this.manufacturingCostRoll, 5000);
this.$api.weather.getCityInfo().then((d) => { this.$api.weather.getCityInfo().then(d => {
this.cityInfo = d.data?.city || []; this.cityInfo = d.data?.city || [];
}); });
}, },
methods: { methods: {
showDetailDlg() { showDetailDlg() {
this.$refs.infoDlg.showDialog({ this.$refs.infoDlg.showDialog({
prjInfo: this.prjInfo, prjInfo: this.prjInfo,
selProject: this.selProject, selProject: this.selProject
}); });
}, },
init() { init() {
if (!this.selProject) { if (!this.selProject) {
return; return;
} }
this.$api.project.getProjectInfo(this.selProject.id).then((d) => { this.$api.project.getProjectInfo(this.selProject.id).then(d => {
this.prjInfo = d.data || {}; this.prjInfo = d.data || {};
let tmps = this.prjInfo.projectDeptsList || []; let tmps = this.prjInfo.projectDeptsList || [];
const func = (t) => { const func = (t) => {
let objs = tmps.filter((it) => it.deptType == t); let objs = tmps.filter(it => it.deptType == t);
return objs.length > 0 ? objs[0] : null; return objs.length > 0 ? objs[0] : null;
}; };
this.prjImgs = (this.prjInfo?.setting?.orgImage || "") this.prjImgs = (this.prjInfo?.setting?.orgImage || '').split(",").filter(d => d);
.split(",") this.prjVideo = this.prjInfo?.setting?.orgVideo || '';
.filter((d) => d);
this.prjVideo = this.prjInfo?.setting?.orgVideo || "";
this.showImgVideo = this.prjImgs.length > 0 && this.prjVideo; this.showImgVideo = this.prjImgs.length > 0 && this.prjVideo;
this.imgVideoSel = 1; this.imgVideoSel = 1;
this.deptType1 = func("建设单位"); this.deptType1 = func('建设单位');
this.deptType2 = func("设计单位"); this.deptType2 = func('设计单位');
this.deptType3 = { this.deptType3 = { deptName: this.prjInfo.disDeptName, leader: this.prjInfo.projectPerson, phone: this.prjInfo.projectPersonPhone };
deptName: this.prjInfo.disDeptName,
leader: this.prjInfo.projectPerson,
phone: this.prjInfo.projectPersonPhone,
};
this.deptType4 = func("监理单位"); this.deptType4 = func("监理单位");
this.deptType5 = func("检测单位"); this.deptType5 = func("检测单位");
this.deptType6 = func("勘察单位"); this.deptType6 = func("勘察单位");
let tmp = this.cityInfo.map((d) => { let tmp = this.cityInfo.map(d => { d[18] = Math.abs(d[4] - this.prjInfo.latitude) + Math.abs(d[5] - this.prjInfo.longitude); return d; });
d[18] =
Math.abs(d[4] - this.prjInfo.latitude) +
Math.abs(d[5] - this.prjInfo.longitude);
return d;
});
tmp = tmp.sort((a, b) => a[18] - b[18]); tmp = tmp.sort((a, b) => a[18] - b[18]);
this.cityId = tmp.length > 0 && tmp[0].length > 0 ? tmp[0][0] : ""; this.cityId = tmp.length > 0 && tmp[0].length > 0 ? tmp[0][0] : "";
if (this.prjInfo.actualOperatingTime) { if (this.prjInfo.actualOperatingTime) {
this.startDays = this.startDays = this.$dt(this.prjInfo.actualOperatingTime).diff(new Date(), "day") * -1;
this.$dt(this.prjInfo.actualOperatingTime).diff(new Date(), "day") * -1;
} else { } else {
this.startDays = 0; this.startDays = 0;
} }
if (this.cityId) { if (this.cityId) {
this.$api.weather.getByCity(this.cityId).then((w) => { this.$api.weather.getByCity(this.cityId).then(w => {
this.weathers = w.data || []; this.weathers = w.data || [];
}); })
this.getWeatherNowInfo(); this.getWeatherNowInfo();
} }
}); });
this.loadAttendanceData(); this.loadAttendanceData();
this.loadMilestoneData(); this.loadMilestoneData();
this.loadCostOutput(); this.loadCostOutput();
this.initPhotographyList();
},
initPhotographyList(){
this.$api.detail
.photographyList(this.selProject.id)
.then((d) => {
this.photographyList = d.data||[];
});
}, },
loadCostOutput() { loadCostOutput() {
let dt = this.$dt(new Date()); let dt = this.$dt(new Date());
this.$api.detail this.$api.detail.costOutputSelectYearAndMonth({
.costOutputSelectYearAndMonth({
comId: this.selProject.comId, comId: this.selProject.comId,
projectId: this.selProject.id, projectId: this.selProject.id,
year: dt.$y, year: dt.$y,
month: dt.$M + 1, month: dt.$M + 1,
}) }).then(d => {
.then((d) => {
this.costOutData = d; this.costOutData = d;
}); });
}, },
loadMilestoneData() { loadMilestoneData() {
this.$api.detail this.$api.detail.milestoneList({
.milestoneList({
pageNum: 1, pageNum: 1,
pageSize: 100, pageSize: 100,
comId: this.selProject.comId, comId: this.selProject.comId,
projectId: this.selProject.id, projectId: this.selProject.id
}) }).then(d => {
.then((d) => {
this.projectBuildNode = d; this.projectBuildNode = d;
let itemWidth = this.$dpi() == "1K" ? 200 : this.$dpi() == "2K" ? 300 : 500; let itemWidth = this.$dpi() == "1K" ? 200 : this.$dpi() == "2K" ? 300 : 500;
this.maxWidth = itemWidth * this.projectBuildNode.length; this.maxWidth = itemWidth * this.projectBuildNode.length;
@ -733,38 +661,38 @@ export default {
} }
} }
this.minWidth = n * itemWidth + 100; this.minWidth = n * itemWidth + 100;
}); })
}, },
loadAttendanceData() { loadAttendanceData() {
let ajax = this.$api.detail.groupByCraftType; let ajax = this.$api.detail.groupByCraftType;
let posData = { let posData = {
comId: this.selProject.comId, comId: this.selProject.comId,
projectId: this.selProject.id, projectId: this.selProject.id
}; }
if (this.attendanceNav == 1) { if (this.attendanceNav == 1) {
ajax = this.$api.detail.groupByCraftTypeByAttendance; ajax = this.$api.detail.groupByCraftTypeByAttendance;
//posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD"); //posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD");
posData.createTime = "2024-10-13"; posData.createTime = '2024-10-13';
} }
ajax(posData).then((d) => { ajax(posData).then(d => {
this.attendanceData = (d.data || []).map((it) => { this.attendanceData = (d.data || []).map(it => {
return { return {
text: it.createBy, text: it.createBy,
value: it.id || 0, value: it.id || 0,
id: it.craftType, id: it.craftType
}; }
}); });
let count = 0; let count = 0;
this.attendanceData.forEach((it) => { this.attendanceData.forEach(it => {
count += it.value; count += it.value;
}); });
this.attendanceTotal = count; this.attendanceTotal = count;
}); });
}, },
getWeatherNowInfo() { getWeatherNowInfo() {
this.$api.weather.getCityNowInfo(this.cityId).then((cn) => { this.$api.weather.getCityNowInfo(this.cityId).then(cn => {
this.weatherInfo = cn?.data?.now || {}; this.weatherInfo = cn?.data?.now || {};
setTimeout(this.getWeatherNowInfo, 1000 * 60 * 5); //5 setTimeout(this.getWeatherNowInfo, 1000 * 60 * 5);//5
}); });
}, },
doAttendanceNav(n) { doAttendanceNav(n) {
@ -775,8 +703,9 @@ export default {
this.$refs.attDlg.showDialog({ this.$refs.attDlg.showDialog({
prjInfo: this.prjInfo, prjInfo: this.prjInfo,
attendanceData: this.attendanceData, attendanceData: this.attendanceData,
type: this.attendanceNav, type: this.attendanceNav
}); }
);
}, },
doDeviceNav(n) { doDeviceNav(n) {
this.deviceNav = n; this.deviceNav = n;
@ -813,8 +742,8 @@ export default {
$("#modifyContent").animate({ scrollLeft: width * this.costIndex + "px" }); $("#modifyContent").animate({ scrollLeft: width * this.costIndex + "px" });
this.direction = "right"; this.direction = "right";
}, },
}, }
}; }
</script> </script>
<style lang="less"> <style lang="less">
@ -1081,6 +1010,7 @@ export default {
} }
} }
} }
} }
@media (min-width: 1921px) and (max-width: 2560px) { @media (min-width: 1921px) and (max-width: 2560px) {
@ -1118,6 +1048,7 @@ export default {
* { * {
font-size: 24px; font-size: 24px;
} }
} }
.attendance-tag { .attendance-tag {
@ -1125,7 +1056,7 @@ export default {
font-size: 24px; font-size: 24px;
} }
padding-top: 40px; padding-top:40px;
.survey_content_img { .survey_content_img {
background-size: 120px 80px; background-size: 120px 80px;
@ -1182,6 +1113,7 @@ export default {
} }
.device-data-list { .device-data-list {
.device-data-item { .device-data-item {
font-size: 20px; font-size: 20px;
} }
@ -1217,6 +1149,7 @@ export default {
} }
} }
.led-number { .led-number {
font-size: 48px; font-size: 48px;
} }
@ -1236,6 +1169,7 @@ export default {
height: 40px; height: 40px;
width: 110px; width: 110px;
font-size: 18px; font-size: 18px;
} }
} }
@ -1336,6 +1270,7 @@ export default {
width: 1160px; width: 1160px;
height: 340px; height: 340px;
.dangerous-timeline-con { .dangerous-timeline-con {
width: 300px; width: 300px;
font-size: 24px; font-size: 24px;
@ -1343,6 +1278,7 @@ export default {
.dangerous-text { .dangerous-text {
font-size: 24px; font-size: 24px;
} }
.dangerous-time-max { .dangerous-time-max {
@ -1354,6 +1290,7 @@ export default {
width: 160px; width: 160px;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
} }
} }
@ -1396,6 +1333,7 @@ export default {
* { * {
font-size: 36px; font-size: 36px;
} }
} }
.attendance-tag { .attendance-tag {
@ -1403,7 +1341,7 @@ export default {
font-size: 36px; font-size: 36px;
} }
padding-top: 100px; padding-top:100px;
.survey_content_img { .survey_content_img {
background-size: 150px 100px; background-size: 150px 100px;
@ -1460,6 +1398,7 @@ export default {
} }
.device-data-list { .device-data-list {
.device-data-item { .device-data-item {
img { img {
width: 40px; width: 40px;
@ -1630,6 +1569,7 @@ export default {
.dangerous-timeline-con { .dangerous-timeline-con {
width: 500px; width: 500px;
font-size: 42px; font-size: 42px;
} }
.dangerous-text { .dangerous-text {
@ -1647,6 +1587,7 @@ export default {
width: 240px; width: 240px;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
} }
} }
} }

View File

@ -1,193 +0,0 @@
package com.yanzhu.manage.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* pro_photography
*
* @author yanzhu
* @date 2025-03-30
*/
public class ProPhotography extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 公司ID */
private Long comId;
/** 单位名称 */
@Excel(name = "单位名称")
private String comName;
/** 项目ID */
private Long projectId;
/** 项目名称 */
@Excel(name = "项目名称")
private String projectName;
/** 图片路径 */
@Excel(name = "图片路径")
private String imageUrl;
/** 视频路径 */
@Excel(name = "视频路径")
private String videoUrl;
/** 视频日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "视频日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date videoDate;
/** 状态 */
@Excel(name = "状态")
private Long state;
/** 是否有效 */
@Excel(name = "是否有效")
private Long isDel;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDate;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setComId(Long comId)
{
this.comId = comId;
}
public Long getComId()
{
return comId;
}
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
}
public void setImageUrl(String imageUrl)
{
this.imageUrl = imageUrl;
}
public String getImageUrl()
{
return imageUrl;
}
public void setVideoUrl(String videoUrl)
{
this.videoUrl = videoUrl;
}
public String getVideoUrl()
{
return videoUrl;
}
public void setVideoDate(Date videoDate)
{
this.videoDate = videoDate;
}
public Date getVideoDate()
{
return videoDate;
}
public void setState(Long state)
{
this.state = state;
}
public Long getState()
{
return state;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
public Date getCreateDate()
{
return createDate;
}
public void setUpdateDate(Date updateDate)
{
this.updateDate = updateDate;
}
public Date getUpdateDate()
{
return updateDate;
}
public String getComName() {
return comName;
}
public void setComName(String comName) {
this.comName = comName;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("comId", getComId())
.append("projectId", getProjectId())
.append("imageUrl", getImageUrl())
.append("videoUrl", getVideoUrl())
.append("videoDate", getVideoDate())
.append("state", getState())
.append("remark", getRemark())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createDate", getCreateDate())
.append("updateBy", getUpdateBy())
.append("updateDate", getUpdateDate())
.toString();
}
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.mapper;
import java.util.List;
import com.yanzhu.manage.domain.ProPhotography;
/**
* Mapper
*
* @author yanzhu
* @date 2025-03-30
*/
public interface ProPhotographyMapper
{
/**
*
*
* @param id
* @return
*/
public ProPhotography selectProPhotographyById(Long id);
/**
*
*
* @param proPhotography
* @return
*/
public List<ProPhotography> selectProPhotographyList(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int insertProPhotography(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int updateProPhotography(ProPhotography proPhotography);
/**
*
*
* @param id
* @return
*/
public int deleteProPhotographyById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteProPhotographyByIds(Long[] ids);
}

View File

@ -1,112 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.ProPhotographyMapper">
<resultMap type="ProPhotography" id="ProPhotographyResult">
<result property="id" column="id" />
<result property="comId" column="com_id" />
<result property="comName" column="com_name" />
<result property="projectId" column="project_id" />
<result property="projectName" column="project_name" />
<result property="imageUrl" column="image_url" />
<result property="videoUrl" column="video_url" />
<result property="videoDate" column="video_date" />
<result property="state" column="state" />
<result property="remark" column="remark" />
<result property="isDel" column="is_del" />
<result property="createBy" column="create_by" />
<result property="createDate" column="create_date" />
<result property="updateBy" column="update_by" />
<result property="updateDate" column="update_date" />
</resultMap>
<sql id="selectProPhotographyVo">
select pp.id, pp.com_id, sd.dept_name as com_name, pp.project_id, pi.project_name, pp.image_url, pp.video_url, pp.video_date, pp.state, pp.remark, pp.is_del, pp.create_by, pp.create_date, pp.update_by, pp.update_date from pro_photography pp
left join pro_project_info pi on pi.id = pp.project_id
left join sys_dept sd on sd.dept_id = pp.com_id
</sql>
<select id="selectProPhotographyList" parameterType="ProPhotography" resultMap="ProPhotographyResult">
<include refid="selectProPhotographyVo"/>
<where>
<if test="comId != null "> and pp.com_id = #{comId}</if>
<if test="projectId != null "> and pp.project_id = #{projectId}</if>
<if test="activeComId != null "> and pp.com_id = #{activeComId}</if>
<if test="activeProjectId != null "> and pp.project_id = #{activeProjectId}</if>
<if test="state != null "> and pp.state = #{state}</if>
<if test="isDel != null "> and pp.is_del = #{isDel}</if>
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
and pp.is_del = 0
</where>
order by pp.id desc
</select>
<select id="selectProPhotographyById" parameterType="Long" resultMap="ProPhotographyResult">
<include refid="selectProPhotographyVo"/>
where pp.id = #{id}
</select>
<insert id="insertProPhotography" parameterType="ProPhotography" useGeneratedKeys="true" keyProperty="id">
insert into pro_photography
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="comId != null">com_id,</if>
<if test="projectId != null">project_id,</if>
<if test="imageUrl != null">image_url,</if>
<if test="videoUrl != null">video_url,</if>
<if test="videoDate != null">video_date,</if>
<if test="state != null">state,</if>
<if test="remark != null">remark,</if>
<if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if>
<if test="createDate != null">create_date,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateDate != null">update_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="comId != null">#{comId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="imageUrl != null">#{imageUrl},</if>
<if test="videoUrl != null">#{videoUrl},</if>
<if test="videoDate != null">#{videoDate},</if>
<if test="state != null">#{state},</if>
<if test="remark != null">#{remark},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createDate != null">#{createDate},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateDate != null">#{updateDate},</if>
</trim>
</insert>
<update id="updateProPhotography" parameterType="ProPhotography">
update pro_photography
<trim prefix="SET" suffixOverrides=",">
<if test="comId != null">com_id = #{comId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="imageUrl != null">image_url = #{imageUrl},</if>
<if test="videoUrl != null">video_url = #{videoUrl},</if>
<if test="videoDate != null">video_date = #{videoDate},</if>
<if test="state != null">state = #{state},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createDate != null">create_date = #{createDate},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateDate != null">update_date = #{updateDate},</if>
</trim>
where id = #{id}
</update>
<update id="deleteProPhotographyById" parameterType="Long">
update pro_photography set is_del=2 where id = #{id}
</update>
<update id="deleteProPhotographyByIds" parameterType="String">
update pro_photography set is_del=2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@ -1,112 +0,0 @@
package com.yanzhu.manage.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.manage.domain.ProPhotography;
import com.yanzhu.manage.service.IProPhotographyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author yanzhu
* @date 2025-03-30
*/
@RestController
@RequestMapping("/photography")
public class ProPhotographyController extends BaseController
{
@Autowired
private IProPhotographyService proPhotographyService;
/**
*
*/
@RequiresPermissions("manage:photography:list")
@GetMapping("/list")
public TableDataInfo list(ProPhotography proPhotography)
{
startPage();
List<ProPhotography> list = proPhotographyService.selectProPhotographyList(proPhotography);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manage:photography:export")
@Log(title = "项目延时摄影", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProPhotography proPhotography)
{
List<ProPhotography> list = proPhotographyService.selectProPhotographyList(proPhotography);
ExcelUtil<ProPhotography> util = new ExcelUtil<ProPhotography>(ProPhotography.class);
util.exportExcel(response, list, "项目延时摄影数据");
}
/**
*
*/
@RequiresPermissions("manage:photography:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(proPhotographyService.selectProPhotographyById(id));
}
/**
*
*/
@RequiresPermissions("manage:photography:add")
@Log(title = "项目延时摄影", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProPhotography proPhotography)
{
return toAjax(proPhotographyService.insertProPhotography(proPhotography));
}
/**
*
*/
@RequiresPermissions("manage:photography:edit")
@Log(title = "项目延时摄影", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProPhotography proPhotography)
{
return toAjax(proPhotographyService.updateProPhotography(proPhotography));
}
/**
*
*/
@RequiresPermissions("manage:photography:remove")
@Log(title = "项目延时摄影", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(proPhotographyService.deleteProPhotographyByIds(ids));
}
/**
*
*/
@GetMapping("/finaList/{proId}")
public AjaxResult finaList(@PathVariable("proId") Long proId)
{
ProPhotography query = new ProPhotography();
query.setProjectId(proId);
query.setState(0L);
List<ProPhotography> list = proPhotographyService.selectProPhotographyList(query);
return success(list);
}
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.service;
import java.util.List;
import com.yanzhu.manage.domain.ProPhotography;
/**
* Service
*
* @author yanzhu
* @date 2025-03-30
*/
public interface IProPhotographyService
{
/**
*
*
* @param id
* @return
*/
public ProPhotography selectProPhotographyById(Long id);
/**
*
*
* @param proPhotography
* @return
*/
public List<ProPhotography> selectProPhotographyList(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int insertProPhotography(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int updateProPhotography(ProPhotography proPhotography);
/**
*
*
* @param ids
* @return
*/
public int deleteProPhotographyByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteProPhotographyById(Long id);
}

View File

@ -1,97 +0,0 @@
package com.yanzhu.manage.service.impl;
import java.util.List;
import com.yanzhu.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.ProPhotographyMapper;
import com.yanzhu.manage.domain.ProPhotography;
import com.yanzhu.manage.service.IProPhotographyService;
/**
* Service
*
* @author yanzhu
* @date 2025-03-30
*/
@Service
public class ProPhotographyServiceImpl implements IProPhotographyService
{
@Autowired
private ProPhotographyMapper proPhotographyMapper;
/**
*
*
* @param id
* @return
*/
@Override
public ProPhotography selectProPhotographyById(Long id)
{
return proPhotographyMapper.selectProPhotographyById(id);
}
/**
*
*
* @param proPhotography
* @return
*/
@Override
public List<ProPhotography> selectProPhotographyList(ProPhotography proPhotography)
{
return proPhotographyMapper.selectProPhotographyList(proPhotography);
}
/**
*
*
* @param proPhotography
* @return
*/
@Override
public int insertProPhotography(ProPhotography proPhotography)
{
proPhotography.setCreateBy(SecurityUtils.getUsername());
return proPhotographyMapper.insertProPhotography(proPhotography);
}
/**
*
*
* @param proPhotography
* @return
*/
@Override
public int updateProPhotography(ProPhotography proPhotography)
{
proPhotography.setUpdateBy(SecurityUtils.getUsername());
return proPhotographyMapper.updateProPhotography(proPhotography);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteProPhotographyByIds(Long[] ids)
{
return proPhotographyMapper.deleteProPhotographyByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteProPhotographyById(Long id)
{
return proPhotographyMapper.deleteProPhotographyById(id);
}
}

View File

@ -81,16 +81,10 @@ Page({
}, },
goMenu: function (event) { goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if(!_url){
app.toast("正在建设中...")
return false;
}
wx.setStorageSync('nav-menu', "xmgl"); wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({ wx.redirectTo({
url: _url url: event.currentTarget.dataset.url
}) })
//跳转到其它小程序
//wx.navigateToMiniProgram({ //wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7', // appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0' // path: 'pages/tabbar/order-new/index?type=0'

View File

@ -126,15 +126,13 @@ Page({
}, },
goMenu: function (event) { goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if (!_url) {
app.toast("正在建设中...")
return false;
}
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({ wx.redirectTo({
url: _url url: event.currentTarget.dataset.url
}) })
//wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0'
//})
}, },
// 底部导航 // 底部导航

View File

@ -29,25 +29,25 @@ Page({
zlglDB: 0, zlglDB: 0,
todoDB: 0, todoDB: 0,
checkList: [{ checkList: [{
id: 1, id:1,
name: "日常巡检问题", name: "日常巡检问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
number: 0, //检查次数 number: 0, //检查次数
}, { },{
id: 2, id:2,
name: "周检隐患问题", name: "周检隐患问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
number: 0, //检查次数 number: 0, //检查次数
}, { },{
id: 3, id:3,
name: "月检隐患问题", name: "月检隐患问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
number: 0, //检查次数 number: 0, //检查次数
}, { },{
id: 4, id:4,
name: "专项检查问题", name: "专项检查问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
@ -125,15 +125,13 @@ Page({
}, },
goMenu: function (event) { goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if (!_url) {
app.toast("正在建设中...")
return false;
}
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({ wx.redirectTo({
url: _url url: event.currentTarget.dataset.url
}) })
//wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0'
//})
}, },
// 底部导航 // 底部导航

View File

@ -1,6 +1,5 @@
import { import {
getToken, getToken
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
updateGroupLeader, updateGroupLeader,
@ -24,7 +23,6 @@ Page({
text: '班组入场' text: '班组入场'
}], }],
form: {}, form: {},
editFlag:false,
isChange: false, isChange: false,
leaderUserList: [] leaderUserList: []
}, },
@ -38,10 +36,6 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({
editFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false
});
if (options && options.id) { if (options && options.id) {
//查询数据回填... //查询数据回填...
this.initData(options.id); this.initData(options.id);

View File

@ -131,9 +131,9 @@
</view> </view>
<view class="problem_submit_to"> <view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view> <view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view>
<view wx:if="{{editFlag && !isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeGroupLeader">变更组长</view> <view wx:if="{{!isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeGroupLeader">变更组长</view>
<view wx:if="{{editFlag && isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitSubGroupLeader">提交保存</view> <view wx:if="{{isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitSubGroupLeader">提交保存</view>
<view wx:if="{{editFlag && form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">班组离场</view> <view wx:if="{{form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">班组离场</view>
<view wx:if="{{editFlag && form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">班组入场</view> <view wx:if="{{form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">班组入场</view>
</view> </view>
</view> </view>

View File

@ -1,6 +1,5 @@
import { import {
getToken, getToken
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
subgroupsList, subgroupsList,
@ -21,8 +20,7 @@ Page({
listData: [], listData: [],
activeState: "0", activeState: "0",
yrcCount: 0, yrcCount: 0,
ylcCount: 0, ylcCount: 0
userInfo:{}
}, },
//项目切换 返回值 //项目切换 返回值
@ -43,10 +41,8 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({ this.setData({
addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false, addFlag: true,
userInfo: proUserInfo.projectUserInfo,
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
text: app.globalData.useProjectName, text: app.globalData.useProjectName,
@ -57,8 +53,8 @@ Page({
total: 0 total: 0
}); });
//获取数据列表 //获取数据列表
this.getListData(proUserInfo.projectUserInfo); this.getListData();
this.getListCount(proUserInfo.projectUserInfo); this.getListCount();
}, },
/** /**
@ -95,11 +91,8 @@ Page({
/** /**
* 查询数据列表 * 查询数据列表
*/ */
getListData(_userInfo) { getListData() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subgroupsList(params).then(res => { subgroupsList(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
@ -113,11 +106,8 @@ Page({
/** /**
* 统计数据列表 * 统计数据列表
*/ */
getListCount(_userInfo) { getListCount() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subgroupsCount(params).then(res => { subgroupsCount(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
@ -154,7 +144,7 @@ Page({
pageSize: 1000, pageSize: 1000,
listData: [], listData: [],
}); });
this.getListData(this.data.userInfo); this.getListData();
}, },
/** /**
@ -187,7 +177,7 @@ Page({
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1
}); });
this.getListData(this.data.userInfo); this.getListData();
} else { } else {
console.log("已经到底了,没有数据可加载!!!"); console.log("已经到底了,没有数据可加载!!!");
} }

View File

@ -33,7 +33,7 @@
<view class="inspect_list_info"> <view class="inspect_list_info">
<van-cell-group style="width: 100%;"> <van-cell-group style="width: 100%;">
<van-cell wx:for="{{item.groupList}}" wx:for-item="groupItem" wx:for-index="groupIndex" wx:key="groupIndex" title="{{groupItem.groupName}}" icon="qr" cell-class="switch-cell" data-set="{{groupItem.id}}" bindtap="getInfo"> <van-cell wx:for="{{item.groupList}}" wx:for-item="groupItem" wx:for-index="groupIndex" wx:key="groupIndex" title="{{groupItem.groupName}}" icon="qr" cell-class="switch-cell" data-set="{{groupItem.id}}" bindtap="getInfo">
<view wx:if="{{addFlag}}" class="module_see_info_edit" catchtap="editInfo" data-set="{{groupItem.id}}"><van-icon name="edit" /><text class="edit_text">修改</text></view> <view class="module_see_info_edit" catchtap="editInfo" data-set="{{groupItem.id}}"><van-icon name="edit" /><text class="edit_text">修改</text></view>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</view> </view>

View File

@ -1,7 +1,6 @@
import config from '../../../config' import config from '../../../config'
import { import {
getToken, getToken
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
editSubUsersPhone, editSubUsersPhone,
@ -25,7 +24,6 @@ Page({
}], }],
form: {}, form: {},
newUserPhone:"", newUserPhone:"",
editFlag:false,
isChange: false, isChange: false,
imgBaseUrl: config.baseImgUrl imgBaseUrl: config.baseImgUrl
}, },
@ -39,10 +37,6 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({
editFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false
});
if (options && options.id) { if (options && options.id) {
//查询数据回填... //查询数据回填...
this.initData(options.id); this.initData(options.id);

View File

@ -236,9 +236,9 @@
</view> </view>
<view class="problem_submit_to"> <view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view> <view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view>
<view wx:if="{{editFlag && !isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeUserPhone">变更电话</view> <view wx:if="{{!isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeUserPhone">变更电话</view>
<view wx:if="{{editFlag && isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitChangePhone">提交保存</view> <view wx:if="{{isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitChangePhone">提交保存</view>
<view wx:if="{{editFlag && form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">人员离场</view> <view wx:if="{{form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">人员离场</view>
<view wx:if="{{editFlag && form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">人员入场</view> <view wx:if="{{form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">人员入场</view>
</view> </view>
</view> </view>

View File

@ -1,6 +1,5 @@
import { import {
getToken, getToken
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
subusersList, subusersList,
@ -23,7 +22,6 @@ Page({
yrcCount: 0, yrcCount: 0,
ylcCount: 0, ylcCount: 0,
activeName: "", activeName: "",
userInfo:{}
}, },
//项目切换 返回值 //项目切换 返回值
@ -44,10 +42,8 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({ this.setData({
addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false, addFlag: true,
userInfo: proUserInfo.projectUserInfo,
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
text: app.globalData.useProjectName, text: app.globalData.useProjectName,
@ -58,8 +54,8 @@ Page({
total: 0 total: 0
}); });
//获取数据列表 //获取数据列表
this.getListData(proUserInfo.projectUserInfo); this.getListData();
this.getListCount(proUserInfo.projectUserInfo); this.getListCount();
}, },
/** /**
@ -103,11 +99,8 @@ Page({
/** /**
* 查询数据列表 * 查询数据列表
*/ */
getListData(_userInfo) { getListData() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=subUsers"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=subUsers";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subusersList(params).then(res => { subusersList(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
@ -121,11 +114,8 @@ Page({
/** /**
* 统计数据列表 * 统计数据列表
*/ */
getListCount(_userInfo) { getListCount() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=subUsers"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=subUsers";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subusersCount(params).then(res => { subusersCount(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
@ -162,7 +152,7 @@ Page({
pageSize: 10000, pageSize: 10000,
listData: [], listData: [],
}); });
this.getListData(this.data.userInfo); this.getListData();
}, },
/** /**
@ -195,7 +185,7 @@ Page({
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1
}); });
this.getListData(this.data.userInfo); this.getListData();
} else { } else {
console.log("已经到底了,没有数据可加载!!!"); console.log("已经到底了,没有数据可加载!!!");
} }

View File

@ -35,7 +35,7 @@
<van-collapse-item title="{{groupItem.subDeptGroupName+' ( '+groupItem.users.length+' )'}}" name="{{index+'_'+groupIndex}}" icon="qr"> <van-collapse-item title="{{groupItem.subDeptGroupName+' ( '+groupItem.users.length+' )'}}" name="{{index+'_'+groupIndex}}" icon="qr">
<van-cell-group style="width: 100%;"> <van-cell-group style="width: 100%;">
<van-cell wx:for="{{groupItem.users}}" wx:for-item="userItem" wx:for-index="userIndex" wx:key="userIndex" title="{{userItem.userName}}" cell-class="switch-cell" data-set="{{userItem.id}}" bindtap="getInfo" icon="vip-card-o"> <van-cell wx:for="{{groupItem.users}}" wx:for-item="userItem" wx:for-index="userIndex" wx:key="userIndex" title="{{userItem.userName}}" cell-class="switch-cell" data-set="{{userItem.id}}" bindtap="getInfo" icon="vip-card-o">
<view wx:if="{{addFlag}}" class="module_see_info_edit" catchtap="editInfo" data-set="{{userItem.id}}"> <view class="module_see_info_edit" catchtap="editInfo" data-set="{{userItem.id}}">
<van-icon name="edit" /><text class="edit_text">修改</text> <van-icon name="edit" /><text class="edit_text">修改</text>
</view> </view>
</van-cell> </van-cell>

View File

@ -1,44 +0,0 @@
import request from '@/utils/request'
// 查询项目延时摄影列表
export function listPhotography(query) {
return request({
url: '/manage/photography/list',
method: 'get',
params: query
})
}
// 查询项目延时摄影详细
export function getPhotography(id) {
return request({
url: '/manage/photography/' + id,
method: 'get'
})
}
// 新增项目延时摄影
export function addPhotography(data) {
return request({
url: '/manage/photography',
method: 'post',
data: data
})
}
// 修改项目延时摄影
export function updatePhotography(data) {
return request({
url: '/manage/photography',
method: 'put',
data: data
})
}
// 删除项目延时摄影
export function delPhotography(id) {
return request({
url: '/manage/photography/' + id,
method: 'delete'
})
}

View File

@ -1,385 +0,0 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" style="width: 308px">
<el-date-picker
v-model="daterangeCreateDate"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['manage:photography:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['manage:photography:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['manage:photography:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['manage:photography:export']"
>导出</el-button
>
</el-col>
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="photographyList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属公司" align="center" prop="comName" />
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="图片路径" align="center" prop="imageUrl" width="220">
<template #default="scope">
<ImagePreview :src="scope.row.imageUrl" :width="200" :height="100" />
</template>
</el-table-column>
<el-table-column label="视频路径" align="center" prop="videoUrl">
<template #default="scope">
<video height="100" controls :key="scope.row.videoUrl" v-if="scope.row.videoUrl">
<source :src="scope.row.videoUrl" type="video/mp4" />
您的浏览器不支持Video标签
</video>
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="state">
<template #default="scope">
<el-tooltip :content="scope.row.state == 0 ? '启用' : '停用'" placement="top">
<el-switch
:active-value="parseInt(0)"
:inactive-value="parseInt(1)"
v-model="scope.row.state"
@change="setStatus($event, scope.row)"
/>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="视频日期" align="center" prop="videoDate" width="150">
<template #default="scope">
<span>{{ parseTime(scope.row.videoDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['manage:photography:edit']"
>修改</el-button
>
<el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['manage:photography:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改项目全景对话框 -->
<el-dialog :title="title" v-model="open" width="680px" append-to-body>
<el-form ref="photographyRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目名称" v-if="form.projectId">
<el-tag effect="plain">{{ form.projectName }}</el-tag>
</el-form-item>
<el-form-item label="全景图片" prop="imageUrl">
<image-upload v-model="form.imageUrl" :limit="1" />
</el-form-item>
<el-form-item label="全景视频" prop="videoUrl">
<file-upload v-model="form.videoUrl" :limit="1" :fileType="['mp4']" :fileSize="500" />
</el-form-item>
<el-form-item label="视频日期" prop="videoDate">
<el-date-picker
clearable
v-model="form.videoDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择视频日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Photography">
import {
listPhotography,
getPhotography,
delPhotography,
addPhotography,
updatePhotography,
} from "@/api/manage/photography";
import useUserStore from '@/store/modules/user'
const { proxy } = getCurrentInstance();
const userStore = useUserStore()
const photographyList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const daterangeCreateDate = ref([]);
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
comId: null,
projectId: null,
state: null,
isDel: null,
createDate: null,
},
rules: {
imageUrl: [{ required: true, message: "全景图片不能为空", trigger: "change" }],
videoUrl: [{ required: true, message: "全景视频不能为空", trigger: "change" }],
videoDate: [{ required: true, message: "视频日期不能为空", trigger: "change" }]
},
});
const { queryParams, form, rules } = toRefs(data);
/** 查询项目全景列表 */
function getList() {
loading.value = true;
queryParams.value.params = {};
if (null != daterangeCreateDate && "" != daterangeCreateDate) {
queryParams.value.params["beginCreateDate"] = daterangeCreateDate.value[0];
queryParams.value.params["endCreateDate"] = daterangeCreateDate.value[1];
}
listPhotography(queryParams.value).then((response) => {
photographyList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
comId: null,
projectId: null,
imageUrl: null,
videoUrl: null,
videoDate: null,
state: null,
remark: null,
isDel: null,
createBy: null,
createDate: null,
updateBy: null,
updateDate: null,
};
proxy.resetForm("photographyRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
daterangeCreateDate.value = [];
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
if(!userStore.currentPrjId){
proxy.$modal.msgWarning("请切换到项目数据!!!");
return false;
}
reset();
form.value.comId = userStore.currentComId;
form.value.comName = userStore.currentComName;
form.value.projectId = userStore.currentPrjId;
form.value.projectName = userStore.currentProName;
open.value = true;
title.value = "添加项目全景";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value;
getPhotography(_id).then((response) => {
form.value = response.data;
open.value = true;
title.value = "修改项目全景";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["photographyRef"].validate((valid) => {
if (valid) {
if (form.value.id != null) {
updatePhotography(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addPhotography(form.value).then((response) => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 状态滑块控制 */
function setStatus(val, row) {
proxy.$modal
.confirm(`是否确认${val == 0 ? "启用" : "停用"}当前数据项?`)
.then(function () {
let _data = { id: row.id, state: val };
return updatePhotography(_data);
})
.then(() => {
getList();
proxy.$modal.msgSuccess("修改成功");
})
.catch(() => {
//
if (val == 0) {
row.state = 1;
} else {
row.state = 0;
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal
.confirm('是否确认删除项目全景编号为"' + _ids + '"的数据项?')
.then(function () {
return delPhotography(_ids);
})
.then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download(
"manage/photography/export",
{
...queryParams.value,
},
`photography_${new Date().getTime()}.xlsx`
);
}
getList();
</script>