Commit 46eb5c98 by 王志慧

线索喜报bug修复

1 parent 2b2a3b00
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<div class="group-box"> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k"> <div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k">
<!-- <el-input v-model="i.name" ></el-input> --> <!-- <el-input v-model="i.name" ></el-input> -->
<el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'" filterable clearable> <el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'" filterable clearable @change="changeGroupName(i.name, k, groupCofListInput[bulletin.storageList])">
<el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option> <el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option>
</el-select> </el-select>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput[bulletin.storageList])"></i> <i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput[bulletin.storageList])"></i>
...@@ -152,6 +152,21 @@ export default { ...@@ -152,6 +152,21 @@ export default {
if (this.id) this.getClueDetailById() if (this.id) this.getClueDetailById()
}, },
methods: { methods: {
changeGroupName(name, index, data) {
let result
for (let i = 0; i < data.length; i++) {
if (i !== index) {
if (data[i].name == name) result = true
}
}
if (result) {
this.$message({
message: '已勿选择相同的群',
type: 'error'
})
data[index].name = ''
}
},
// 选择门店 // 选择门店
handleRelateStoreClose() { handleRelateStoreClose() {
this.relateStoreVisible = !this.relateStoreVisible this.relateStoreVisible = !this.relateStoreVisible
...@@ -176,6 +191,7 @@ export default { ...@@ -176,6 +191,7 @@ export default {
this.isDialogVisible = true this.isDialogVisible = true
}, },
addGroup(group) { addGroup(group) {
console.log(group)
group.push({ name: '' }) group.push({ name: '' })
}, },
delGroup(group, i) { delGroup(group, i) {
...@@ -203,6 +219,7 @@ export default { ...@@ -203,6 +219,7 @@ export default {
}, },
handleNodeClick(data) { handleNodeClick(data) {
this.hideSelect() this.hideSelect()
if (this.config.automaticName == data.name) return
this.config.automaticName = data.name this.config.automaticName = data.name
this.config.staffId = data.staffId this.config.staffId = data.staffId
this.idBefEncryption = data.idBefEncryption ? data.idBefEncryption : '1688855154413617' this.idBefEncryption = data.idBefEncryption ? data.idBefEncryption : '1688855154413617'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!