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