Commit daa1e334 by 杨明

条件

1 parent ab7dfec6
......@@ -87,9 +87,7 @@ img {
.flex {
display: flex;
}
.line-revert {
line-height: revert;
}
.flex-center {
display: flex;
justify-content: center;
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-05 14:56:02
* @LastEditTime: 2024-01-05 15:42:54
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -17,7 +17,7 @@
</div>
<div class="condition-panel" v-if="configInfo.length == 2">
<div class="flex">
<label class="condition-label line-revert">企微成员范围:</label>
<label class="condition-label" style="line-height: revert;">企微成员范围:</label>
<div class="condition-select">
<div class="m-b-10">
<el-radio-group v-model="empType">
......@@ -249,7 +249,21 @@ export default {
const conditionsList = conditions.filter(i => !i.isHide),
idx = conditionsList.findIndex(i => i.id == flag)
this.conditionsList = conditionsList[idx > -1 ? idx : 0]
console.log(this.conditionsList, flag, '6this.conditionInfo')
if (this.configInfo.length == 2) {
this.empType = 1
this.configInfo.forEach(i => {
const desc = i.operators[0] && i.operators[0].desc
if (desc) {
this.empType = 0
for (let k in desc) {
this.userList.push({
staffName: desc[k],
userId: k
})
}
}
})
}
this.$apis.journeyConfig.sopConditionList({ dataTypeCode }).then(res => {
this.stepList = res
})
......@@ -277,14 +291,20 @@ export default {
},
handleSure() {
if (this.configInfo.length == 2) {
const userId = this.userList.map(i => i.userId),
staffName = this.userList.map(i => i.staffName),
desc = {}
for (let i = 0; i < userId.length; i++) {
desc[userId[i]] = staffName[i]
if (this.empType == 0) {
const userId = this.userList.map(i => i.userId),
staffName = this.userList.map(i => i.staffName),
desc = {}
for (let i = 0; i < userId.length; i++) {
desc[userId[i]] = staffName[i]
}
this.configInfo[0].operators[0].value = userId.join(',')
this.configInfo[0].operators[0].desc = desc
} else {
this.configInfo[1].operators = [];
this.configInfo[0].operators[0].value = ''
this.configInfo[0].operators[0].desc = ''
}
this.configInfo[this.empType].operators[0].value = userId.join(',')
this.configInfo[this.empType].operators[0].desc = desc
}
const { editable, label, order } = this.$parent.stepItem
const { instId } = this.$route.query,
......
......@@ -75,11 +75,11 @@ export default {
loading: false,
// 表格参数
tableParams: {
checkSelectKey: 'id',
checkSelectKey: 'userId',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
mutiSelectUniqueKey: 'userId',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
......@@ -181,7 +181,7 @@ export default {
d.reverse().forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id)
const flag = arr.find(m => m.userId == j.userId)
if (!flag) {
arr.push(j)
}
......@@ -230,13 +230,13 @@ export default {
i.entmicroStaffResponses.forEach(j => {
if (keyword) {
if (j.staffName.indexOf(keyword) != -1) {
const flag = this.tableEmpData.find(m => m.id == j.id)
const flag = this.tableEmpData.find(m => m.userId == j.userId)
if (!flag) {
this.tableEmpData.push(j)
}
}
} else {
const flag = this.tableEmpData.find(m => m.id == j.id)
const flag = this.tableEmpData.find(m => m.userId == j.userId)
if (!flag) {
this.tableEmpData.push(j)
}
......@@ -259,10 +259,10 @@ export default {
}
},
remove(item) {
// var idx = this.innerTags.findIndex(k => k.id == item.id)
// var idx = this.innerTags.findIndex(k => k.userId == item.userId)
// this.innerTags.splice(idx, 1)
if (this.tableEmpData.map(k => k.id).includes(item.id)) {
var i = this.tableEmpData.findIndex(k => k.id == item.id)
if (this.tableEmpData.map(k => k.userId).includes(item.userId)) {
var i = this.tableEmpData.findIndex(k => k.userId == item.userId)
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(this.tableEmpData[i])
console.log(item, this.tableEmpData[i])
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!