[update] 修改零部件名称选择组件
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }"
|
||||||
:loading="confirmLoading"
|
:loading="confirmLoading"
|
||||||
:childrenColumnName="['childPartNameList']"
|
childrenColumnName="childPartNameList"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<template slot="text" slot-scope="text">
|
<template slot="text" slot-scope="text">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<p class="modal-content-title">{{ $t('treeSelection.selectedData') }}</p>
|
<p class="modal-content-title">{{ $t('treeSelection.selectedData') }}</p>
|
||||||
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
|
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
|
||||||
<div v-for="(item, index) in dataSourceRight" :key="item.code" class="name-div">
|
<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)" />
|
<a-icon type="close" @click="handleDelete(item, index)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,7 +61,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction } from '../../api/manage'
|
import { getAction } from '../../api/manage'
|
||||||
import { getDictByCode } from '../../api/api'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TreeSelectModal',
|
name: 'TreeSelectModal',
|
||||||
@@ -122,7 +121,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
selectedRowKeys: []
|
selectedRowKeys: [],
|
||||||
|
url: {
|
||||||
|
queryByCodes: '/laws/standard/partName/echo'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -230,9 +232,12 @@ export default {
|
|||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
getSelectedList (codes) {
|
getSelectedList (codes) {
|
||||||
getDictByCode({ codes }).then(res => {
|
const params = {
|
||||||
|
selectNodeCodes: codes
|
||||||
|
}
|
||||||
|
getAction(this.url.queryByCodes, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataSourceRight = res.result || []
|
this.dataSourceRight = res.result.records || []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user