update 国内标准-编辑完善,AddForm组件完善

This commit is contained in:
赵霄
2023-09-13 17:48:01 +08:00
parent f42ecf2832
commit b159585660
6 changed files with 66 additions and 24 deletions
@@ -251,7 +251,8 @@ export default {
yesValue: YesOrNoEnum.YES.value,
noValue: YesOrNoEnum.NO.value,
nowShareInfo: {}, // 当前正在分享的数据
selectedTreeKeys: [], // 选中的树节点
selectedTreeKeys: [], // 选中的树节点key
selectedTreeNodeCodes: [], // 选中树节点的code
tableSlotField: ['standard_name', 'standard_number'], // 表格中需要插槽的字段
treeLoading: false
}
@@ -273,6 +274,7 @@ export default {
getDomesticStandardTree({ nodeName: this.treeInput }).then(res => {
this.treeData = []
this.selectedTreeKeys = []
this.selectedTreeNodeCodes = []
this.filters.nodeCode = null
if (res.success) {
const treeData = res.result || []
@@ -440,6 +442,7 @@ export default {
*/
handleSelectTreeNode ({ dataRef }) {
this.selectedTreeKeys = [dataRef.key]
this.selectedTreeNodeCodes = [dataRef.nodeCode]
this.filters.nodeCode = dataRef.nodeCode
this.loadData(1)
},
@@ -448,7 +451,7 @@ export default {
*/
handleConfigStandard () {
// 没选择左侧树节点,需要提示“请先选择二级及以下体系”
if (!this.selectedTreeKeys || this.selectedTreeKeys.length === 0) {
if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0) {
this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode'))
return
}
@@ -462,7 +465,7 @@ export default {
continueConfigStandard (dbFieldName, standardIds) {
this.loading = true
const params = {
nodeId: this.selectedTreeKeys[0],
nodeCode: this.selectedTreeNodeCodes[0],
standardIds
}
configDomesticStandard(params).then(res => {
@@ -481,7 +484,7 @@ export default {
*/
handleRemoveStandard () {
// 没选择左侧树节点,需要提示“请先选择二级及以下体系”
if (!this.selectedTreeKeys || this.selectedTreeKeys.length === 0) {
if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0) {
this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode'))
return
}
@@ -492,7 +495,7 @@ export default {
}
this.loading = true
const params = {
nodeId: this.selectedTreeKeys[0],
nodeCode: this.selectedTreeNodeCodes[0],
ids: this.selectedRowKeys.join(',')
}
removeDomesticStandard(params).then(res => {