|
|
@@ -113,6 +113,8 @@ export default {
|
|
113
|
113
|
//初始调用
|
|
114
|
114
|
this.getOrderList();
|
|
115
|
115
|
this.getStatisticsSendStatus();
|
|
|
116
|
+ // 初始化获取全部标签
|
|
|
117
|
+ this.getAllTags();
|
|
116
|
118
|
|
|
117
|
119
|
this.countdownInterval()
|
|
118
|
120
|
},
|
|
|
@@ -287,10 +289,12 @@ export default {
|
|
287
|
289
|
} else if (btnType == 'tag') {
|
|
288
|
290
|
//打标签
|
|
289
|
291
|
console.log('打标签', order)
|
|
|
292
|
+ // 如果标签列表为空,重新获取一次
|
|
|
293
|
+ if (!this.tagList || this.tagList.length === 0) {
|
|
|
294
|
+ await this.getAllTags();
|
|
|
295
|
+ }
|
|
290
|
296
|
//打开模态窗
|
|
291
|
297
|
this.tagModalVisible = true;
|
|
292
|
|
- // 先获取标签列表,然后再设置当前标签
|
|
293
|
|
- await this.getAllTags();
|
|
294
|
298
|
// 确保 order.tags 存在且是数组
|
|
295
|
299
|
if (order && order.tags && Array.isArray(order.tags) && order.tags.length > 0) {
|
|
296
|
300
|
this.currentTags = order.tags.map(tag => tag && tag.id ? tag.id : null).filter(id => id !== null);
|