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/composition/CarGridNav.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/composition/CarGridNav.vue b/src/views/tigerprojects/system/lowcode/composition/CarGridNav.vue index de55c76..7183571 100644 --- a/src/views/tigerprojects/system/lowcode/composition/CarGridNav.vue +++ b/src/views/tigerprojects/system/lowcode/composition/CarGridNav.vue @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-20 12:13:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-07-03 20:31:07 + * @LastEditTime: 2024-10-06 16:55:15 --> <template> <Card :title="GetTitle(props.configType)['navTitle']"> @@ -12,15 +12,29 @@ v-for="item in GetNavItems(props.configType)" :key="item.title" @click=" - navChangeItem(item.action, useModalData[item.action][1].openModal, openRvModal, selectedNodes) + navChangeItem( + item.action, + !item.isCustEl ? useModalData[item.action][1].openModal : null, + openRvModal, + selectedNodes, + keyCode, + ) " > - <span class="flex flex-col items-center"> + <Form class="properties-body" label-align="left" layout="vertical" v-if="item.isCustEl"> + <FormItem label="鏄惁榛樿" name="鏄惁榛樿"> + <Switch + v-model:checked="isDefault[selectedNodes[0]['code']]" + @change="(e) => switchChange(e, selectedNodes[0])" + /> + </FormItem> + </Form> + <span v-if="!item.isCustEl" class="flex flex-col items-center"> <Icon :icon="item.icon" :color="item.color" size="20" /> <span class="text-md mt-2 truncate">{{ item.title }}</span> </span> <GeneralModal - v-if="!item.isStep" + v-if="!item.isStep && !item.isCustEl" @register="useModalData[item.action][0]" @success="(d, u) => handleSuccess(d, u, item.action, objParams, refreshPage)" ></GeneralModal> @@ -44,7 +58,7 @@ <RouteViewModal @register="registerRv" @success="RvItemSuccess" /> </template> <script lang="ts" setup> - import { Card, CardGrid } from 'ant-design-vue'; + import { Card, CardGrid, Switch, Form, FormItem } from 'ant-design-vue'; import Icon from '@/components/Icon/Icon.vue'; import GeneralModal from '/@/views/components/GeneralModal.vue'; import RouteViewModal from '/@/views/components/RouteViewModal.vue'; @@ -54,6 +68,7 @@ import { useTabs } from '/@/hooks/web/useTabs'; import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel'; import { useModal } from '/@/components/Modal'; + import { CustModalParams } from '/@/api/tigerapi/model/systemModel'; const ACard = Card; const objParams = inject('objParams') as Ref<any>; @@ -62,6 +77,9 @@ configType: { type: String }, nodes: { type: Array as PropType<any[]> }, }); + const keyCode = ref(objParams.value['CODE']); + const isDefault = ref({}); + isDefault[selectedNodes.value[0]['code']] = false; const custImport = ref<any[]>([]); const EntityCustFunction = ref([ { @@ -72,7 +90,7 @@ GetBaseCards(type: string | undefined) {}, GetSelectSuccess(d, u, ...args) {}, GenerateHtml(ype: string | null) {}, - CustFunc(type: string | undefined, ...args) {}, + CustFunc(param: CustModalParams) {}, } as EntityCustFunctionType, ]); /* 鍔ㄦ�乮mport瀹炰綋鍚�.ts鐨勮嚜瀹氫箟鏂规硶 */ @@ -143,4 +161,24 @@ } function RvItemSuccess(d, u) {} + + /** + * @description: + * @param {*} d + * @return {*} + */ + function switchChange(e, d) { + CustFunc({ + ctype: 'isDefault', + others: { ...d, ...{ isDefault: e } }, + keyCode: keyCode.value, + }).then((res) => { + console.log(res,isDefault); + if(res.IsSuccessed){ + if(e){ + + } + } + }); + } </script> -- Gitblit v1.9.3