diff --git a/src/pages/searchCenter/pages/advancedSearch.vue b/src/pages/searchCenter/pages/advancedSearch.vue
index c04b3ec0e..ef7c8d359 100644
--- a/src/pages/searchCenter/pages/advancedSearch.vue
+++ b/src/pages/searchCenter/pages/advancedSearch.vue
@@ -937,7 +937,16 @@
查看
- 取消收藏
+
+ 收藏
+
+
+ 取消收藏
+
@@ -948,8 +957,16 @@
查看
- 收藏
-
+
+ 收藏
+
+
+ 取消收藏
+
@@ -960,7 +977,16 @@
查看
- 取消收藏
+
+ 收藏
+
+
+ 取消收藏
+
收藏
@@ -1306,9 +1332,7 @@ export default {
const inlandList = data['INLAND_STAND'] || []
const foreignList = data['FOREIGN_STAND'] || []
const foreignFilterList = foreignList.filter ( item => item.attrField === 'GXHBQ' || item.attrField === 'ZBJBD' || item.attrField === 'KWJ' || item.attrField === 'TXLB');
- console.log(foreignFilterList)
this.formFieldListStandData = this.formFieldListStandData.concat(inlandList).concat(foreignFilterList);
- console.log(this.formFieldListStandData,'-----------------------------------1')
}
}, e => {})
},
@@ -1720,6 +1744,13 @@ export default {
this.total = res.data.count;
this.resultData = res.data.list;
this.resultData.map((item) => {
+ if (item.collectId != null && item.collectId !== '') {
+ item.collectBtn = false
+ item.cancelCollectBtn = true
+ } else {
+ item.collectBtn = true
+ item.cancelCollectBtn = false
+ }
if (item.applyArcticShow) {
item.applyArcticShow.toString();
item.applyArcticShow = item.applyArcticShow.slice(0, item.applyArcticShow.length - 1);
@@ -1936,13 +1967,13 @@ export default {
}
let pagetype = "";
if (item.type === "stand") {
- if (item.stand_type === "INLAND") {
+ if (item.standType === "INLAND") {
pagetype = "INLAND_STAND";
} else {
pagetype = "FOREIGN_STAND";
}
} else if (item.type === "laws") {
- if (item.laws_type === "INLAND") {
+ if (item.lawsType === "INLAND") {
pagetype = "INLAND_LAWS";
} else {
pagetype = "FOREIGN_LAWS";
@@ -1959,6 +1990,7 @@ export default {
}
}
personCollect.collectType = pagetype;
+ personCollect.userId = this.$store.getters.userInfo.userId
this.$http.postData("person/personCollect", personCollect, {
_this: this
}, res => {
@@ -1970,21 +2002,20 @@ export default {
},
// 取消收藏
cancelCollectStandard(item) {
- // this.judgeBussRole(item)
- // if (this.bussRoleFlag === false) {
- // this.$message.error('当前角色无权限操作此数据')
- // } else {
- // }
- this.$http.put("person/personCollect/updateByUserId", {
- id: item.collectId
- }, {
- _this: this
- }, res => {
- item.collectBtn = !item.collectBtn;
- item.cancelCollectBtn = !item.cancelCollectBtn;
- item.collectId = "";
- }, e => {
- });
+ item.isSubmit = true
+ this.$http.put('person/personCollect/updateByUserId', {
+ id: item.collectId
+ }, {
+ _this: this
+ }, res => {
+ item.isSubmit = false
+ item.collectBtn = !item.collectBtn
+ item.cancelCollectBtn = !item.cancelCollectBtn
+ item.collectId = ''
+ this.$message.success(res.message)
+ }, e => {
+ item.isSubmit = false
+ })
},
// 取消
treeCancel() {
diff --git a/src/pages/searchCenter/pages/standardSearch.vue b/src/pages/searchCenter/pages/standardSearch.vue
index 6ebf1555e..b179d70d1 100644
--- a/src/pages/searchCenter/pages/standardSearch.vue
+++ b/src/pages/searchCenter/pages/standardSearch.vue
@@ -156,8 +156,17 @@
查看
- 取消收藏
-
+
+ 收藏
+
+
+ 取消收藏
+
+
@@ -170,8 +179,17 @@
查看
- 收藏
-
+
+ 收藏
+
+
+ 取消收藏
+
+
@@ -1003,7 +1021,6 @@
})
}
this.searchOriginOptions = this.searchOptions
- console.log(this.searchOriginOptions)
this.saveAllSortOptions = res.data.STANDCLASSIFY
this.saveAllFineOptions = res.data.BUSSFINECLASSSHOW
this.lawssStateOptions = res.data.LAWSSTATE // 文本状态数组
@@ -1241,6 +1258,15 @@
if (res.ok) {
this.total = res.data.count
this.resultData = res.data.list
+ this.resultData.map((item) => {
+ if (item.collectId != null && item.collectId !== '') {
+ item.collectBtn = false
+ item.cancelCollectBtn = true
+ } else {
+ item.collectBtn = true
+ item.cancelCollectBtn = false
+ }
+ });
this.selectGroupdata(res.data)
} else {
this.total = 0
@@ -1877,7 +1903,6 @@
let pagetype = ''
pagetype = item.typeShow
if (item.typeShow === 'INLAND_STAND') {
- console.log('guonei权限')
routername = 'OtherStandardDetails'
// if (this.$hasPermission('CFEZ3VP7EA95CTRBH3JB')) {
// routername = 'OtherStandardDetails'
@@ -2051,6 +2076,7 @@
}
}
personCollect.collectType = pagetype
+ personCollect.userId = this.$store.getters.userInfo.userId
this.$http.postData('person/personCollect', personCollect, {
_this: this
}, res => {
@@ -2120,7 +2146,6 @@
type: 'warning'
})
} else {
- console.log(this.selectNowObjResult);
let pagetype = ''
if (this.selectNowObjResult.type === 'stand') {
if (this.selectNowObjResult.standType === 'INLAND') {
@@ -2241,7 +2266,6 @@
if (item.type === 'stand') {
// if (this.$hasPermission('HK36LHK9444NPN8X634W')){
routername = 'OtherStandardDetails'
- console.log('guoneiQUANXIAN')
if (item.standType === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {