|
@@ -13,8 +13,8 @@
|
13
|
13
|
<div class="flex">
|
14
|
14
|
<div class="tree-wrap">
|
15
|
15
|
<el-button-group v-if="activeName === 'fourth'">
|
16
|
|
- <el-button :type="serviceType === 'API' ? 'primary' : ''" @click="serviceBtnClick('API')" size="small">API服务</el-button>
|
17
|
|
- <el-button :type="serviceType === 'MQ' ? 'primary' : ''" @click="serviceBtnClick('MQ')" size="small">消息队列</el-button>
|
|
16
|
+ <el-button :type="serviceType === 'API' ? 'primary' : ''" @click="() => serviceBtnClick('API')" size="small">API服务</el-button>
|
|
17
|
+ <el-button :type="serviceType === 'MQ' ? 'primary' : ''" @click="() => serviceBtnClick('MQ')" size="small">消息队列</el-button>
|
18
|
18
|
</el-button-group>
|
19
|
19
|
<div>{{item.name}}</div>
|
20
|
20
|
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
@@ -246,7 +246,13 @@ export default {
|
246
|
246
|
this.cancelCollect([id])
|
247
|
247
|
},
|
248
|
248
|
cancelCollect(ids) {
|
249
|
|
- const params = {resourceType: resourceTypeMap[this.activeName], resourceIds: ids,}
|
|
249
|
+ const resourceTypeMapB = {
|
|
250
|
+ first: 'theme',
|
|
251
|
+ second: 'specialSubject',
|
|
252
|
+ third: 'index',
|
|
253
|
+ fourth: this.serviceType === 'API' ? 'api' : 'mqs'
|
|
254
|
+ }
|
|
255
|
+ const params = {resourceType: resourceTypeMapB[this.activeName], resourceIds: ids,}
|
250
|
256
|
api.deleteCollect(params).then(res => {
|
251
|
257
|
if (res.success) {
|
252
|
258
|
this.$message({
|
|
@@ -366,6 +372,7 @@ export default {
|
366
|
372
|
this.list.push(newItem)
|
367
|
373
|
})
|
368
|
374
|
}
|
|
375
|
+ // console.log('this.list', this.list)
|
369
|
376
|
})
|
370
|
377
|
} else {
|
371
|
378
|
api.searchData(params).then(res => {
|