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