fix 79317

This commit is contained in:
danshihao
2023-12-19 11:07:57 +08:00
parent 08b209b6a8
commit ecee848592
8 changed files with 34 additions and 18 deletions
@@ -1,9 +1,9 @@
<template> <template>
<div class="selection-wrapper"> <div class="selection-wrapper">
<div class="box-title-text"> <div class="box-title-text">
<a-input class="box-input" v-model="textVals" :title="textVals" <a-input class="box-input" :value="value" :title="value" @input="indexClick"
:disabled="disabledInput" :placeholder="placeholder"> :disabled="disabledInput" :placeholder="placeholder">
<a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/> <a-icon v-show="value" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
</a-input> </a-input>
<a-button v-if="!disabled" type="primary" class="button-box" @click="workGroupClick"> <a-button v-if="!disabled" type="primary" class="button-box" @click="workGroupClick">
{{this.$t('workGroupSelect.select')}} {{this.$t('workGroupSelect.select')}}
@@ -23,6 +23,7 @@
@expand="onExpand" @expand="onExpand"
:autoExpandParent="autoExpandParent" :autoExpandParent="autoExpandParent"
:expandedKeys="expandedKeys" :expandedKeys="expandedKeys"
:selectedKeys.sync="selectedKeys"
:checkedKeys="checkedKeys"> :checkedKeys="checkedKeys">
<template slot="title" slot-scope="{title}"> <template slot="title" slot-scope="{title}">
@@ -72,7 +73,8 @@ export default {
checkedRows: [], checkedRows: [],
searchValue: '', searchValue: '',
checkStrictly: true, checkStrictly: true,
fullscreen: false fullscreen: false,
selectedKeys: []
} }
}, },
created () { created () {
@@ -104,15 +106,22 @@ export default {
this.checkedKeys = [] this.checkedKeys = []
if (textVals) { if (textVals) {
this.$nextTick(() => { this.$nextTick(() => {
const nodes = this.findKeysByNodes(textVals.split(',')) // 如果是多选就以逗号分开查找,否则就直接查找
const nodes = this.findKeysByNodes(this.multi ? textVals.split(',') : textVals)
this.checkedRows = nodes this.checkedRows = nodes
this.checkedKeys = nodes.map(item => item.key) this.checkedKeys = nodes.map(item => item.key)
this.selectedKeys = [...this.checkedKeys]
}) })
} }
}, },
findKeysByNodes (titles) { findKeysByNodes (titles) {
const _this = this
const nodes = [] const nodes = []
function searchTree (node) { function searchTree (node) {
// 如果是单选模式已经找到一个,就不继续查找了
if (!_this.multi && nodes.length) {
return
}
if (titles.includes(node.title)) { if (titles.includes(node.title)) {
nodes.push(node) nodes.push(node)
} }
@@ -353,7 +362,9 @@ export default {
// 单选不显示选择框 // 单选不显示选择框
.select-work-group-tree.radio-tree { .select-work-group-tree.radio-tree {
/deep/.ant-tree-checkbox { /deep/.ant-tree-checkbox {
display: none; //display: none;
opacity: 0;
position: absolute;
} }
} }
@@ -65,7 +65,7 @@
type="radio" type="radio"
dictCode="yn" dictCode="yn"
@change="changeIsCountersign" @change="changeIsCountersign"
v-decorator="['pass', validatorRules.isCountersign]" /> v-decorator="['countersignTag', validatorRules.isCountersign]" />
</a-form-item> </a-form-item>
</div> </div>
<div class="form-flex-item custom-flex-form-item"> <div class="form-flex-item custom-flex-form-item">
@@ -290,7 +290,7 @@ export default {
// 回显会签表单 // 回显会签表单
this.$nextTick(() => { this.$nextTick(() => {
this.countersignForm && this.countersignForm.setFieldsValue({ this.countersignForm && this.countersignForm.setFieldsValue({
pass: data.countersignTag, countersignTag: data.countersignTag,
involveList: data.countersign || '' involveList: data.countersign || ''
}) })
}) })
@@ -359,9 +359,9 @@ export default {
// 处理其他参数 // 处理其他参数
params.map = Object.assign({}, formDataList[1], getPersonInfo) params.map = Object.assign({}, formDataList[1], getPersonInfo)
// 节点三:会签表单放到对象最外层单独存储业务信息,params.map里是流程用的 // 节点三:会签表单放到对象最外层单独存储业务信息,params.map里是流程用的
if (this.currentNode === EsInspectionPlan.liaisonCollect.value && Object.hasOwnProperty.call(params.map, 'pass')) { if (this.currentNode === EsInspectionPlan.liaisonCollect.value && Object.hasOwnProperty.call(params.map, 'countersignTag')) {
params.countersignTag = params.map.pass params.countersignTag = params.map.countersignTag
params.map.pass = this.convertPass(params.map.pass) // params.map.pass = this.convertPass(params.map.pass)
} }
if (params.map.involveList && typeof params.map.involveList === 'string') { if (params.map.involveList && typeof params.map.involveList === 'string') {
params.countersign = params.map.involveList params.countersign = params.map.involveList
@@ -482,10 +482,15 @@ export default {
if (this.loading) return if (this.loading) return
this.loading = true this.loading = true
this.getPageParams().then(res => { this.getPageParams().then(res => {
// 同意和提交一直传true // 节点三,pass决定是否跳过会签
res.map.pass = true if (this.currentNode === EsInspectionPlan.liaisonCollect.value) {
res.map.pass = this.convertPass(res.map.countersignTag)
} else {
// 其他情况一直传true
res.map.pass = true
}
// 不是提交按钮 // 不是提交按钮
if (!isSubmitBtn) { if (isSubmitBtn !== true) {
// 没有填写注释,就默认同意 // 没有填写注释,就默认同意
if (!res.processApprovalRecord.commitText) { if (!res.processApprovalRecord.commitText) {
res.processApprovalRecord.commitText = '同意' res.processApprovalRecord.commitText = '同意'
@@ -413,7 +413,7 @@ export default {
// 同意和提交一直传true // 同意和提交一直传true
res.map.pass = true res.map.pass = true
// 不是提交按钮 // 不是提交按钮
if (!isSubmitBtn) { if (isSubmitBtn !== true) {
// 没有填写注释,就默认同意 // 没有填写注释,就默认同意
if (!res.processApprovalRecord.commitText) { if (!res.processApprovalRecord.commitText) {
res.processApprovalRecord.commitText = '同意' res.processApprovalRecord.commitText = '同意'
@@ -410,7 +410,7 @@ export default {
// 同意和提交一直传true // 同意和提交一直传true
res.map.pass = true res.map.pass = true
// 不是提交按钮 // 不是提交按钮
if (!isSubmitBtn) { if (isSubmitBtn !== true) {
// 没有填写注释,就默认同意 // 没有填写注释,就默认同意
if (!res.processApprovalRecord.commitText) { if (!res.processApprovalRecord.commitText) {
res.processApprovalRecord.commitText = '同意' res.processApprovalRecord.commitText = '同意'
@@ -418,7 +418,7 @@ export default {
// 同意和提交一直传true // 同意和提交一直传true
res.map.pass = true res.map.pass = true
// 不是提交按钮 // 不是提交按钮
if (!isSubmitBtn) { if (isSubmitBtn !== true) {
// 没有填写注释,就默认同意 // 没有填写注释,就默认同意
if (!res.processApprovalRecord.commitText) { if (!res.processApprovalRecord.commitText) {
res.processApprovalRecord.commitText = '同意' res.processApprovalRecord.commitText = '同意'
@@ -502,7 +502,7 @@ export default {
// 同意和提交一直传true // 同意和提交一直传true
res.map.pass = true res.map.pass = true
// 不是提交按钮 // 不是提交按钮
if (!isSubmitBtn) { if (isSubmitBtn !== true) {
// 没有填写注释,就默认同意 // 没有填写注释,就默认同意
if (!res.processApprovalRecord.commitText) { if (!res.processApprovalRecord.commitText) {
res.processApprovalRecord.commitText = '同意' res.processApprovalRecord.commitText = '同意'
@@ -440,7 +440,7 @@ export default {
res.map.pass = true res.map.pass = true
res.notAttend = false res.notAttend = false
// 不是提交按钮 // 不是提交按钮
if (!isSubmitBtn) { if (isSubmitBtn !== true) {
// 没有填写注释,就默认同意 // 没有填写注释,就默认同意
if (!res.processApprovalRecord.commitText) { if (!res.processApprovalRecord.commitText) {
res.processApprovalRecord.commitText = '同意' res.processApprovalRecord.commitText = '同意'