Browse Source

搜索的刷新改成重置的功能

wangqin
hui 8 months ago
parent
commit
2db171c48f
  1. 4
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  2. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  3. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue
  4. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue
  5. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue
  6. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue
  7. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/index.vue
  8. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  9. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue
  10. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue

4
ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue

@ -160,12 +160,10 @@ export default {
handleResetForm() {
if(this.params && this.types == 'input'){
this.value = "";
return
}
// this.visible = true;
this.$refs.FormConfigRef?.reset();
this.$refs.FormConfigRef.$refs.ElFormRef.resetFields();
this.$refs.FormConfigRef?.$refs.ElFormRef.resetFields();
// this.$refs.PopoverRef.doClose();
this.$emit(

10
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -134,7 +134,7 @@ export class MarkerCluster {
return `
<div style="cursor: pointer; padding: 3px 6px;display: flex;align-items: center; gap: 6px;" class="info-window-item">
${++num}<img style="width: 18px;" src="${getIcon(item)}" />
<span>${(
<span style="white-space: nowrap; word-break: break-all;">${(
item.extData.deviceName ||
item.extData.warningTitle ||
item.config?.item.title
@ -151,11 +151,11 @@ export class MarkerCluster {
window.renderData = renderData;
// min-width: 240px;
// min-height: 90px;
// width: 90px;
this.infoWindow.setContent(`<div
style="
min-width: 240px;
min-height: 90px;
width: 90px;
display: flex;
flex-direction: column;
position: relative;
@ -172,7 +172,7 @@ export class MarkerCluster {
(item) => `
<div style="cursor: pointer; padding: 3px 6px;display: flex;align-items: center; gap: 6px;" class="info-window-item">
${++num} <img style="width: 18px;" src="${getIcon(item)}" />
<span>${(
<span style="white-space: nowrap; word-break: break-all;">${(
item.extData.deviceName ||
item.extData.warningTitle ||
item.config?.item.title

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue

@ -26,7 +26,7 @@
</template>
新增
</ButtonGradient>
<ButtonGradient @click.native="setCurrentPage(1)">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -35,6 +35,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '100px' }"
@ -227,6 +228,10 @@ export default {
this.getOptions();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
async getOptions() {
const result = await getSelectOptionsStation(2);

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue

@ -14,7 +14,7 @@
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="setCurrentPage(1)">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -23,6 +23,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '90px' }"
@ -148,6 +149,10 @@ export default {
this.getVehicleTypeList();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
getVehicleTypeList() {
if (this.vehicleTypeList.length) return;

9
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue

@ -14,7 +14,7 @@
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="setCurrentPage(1)">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -22,7 +22,10 @@
</ButtonGradient>
</div>
<!-- formList是UI配置 -->
<!-- params是字段名 -->
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '72px' }"
@ -95,6 +98,10 @@ export default {
this.getSearchOptions();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
async handleDelete(data) {
await confirm({ message: "是否要删除该人员?" });

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue

@ -14,7 +14,7 @@
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="getData">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -23,6 +23,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px;"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '90px' }"
@ -135,6 +136,10 @@ export default {
// this.getSearchOptions();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
getSearchData() {
const result = {
...this.searchData,

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/index.vue

@ -2,7 +2,7 @@
<div class="RoadNetworkMonitoring">
<!-- 搜索栏 -->
<div class="filter">
<ButtonGradient @click="onRefresh" class="refresh-btn">
<ButtonGradient @click="onRefreshForm" class="refresh-btn">
<template #prefix>
<img src="./images/refresh.svg" />
</template>
@ -10,6 +10,7 @@
</ButtonGradient>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }"
@ -103,6 +104,10 @@ export default {
this.initData();
},
methods: {
onRefreshForm(){
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
initData() {
request({
// url: `/dc/system/event/dispatchEventList`,

12
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -27,7 +27,7 @@
</ButtonGradient>
</div>
<InputSearch style="width: 402px" :formList="searchFormList" @handleSearch="handleSearch" />
<InputSearch ref="searchComp" style="width: 402px" :formList="searchFormList" @handleSearch="handleSearch" />
</div>
<!-- 内容 -->
@ -212,10 +212,12 @@ export default {
}
},
onRefresh() {
this.data = [];
setTimeout(() => {
this.getData();
}, 100);
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
// this.data = [];
// setTimeout(() => {
// this.getData();
// }, 100);
},
onSizeChange(pageSize) {
this.searchData.pageSize = pageSize;

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

@ -17,7 +17,7 @@
刷新
</ButtonGradient>
</div>
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{}"
<InputSearch ref="searchComp" style="width: 402px;" :formList="searchFormList" :formConfigOptions="{}"
@handleSearch="handleSearch" />
</div>
@ -119,7 +119,9 @@ export default {
this.initData();
},
onRefresh() {
this.initData();
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
// this.initData();
},
onAdd() {
this.detail = {}

17
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue

@ -18,6 +18,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }"
@ -88,6 +89,7 @@ export default {
pageSize: 16,
pageNum: 1,
searchData: {
pageNum: 1,
warningSource: "6",
},
};
@ -101,7 +103,10 @@ export default {
this.$message.warning("待开发");
},
//
onRefresh() {},
onRefresh() {
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
initData() {
perceivedEventsList(this.searchData, this.pageNum, this.pageSize).then(
(res) => {
@ -147,13 +152,9 @@ export default {
firstBtnClick(id) {},
handleSearch(data) {
console.log("data", data);
this.searchData = {
...this.searchData,
warningType: data.warningType,
startTime: data.warningTime[0],
completeTime: data.warningTime[1],
};
this.searchData.warningType = data.warningType;
this.searchData.startTime = data.warningTime && data.warningTime[0];
this.searchData.completeTime = data.warningTime && data.warningTime[1];
this.initData();
},
},

Loading…
Cancel
Save