Browse Source

HL-6063@王宇飞 筛选数据后,数据修改成功只不过页面没有刷新

hella_online_20240924
yufei_wang 2 months ago
parent
commit
136972b7d0
  1. 42
      src/components/Detail/src/Detail.vue

42
src/components/Detail/src/Detail.vue

@ -821,7 +821,15 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
}
const updateList = ()=>{
getList()
//
if (tableObjectRef.value.params.filters && tableObjectRef.value.params.filters.length > 0) {
searchFormClick({
filters: tableObjectRef.value.params.filters
})
} else {
getList()
}
}
//
@ -1005,7 +1013,7 @@ const submitForm = async (formType, data) => {
emit('handleMainFefresh')
formRef.value.dialogVisible = false
//
await getList()
updateList()
updateKey.value += 1
}
} finally {
@ -1016,7 +1024,7 @@ const submitForm = async (formType, data) => {
const submitUpdateList = async ()=>{
formRef.value.dialogVisible = false
//
await getList()
updateList()
updateKey.value += 1
}
@ -1064,29 +1072,35 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess'))
emit('handleMainFefresh')
//
await getList()
await updateList()
updateKey.value += 1
} catch {
tableObject.loading = false
getList()
updateList()
}
}
//
const searchFormClick = async (searchData) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params = {
tableObjectRef.value.params = {
isSearch: true,
filters: searchData.filters
? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
}
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
// const { tableObject, tableMethods } = useTable({
// getListApi: props.apiPage //
// })
// tableObject.params = {
// isSearch: true,
// filters: searchData.filters
// ? searchData.filters
// : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
// }
// detailAllSchemasRef.value = props.detailAllSchemas
// tableObjectRef.value = tableObject
// tableMethodsRef.value = tableMethods
// tableObjectRef.value.tableList = []
// const { getList } = tableMethods
await getList()
updateKey.value += 1
// tableObjectRef.value.params = {

Loading…
Cancel
Save