From fca7a89c2bf084dcd5d83819140cc7eb33fc6199 Mon Sep 17 00:00:00 2001 From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com> Date: 星期二, 22 七月 2025 08:47:48 +0800 Subject: [PATCH] 修改新增 --- src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue | 104 +++++++++++++--------------------------------------- 1 files changed, 26 insertions(+), 78 deletions(-) diff --git a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue index c18d848..d0d19e8 100644 --- a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue +++ b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue @@ -69,13 +69,10 @@ <el-input v-model.trim="scope.row.clauseNum" size="large" - v-if="scope.$index>4 && scope.$index<state.form.sysDeptResponsibilityList.length-2" + type="textarea" style="width: 100%;" > </el-input> - <span v-else> - {{scope.row.clauseNum}} - </span> </template> </el-table-column> <el-table-column label="内容" prop="content" align="center"> @@ -83,13 +80,10 @@ <el-input v-model.trim="scope.row.content" size="large" - v-if="scope.$index>4 && scope.$index<state.form.sysDeptResponsibilityList.length-2" + type="textarea" style="width: 100%;" > </el-input> - <span v-else> - {{scope.row.content}} - </span> </template> </el-table-column> <el-table-column label="条款负责人" prop="leader" align="center"> @@ -110,26 +104,29 @@ <el-input v-model.trim="scope.row.leader" size="large" + type="textarea" style="width: 100%;" > </el-input> </template> </el-table-column> - <el-table-column label="相关证据材料" prop="evidenceMaterials" align="center"> - <template #default="scope"> - <el-input - v-model.trim="scope.row.evidenceMaterials" - size="large" - style="width: 100%;" - > - </el-input> - </template> - </el-table-column> +<!-- <el-table-column label="相关证据材料" prop="evidenceMaterials" align="center">--> +<!-- <template #default="scope">--> +<!-- <el-input--> +<!-- v-model.trim="scope.row.evidenceMaterials"--> +<!-- size="large"--> +<!-- type="textarea"--> +<!-- style="width: 100%;"--> +<!-- >--> +<!-- </el-input>--> +<!-- </template>--> +<!-- </el-table-column>--> <el-table-column label="现有管理类文件" prop="managementDocuments" align="center" width="150"> <template #default="scope"> <el-input v-model.trim="scope.row.managementDocuments" size="large" + type="textarea" style="width: 100%;" clearable > @@ -140,6 +137,7 @@ <template #default="scope"> <el-input v-model.trim="scope.row.technicalDocuments" + type="textarea" size="large" style="width: 100%;" > @@ -150,6 +148,7 @@ <template #default="scope"> <el-input v-model.trim="scope.row.existingRecords" + type="textarea" size="large" style="width: 100%;" > @@ -159,7 +158,7 @@ <el-table-column label="操作" align="center" width="70"> <template #default="scope"> <!-- <el-button link type="primary" @click="openEdit('edit',scope.row)">编辑</el-button>--> - <el-button link type="danger" v-if="scope.$index>4 && scope.$index<state.form.sysDeptResponsibilityList.length-2" @click="handleDelete(scope.$index)">删除</el-button> + <el-button link type="danger" @click="handleDelete(scope.$index)">删除</el-button> </template> </el-table-column> </el-table> @@ -196,20 +195,9 @@ oldResponsibilityList: [], formRules:{ personNum: [{ required: true, message: '请输入部门人数', trigger: 'blur' }], - internalAuditors: [{ required: true, message: '请选择内审员', trigger: 'blur' }], + // internalAuditors: [{ required: true, message: '请选择内审员', trigger: 'blur' }], responsibilities: [{ required: true, message: '请输入部门职责', trigger: 'blur' }] }, - firstFive: [ - {clauseNum: '5.3',content: '组织的岗位、职责和权限'}, - {clauseNum: '4.1',content: '理解组织及其环境'}, - {clauseNum: '4.2',content: '理解相关方的需求和期望'}, - {clauseNum: '6.1',content: '应对风险和机遇的措施'}, - {clauseNum: '6.2',content: '质量目标及其实现的策划'} - ], - lastTwo: [ - {clauseNum: '9.1',content: '监视、测量、分析和评价'}, - {clauseNum: '10',content: '改进'} - ], userList: [] }) @@ -232,13 +220,8 @@ state.form[key] = res.data[key]; } }) - if(res.data.sysDeptResponsibilitys && Array.isArray(res.data.sysDeptResponsibilitys) && res.data.sysDeptResponsibilitys.find(i=>i.clauseNum == '5.3')){ - state.form.sysDeptResponsibilityList = sortResponsibilities(res.data.sysDeptResponsibilitys) - state.oldResponsibilityList = sortResponsibilities(res.data.sysDeptResponsibilitys) - }else{ - state.form.sysDeptResponsibilityList = [...state.firstFive,...res.data.sysDeptResponsibilitys,...state.lastTwo] - state.oldResponsibilityList = [...state.firstFive,...res.data.sysDeptResponsibilitys,...state.lastTwo] - } + state.form.sysDeptResponsibilityList = res.data.sysDeptResponsibilitys + state.oldResponsibilityList = res.data.sysDeptResponsibilitys state.form.personNum = state.form.personNum==0?null:state.form.personNum state.form.internalAuditors = state.form.internalAuditors==0?null:state.form.internalAuditors }else{ @@ -247,43 +230,6 @@ } else { ElMessage.warning(res.message) } -} - -const sortResponsibilities = (list) => { - // 提取firstFive和lastTwo的clauseNum作为排序依据 - const firstFiveClauses = state.firstFive.map(item => item.clauseNum) - const lastTwoClauses = state.lastTwo.map(item => item.clauseNum) - - // 分类处理 - const matchedFirstFive = [] - const matchedLastTwo = [] - const otherItems = [] - - // 先匹配firstFive - firstFiveClauses.forEach(clauseNum => { - const foundItem = list.find(item => item.clauseNum === clauseNum) - if (foundItem) { - matchedFirstFive.push(foundItem) - } - }); - - // 然后匹配lastTwo - lastTwoClauses.forEach(clauseNum => { - const foundItem = list.find(item => item.clauseNum === clauseNum) - if (foundItem && !matchedFirstFive.includes(foundItem)) { - matchedLastTwo.push(foundItem) - } - }); - - // 剩下的其他项 - list.forEach(item => { - if (!matchedFirstFive.includes(item) && !matchedLastTwo.includes(item)) { - otherItems.push(item) - } - }); - - // 合并结果数组 - return [...matchedFirstFive, ...otherItems, ...matchedLastTwo] } const getUserList = async ()=> { @@ -305,7 +251,7 @@ technicalDocuments: '', existingRecords: '' } - state.form.sysDeptResponsibilityList.splice(-2, 0, obj); + state.form.sysDeptResponsibilityList.push(obj); } const handleDelete = (i) =>{ @@ -317,8 +263,8 @@ if(valid){ state.form.delData = state.oldResponsibilityList.filter(oldItem => !state.form.sysDeptResponsibilityList.some(newItem => newItem.id === oldItem.id)).map(item => item.id) for(let i of state.form.sysDeptResponsibilityList){ - if(i.clauseNum == '' || i.content=='' || i.leader == ''){ - ElMessage.warning('条款编号、内容、负责人不可为空') + if(i.clauseNum == '' || i.content==''){ + ElMessage.warning('条款编号、内容不可为空') return } } @@ -370,9 +316,11 @@ .customedTable{ .el-table__cell{ padding: 2px 0 !important; + font-size: 14px !important; } .cell{ padding: 0 2px !important; + font-size: 14px !important; } } </style> \ No newline at end of file -- Gitblit v1.9.2