Commit 99abac62 by 李伟康

Merge branch 'feature/585/lwk' into 'SAAS+V5.8.5'

refactor(earlyWarning): 优化策略类型文案与新增任务类型配置

See merge request !936
2 parents 0141bd5c 2a133c16
...@@ -185,27 +185,49 @@ ...@@ -185,27 +185,49 @@
</d2-table> </d2-table>
</div> </div>
</div> </div>
<div class="bottom-content">
<div class="d2-container-content">
<d2-table-header title="策略明细">
</d2-table-header>
<d2-table ref="table"
no-data-text="暂无数据"
:before-search-fn="beforeSearchFn"
:get-list-api="getListApi"
:no-data-img="noDataImg"
:search-form="searchFormSearch"
:table-params="detailTableParams">
<template #auth-button="scope">
<el-button type="text"
@click="handleViewDetail(scope.scope)">
查看
</el-button>
</template>
</d2-table>
</div>
</div>
</div> </div>
<EffectDetailDialog :row="effectDetailRow" <EffectDetailDialog :row="effectDetailRow"
:search-params="effectSearchParams" :search-params="effectSearchParams"
:visible.sync="effectDetailVisible" /> :visible.sync="effectDetailVisible" />
</div> </div>
</template> </template>
<script> <script>
import dayjs from "dayjs"; import dayjs from "dayjs";
import { getStrategyAnalysisEffect, getStrategyEffectList, getStrategyOnlineDist, getStrategyTotal, getStrategyTypeDist, getWarningTypeList } from "@/api/earlyWarningManager"; import { getStrategyAnalysisEffect, getStrategyEffectList, getStrategyOnlineDist, getStrategyTotal, getStrategyTypeDist, getWarningTypeList } from "@/api/earlyWarningManager";
import noDataImg from "@/assets/strategy/emepty-strategy.png"; import noDataImg from "@/assets/strategy/emepty-strategy.png";
import { deepClone } from "@/common/util"; import { deepClone } from "@/common/util";
import calendarCustom from "../strategyCentre/compoments/clendarCustom.vue"; import calendarCustom from "../strategyCentre/compoments/clendarCustom.vue";
import HeaderCustom from "../strategyCentre/compoments/headerCustom.vue"; import HeaderCustom from "../strategyCentre/compoments/headerCustom.vue";
import SelectCustom from "../strategyCentre/compoments/selectCustom.vue"; import SelectCustom from "../strategyCentre/compoments/selectCustom.vue";
import EffectDetailDialog from "./components/EffectDetailDialog.vue"; import EffectDetailDialog from "./components/EffectDetailDialog.vue";
import OnlineOperList from "./components/OnlineOperList"; import OnlineOperList from "./components/OnlineOperList";
import StrategyTypeChart from "./components/StrategyTypeChart/index.vue"; import StrategyTypeChart from "./components/StrategyTypeChart/index.vue";
// 盯防类型图标配置(配置化管理,易于扩展) // 盯防类型图标配置(配置化管理,易于扩展)
const WATCH_TYPE_ICON_CONFIG = { const WATCH_TYPE_ICON_CONFIG = {
2: { 2: {
icon: "el-icon-warning-outline", icon: "el-icon-warning-outline",
iconUrl: require("@/assets/strategy/icon-strategy-type01.png"), iconUrl: require("@/assets/strategy/icon-strategy-type01.png"),
...@@ -227,9 +249,9 @@ ...@@ -227,9 +249,9 @@
icon: "el-icon-warning-outline", icon: "el-icon-warning-outline",
iconUrl: require("@/assets/strategy/icon-strategy-type01.png"), iconUrl: require("@/assets/strategy/icon-strategy-type01.png"),
}, },
}; };
export default { export default {
name: "StrategyAnalysis", name: "StrategyAnalysis",
components: { components: {
HeaderCustom, HeaderCustom,
...@@ -392,6 +414,74 @@ ...@@ -392,6 +414,74 @@
}, },
], ],
}, },
detailTableParams: {
tableOption: {
width: "150",
},
listName: "data",
tableColumns: [
{
label: "门店名称",
prop: "storeName",
minWidth: 160,
},
{
label: "策略类型",
prop: "storeName",
minWidth: 160,
},
{
label: "创建人",
prop: "storeName",
minWidth: 160,
},
{
label: "创建时间",
prop: "storeName",
minWidth: 160,
},
{
label: "策略目标",
prop: "storeName",
minWidth: 160,
},
{
label: "策略说明",
prop: "storeName",
minWidth: 160,
},
{
label: "执行周期",
prop: "storeName",
minWidth: 160,
},
{
label: "策略状态",
prop: "storeName",
minWidth: 160,
},
{
label: "执行人",
prop: "storeName",
minWidth: 160,
},
{
label: "完成时间",
prop: "storeName",
minWidth: 160,
},
{
label: "执行结果",
prop: "storeName",
minWidth: 160,
},
{
label: "任务描述",
prop: "storeName",
minWidth: 160,
},
],
},
}; };
}, },
computed: { computed: {
...@@ -788,33 +878,33 @@ ...@@ -788,33 +878,33 @@
}); });
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
$bg-white: #fff; $bg-white: #fff;
.dashboard-page { .dashboard-page {
min-height: 100vh; min-height: 100vh;
padding: 0 19px 20px; padding: 0 19px 20px;
box-sizing: border-box; box-sizing: border-box;
height: auto; height: auto;
overflow: visible; overflow: visible;
} }
.top-header-wrapper { .top-header-wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background-color: #fff; background-color: #fff;
} }
.border-bottom-line { .border-bottom-line {
margin-top: -1px; margin-top: -1px;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
.content-area { .content-area {
min-height: 0; min-height: 0;
width: 100%; width: 100%;
.top-content { .top-content {
...@@ -895,14 +985,14 @@ ...@@ -895,14 +985,14 @@
padding: 16px 20px; padding: 16px 20px;
margin-top: 20px; margin-top: 20px;
} }
} }
.tooltip-content-max { .tooltip-content-max {
max-height: 320px; max-height: 320px;
overflow-y: scroll; overflow-y: scroll;
} }
.two-line-ellipsis { .two-line-ellipsis {
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
...@@ -912,9 +1002,9 @@ ...@@ -912,9 +1002,9 @@
word-break: break-all; word-break: break-all;
line-height: 1.5; line-height: 1.5;
padding: 0 10px; padding: 0 10px;
} }
.tool-left { .tool-left {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
...@@ -925,14 +1015,14 @@ ...@@ -925,14 +1015,14 @@
color: #e5e6eb; color: #e5e6eb;
line-height: normal; // 重置 line-height,避免受 .table-header 影响 line-height: normal; // 重置 line-height,避免受 .table-header 影响
} }
} }
.effect-cell { .effect-cell {
color: #2a58ad; color: #2a58ad;
cursor: pointer; cursor: pointer;
} }
::v-deep .emptyBg { ::v-deep .emptyBg {
margin-top: 20px; margin-top: 20px;
color: #999ea8; color: #999ea8;
font-size: 12px; font-size: 12px;
...@@ -942,5 +1032,5 @@ ...@@ -942,5 +1032,5 @@
width: 86px; width: 86px;
height: 86px; height: 86px;
} }
}
</style>
\ No newline at end of file \ No newline at end of file
}
</style>
\ No newline at end of file \ No newline at end of file
const STRATEGYTYPEOPTIONS = [ const STRATEGYTYPEOPTIONS = [
{ label: "学习", value: 0 }, { label: "课程学习", value: 0 },
{ label: "优秀案例分享", value: 1 }, { label: "优秀案例分享", value: 1 },
// { label: "带教", value: 2 }, // { label: "带教", value: 2 },
{ label: "通知", value: 3 }, { label: "通知", value: 3 },
{ label: "销售精英到店提拉", value: 4 }, { label: "驻店精英到店提拉", value: 4 },
{ label: "强力促销", value: 5 }, { label: "强力促销", value: 5 },
{ label: "最终盘点与低客单产品购入", value: 6 }, { label: "兜底冲量", value: 6 },
]; ];
/** /**
*positionTypeList: 0:驻店,6:飞行督导,9:2.1区域运营 *positionTypeList: 0:驻店,6:飞行督导,9:2.1区域运营
...@@ -95,8 +95,8 @@ const STRATEGY_FORM_2456 = [ ...@@ -95,8 +95,8 @@ const STRATEGY_FORM_2456 = [
key: "dateRange", key: "dateRange",
pickerOptionsFun: (val) => { pickerOptionsFun: (val) => {
let { strategyType } = val; let { strategyType } = val;
return [5, 6].includes(strategyType) ? '' : 'afterPickerOptions' return [5, 6].includes(strategyType) ? "" : "afterPickerOptions";
} },
}, },
]; ];
const STRATEGY_FORM_3 = [ const STRATEGY_FORM_3 = [
...@@ -138,9 +138,9 @@ const STRATEGY_FORM_3 = [ ...@@ -138,9 +138,9 @@ const STRATEGY_FORM_3 = [
}, },
positionTypeList: [9], positionTypeList: [9],
tagNameKey: "staffName", tagNameKey: "staffName",
positionTypeListSale:(biz)=>{ positionTypeListSale: (biz) => {
return biz ==2? [8] : [9]; return biz == 2 ? [8] : [9];
} },
}, },
{ {
label: "驻店人员", label: "驻店人员",
...@@ -176,12 +176,14 @@ const TITLE_RULES = [{ required: true, message: "请输入标题", trigger: "blu ...@@ -176,12 +176,14 @@ const TITLE_RULES = [{ required: true, message: "请输入标题", trigger: "blu
const STAFF_LIST_RULES = { required: true, message: "请选择学习人员" }; const STAFF_LIST_RULES = { required: true, message: "请选择学习人员" };
const STUDY_LIST_RULES = { required: true, message: "请选择学习内容" }; const STUDY_LIST_RULES = { required: true, message: "请选择学习内容" };
const RANGE_DATE = [{ required: true, message: "请选择执行周期", trigger: "blur" }]; const RANGE_DATE = [{ required: true, message: "请选择执行周期", trigger: "blur" }];
const LEARNING_TARGET_RULES = [{ required: true, message: "请输入学习目标", trigger: "blur" }];
const DESCRIPTION_RULES = [{ required: true, message: "请输入策略说明", trigger: "blur" }]; const DESCRIPTION_RULES = [{ required: true, message: "请输入策略说明", trigger: "blur" }];
const STRATEGY_FORM_RULES_0 = { const STRATEGY_FORM_RULES_0 = {
title: TITLE_RULES, title: TITLE_RULES,
staffList: STAFF_LIST_RULES, staffList: STAFF_LIST_RULES,
courseList: STUDY_LIST_RULES, courseList: STUDY_LIST_RULES,
dateRange: RANGE_DATE, dateRange: RANGE_DATE,
learningTarget: LEARNING_TARGET_RULES,
description: DESCRIPTION_RULES, description: DESCRIPTION_RULES,
}; };
const STRATEGY_FORM_RULES_1 = { const STRATEGY_FORM_RULES_1 = {
...@@ -189,6 +191,7 @@ const STRATEGY_FORM_RULES_1 = { ...@@ -189,6 +191,7 @@ const STRATEGY_FORM_RULES_1 = {
staffList: STAFF_LIST_RULES, staffList: STAFF_LIST_RULES,
recordingList: STUDY_LIST_RULES, recordingList: STUDY_LIST_RULES,
dateRange: RANGE_DATE, dateRange: RANGE_DATE,
learningTarget: LEARNING_TARGET_RULES,
description: DESCRIPTION_RULES, description: DESCRIPTION_RULES,
}; };
const STRATEGY_FORM_RULES_2456 = { const STRATEGY_FORM_RULES_2456 = {
......
...@@ -38,7 +38,10 @@ ...@@ -38,7 +38,10 @@
:key="index" :key="index"
:label="`${item.label}:`" :label="`${item.label}:`"
:prop="item.key"> :prop="item.key">
<div class="form-content" :class="[item.class]">
<template v-if="item.prevText">
<span class="form-text prev">{{ item.prevText }}</span>
</template>
<template v-if="item.type == 'input'"> <template v-if="item.type == 'input'">
<el-input v-model="formData[item.key]" <el-input v-model="formData[item.key]"
:maxlength="item.maxlength" :maxlength="item.maxlength"
...@@ -115,6 +118,16 @@ ...@@ -115,6 +118,16 @@
:picker-options="datePickerOptions[item.pickerOptions]"> :picker-options="datePickerOptions[item.pickerOptions]">
</el-date-picker> </el-date-picker>
</template> </template>
<template v-else-if="item.type == 'numberInput'">
<el-input v-model="formData[item.key]"
:placeholder="`请输入${item.label}`"
@input="filterInputVal(item, $event, 'formData')">
</el-input>
</template>
<template v-if="item.unit">
<span class="form-text unit">{{ item.unit }}</span>
</template>
</div>
</el-form-item> </el-form-item>
</template> </template>
</template> </template>
...@@ -172,6 +185,7 @@ import { ...@@ -172,6 +185,7 @@ import {
import { import {
afterPickerOptions, afterPickerOptions,
} from "@/common/format"; } from "@/common/format";
import { deepClone } from "@/common/util";
import textBox from "@/components/glsx-combi-form/textBox"; import textBox from "@/components/glsx-combi-form/textBox";
import { import {
STRATEGY_FORM_0, STRATEGY_FORM_0,
...@@ -257,7 +271,7 @@ export default { ...@@ -257,7 +271,7 @@ export default {
positionTypeList: [], positionTypeList: [],
loading: false, loading: false,
delMerchantList: false, delMerchantList: false,
positionTypeListSale:null positionTypeListSale: null,
}; };
}, },
computed: { computed: {
...@@ -270,14 +284,29 @@ export default { ...@@ -270,14 +284,29 @@ export default {
}, },
}, },
strategyTypeFormList() { strategyTypeFormList() {
const { strategyType } = this; const { strategyType, currentBiz } = this;
const list = [2, 4, 5, 6].includes(strategyType) const list = deepClone([2, 4, 5, 6].includes(strategyType)
? STRATEGY_FORM_2456 ? STRATEGY_FORM_2456
: { : {
0: STRATEGY_FORM_0, 0: STRATEGY_FORM_0,
1: STRATEGY_FORM_1, 1: STRATEGY_FORM_1,
3: STRATEGY_FORM_3, 3: STRATEGY_FORM_3,
}[strategyType] || []; }[strategyType] || []);
if (strategyType == 0 || strategyType == 1) {
list.push({
label: "学习目标",
type: "numberInput",
key: "learningTarget",
placeholder: "请输入学习目标",
filterRule: "decimalRange",
min: 0,
max: currentBiz == 1 ? 999999 : 100,
precision: 2,
prevText: currentBiz != 1 ? "转化率=" : "平均客单价=",
unit: currentBiz != 1 ? "%" : "",
class: "flex",
});
}
return [ return [
...list, ...list,
{ {
...@@ -311,9 +340,11 @@ export default { ...@@ -311,9 +340,11 @@ export default {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
const { strategyType } = this; const { strategyType } = this;
// // 对于策略类型 2 和 4 需要验证人员,5 和 6 不需要 // // 对于策略类型 2 和 4 需要验证人员,5 和 6 不需要
if ([2, 4].includes(strategyType) && (!value || !value.length)) if ([2, 4].includes(strategyType) && (!value || !value.length)) {
callback(new Error("请选择执行人员")); callback(new Error("请选择执行人员"));
else callback(); } else {
callback();
}
}, },
trigger: "blur", trigger: "blur",
}, },
...@@ -346,8 +377,9 @@ export default { ...@@ -346,8 +377,9 @@ export default {
watch: { watch: {
"dialogVisible": { "dialogVisible": {
handler(val) { handler(val) {
if (val) if (val) {
this.init(); this.init();
}
}, },
immediate: true, immediate: true,
deep: true, deep: true,
...@@ -365,8 +397,9 @@ export default { ...@@ -365,8 +397,9 @@ export default {
if (dayjs(now).diff(dayjs(val), "day") == 0) { if (dayjs(now).diff(dayjs(val), "day") == 0) {
this.datePickerOptions.afterTwoHourPickerOptions.selectableRange = this.getSelectableRange(); this.datePickerOptions.afterTwoHourPickerOptions.selectableRange = this.getSelectableRange();
let twoHour = dayjs().add(2, "h"); let twoHour = dayjs().add(2, "h");
if (twoHour.diff(dayjs(val), "h") > 0) if (twoHour.diff(dayjs(val), "h") > 0) {
this.formData.pushTime = twoHour.format("YYYY-MM-DD HH:mm:ss"); this.formData.pushTime = twoHour.format("YYYY-MM-DD HH:mm:ss");
}
} else { } else {
this.datePickerOptions.afterTwoHourPickerOptions.selectableRange = "00:00:00 - 23:59:59"; this.datePickerOptions.afterTwoHourPickerOptions.selectableRange = "00:00:00 - 23:59:59";
} }
...@@ -385,14 +418,16 @@ export default { ...@@ -385,14 +418,16 @@ export default {
const { strategyType } = this; const { strategyType } = this;
if (strategyType == 3) { if (strategyType == 3) {
if (this.formData.staffList.length) { if (this.formData.staffList.length) {
if (!val.includes(0)) if (!val.includes(0)) {
this.formData.staffList = []; this.formData.staffList = [];
} }
}
if (this.formData.staffList_1.length) { if (this.formData.staffList_1.length) {
if (!val.includes(1)) if (!val.includes(1)) {
this.formData.staffList_1 = []; this.formData.staffList_1 = [];
} }
} }
}
}, },
deep: true, deep: true,
}, },
...@@ -415,8 +450,9 @@ export default { ...@@ -415,8 +450,9 @@ export default {
}, },
openMultipleTag(item) { openMultipleTag(item) {
let { componentName } = item; let { componentName } = item;
if (item.positionTypeList) if (item.positionTypeList) {
this.positionTypeList = item.positionTypeList; this.positionTypeList = item.positionTypeList;
}
this.positionTypeListSale = item.positionTypeListSale; this.positionTypeListSale = item.positionTypeListSale;
this.delMerchantList = item.delMerchantList; this.delMerchantList = item.delMerchantList;
this[`${componentName}Visible`] = true; this[`${componentName}Visible`] = true;
...@@ -427,8 +463,9 @@ export default { ...@@ -427,8 +463,9 @@ export default {
}, },
handleTextBoxFocus(item) { handleTextBoxFocus(item) {
let [textBox] = this.$refs.TextBox || []; let [textBox] = this.$refs.TextBox || [];
if (textBox) if (textBox) {
textBox.setEdit(this.formData[item.key]); textBox.setEdit(this.formData[item.key]);
}
}, },
getSelectableRange() { getSelectableRange() {
return `${dayjs().add(2, "h").format("HH:mm")}:00 - 23:59:59`; return `${dayjs().add(2, "h").format("HH:mm")}:00 - 23:59:59`;
...@@ -482,11 +519,13 @@ export default { ...@@ -482,11 +519,13 @@ export default {
} }
params.strategyInfo.startDate = _time.format("YYYY-MM-DD HH:mm:ss"); params.strategyInfo.startDate = _time.format("YYYY-MM-DD HH:mm:ss");
} }
if (pushType == 1) if (pushType == 1) {
params.strategyInfo.startDate = dayjs().format("YYYY-MM-DD HH:mm:ss"); params.strategyInfo.startDate = dayjs().format("YYYY-MM-DD HH:mm:ss");
} }
if (staffList_1.length) }
if (staffList_1.length) {
staffList = [...staffList, ...staffList_1]; staffList = [...staffList, ...staffList_1];
}
if (staffList && staffList.length) { if (staffList && staffList.length) {
if (staffList.length > 100) { if (staffList.length > 100) {
this.loading = false; this.loading = false;
...@@ -527,16 +566,85 @@ export default { ...@@ -527,16 +566,85 @@ export default {
} catch (error) { } catch (error) {
console.log(error, "==="); console.log(error, "===");
this.loading = false; this.loading = false;
if (error) if (error) {
this.$message.error(error); this.$message.error(error);
}
console.log(error); console.log(error);
} }
}, },
filterInputVal(i, val, keyName, subKeyName) {
if (!i.filterRule) {
return;
}
let target = this[keyName];
if (subKeyName !== null && subKeyName !== undefined) {
target = target[subKeyName];
}
if (i.filterRule === "integerRange") {
// 只保留数字
let filtered = (val || "").replace(/\D/g, "");
// 去除前导零(但保留单独的0)
if (filtered.length > 1) {
filtered = filtered.replace(/^0+/, "");
}
// 转换为数字进行范围检查
const numValue = Number.parseInt(filtered, 10);
// 如果超出最大值,限制为最大值
if (!isNaN(numValue) && numValue > i.max) {
filtered = String(i.max);
}
this.$set(target, i.key, filtered);
} else if (i.filterRule === "decimalRange") {
// 只保留数字和小数点
let filtered = (val || "").replace(/[^\d.]/g, "");
// 确保只有一个小数点
const parts = filtered.split(".");
if (parts.length > 2) {
filtered = parts[0] + "." + parts.slice(1).join("");
}
// 重新分割,确保处理正确
const newParts = filtered.split(".");
// 去除整数部分的前导零(但保留单独的0或小数点前的0)
if (newParts[0].length > 1) {
newParts[0] = newParts[0].replace(/^0+/, "");
}
// 限制小数位数
if (newParts.length === 2 && newParts[1].length > i.precision) {
newParts[1] = newParts[1].substring(0, i.precision);
}
// 重新组合
filtered = newParts.join(".");
// 转换为数字进行范围检查
const numValue = Number.parseFloat(filtered);
// 如果超出最大值,限制为最大值
if (!isNaN(numValue)) {
if (numValue < i.min) {
filtered = String(i.min);
} else if (numValue > i.max) {
filtered = String(i.max);
}
}
this.$set(target, i.key, filtered);
}
},
}, },
}; };
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.flex {
display: flex;
}
::v-deep.strategy-drawer { ::v-deep.strategy-drawer {
.el-drawer__header { .el-drawer__header {
padding: 0; padding: 0;
...@@ -563,6 +671,19 @@ export default { ...@@ -563,6 +671,19 @@ export default {
.content { .content {
height: calc(100% - 61px); height: calc(100% - 61px);
.form { .form {
.form-content {
.form-text {
flex-shrink: 0;
color: #333333;
font-size: 14px;
}
.prev {
margin-right: 8px;
}
.unit {
margin-left: 8px;
}
}
padding: 20px; padding: 20px;
.select, .select,
#div-demo { #div-demo {
......
...@@ -132,10 +132,14 @@ export default { ...@@ -132,10 +132,14 @@ export default {
return { return {
loading: false, loading: false,
taskTypeOptions: { taskTypeOptions: {
9: "人员更换评估", 2: "转化类-督导带教",
10: "商务政策更新评估", 9: "转化类-人员更换评估",
11: "多品类扩张", // 10: "商务政策更新评估",
12: "流量问题改善", // 11: "多品类扩张",
12: "流量类-提升触客率",
// 👇
13: "流量类-多场景拓展",
14: "流量类-拓新店流量",
}, },
formData: { formData: {
taskType: "", taskType: "",
...@@ -316,8 +320,9 @@ export default { ...@@ -316,8 +320,9 @@ export default {
} catch (error) { } catch (error) {
console.log(error, "==="); console.log(error, "===");
this.loading = false; this.loading = false;
if (error) if (error) {
this.$message.error(error); this.$message.error(error);
}
console.log(error); console.log(error);
} }
}, },
......
import dayjs from "dayjs"; import dayjs from "dayjs";
const STRATEGYTYPEOPTIONS = { const STRATEGYTYPEOPTIONS = {
0: "学习", 0: "课程学习",
1: "优秀案例分享", 1: "优秀案例分享",
2: "带教", 2: "带教",
3: "通知", 3: "通知",
4: "销售精英到店提拉", 4: "驻店精英到店提拉",
5: "强力促销", 5: "强力促销",
6: "最终盘点与低客单产品购入", 6: "兜底冲量",
7: "留言", 7: "留言",
}; };
const DATE_RANGE = { const DATE_RANGE = {
......
...@@ -9,19 +9,20 @@ ...@@ -9,19 +9,20 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
const STRATEGYTYPEOPTIONS = { const STRATEGYTYPEOPTIONS = {
0: "学习", 0: "课程学习",
1: "优秀案例分享", 1: "优秀案例分享",
2: "带教", 2: "带教",
3: "通知", 3: "通知",
4: "销售精英到店提拉", 4: "驻店精英到店提拉",
5: "强力促销", 5: "强力促销",
6: "最终盘点与低客单产品购入", 6: "兜底冲量",
7: "留言", 7: "留言",
8: "带教申请", 8: "转化类-督导带教",
9: "人员更换评估", 9: "转化类-人员更换评估",
10: "商务政策更新评估", 10: "商务政策更新评估",
11: "多品类扩张", 11: "多品类扩张",
12: "流量问题改善", 12: "流量类-提升触客率",
}; };
const DATE_RANGE = { const DATE_RANGE = {
label: "执行周期", label: "执行周期",
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<div class="strategy-title flex"> <div class="strategy-title flex">
策略中心 策略中心
<div class="add-grounp flex"> <div class="add-grounp flex">
<div class="add"> <!-- <div class="add">
<el-button type="text" @click="addTeachingVisible = true"> <el-button type="text" @click="addTeachingVisible = true">
<i class="el-icon-plus"></i>带教 <i class="el-icon-plus"></i>带教
</el-button> </el-button>
</div> </div>
<span class="line">|</span> <span class="line">|</span> -->
<div class="add"> <div class="add">
<el-button type="text" @click="addTaskVisible = true"> <el-button type="text" @click="addTaskVisible = true">
<i class="el-icon-plus"></i>任务 <i class="el-icon-plus"></i>任务
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
没有更多了 没有更多了
</div> </div>
</el-scrollbar> </el-scrollbar>
<AddTeaching :biz="paramsInfo.bizs" <!-- <AddTeaching :biz="paramsInfo.bizs"
:visibleSync.sync="addTeachingVisible" :visibleSync.sync="addTeachingVisible"
@refresh="init"> @refresh="init">
</AddTeaching> </AddTeaching> -->
<AddTask :biz="paramsInfo.bizs" <AddTask :biz="paramsInfo.bizs"
:visibleSync.sync="addTaskVisible" :visibleSync.sync="addTaskVisible"
@refresh="init"> @refresh="init">
...@@ -175,8 +175,9 @@ export default { ...@@ -175,8 +175,9 @@ export default {
this.list = this.list.concat(list); this.list = this.list.concat(list);
} }
this.loading = false; this.loading = false;
if (this.pageNum == 1) if (this.pageNum == 1) {
this.viewKey = Date.now(); this.viewKey = Date.now();
}
if (list.length < this.pageSize) { if (list.length < this.pageSize) {
this.noMoreData = true; this.noMoreData = true;
} }
......
...@@ -97,8 +97,9 @@ export default { ...@@ -97,8 +97,9 @@ export default {
this.dialogShow = false; this.dialogShow = false;
}, },
async initData() { async initData() {
if (!this.item.id) if (!this.item.id) {
return; return;
}
try { try {
const res = await queryStrategyStudyDetailById({ id: this.item.id }); const res = await queryStrategyStudyDetailById({ id: this.item.id });
if (res) { if (res) {
...@@ -117,10 +118,14 @@ export default { ...@@ -117,10 +118,14 @@ export default {
// 任务类型映射 // 任务类型映射
const taskTypeMap = { const taskTypeMap = {
9: "人员更换评估", 2: "转化类-督导带教",
9: "转化类-人员更换评估",
10: "商务政策更新评估", 10: "商务政策更新评估",
11: "多品类扩张", 11: "多品类扩张",
12: "流量问题改善", 12: "流量类-提升触客率",
// 👇
13: "流量类-多场景拓展",
14: "流量类-拓新店流量",
}; };
const taskTypeName = taskTypeMap[data.strategyType] || "-"; const taskTypeName = taskTypeMap[data.strategyType] || "-";
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!