diff --git a/src/views/AppGroupMonitorTable.vue b/src/views/AppGroupMonitorTable.vue index 3196b02..222072a 100644 --- a/src/views/AppGroupMonitorTable.vue +++ b/src/views/AppGroupMonitorTable.vue @@ -18,11 +18,14 @@ export default { {label: "现烤损货比", prop: "lossAmtRate", width: 60, align: 'right', headerAlign: 'left'}, {label: "环比(目标完成比)", prop: "targetRate", align: 'right', headerAlign: 'left'}, ], - summary: {} + summary: {}, + filter: "", + options: [] } }, computed: { search: v => v.$marketBoard.search, + dicts: v => window.$dicts || {}, tableConfig: v => { return { headerBGC: 'rgba(13, 48, 99, 0.6)', @@ -52,8 +55,8 @@ export default { methods: { getTableData() { const {$http, $waitFor} = window - $waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/groupMonitor", { - ...this.search, limit: 999 + return $waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/groupMonitor", { + ...this.search, limit: 999, groupCodeList: [this.filter].filter(Boolean) })).then(res => { if (res?.data) { this.summary = res.data.total @@ -64,10 +67,17 @@ export default { }, watch: { search: { - immediate: true, deep: true, handler() { + deep: true, handler() { this.getTableData() } } + }, + created() { + this.getTableData().then(() => { + this.options = this.tableData.map(e => ({ + label: e.groupName, value: e.groupCode + })) + }) } } @@ -75,6 +85,13 @@ export default {