Commit c6f533d3 by 李伟康

feat: 完成多个预警策略相关页面功能优化与新增

1.  src/components/d2-table/index.vue:新增多选列固定配置项
2.  src/views/earlyWarningManager/strategyAnalysis/index.vue:表格头部添加导出按钮
3.  src/views/earlyWarningManager/strategyCentre/storeSignboard/components/StrategyList/StrategyItem.vue:移除调试日志
4.  src/views/earlyWarningManager/strategyCentre/storeSignboard/components/StrategyList/index.vue:注释掉AddTeaching组件引入与注册
5.  src/views/earlyWarningManager/strategyAnalysis/components/StrategyTypeChart/index.vue:优化策略类型名称与图表初始化逻辑
6.  src/views/earlyWarningManager/strategyCentre/storeSignboard/components/AddStrategy/contant.js:新增最大订单数表单项与校验规则
7.  src/views/earlyWarningManager/strategyCentre/storeSignboard/components/AddStrategy/index.vue:优化输入框样式、业务逻辑与布局
8.  src/views/earlyWarningManager/strategyCentre/storeSignboard/components/StrategyDetail/StudyView.vue:优化字段名称与表格样式
9.  新增src/views/earlyWarningManager/strategyCentre/storeSignboard/components/AddTask相关文件,完成新增任务页面开发
10. 优化MultipleRecording与MultipleCourse组件样式与布局
1 parent 2a133c16
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
align="center" align="center"
type="selection" type="selection"
width="55" width="55"
:fixed="tableParams.mutiSelectFixed"
:selectable="selectableFn" /> :selectable="selectableFn" />
<el-table-column v-if="tableParams.singleSelectUniqueKey" <el-table-column v-if="tableParams.singleSelectUniqueKey"
align="center" align="center"
......
...@@ -62,13 +62,13 @@ import noDataImg from "@/assets/strategy/emepty-strategy.png"; ...@@ -62,13 +62,13 @@ import noDataImg from "@/assets/strategy/emepty-strategy.png";
* @type {Object<number, {name: string, color: string}>} * @type {Object<number, {name: string, color: string}>}
*/ */
const STRATEGY_TYPE_CONFIG = { const STRATEGY_TYPE_CONFIG = {
0: { name: "学习", color: "#409EFF" }, 0: { name: "课程学习", color: "#409EFF" },
1: { name: "优秀案例分享", color: "#36CBCB" }, 1: { name: "优秀案例分享", color: "#36CBCB" },
2: { name: "带教", color: "#67C23A" }, 2: { name: "带教", color: "#67C23A" },
3: { name: "通知", color: "#FFD666" }, 3: { name: "通知", color: "#FFD666" },
4: { name: "销售精英到店提拉", color: "#B3E19D" }, 4: { name: "驻店精英到店提拉", color: "#B3E19D" },
5: { name: "强力促销", color: "#E6A23C" }, 5: { name: "强力促销", color: "#E6A23C" },
6: { name: "最终盘点与低客单产品购入", color: "#9254DE" }, 6: { name: "兜底冲量", color: "#9254DE" },
}; };
const FALLBACK_COLORS = ["#409EFF", "#36CBCB", "#67C23A", "#FFD666", "#B3E19D", "#E6A23C", "#9254DE", "#F56C6C"]; const FALLBACK_COLORS = ["#409EFF", "#36CBCB", "#67C23A", "#FFD666", "#B3E19D", "#E6A23C", "#9254DE", "#F56C6C"];
...@@ -294,8 +294,9 @@ export default { ...@@ -294,8 +294,9 @@ export default {
*/ */
initChart() { initChart() {
const chartDom = this.$refs.pieChart; const chartDom = this.$refs.pieChart;
if (!chartDom) if (!chartDom) {
return; return;
}
this.myChart = echarts.init(chartDom); this.myChart = echarts.init(chartDom);
// 初始时使用空数据,等待API数据加载后再更新 // 初始时使用空数据,等待API数据加载后再更新
......
...@@ -189,6 +189,9 @@ ...@@ -189,6 +189,9 @@
<div class="bottom-content"> <div class="bottom-content">
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header title="策略明细"> <d2-table-header title="策略明细">
<el-button size="small" type="primary">
导出
</el-button>
</d2-table-header> </d2-table-header>
<d2-table ref="table" <d2-table ref="table"
no-data-text="暂无数据" no-data-text="暂无数据"
......
<template> <template>
<baseDialog :is-show.sync="dialogShow" <baseDialog class="detail-content"
:dialog-config="dialogConfig.config" :config="config"
class="detail-content" :dialog-config="dialogConfig.config"
:config="config" :is-show.sync="dialogShow"
@handleClick="submit"> @handleClick="submit">
<div :key="viewKey" <div :key="viewKey"
class="content"> class="content">
<div class="left"> <div class="left">
<div class="title flex"> <div class="title flex">
自选课程 自选课程
</div> </div>
<div class="left-content"> <div class="left-content">
<el-form :model="searchForm" <el-form class="course-filter-form"
class="course-filter-form" label-width="60px"
size="small" size="small"
label-width="60px"> :model="searchForm">
<div class="form-row"> <div class="form-row">
<el-form-item label="课程名称:"> <el-form-item label="课程名称:">
<el-input v-model="searchForm.courseName" <el-input v-model="searchForm.courseName"
placeholder="请输入课程名称" placeholder="请输入课程名称"
clearable /> clearable />
</el-form-item> </el-form-item>
<el-form-item label="所属目录:"> <el-form-item label="所属目录:">
<el-select v-model="searchForm.catalog" <el-select v-model="searchForm.catalog"
placeholder="全部" no-match-text="无匹配目录"
clearable placeholder="全部"
filterable clearable
:filter-method="catalogFilterMethod" filterable
no-match-text="无匹配目录" :filter-method="catalogFilterMethod"
@visible-change="handleCatalogSelectVisible"> @visible-change="handleCatalogSelectVisible">
<el-option label="全部" <el-option label="全部"
value="" /> value="" />
<el-option v-for="item in catalogOptions" <el-option v-for="item in catalogOptions"
:key="item" :key="item"
:label="item" :label="item"
:value="item" /> :value="item" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<div class="form-row"> <div class="form-row">
<el-form-item label="标签:"> <el-form-item label="标签:">
<el-input v-model="searchForm.tagName" <el-input v-model="searchForm.tagName"
placeholder="请输入标签" placeholder="请输入标签"
clearable /> clearable />
</el-form-item> </el-form-item>
<el-form-item label="发布时间:"> <el-form-item label="发布时间:">
<el-date-picker v-model="searchForm.publishTimeRange" <el-date-picker v-model="searchForm.publishTimeRange"
type="daterange" end-placeholder="结束"
range-separator="至" range-separator="至"
start-placeholder="开始" start-placeholder="开始"
end-placeholder="结束" /> type="daterange" />
</el-form-item> </el-form-item>
</div> </div>
<div class="form-row form-row-btns"> <div class="form-row form-row-btns">
<el-form-item> <el-form-item>
<el-button type="primary" <el-button size="small"
size="small" type="primary"
@click="handleSearch"> @click="handleSearch">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small"
@click="handleReset"> @click="handleReset">
重置 重置
</el-button> </el-button>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div class="table"> <div class="table">
<d2-table ref="multipleTable" <d2-table ref="multipleTable"
:search-form="searchFormSearch" height="275px"
:table-params="tableParams" layout="total, prev, pager, next"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn"
:has-num="false" :get-list-api="getListApi"
layout="total, prev, pager, next" :has-num="false"
:pager-count="5" :pager-count="5"
:before-search-fn="beforeSearchFn" :search-form="searchFormSearch"
@setTableFinishFun="setTableFinishFun" :table-params="tableParams"
@selectionTable="selectionTable" @selectAll="selectAll"
@selectRow="selectRow" @selectRow="selectRow"
@selectAll="selectAll"> @selectionTable="selectionTable"
<template #titleHtml="scope"> @setTableFinishFun="setTableFinishFun">
<el-tooltip class="item" <template #titleHtml="scope">
effect="light" <el-tooltip class="item"
:content="scope.scope.title" effect="light"
placement="top-start"> placement="top-start"
<div class="text-hide"> :content="scope.scope.title">
{{ scope.scope.title }} <div class="text-hide">
</div> {{ scope.scope.title }}
</el-tooltip> </div>
</template> </el-tooltip>
<template #catalogHtml="scope"> </template>
<el-tooltip v-if="scope.scope.catalog" <template #catalogHtml="scope">
class="item" <el-tooltip v-if="scope.scope.catalog"
effect="light" class="item"
:content="scope.scope.catalog" effect="light"
placement="top-start"> placement="top-start"
<div class="text-hide"> :content="scope.scope.catalog">
{{ scope.scope.catalog }} <div class="text-hide">
</div> {{ scope.scope.catalog }}
</el-tooltip> </div>
<span v-else>-</span> </el-tooltip>
</template> <span v-else>-</span>
<template #tagNameHtml="scope"> </template>
<template v-if="parseTagNames(scope.scope.tagName).length"> <template #tagNameHtml="scope">
<el-tooltip v-if="isTagNameOverflow(scope.scope.tagName)" <template v-if="parseTagNames(scope.scope.tagName).length">
class="item" <el-tooltip v-if="isTagNameOverflow(scope.scope.tagName)"
effect="light" class="item"
:content="formatTagNamesDisplay(scope.scope.tagName)" effect="light"
placement="top-start"> placement="top-start"
<div class="course-tag-list"> :content="formatTagNamesDisplay(scope.scope.tagName)">
<span v-for="(tag, index) in parseTagNames(scope.scope.tagName)" <div class="course-tag-list">
:key="index" <span v-for="(tag, index) in parseTagNames(scope.scope.tagName)"
class="course-tag-item"> :key="index"
{{ tag }} class="course-tag-item">
</span> {{ tag }}
</div> </span>
</el-tooltip>
<div v-else
class="course-tag-list">
<span v-for="(tag, index) in parseTagNames(scope.scope.tagName)"
:key="index"
class="course-tag-item">
{{ tag }}
</span>
</div>
</template>
<span v-else>-</span>
</template>
<template #statusHtml="scope">
<div class="online-status">
<span class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.courseStatus,
'courseStatusOptMap',
),
}">
</span>
{{
getStatusItem(
baseData,
"courseStatusOpt",
scope.scope,
"courseStatus",
)
}}
</div>
</template>
<template #typeHtml="scope">
{{ getStatusItem(baseData, "courseFileTypeOpt", scope.scope, "courseFileType") }}
</template>
</d2-table>
</div> </div>
</el-tooltip>
<div v-else
class="course-tag-list">
<span v-for="(tag, index) in parseTagNames(scope.scope.tagName)"
:key="index"
class="course-tag-item">
{{ tag }}
</span>
</div>
</template>
<span v-else>-</span>
</template>
<template #statusHtml="scope">
<div class="online-status">
<span class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.courseStatus,
'courseStatusOptMap',
),
}">
</span>
{{
getStatusItem(
baseData,
"courseStatusOpt",
scope.scope,
"courseStatus",
)
}}
</div> </div>
</template>
<template #typeHtml="scope">
{{ getStatusItem(baseData, "courseFileTypeOpt", scope.scope, "courseFileType") }}
</template>
</d2-table>
</div>
</div>
</div>
<div class="right">
<div class="title flex">
已选课程<div class="num flex">
共{{ count }}节<div class="time">
{{ totalDuration }}分钟
</div> </div>
<div class="right"> </div>
<div class="title flex"> </div>
已选课程<div class="num flex"> <div class="right-content">
共{{ count }}节<div class="time"> <div class="tips flex">
{{ totalDuration }}分钟 <i class="el-icon-warning"></i>
</div> 提示:总课程时长建议< 60 min
</div> </div>
<d2-table ref="multipleTable2"
class="multiple-table2-box"
:has-num="false"
:has-page="false"
:table-data="chooseList"
:table-params="tableParams2">
<template #titleHtml="scope">
<el-tooltip class="item"
effect="light"
placement="top-start"
:content="scope.scope.title">
<div class="text-hide">
{{ scope.scope.title }}
</div> </div>
<div class="right-content"> </el-tooltip>
<div class="tips flex"> </template>
<i class="el-icon-warning"></i> <template #catalogHtml="scope">
提示:总课程时长建议< 60 min <el-tooltip v-if="scope.scope.catalog"
</div> class="item"
<d2-table ref="multipleTable2" effect="light"
class="multiple-table2-box" placement="top-start"
:table-params="tableParams2" :content="scope.scope.catalog">
:has-num="false" <div class="text-hide">
:has-page="false" {{ scope.scope.catalog }}
:table-data="chooseList">
<template #titleHtml="scope">
<el-tooltip class="item"
effect="light"
:content="scope.scope.title"
placement="top-start">
<div class="text-hide">
{{ scope.scope.title }}
</div>
</el-tooltip>
</template>
<template #catalogHtml="scope">
<el-tooltip v-if="scope.scope.catalog"
class="item"
effect="light"
:content="scope.scope.catalog"
placement="top-start">
<div class="text-hide">
{{ scope.scope.catalog }}
</div>
</el-tooltip>
<span v-else>-</span>
</template>
<template #tagNameHtml="scope">
<template v-if="parseTagNames(scope.scope.tagName).length">
<el-tooltip v-if="isTagNameOverflow(scope.scope.tagName)"
class="item"
effect="light"
:content="formatTagNamesDisplay(scope.scope.tagName)"
placement="top-start">
<div class="course-tag-list">
<span v-for="(tag, index) in parseTagNames(scope.scope.tagName)"
:key="index"
class="course-tag-item">
{{ tag }}
</span>
</div>
</el-tooltip>
<div v-else
class="course-tag-list">
<span v-for="(tag, index) in parseTagNames(scope.scope.tagName)"
:key="index"
class="course-tag-item">
{{ tag }}
</span>
</div>
</template>
<span v-else>-</span>
</template>
<template #statusHtml="scope">
<div class="online-status">
<span class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.courseStatus,
'courseStatusOptMap',
),
}">
</span>
{{
getStatusItem(
baseData,
"courseStatusOpt",
scope.scope,
"courseStatus",
)
}}
</div>
</template>
<template #typeHtml="scope">
{{ getStatusItem(baseData, "courseFileTypeOpt", scope.scope, "courseFileType") }}
</template>
<template #auth-button="scope">
<el-button type="text"
@click="remove(scope.scope, scope.index)">
删除
</el-button>
</template>
</d2-table>
</div> </div>
</div> </el-tooltip>
<span v-else>-</span>
</template>
<template #tagNameHtml="scope">
<template v-if="parseTagNames(scope.scope.tagName).length">
<el-tooltip v-if="isTagNameOverflow(scope.scope.tagName)"
class="item"
effect="light"
placement="top-start"
:content="formatTagNamesDisplay(scope.scope.tagName)">
<div class="course-tag-list">
<span v-for="(tag, index) in parseTagNames(scope.scope.tagName)"
:key="index"
class="course-tag-item">
{{ tag }}
</span>
</div>
</el-tooltip>
<div v-else
class="course-tag-list">
<span v-for="(tag, index) in parseTagNames(scope.scope.tagName)"
:key="index"
class="course-tag-item">
{{ tag }}
</span>
</div>
</template>
<span v-else>-</span>
</template>
<template #statusHtml="scope">
<div class="online-status">
<span class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.courseStatus,
'courseStatusOptMap',
),
}">
</span>
{{
getStatusItem(
baseData,
"courseStatusOpt",
scope.scope,
"courseStatus",
)
}}
</div>
</template>
<template #typeHtml="scope">
{{ getStatusItem(baseData, "courseFileTypeOpt", scope.scope, "courseFileType") }}
</template>
<template #auth-button="scope">
<el-button type="text"
@click="remove(scope.scope, scope.index)">
删除
</el-button>
</template>
</d2-table>
</div> </div>
</basedialog> </div>
</div>
</basedialog>
</template> </template>
<script> <script>
...@@ -327,7 +328,7 @@ export default { ...@@ -327,7 +328,7 @@ export default {
dialogConfig: { dialogConfig: {
config: { config: {
title: "选择课程", title: "选择课程",
width: "1140px", width: "1092px",
}, },
}, },
targetId: "courseId", targetId: "courseId",
...@@ -345,6 +346,7 @@ export default { ...@@ -345,6 +346,7 @@ export default {
listName: "list", listName: "list",
mutiSelectUniqueKey: "courseId", mutiSelectUniqueKey: "courseId",
mutiSelectName: "contentIndex", mutiSelectName: "contentIndex",
mutiSelectFixed: true,
tableColumns, tableColumns,
}, },
tableParams2: { tableParams2: {
...@@ -406,20 +408,23 @@ export default { ...@@ -406,20 +408,23 @@ export default {
return params; return params;
}, },
getStatusColor(status, optKey) { getStatusColor(status, optKey) {
if (status === null || status === undefined) if (status === null || status === undefined) {
return "#C0C4CC"; return "#C0C4CC";
}
const map = (this.baseData && this.baseData[optKey]) || {}; const map = (this.baseData && this.baseData[optKey]) || {};
return map[status] || "#C0C4CC"; return map[status] || "#C0C4CC";
}, },
getStatusItem(baseData, optKey, row, rowKey) { getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row) if (!baseData || !baseData[optKey] || !row) {
return null; return null;
}
let item = baseData[optKey].find(item => item.confId == row[rowKey]); let item = baseData[optKey].find(item => item.confId == row[rowKey]);
return (item && item.confValue) || "-"; return (item && item.confValue) || "-";
}, },
parseTagNames(tagName) { parseTagNames(tagName) {
if (!tagName || typeof tagName !== "string") if (!tagName || typeof tagName !== "string") {
return []; return [];
}
return tagName.split(",").map(tag => tag.trim()).filter(Boolean); return tagName.split(",").map(tag => tag.trim()).filter(Boolean);
}, },
formatTagNamesDisplay(tagName) { formatTagNamesDisplay(tagName) {
...@@ -597,39 +602,32 @@ export default { ...@@ -597,39 +602,32 @@ export default {
} }
.table { .table {
height: calc(100% - 148px); height: calc(100% - 148px);
position: relative;
box-sizing: border-box;
border: 1px solid #ebeef5;
overflow: hidden;
::v-deep .d2-table { ::v-deep .d2-table {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 0;
.el-pagination { .el-pagination {
flex-shrink: 0;
margin-top: auto; margin-top: auto;
} }
> .el-table { .el-table {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
height: 100% !important;
margin: 0 !important; margin: 0 !important;
overflow: hidden; // border-left: none;
border-right: 1px solid #ebeef5;
border-bottom: 1px solid #ebeef5;
// overflow-y: auto;
&::before, &::before,
&::after { &::after {
display: none; display: none;
} }
.el-table__header-wrapper { // .el-table__header-wrapper {
flex-shrink: 0; // .cell {
overflow: hidden; // padding: 0 5px;
} // }
.el-table__body-wrapper { // }
flex: 1; }
min-height: 0; .el-table__fixed {
overflow: auto; &::before {
display: none;
} }
} }
.el-table-column--selection { .el-table-column--selection {
......
...@@ -34,6 +34,24 @@ ...@@ -34,6 +34,24 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-input v-model="searchForm.staffName"
class="search-input"
placeholder="搜索客户名称"
size="small"
clearable>
</el-input>
<el-input v-model="searchForm.staffName"
class="search-input"
placeholder="搜索车型"
size="small"
clearable>
</el-input>
<el-input v-model="searchForm.staffName"
class="search-input"
placeholder="搜索产品名称"
size="small"
clearable>
</el-input>
<el-button size="small" <el-button size="small"
type="primary" type="primary"
@click="handleSearch"> @click="handleSearch">
...@@ -46,6 +64,7 @@ ...@@ -46,6 +64,7 @@
</div> </div>
<div class="table"> <div class="table">
<d2-table ref="multipleTable" <d2-table ref="multipleTable"
height="289"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
:get-list-api="getListApi" :get-list-api="getListApi"
...@@ -116,7 +135,7 @@ export default { ...@@ -116,7 +135,7 @@ export default {
dialogConfig: { dialogConfig: {
config: { config: {
title: "选择录音", title: "选择录音",
width: "1192px", width: "1092px",
}, },
}, },
targetId: "id", targetId: "id",
...@@ -143,6 +162,7 @@ export default { ...@@ -143,6 +162,7 @@ export default {
listName: "list", listName: "list",
mutiSelectUniqueKey: "id", mutiSelectUniqueKey: "id",
mutiSelectName: "contentIndex", mutiSelectName: "contentIndex",
mutiSelectFixed: true,
tableColumns: [ tableColumns: [
{ {
label: "员工姓名", label: "员工姓名",
...@@ -167,17 +187,17 @@ export default { ...@@ -167,17 +187,17 @@ export default {
{ {
label: "接待时长", label: "接待时长",
prop: "duration", prop: "duration",
minWidth: 90, minWidth: 120,
}, },
{ {
label: "质检评分/分", label: "质检评分/分",
prop: "score", prop: "score",
minWidth: 90, minWidth: 120,
}, },
{ {
label: "攻防得分/分", label: "攻防得分/分",
prop: "defencePoint", prop: "defencePoint",
minWidth: 90, minWidth: 120,
}, },
{ {
label: "成交状态", label: "成交状态",
...@@ -186,6 +206,11 @@ export default { ...@@ -186,6 +206,11 @@ export default {
return row.orderFinishFlag ? "成功" : "战败"; return row.orderFinishFlag ? "成功" : "战败";
}, },
}, },
{
label: "产品名称",
prop: "carModel",
minWidth: 90,
},
], ],
}, },
}; };
...@@ -273,13 +298,15 @@ export default { ...@@ -273,13 +298,15 @@ export default {
width: calc(100% - 304px); width: calc(100% - 304px);
&-content { &-content {
padding: 16px; padding: 16px;
height: calc(100% - 49px); height: calc(100% - 90px);
box-sizing: border-box; box-sizing: border-box;
.search-box { .search-box {
margin-bottom: 20px; margin-bottom: 20px;
flex-wrap: wrap;
gap: 12px;
.search-input { .search-input {
width: 200px; width: 180px;
margin-right: 12px;
} }
} }
.table { .table {
...@@ -293,30 +320,23 @@ export default { ...@@ -293,30 +320,23 @@ export default {
} }
.el-table { .el-table {
margin: 0 !important; margin: 0 !important;
border-left: none; // border-left: none;
overflow-y: auto; border-right: 1px solid #ebeef5;
border-bottom: 1px solid #ebeef5;
// overflow-y: auto;
&::before, &::before,
&::after { &::after {
display: none; display: none;
} }
.el-table__header-wrapper, // .el-table__header-wrapper {
.el-table__body-wrapper { // .cell {
position: relative; // padding: 0 5px;
border-left: 1px solid #ebeef5; // }
&::after { // }
content: ""; }
position: absolute; .el-table__fixed {
top: 0; &::before {
right: 1px; display: none;
width: 1px;
height: 100%;
background: #ebeef5;
}
}
.el-table__header-wrapper {
.cell {
padding: 0 5px;
}
} }
} }
.el-table-column--selection { .el-table-column--selection {
......
...@@ -98,6 +98,19 @@ const STRATEGY_FORM_2456 = [ ...@@ -98,6 +98,19 @@ const STRATEGY_FORM_2456 = [
return [5, 6].includes(strategyType) ? "" : "afterPickerOptions"; return [5, 6].includes(strategyType) ? "" : "afterPickerOptions";
}, },
}, },
{
label: "最大订单数",
type: "numberInput",
key: "maxOrderNum",
filterRule: "decimalRange",
min: 0,
max: 999999,
precision: 2,
hide: (val) => {
let { strategyType } = val;
return ![5, 6].includes(strategyType);
},
},
]; ];
const STRATEGY_FORM_3 = [ const STRATEGY_FORM_3 = [
{ {
...@@ -178,6 +191,7 @@ const STUDY_LIST_RULES = { required: true, message: "请选择学习内容" }; ...@@ -178,6 +191,7 @@ 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 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 MAX_ORDER_NUM_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,
...@@ -197,6 +211,7 @@ const STRATEGY_FORM_RULES_1 = { ...@@ -197,6 +211,7 @@ const STRATEGY_FORM_RULES_1 = {
const STRATEGY_FORM_RULES_2456 = { const STRATEGY_FORM_RULES_2456 = {
dateRange: RANGE_DATE, dateRange: RANGE_DATE,
description: DESCRIPTION_RULES, description: DESCRIPTION_RULES,
maxOrderNum: MAX_ORDER_NUM_RULES,
}; };
const STRATEGY_FORM_RULES_3 = { const STRATEGY_FORM_RULES_3 = {
title: TITLE_RULES, title: TITLE_RULES,
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<template v-else-if="item.type == 'textarea'"> <template v-else-if="item.type == 'textarea'">
<el-input v-model="formData[item.key]" <el-input v-model="formData[item.key]"
class="textarea-box" class="textarea-box"
resize="none"
type="textarea" type="textarea"
:autosize="{ minRows: 6 }" :autosize="{ minRows: 6 }"
:maxlength="item.maxlength" :maxlength="item.maxlength"
...@@ -120,6 +121,7 @@ ...@@ -120,6 +121,7 @@
</template> </template>
<template v-else-if="item.type == 'numberInput'"> <template v-else-if="item.type == 'numberInput'">
<el-input v-model="formData[item.key]" <el-input v-model="formData[item.key]"
class="number-input"
:placeholder="`请输入${item.label}`" :placeholder="`请输入${item.label}`"
@input="filterInputVal(item, $event, 'formData')"> @input="filterInputVal(item, $event, 'formData')">
</el-input> </el-input>
...@@ -300,10 +302,10 @@ export default { ...@@ -300,10 +302,10 @@ export default {
placeholder: "请输入学习目标", placeholder: "请输入学习目标",
filterRule: "decimalRange", filterRule: "decimalRange",
min: 0, min: 0,
max: currentBiz == 1 ? 999999 : 100, max: currentBiz == 2 ? 999999 : 100,
precision: 2, precision: 2,
prevText: currentBiz != 1 ? "转化率=" : "平均客单价=", prevText: currentBiz == 2 ? "平均客单价=" : "转化率=",
unit: currentBiz != 1 ? "%" : "", unit: currentBiz == 2 ? "" : "%",
class: "flex", class: "flex",
}); });
} }
...@@ -658,6 +660,9 @@ export default { ...@@ -658,6 +660,9 @@ export default {
font-size: 24px; font-size: 24px;
} }
} }
.el-form-item__label {
padding: 0 !important;
}
&-title { &-title {
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
...@@ -683,8 +688,11 @@ export default { ...@@ -683,8 +688,11 @@ export default {
.unit { .unit {
margin-left: 8px; margin-left: 8px;
} }
.number-input {
width: 259px;
}
} }
padding: 20px; padding: 20px 30px 20px 20px;
.select, .select,
#div-demo { #div-demo {
width: 100%; width: 100%;
......
const TASKTYPEOPTION = [
{ label: "转化类-督导带教", value: 2 },
{ label: "转化类-人员更换评估", value: 9 },
{ label: "流量类-提升触客率", value: 12 },
{ label: "流量类-多场景拓展", value: 13 },
{ label: "流量类-拓新店流量", value: 14 },
];
const TASK_FORM_2 = [
{
label: "需带教人员",
type: "multipleTag",
btnText: "选择人员",
componentName: "staffTag",
key: "staffList",
positionTypeList: [0],
tagNameKey: "staffName",
},
{
label: "指定带教督导",
type: "select",
key: "executorUuid",
placeholder: "请选择指定带教督导",
options: [],
labelKey: "directorName",
valueKey: "directorUserId",
filterable: true,
},
{
label: "带教目标",
type: "numberInput",
key: "learningTarget",
placeholder: "请输入带教目标",
filterRule: "decimalRange",
min: 0,
maxFun: val => val == 2 ? 999999 : 100,
precision: 2,
prevTextFun: val => val == 2 ? "平均客单价=" : "转化率=",
unitFun: val => val == 2 ? "" : "%",
class: "flex",
},
{
label: "带教场景",
type: "select",
key: "scene",
placeholder: "请选择带教场景",
options: [
{ label: "线上", value: 1 },
{ label: "线下", value: 2 },
],
},
{
label: "带教时间",
type: "datetime",
key: "datetime",
placeholder: "请选择带教时间",
pickerOptions: "afterPickerOptions",
},
{
label: "带教方式",
type: "select",
key: "type",
placeholder: "请选择带教方式",
disabledFun: (data) => {
let { scene } = data;
return !scene;
},
optionsFun: (data) => {
let { scene } = data;
return scene == 1
? [
{ label: "视频培训", value: 1 },
{ label: "语音培训", value: 2 },
{ label: "课程推送", value: 3 },
]
: [
{ label: "陪同谈客", value: 4 },
{ label: "话术演练", value: 5 },
{ label: "知识赋能", value: 6 },
{ label: "心态疏导", value: 7 },
{ label: "新人带教", value: 8 },
];
},
},
{
label: "带教主题",
type: "select",
key: "",
placeholder: "请选择带教主题",
options: [
{ label: "新品知识培训", value: 1 },
{ label: "销售话术", value: 2 },
{ label: "产品卖点讲解", value: 3 },
{ label: "竞品对比分析", value: 4 },
{ label: "客户服务标准", value: 5 },
{ label: "门店管理规范", value: 6 },
{ label: "系统操作培训", value: 7 },
{ label: "其他", value: 8 },
],
},
];
const TASK_FORM_DEFAULT = [
{
label: "问题人员",
type: "multipleTag",
btnText: "选择人员",
componentName: "staffTag",
key: "staffList",
positionTypeList: [0],
tagNameKey: "staffName",
hide: (val) => {
let { taskType } = val;
return taskType != 9;
},
},
{
label: "目标触客率",
type: "numberInput",
key: "targetRate",
placeholder: "请输入目标触客率",
filterRule: "decimalRange",
min: 0,
max: 100,
precision: 2,
unit: "%",
class: "flex",
hide: (val) => {
let { taskType } = val;
return taskType != 12;
},
},
{
label: "执行人员",
type: "select",
key: "executorUuid",
placeholder: "请选择执行人员",
options: [],
labelKey: "directorName",
valueKey: "directorUserId",
},
];
export {
TASK_FORM_2,
TASK_FORM_DEFAULT,
TASKTYPEOPTION,
};
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-scrollbar class="content"> <el-scrollbar class="content">
<el-form ref="form" <el-form ref="form"
class="form" class="form"
label-width="110px" label-width="120px"
size="small" size="small"
:model="formData" :model="formData"
:rules="rules"> :rules="rules">
...@@ -22,15 +22,128 @@ ...@@ -22,15 +22,128 @@
<el-select v-model="formData.taskType" <el-select v-model="formData.taskType"
placeholder="请选择任务类型" placeholder="请选择任务类型"
style="width: 100%;"> style="width: 100%;">
<el-option v-for="(label, value) in taskTypeOptions" <el-option v-for="item in taskTypeOptions"
:key="value" :key="item.value"
:label="label" :label="item.label"
:value="Number(value)"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<template v-if="formData.taskType">
<el-form-item label="任务标题:" prop="taskTitle"> <template v-for="(item, index) in taskTypeFormList">
<el-form-item v-if="!item.hide || !item.hide(formData)"
:key="index"
:label="`${item.label}:`"
:prop="item.key">
<div class="form-item-box" :class="[item.class]">
<template v-if="item.prevText || item.prevTextFun">
<span class="form-text prev">{{ item.prevTextFun ? item.prevTextFun(biz) : item.prevText }}</span>
</template>
<template v-if="item.type == 'input'">
<el-input v-model="formData[item.key]"
:maxlength="item.maxlength"
:placeholder="`请输入${item.label}`">
</el-input>
</template>
<template v-else-if="item.type == 'multipleTag'">
<el-button @click="openMultipleTag(item)">
{{ item.btnText }}
</el-button>
<template v-if="formData[item.key] && formData[item.key].length">
<el-scrollbar class="multiple-tag-box">
<div class="multiple-tags">
<template v-for="(i, ind) in formData[item.key]">
<el-tag :key="ind"
closable
@close="removeTag (ind, item)">
{{ i[item.tagNameKey] }}
</el-tag>
</template>
</div>
</el-scrollbar>
</template>
</template>
<template v-else-if="item.type == 'datetime'">
<el-date-picker v-model="formData[item.key]"
class="date-time"
type="datetime"
:picker-options=" datePickerOptions[item.pickerOptionsFun ? item.pickerOptionsFun(formData) : item.pickerOptions]"
:placeholder="item.placeholder">
</el-date-picker>
</template>
<template v-else-if="item.type == 'textarea'">
<el-input v-model="formData[item.key]"
class="textarea-box"
resize="none"
type="textarea"
:autosize="{ minRows: 6 }"
:maxlength="item.maxlength"
:placeholder="`请输入${item.label}`">
</el-input>
</template>
<template v-else-if="item.type == 'richText'">
<TextBox ref="TextBox"
:box-height="240"
:exclude-menus="['code', 'video']"
@change="(e) => handleTextBoxChange(e, item)"
@focus="handleTextBoxFocus(item)">
</TextBox>
</template>
<template v-else-if="item.type == 'checkbox'">
<el-checkbox-group v-model="formData[item.key]">
<el-checkbox v-for="(i, index) in item.options"
:key="index"
:label="i.value">
{{ i.label }}
</el-checkbox>
</el-checkbox-group>
</template>
<template v-else-if="item.type == 'radioTime'">
<el-radio-group v-model="formData[item.key]">
<el-radio v-for="(i, index) in item.options"
:key="index"
:label="i.value">
{{ i.label }}
</el-radio>
</el-radio-group>
<el-date-picker v-if="item.showDateTimePicker(formData)"
v-model="formData[item.timeKey]"
class="date-time-picker"
placeholder="请选择执行时间"
type="datetime"
:picker-options="datePickerOptions[item.pickerOptions]">
</el-date-picker>
</template>
<template v-else-if="item.type == 'numberInput'">
<el-input v-model="formData[item.key]"
class="number-input"
:placeholder="`请输入${item.label}`"
@input="filterInputVal(item, $event, 'formData')">
</el-input>
</template>
<template v-else-if="item.type == 'select'">
<el-select v-model="formData[item.key]"
placeholder="请选择"
style="width: 100%;"
collapse-tags
:disabled="item.disabledFun ? item.disabledFun(formData) : false"
:filterable="item.filterable"
:multiple="item.multiple">
<el-option v-for="(i, index) in (item.optionsFun ? item.optionsFun(formData) : item.options)"
:key="index"
:label="i[item.labelKey] || i.label"
:value="i[item.valueKey] || i.value">
</el-option>
</el-select>
</template>
<template v-if="item.unit || item.unitFun">
<span class="form-text unit">{{ item.unitFun ? item.unitFun(biz) : item.unit }}</span>
</template>
</div>
</el-form-item>
</template>
</template>
<!-- <el-form-item label="任务标题:" prop="taskTitle">
<el-input v-model="formData.taskTitle" <el-input v-model="formData.taskTitle"
maxlength="20" maxlength="20"
placeholder="请输入标题"> placeholder="请输入标题">
...@@ -73,7 +186,7 @@ ...@@ -73,7 +186,7 @@
type="textarea" type="textarea"
:rows="6"> :rows="6">
</el-input> </el-input>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</el-scrollbar> </el-scrollbar>
<div class="footer"> <div class="footer">
...@@ -91,23 +204,36 @@ ...@@ -91,23 +204,36 @@
</div> </div>
</div> </div>
<MultipleStaff ref="staffTagRef" <!-- <MultipleStaff ref="staffTagRef"
:choose-data="formData.staffList" :choose-data="formData.staffList"
:visible="staffTagVisible" :visible="staffTagVisible"
@choose="handleStaffChoose" @choose="handleStaffChoose"
@dialogClose="staffTagVisible = false"> @dialogClose="staffTagVisible = false">
</MultipleStaff> -->
<MultipleStaff ref="staffTagRef"
:choose-data="formData.staffList"
:visible="staffTagVisible"
@choose="formatMultipleList($event, 'staffList')"
@dialogClose="staffTagVisible = false">
</MultipleStaff> </MultipleStaff>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import { batchCreateStrategy, getStrategyShopMerchantOperators, getStrategyStaffList } from "@/api/earlyWarningManager"; import { batchCreateStrategy, getStrategyShopMerchantOperators, getStrategyStaffList } from "@/api/earlyWarningManager";
import {
afterPickerOptions,
} from "@/common/format";
import { deepClone } from "@/common/util.js";
import textBox from "@/components/glsx-combi-form/textBox";
import MultipleStaff from "../AddStrategy/MultipleStaff.vue"; import MultipleStaff from "../AddStrategy/MultipleStaff.vue";
import { TASK_FORM_2, TASK_FORM_DEFAULT, TASKTYPEOPTION } from "./contant.js";
export default { export default {
name: "AddTask", name: "AddTask",
components: { components: {
MultipleStaff, MultipleStaff,
TextBox: textBox,
}, },
inject: ["GET_PARAMS_INFO", "GET_MERCHANT_NAME"], inject: ["GET_PARAMS_INFO", "GET_MERCHANT_NAME"],
provide() { provide() {
...@@ -131,15 +257,9 @@ export default { ...@@ -131,15 +257,9 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
taskTypeOptions: { taskTypeOptions: TASKTYPEOPTION,
2: "转化类-督导带教", datePickerOptions: {
9: "转化类-人员更换评估", afterPickerOptions,
// 10: "商务政策更新评估",
// 11: "多品类扩张",
12: "流量类-提升触客率",
// 👇
13: "流量类-多场景拓展",
14: "流量类-拓新店流量",
}, },
formData: { formData: {
taskType: "", taskType: "",
...@@ -147,6 +267,8 @@ export default { ...@@ -147,6 +267,8 @@ export default {
staffList: [], staffList: [],
executorUuid: "", executorUuid: "",
description: "", description: "",
scene: "",
type: [],
}, },
rules: { rules: {
taskType: [ taskType: [
...@@ -192,6 +314,30 @@ export default { ...@@ -192,6 +314,30 @@ export default {
merchantName() { merchantName() {
return this.GET_MERCHANT_NAME && this.GET_MERCHANT_NAME(); return this.GET_MERCHANT_NAME && this.GET_MERCHANT_NAME();
}, },
taskTypeFormList() {
const { taskType } = this.formData;
const { executorList } = this;
const list = deepClone(taskType == 2 ? TASK_FORM_2 : TASK_FORM_DEFAULT);
if (taskType != 2) {
list.forEach((item) => {
if (item.key == "executorUuid") {
item.options = executorList;
}
});
}
return [
...list,
{
label: "任务说明",
type: "textarea",
key: "description",
maxlength: 200,
},
];
},
formRef() {
return this.$refs.form;
},
}, },
watch: { watch: {
visibleSync(val) { visibleSync(val) {
...@@ -200,16 +346,17 @@ export default { ...@@ -200,16 +346,17 @@ export default {
} }
}, },
"formData.taskType": function (val) { "formData.taskType": function (val) {
// 切换任务类型时,如果不是人员更换评估,清空问题人员 this.init();
if (val !== 9) { this.formData.taskType = val;
this.formData.staffList = []; },
} "formData.scene": {
// 触发重新校验 handler(val) {
this.$nextTick(() => { if (this.formData.type) {
if (this.$refs.form) { this.formData.type = [];
this.$refs.form.validateField("staffList");
} }
}); },
immediate: true,
deep: true,
}, },
}, },
methods: { methods: {
...@@ -222,8 +369,8 @@ export default { ...@@ -222,8 +369,8 @@ export default {
description: "", description: "",
}; };
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.form) { if (this.formRef) {
this.$refs.form.clearValidate(); this.formRef.clearValidate();
} }
}); });
this.loadExecutors(); this.loadExecutors();
...@@ -231,6 +378,10 @@ export default { ...@@ -231,6 +378,10 @@ export default {
close() { close() {
this.dialogShow = false; this.dialogShow = false;
}, },
removeTag(index, item) {
let { key } = item;
this.formData[key].splice(index, 1);
},
loadExecutors() { loadExecutors() {
const params = { const params = {
merchantId: this.paramsInfo ? this.paramsInfo.merchantIds[0] : "", merchantId: this.paramsInfo ? this.paramsInfo.merchantIds[0] : "",
...@@ -254,14 +405,27 @@ export default { ...@@ -254,14 +405,27 @@ export default {
}, },
handleStaffChoose(list) { handleStaffChoose(list) {
this.formData.staffList = list; this.formData.staffList = list;
this.$refs.form.validateField("staffList"); this.formRef.validateField("staffList");
},
openMultipleTag(item) {
let { componentName } = item;
if (item.positionTypeList) {
this.positionTypeList = item.positionTypeList;
}
this.positionTypeListSale = item.positionTypeListSale;
this.delMerchantList = item.delMerchantList;
this[`${componentName}Visible`] = true;
},
formatMultipleList(list, listKey) {
this.formData[listKey] = list;
this.formRef.validateField(listKey);
}, },
confirm() { confirm() {
try { try {
this.loading = true; this.loading = true;
let { paramsInfo, merchantName, formData, biz } = this; let { paramsInfo, merchantName, formData, biz } = this;
let { taskType, taskTitle, staffList, executorUuid, description } = formData; let { taskType, taskTitle, staffList, executorUuid, description } = formData;
this.$refs.form.validate(async (valid) => { this.formRef.validate(async (valid) => {
if (valid) { if (valid) {
const executor = this.executorList.find(item => item.directorUserId === executorUuid); const executor = this.executorList.find(item => item.directorUserId === executorUuid);
let params = { let params = {
...@@ -326,11 +490,82 @@ export default { ...@@ -326,11 +490,82 @@ export default {
console.log(error); console.log(error);
} }
}, },
filterInputVal(i, val, keyName, subKeyName) {
let { biz } = this;
if (!i.filterRule) {
return;
}
let target = this[keyName];
let MAX = i.maxFun ? i.maxFun(biz) : i.max;
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 > MAX) {
filtered = String(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 > MAX) {
filtered = String(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;
...@@ -344,6 +579,9 @@ export default { ...@@ -344,6 +579,9 @@ export default {
font-size: 24px; font-size: 24px;
} }
} }
.el-form-item__label {
padding: 0 !important;
}
&-title { &-title {
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
...@@ -357,7 +595,26 @@ export default { ...@@ -357,7 +595,26 @@ export default {
.content { .content {
height: calc(100% - 61px); height: calc(100% - 61px);
.form { .form {
padding: 20px; .form-item-box {
.form-text {
flex-shrink: 0;
color: #333333;
font-size: 14px;
}
.prev {
margin-right: 8px;
}
.unit {
margin-left: 8px;
}
.number-input {
width: 259px;
}
.date-time {
width: 336px;
}
}
padding: 20px 30px 20px 20px;
.tags-container { .tags-container {
margin-top: 10px; margin-top: 10px;
padding: 10px; padding: 10px;
...@@ -373,6 +630,28 @@ export default { ...@@ -373,6 +630,28 @@ export default {
.staff-tag { .staff-tag {
margin-right: 0; margin-right: 0;
} }
.multiple-tag-box {
margin-top: 12px;
width: 100%;
height: 128px;
border-radius: 4px;
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 0 8px;
.multiple-tags {
padding: 8px 0;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
}
.textarea-box {
min-height: 128px;
}
.date-time-picker {
width: calc(100% - 220px);
margin-left: 30px;
}
} }
} }
.footer { .footer {
......
...@@ -384,7 +384,7 @@ export default { ...@@ -384,7 +384,7 @@ export default {
unit: "%", unit: "%",
}, },
{ {
label: "客单价", label: "平均客单价",
key: "avgOrderAmount", key: "avgOrderAmount",
}, },
{ {
...@@ -392,26 +392,26 @@ export default { ...@@ -392,26 +392,26 @@ export default {
key: "packageSalesRate", key: "packageSalesRate",
unit: "%", unit: "%",
}, },
{ // {
label: "整车延保渗透率", // label: "整车延保渗透率",
key: "wholeVehicleWarrantyPenetration", // key: "wholeVehicleWarrantyPenetration",
unit: "%", // unit: "%",
}, // },
{ // {
label: "安心包渗透率", // label: "安心包渗透率",
key: "anxinPackagePenetration", // key: "anxinPackagePenetration",
unit: "%", // unit: "%",
}, // },
{ // {
label: "电池渗透率", // label: "电池渗透率",
key: "batteryPenetration", // key: "batteryPenetration",
unit: "%", // unit: "%",
}, // },
{ // {
label: "轮胎渗透率", // label: "轮胎渗透率",
key: "tirePenetration", // key: "tirePenetration",
unit: "%", // unit: "%",
}, // },
], ],
contorlIndex: 0, contorlIndex: 0,
contorlList: [ contorlList: [
...@@ -488,16 +488,18 @@ export default { ...@@ -488,16 +488,18 @@ export default {
let lastRef = this.$refs[`${refName}${list.length - 1}`]; let lastRef = this.$refs[`${refName}${list.length - 1}`];
if (lastRef && lastRef.length) { if (lastRef && lastRef.length) {
let [ref] = lastRef; let [ref] = lastRef;
if (ref && ref.offsetTop > 72) if (ref && ref.offsetTop > 72) {
this[`${refName}TwoLine`] = true; this[`${refName}TwoLine`] = true;
}
} }
}, },
qualitDetail(row, refName) { qualitDetail(row, refName) {
const list = this.$refs[refName].data; const list = this.$refs[refName].data;
const currentNum = list.findIndex(e => e.id == row.id); const currentNum = list.findIndex(e => e.id == row.id);
list.map((e) => { list.map((e) => {
if (e.receptionStartTime) if (e.receptionStartTime) {
e.receptionStartTime = dayjs(e.receptionStartTime).valueOf(); e.receptionStartTime = dayjs(e.receptionStartTime).valueOf();
}
}); });
this.$emit("openReceptionDialog", { this.$emit("openReceptionDialog", {
currentNum, currentNum,
...@@ -517,8 +519,9 @@ export default { ...@@ -517,8 +519,9 @@ export default {
return params; return params;
}, },
changeAnalysisPeriodDays(item, index) { changeAnalysisPeriodDays(item, index) {
if (index == this.contorlIndex) if (index == this.contorlIndex) {
return; return;
}
this.contorlIndex = index; this.contorlIndex = index;
this.secondSearchFormSearch.analysisPeriodDays = item.value; this.secondSearchFormSearch.analysisPeriodDays = item.value;
this.init(true); this.init(true);
...@@ -540,8 +543,9 @@ export default { ...@@ -540,8 +543,9 @@ export default {
}); });
}, },
changeStaff(item) { changeStaff(item) {
if (item.userUuid == this.staffId) if (item.userUuid == this.staffId) {
return; return;
}
this.staffId = item.userUuid; this.staffId = item.userUuid;
this.init(true); this.init(true);
}, },
...@@ -676,6 +680,8 @@ export default { ...@@ -676,6 +680,8 @@ export default {
left: 0; left: 0;
height: 32px; height: 32px;
z-index: 9; z-index: 9;
color: #333333;
font-size: 12px;
&-box { &-box {
margin-left: 4px; margin-left: 4px;
} }
...@@ -721,7 +727,8 @@ export default { ...@@ -721,7 +727,8 @@ export default {
margin-right: 4px; margin-right: 4px;
} }
.business-box { .business-box {
height: 289px; height: 171px;
// height: 289px;
border-radius: 4px; border-radius: 4px;
position: relative; position: relative;
display: flex; display: flex;
......
...@@ -135,8 +135,6 @@ export default { ...@@ -135,8 +135,6 @@ export default {
9: STRATEGY_9, 9: STRATEGY_9,
}[strategyType] || []; }[strategyType] || [];
console.log(list, "list");
return [ return [
...list, ...list,
{ {
...@@ -174,7 +172,6 @@ export default { ...@@ -174,7 +172,6 @@ export default {
color: "#2A82E4", color: "#2A82E4",
bg: "rgba(42, 130, 228, 0.1)", bg: "rgba(42, 130, 228, 0.1)",
}, 5: { color: "#EB4E4E", bg: "rgba(235, 78, 78, 0.1)" }, 6: { color: "#43CF7C", bg: "rgba(67, 207, 124, 0.1)" } }; }, 5: { color: "#EB4E4E", bg: "rgba(235, 78, 78, 0.1)" }, 6: { color: "#43CF7C", bg: "rgba(67, 207, 124, 0.1)" } };
console.log(obj[numState], "obj[numState]");
return obj[numState] || {}; return obj[numState] || {};
}, },
deleteStrategy(item) { deleteStrategy(item) {
......
...@@ -74,7 +74,7 @@ import { ...@@ -74,7 +74,7 @@ import {
} from "@/api/earlyWarningManager"; } from "@/api/earlyWarningManager";
import AddStrategy from "../AddStrategy/index.vue"; import AddStrategy from "../AddStrategy/index.vue";
import AddTask from "../AddTask/index.vue"; import AddTask from "../AddTask/index.vue";
import AddTeaching from "../AddTeaching/index.vue"; // import AddTeaching from "../AddTeaching/index.vue";
import StrategyDetail from "../StrategyDetail/index.vue"; import StrategyDetail from "../StrategyDetail/index.vue";
import TaskDetail from "../taskDetail/index.vue"; import TaskDetail from "../taskDetail/index.vue";
import TeachingDetail from "../TeachingDetail/index.vue"; import TeachingDetail from "../TeachingDetail/index.vue";
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
components: { components: {
StrategyItem, StrategyItem,
AddStrategy, AddStrategy,
AddTeaching, // AddTeaching,
AddTask, AddTask,
StrategyDetail, StrategyDetail,
TeachingDetail, TeachingDetail,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!