| | |
| | | </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" |
| | |
| | | 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, |
| | |
| | | }, |
| | | chartSearch2: { |
| | | depId: 1, |
| | | startTime: '', |
| | | // startTime: '', |
| | | type: null |
| | | }, |
| | | chartSearch3: { |
| | |
| | | getTypePie() |
| | | getWorkDep() |
| | | getDepMonth() |
| | | initZyfb() |
| | | initSlfx() |
| | | initZyqs() |
| | | }); |
| | | const initTime =()=>{ |
| | | state.chartSearch1.startTime = getPeriod(30) |
| | |
| | | }else{ |
| | | state.themeColor = '#333' |
| | | } |
| | | initZyfb() |
| | | initSlfx() |
| | | initZyqs() |
| | | initTime() |
| | | getMydepList() |
| | | getAllDepartment(); |
| | | getTypePie() |
| | | getWorkDep() |
| | | getDepMonth() |
| | | } |
| | | const getTypePie = async ()=>{ |
| | | const data = { |
| | |
| | | if (res.data.code === '200') { |
| | | // console.log('饼图数据>>>', res.data.data) |
| | | state.pieData = JSON.parse(JSON.stringify(res.data.data)) |
| | | // initZyfb() |
| | | initZyfb() |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | } |
| | | const getWorkDep = async ()=>{ |
| | | const data = { |
| | | startTime: state.chartSearch2.startTime, |
| | | endTime: state.endTime, |
| | | // startTime: state.chartSearch2.startTime, |
| | | // endTime: state.endTime, |
| | | depId:state.chartSearch2.depId, |
| | | type: state.chartSearch2.type |
| | | } |
| | | let res = await specialIndexApi().analyseAllWork(data); |
| | | if (res.data.code === '200') { |
| | | // console.log('条形图数据>>>', res.data.data) |
| | | state.squareData = JSON.parse(JSON.stringify(res.data.data)) |
| | | // initSlfx() |
| | | let names = state.squareData.map(i=>i.name) |
| | | let vals = state.squareData.map(i=>i.value) |
| | | initSlfx(names,vals) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | const getDepMonth = async ()=>{ |
| | | let res = await specialIndexApi().analyseDepMonth(state.chartSearch3.depId); |
| | | if (res.data.code === '200') { |
| | | // console.log('折线图数据>>>', res.data.data) |
| | | state.squareData = JSON.parse(JSON.stringify(res.data.data)) |
| | | // initSlfx() |
| | | let names = state.squareData.map(i=>i.name) |
| | | let vals = state.squareData.map(i=>i.value) |
| | | initZyqs(names,vals) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | }, |
| | | }, |
| | | data: [ |
| | | { value: 0, name: '动火作业' }, |
| | | { value: 0, name: '受限空间作业' }, |
| | | { value: 0, name: '吊装作业' }, |
| | | { value: 0, name: '动土作业' }, |
| | | { value: 0, name: '断路作业' }, |
| | | { value: 0, name: '高处作业' }, |
| | | { value: 0, name: '临时用电作业' }, |
| | | { value: 0, name: '盲板抽堵作业' } |
| | | ] |
| | | data: state.pieData |
| | | } |
| | | ] |
| | | } |
| | |
| | | myChart.resize(); |
| | | }); |
| | | } |
| | | const initSlfx =()=>{ |
| | | const initSlfx =(names:Array<string>,vals:Array<any>)=>{ |
| | | let dom = document.getElementById(slfx.value); |
| | | let myChart = echarts.init(dom); |
| | | let option: EChartsOption; |
| | |
| | | xAxis: [ |
| | | { |
| | | type: 'category', |
| | | data: ['部门一','部门二','部门三'], |
| | | data: names, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | }, |
| | |
| | | name: 'Direct', |
| | | type: 'bar', |
| | | barWidth: '60%', |
| | | data: [0,0,0], |
| | | data: vals, |
| | | } |
| | | ] |
| | | } |
| | |
| | | myChart.resize(); |
| | | }); |
| | | } |
| | | const initZyqs =()=>{ |
| | | const initZyqs =(names:Array<string>,vals:Array<any>)=>{ |
| | | let dom = document.getElementById(zyqs.value); |
| | | let myChart = echarts.init(dom); |
| | | let option: EChartsOption; |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月', '一月', '二月', '三月'], |
| | | data: names, |
| | | axisLabel: { |
| | | color: state.themeColor |
| | | } |
| | |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
| | | data: vals, |
| | | type: 'line', |
| | | label:{ |
| | | show: 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 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 |
| | |
| | | toApply, |
| | | searchRecord, |
| | | clearSearch, |
| | | viewDetail, |
| | | // viewDetail, |
| | | viewRecord, |
| | | viewTicket, |
| | | downLoadTicket, |