[update] 联调企标收藏
This commit is contained in:
@@ -161,6 +161,7 @@ import {
|
||||
shiftStandard,
|
||||
initChange,
|
||||
collectStandard,
|
||||
cancelCollectStandard,
|
||||
shareStandard,
|
||||
deleteTreeNode
|
||||
} from '@api/enterpriseStandardLibraryApi'
|
||||
@@ -415,15 +416,31 @@ export default {
|
||||
},
|
||||
// 收藏
|
||||
handleCollection (record) {
|
||||
const params = {}
|
||||
params.id = record.id
|
||||
collectStandard(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
if (record.collectionFlag) {
|
||||
const params = {}
|
||||
params.id = record.id
|
||||
// 说明已收藏,调取消收藏接口
|
||||
cancelCollectStandard(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const params = {}
|
||||
params.standardId = record.id
|
||||
params.standardNumber = record.standard_no
|
||||
collectStandard(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 分享
|
||||
handleShare (record) {
|
||||
|
||||
Reference in New Issue
Block a user