update 国内标准-批量删除页面效果修改,树查询数据

This commit is contained in:
赵霄
2023-09-13 13:59:30 +08:00
parent 495dfe5863
commit 1ab8aeae76
2 changed files with 45 additions and 26 deletions
@@ -2,12 +2,12 @@
<a-card :bordered="false" class="page-left-right-layout">
<!-- 树部分-->
<div class="page-left-box">
<a-spin :spinning="loading">
<a-spin :spinning="treeLoading">
<!-- $t('standardRegulationLibrary.domesticStandard.treeSearchPlaceholder')-->
<a-input-search v-model="treeInput"
:placeholder="$t('standardRegulationLibrary.domesticStandard.treeSearchPlaceholder')"
@search="handleTreeSearch" />
<a-tree :show-line="true" :show-icon="true" :tree-data="treeData">
<a-tree :show-line="true" :show-icon="true" :tree-data="treeData" :selected-keys="selectedTreeKeys">
<a-icon type="folder" slot="folder" class="tree-icon" />
<a-icon type="file" slot="file" class="tree-icon" />
@@ -252,7 +252,8 @@ export default {
noValue: YesOrNoEnum.NO.value,
nowShareInfo: {}, // 当前正在分享的数据
selectedTreeKeys: [], // 选中的树节点
tableSlotField: ['standard_name', 'standard_number'] // 表格中需要插槽的字段
tableSlotField: ['standard_name', 'standard_number'], // 表格中需要插槽的字段
treeLoading: false
}
},
computed: {
@@ -268,13 +269,19 @@ export default {
* 获取树数据
*/
initTreeData () {
this.treeLoading = true
getDomesticStandardTree({ nodeName: this.treeInput }).then(res => {
this.treeData = []
this.selectedTreeKeys = []
this.filters.nodeCode = null
if (res.success) {
const treeData = res.result || []
this.treeData = this.dealTreeData(treeData)
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.treeLoading = false
})
},
/**
@@ -433,6 +440,8 @@ export default {
*/
handleSelectTreeNode ({ dataRef }) {
this.selectedTreeKeys = [dataRef.key]
this.filters.nodeCode = dataRef.nodeCode
this.loadData(1)
},
/**
* 配置标准