Commit 75682f3a by 李伟康

```

feat(api): 新增策略中心相关API接口

- 新增策略详细查询学习前后指标API
- 新增策略详细查询录音记录概览API
- 新增门店分析历史兜底指标API

feat(components): d2-table组件增加选择事件支持

- 添加select和select-all事件监听
- 新增handleSelectRow和handleSelectAll方法
- 暴露选择相关的emit事件

feat(strategy): 策略中心新增多项功能特性

- 新增策略效果分析学习前后指标查询
- 添加历史兜底目标查看功能
- 优化多选表格组件交互体验
- 完善驻店员工管理功能
- 重构人员选择和删除逻辑
- 优化表单验证和加载状态显示

fix(strategy): 修复策略中心多处问题

- 修复标签删除方法参数错误
- 修复数据绑定和类型定义问题
- 修复表格选择状态同步问题
- 优化代码结构和性能表现
```
1 parent 53e2be46
Showing 24 changed files with 401 additions and 205 deletions
...@@ -623,3 +623,30 @@ export function deleteStrategy (data = {}) { ...@@ -623,3 +623,30 @@ export function deleteStrategy (data = {}) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
/**
策略中心-策略详细查询学习前后的指标
*/
export function getStrategyLearningEffectAnalysis (data = {}) {
data.method = "dj.api.strategy.monitor.findLearningEffectAnalysis"
return request(data, RequestMethods.POST)
}
/**
策略中心-策略详细-查询录音记录概览(学习前后传状态)
*/
export function getStrategyRecordStaticByCondition (data = {}) {
data.method = "dj.api.strategy.monitor.findRecordStaticByCondition"
return request(data, RequestMethods.POST)
}
/**
策略中心-门店分析-历史兜底指标
*/
export function getStrategyMerchantAnalysisIndexHistory (data = {}) {
data.method = "dj.api.strategy.merchant.analysis.index.history"
return request(data, RequestMethods.POST)
}
\ No newline at end of file \ No newline at end of file
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
:span-method="arraySpanMethod" :span-method="arraySpanMethod"
v-bind="$attrs" v-bind="$attrs"
v-scroll="scroll" v-scroll="scroll"
@select="handleSelectRow"
@select-all="handleSelectAll"
> >
<el-table-column <el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
...@@ -797,7 +799,15 @@ export default { ...@@ -797,7 +799,15 @@ export default {
}, },
scroll(e) { scroll(e) {
this.$emit("scroll", e) this.$emit("scroll", e)
} },
//当用户手动勾选数据行的 Checkbox 时触发的事件 selection, row
handleSelectRow(selection, row){
this.$emit("selectRow", selection, row)
},
// 当用户手动勾选数据行的 Checkbox 时触发的事件 selection
handleSelectAll(selection){
this.$emit("selectAll", selection)
},
} }
} }
</script> </script>
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
:pagerCount="5" :pagerCount="5"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@selectionTable="selectionTable" @selectionTable="selectionTable"
@selectRow="selectRow"
@selectAll="selectAll"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<template #titleHtml="scope"> <template #titleHtml="scope">
...@@ -217,7 +219,7 @@ export default { ...@@ -217,7 +219,7 @@ export default {
searchForm: { searchForm: {
title: '' title: ''
}, },
searchFormSearch:{}, searchFormSearch: {},
tableParams: { tableParams: {
listName: "list", listName: "list",
mutiSelectUniqueKey: "courseId", mutiSelectUniqueKey: "courseId",
...@@ -397,9 +399,9 @@ export default { ...@@ -397,9 +399,9 @@ export default {
color: #666666; color: #666666;
font-size: 12px; font-size: 12px;
padding: 0 11px; padding: 0 11px;
i{ i {
font-size: 14px; font-size: 14px;
color: #F59619; color: #f59619;
margin-right: 8px; margin-right: 8px;
} }
} }
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
:pagerCount="5" :pagerCount="5"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@selectionTable="selectionTable" @selectionTable="selectionTable"
@selectRow="selectRow"
@selectAll="selectAll"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
</d2-table> </d2-table>
...@@ -169,7 +171,6 @@ export default { ...@@ -169,7 +171,6 @@ export default {
params.receptionDate = dayjs(params.receptionDate).format("YYYY-MM-DD") params.receptionDate = dayjs(params.receptionDate).format("YYYY-MM-DD")
} }
params.merchantId = merchantIds[0] params.merchantId = merchantIds[0]
console.log(JSON.parse(JSON.stringify(params)))
return params return params
}, },
} }
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
:pagerCount="5" :pagerCount="5"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@selectionTable="selectionTable" @selectionTable="selectionTable"
@selectRow="selectRow"
@selectAll="selectAll"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
</d2-table> </d2-table>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<el-tag <el-tag
closable closable
:key="ind" :key="ind"
@close="removeTag (i,ind,item)" @close="removeTag (ind,item)"
>{{ i[item.tagNameKey] }}</el-tag> >{{ i[item.tagNameKey] }}</el-tag>
</template> </template>
</div> </div>
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
type="primary" type="primary"
@click="confirm" @click="confirm"
:size="size" :size="size"
:loading="loading"
> >
确定 确定
</el-button> </el-button>
...@@ -155,28 +156,28 @@ ...@@ -155,28 +156,28 @@
<MultipleStaff <MultipleStaff
ref="staffTagRef" ref="staffTagRef"
:visible="staffTagVisible" :visible="staffTagVisible"
:chooseData="staffList" :chooseData="formData.staffList"
@dialogClose="staffTagVisible = false" @dialogClose="staffTagVisible = false"
@choose="formatMultipleList($event, 'staffList')" @choose="formatMultipleList($event, 'staffList')"
></MultipleStaff> ></MultipleStaff>
<MultipleStaff <MultipleStaff
ref="staffTagRef" ref="staffTagRef"
:visible="staffTag1Visible" :visible="staffTag1Visible"
:chooseData="staffList_1" :chooseData="formData.staffList_1"
@dialogClose="staffTag1Visible = false" @dialogClose="staffTag1Visible = false"
@choose="formatMultipleList($event, 'staffList_1')" @choose="formatMultipleList($event, 'staffList_1')"
></MultipleStaff> ></MultipleStaff>
<MultipleRecording <MultipleRecording
ref="recordingTagRef" ref="recordingTagRef"
:visible="recordingTagVisible" :visible="recordingTagVisible"
:chooseData="recordingList" :chooseData="formData.recordingList"
@dialogClose="recordingTagVisible = false" @dialogClose="recordingTagVisible = false"
@choose="formatMultipleList($event, 'recordingList')" @choose="formatMultipleList($event, 'recordingList')"
></MultipleRecording> ></MultipleRecording>
<MultipleCourse <MultipleCourse
ref="courseTagRef" ref="courseTagRef"
:visible="courseTagVisible" :visible="courseTagVisible"
:chooseData="courseList" :chooseData="formData.courseList"
@dialogClose="courseTagVisible = false" @dialogClose="courseTagVisible = false"
@choose="formatMultipleList($event, 'courseList')" @choose="formatMultipleList($event, 'courseList')"
></MultipleCourse> ></MultipleCourse>
...@@ -256,16 +257,13 @@ export default { ...@@ -256,16 +257,13 @@ export default {
recordingList: [], recordingList: [],
pushTime: '' pushTime: ''
}, },
recordingList: {},
staffList: {},
staffList_1: {},
courseList: {},
staffTagVisible: false, staffTagVisible: false,
staffTag1Visible: false, staffTag1Visible: false,
courseTagVisible: false, courseTagVisible: false,
recordingTagVisible: false, recordingTagVisible: false,
viewKey: Date.now(), viewKey: Date.now(),
positionTypeList: [] positionTypeList: [],
loading: false
} }
}, },
computed: { computed: {
...@@ -379,16 +377,10 @@ export default { ...@@ -379,16 +377,10 @@ 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 = []
this.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 = []
this.staffList_1 = {}
}
} }
} }
}, },
...@@ -407,10 +399,6 @@ export default { ...@@ -407,10 +399,6 @@ export default {
methods: { methods: {
init () { init () {
this.formData = this.$options.data.call(this).formData this.formData = this.$options.data.call(this).formData
this.recordingList = {}
this.staffList = {}
this.staffList_1 = {}
this.courseList = {}
this.$refs?.addRef?.resetFields() this.$refs?.addRef?.resetFields()
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
...@@ -418,17 +406,9 @@ export default { ...@@ -418,17 +406,9 @@ export default {
this.strategyType = null this.strategyType = null
this.$emit('update:dialogVisible', false) this.$emit('update:dialogVisible', false)
}, },
removeTag (i, index, item) { removeTag (index, item) {
let { key, tagKey } = item, let { key } = item
list = this[key]
this.formData[key].splice(index, 1) this.formData[key].splice(index, 1)
Object.keys(list).map(key => {
if (list[key]) {
let ind = list[key].findIndex(k => k[tagKey] == i[tagKey])
if (ind != -1) list[key].splice(ind, 1)
}
})
this[key] = list
}, },
openMultipleTag (item) { openMultipleTag (item) {
let { componentName } = item let { componentName } = item
...@@ -447,18 +427,12 @@ export default { ...@@ -447,18 +427,12 @@ export default {
return `${dayjs().add(2, 'h').format('HH:mm')}:00 - 23:59:59` return `${dayjs().add(2, 'h').format('HH:mm')}:00 - 23:59:59`
}, },
formatMultipleList (list, listKey) { formatMultipleList (list, listKey) {
let _list = [] this.formData[listKey] = list
this[listKey] = list
Object.keys(list).map(key => {
if (list[key]) list[key].map(item => {
_list.push(item)
})
})
this.formData[listKey] = _list
this.$refs.addRef.validateField(listKey) this.$refs.addRef.validateField(listKey)
}, },
confirm () { confirm () {
try { try {
this.loading = true
let { paramsInfo, formData, strategyType, merchantList, biz } = this, let { paramsInfo, formData, strategyType, merchantList, biz } = this,
{ title, { title,
subTitle, subTitle,
...@@ -524,19 +498,16 @@ export default { ...@@ -524,19 +498,16 @@ export default {
} }
console.log(params) console.log(params)
const data = await batchCreateStrategy(params) const data = await batchCreateStrategy(params)
this.loading = false
if (data) { if (data) {
this.$emit('refresh') this.$emit('refresh')
this.$message.success('操作成功') this.$message.success('操作成功')
this.close() this.close()
} else this.$message.error('操作失败') } else this.$message.error('操作失败')
// if() {
// this.close()
// }
// else
//
} }
}) })
} catch (error) { } catch (error) {
this.loading = false
console.log(error) console.log(error)
} }
......
...@@ -5,8 +5,8 @@ export default { ...@@ -5,8 +5,8 @@ export default {
default: false default: false
}, },
chooseData: { chooseData: {
type: Object, type: Array,
default: () => { } default: () => []
} }
}, },
inject: [ inject: [
...@@ -22,8 +22,6 @@ export default { ...@@ -22,8 +22,6 @@ export default {
return this.visible return this.visible
}, },
set (val) { set (val) {
this.pageChooseList = {}
this.delList = []
this.chooseList = [] this.chooseList = []
this.close() this.close()
} }
...@@ -48,14 +46,11 @@ export default { ...@@ -48,14 +46,11 @@ export default {
visible: { visible: {
handler (val) { handler (val) {
if (val) { if (val) {
this.chooseList = []
this.delList = []
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
let multipleTable = this.multipleTable() let multipleTable = this.multipleTable()
if (multipleTable) multipleTable.page.currentPage = 1 if (multipleTable) multipleTable.page.currentPage = 1
this.pageChooseList = this.deepClone(this.chooseData) this.chooseList = this.deepClone(this.chooseData)
this.viewKey = Date.now() this.viewKey = Date.now()
// if (Object.keys(this.chooseData).length) this.$nextTick(() => this.handleReset())
} }
}, },
immediate: true, immediate: true,
...@@ -75,9 +70,7 @@ export default { ...@@ -75,9 +70,7 @@ export default {
confirm_name: "确定", confirm_name: "确定",
}, },
searchFormSearch: {}, searchFormSearch: {},
pageChooseList: {},
chooseList: [], chooseList: [],
delList: []
} }
}, },
methods: { methods: {
...@@ -95,12 +88,16 @@ export default { ...@@ -95,12 +88,16 @@ export default {
this.$emit('dialogClose') this.$emit('dialogClose')
}, },
remove (i, index) { remove (i, index) {
this.delList.push(i)
this.chooseList.splice(index, 1) this.chooseList.splice(index, 1)
this.multipleTable().tableRef.toggleRowSelection(i, false) let tableData = this.multipleTable().data
tableData.map(j => {
if (i[this.targetId] === j[this.targetId]) {
this.multipleTable().tableRef.toggleRowSelection(j, false)
}
})
}, },
async submit () { async submit () {
this.$emit('choose', this.pageChooseList) this.$emit('choose', this.chooseList)
this.close() this.close()
}, },
handleReset () { handleReset () {
...@@ -112,48 +109,53 @@ export default { ...@@ -112,48 +109,53 @@ export default {
this.multipleTable().page.currentPage = 1 this.multipleTable().page.currentPage = 1
this.multipleTable().refreshTable() this.multipleTable().refreshTable()
}, },
setTableFinishFun (data, listIndex) { setTableFinishFun (data) {
this.$nextTick(() => { this.$nextTick(() => {
let { pageChooseList, delList, targetId } = this let { chooseList, targetId } = this
pageChooseList[listIndex] && pageChooseList[listIndex].map(item => { chooseList.map(item => {
let index = data.findIndex(i => i[targetId] === item[targetId]) let index = data.findIndex(i => i[targetId] === item[targetId])
if (index > -1) this.multipleTable().tableRef.toggleRowSelection(data[index], true) if (index > -1) this.multipleTable().tableRef.toggleRowSelection(data[index], true)
}) })
if (delList.length) {
data.map(item => {
let index = delList.findIndex(i => i[targetId] === item[targetId])
if (index > -1) {
this.multipleTable().tableRef.toggleRowSelection(item, false)
delList.splice(index, 1)
}
})
}
}) })
}, },
selectionTable (list, listIndex) { selectionTable (list) {
this.$nextTick(() => { this.$nextTick(() => {
let { targetId, chooseList } = this
if (this.formatTag) list = list.map(e => { if (this.formatTag) list = list.map(e => {
return this.formatTag(e) return this.formatTag(e)
}) })
this.pageChooseList[listIndex] = list // 合并列表后基于 targetId 去重
let { pageChooseList } = this, const mergedList = [...chooseList, ...list]
chooseList = [] this.chooseList = [...new Map(
Object.keys(pageChooseList).map(key => { mergedList.map(item => [item[targetId], item])
if (pageChooseList[key]) { ).values()]
pageChooseList[key].map(item => {
chooseList.push(item)
})
}
})
this.chooseList = chooseList
}) })
}, },
selectRow (list, row) {
let { targetId } = this,
index = list.findIndex(i => i[targetId] === row[targetId])
if (index == -1) {
let delIndex = this.chooseList.findIndex(i => i[targetId] === row[targetId])
if (delIndex > -1) this.chooseList.splice(delIndex, 1)
}
},
selectAll (list) {
if (!list.length) {
let tableData = this.multipleTable().data,
{ targetId } = this
// 使用 Set 存储 tableData 中的所有 targetId
const tableDataIds = new Set(tableData.map(item => item[targetId]));
// 保留 chooseList 中不在 tableData 的项目
this.chooseList = this.chooseList.filter(item =>
!tableDataIds.has(item[targetId])
);
}
},
multipleTable () { multipleTable () {
return this.$refs.multipleTable return this.$refs.multipleTable
}, },
clearChooseList () { clearChooseList () {
this.delList = this.chooseList this.chooseList = []
this.pageChooseList = {}
this.multipleTable().clearMutiSelect() this.multipleTable().clearMutiSelect()
} }
} }
......
<template> <template>
<div class="business-overview"> <div
class="business-overview"
v-loading="loading"
>
<div class="business-overview-title"> <div class="business-overview-title">
展业概况 展业概况
<div :class="['business-overview-status',{'normal':businessOverviewDetail.status == 0}]">{{ businessOverviewText }}</div> <div :class="['business-overview-status',{'normal':businessOverviewDetail.status == 0}]">{{ businessOverviewText }}</div>
...@@ -60,7 +63,7 @@ export default { ...@@ -60,7 +63,7 @@ export default {
return { return {
stopBusinessVisible: false, stopBusinessVisible: false,
businessOverviewDetail: {}, businessOverviewDetail: {},
loading: false
}; };
}, },
computed: { computed: {
...@@ -75,8 +78,8 @@ export default { ...@@ -75,8 +78,8 @@ export default {
let nodeDate = '', let nodeDate = '',
timelineList = this.businessOverviewDetail.timelineList timelineList = this.businessOverviewDetail.timelineList
if (timelineList) { if (timelineList) {
lastNode = timelineList.at(-1) let lastNode = timelineList.at(-1)
if(lastNode.nodeType != 6) nodeDate = lastNode.nodeDate if (lastNode.nodeType != 6) nodeDate = lastNode.nodeDate
else nodeDate = timelineList.at(-2).nodeDate else nodeDate = timelineList.at(-2).nodeDate
} }
console.log(dayjs(nodeDate).format('YYYY-MM-DD')) console.log(dayjs(nodeDate).format('YYYY-MM-DD'))
...@@ -84,11 +87,12 @@ export default { ...@@ -84,11 +87,12 @@ export default {
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
init(){ init () {
this.loading = true
this.getStrategyMerchantTimeline() this.getStrategyMerchantTimeline()
}, },
openStopBusinessDialog () { openStopBusinessDialog () {
...@@ -118,6 +122,7 @@ export default { ...@@ -118,6 +122,7 @@ export default {
}[item.nodeType] }[item.nodeType]
}) })
this.businessOverviewDetail = data this.businessOverviewDetail = data
this.loading = false
console.log(data, 'BusinessOverview/index.vue(查询门店展业时间线)') console.log(data, 'BusinessOverview/index.vue(查询门店展业时间线)')
} }
} }
......
...@@ -5,23 +5,41 @@ ...@@ -5,23 +5,41 @@
class="detail-content" class="detail-content"
:config="config" :config="config"
> >
<div class="content"> <div class="content">
<d2-table
class="table"
ref="table"
:search-form="formSearch"
:table-params="tableParams"
:table-data="list"
:has-page="false"
:has-num="false"
>
</d2-table>
<div class="block"></div>
</div> </div>
</basedialog> </basedialog>
</template> </template>
<script> <script>
import { import {
getStrategyStaffList, getStrategyMerchantAnalysisIndexHistory,
} from "@api/earlyWarningManager" } from "@api/earlyWarningManager"
export default { export default {
name: "HistoryTarget", name: "HistoryTarget",
inject: [
'GET_PARAMS_INFO',
],
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false
}, },
index: {
type: Number,
default: 0
}
}, },
computed: { computed: {
dialogShow: { dialogShow: {
...@@ -32,6 +50,18 @@ export default { ...@@ -32,6 +50,18 @@ export default {
this.close() this.close()
} }
}, },
merchantId () {
let [merchantId] = this.GET_PARAMS_INFO().merchantIds
return merchantId
}
},
watch: {
visible: function (val) {
if (val) {
this.list = []
this.getList()
}
}
}, },
mounted () { mounted () {
...@@ -49,12 +79,59 @@ export default { ...@@ -49,12 +79,59 @@ export default {
width: "600px" width: "600px"
} }
}, },
formSearch: {},
tableParams: {
tableColumns: [
{
label: "月份",
prop: 'recordYearMonth',
minWidth: 64,
},
{
label: "渗透率兜底目标",
minWidth: 80,
formatter: (row) => {
return row[
{
0: 'ewPenetrationRate',
1: 'ewAxbPenetrationRate',
2: 'batteryPenetrationRate',
3: 'ewLtPenetrationRate'
}[this.index]
] + '%'
}
},
{
label: "转化率兜底目标",
minWidth: 80,
formatter: (row) => {
return row[
{
0: 'ewConRate',
1: 'ewAxbConRate',
2: 'batteryConversionRate',
3: 'ewLtConRate'
}[this.index]
] + '%'
}
},
]
},
list:[]
} }
}, },
methods: { methods: {
close () { close () {
this.$emit('dialogClose') this.$emit('dialogClose')
}, },
async getList () {
const { merchantId } = this,
data = await getStrategyMerchantAnalysisIndexHistory({
bizs: 1,
merchantId
})
this.list = data
}
} }
} }
</script> </script>
...@@ -87,10 +164,13 @@ export default { ...@@ -87,10 +164,13 @@ export default {
} }
.detail-content { .detail-content {
.content { .content {
display: flex;
height: 592px; height: 592px;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
overflow-y: auto;
.table {
width: 100%;
}
} }
} }
</style> </style>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
v-if="hasEHi" v-if="hasEHi"
type="text" type="text"
class="target" class="target"
@click="handleTargetConfig(item)" @click="handleTargetConfig(index)"
>历史兜底目标</el-button> >历史兜底目标</el-button>
</div> </div>
<div class="content"> <div class="content">
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</template> </template>
<HistoryTarget <HistoryTarget
:visible.sync="historyTargetVisible" :visible.sync="historyTargetVisible"
:index="historyTargetIndex"
@dialogClose="historyTargetVisible = false" @dialogClose="historyTargetVisible = false"
/> />
</div> </div>
...@@ -143,16 +144,21 @@ export default { ...@@ -143,16 +144,21 @@ export default {
default () { default () {
return {} return {}
} }
},
isHarmony: {
type: Boolean,
default: false
} }
}, },
data () { data () {
return { return {
historyTargetIndex: 0,
historyTargetVisible: false historyTargetVisible: false
} }
}, },
computed: { computed: {
overviewList () { overviewList () {
let { hasEHi } = this, let { hasEHi, isHarmony } = this,
list = this.deepClone(overviewList) list = this.deepClone(overviewList)
if (hasEHi) list.map((e, index) => { if (hasEHi) list.map((e, index) => {
e.list.push({ e.list.push({
...@@ -163,7 +169,7 @@ export default { ...@@ -163,7 +169,7 @@ export default {
2: 'batteryWarrantyEcoCoefficient', 2: 'batteryWarrantyEcoCoefficient',
3: 'tireWarrantyEcoCoefficient', 3: 'tireWarrantyEcoCoefficient',
}[index], }[index],
hide: !this.GET_HARMONY() hide: !isHarmony
}) })
}) })
return list return list
...@@ -172,7 +178,8 @@ export default { ...@@ -172,7 +178,8 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
handleTargetConfig (i) { handleTargetConfig (index) {
this.historyTargetIndex = index
this.historyTargetVisible = true this.historyTargetVisible = true
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
> >
<div <div
class="btn flex" class="btn flex"
@click="leftScroll" @click="scrollTo(-400)"
> >
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
</div> </div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
> >
<div <div
class="btn flex" class="btn flex"
@click="rightScroll" @click="scrollTo(400)"
> >
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
</div> </div>
...@@ -73,17 +73,10 @@ export default { ...@@ -73,17 +73,10 @@ export default {
handleScroll () { handleScroll () {
this.checkScrollPosition(); this.checkScrollPosition();
}, },
leftScroll () { scrollTo (x) {
const scrollbar = this.$refs.timelineScrollbar; const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) { if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.scrollBy({ left: -400, behavior: 'smooth' }); scrollbar.wrap.scrollBy({ left: x, behavior: 'smooth' });
}
this.$nextTick(this.checkScrollPosition);
},
rightScroll () {
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.scrollBy({ left: 400, behavior: 'smooth' });
} }
this.$nextTick(this.checkScrollPosition); this.$nextTick(this.checkScrollPosition);
} }
...@@ -153,7 +146,7 @@ export default { ...@@ -153,7 +146,7 @@ export default {
} }
.timeline-scrollbar { .timeline-scrollbar {
width: 100%; width: 100%;
::v-deep .el-scrollbar__wrap{ ::v-deep .el-scrollbar__wrap {
// overflow:auto hidden !important; // overflow:auto hidden !important;
// margin-bottom: 0 !important; // margin-bottom: 0 !important;
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
:dialog-config="dialogConfig.config" :dialog-config="dialogConfig.config"
class="detail-content" class="detail-content"
@handleClick="submit" @handleClick="submit"
:btnLoding="btnLoding"
> >
<el-form <el-form
ref="form" ref="form"
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
v-model="formData.staffName" v-model="formData.staffName"
class="input-width" class="input-width"
placeholder="请输入人员姓名" placeholder="请输入人员姓名"
maxlength="20" maxlength="15"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -97,6 +98,7 @@ export default { ...@@ -97,6 +98,7 @@ export default {
width: "640px" width: "640px"
} }
}, },
btnLoding: false
} }
}, },
methods: { methods: {
...@@ -106,6 +108,7 @@ export default { ...@@ -106,6 +108,7 @@ export default {
this.$emit('dialogClose') this.$emit('dialogClose')
}, },
submit () { submit () {
this.btnLoding = true
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
if (valid) { if (valid) {
const { merchantIds } = this.paramsInfo, const { merchantIds } = this.paramsInfo,
...@@ -116,8 +119,8 @@ export default { ...@@ -116,8 +119,8 @@ export default {
staffPhone, staffPhone,
merchantId: merchantIds[0], merchantId: merchantIds[0],
}) })
this.btnLoding = false
if (data) { if (data) {
this.$emit('refresh')
this.$message.success('操作成功') this.$message.success('操作成功')
this.close() this.close()
} else this.$message.error('操作失败') } else this.$message.error('操作失败')
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
禁用 禁用
<div <div
class="disabled-btn flex" class="disabled-btn flex"
@click.stop="disabledStaff(item)" @click.stop="disabledStaff(i)"
> >
</div> </div>
</div> </div>
......
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
@click="historyVisible = true" @click="historyVisible = true"
>历史人员记录</el-button> >历史人员记录</el-button>
</div> </div>
<div class="staff-box flex"> <div
class="staff-box flex"
v-loading="staffTimeLoading"
>
<template v-if="staffTimelineIList.length"> <template v-if="staffTimelineIList.length">
<scroll-x-view> <scroll-x-view>
<div class="timeline"> <div class="timeline">
...@@ -17,7 +20,8 @@ ...@@ -17,7 +20,8 @@
:class="['timeline-item flex',{'active-item':index == currentIndex}]" :class="['timeline-item flex',{'active-item':index == currentIndex}]"
v-for="(item, index) in staffTimelineIList" v-for="(item, index) in staffTimelineIList"
:key="index" :key="index"
@click="changeStaff(item)" @click="changeStaff(index)"
:ref="`staffItemRef${index}`"
> >
<img <img
src="@/assets/strategy/default-avatar.png" src="@/assets/strategy/default-avatar.png"
...@@ -62,7 +66,10 @@ ...@@ -62,7 +66,10 @@
新增驻店员工 新增驻店员工
</div> </div>
</div> </div>
<div class="staff-info flex"> <div
class="staff-info flex"
v-loading="staffInfoLoading"
>
<template v-for="(item,index) in formList"> <template v-for="(item,index) in formList">
<div <div
class="staff-info-item flex" class="staff-info-item flex"
...@@ -81,7 +88,10 @@ ...@@ -81,7 +88,10 @@
</template> </template>
</div> </div>
<div class="staff-overview-content"> <div class="staff-overview-content">
<div class="staff-overview-item left"> <div
class="staff-overview-item left"
v-loading="staffLeftLoading"
>
<div class="content"> <div class="content">
<img <img
:src="`${IMG_URL}staff.webp`" :src="`${IMG_URL}staff.webp`"
...@@ -113,10 +123,7 @@ ...@@ -113,10 +123,7 @@
</div> </div>
</template> </template>
</div> </div>
<div <div class="summary-box">
class="summary-box"
:key="viewKey"
>
<!-- <div class="help flex"> <!-- <div class="help flex">
帮助 帮助
<img <img
...@@ -162,7 +169,10 @@ ...@@ -162,7 +169,10 @@
/> />
</template> </template>
</div> </div>
<div class="staff-overview-item right"> <div
class="staff-overview-item right"
v-loading="staffRightLoading"
>
<div class="content"> <div class="content">
<over-view-list :viewData="viewData"></over-view-list> <over-view-list :viewData="viewData"></over-view-list>
</div> </div>
...@@ -181,7 +191,6 @@ ...@@ -181,7 +191,6 @@
<add-staff <add-staff
:visible.sync="addStaffVisible" :visible.sync="addStaffVisible"
@dialogClose="addStaffVisible = false" @dialogClose="addStaffVisible = false"
@refresh="getStrategyStaffListAnalysis"
></add-staff> ></add-staff>
</div> </div>
</template> </template>
...@@ -234,7 +243,7 @@ export default { ...@@ -234,7 +243,7 @@ export default {
}, },
], ],
staffTimelineIList: [], staffTimelineIList: [],
currentIndex: 0, currentIndex: -1,
leftWarningInfoList: [], leftWarningInfoList: [],
rightWarningInfoList: [], rightWarningInfoList: [],
historyVisible: false, historyVisible: false,
...@@ -319,7 +328,10 @@ export default { ...@@ -319,7 +328,10 @@ export default {
], ],
viewData: {}, viewData: {},
summaryInfo: {}, summaryInfo: {},
viewKey: Date.now() staffTimeLoading: true,
staffInfoLoading: true,
staffLeftLoading: true,
staffRightLoading: true,
} }
}, },
computed: { computed: {
...@@ -331,6 +343,7 @@ export default { ...@@ -331,6 +343,7 @@ export default {
}, },
methods: { methods: {
init () { init () {
this.currentIndex = -1
this.getStrategyStaffListAnalysis() this.getStrategyStaffListAnalysis()
}, },
disabledStaff (item) { disabledStaff (item) {
...@@ -353,44 +366,66 @@ export default { ...@@ -353,44 +366,66 @@ export default {
}) })
}, },
async getStrategyStaffListAnalysis (refresh = true) { async getStrategyStaffListAnalysis (refresh = true) {
let params = this.paramsInfo, try {
data = await getStrategyStaffListAnalysis(params) this.staffTimeLoading = true
this.staffTimelineIList = data let params = this.paramsInfo,
if (data && data.length && refresh) { data = await getStrategyStaffListAnalysis(params)
let [item] = data this.staffTimelineIList = data
this.changeStaff(item) this.staffTimeLoading = false
if (data && data.length && refresh) this.$nextTick(() => this.changeStaff())
} catch (error) {
this.staffTimeLoading = false
} }
console.log(data, 'StaffOverview/index.vue(查询驻店员工列表)') console.log(data, 'StaffOverview/index.vue(查询驻店员工列表)')
}, },
changeStaff (item) { changeStaff (index = 0) {
let { staffTimelineIList } = this if (index == this.currentIndex) return
this.currentIndex = staffTimelineIList.findIndex(e => e.staffId == item.staffId) let [item] = this.staffTimelineIList,
ref = this.$refs[`staffItemRef${index}`]
console.log(ref ,'===========')
if(ref && ref[0]) {
}
this.currentIndex = index
this.setStaffWarningInfo(item) this.setStaffWarningInfo(item)
this.getStrategyStaffSummaryDuration(item) this.getStrategyStaffSummaryDuration(item)
this.getStrategyMerchantAnalysisEmployeeSummary(item) this.getStrategyMerchantAnalysisEmployeeSummary(item)
this.getStrategyMerchantAnalysisGoodsSummaryWithWarn(item) this.getStrategyMerchantAnalysisGoodsSummaryWithWarn(item)
}, },
async getStrategyMerchantAnalysisGoodsSummaryWithWarn (item) { async getStrategyMerchantAnalysisGoodsSummaryWithWarn (item) {
const params = this.paramsInfo, try {
summaryGoodsData = await getStrategyMerchantAnalysisGoodsSummaryWithWarn({ this.staffRightLoading = true
...params, const params = this.paramsInfo,
staffUuids: [item.staffId] summaryGoodsData = await getStrategyMerchantAnalysisGoodsSummaryWithWarn({
}) ...params,
this.viewData = summaryGoodsData || {} staffUuids: [item.staffId]
console.log(summaryGoodsData, 'SummaryOverview/index.vue(查询门店商品销售情况)') })
this.viewData = summaryGoodsData || {}
this.staffRightLoading = false
console.log(summaryGoodsData, 'SummaryOverview/index.vue(查询门店商品销售情况)')
} catch (error) {
this.staffRightLoading = false
}
}, },
async getStrategyMerchantAnalysisEmployeeSummary (item) { async getStrategyMerchantAnalysisEmployeeSummary (item) {
let params = this.paramsInfo, try {
data = await getStrategyMerchantAnalysisEmployeeSummary({ this.staffLeftLoading = true
...params, let params = this.paramsInfo,
staffUuids: [item.staffId], data = await getStrategyMerchantAnalysisEmployeeSummary({
staffPhone: item.staffPhone ...params,
}) staffUuids: [item.staffId],
this.summaryInfo = data staffPhone: item.staffPhone
console.log(data, 'StaffOverview/index.vue(查询门店员工分析)') })
this.summaryInfo = data
this.staffLeftLoading = false
console.log(data, 'StaffOverview/index.vue(查询门店员工分析)')
} catch (error) {
this.staffLeftLoading = false
}
}, },
async getStrategyStaffSummaryDuration (item) { async getStrategyStaffSummaryDuration (item) {
try { try {
this.staffInfoLoading = true
let params = this.paramsInfo, let params = this.paramsInfo,
data = await getStrategyStaffSummaryDuration({ data = await getStrategyStaffSummaryDuration({
...params, ...params,
...@@ -398,8 +433,10 @@ export default { ...@@ -398,8 +433,10 @@ export default {
staffPhone: item.staffPhone staffPhone: item.staffPhone
}) })
this.staffDurationInfo = data this.staffDurationInfo = data
this.staffInfoLoading = false
console.log(data, 'StaffOverview/index.vue(查询驻店员工驻店时长)') console.log(data, 'StaffOverview/index.vue(查询驻店员工驻店时长)')
} catch (error) { } catch (error) {
this.staffInfoLoading = false
console.log(error) console.log(error)
} }
}, },
......
...@@ -168,10 +168,12 @@ export default { ...@@ -168,10 +168,12 @@ export default {
if (data.carBrandResponses && data.carBrandResponses.length) { if (data.carBrandResponses && data.carBrandResponses.length) {
let carBrandText = [] let carBrandText = []
data.carBrandResponses.map(e => { data.carBrandResponses.map(e => {
if (e.children && e.children.length) e.children.map(i => { if (e) {
carBrandText.push(`${e.label}-${i.label}`) if (e.children && e.children.length) e.children.map(i => {
}) carBrandText.push(`${e.label}-${i.label}`)
else carBrandText.push(e.label) })
else carBrandText.push(e.label)
}
}) })
data.carBrandText = carBrandText.join('/') data.carBrandText = carBrandText.join('/')
} }
......
...@@ -25,7 +25,9 @@ const CREATED = { ...@@ -25,7 +25,9 @@ const CREATED = {
} }
const CREATED_DATE = { const CREATED_DATE = {
label: '操作时间', label: '操作时间',
key: 'createdDate', format: (val) => {
return dayjs(val.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
} }
const STRATEGY_FORM_01 = [ const STRATEGY_FORM_01 = [
TITLE, TITLE,
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<div <div
class="strategy-drawer-content" class="strategy-drawer-content"
:key="viewKey" :key="viewKey"
v-loading="loading"
> >
<div class="content"> <div class="content">
<!-- <el-scrollbar class="content"> --> <!-- <el-scrollbar class="content"> -->
...@@ -25,8 +26,13 @@ ...@@ -25,8 +26,13 @@
> >
<div class="label">{{ item.label }}:</div> <div class="label">{{ item.label }}:</div>
<div class="value"> <div class="value">
<template v-if="item.format">{{ item.format(detailInfo) }}</template> <template v-if="item.html">
<template v-else>{{ detailInfo[item.key] || '-' }}</template> <div v-html="detailInfo[item.key]"></div>
</template>
<template v-else>
<template v-if="item.format">{{ item.format(detailInfo) }}</template>
<template v-else>{{ detailInfo[item.key] || '-' }}</template>
</template>
</div> </div>
</div> </div>
</template> </template>
...@@ -171,6 +177,7 @@ export default { ...@@ -171,6 +177,7 @@ export default {
}, },
] ]
}, },
loading: false
} }
}, },
computed: { computed: {
...@@ -200,7 +207,8 @@ export default { ...@@ -200,7 +207,8 @@ export default {
{ {
label: '策略说明', label: '策略说明',
class: 'bespread', class: 'bespread',
key: 'description' key: 'descriptionText',
html: true
} }
] ]
}, },
...@@ -241,6 +249,7 @@ export default { ...@@ -241,6 +249,7 @@ export default {
}, },
methods: { methods: {
init () { init () {
this.loading = true
const { strategyType, id } = this.item, const { strategyType, id } = this.item,
targetName = [0, 1].includes(strategyType) ? 'queryStrategyStudyDetailById' : 'queryStrategyTaskDetailById' targetName = [0, 1].includes(strategyType) ? 'queryStrategyStudyDetailById' : 'queryStrategyTaskDetailById'
this[targetName](id) this[targetName](id)
...@@ -250,15 +259,18 @@ export default { ...@@ -250,15 +259,18 @@ export default {
const data = await queryStrategyStudyDetailById({ const data = await queryStrategyStudyDetailById({
id id
}) })
this.detailInfo = data this.setData(data)
console.log(data, 'data')
}, },
async queryStrategyTaskDetailById (strategyId) { async queryStrategyTaskDetailById (strategyId) {
const data = await queryStrategyTaskDetailById({ const data = await queryStrategyTaskDetailById({
strategyId strategyId
}) })
this.setData(data)
},
setData (data) {
data.descriptionText = data.description.replace(/<\/?br\s*\/?>|\\n|\n/g, '<br>')
this.detailInfo = data this.detailInfo = data
console.log(data, 'data') this.loading = false
}, },
close () { close () {
this.$emit('update:dialogVisible', false) this.$emit('update:dialogVisible', false)
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
> <i class="el-icon-plus"></i>添加策略</el-button> > <i class="el-icon-plus"></i>添加策略</el-button>
</div> </div>
</div> </div>
<el-scrollbar class="strategy-list"> <el-scrollbar
class="strategy-list"
:key="viewKey"
v-loading="loading"
>
<template v-for="(i,index) in list"> <template v-for="(i,index) in list">
<strategy-item <strategy-item
:key="index" :key="index"
...@@ -22,7 +26,10 @@ ...@@ -22,7 +26,10 @@
></strategy-item> ></strategy-item>
</template> </template>
</el-scrollbar> </el-scrollbar>
<add-strategy :dialogVisible.sync="addStrategyVisible" @refresh="getStrategyList"></add-strategy> <add-strategy
:dialogVisible.sync="addStrategyVisible"
@refresh="getStrategyList"
></add-strategy>
<strategy-detail <strategy-detail
:dialogVisible.sync="strategyDetailVisible" :dialogVisible.sync="strategyDetailVisible"
:item="currentItem" :item="currentItem"
...@@ -52,7 +59,9 @@ export default { ...@@ -52,7 +59,9 @@ export default {
list: [], list: [],
addStrategyVisible: false, addStrategyVisible: false,
strategyDetailVisible: false, strategyDetailVisible: false,
currentItem: {} currentItem: {},
viewKey: Date.now(),
loading: false
} }
}, },
computed: { computed: {
...@@ -62,10 +71,10 @@ export default { ...@@ -62,10 +71,10 @@ export default {
}, },
mounted () { mounted () {
}, },
methods: { methods: {
init(){ init () {
this.getStrategyList() this.getStrategyList()
}, },
toDetail (item) { toDetail (item) {
...@@ -73,20 +82,27 @@ export default { ...@@ -73,20 +82,27 @@ export default {
this.strategyDetailVisible = true this.strategyDetailVisible = true
}, },
async getStrategyList () { async getStrategyList () {
let { merchantIds } = this.paramsInfo, try {
data = await getStrategyList({ this.loading = true
merchantId: merchantIds[0], let { merchantIds } = this.paramsInfo,
biz: 1, data = await getStrategyList({
pageNum: 1, merchantId: merchantIds[0],
pageSize: 999999 biz: 1,
}) pageNum: 1,
if (data && data.list) { pageSize: 999999
let {list} = data })
list.map(e =>{ if (data && data.list) {
e.createdDateText = dayjs(e.createdDate).format('YYYY-MM-DD') let { list } = data
e.descriptionText = e.description.replace(/<\/?br\s*\/?>|\\n|\n/g, '<br>') list.map(e => {
}) e.createdDateText = dayjs(e.createdDate).format('YYYY-MM-DD')
this.list = list e.descriptionText = e.description.replace(/<\/?br\s*\/?>|\\n|\n/g, '<br>')
})
this.list = list
this.loading = false
this.viewKey = Date.now()
}
} catch (error) {
this.loading = false
} }
console.log(data, 'StrategyList/index.vue 策略列表') console.log(data, 'StrategyList/index.vue 策略列表')
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
</div> </div>
<div class="summary-overview-content"> <div class="summary-overview-content">
<div class="summary-overview-item left"> <div class="summary-overview-item left">
<div class="content"> <div
class="content"
v-loading="summaryLeftLoading"
>
<img <img
:src="`${IMG_URL}summary.webp`" :src="`${IMG_URL}summary.webp`"
class="bg" class="bg"
...@@ -27,7 +30,7 @@ ...@@ -27,7 +30,7 @@
环比{{ formatMom(summaryInfo[i.percentKey])}} 环比{{ formatMom(summaryInfo[i.percentKey])}}
<template v-if="formatIsRatio(summaryInfo[i.percentKey])"> <template v-if="formatIsRatio(summaryInfo[i.percentKey])">
<img <img
:class="['arrow',{just:formatIsRatio(summaryInfo[i.percentKey]) === 'just01'}]" class="arrow"
:src="getIconSrc(formatIsRatio(summaryInfo[i.percentKey]))" :src="getIconSrc(formatIsRatio(summaryInfo[i.percentKey]))"
/> />
</template> </template>
...@@ -52,7 +55,7 @@ ...@@ -52,7 +55,7 @@
环比{{ formatMom(summaryInfo.penetrationRateMom) }} 环比{{ formatMom(summaryInfo.penetrationRateMom) }}
<template v-if="formatIsRatio(summaryInfo.penetrationRateMom)"> <template v-if="formatIsRatio(summaryInfo.penetrationRateMom)">
<img <img
:class="['arrow',{just:formatIsRatio(summaryInfo.penetrationRateMom) === 'just01'}]" class="arrow"
:src="getIconSrc(formatIsRatio(summaryInfo.penetrationRateMom))" :src="getIconSrc(formatIsRatio(summaryInfo.penetrationRateMom))"
/> />
</template> </template>
...@@ -77,7 +80,7 @@ ...@@ -77,7 +80,7 @@
环比{{ formatMom(summaryInfo[j.percentKey]) }} 环比{{ formatMom(summaryInfo[j.percentKey]) }}
<template v-if="formatIsRatio(summaryInfo[j.percentKey])"> <template v-if="formatIsRatio(summaryInfo[j.percentKey])">
<img <img
:class="['arrow',{just:formatIsRatio(summaryInfo[j.percentKey]) === 'just01'}]" class="arrow"
:src="getIconSrc(formatIsRatio(summaryInfo[j.percentKey]))" :src="getIconSrc(formatIsRatio(summaryInfo[j.percentKey]))"
/> />
</template> </template>
...@@ -97,7 +100,10 @@ ...@@ -97,7 +100,10 @@
</template> </template>
</div> </div>
<div class="summary-overview-item right"> <div class="summary-overview-item right">
<div class="content"> <div
class="content"
v-loading="summaryRightLoading"
>
<over-view-list <over-view-list
hasEHi hasEHi
:viewData="viewData" :viewData="viewData"
...@@ -239,7 +245,9 @@ export default { ...@@ -239,7 +245,9 @@ export default {
}, },
], ],
viewData: {}, viewData: {},
isHarmony: false isHarmony: false,
summaryLeftLoading: true,
summaryRightLoading: true
} }
}, },
computed: { computed: {
...@@ -257,18 +265,34 @@ export default { ...@@ -257,18 +265,34 @@ export default {
this.isHarmony = data this.isHarmony = data
}, },
init () { init () {
this.getStrategyBusinessAnalysisStoreSpecialBrand()
this.getStrategyMerchantAnalysisStoreDetailSummary() this.getStrategyMerchantAnalysisStoreDetailSummary()
this.getStrategyMerchantAnalysisGoodsSummaryWithWarn()
this.getStrategyMerchantListWarningInfo() this.getStrategyMerchantListWarningInfo()
this.getStrategyBusinessAnalysisStoreSpecialBrand()
}, },
async getStrategyMerchantAnalysisStoreDetailSummary () { async getStrategyMerchantAnalysisStoreDetailSummary () {
let params = this.paramsInfo, try {
data = await getStrategyMerchantAnalysisStoreDetailSummary(params) this.summaryLeftLoading = true
this.summaryInfo = data let params = this.paramsInfo,
console.log(data, 'SummaryOverview/index.vue(查询门店经营概况)') data = await getStrategyMerchantAnalysisStoreDetailSummary(params)
const summaryGoodsData = await getStrategyMerchantAnalysisGoodsSummaryWithWarn(params) this.summaryInfo = data
this.viewData = summaryGoodsData || {} this.summaryLeftLoading = false
console.log(summaryGoodsData, 'SummaryOverview/index.vue(查询门店商品销售情况)') console.log(data, 'SummaryOverview/index.vue(查询门店经营概况)')
} catch (error) {
this.summaryLeftLoading = false
}
},
async getStrategyMerchantAnalysisGoodsSummaryWithWarn () {
try {
this.summaryRightLoading = true
const params = this.paramsInfo,
summaryGoodsData = await getStrategyMerchantAnalysisGoodsSummaryWithWarn(params)
this.viewData = summaryGoodsData || {}
this.summaryRightLoading = false
console.log(summaryGoodsData, 'SummaryOverview/index.vue(查询门店商品销售情况)')
} catch (error) {
this.summaryRightLoading = false
}
}, },
async getStrategyMerchantListWarningInfo () { async getStrategyMerchantListWarningInfo () {
let params = this.paramsInfo, let params = this.paramsInfo,
......
...@@ -121,11 +121,11 @@ export default { ...@@ -121,11 +121,11 @@ export default {
if (merchantNo) { if (merchantNo) {
console.log('接收到的 merchantNo:', merchantNo); console.log('接收到的 merchantNo:', merchantNo);
// 可以根据 merchantNo 更新 merchantInfo 或进行其他操作 // 可以根据 merchantNo 更新 merchantInfo 或进行其他操作
// this.paramsInfo.merchantIds = [merchantNo] this.paramsInfo.merchantIds = [merchantNo]
// this.$nextTick(() => this.init()) this.$nextTick(() => this.init())
} }
this.paramsInfo.merchantIds = [44210895 || 44211227 || merchantNo] // this.paramsInfo.merchantIds = [ 44211227 || 44210895 || merchantNo]
this.$nextTick(() => this.init()) // this.$nextTick(() => this.init())
history.pushState(null, null, document.URL) history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.preventBack) window.addEventListener('popstate', this.preventBack)
}, },
...@@ -171,10 +171,10 @@ export default { ...@@ -171,10 +171,10 @@ export default {
console.log(this.paramsInfo) console.log(this.paramsInfo)
this.paramsInfo = { this.paramsInfo = {
...this.paramsInfo, ...this.paramsInfo,
// ...e ...e
cycleType: 3, // cycleType: 3,
startTime: '2001-01-01', // startTime: '2025-01-01',
endTime: '2026-01-01' // endTime: '2026-01-01'
} }
this.requireInterface() this.requireInterface()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!