From c694cffc8541d921e5256d33e14e3237454de950 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期五, 26 一月 2024 09:43:31 +0800 Subject: [PATCH] 新提交 --- src/views/specialWorkSystem/specialIndex/index.vue | 159 ++++++++++++++++++++++++++++------------------------ 1 files changed, 85 insertions(+), 74 deletions(-) diff --git a/src/views/specialWorkSystem/specialIndex/index.vue b/src/views/specialWorkSystem/specialIndex/index.vue index c93cfb0..9e3b2f9 100644 --- a/src/views/specialWorkSystem/specialIndex/index.vue +++ b/src/views/specialWorkSystem/specialIndex/index.vue @@ -64,7 +64,7 @@ <div class="chart-item"> <dv-border-box10 v-if="isFull==true" class="item-bg"></dv-border-box10> <div class="chart-tit"> - <span class="tit">异常警报关联人</span> + <span class="tit">作业警报记录</span> <div class="filter-part"> <el-switch v-model="chartSearch4.type" @@ -252,14 +252,15 @@ </div> </div> <el-dialog v-model="dialogDetails" title="作业申请详情" center> - <fire v-if="dialogType == 1" :details = details></fire> - <space v-else-if="dialogType == 2" :details = details></space> - <hoist v-else-if="dialogType == 3" :details = details></hoist> - <ground v-else-if="dialogType == 4" :details = details></ground> - <broken v-else-if="dialogType == 5" :details = details></broken> - <height v-else-if="dialogType == 6" :details = details></height> - <power v-else-if="dialogType == 7" :details = details></power> - <plate v-else :details = details></plate> +<!-- <fire v-if="dialogType == 1" :details = details></fire>--> +<!-- <space v-else-if="dialogType == 2" :details = details></space>--> +<!-- <hoist v-else-if="dialogType == 3" :details = details></hoist>--> +<!-- <ground v-else-if="dialogType == 4" :details = details></ground>--> +<!-- <broken v-else-if="dialogType == 5" :details = details></broken>--> +<!-- <height v-else-if="dialogType == 6" :details = details></height>--> +<!-- <power v-else-if="dialogType == 7" :details = details></power>--> +<!-- <plate v-else :details = details></plate>--> +<!-- <detail-log :type=dialogType :statusList=statusList :details = details></detail-log>--> <template #footer> <span class="dialog-footer"> <el-button type="primary" @click="dialogDetails = false" @@ -346,6 +347,8 @@ isFull:boolean; themeColor:string; endTime:string + pieData: Array<status> + squareData: Array<status> } interface type { id: number | null; @@ -369,24 +372,24 @@ components: { VideoDetail, WorkRecord, - fire: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/fireLog.vue')), - space: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/spaceLog.vue')), - hoist: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/hoistLog.vue')), - ground: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/groundLog.vue')), - broken: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/brokenLog.vue')), - height: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/heightLog.vue')), - power: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/powerLog.vue')), - plate: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/plateLog.vue')) + // fire: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/fireLog.vue')), + // space: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/spaceLog.vue')), + // hoist: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/hoistLog.vue')), + // ground: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/groundLog.vue')), + // broken: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/brokenLog.vue')), + // height: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/heightLog.vue')), + // power: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/powerLog.vue')), + // plate: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/plateLog.vue')) }, setup() { - const userInfo = useUserInfo(); - const { userInfos } = storeToRefs(userInfo); - const router = useRouter(); + const userInfo = useUserInfo() + const { userInfos } = storeToRefs(userInfo) + const router = useRouter() const reviewFormRef = ref<FormInstance>() const zyfb = ref("eChartZyfb" + Date.now() + Math.random()) const slfx = ref("eChartSlfx" + Date.now() + Math.random()) const zyqs = ref("eChartZyqs" + Date.now() + Math.random()) - const videoRef = ref(); + const videoRef = ref() const recordRef = ref() const state = reactive<stateType>({ pageIndex: 1, @@ -480,6 +483,8 @@ value: 2 } ], + pieData: [], + squareData: [], warningData: [ { name: '黄公子', @@ -583,7 +588,9 @@ } let res = await specialIndexApi().analyseType(data); if (res.data.code === '200') { - console.log('饼图数据>>>', res.data.data) + // console.log('饼图数据>>>', res.data.data) + state.pieData = JSON.parse(JSON.stringify(res.data.data)) + // initZyfb() } else { ElMessage({ type: 'warning', @@ -600,7 +607,9 @@ } let res = await specialIndexApi().analyseAllWork(data); if (res.data.code === '200') { - console.log('条形图数据>>>', res.data.data) + // console.log('条形图数据>>>', res.data.data) + state.squareData = JSON.parse(JSON.stringify(res.data.data)) + // initSlfx() } else { ElMessage({ type: 'warning', @@ -611,7 +620,9 @@ const getDepMonth = async ()=>{ let res = await specialIndexApi().analyseDepMonth(state.chartSearch3.depId); if (res.data.code === '200') { - console.log('折线图数据>>>', res.data.data) + // console.log('折线图数据>>>', res.data.data) + state.squareData = JSON.parse(JSON.stringify(res.data.data)) + // initSlfx() } else { ElMessage({ type: 'warning', @@ -696,14 +707,14 @@ }, }, data: [ - { value: 1048, name: '动火作业' }, - { value: 735, name: '受限空间作业' }, - { value: 580, name: '吊装作业' }, - { value: 484, name: '动土作业' }, - { value: 735, name: '断路作业' }, - { value: 580, name: '高处作业' }, - { value: 484, name: '临时用电作业' }, - { value: 300, name: '盲板抽堵作业' } + { value: 0, name: '动火作业' }, + { value: 0, name: '受限空间作业' }, + { value: 0, name: '吊装作业' }, + { value: 0, name: '动土作业' }, + { value: 0, name: '断路作业' }, + { value: 0, name: '高处作业' }, + { value: 0, name: '临时用电作业' }, + { value: 0, name: '盲板抽堵作业' } ] } ] @@ -734,7 +745,7 @@ xAxis: [ { type: 'category', - data: ['事业部1', '事业部2', '事业部3', '事业部4', '事业部5', '事业部6', '事业部7'], + data: ['部门一','部门二','部门三'], axisTick: { alignWithLabel: true }, @@ -753,7 +764,7 @@ name: 'Direct', type: 'bar', barWidth: '60%', - data: [10, 52, 200, 334, 390, 330, 220] + data: [0,0,0], } ] } @@ -794,7 +805,7 @@ }, series: [ { - data: [150, 230, 224, 218, 135, 147, 230, 224, 218, 135, 147, 260], + data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], type: 'line', label:{ show: true @@ -887,44 +898,44 @@ }; // 查看记录 - const viewDetail = (row: any) => { - state.dialogType = row.workType - state.details = JSON.parse(JSON.stringify(row)); - if(state.details.workDetail.otherSpecialWork == '' || !state.details.workDetail.otherSpecialWork){ - state.details.workDetail.otherSpecialWork=[] - } - else { - const a = state.details.workDetail.otherSpecialWork - state.details.workDetail.otherSpecialWork = a.split(',').map((item) => { - return state.workTypeList.find((i: { id: number }) => i.id === Number(item))?.name; - }); - } - if(state.details.workDetail.involvedDepIds == '' || !state.details.workDetail.involvedDepIds){ - state.details.workDetail.involvedDepIds=[] - } - else { - const a = state.details.workDetail.involvedDepIds - state.details.workDetail.involvedDepIds = a.split(',').map((item) => { - return state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(item))?.depName; - }); - } - if(state.details.workDetail.csDepId){ - state.details.workDetail.csDepId = state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(state.details.workDetail.csDepId))?.depName; - } - if(state.details.workDetail.operationDepId){ - state.details.workDetail.operationDepId = state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(state.details.workDetail.operationDepId))?.depName; - } - if(state.details.workDetail.gbPath){ - state.details.workDetail.gbPath = state.details.workDetail.gbPath.split(',') - } - if(state.details.workDetail.bcPath){ - state.details.workDetail.bcPath = state.details.workDetail.bcPath.split(',') - } - if(state.details.workDetail.bpLocationMapPath){ - state.details.workDetail.bpLocationMapPath = state.details.workDetail.bpLocationMapPath.split(',') - } - state.dialogDetails = true; - }; + // const viewDetail = (row: any) => { + // state.dialogType = row.workType + // state.details = JSON.parse(JSON.stringify(row)); + // if(state.details.workDetail.otherSpecialWork == '' || !state.details.workDetail.otherSpecialWork){ + // state.details.workDetail.otherSpecialWork=[] + // } + // else { + // const a = state.details.workDetail.otherSpecialWork + // state.details.workDetail.otherSpecialWork = a.split(',').map((item) => { + // return state.workTypeList.find((i: { id: number }) => i.id === Number(item))?.name; + // }); + // } + // if(state.details.workDetail.involvedDepIds == '' || !state.details.workDetail.involvedDepIds){ + // state.details.workDetail.involvedDepIds=[] + // } + // else { + // const a = state.details.workDetail.involvedDepIds + // state.details.workDetail.involvedDepIds = a.split(',').map((item) => { + // return state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(item))?.depName; + // }); + // } + // if(state.details.workDetail.csDepId){ + // state.details.workDetail.csDepId = state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(state.details.workDetail.csDepId))?.depName; + // } + // if(state.details.workDetail.operationDepId){ + // state.details.workDetail.operationDepId = state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(state.details.workDetail.operationDepId))?.depName; + // } + // if(state.details.workDetail.gbPath){ + // state.details.workDetail.gbPath = state.details.workDetail.gbPath.split(',') + // } + // if(state.details.workDetail.bcPath){ + // state.details.workDetail.bcPath = state.details.workDetail.bcPath.split(',') + // } + // if(state.details.workDetail.bpLocationMapPath){ + // state.details.workDetail.bpLocationMapPath = state.details.workDetail.bpLocationMapPath.split(',') + // } + // state.dialogDetails = true; + // }; // const handleReview = (row: object)=>{ // state.dialogReview = true @@ -1042,7 +1053,7 @@ toApply, searchRecord, clearSearch, - viewDetail, + // viewDetail, viewRecord, viewTicket, downLoadTicket, -- Gitblit v1.9.2