|
|
@ -110,6 +110,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
|
|
|
|
defineOptions({ name: 'Detail' }) |
|
|
|
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
@ -118,6 +119,7 @@ const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail' |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
// 标签参数 |
|
|
|
tabs: { |
|
|
@ -290,12 +292,18 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
getFileList() |
|
|
|
getChangeRecordList() |
|
|
|
// 判断详情新增按钮是否显示 |
|
|
|
if(routeName.value.indexOf('Job') > -1){ |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
}else{ |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultAddBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
}), // 新增 |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} |
|
|
|
// 动态显示操作列按钮 |
|
|
|
buttondata.value = [ |
|
|
|
defaultButtons.mainListEditBtn({ |
|
|
@ -437,28 +445,44 @@ const handleDelete = async (id: number) => { |
|
|
|
} |
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
tableObjectRef.value.params = { |
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: props.apiPage // 分页接口 |
|
|
|
}) |
|
|
|
tableObject.params = { |
|
|
|
isSearch: true, |
|
|
|
filters: searchData.filters |
|
|
|
? searchData.filters |
|
|
|
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] |
|
|
|
} |
|
|
|
getList() // 刷新当前列表 |
|
|
|
detailAllSchemasRef.value = props.detailAllSchemas |
|
|
|
tableObjectRef.value = tableObject |
|
|
|
tableMethodsRef.value = tableMethods |
|
|
|
tableObjectRef.value.tableList = [] |
|
|
|
const { getList } = tableMethods |
|
|
|
getList() |
|
|
|
// tableObjectRef.value.params = { |
|
|
|
// isSearch: true, |
|
|
|
// filters: searchData.filters |
|
|
|
// ? searchData.filters |
|
|
|
// : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] |
|
|
|
// } |
|
|
|
// getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
|
|
|
|
//监视属性 |
|
|
|
watch( |
|
|
|
() => props.apiPage, |
|
|
|
() =>props.apiPage, |
|
|
|
() => { |
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: props.apiPage // 分页接口 |
|
|
|
}) |
|
|
|
tableObject.params.masterId = masterParmas.value.masterId |
|
|
|
detailAllSchemasRef.value = props.detailAllSchemas |
|
|
|
tableObjectRef.value = tableObject |
|
|
|
tableMethodsRef.value = tableMethods |
|
|
|
const { getList } = tableMethods |
|
|
|
getList() |
|
|
|
} |
|
|
|
}, |
|
|
|
) |
|
|
|
</script> |
|
|
|
<style lang="scss"> |
|
|
|