Merge remote-tracking branch 'origin/master'

This commit is contained in:
lideqin
2024-07-26 15:34:36 +08:00
6 changed files with 34 additions and 3 deletions
+2 -1
View File
@@ -124,7 +124,8 @@ module.exports = {
pleaseSelectClause: 'Please select terms',
interpretationDistribution: 'Interpretation and Distribution',
interpretationTable: 'Interpretation Table',
interpretationAttributes: 'Interpretation of attributes'
interpretationAttributes: 'Interpretation of attributes',
summarySingleChoiceTip: 'Need to summarize as single choice'
},
// 流程配置
processConfig: {
+2 -1
View File
@@ -124,7 +124,8 @@ module.exports = {
pleaseSelectClause: '请选择条款',
interpretationDistribution: '解读分发',
interpretationTable: '解读表',
interpretationAttributes: '解读属性'
interpretationAttributes: '解读属性',
summarySingleChoiceTip: '需要汇总为单选'
},
// 流程配置
processConfig: {
@@ -7,7 +7,7 @@
</div>
<div class="content-wrapper">
<div class="content-div" v-for="item in dataSource" :key="item.id" @click="handleTo(item.url)">
<img class="icon-img" :src="item.src" :alt="item.name" v-if="item.src">
<img class="icon-img" :src="item.src" :alt="item.name" :title="item.name" v-if="item.src">
<!--<i class="iconfont" :class="'icon-' + 'shengchanliuchengguanli'"></i>-->
<a-tooltip placement="top">
<template slot="title">{{item.name}}</template>
@@ -561,6 +561,10 @@ export default {
delete item.id
delete item[uuidFlag]
}
// 是否与上一版相同是单选,如果不选是undefined,发请求undefined会被过滤,后端接收不到,导致值不会被清空,设置成空字符串
if (item.isSameAsPrevVersion === undefined) {
item.isSameAsPrevVersion = ''
}
return item
})
},
@@ -70,6 +70,7 @@
:disabled="disabled"
multi
treeOpera
@change="departChange($event, 'responsibleDepartment')"
@back="departNameChange($event, 'responsibleDepartment')"
v-decorator="['responsibleDepartment']" />
</a-form-item>
@@ -88,6 +89,7 @@
:disabled="disabled"
multi
treeOpera
@change="departChange($event, 'relatedDepartment')"
@back="departNameChange($event, 'relatedDepartment')"
v-decorator="['relatedDepartment']" />
</a-form-item>
@@ -347,6 +349,13 @@ export default {
nameChange (name, field) {
this.model[field + '_dictText'] = name
},
// 部门选择改变
departChange (depart, field) {
// 如果没有值就清空名字
if (!depart) {
this.model[field + '_dictText'] = ''
}
},
// 部门名称
departNameChange (departList, field) {
this.model[field + '_dictText'] = departList.map(item => item.text).join(',')
@@ -130,6 +130,22 @@ export default {
}
// 汇总节点,处理表单
if (this.isStandardInterpreterSummary) {
// 需要处理汇总节点的表单,是否与上一版相同不能多选(汇总会变成多选逗号分隔这是个单选框)
const list = this.$refs.interpretationClauseTable.getData() || []
const rowIndex = list.findIndex(row => {
const isSame = row.isSameAsPrevVersion
if (isSame && typeof isSame === 'string' && isSame.split(',').length > 1) {
return true
}
})
if (rowIndex !== -1) {
// 提示,是否与上一版相同需要汇总为单选
this.$message.warn(
`"${this.$t('workCenter.standardInterpretationProcess.sameAsPreviousVersion')}"` +
this.$t('workCenter.standardInterpretationProcess.summarySingleChoiceTip')
)
obj._flag = true
}
obj.formData = await new Promise((resolve) => {
this.form.validateFields((err, values) => {
if (err) { obj._flag = true }