[update] 修改零部件名称选择组件

This commit is contained in:
lideqin
2024-01-22 16:57:04 +08:00
parent c546731d54
commit 97b24cd096
+11 -6
View File
@@ -38,7 +38,7 @@
:pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }"
:loading="confirmLoading"
:childrenColumnName="['childPartNameList']"
childrenColumnName="childPartNameList"
@change="handleTableChange">
<template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style">
@@ -51,7 +51,7 @@
<p class="modal-content-title">{{ $t('treeSelection.selectedData') }}</p>
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
<div v-for="(item, index) in dataSourceRight" :key="item.code" class="name-div">
{{ item.itemText }}
{{ item.name }}
<a-icon type="close" @click="handleDelete(item, index)" />
</div>
</div>
@@ -61,7 +61,6 @@
<script>
import { getAction } from '../../api/manage'
import { getDictByCode } from '../../api/api'
export default {
name: 'TreeSelectModal',
@@ -122,7 +121,10 @@ export default {
}
],
dataSource: [],
selectedRowKeys: []
selectedRowKeys: [],
url: {
queryByCodes: '/laws/standard/partName/echo'
}
}
},
methods: {
@@ -230,9 +232,12 @@ export default {
this.close()
},
getSelectedList (codes) {
getDictByCode({ codes }).then(res => {
const params = {
selectNodeCodes: codes
}
getAction(this.url.queryByCodes, params).then(res => {
if (res.success) {
this.dataSourceRight = res.result || []
this.dataSourceRight = res.result.records || []
}
})
}