From 7d8c89bce98c55ec01c4203bfbfdbdbe11a838eb Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期二, 16 九月 2025 09:36:37 +0800
Subject: [PATCH] 修改新增
---
src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue | 91 +++++++--------------------------------------
1 files changed, 15 insertions(+), 76 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue
index b78fe03..d0d19e8 100644
--- a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue
+++ b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue
@@ -70,13 +70,9 @@
v-model.trim="scope.row.clauseNum"
size="large"
type="textarea"
- v-if="scope.$index>4 && scope.$index<state.form.sysDeptResponsibilityList.length-2"
style="width: 100%;"
>
</el-input>
- <span v-else>
- {{scope.row.clauseNum}}
- </span>
</template>
</el-table-column>
<el-table-column label="内容" prop="content" align="center">
@@ -85,13 +81,9 @@
v-model.trim="scope.row.content"
size="large"
type="textarea"
- v-if="scope.$index>4 && scope.$index<state.form.sysDeptResponsibilityList.length-2"
style="width: 100%;"
>
</el-input>
- <span v-else>
- {{scope.row.content}}
- </span>
</template>
</el-table-column>
<el-table-column label="条款负责人" prop="leader" align="center">
@@ -118,17 +110,17 @@
</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="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
@@ -166,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>
@@ -206,17 +198,6 @@
// 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: []
})
@@ -239,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{
@@ -254,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 ()=> {
@@ -312,7 +251,7 @@
technicalDocuments: '',
existingRecords: ''
}
- state.form.sysDeptResponsibilityList.splice(-2, 0, obj);
+ state.form.sysDeptResponsibilityList.push(obj);
}
const handleDelete = (i) =>{
--
Gitblit v1.9.2