fix 79401

This commit is contained in:
danshihao
2024-01-18 15:49:21 +08:00
parent 384273642a
commit d47e190e10
2 changed files with 21 additions and 42 deletions
@@ -43,11 +43,9 @@
<!-- 实际稽查人 -->
<template v-slot:actualInspector="{text, record}">
<div class="table-form" v-if="isInputInspectionReport">
<a-select v-model="record.actualInspectUser" style="width: 100%" allowClear
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.actualInspector')"
show-search :filter-option="filterOption">
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname + '(' + item.username + ')' }}</a-select-option>
</a-select>
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.actualInspector')" :show-btn="false"
type="radio" :nameStr="record.actualInspectUser_dictText" @nameChange="nameChange($event, record)"
v-model="record.actualInspectUser" />
</div>
<a-tooltip v-else overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
@@ -92,15 +90,15 @@ import InspectionProcessTableModal
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTableModal'
import InspectionProcessContent
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessContent'
import { getUserList } from '@api/api'
import InspectionProcessReport
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessReport'
import InspectionProcessRectificationPlan
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlan'
import { EsInspectionProcess } from '@/enums/commonEnums'
import UserSelection from '@comp/selection/UserSelection'
export default {
name: 'InspectionProcessTable',
components: { InspectionProcessRectificationPlan, InspectionProcessReport, InspectionProcessContent, InspectionProcessTableModal, JTable },
components: { UserSelection, InspectionProcessRectificationPlan, InspectionProcessReport, InspectionProcessContent, InspectionProcessTableModal, JTable },
mixins: [JeroListMixin],
props: {
// 当前节点
@@ -122,7 +120,6 @@ export default {
delete: '/esinspect/processEsInspect/delete'
},
model: {},
userList: [],
dataSource: [],
// 需要删除的数据id(前端添加后没有保存表的数据没有id)
delIds: [],
@@ -255,12 +252,11 @@ export default {
})
}
},
mounted () {
if (this.isInputInspectionReport) {
this.getUserList()
}
},
methods: {
// 实际稽查人名字回显
nameChange (value, record) {
record.actualInspectUser_dictText = value
},
// 子表格删除数据事件(将删除id统一收集)
addDelIds (list) {
this.delIds.push(...list)
@@ -269,14 +265,6 @@ export default {
getDelIds () {
return Array.from(new Set(this.delIds)).filter(item => item).join(',')
},
// 返回用户列表
getUserList () {
getUserList({ pageNo: -1, pageSize: -1, order: 'desc', column: 'createTime' }).then(res => {
if (res.success) {
this.userList = res.result.records || []
}
})
},
// 稽查内容
handleInspectionContent (record, index) {
this.$refs.inspectionProcessContent.show(record, index)