diff --git a/src/components/selection/UserSelectByContactModal.vue b/src/components/selection/UserSelectByContactModal.vue index 7fa4e961..8e26cf2f 100644 --- a/src/components/selection/UserSelectByContactModal.vue +++ b/src/components/selection/UserSelectByContactModal.vue @@ -249,9 +249,9 @@ export default { this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.contactId) }, handleOk () { + this.$emit('nameChange', this.dataSourceRight.map(item => item.contactId_dictText).join(',')) this.$emit('change', this.selectedRowKeys.join(',')) this.$emit('listChange', this.dataSourceRight) - this.$emit('nameChange', this.dataSourceRight.map(item => item.contactId_dictText).join(',')) this.close() }, handleCancel () { diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue index ed19db1c..e2768557 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue @@ -17,7 +17,7 @@ :can-drag="true" :scroll="{x: '100%'}" ref="table" - :rowKey="(record, index) => {return record.id || index}" + rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="false" @@ -54,11 +54,11 @@ import JTable from '@/components/jero/JTable' // 选人弹框 import UserSelectModal from '@/components/selection/UserSelectModal' -import UserSelectByContact from '@/components/selection/UserSelectByContact' +import UserSelection from '@/components/selection/UserSelection' export default { name: 'ContactSelectApproverBaseInfo', - components: { JTable, UserSelectModal, UserSelectByContact }, + components: { JTable, UserSelectModal, UserSelection }, props: { disabled: { type: Boolean, @@ -198,7 +198,7 @@ export default { width: 300, dataIndex: 'approvalUser', customRender: (value, row, index) => { - return } @@ -291,8 +291,9 @@ export default { // 批量设置审批人选择人后的回调 userSelectModalChange (value) { for (const item of this.selectedRowKeys) { - this.dataSource[item].approvalUser = value - this.dataSource[item].approvalUser_dictText = this.selectNames + const curr = this.dataSource.find(i => i.id === item) + curr.approvalUser = value + curr.approvalUser_dictText = this.selectNames } this.dataSource = JSON.parse(JSON.stringify(this.dataSource)) }, diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue index 264cdf3e..ae2e462a 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue @@ -69,7 +69,7 @@ - + @@ -80,7 +80,7 @@ import store from '@/store' import JTable from '@/components/jero/JTable' import { downloadFile } from '@/api/manage' import UserSelectByContact from '@/components/selection/UserSelectByContact' -import UserSelectModal from '@/components/selection/UserSelectModal' +import UserSelectByContactModal from '@/components/selection/UserSelectByContactModal' import BaseInfoTableModal from './BaseInfoTableModal' // 导入的加载提示 @@ -88,7 +88,7 @@ let importModalLoading export default { name: 'EngineerInitBaseInfo', - components: { BaseInfoTableModal, UserSelectByContact, JTable, UserSelectModal }, + components: { BaseInfoTableModal, UserSelectByContact, JTable, UserSelectByContactModal }, props: { disabled: { type: Boolean, @@ -293,7 +293,7 @@ export default { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表格赋值 - this.dataSource = data.dataList + this.dataSource = data }, // 外层要获取数据 getData () {