提交代码

dev_xd
姜玉琦 2025-03-30 22:04:10 +08:00
parent 6443a6e929
commit 5a580280a7
21 changed files with 2760 additions and 1585 deletions

View File

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

View File

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

View File

@ -0,0 +1,193 @@
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

@ -0,0 +1,61 @@
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

@ -0,0 +1,112 @@
<?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

@ -0,0 +1,112 @@
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

@ -0,0 +1,61 @@
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

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

View File

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

View File

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

View File

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

View File

@ -131,9 +131,9 @@
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view>
<view wx:if="{{!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_save" bindtap="submitSubGroupLeader">提交保存</view>
<view wx:if="{{form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">班组离场</view>
<view wx:if="{{form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">班组入场</view>
<view wx:if="{{editFlag && !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="{{editFlag && 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>
</view>

View File

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

View File

@ -33,7 +33,7 @@
<view class="inspect_list_info">
<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">
<view class="module_see_info_edit" catchtap="editInfo" data-set="{{groupItem.id}}"><van-icon name="edit" /><text class="edit_text">修改</text></view>
<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>
</van-cell>
</van-cell-group>
</view>

View File

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

View File

@ -236,9 +236,9 @@
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view>
<view wx:if="{{!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_save" bindtap="submitChangePhone">提交保存</view>
<view wx:if="{{form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">人员离场</view>
<view wx:if="{{form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">人员入场</view>
<view wx:if="{{editFlag && !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="{{editFlag && 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>
</view>

View File

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

View File

@ -35,7 +35,7 @@
<van-collapse-item title="{{groupItem.subDeptGroupName+' ( '+groupItem.users.length+' )'}}" name="{{index+'_'+groupIndex}}" icon="qr">
<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">
<view class="module_see_info_edit" catchtap="editInfo" data-set="{{userItem.id}}">
<view wx:if="{{addFlag}}" class="module_see_info_edit" catchtap="editInfo" data-set="{{userItem.id}}">
<van-icon name="edit" /><text class="edit_text">修改</text>
</view>
</van-cell>

View File

@ -0,0 +1,44 @@
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

@ -0,0 +1,385 @@
<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>