From be57c60a2b1ce03ebdd264176149c52870c0b760 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期二, 11 十一月 2025 10:52:28 +0800
Subject: [PATCH] 企业改成单位
---
src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue | 109 ++++++++++++------------------------------------------
1 files changed, 25 insertions(+), 84 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue
index 4820123..d0d19e8 100644
--- a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue
+++ b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue
@@ -69,14 +69,10 @@
<el-input
v-model.trim="scope.row.clauseNum"
size="large"
- type="textarea" :autosize="{minRows: 1}"
- 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">
@@ -84,14 +80,10 @@
<el-input
v-model.trim="scope.row.content"
size="large"
- type="textarea" :autosize="{minRows: 1}"
- 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">
@@ -112,29 +104,29 @@
<el-input
v-model.trim="scope.row.leader"
size="large"
- type="textarea" :autosize="{minRows: 1}"
+ 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" :autosize="{minRows: 1}"
- 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" :autosize="{minRows: 1}"
+ type="textarea"
style="width: 100%;"
clearable
>
@@ -145,7 +137,7 @@
<template #default="scope">
<el-input
v-model.trim="scope.row.technicalDocuments"
- type="textarea" :autosize="{minRows: 1}"
+ type="textarea"
size="large"
style="width: 100%;"
>
@@ -156,7 +148,7 @@
<template #default="scope">
<el-input
v-model.trim="scope.row.existingRecords"
- type="textarea" :autosize="{minRows: 1}"
+ type="textarea"
size="large"
style="width: 100%;"
>
@@ -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) =>{
@@ -324,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
}
}
@@ -377,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