Commit f7b8ba7c by 前端

fixed

1 parent 1cb544ff
...@@ -97,7 +97,13 @@ ...@@ -97,7 +97,13 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手动输入群名:"> <el-form-item label="手动输入群名:">
<el-input v-model="groupCofListInput.xiReportValue" placeholder="将收款喜报推送至群聊"></el-input> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.xiReportValue" :key="k">
<el-input v-model="i.name" placeholder="将收款喜报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.xiReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.xiReportValue, k)"></i>
</div>
</div>
</el-form-item> </el-form-item>
<!-- 战报 - 关联群 --> <!-- 战报 - 关联群 -->
<el-form-item class="select-wrap"> <el-form-item class="select-wrap">
...@@ -141,7 +147,13 @@ ...@@ -141,7 +147,13 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手动输入群名:"> <el-form-item label="手动输入群名:">
<el-input v-model="groupCofListInput.zhanReportValue" placeholder="将战报推送至群聊"></el-input> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.zhanReportValue" :key="k">
<el-input v-model="i.name" placeholder="将战报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.zhanReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.zhanReportValue, k)"></i>
</div>
</div>
</el-form-item> </el-form-item>
<!-- 补单通知 - 关联群 --> <!-- 补单通知 - 关联群 -->
<el-form-item class="select-wrap"> <el-form-item class="select-wrap">
...@@ -185,7 +197,13 @@ ...@@ -185,7 +197,13 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手动输入群名:"> <el-form-item label="手动输入群名:">
<el-input v-model="groupCofListInput.orderReportValue" placeholder="将补单通知推送至群聊"></el-input> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.orderReportValue" :key="k">
<el-input v-model="i.name" placeholder="将补单通知推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.orderReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.orderReportValue, k)"></i>
</div>
</div>
</el-form-item> </el-form-item>
<!-- SA喜报 - 关联群 --> <!-- SA喜报 - 关联群 -->
<el-form-item class="select-wrap"> <el-form-item class="select-wrap">
...@@ -229,7 +247,13 @@ ...@@ -229,7 +247,13 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手动输入群名:"> <el-form-item label="手动输入群名:">
<el-input v-model="groupCofListInput.saReportValue" placeholder="将SA喜报推送至群聊"></el-input> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.saReportValue" :key="k">
<el-input v-model="i.name" placeholder="将SA喜报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.saReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.saReportValue, k)"></i>
</div>
</div>
</el-form-item> </el-form-item>
<!-- SA个人喜报 - 关联群 --> <!-- SA个人喜报 - 关联群 -->
<el-form-item class="select-wrap"> <el-form-item class="select-wrap">
...@@ -273,7 +297,13 @@ ...@@ -273,7 +297,13 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手动输入群名:"> <el-form-item label="手动输入群名:">
<el-input v-model="groupCofListInput.saPerReportValue" placeholder="将SA个人喜报推送至群聊"></el-input> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.saPerReportValue" :key="k">
<el-input v-model="i.name" placeholder="将SA个人喜报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.saPerReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.saPerReportValue, k)"></i>
</div>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -311,11 +341,11 @@ export default { ...@@ -311,11 +341,11 @@ export default {
saPerReport: [] saPerReport: []
}, },
groupCofListInput: { groupCofListInput: {
xiReportValue: '', xiReportValue: [],
zhanReportValue: '', zhanReportValue: [],
orderReportValue: '', orderReportValue: [],
saReportValue: '', saReportValue: [],
saPerReportValue: '' saPerReportValue: []
}, },
groupToType: [ groupToType: [
{ {
...@@ -717,7 +747,9 @@ export default { ...@@ -717,7 +747,9 @@ export default {
let isGroupEmpty = Object.keys(this.groupCofList) let isGroupEmpty = Object.keys(this.groupCofList)
.map(item => this.groupCofList[item].length) .map(item => this.groupCofList[item].length)
.every(item => item == 0) .every(item => item == 0)
let isGroupEmptyInput = Object.keys(this.groupCofListInput).every(item => !item) let isGroupEmptyInput = Object.keys(this.groupCofListInput)
.map(item => this.groupCofListInput[item].length)
.every(item => item == 0)
if (isGroupEmpty && isGroupEmptyInput) { if (isGroupEmpty && isGroupEmptyInput) {
this.$message({ this.$message({
message: '推送配置必须配置至少一项', message: '推送配置必须配置至少一项',
...@@ -755,13 +787,15 @@ export default { ...@@ -755,13 +787,15 @@ export default {
actionReportType: type actionReportType: type
}) })
}) })
} else if (this.groupCofListInput[item + 'Value']) { } else if (this.groupCofListInput[item + 'Value'].length) {
this.groupCofListInput[item + 'Value'].forEach(k => {
params.groupConfigList.push({ params.groupConfigList.push({
groupId: this.idBefEncryption + '_R:' + this.groupCofListInput[item + 'Value'], groupId: this.idBefEncryption + '_R:' + k.name,
groupName: this.groupCofListInput[item + 'Value'], groupName: k.name,
groupMerchantId: this.config.merchantId, groupMerchantId: this.config.merchantId,
actionReportType: type actionReportType: type
}) })
})
} }
}) })
console.log(params, 'params---') console.log(params, 'params---')
...@@ -783,6 +817,12 @@ export default { ...@@ -783,6 +817,12 @@ export default {
this.clearData() this.clearData()
}, },
handleDetails() {}, handleDetails() {},
addGroup(group) {
group.push({ name: '' })
},
delGroup(group, i) {
group.splice(i, 1)
},
handlebattleOn(data, sign) { handlebattleOn(data, sign) {
this.setectList = [] this.setectList = []
this.setectList.push(data) this.setectList.push(data)
...@@ -797,13 +837,6 @@ export default { ...@@ -797,13 +837,6 @@ export default {
saReport: [], saReport: [],
saPerReport: [] saPerReport: []
} }
this.groupCofListInput = {
xiReportValue: '',
zhanReportValue: '',
orderReportValue: '',
saReportValue: '',
saPerReportValue: ''
}
this.battleVisible = true this.battleVisible = true
// 编辑 // 编辑
if (sign) { if (sign) {
...@@ -817,7 +850,7 @@ export default { ...@@ -817,7 +850,7 @@ export default {
let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType).attr let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType).attr
if (item.groupId) { if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) { if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) {
this.groupCofListInput[groupHideAttr + 'Value'] = item.groupName this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
this.idBefEncryption = item.groupId.split('_R:')[0] this.idBefEncryption = item.groupId.split('_R:')[0]
} else { } else {
this.groupCofList[groupHideAttr].push({ this.groupCofList[groupHideAttr].push({
...@@ -828,6 +861,14 @@ export default { ...@@ -828,6 +861,14 @@ export default {
} }
}) })
this.getGroupList(this.wechat.staffId) this.getGroupList(this.wechat.staffId)
} else {
this.groupCofListInput = {
xiReportValue: [{ name: '' }],
zhanReportValue: [{ name: '' }],
orderReportValue: [{ name: '' }],
saReportValue: [{ name: '' }],
saPerReportValue: [{ name: '' }]
}
} }
this.getDepartmentTree() this.getDepartmentTree()
}, },
...@@ -937,6 +978,20 @@ export default { ...@@ -937,6 +978,20 @@ export default {
} }
} }
} }
.group-box {
padding: 20px;
background: #f9f9f9;
.input-box {
display: flex;
align-items: center;
i {
cursor: pointer;
font-size: 20px;
color: #5850ff;
margin-left: 6px;
}
}
}
.input-tag-wrapper { .input-tag-wrapper {
position: relative; position: relative;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!