update 国内标准-收藏连点问题
This commit is contained in:
@@ -258,7 +258,8 @@ export default {
|
||||
selectedTreeKeys: [], // 选中的树节点key
|
||||
selectedTreeNodeCodes: [], // 选中树节点的code
|
||||
tableSlotField: ['standard_name', 'standard_number'], // 表格中需要插槽的字段
|
||||
treeLoading: false
|
||||
treeLoading: false,
|
||||
isCollection: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -335,6 +336,10 @@ export default {
|
||||
* @param record
|
||||
*/
|
||||
handleCollection ({ collectionFlag, id: standardId, standard_number: standardNumber }) {
|
||||
if (this.isCollection) {
|
||||
return
|
||||
}
|
||||
this.isCollection = true
|
||||
let params
|
||||
let submitFunc
|
||||
// 取消收藏
|
||||
@@ -346,16 +351,15 @@ export default {
|
||||
submitFunc = collectionDomesticStandard
|
||||
}
|
||||
// 收藏
|
||||
this.loading = true
|
||||
submitFunc(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData(1)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
this.isCollection = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user