Browse Source

筛选组件修改

master
陈薪名 1 year ago
parent
commit
b8f7e7d55f
  1. 2
      src/components/Detail/src/Detail.vue
  2. 21
      src/components/TableHead/src/TableHead.vue
  3. 3
      src/hooks/web/useTable.ts
  4. 6
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

2
src/components/Detail/src/Detail.vue

@ -360,7 +360,7 @@ const handleDelete = async (id: number) => {
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters?searchData.filters:[{column: "masterId", action: "==", value: masterParmas.value.masterId}]
} }
getList() // getList() //
} }

21
src/components/TableHead/src/TableHead.vue

@ -8,15 +8,6 @@
/> />
</div> </div>
<div class="tableNavRightBtns"> <div class="tableNavRightBtns">
<!-- 快速搜索 -->
<!-- <SearchNormal
ref="quicklySearchDom_Ref"
:vueName="vueName"
:quicklySearchOption="quicklySearchOption"
@searchNormalClick="quicklySearchClick"
@searchNormalClear="quicklySearchClear"
style="margin-right: 15px;"
></SearchNormal> -->
<!-- 右侧按钮 --> <!-- 右侧按钮 -->
<ButtonBase :Butttondata="buttonsRight" @button-base-click="buttonBaseClick" @updata-table-columns="updataTableColumns" <ButtonBase :Butttondata="buttonsRight" @button-base-click="buttonBaseClick" @updata-table-columns="updataTableColumns"
:allSchemas="allSchemas" ref="rowDropRef"/> :allSchemas="allSchemas" ref="rowDropRef"/>
@ -114,8 +105,6 @@ watch(
// //
const emit = defineEmits([ const emit = defineEmits([
'buttonBaseClick', 'buttonBaseClick',
'quicklySearchClick',
'quicklySearchClear',
'updataTableColumns', 'updataTableColumns',
'searchFormClick' 'searchFormClick'
]) ])
@ -135,16 +124,6 @@ watch(
} }
} }
//
const quicklySearchClick = (val, option) => {
emit('quicklySearchClick', val, option)
}
//
const quicklySearchClear = (val, option) => {
emit('quicklySearchClear', val, option)
}
const quicklySearchDom_Ref = ref() const quicklySearchDom_Ref = ref()
// //

3
src/hooks/web/useTable.ts

@ -173,6 +173,9 @@ export const useTable = <T = any>(config?: UseTableConfig<T>) => {
pageNo: 1, pageNo: 1,
...data ...data
}) })
// 查询/重置时,删除筛选相关属性
delete tableObject.params.filters
delete tableObject.params.isSearch
// 页码不等于1时更新页码重新获取数据,页码等于1时重新获取数据 // 页码不等于1时更新页码重新获取数据,页码等于1时重新获取数据
if (tableObject.currentPage !== 1) { if (tableObject.currentPage !== 1) {
tableObject.currentPage = 1 tableObject.currentPage = 1

6
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -60,10 +60,10 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
} , } ,
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'ENABLE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'DISABLE',
activeValue: 'TRUE' activeValue: 'ENABLE'
} }
}, },
}, },

Loading…
Cancel
Save