From 3bf08732bd9fbe8b05d66432d14f332f7f1ddb24 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Tue, 28 May 2024 10:52:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E4=BB=A3=E7=A0=81=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/DetailLedger.vue | 144 ++++++++++++---- src/utils/dict.ts | 7 +- src/views/eam/equipmentAccounts/index.vue | 72 +++++++- .../equipmentInspectionRecordDetail.data.ts | 98 ++--------- .../equipmentInspectionRecordMain.data.ts | 120 +++----------- .../equipmentMaintenanceRecordDetail.data.ts | 96 ++--------- .../equipmentMaintenanceRecordMain.data.ts | 122 +++----------- .../equipmentRepairRecordDetail.data.ts | 86 +--------- .../equipmentRepairRecordMain.data.ts | 156 +++++------------- .../equipmentReportRepairRequest.data.ts | 114 +++---------- .../equipmentSpotCheckRecordMain.data.ts | 126 +++----------- 11 files changed, 361 insertions(+), 780 deletions(-) diff --git a/src/components/Detail/src/DetailLedger.vue b/src/components/Detail/src/DetailLedger.vue index 5633f4bdb..887778ba4 100644 --- a/src/components/Detail/src/DetailLedger.vue +++ b/src/components/Detail/src/DetailLedger.vue @@ -55,12 +55,6 @@ v-model:currentPage="tableObjectRef.currentPage" v-model:sort="tableObjectRef.sort" > - - + + + + + + + + + + + + + + +
+ +
+ + + @@ -144,25 +187,7 @@ - + @@ -390,6 +415,21 @@ const props = defineProps({ required: false, default: '' }, + operationRecordList: { + type: Array, + required: false, + default: () => [] + }, + dialogApiPage: { + type: Function, + required: false, + default: null + }, + dialogAllSchemas: { + type: Object, + required: false, + default: null + }, // 附件 备注 变更记录 别名 }) const isShowDrawer = ref(false) @@ -400,6 +440,8 @@ const fileParmas = ref({ funcCode: props.funcCode, fileBusiType: '' }) +const operationRecordType = ref() +const operationRecordList = ref(props.operationRecordList) if (props.isBasic == true) { if (tabsList.value && tabsList.value.length > 0) { tabsList.value.unshift({ @@ -585,6 +627,10 @@ const change = (item, index) => { } if(item.prop == 'ExpandProps'){ getExtendedPropsList() + }else if(item.prop == 'OperationRecord'){ + if(props.operationRecordList){ + operationRecordType.value = props.operationRecordList[0]?.value + } } } @@ -738,7 +784,6 @@ const detailAllSchemasRef = ref() const { tableObject, tableMethods } = useTable({ getListApi: props.apiPage // 分页接口 }) - tableObjectRef.value = tableObject tableMethodsRef.value = tableMethods detailAllSchemasRef.value = props.detailAllSchemas @@ -919,7 +964,8 @@ const emit = defineEmits([ 'onBlur', 'detailBasicFormOnChange', 'formFormDateChange', - 'buttonBaseClick' + 'buttonBaseClick', + 'handleOperationTabsChange' ]) /** 删除按钮操作 */ const handleDelete = async (id: number) => { @@ -1061,6 +1107,47 @@ const getExtendedPropsList = async () => { }); } +const handleOperationTabsChange = async (val) => { + emit("handleOperationTabsChange",val) +} + + +const dialogVisible = ref(false) +const dialogTitle = ref() +const dialogAllSchemasRef = ref() +const dialogTableObjectRef = ref() +const dialogTableMethodsRef = ref() +const dialogUploadTitle = ref('文件上传') +const dialogUploadVisible = ref(false) +const dialogUploadNumber = ref() +const dialogUploadBusiCode = ref() +const dialogFormKey = ref(0) +const openDialog = async(row: any, titleName: any, titleValue: any) => { + const { tableObject, tableMethods } = useTable({ + getListApi: props.dialogApiPage, // 分页接口 + defaultParams: getDialogParams(row) + }) + dialogVisible.value = true + dialogTitle.value = getDialogName() + dialogAllSchemasRef.value = props.dialogAllSchemas + dialogTableObjectRef.value = tableObject + dialogTableMethodsRef.value = tableMethods + dialogTableObjectRef.value.tableList = [] + const { getList } = tableMethods + await getList() + updateKey.value += 1 +} + +function getDialogParams(row: any) { + return { + number: row.number + } +} + +function getDialogName(){ + // return operationRecordList.value.find(element=>element.value == operationRecordType)?.value +} + //监视属性 watch( @@ -1082,6 +1169,7 @@ watch( getList() } ) +