[update] 联调企标计划立项/变更流程

This commit is contained in:
lideqin
2023-10-16 20:34:08 +08:00
parent 2db880c6b7
commit 48ac6dd11e
18 changed files with 374 additions and 193 deletions
@@ -43,8 +43,8 @@
</div>
<p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p>
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
<div v-for="(item, index) in dataSourceRight" :key="item.id" class="name-div">
{{ item.realname + '(' + item.username + ')' }}
<div v-for="(item, index) in dataSourceRight" :key="item.contactId" class="name-div">
{{ item.contactId_dictText }}
<a-icon type="close" @click="handleDelete(item, index)" />
</div>
</div>
@@ -192,7 +192,7 @@ export default {
if (selectedRowKeys.length > this.dataSourceRight.length) {
// 说明是增加了数据
for (const rowIndex in selectedRows) {
if (!this.dataSourceRight.find(item => item.id === selectedRows[rowIndex].id)) {
if (!this.dataSourceRight.find(item => item.contactId === selectedRows[rowIndex].contactId)) {
// 右侧不存在,追加到右侧表格
this.dataSourceRight.push(selectedRows[rowIndex])
}
@@ -202,7 +202,7 @@ export default {
if (selectedRowKeys && selectedRowKeys.length > 0) {
// 没有选中数据,说明这一页没有选中数据了
for (let i = 0; i < this.dataSourceRight.length; i++) {
if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].id)) {
if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].contactId)) {
// 表格选中中没有找到这一条数据,说明已经被删了
this.dataSourceRight.splice(i, 1)
i--
@@ -229,7 +229,12 @@ export default {
this.loadingRight = true
getAction(this.url.userListByIds, params).then((res) => {
if (res.success) {
this.dataSourceRight = res.result || []
this.dataSourceRight = res.result.map(item => {
return {
contactId: item.id,
contactId_dictText: item.realname + '(' + item.username + ')'
}
}) || []
} else {
this.$message.warn(res.message)
}
@@ -240,12 +245,12 @@ export default {
// 名字列表的删除
handleDelete (record, index) {
this.dataSourceRight.splice(index, 1)
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.id)
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.contactId)
},
handleOk () {
this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('listChange', this.dataSourceRight)
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(','))
this.$emit('nameChange', this.dataSourceRight.map(item => item.contactId_dictText).join(','))
this.close()
},
handleCancel () {