From 5a4d79d9765dfca8812638b57d5f5fe21f7a06ee Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 16 七月 2024 17:05:25 +0800 Subject: [PATCH] 工单下发更新 --- src/views/tigerprojects/system/lowcode/normal/index.vue | 64 +++++++++++++++++-------------- 1 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/normal/index.vue b/src/views/tigerprojects/system/lowcode/normal/index.vue index 46b91f0..83b1aeb 100644 --- a/src/views/tigerprojects/system/lowcode/normal/index.vue +++ b/src/views/tigerprojects/system/lowcode/normal/index.vue @@ -4,39 +4,42 @@ * @version: * @Date: 2024-05-30 13:28:20 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-24 18:49:29 + * @LastEditTime: 2024-07-16 16:24:23 --> <template> <div> <Suspense> <mainTable /> </Suspense> - <CustModal - @register="registerCust" - @success="custSuccess" - :type="cType" - :detailSlots="dtlSlots" - > - <!-- 鐢ㄦ彃妲借嚜瀹氫箟澶氳〃鍗� --> - <template #[item.name] v-for="item in dtlSlots" :key="item.name"> - <BasicForm @register="useFormData[item.name][0]" v-if="useFormData[item.name]"> - <!-- 鐢ㄦ彃妲借嚜瀹氫箟寮瑰嚭閫夋嫨妗� --> - <template #[name]="{ field }" v-for="name in item.slots" :key="name"> - <a-button - class="mt-1 ml-1" - size="small" - @click="handleCustClick(field)" - :preIcon="item.preIcons[name]" - /> - <GeneralModal - @register="useModalData[name][0]" - @success="(d, u) => handleEntSuccess(d, u, item.name)" - /> - </template> - </BasicForm> - <!-- 鑷畾涔夊唴瀹� --> - </template> - </CustModal> + <Suspense> + <CustModal + @register="registerCust" + @success="custSuccess" + :type="cType" + :detailSlots="dtlSlots" + :entityName="entityName" + > + <!-- 鐢ㄦ彃妲借嚜瀹氫箟澶氳〃鍗� --> + <template #[item.name] v-for="item in dtlSlots" :key="item.name"> + <BasicForm @register="useFormData[item.name][0]" v-if="useFormData[item.name]"> + <!-- 鐢ㄦ彃妲借嚜瀹氫箟寮瑰嚭閫夋嫨妗� --> + <template #[name]="{ field }" v-for="name in item.slots" :key="name"> + <a-button + class="mt-1 ml-1" + size="small" + @click="handleCustClick(field)" + :preIcon="item.preIcons[name]" + /> + <GeneralModal + @register="useModalData[name][0]" + @success="(d, u) => handleEntSuccess(d, u, item.name)" + /> + </template> + </BasicForm> + <!-- 鑷畾涔夊唴瀹� --> + </template> + </CustModal> + </Suspense> </div> </template> <script lang="ts" setup> @@ -63,6 +66,7 @@ const { currentRoute } = useRouter(); const go = useGo(); const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); + const entityName = ref(objParams.value.ID); const _columns = ref([]); const _searchFormSchema = ref([]); const _crudFormSchema = ref([]); @@ -75,13 +79,13 @@ const custImport = ref<any>(null); const isMounted = ref(false); const buttons = ref([]); - const others = ref<any>(null); + const keyFieldValues = ref<any>(null); provide<Ref<any>>('objParams', objParams.value); provide<Ref<any[]>>('_columns', _columns); provide<Ref<any[]>>('_searchFormSchema', _searchFormSchema); provide<Ref<any[]>>('_crudFormSchema', _crudFormSchema); provide<Ref<string>>('isExistSql', isExistSql); - provide<Ref<any>>('others', others); + provide<Ref<any>>('keyFieldValues', keyFieldValues); const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); @@ -118,6 +122,7 @@ const data = await getEntity({ sqlcmd: "ASSEMBLY_NAME ='" + objParams.value.ID + "'", entityName: 'SYS_LOW_CODE', + order: '', }); var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON); for (const i in searchForms) { @@ -166,6 +171,7 @@ _cruds[i].componentProps.api = uploadApi; _cruds[i].componentProps.multiple = false; _cruds[i].componentProps.maxNumber = 1; + _cruds[i].componentProps.uploadParams = { entityName: objParams.value.ID }; _cruds[i].rules = [{ required: true, message: '璇烽�夋嫨涓婁紶鏂囦欢' }]; } if (_cruds[i].isexist == 'Y') { -- Gitblit v1.9.3