|
@@ -2,9 +2,10 @@ import { computed, onMounted, ref, watch } from 'vue'
|
|
|
import { useStore } from '@/store'
|
|
|
import { getEventTarget } from '@/utils/jq-help'
|
|
|
import $bus from '@/utils/bus'
|
|
|
-import { getBidCollTagList, saveBidCollAddTag, createBidTag } from '@/api/modules/'
|
|
|
+import { saveBidCollAddTag, createBidTag } from '@/api/modules/'
|
|
|
// API 业务模型
|
|
|
import usePersonalTagsModel from '@jy/data-models/modules/quick-collect-bid/model/tags'
|
|
|
+import { showToast } from '@/components/toast'
|
|
|
// 解构基础业务
|
|
|
const APIModel = usePersonalTagsModel({})
|
|
|
const {
|
|
@@ -67,13 +68,13 @@ export function dataCollectTagModel (params) {
|
|
|
lids: value,
|
|
|
lname: name
|
|
|
}
|
|
|
- await deleteLabelQuery(formatParams)
|
|
|
- // const { success, data, msg } = await deleteLabelQuery(formatParams)
|
|
|
- // if (success && data) {
|
|
|
- // this.$toast('标签已删除')
|
|
|
- // } else {
|
|
|
- // that.$toast(msg)
|
|
|
- // }
|
|
|
+ const { success, data, msg } = await deleteLabelQuery(formatParams)
|
|
|
+ if (success && data) {
|
|
|
+ showToast('标签已删除')
|
|
|
+ $bus.$emit('bidding:updateCollect')
|
|
|
+ } else {
|
|
|
+ showToast(msg)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
async function ajaxForEditTagsChange(reParams, callback) {
|
|
@@ -220,6 +221,7 @@ export function dataCollectTagModel (params) {
|
|
|
|
|
|
// 渲染标签列表数据
|
|
|
function renderTagsList(data) {
|
|
|
+ console.log(data, 'data')
|
|
|
if (data && data.length > 0) {
|
|
|
var ht = ''
|
|
|
data.forEach(function (v, i) {
|
|
@@ -227,7 +229,7 @@ export function dataCollectTagModel (params) {
|
|
|
'<span class="tags-item" data-count=' +
|
|
|
v.count +
|
|
|
' data-id=' +
|
|
|
- v.id +
|
|
|
+ v.value +
|
|
|
'>' +
|
|
|
v.name +
|
|
|
'</span>'
|