From b6163e1bed94b4d02d1b6f01fdc2eb3f15ca22e3 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期一, 07 十月 2024 15:47:46 +0800 Subject: [PATCH] 保存默认工艺路线,工单批次优化 --- src/views/tigerprojects/system/lowcode/normal/mainTable.vue | 35 +++++++++++++++++++++-------------- 1 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/normal/mainTable.vue b/src/views/tigerprojects/system/lowcode/normal/mainTable.vue index 0828e5b..7ccec2c 100644 --- a/src/views/tigerprojects/system/lowcode/normal/mainTable.vue +++ b/src/views/tigerprojects/system/lowcode/normal/mainTable.vue @@ -2,6 +2,7 @@ <div> <BasicTable @register="registerTable"> <template #toolbar> + <!-- 鏍规嵁鑿滃崟璁剧疆鐨勬寜閽紝鑷姩鐢熸垚 --> <a-button type="primary" v-for="item in buttons.filter((m) => m['BUTTON_TYPE'] == 0)" @@ -111,6 +112,7 @@ const [registerDrawer, { openDrawer }] = useDrawer(); const [registerRv, { openModal: openRvModal, closeModal: RvcloseModal }] = useModal(); const [registerCust, { openModal: openCustModal }] = useModal(); + const [registerCrud, { openModal: openCrudModal }] = useModal(); const cType = ref(''); const formSchemas = ref({}); //寮瑰嚭妗嗗琛ㄥ崟缁撴瀯 const routeData = ref({ @@ -264,10 +266,12 @@ ifSave: true, }; + /* 鏍规嵁鑿滃崟璁剧疆鐨勬寜閽嚜鍔ㄧ敓鎴愭搷浣滃垪涓殑鎸夐挳 */ const actionItem = GenerateActionButton(params, buttons, openDrawer, reload); if (isNullOrUnDef(custImport.value['default'])) { return actionItem; } + /* 鏍规嵁鍔ㄦ�佸姞杞界殑瀹炰綋绫诲悕.ts涓殑ActionItem鏂规硶锛屾覆鏌撴搷浣滃垪涓殑鎸夐挳鏂规硶 */ return nActionItem( params, actionItem, @@ -279,6 +283,7 @@ go, setProps, openCustModal, + openCrudModal, ); } @@ -301,19 +306,21 @@ */ function handleCreate(fnName: string) { if (isNullOrUnDef(custImport.value['default'])) { + /* 濡傛灉鍔ㄦ�佸姞杞界殑瀹炰綋绫�.ts涓嶅瓨鍦紝鍒欑洿鎺ユ墦寮�渚ц竟妗� */ openDrawer(true, { - isUpdate: false, - entityName: entityName.value, - formJson: _crudFormSchema.value, - crudColSlots: objParams.value['crudColSlots'], - isExistSql: isExistSql.value, - ifSave: true, + isUpdate: false, //鏄柊澧炶繕鏄紪杈戯紝false-鏂板|true-缂栬緫 + entityName: entityName.value, //瀹炰綋绫诲悕 + formJson: _crudFormSchema.value, //鏂板缂栬緫鐨勮〃鍗曠粨鏋� + crudColSlots: objParams.value['crudColSlots'], //鏂板缂栬緫鐨勮〃鍗曚腑鐨勬彃妲藉垪琛� + isExistSql: isExistSql.value, //鏄惁瀛樺湪妫�鏌ql锛屾瘮濡�: XXX_CODE = '12345' + ifSave: true, //鏄惁鎻愪氦琛ㄥ崟鏃朵繚瀛樺埌鏁版嵁搴擄紝鍚�-鏆傚瓨|鏄�-淇濆瓨 }); } else { + /* 濡傛灉鍔ㄦ�佸姞杞界殑瀹炰綋绫�.ts瀛樺湪锛屾牴鎹�.ts鏂囦欢涓殑鏂规硶鏉ユ墽琛屾搷浣� */ const [{ CreateAction }] = custImport.value['default'](); const result = CreateAction(entityName.value, colSlots.value); switch (result.action) { - case 'go': + case 'go' /* 璺宠浆椤甸潰 */: // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage sessionStorage.setItem( `${result.params.Name}_params`, @@ -323,14 +330,14 @@ `/${result.url}/${encodeURI(JSON.stringify({ sName: result.params.Name, Name: result.params.Name }))}`, ); break; - case 'drawer': + case 'drawer' /* 鎵撳紑渚ц竟妗� */: openDrawer(true, { - isUpdate: false, - entityName: entityName.value, - formJson: _crudFormSchema.value, - crudColSlots: objParams.value['crudColSlots'], - isExistSql: isExistSql.value, - ifSave: true, + isUpdate: false, //鏄柊澧炶繕鏄紪杈戯紝false-鏂板|true-缂栬緫 + entityName: entityName.value, //瀹炰綋绫诲悕 + formJson: _crudFormSchema.value, //鏂板缂栬緫鐨勮〃鍗曠粨鏋� + crudColSlots: objParams.value['crudColSlots'], //鏂板缂栬緫鐨勮〃鍗曚腑鐨勬彃妲藉垪琛� + isExistSql: isExistSql.value, //鏄惁瀛樺湪妫�鏌ql锛屾瘮濡�: XXX_CODE = '12345' + ifSave: true, //鏄惁鎻愪氦琛ㄥ崟鏃朵繚瀛樺埌鏁版嵁搴擄紝鍚�-鏆傚瓨|鏄�-淇濆瓨 }); break; } -- Gitblit v1.9.3