提交一波

This commit is contained in:
aixianling
2024-07-08 10:11:10 +08:00
parent bee23b4f03
commit 4f43a9c248
3 changed files with 17 additions and 13 deletions

View File

@@ -10,7 +10,11 @@ export default {
}
},
computed: {
dicts: v => window.$dicts || {}
dicts: () => window.$dicts || {},
changeWayOps: () => [
{label: "手动", value: "0"},
{label: "自动", value: "1"},
]
},
methods: {
getOptions() {
@@ -26,8 +30,8 @@ export default {
setTimeout(() => {
const hourNum = new Date().getHours(),
groupCodeList = this.options?.[0].value
this.form = {hourNum, groupCodeList, type: "1"}
this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [groupCodeList], type: "1"})
this.form = {hourNum, groupCodeList, type: "1", changeWay: "0"}
this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [groupCodeList], type: "1", changeWay: "0"})
}, 500)
})
},
@@ -59,7 +63,7 @@ export default {
</el-form-item>
<el-form-item label="切换方式">
<el-select v-model="form.changeWay" clearable placeholder="全部">
<!-- <el-option v-for="item in dateOptions" :key="item.value" :label="item.label" :value="item.value"/>-->
<el-option v-for="item in changeWayOps" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
</el-form>

View File

@@ -4,15 +4,11 @@ export default {
label: "实况面板",
data() {
return {
search: {
storeCode: 'K230QTD081',
hourNum: "18"
},
info: {},
}
},
computed: {
search: v => v.$storeBoard.search,
list: v => [
{label: "总销售", prop: "saleAmt"},
{label: "常规销售", prop: "commonSaleAmt"},
@@ -25,6 +21,13 @@ export default {
{label: "外卖销售占比", prop: "deliveryAmtPercent", unit: "%"},
]
},
watch: {
search: {
immediate: true, deep: true, handler() {
this.getData()
}
}
},
methods: {
getData() {
const {$http, $waitFor} = window
@@ -41,9 +44,6 @@ export default {
if (/^-?\d+(\.\d+)?$/.test(result)) result = Number(result).toFixed(2)
return result
}
},
created() {
this.getData()
}
}
</script>

View File

@@ -171,7 +171,7 @@ export default {
<template>
<section class="AppStoresTable">
<el-carousel indicator-position="none" :height="height" :autoplay="false">
<el-carousel indicator-position="none" :height="height" :autoplay="search.changeWay==1">
<el-carousel-item v-for="(group,i) in storeList" :key="i">
<div class="layout">
<div class="store" v-for="store in group" :key="store.storeCode">