[update] 法规符合性排查流程发起节点责任部门查询改多选

This commit is contained in:
lideqin
2024-07-23 10:08:03 +08:00
parent 95a7d89da6
commit acbdc978e7
2 changed files with 23 additions and 8 deletions
@@ -87,7 +87,7 @@
<!-- 业务基本信息和业务分派信息部分 --> <!-- 业务基本信息和业务分派信息部分 -->
<!-- 节点1法规工程师发起 --> <!-- 节点1法规工程师发起 -->
<engineer-init-base-info v-if="currentNode === 1" ref="baseInfoRef" :disabled="isLook" @processNameChange="processNameChange"></engineer-init-base-info> <engineer-init-base-info v-if="currentNode === 1" ref="baseInfoRef" :disabled="isLook" @processNameChange="processNameChange" @loading="changeLoading"></engineer-init-base-info>
<!-- 节点2各部门接口人分发 --> <!-- 节点2各部门接口人分发 -->
<interface-person-delivery-base-info v-if="currentNode === 2" ref="baseInfoRef" :disabled="isLook"></interface-person-delivery-base-info> <interface-person-delivery-base-info v-if="currentNode === 2" ref="baseInfoRef" :disabled="isLook"></interface-person-delivery-base-info>
<!-- 节点3主排查人分发 --> <!-- 节点3主排查人分发 -->
@@ -466,6 +466,10 @@ export default {
this.processInfoForm.setFieldsValue(pick(param, 'processName')) this.processInfoForm.setFieldsValue(pick(param, 'processName'))
}) })
}, },
// 子组件控制loading
changeLoading (loading) {
this.loading = loading
},
// 不可驳回的回调 // 不可驳回的回调
disabledReject () { disabledReject () {
this.rejectDisabled = true this.rejectDisabled = true
@@ -154,6 +154,8 @@
style="width: 100%" style="width: 100%"
:tree-data="categoryTreeList" :tree-data="categoryTreeList"
show-search show-search
tree-checkable
treeCheckStrictly
:filterTreeNode="filterTreeOption" :filterTreeNode="filterTreeOption"
:placeholder="$t('pleaseSelect') + $t('responsibleDepartment')" :placeholder="$t('pleaseSelect') + $t('responsibleDepartment')"
/> />
@@ -674,6 +676,7 @@ export default {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
console.log('-----valid', valid) console.log('-----valid', valid)
if (valid) { if (valid) {
this.$emit('loading', true)
// 获取下方那个表格信息 // 获取下方那个表格信息
const param = Object.assign({}, this.standardDataSource[0], this.formInline) const param = Object.assign({}, this.standardDataSource[0], this.formInline)
regulatoryComplianceCheckGenerate(param).then(res => { regulatoryComplianceCheckGenerate(param).then(res => {
@@ -689,6 +692,8 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}).finally(() => {
this.$emit('loading', false)
}) })
} }
}) })
@@ -729,15 +734,20 @@ export default {
// 查询 // 查询
searchQuery () { searchQuery () {
if (this.queryParam.authDept) { if (this.queryParam.authDept) {
// 获取选中的部门的所有子集 const objArr = []
// 先获取选中的部门在部门里的对象 for (const item of this.queryParam.authDept) {
const obj = this.getDepartObj(this.queryParam.authDept, this.categoryTreeList) // 获取选中的部门的所有子集
console.log('------------obj', obj) // 先获取选中的部门在部门里的对象
const obj = this.getDepartObj(item.value, this.categoryTreeList)
console.log('------------obj', obj)
objArr.push(obj)
}
// 获取选中部门的所有子集id // 获取选中部门的所有子集id
const deptArr = this.getDepartChildren([obj]).map(item => item.key) const deptArr = this.getDepartChildren(objArr).map(item => item.key)
console.log('------------deptArr', deptArr) console.log('------------deptArr', deptArr)
this.dataSource = this.dataList.filter(item => { this.dataSource = this.dataList.filter(data => {
return deptArr.includes(item.authDept) const authDept = data.authDept ? data.authDept.split(',') : []
return deptArr.some(item => authDept.includes(item))
}) })
} else { } else {
this.dataSource = JSON.parse(JSON.stringify(this.dataList)) this.dataSource = JSON.parse(JSON.stringify(this.dataList))
@@ -747,6 +757,7 @@ export default {
}, },
// 重置 // 重置
searchReset () { searchReset () {
this.queryParam = {}
this.dataSource = JSON.parse(JSON.stringify(this.dataList)) this.dataSource = JSON.parse(JSON.stringify(this.dataList))
this.selectedRowKeys = [] this.selectedRowKeys = []
this.selectionRows = [] this.selectionRows = []