From 078f603f7686c274067028bd23032625e6eee3ce Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期三, 12 六月 2024 14:54:48 +0800 Subject: [PATCH] 工厂登录 --- src/views/tigerprojects/mes/eng/route/index.vue | 41 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 40 insertions(+), 1 deletions(-) diff --git a/src/views/tigerprojects/mes/eng/route/index.vue b/src/views/tigerprojects/mes/eng/route/index.vue index e89e596..27d22f0 100644 --- a/src/views/tigerprojects/mes/eng/route/index.vue +++ b/src/views/tigerprojects/mes/eng/route/index.vue @@ -20,7 +20,13 @@ style="background: #fafafa; border-left: 1px solid #d9d9d9; padding: 10px" :zeroWidthTriggerStyle="{ 'margin-top': '-70px', 'background-color': 'gray' }" > - <PropsPanel ref="propsPanel" :activeKey="routeConfig.activeKey"> + <PropsPanel ref="propsPanel" + :activeKey="routeConfig.activeKey" + :IsOperation="IsOperation" + :title="title" + :colSlots="colSlots" + :crudColSlots="crudColSlots" + :entityName="entityName"> <!-- <template v-for="item of formConfig.schemas" #[`${item.component}Props`]="data"> <slot :name="`${item.component}Props`" @@ -63,6 +69,7 @@ import { useRoute } from 'vue-router'; import { useTabs } from '/@/hooks/web/useTabs'; import LogicFlow from '@logicflow/core'; +import { getEntity } from '/@/api/tigerapi/system'; const [registerDrawer, { openDrawer }] = useDrawer(); const [registerModal, { openModal }] = useModal(); @@ -92,9 +99,14 @@ provide<Ref<MES_ROUTE>>('mesRoute', currRoute); const selectnode = ref({} as node); const currRotId = ref(route.params?.id); + const colSlots = ref<any>([]); + const crudColSlots = ref<any>([]); + const entityName = ref<any>('MES_POSITION'); const props = defineProps({ rotId: { type: String, default: '' }, }); + const IsOperation = ref(false); + const title = ref('琛屼负'); watch( () => props.rotId, (v) => { @@ -112,8 +124,31 @@ }, { deep: true }, ); + const currlf = ref(null) as Ref<LogicFlow | null>; console.log(currRotId.value); + + onMounted(() => { + getEntity({ + sqlcmd: `ASSEMBLY_NAME ='MES_POSITION'`, + entityName: 'SYS_LOW_CODE', + }).then((data) => { + var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON); + for (const i in searchForms) { + if(!isNullOrUnDef(searchForms[i]['colSlot'])){ + colSlots.value.push('form-'+searchForms[i]['colSlot']); + } + } + + var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON); + for (const i in _cruds) { + if(!isNullOrUnDef(_cruds[i]['colSlot'])){ + crudColSlots.value.push(_cruds[i]['colSlot']); + } + } + entityName.value = 'MES_POSITION'; + }); + }); async function init(lf) { currlf.value = unref(lf); //閫氳繃宸ヨ壓璺嚎ID鑾峰彇鍥惧舰鏁版嵁锛屽苟娓叉煋 @@ -431,6 +466,8 @@ if (selectnode.value.properties.operType && selectnode.value.properties.operType == 'Action') { var _act = routeConfig.routeData.acts.filter((x) => x.ID == selectnode.value.id)[0]; routeConfig.activeKey = 3; + IsOperation.value = false; + title.value = '琛屼负'; routeConfig.currentAct = { ID: selectnode.value.id, CREATE_TIME: currRoute.value.CREATE_TIME, @@ -495,6 +532,8 @@ console.log(routeConfig.currentItem); routeConfig.activeKey = 2; + IsOperation.value = true; + title.value = '宀椾綅'; } } -- Gitblit v1.9.3