src/components/checkTemplate/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/contingencyManagement/contingency/component/openAdd.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/contingencyManagement/panManagement/component/approval.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/contingencyManagement/panManagement/component/approvalProcess.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/contingencyManagement/panManagement/component/openAdd.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/contingencyManagement/panManagement/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/checkTemplate/index.vue
@@ -1,5 +1,5 @@ <template> <el-dialog v-model="dialogVisible" title="选择检查模板" width="900px" draggable :fullscreen="full"> <el-dialog v-model="dialogVisible" title="选择应急队伍" width="900px" draggable :fullscreen="full"> <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> <el-row> <el-col :span="18"> src/views/contingencyManagement/contingency/component/openAdd.vue
@@ -30,7 +30,7 @@ </el-col> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="负责人部门" prop="principalDepartmentId"> <el-tree-select v-model="ruleForm.principalDepartmentId" :data="data" class="w100" <el-tree-select v-model="ruleForm.principalDepartmentId" :data="newTreeList" class="w100" :props="propse" clearable placeholder="请选择"/> </el-form-item> </el-col> @@ -201,29 +201,53 @@ // 上传附件 const fileList = ref<UploadUserFile[]>([]) //部门树 const department = () => { goalManagementApi() //定义树形下拉框 const principalDepartmentId = ref() const data = ref() //el-tree-select回显 const propse = { label: 'depName', children: 'children', }; const newTreeList = []; //得到部门树 const department = async () => { await goalManagementApi() .getTreedepartment() .then((res) => { if (res.data.code == 200) { data.value = res.data.data; getTreeList(res.data.data, newTreeList); } else { ElMessage.error(res.data.msg); } }); }; //定义树形下拉框 const principalDepartmentId = ref() const propse = { label: 'depName', children: 'children', value: 'depId', // 递归树状数据且修改字段名 const getTreeList = (treeList, newTreeList) => { treeList.map((c) => { let tempData = { depName: c.depName, value: c.depId, children: [], }; const data = ref() if (c.children && c.children.length > 0) { tempData.children = []; getTreeList(c.children, tempData.children); } newTreeList.push(tempData); }); }; onMounted(() => { department(); }); // 打开用户选择弹窗 const userRef = ref(); const openUser = () => { @@ -482,7 +506,8 @@ onRowDel, department, peopleInsertBtn, teamId teamId, newTreeList }; }, }); src/views/contingencyManagement/panManagement/component/approval.vue
@@ -6,19 +6,19 @@ <el-row :gutter="35"> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="审批名称" prop="workName"> <el-input v-model="ruleForm.workName" placeholder="请填写队伍名称"></el-input> <el-input v-model="ruleForm.workName" placeholder="请填写队伍名称" disabled></el-input> </el-form-item> </el-col> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="审批标题" prop="title"> <el-input v-model="ruleForm.title" placeholder="请填写审批名称"></el-input> <el-input v-model="ruleForm.title" placeholder="请填写审批名称" disabled></el-input> </el-form-item> </el-col> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="审批人" prop="approvePersonId"> <el-input v-model="ruleForm.approvePersonName" placeholder="请选择" class="input-with-select"> <el-input v-model="ruleForm.approvePersonName" placeholder="请选择" class="input-with-select" disabled> <template #append> <el-button :icon="Search" @click="openUser" /> <el-button :icon="Search" @click="openUser" :disabled="disabled"/> </template> </el-input> </el-form-item> @@ -37,7 +37,7 @@ </el-form-item> </el-col> <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> <el-form-item label="是否完成" prop="authorUid" @change="typeChang"> <el-form-item label="是否完成" prop="complete" @change="typeChang"> <el-radio-group v-model="ruleForm.complete"> <el-radio :label="false">是</el-radio> <el-radio :label="true">否</el-radio> @@ -45,17 +45,17 @@ </el-form-item> </el-col> <el-col v-if="ruleForm.complete" :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="审批名称" prop="workName"> <el-form-item label="审批名称" prop="twoWorkName"> <el-input v-model="ruleForm.twoWorkName" placeholder="请填写队伍名称"></el-input> </el-form-item> </el-col> <el-col v-if="ruleForm.complete" :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="审批标题" prop="title"> <el-form-item label="审批标题" prop="twoTitle"> <el-input v-model="ruleForm.twoTitle" placeholder="请填写审批名称"></el-input> </el-form-item> </el-col> <el-col v-if="ruleForm.complete" :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="审批人" prop="authorUid"> <el-form-item label="审批人" prop="twoApprovePersonName"> <el-input v-model="ruleForm.twoApprovePersonName" placeholder="请选择" class="input-with-select"> <template #append> <el-button :icon="Search" @click="openUser" /> @@ -107,34 +107,40 @@ twoWorkName:'', twoTitle:'', twoApprovePersonId:'', twoApprovePersonName:'' twoApprovePersonName: '', }); const titles = ref(); const disabled = ref(); const uid = ref(); // 打开弹窗 const openDialog = (title: string, id: number, type: boolean) => { const openDialog = (title: string, approveId: number, type: boolean, id: number) => { isShowDialog.value = true; titles.value = title; disabled.value = type; ruleForm.value.relateId = id; uid.value = id; if(title == '查看审批' || title == '修改审批') { uid.value = approveId; if (title == '查看审批' || title == '审批') { emergencyPlanApi() .approvalProcessEmergencyPlan(id) .approvalProcessEmergencyPlan(approveId) .then((res) => { if (res.data.code == 200) { ruleForm.value = res.data.data; ruleForm.value.relateId = id; } }); } }; const submitForm = async () => { ruleForm.value.workName = ruleForm.value.twoWorkName ruleForm.value.title = ruleForm.value.twoTitle ruleForm.value.approvePersonId = ruleForm.value.twoApprovePersonId ruleForm.value.approvePersonName = ruleForm.value.twoApprovePersonName console.log(ruleForm.value); ruleForm.value.workName = ruleForm.value.twoWorkName; ruleForm.value.title = ruleForm.value.twoTitle; ruleForm.value.approvePersonId = ruleForm.value.twoApprovePersonId; ruleForm.value.approvePersonName = ruleForm.value.twoApprovePersonName; ruleForm.value.relateType = 1; isShowDialog.value = false; if(ruleForm.value.complete == false) { ruleForm.value.approveStatus=3 } emergencyPlanApi() .editApprovalEmergencyPlan(ruleForm.value) .then((res) => { src/views/contingencyManagement/panManagement/component/approvalProcess.vue
@@ -15,11 +15,6 @@ <el-table-column prop="title" label="审批标题" show-overflow-tooltip sortable></el-table-column> <el-table-column prop="approvePersonName" label="编写人" show-overflow-tooltip sortable></el-table-column> <el-table-column prop="approveMemo" label="审批意见" show-overflow-tooltip sortable></el-table-column> <el-table-column label="操作" width="200" align="center"> <template #default="scope"> <el-button size="small" text type="primary" @click="onReduction(scope.row.id)">还原</el-button> </template> </el-table-column> </el-table> </el-col> </el-row> @@ -76,8 +71,11 @@ const tableData = ref([]); // 列表数据请求 const openDialog = async () => { const uid = ref(); const openDialog = async (id: number) => { isShowDialog.value = true; listQuery.searchParams.relateId=id uid.value = id; let res = await emergencyPlanApi().processEmergencyPlan(listQuery); if (res.data.code === '200') { tableData.value = res.data.data; @@ -107,9 +105,6 @@ // 取消 const onCancel = () => { closeDialog(); }; const onReduction = async () => { isShowDialog.value = false; }; // 分页 const pageIndex = ref(); @@ -148,10 +143,9 @@ FullScreen, full, listQuery, // onSubmit, total, emit, onReduction, uid, }; }, }); src/views/contingencyManagement/panManagement/component/openAdd.vue
@@ -1,6 +1,6 @@ <template> <div class="system-edit-user-container"> <el-dialog :title="titles" v-model="isShowDialog" width="50%" draggable :fullscreen="full" :close-on-click-modal="false"> <el-dialog :title="titles" v-model="isShowDialog" width="50%" draggable :fullscreen="full" :close-on-click-modal="false" @close="resetForm(ruleFormRef)"> <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> <el-form ref="ruleFormRef" :model="ruleForm" size="default" label-width="120px" :disabled="disabled"> <el-row :gutter="35"> @@ -69,9 +69,7 @@ class="w100" :props="propse" clearable multiple :render-after-expand="false" show-checkbox placeholder="请选择" /> </el-form-item> @@ -89,7 +87,7 @@ </el-col> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> <el-form-item label="应急队伍" prop="emergencyTeam"> <el-input v-model="ruleForm.emergencyTeam" placeholder="请选择" class="input-with-select"> <el-input v-model="ruleForm.teamName" placeholder="请选择" class="input-with-select"> <template #append> <el-button :icon="Search" @click="daiInpt(0)" /> </template> @@ -176,9 +174,9 @@ // fileName: 'name', // }, ], emergencyTeam: '', //应急队伍 areaList: [], //区域列表 teamList: [], teamId: '', //应急队伍 deptList: [], abolishStatus: false, }); @@ -198,9 +196,9 @@ ruleForm.value = res.data.data; let arr = []; for (let i = 0; i < ruleForm.value.teamList.length; i++) { arr.push(ruleForm.value.teamList[i].emergencyTeam); arr.push(ruleForm.value.teamList[i].teamName); } ruleForm.value.emergencyTeam = arr.toString(); ruleForm.value.teamName = arr.toString(); } }); } @@ -326,7 +324,7 @@ // fileName: 'name', // }, ], emergencyTeam: '', //应急队伍 teamId: '', //应急队伍ID areaList: [], //区域列表 teamList: [ ], @@ -339,6 +337,7 @@ isShowDialog.value = false; if (!formEl) return; formEl.resetFields(); ruleForm.value = {} }; // 应急队伍弹窗 const Shows = ref(); @@ -347,14 +346,15 @@ }; const SearchUser = (val: any) => { let arr = []; ruleForm.value.teamList=[] for (let i = 0; i < val.length; i++) { arr.push(val[i].teamName); ruleForm.value.teamList.push({ userUid: val[i].uid, emergencyTeam: val[i].teamName, teamName: val[i].teamName, }); } ruleForm.value.emergencyTeam = arr.toString(); ruleForm.value.teamName = arr.toString(); }; // 选择区域弹窗 const openRef = ref(); src/views/contingencyManagement/panManagement/index.vue
@@ -107,7 +107,7 @@ text type="primary" v-if="scope.row.approveStatus === 2 && scope.row.checkApprove === true" @click="onApproval('修改',scope.row.approveId)" @click="onApproval('修改',scope.row.approveId,scope.row.id)" > 审批 </el-button> @@ -116,7 +116,7 @@ text type="primary" v-if="scope.row.approveStatus === 2 && scope.row.checkApprove === false" @click="onApproval('详情',scope.row.id)" @click="onApproval('详情',scope.row.approveId,scope.row.id)" > 查看审批 </el-button> @@ -471,17 +471,17 @@ }; // 审批 const approvalRef = ref(); const onApproval = (val: string,row: object) => { const onApproval = (val: string,row: object,id) => { if(val=='详情'){ approvalRef.value.openDialog('查看审批', row, true); } else { approvalRef.value.openDialog('修改审批', row, false); approvalRef.value.openDialog('审批', row, false,id); } }; // 审批流程 const processRef = ref(); const onApprovalProcess = () => { processRef.value.openDialog(); const onApprovalProcess = (row:object,id) => { processRef.value.openDialog(row,id); }; //全屏