先提交一部分
This commit is contained in:
@@ -12,7 +12,7 @@ export default {
|
||||
search: v => v.$marketBoard.search,
|
||||
columns: v => {
|
||||
let {currentDate, compareDate} = v.search
|
||||
const {compareSaleAmt, compareHourTotalAmt, currentHourTotalAmt, saleGrowthRate} = v.summary
|
||||
const {compareSaleAmt = 0, compareHourTotalAmt = 0, currentHourTotalAmt = 0, saleGrowthRate = 0} = v.summary
|
||||
const {dayjs} = window
|
||||
currentDate = currentDate ? dayjs(currentDate).format("YYYY-MM-DD") : ""
|
||||
compareDate = compareDate ? dayjs(compareDate).format("YYYY-MM-DD") : ""
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
...this.search, limit: 999
|
||||
})).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.page?.records || []
|
||||
this.tableData = res.data?.page?.records?.map(e => ({...e, hour: `${`${e.hour-1}`.padStart(2, '0')}:00-${e.hour.padStart(2, '0')}:00`})) || []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ export default {
|
||||
this.form = {
|
||||
compareDate: dayjs().subtract(1, "day").format("YYYYMMDD"),
|
||||
currentDate: dayjs().format("YYYYMMDD"),
|
||||
groupCodeList: this.options?.[0].value,
|
||||
hourNum: new Date().getHours()
|
||||
hourNum: new Date().getHours(),
|
||||
groupCodeList: this.options?.[0].value
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -33,19 +33,19 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-form class="AppMarketBoardFilter flex" size="small" label-width="80px">
|
||||
<el-form-item label="课长">
|
||||
<el-form class="AppMarketBoardFilter flex" size="small" label-width="60px">
|
||||
<el-form-item label="课长" class="fill">
|
||||
<el-select v-model="form.groupCodeList" @change="v=>$marketBoard.search.groupCodeList=[v]">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="对比时间">
|
||||
<el-form-item label="对比时间" class="fill">
|
||||
<el-date-picker v-model="form.compareDate" value-format="yyyyMMdd" @change="v=>$marketBoard.search.compareDate=v"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="当前时间">
|
||||
<el-form-item label="当前时间" class="fill">
|
||||
<el-date-picker v-model="form.currentDate" value-format="yyyyMMdd" @change="v=>$marketBoard.search.currentDate=v"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时段">
|
||||
<el-form-item label="时段" class="fill">
|
||||
<el-select v-model="form.hourNum" :picker-options="options" size="small" format="HH:mm" value-format="H" @change="v=>$marketBoard.search.hourNum=v">
|
||||
<el-option v-for="item in dateOptions" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
@@ -59,7 +59,11 @@ export default {
|
||||
border: 1px solid #1760AE;
|
||||
border-radius: 0;
|
||||
color: #fff;
|
||||
min-width: 120px;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.AppMarketBoardFilter .el-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.AppMarketBoardFilter .el-form-item__label {
|
||||
|
||||
@@ -42,8 +42,12 @@ export default {
|
||||
return result
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
watch: {
|
||||
search: {
|
||||
immediate: true, deep: true, handler() {
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user