Commit daa1e334 by 杨明

条件

1 parent ab7dfec6
...@@ -87,9 +87,7 @@ img { ...@@ -87,9 +87,7 @@ img {
.flex { .flex {
display: flex; display: flex;
} }
.line-revert {
line-height: revert;
}
.flex-center { .flex-center {
display: flex; display: flex;
justify-content: center; justify-content: center;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17 * @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn * @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 * @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 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="condition-panel" v-if="configInfo.length == 2"> <div class="condition-panel" v-if="configInfo.length == 2">
<div class="flex"> <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="condition-select">
<div class="m-b-10"> <div class="m-b-10">
<el-radio-group v-model="empType"> <el-radio-group v-model="empType">
...@@ -249,7 +249,21 @@ export default { ...@@ -249,7 +249,21 @@ export default {
const conditionsList = conditions.filter(i => !i.isHide), const conditionsList = conditions.filter(i => !i.isHide),
idx = conditionsList.findIndex(i => i.id == flag) idx = conditionsList.findIndex(i => i.id == flag)
this.conditionsList = conditionsList[idx > -1 ? idx : 0] 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.$apis.journeyConfig.sopConditionList({ dataTypeCode }).then(res => {
this.stepList = res this.stepList = res
}) })
...@@ -277,14 +291,20 @@ export default { ...@@ -277,14 +291,20 @@ export default {
}, },
handleSure() { handleSure() {
if (this.configInfo.length == 2) { if (this.configInfo.length == 2) {
if (this.empType == 0) {
const userId = this.userList.map(i => i.userId), const userId = this.userList.map(i => i.userId),
staffName = this.userList.map(i => i.staffName), staffName = this.userList.map(i => i.staffName),
desc = {} desc = {}
for (let i = 0; i < userId.length; i++) { for (let i = 0; i < userId.length; i++) {
desc[userId[i]] = staffName[i] desc[userId[i]] = staffName[i]
} }
this.configInfo[this.empType].operators[0].value = userId.join(',') this.configInfo[0].operators[0].value = userId.join(',')
this.configInfo[this.empType].operators[0].desc = desc this.configInfo[0].operators[0].desc = desc
} else {
this.configInfo[1].operators = [];
this.configInfo[0].operators[0].value = ''
this.configInfo[0].operators[0].desc = ''
}
} }
const { editable, label, order } = this.$parent.stepItem const { editable, label, order } = this.$parent.stepItem
const { instId } = this.$route.query, const { instId } = this.$route.query,
......
...@@ -75,11 +75,11 @@ export default { ...@@ -75,11 +75,11 @@ export default {
loading: false, loading: false,
// 表格参数 // 表格参数
tableParams: { tableParams: {
checkSelectKey: 'id', checkSelectKey: 'userId',
checkSelectVal: [], checkSelectVal: [],
listName: 'list', listName: 'list',
// 行数据的key // 行数据的key
mutiSelectUniqueKey: 'id', mutiSelectUniqueKey: 'userId',
// 多选ref的名称 // 多选ref的名称
mutiSelectName: 'salelist', mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -181,7 +181,7 @@ export default { ...@@ -181,7 +181,7 @@ export default {
d.reverse().forEach(i => { d.reverse().forEach(i => {
if (i.entmicroStaffResponses) { if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => { i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id) const flag = arr.find(m => m.userId == j.userId)
if (!flag) { if (!flag) {
arr.push(j) arr.push(j)
} }
...@@ -230,13 +230,13 @@ export default { ...@@ -230,13 +230,13 @@ export default {
i.entmicroStaffResponses.forEach(j => { i.entmicroStaffResponses.forEach(j => {
if (keyword) { if (keyword) {
if (j.staffName.indexOf(keyword) != -1) { 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) { if (!flag) {
this.tableEmpData.push(j) this.tableEmpData.push(j)
} }
} }
} else { } else {
const flag = this.tableEmpData.find(m => m.id == j.id) const flag = this.tableEmpData.find(m => m.userId == j.userId)
if (!flag) { if (!flag) {
this.tableEmpData.push(j) this.tableEmpData.push(j)
} }
...@@ -259,10 +259,10 @@ export default { ...@@ -259,10 +259,10 @@ export default {
} }
}, },
remove(item) { 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) // this.innerTags.splice(idx, 1)
if (this.tableEmpData.map(k => k.id).includes(item.id)) { if (this.tableEmpData.map(k => k.userId).includes(item.userId)) {
var i = this.tableEmpData.findIndex(k => k.id == item.id) var i = this.tableEmpData.findIndex(k => k.userId == item.userId)
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(this.tableEmpData[i]) this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(this.tableEmpData[i])
console.log(item, 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!