diff --git a/src/components/edittablehead/index.vue b/src/components/edittablehead/index.vue index 72c2f0fc..4b7be45d 100644 --- a/src/components/edittablehead/index.vue +++ b/src/components/edittablehead/index.vue @@ -49,6 +49,7 @@ import { useRoute } from 'vue-router'; const functions = inject('functions') as any; import Sortable from 'sortablejs'; +import { handleClearTableQuery } from '@/utils/util'; interface TableColumnType { /** 表格列的key */ prop: string; @@ -131,6 +132,7 @@ const _arr = functions.getStorage($route.fullPath + props.columnListName); if (_arr) { columnRef.value = [..._arr]; + handleClearTableQuery(_arr); emit('update:modelValue', _arr); } diff --git a/src/views/distribution/artery/AddVehicleStowage.vue b/src/views/distribution/artery/AddVehicleStowage.vue index 1b7ff261..91b9cbf2 100644 --- a/src/views/distribution/artery/AddVehicleStowage.vue +++ b/src/views/distribution/artery/AddVehicleStowage.vue @@ -355,7 +355,7 @@ 搜 索 - 重置 + 重 置 @@ -425,8 +425,7 @@ :model="details.newQuery" class="el-fr-d" > -
- - - - - -
+ + + + + + + + + 搜 索 + + + 重 置 + + @@ -619,6 +637,7 @@ import { isNumber, deepClone, debounce, + handleClearTableQuery, } from '@/utils/util'; import { columnList, @@ -1048,7 +1067,7 @@ const onLoad = async () => { if (!value) delete this.timeQuery[prop]; - this.itemFilterData(); + // this.itemFilterData(); }, /** 筛选数据 */ itemFilterData() { @@ -1086,6 +1105,13 @@ const onLoad = async () => { this.renderData = _filterArr; }, + /** 清空搜索的值 */ + itemClearQuery() { + this.query = {}; + this.timeQuery = {}; + handleClearTableQuery(this.newColumnList); + this.itemFilterData(); + }, MappingData: [], }; @@ -1171,10 +1197,8 @@ const searchChange = () => { const searchReset = () => { details.query = {}; details.page.pageNum = 1; - for (let i = 0; i < details.columnList.length; i++) { - const value = details.columnList[i]; - value.values = ''; - } + + handleClearTableQuery(details.columnList); initOriginWarehouseOrder(); }; @@ -1392,7 +1416,7 @@ const handleAddNode = async (index: number) => { if (!value) delete this.timeQuery[prop]; - this.itemFilterData(); + // this.itemFilterData(); }, /** 筛选数据 */ itemFilterData() { @@ -1430,6 +1454,13 @@ const handleAddNode = async (index: number) => { this.renderData = _filterArr; }, + /** 清空搜索的值 */ + itemClearQuery() { + this.query = {}; + this.timeQuery = {}; + handleClearTableQuery(this.newColumnList); + this.itemFilterData(); + }, MappingData: [], }); @@ -1882,12 +1913,6 @@ const handleSubmit = (formEl: FormInstance | undefined) => {