调整了一下默认为全部课区,然后对未选课区的进行全部查询

This commit is contained in:
aixianling
2024-07-12 10:30:08 +08:00
parent dcfc8e658d
commit 8df752e89f
2 changed files with 5 additions and 5 deletions

View File

@@ -29,9 +29,9 @@ export default {
this.getOptions().then(() => {
setTimeout(() => {
const hourNum = new Date().getHours(),
groupCodeList = this.options?.[0].value
groupCodeList = ""
this.form = {hourNum, groupCodeList, type: "1", changeWay: "1"}
this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [groupCodeList], type: "1", changeWay: "1", categoryId: ""})
this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [], type: "1", changeWay: "1", categoryId: ""})
}, 500)
})
},

View File

@@ -104,7 +104,7 @@ export default {
const {$http, $waitFor} = window
const {groupCodeList, type, compareDate} = this.search
console.log("筛选条件:", this.search)
$waitFor($http && groupCodeList.length > 0 && (type != 3 || compareDate)).then(() => this.getStores())
$waitFor($http && (type != 3 || compareDate)).then(() => this.getStores())
.then(codes => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()]).then(() => codes))
.then((codes = []) => {
this.stores = codes?.map(storeCode => {
@@ -116,8 +116,8 @@ export default {
})
},
getStores() {
const {groupCodeList = []} = this.search
return $http.get(`/data-boot/ca/screen/scStoreInfo/group/${groupCodeList[0]}`).then(res => {
const {groupCodeList: [groupCode] = []} = this.search
return $http.get(`/data-boot/ca/screen/scStoreInfo/group${groupCode ? `/${groupCode}` : ""}`).then(res => {
if (res?.data) {
return res.data
}