From 31dcd2ac79af82cc149f34fbfb6ffd3d4a91a3cd Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Tue, 25 Feb 2025 13:46:58 +0800
Subject: [PATCH] 修改名称
---
src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue | 76 +++++++++++++++++++++++++-------------
1 files changed, 50 insertions(+), 26 deletions(-)
diff --git a/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue b/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue
index 4aa3e83..e036b00 100644
--- a/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue
+++ b/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue
@@ -106,6 +106,7 @@
<el-table-column label="风险研判" align="center">
<template #default="scope">
<el-button v-if="scope.row.status == 0" link type="primary" size="small" @click="openReport('上传', scope.row)">上传研判报告</el-button>
+ <el-tag type="danger" v-else-if="scope.row.status == 15">已取消</el-tag>
<el-tag type="danger" v-else-if="scope.row.status == 16">已废止</el-tag>
<el-button v-else link type="primary" size="small" @click="openReport('查看', scope.row)">查看研判报告</el-button>
</template>
@@ -113,9 +114,10 @@
<el-table-column fixed="right" label="操作" align="center" width="150">
<template #default="scope">
<span v-if="scope.row.status == 16">已废止</span>
+ <span v-if="scope.row.status == 15">已取消</span>
<el-button v-if="scope.row.status == 0 || scope.row.status == 1" link type="danger" size="small" :icon="Delete" @click="abortRecordBtn(scope.row)">取消</el-button>
<el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button>
- <el-button v-if="scope.row.status !== 16" link type="primary" size="small" v-throttle :icon="Edit" @click="openEdit(scope.row)">修改</el-button>
+ <el-button v-if="scope.row.status == 0 || scope.row.status == 1" link type="primary" size="small" v-throttle :icon="Edit" @click="openEdit(scope.row)">修改</el-button>
<el-button link type="success" v-throttle v-if="scope.row.status == 0 || scope.row.status == 1" size="small" :icon="Download" @click="checkTicket(scope.row)">正式办票</el-button>
<!-- <el-button :disabled="scope.row.status == 7 ? false : true" link type="primary" size="small" :icon="Download" @click="downLoadBtn(scope.row)">导出作业票</el-button>-->
</template>
@@ -151,7 +153,8 @@
<ground-dialog ref="groundRef" :lists="lists" @refresh="getListByPage"></ground-dialog>
<broken-dialog ref="brokenRef" :lists="lists" @refresh="getListByPage"></broken-dialog>
<height-dialog ref="heightRef" :lists="lists" @refresh="getListByPage"></height-dialog>
- <power-dialog ref="powerRef" :lists="lists" @refresh="getListByPage"></power-dialog>
+ <power-dialog ref="powerRef" :lists="lists" @refresh="getListByPage"></power-dialog>
+ <open-dialog ref="openRef" :lists="lists" @refresh="getListByPage"></open-dialog>
</div>
</template>
@@ -220,7 +223,8 @@
groundDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/groundDialog.vue')),
brokenDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/brokenDialog.vue')),
heightDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/heightDialog.vue')),
- powerDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/powerDialog.vue'))
+ powerDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/powerDialog.vue')),
+ openDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/openDialog.vue'))
},
setup() {
const userInfo = useUserInfo();
@@ -235,6 +239,7 @@
const brokenRef = ref()
const heightRef = ref()
const powerRef = ref()
+ const openRef = ref()
const state = reactive<stateType>({
pageIndex1: 1,
pageSize1: 10,
@@ -276,7 +281,8 @@
{ id: 5, name: '断路作业' },
{ id: 6, name: '高处作业' },
{ id: 7, name: '临时用电作业' },
- { id: 8, name: '盲板抽堵作业' }
+ { id: 8, name: '盲板抽堵作业' },
+ { id: 9, name: '打开作业' }
],
lists: {
workerList: [],
@@ -370,6 +376,7 @@
getListByPage();
getAllDepartment()
spWorker()
+ getOpList()
getAll()
getAllDevice()
getAllRisks()
@@ -378,44 +385,37 @@
const openEdit = (row)=>{
if(row.workType == 1){
- fireRef.value.openDialog(row)
+ fireRef.value.openDialog(row,'edit')
}
if(row.workType == 2){
- spaceRef.value.openDialog(row)
+ spaceRef.value.openDialog(row,'edit')
}
if(row.workType == 3){
- hoistRef.value.openDialog(row)
+ hoistRef.value.openDialog(row,'edit')
}
if(row.workType == 4){
- groundRef.value.openDialog(row)
+ groundRef.value.openDialog(row,'edit')
}
if(row.workType == 5){
- brokenRef.value.openDialog(row)
+ brokenRef.value.openDialog(row,'edit')
}
if(row.workType == 6){
- heightRef.value.openDialog(row)
+ heightRef.value.openDialog(row,'edit')
}
if(row.workType == 7){
- powerRef.value.openDialog(row)
+ powerRef.value.openDialog(row,'edit')
}
if(row.workType == 8){
- plateRef.value.openDialog(row)
+ plateRef.value.openDialog(row,'edit')
+ }
+ if(row.workType == 9){
+ openRef.value.openDialog(row,'edit')
}
}
const spWorker = async ()=>{
- for(let id of ['17','18','19']){
+ for(let id of ['18','19']){
const res = await workApplyApi().getSpList({roleId: id})
- if(id == '17'){
- if (res.data.code === '200') {
- state.lists.spList.opList = JSON.parse(JSON.stringify(res.data.data))
- } else {
- ElMessage({
- type: 'warning',
- message: res.data.msg
- });
- }
- }
if(id == '18'){
if (res.data.code === '200') {
state.lists.spList.jhList = JSON.parse(JSON.stringify(res.data.data))
@@ -436,6 +436,29 @@
});
}
}
+ }
+ }
+
+ const getOpList = async()=>{
+ const res = await workApplyApi().getOpList()
+ if(res.data.code == '200'){
+ if(res.data.data && res.data.data.length>0){
+ state.lists.spList.opList = JSON.parse(JSON.stringify(res.data.data)).map(i=>{
+ if(i.certList && i.certList.length>0){
+ i.certList = i.certList.map(item=>{
+ item['realName'] = i.realName + '(' + item.certTypeName +':'+ item.certExpiredAt + ')'
+ item['uid'] = item.certNo + ',' + item.certExpiredAt
+ return item
+ })
+ }
+ return i
+ })
+ }
+ }else{
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ })
}
}
@@ -511,7 +534,7 @@
state.departmentList = JSON.parse(JSON.stringify(res.data.data))
recursion(state.departmentList);
state.lists.departList = JSON.parse(JSON.stringify(res.data.data))
- state.lists.departList2 = JSON.parse(JSON.stringify(res.data.data))[0].children[0].children.filter(i=>i.depId == 32 || i.depId == 48 || i.depId == 49 || i.depId == 50)
+ state.lists.departList2 = JSON.parse(JSON.stringify(res.data.data))[0].children[0].children.filter(i=>i.depId == 32 || i.depId == 48 || i.depId == 49 || i.depId == 50 || i.depId == 10 || i.depId == 41 || i.depId == 46 || i.depId == 47)
} else {
ElMessage({
type: 'warning',
@@ -520,7 +543,7 @@
}
};
const getOtherWork = async () => {
- let res = await workApplyApi().getOtherWork({workPermitNo: '',workType: null});
+ let res = await workApplyApi().getOtherWork({pageSize: 999, pageIndex: 1, searchParams: {workPermitNo: '', workType: null}})
if (res.data.code === '200') {
state.lists.otherWorks = JSON.parse(JSON.stringify(res.data.data))
} else {
@@ -758,6 +781,7 @@
brokenRef,
heightRef,
powerRef,
+ openRef,
openEdit,
getAllDepartment,
checkTicket,
@@ -835,7 +859,7 @@
}
}
&:last-of-type {
- height: calc(100% - 100px);
+ height: calc(100% - 130px);
}
}
.el-row {
--
Gitblit v1.9.2