Commit af8544c8 by 杨明

模板

1 parent 3ffa4bf2
...@@ -18,17 +18,14 @@ ...@@ -18,17 +18,14 @@
<div class="tab-label"> <div class="tab-label">
{{ stepItem.label }} {{ stepItem.label }}
</div> </div>
<div v-if="!isDisabled" class="count-num">已启用数量/全部sop数量:{{ <div v-if="!isDisabled" class="count-num">已启用数量/全部sop数量:{{ computedSopSet[k].flat(Inifity).filter(item => item.nodeSkip !== '1').length }}/{{ stepItem.sopList.flat(Inifity).length }}</div>
computedSopSet[k].flat(Inifity).filter(item => item.nodeSkip !== "1").length
}}/{{ stepItem.sopList.flat(Inifity).length }}
</div>
</div> </div>
<div class="collapse-item-panel" :style="{ display: stepItem.isExpaned ? 'block' : 'none' }"> <div class="collapse-item-panel" :style="{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div class="task-item"> <div class="task-item">
<template v-if="stepItem.conditionsList.length > 0"> <template v-if="stepItem.conditionsList.length > 0">
<div class="task-item-head flex-column-center"> <div class="task-item-head flex-column-center">
<div class="task-item-icon"> <div class="task-item-icon">
<img src="@/assets/config/log.png"/> <img src="@/assets/config/log.png" />
</div> </div>
<div class="task-item-name">进入条件</div> <div class="task-item-name">进入条件</div>
<div class="task-item-desc">(描述用户触发何种条件后,将自动变更为该旅程阶段)</div> <div class="task-item-desc">(描述用户触发何种条件后,将自动变更为该旅程阶段)</div>
...@@ -42,7 +39,7 @@ ...@@ -42,7 +39,7 @@
</template> </template>
<template v-if="stepItem.conditionsList.length == 0"> <template v-if="stepItem.conditionsList.length == 0">
<div class="empty-task"> <div class="empty-task">
<img src="@/assets/config/empty-sop.png"/> <img src="@/assets/config/empty-sop.png" />
<div class="empty-text">暂无进入条件</div> <div class="empty-text">暂无进入条件</div>
</div> </div>
</template> </template>
...@@ -52,7 +49,7 @@ ...@@ -52,7 +49,7 @@
<div class="task-sop-l"> <div class="task-sop-l">
<div class="task-item-head flex-column-center"> <div class="task-item-head flex-column-center">
<div class="task-item-icon"> <div class="task-item-icon">
<img src="@/assets/config/sop.png"/> <img src="@/assets/config/sop.png" />
</div> </div>
<div class="task-item-name">SOP任务</div> <div class="task-item-name">SOP任务</div>
<div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div> <div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div>
...@@ -60,8 +57,8 @@ ...@@ -60,8 +57,8 @@
<div class="task-item-content bg-fff"> <div class="task-item-content bg-fff">
<div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k"> <div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="step-item-day"> <div class="step-item-day">
<img src="@/assets/config/step-border.png"/> <img src="@/assets/config/step-border.png" />
<!-- v-if="(v && v[0].day) || (k + 1)"--> <!-- v-if="(v && v[0].day) || (k + 1)"-->
<span v-if="v.length > 0">第{{ v[0] && v[0].day }}天</span> <span v-if="v.length > 0">第{{ v[0] && v[0].day }}天</span>
<span v-else>第{{ k + 1 }}天</span> <span v-else>第{{ k + 1 }}天</span>
</div> </div>
...@@ -73,7 +70,7 @@ ...@@ -73,7 +70,7 @@
<span>[{{ value.time }}]发送 | {{ stageInfo([value.taskType]).nodeName }} |{{ stageInfo([value.taskType]).desc }}</span> <span>[{{ value.time }}]发送 | {{ stageInfo([value.taskType]).nodeName }} |{{ stageInfo([value.taskType]).desc }}</span>
</div> </div>
<div class="step-item-name" v-if="value.taskType">{{ activity_name[value.taskType]}}</div> <div class="step-item-name" v-if="value.taskType">{{ activity_name[value.taskType] }}</div>
</div> </div>
<!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> --> <!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> -->
</div> </div>
...@@ -81,7 +78,7 @@ ...@@ -81,7 +78,7 @@
<div v-if="v.length == 0"> <div v-if="v.length == 0">
<div class="empty-sop"> <div class="empty-sop">
<img src="@/assets/config/empty-sop.png"/> <img src="@/assets/config/empty-sop.png" />
<div class="empty-text">暂无sop任务</div> <div class="empty-text">暂无sop任务</div>
</div> </div>
</div> </div>
...@@ -91,7 +88,7 @@ ...@@ -91,7 +88,7 @@
<div class="task-sop-calendar"> <div class="task-sop-calendar">
<div class="task-item-head flex-column-center"> <div class="task-item-head flex-column-center">
<div class="task-item-icon"> <div class="task-item-icon">
<img src="@/assets/config/calendar.png"/> <img src="@/assets/config/calendar.png" />
</div> </div>
<div class="task-item-name">SOP日历</div> <div class="task-item-name">SOP日历</div>
</div> </div>
...@@ -99,19 +96,19 @@ ...@@ -99,19 +96,19 @@
<div class="calendar-panel"> <div class="calendar-panel">
<div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k"> <div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="calendar-day" v-if="v.length > 0">第{{ v[0] && v[0].day }}天</div> <div class="calendar-day" v-if="v.length > 0">第{{ v[0] && v[0].day }}天</div>
<div class="calendar-day" v-else>第{{ k+1 }}天</div> <div class="calendar-day" v-else>第{{ k + 1 }}天</div>
<div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key"> <div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key">
<el-popover placement="top-start" width="100" trigger="click"> <el-popover placement="top-start" width="100" trigger="click">
<div class="popover-panel" v-for="(t, pkey) in v" :key="pkey"> <div class="popover-panel" v-for="(t, pkey) in v" :key="pkey">
<div class="flex-column-center"> <div class="flex-column-center">
<span>{{ value.time }} </span> <span>{{ value.time }}</span>
<div :class="['stage-icon', `stage-${t.taskType}`]"></div> <div :class="['stage-icon', `stage-${t.taskType}`]"></div>
</div> </div>
<div class="stage-desc">{{ stageInfo([t.taskType]).nodeName }}</div> <div class="stage-desc">{{ stageInfo([t.taskType]).nodeName }}</div>
</div> </div>
<div slot="reference" class="flex-column-center" v-if="v.length <= 2"> <div slot="reference" class="flex-column-center" v-if="v.length <= 2">
<span>{{ value.time }} </span> <span>{{ value.time }}</span>
<!-- 1 => 门店助手--> <!-- 1 => 门店助手-->
<!-- 2 => AI外呼--> <!-- 2 => AI外呼-->
<!-- 3 => 短信--> <!-- 3 => 短信-->
...@@ -134,7 +131,7 @@ ...@@ -134,7 +131,7 @@
</template> </template>
<template v-if="stepItem.sopList.length == 0"> <template v-if="stepItem.sopList.length == 0">
<div class="empty-sop"> <div class="empty-sop">
<img src="@/assets/config/empty-sop.png"/> <img src="@/assets/config/empty-sop.png" />
<div class="empty-text">暂无sop任务</div> <div class="empty-text">暂无sop任务</div>
</div> </div>
</template> </template>
...@@ -145,7 +142,6 @@ ...@@ -145,7 +142,6 @@
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
const STAGE = { const STAGE = {
...@@ -156,7 +152,7 @@ const STAGE = { ...@@ -156,7 +152,7 @@ const STAGE = {
5: '跟进提醒', 5: '跟进提醒',
6: '客户信息查询' 6: '客户信息查询'
} }
const ACTIVITY_NAME ={ const ACTIVITY_NAME = {
4: '活动链接', 4: '活动链接',
3: '活动链接', 3: '活动链接',
1: '短信模版', 1: '短信模版',
...@@ -227,15 +223,10 @@ export default { ...@@ -227,15 +223,10 @@ export default {
watch: { watch: {
configList: { configList: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
let sopList = Array.from(newValue, item => let sopList = Array.from(newValue, item => Array.from(item.sopList, sub => Array.from(sub, subItem => ({ nodeId: subItem.nodeId, nodeSkip: subItem.nodeSkip }))))
Array.from(item.sopList, sub =>
Array.from(sub, subItem => ({nodeId: subItem.nodeId, nodeSkip: subItem.nodeSkip}))
)
)
;
this.computedSopSet = JSON.parse(JSON.stringify(sopList)) this.computedSopSet = JSON.parse(JSON.stringify(sopList))
sopList = sopList.flat(Infinity) sopList = sopList.flat(Infinity)
this.$bus.$emit('sopListSet', {sopList}) this.$bus.$emit('sopListSet', { sopList })
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -247,15 +238,14 @@ export default { ...@@ -247,15 +238,14 @@ export default {
des: DES, des: DES,
stage_time: STAGE_TIME, stage_time: STAGE_TIME,
stage_prefix: STAGE_PREFIX, stage_prefix: STAGE_PREFIX,
activity_name:ACTIVITY_NAME, activity_name: ACTIVITY_NAME,
empVisible: false, empVisible: false,
nodes: null, nodes: null,
sopList: [], sopList: [],
computedSopSet: [] computedSopSet: []
} }
}, },
created() { created() {},
},
methods: { methods: {
//获取sop映射字段 //获取sop映射字段
stageInfo(i) { stageInfo(i) {
...@@ -285,8 +275,7 @@ export default { ...@@ -285,8 +275,7 @@ export default {
this.$emit('changeNode', this.nodes) this.$emit('changeNode', this.nodes)
} }
}, },
mounted() { mounted() {}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -614,22 +603,22 @@ export default { ...@@ -614,22 +603,22 @@ export default {
width: 70px; width: 70px;
} }
.empty-sop{ .empty-sop {
background: #F9FAFE; background: #f9fafe;
text-align: center; text-align: center;
padding: 16px 0; padding: 16px 0;
margin-bottom: 10px; margin-bottom: 10px;
.empty-text{ .empty-text {
color: #666666; color: #666666;
font-size: 12px; font-size: 12px;
} }
} }
.empty-task{ .empty-task {
background: #FFFFFF; background: #ffffff;
text-align: center; text-align: center;
padding: 20px 0; padding: 20px 0;
margin-bottom: 10px; margin-bottom: 10px;
.empty-text{ .empty-text {
color: #666666; color: #666666;
font-size: 12px; font-size: 12px;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-03 12:27:30 * @LastEditTime: 2024-01-03 14:47:20
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue * @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.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
--> -->
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
<div class="journey-step-info" v-for="(val, k) in configList" :key="k"> <div class="journey-step-info" v-for="(val, k) in configList" :key="k">
<template v-if="val.label"> <template v-if="val.label">
<collapse-item :stepItem="val" :activityInfo="activityInfo" :key="k" :ref="`collapse_${k}`"> <collapse-item :stepItem="val" :activityInfo="activityInfo" :key="k" :ref="`collapse_${k}`">
<el-button type="text" @click.stop="openCondition(k)">新增</el-button> <el-button type="text" @click.stop="openCondition(k)">新增条件</el-button>
<el-button type="text" @click.stop="handleEditJ(k)">编辑</el-button> <el-button type="text" @click.stop="handleEditJ(k)">编辑名称</el-button>
<el-button type="text" @click.stop="handleDelete(k)">删除</el-button> <el-button type="text" @click.stop="handleDelete(k)">删除阶段</el-button>
</collapse-item> </collapse-item>
</template> </template>
<div class="journey-add-panel" v-if="addStatus && k == addNo"> <div class="journey-add-panel" v-if="addStatus && k == addNo">
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
} }
}) })
}, },
cancelStep() { cancelModel() {
this.$router.go(-1) this.$router.go(-1)
}, },
handleDelete(k) { handleDelete(k) {
...@@ -228,6 +228,10 @@ export default { ...@@ -228,6 +228,10 @@ export default {
Object.assign(this.configList[len], { label, editable }) Object.assign(this.configList[len], { label, editable })
this.addStatus = false this.addStatus = false
}, },
cancelStep() {
this.addStatus = false
this.configList.splice(this.addNo, 1)
},
handleEditJ(i) { handleEditJ(i) {
this.addNo = i this.addNo = i
this.addStatus = true this.addStatus = true
......
...@@ -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-03 10:23:21 * @LastEditTime: 2024-01-04 14:24:58
* @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
--> -->
...@@ -134,8 +134,18 @@ export default { ...@@ -134,8 +134,18 @@ export default {
}) })
}, },
handleSure() { handleSure() {
const { conditionList, condition_i } = this.$refs.conditionForm; const { conditionList, conditionListAll, condition_i } = this.$refs.conditionForm
this.$emit('closeActivity', { conditionList, condition_i }) console.log(conditionList)
conditionList.conditions.forEach(i => {
conditionListAll.conditions.forEach(j => {
if (i.id == j.id) {
j.value = i.value
j.subConditions = i.subConditions
}
})
})
console.log(conditionList, conditionListAll)
this.$emit('closeActivity', { conditionList: conditionListAll, condition_i })
}, },
handleAddEmp() { handleAddEmp() {
this.membersVisible = true this.membersVisible = true
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 13:34:43 * @Date: 2023-12-25 13:34:43
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-03 10:19:09 * @LastEditTime: 2024-01-04 14:28:04
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\condition.vue * @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\condition.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
--> -->
...@@ -91,9 +91,11 @@ export default { ...@@ -91,9 +91,11 @@ export default {
} }
}, },
methods: { methods: {
setCondition(val,index) { setCondition(val, index) {
this.step = val.id this.step = val.id
this.conditionListAll = this.$common.utils.deepClone(val)
this.conditionList = this.$common.utils.deepClone(val) this.conditionList = this.$common.utils.deepClone(val)
if (this.conditionList.conditions) this.conditionList.conditions = this.conditionList.conditions.filter(i => !i.isHide)
this.condition_i = index this.condition_i = index
this.condition = this.conditionList.conditions && this.conditionList.conditions[0] this.condition = this.conditionList.conditions && this.conditionList.conditions[0]
}, },
...@@ -110,7 +112,9 @@ export default { ...@@ -110,7 +112,9 @@ export default {
const conditions = this.stepList.find(item => { const conditions = this.stepList.find(item => {
return item.id == e return item.id == e
}) })
this.conditionListAll = this.$common.utils.deepClone(conditions)
this.conditionList = this.$common.utils.deepClone(conditions) this.conditionList = this.$common.utils.deepClone(conditions)
if (this.conditionList.conditions) this.conditionList.conditions = this.conditionList.conditions.filter(i => !i.isHide)
this.condition = this.conditionList.conditions[0] this.condition = this.conditionList.conditions[0]
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 14:31:26 * @Date: 2023-12-25 14:31:26
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-02 17:59:48 * @LastEditTime: 2024-01-04 10:57:42
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\sopItem.vue * @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\sopItem.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEVid * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEVid
--> -->
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<span>请设置营销时间:</span> <span>请设置营销时间:</span>
<el-input-number v-model="day" :min="1" :max="1000" :size="size"></el-input-number> <el-input-number v-model="day" :min="1" :max="1000" :size="size"></el-input-number>
<span>天后,当日</span> <span>天后,当日</span>
<el-time-picker v-model="time" :size="size"></el-time-picker> <el-time-picker v-model="time" :size="size" format="HH:mm" value-format="HH:mm"></el-time-picker>
<span>发送</span> <span>发送</span>
</div> </div>
<div class="sop-item flex"> <div class="sop-item flex">
...@@ -56,22 +56,22 @@ export default { ...@@ -56,22 +56,22 @@ export default {
} }
}, },
inject: ['app'], inject: ['app'],
watch:{ watch: {
drawerVisible(val) { drawerVisible(val) {
if(val) { if (val) {
this.getModelList() this.getModelList()
} }
} }
}, },
methods: { methods: {
getModelList() { getModelList() {
this.$apis.journeyModel.SopTplNodeProtosList({ dataTypeCode: this.app.dataTypeCode }).then(res => { this.$apis.journeyModel.SopTplNodeProtosList({ dataTypeCode: this.app.dataTypeCode, groupCode: 'notify' }).then(res => {
this.modelList = res this.modelList = res
}) })
}, },
saveForm() { saveForm() {
const model = { const model = {
time: new Date(this.time).toLocaleTimeString().substring(0, 5), time: this.time,
day: this.day, day: this.day,
nodeProtoId: this.nodeKey nodeProtoId: this.nodeKey
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!