Browse Source

首页查询修改

wangqin
Joe 1 year ago
parent
commit
e6228bf3a5
  1. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue
  2. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue

9
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue

@ -116,13 +116,18 @@ export default {
handleClick(type) { handleClick(type) {
this.activeIcon = this.activeIcon === type ? null : type; this.activeIcon = this.activeIcon === type ? null : type;
}, },
filterEnd(data) {
this.activeIcon = null;
// this.filterData = data;
this.$parent.$refs.RoadAndEventsRef?.setFilterData?.(data);
},
async handleResetForm() { async handleResetForm() {
this.$refs.FormConfigRef?.reset(); this.$refs.FormConfigRef?.reset();
this.activeIcon = null; this.filterEnd(null)
}, },
async handleSearch() { async handleSearch() {
const data = await this.$refs.FormConfigRef.validate(); const data = await this.$refs.FormConfigRef.validate();
this.activeIcon = null; this.filterEnd(data)
} }
} }
} }

15
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -151,11 +151,21 @@ export default {
getMinMapLayers(); getMinMapLayers();
}, },
methods: { methods: {
setFilterData(data) {
this.filterData = data;
this.layerData[1].children.forEach(item => {
if (!item.status) return;
this.handleDeviceImmediate(item);
this.handleDeviceImmediate(item);
})
},
handleClick(item) { handleClick(item) {
this.active = item.title; this.active = item.title;
this.tabContentData = item.children; this.tabContentData = item.children;
}, },
handleDevice: debounce(function (item) { handleDeviceImmediate(item) {
const key = getHandleDeviceType(item) || `${this.active}/${item.title}`; const key = getHandleDeviceType(item) || `${this.active}/${item.title}`;
const status = item.status; const status = item.status;
@ -167,6 +177,9 @@ export default {
if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item); if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item);
eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item); eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item);
},
handleDevice: debounce(function (item) {
this.handleDeviceImmediate(item);
}, 360), }, 360),
handleCleared() { handleCleared() {
const { mapIns } = this.getMap(); const { mapIns } = this.getMap();

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue

@ -8,7 +8,7 @@
<FocusedMonitoring class="card-menu" /> <FocusedMonitoring class="card-menu" />
<!-- --> <!-- -->
<RoadAndEvents class="content-l-b card-menu" /> <RoadAndEvents ref="RoadAndEventsRef" class="content-l-b card-menu" />
</div> </div>
<!-- 右侧 --> <!-- 右侧 -->

Loading…
Cancel
Save