diff --git a/src/views/AppMultipleStoreBoardFilter.vue b/src/views/AppMultipleStoreBoardFilter.vue index 5c69f5f..5bf170d 100644 --- a/src/views/AppMultipleStoreBoardFilter.vue +++ b/src/views/AppMultipleStoreBoardFilter.vue @@ -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) }) }, diff --git a/src/views/AppStoresTable.vue b/src/views/AppStoresTable.vue index 1a8f617..8f0511b 100644 --- a/src/views/AppStoresTable.vue +++ b/src/views/AppStoresTable.vue @@ -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 }