Commit 84efefe2 by 王志慧

fixed

1 parent 20c09605
......@@ -60,7 +60,7 @@
</div>
<span class="notify" @click="btnInnerClick" v-if="allTagsList.length == 0">无可选标签值,可点击此处</span>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="tagsVisible=false">取 消</el-button>
<el-button plain size="small" class="btn-three" @click="tagsVisible = false">取 消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确 定</el-button>
</span>
<GLDialog class="role" append-to-body :title="tagDialogTitle" :visible.sync="tagVisible">
......@@ -340,10 +340,6 @@ export default {
{
labelType: '',
children: []
},
{
labelType: '',
children: []
}
]
res.data.labelTreeRets &&
......@@ -359,16 +355,17 @@ export default {
})
})
if (labels.labelType == '自店标签') {
allTagsList[1].labelType = '自店标签'
allTagsList[1].children.push(labels)
allTagsList[0].labelType = '自店标签'
allTagsList[0].children.push(labels)
}
})
console.log(allTagsList, 'allTagsList')
this.allTagsList = allTagsList
//
} else if(res.code != 0){
} else if (res.code != 0) {
this.$message.error(res.message)
}
this.handleClose()
this.handleClose()
})
.catch(err => {
console.error(err, '捕获错误')
......@@ -382,6 +379,11 @@ export default {
return list.slice(0, 9)
},
handleConfirm() {
//判断如果没有标签,点击确定按钮,关闭弹窗
if (this.allTagsList.length == 0) {
this.tagsVisible = false
return
}
this.sloading = true
let labelIdAddList = [] // 新增的标签
this.allTagsList.forEach(labels => {
......@@ -393,6 +395,10 @@ export default {
})
})
})
if (labelIdAddList.length == 0) {
this.$message.error('请至少选择一个自店标签')
return
}
let param = {
id: this.id,
tagIds: labelIdAddList
......@@ -419,8 +425,7 @@ export default {
})
},
handleClose() {
this.tagsVisible =true
this.allTagsList = []
this.tagsVisible = true
},
isHasSome(array) {
var temp = [] //一个新的临时数组
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!