[update] 联调企标收藏
This commit is contained in:
@@ -21,7 +21,9 @@ const initChange = (params) => getAction('', params)
|
||||
// 临时权限设置
|
||||
const temporaryPermissionSet = (params) => postAction('/laws/standard/enterprise/tempPermission', params)
|
||||
// 收藏企标
|
||||
const collectStandard = (params) => getAction('', params)
|
||||
const collectStandard = (params) => postAction('/personal/lawsStandardCollection/enterprise/add', params)
|
||||
// 取消收藏企标
|
||||
const cancelCollectStandard = (params) => postAction('/personal/lawsStandardCollection/enterprise/delete', params)
|
||||
// 分享企标
|
||||
const shareStandard = (params) => getAction('', params)
|
||||
|
||||
@@ -55,6 +57,7 @@ export {
|
||||
initChange,
|
||||
temporaryPermissionSet,
|
||||
collectStandard,
|
||||
cancelCollectStandard,
|
||||
shareStandard,
|
||||
|
||||
setQualityStandard,
|
||||
|
||||
@@ -169,6 +169,6 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.ant-calendar-picker {
|
||||
min-width: 195px;
|
||||
/*min-width: 195px;*/
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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