From cdc825404ef1fce88b9e871eda0012838119d662 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 26 Jul 2024 15:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sysworkflow/lowcodepage/index.vue | 109 ++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/src/views/sysworkflow/lowcodepage/index.vue b/src/views/sysworkflow/lowcodepage/index.vue index 1b9f21e..215491e 100644 --- a/src/views/sysworkflow/lowcodepage/index.vue +++ b/src/views/sysworkflow/lowcodepage/index.vue @@ -12,6 +12,9 @@ import { Search } from '@element-plus/icons-vue' //引入页面 import AppCardPage from "@/views/sysworkflow/lowcodepage/appCardPage.vue" import AppListPage from "@/views/sysworkflow/lowcodepage/appListPage.vue" +import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue" +import LowCodeFormGroupPage from "@/views/sysworkflow/lowcodepage/lowCodeFormGroupPage.vue" +import DesignAPPpage from "@/views/sysworkflow/lowcodepage/appPage/index.vue" //自建应用 const contbody = ref() //实例化内容容器 @@ -23,6 +26,13 @@ const pageSize = ref(12000) //每页显示几个 const pageTotal = ref(0) //总记录数 const groupFormList = ref([]) //记录数组 const drawerWith = ref(); //抽屉宽度 +const appPageShow = ref(false) +const addFormGroupIsShow = ref(false) +const formKey = ref("") //表单标识 +const formGroupKey = ref("") //表单标识 +const drawerGroupWith = ref(); //编辑表单时抽屉宽度 +const groupKey = ref("") //分组标识 +const squareUrl = ref('https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png') const searchQuery = reactive({ page:1, @@ -118,6 +128,101 @@ const searchSub = () =>{ const getRongQiAttr = () => { drawerWith.value = contbody.value?.clientWidth } + +/** +@ 作者: 秦东 +@ 时间: 2024-03-09 09:06:32 +@ 功能: 选择添加项目 +*/ +const handleCommand = (command: string,groupId: string) => { + // ElMessage(`click on item ${command}`) + if (command == "addForm"){ + formKey.value = "" + formGroupKey.value = groupId + // addFormIsShow.value = true + drawerWith.value = contbody.value?.clientWidth + addFormIsShow.value = true; + }else if(command == "addFormApp"){ + + drawerWith.value = contbody.value?.clientWidth + let sendInfo = { + id:groupId.toString() + } + createApp(sendInfo) + .then((data)=>{ + formKey.value = data.data.uuid + groupKey.value = groupId.toString() + nextTick(() =>{ + appPageShow.value = true + }); + }) + .finally(() => { + + }) + + }else{ + addFormGroupIsShow.value = true + drawerGroupWith.value = 400 + } +} +/** +@ 作者: 秦东 +@ 时间: 2024-03-21 13:53:29 +@ 功能: 编辑分组 +*/ +const editFormGroup = (id: string) =>{ + groupKey.value = id + addFormGroupIsShow.value = true + drawerGroupWith.value = 400 +} +/** +@ 作者: 秦东 +@ 时间: 2024-03-09 09:06:44 +@ 功能: 刷新页面 +*/ +const refreshPage = (pageType:string) =>{ + if(pageType == "formPage"){ + addFormIsShow.value = false; + }else{ + addFormGroupIsShow.value = false; + } + gainFormGroup() +} + +/** +@ 作者: 秦东 +@ 时间: 2024-03-21 14:22:58 +@ 功能: 改变分组状态 +*/ +const eidtGroupStatus = (id: string, state: number) => { + + ElMessageBox.confirm( + '您确定要删除此分组吗?一经删除!数据将不可恢复!请慎重执行此操作!!!', + '温馨提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + } + ) + .then(() => { + let sendInfo = { + id: id.toString(), + status: state + } + editFormGroupState(sendInfo) + .then((data) =>{ + ElMessageBox.alert(data.msg, '温馨提示!', { + confirmButtonText: '确定', + callback: (action: Action) => { + gainFormGroup() + } + }); + }) + }) + + +}