提交一下

This commit is contained in:
aixianling
2024-06-21 16:42:57 +08:00
parent bdff7b020f
commit 2ca226af90
2 changed files with 47 additions and 19 deletions

View File

@@ -1,5 +1,7 @@
<template> <template>
<el-select v-model="value" placeholder="品类" size="small"> <section class="AppSelect" >
<div class="label">类型</div>
<el-select v-model="value" placeholder="全部" size="small" @change="handleSearch">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
@@ -7,6 +9,7 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</section>
</template> </template>
<script> <script>
@@ -15,16 +18,39 @@ export default {
label: "下拉菜单", label: "下拉菜单",
data() { data() {
return { return {
options: [], options: $dicts.类型,
value: '' value: ''
} }
},
computed: {
refs: v => v.$parent.getItemRefs(),
},
methods: {
handleSearch(v) {
const list = this.refs['6e6c93d7-5b24-4d75-a0d0-4beb130045ed'].$refs.main
list.search.type = v
list.getData()
}
} }
} }
</script> </script>
<style scoped> <style scoped>
:deep(.el-input__inner) { .AppSelect {
display: flex;
align-items: center;
gap: 8px;
}
.AppSelect .el-input__inner {
background: linear-gradient(180deg, rgba(12, 53, 111, 0) 0%, #0C356F 100%); background: linear-gradient(180deg, rgba(12, 53, 111, 0) 0%, #0C356F 100%);
border: 1px solid #1760AE; border: 1px solid #1760AE;
border-radius: 0;
}
.AppSelect .label {
white-space: nowrap;
color: #fff;
font-size: 14px;
} }
</style> </style>

View File

@@ -87,11 +87,14 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
const {$http, $waitFor} = window
$waitFor($http).then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()])).then(() => {
this.stores = this.stores.map(({storeName, storeCode, storeCameraVOList = []}) => { this.stores = this.stores.map(({storeName, storeCode, storeCameraVOList = []}) => {
const keyGoods = this.storeKeyGoods.filter(e => e.storeCode == storeCode) const keyGoods = this.storeKeyGoods.filter(e => e.storeCode == storeCode)
const categorySale = this.categorySales.filter(e => e.storeCode == storeCode) const categorySale = this.categorySales.filter(e => e.storeCode == storeCode)
return {storeCode, storeName, camera: storeCameraVOList.map(e => e.url), keyGoods, categorySale} return {storeCode, storeName, camera: storeCameraVOList.map(e => e.url), keyGoods, categorySale}
}) })
})
}, },
getCameras() { getCameras() {
return $http.post("/data-boot/la/screen/multipleStoreBoard/storeCamera", { return $http.post("/data-boot/la/screen/multipleStoreBoard/storeCamera", {
@@ -122,15 +125,14 @@ export default {
}, },
gotoDetail(store) { gotoDetail(store) {
$glob.query = {storeCode: store.storeCode} $glob.query = {storeCode: store.storeCode}
$glob.group = "9f299712-5549-413b-a93b-7c3e3b5bfadb" const sid = "9f299712-5549-413b-a93b-7c3e3b5bfadb"
$glob.group = sid
this.refs["ff6a5ca5-8cca-4fad-8058-a2ab2388236c"].$refs.main.groupId = sid
}, },
}, },
mounted() { mounted() {
this.height = `${this.$el.clientHeight}px` this.height = `${this.$el.clientHeight}px`
setTimeout(() => { this.getData()
const {$http, $waitFor} = window
$waitFor($http).then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()])).then(() => this.getData())
}, 2000)
} }
} }
</script> </script>