Browse Source

自建应用菜单添加

v8_master
超级管理员 2 years ago
parent
commit
041c4cb4a2
  1. 32
      src/api/DesignForm/requestapi.ts
  2. 16
      src/api/date/type.ts
  3. 1
      src/assets/icons/ziJianApp.svg
  4. 65
      src/components/IconSelect/appMenuSvgPage.vue
  5. 4
      src/types/components.d.ts
  6. 38
      src/views/sysworkflow/lowcodepage/appFormList.vue
  7. 165
      src/views/sysworkflow/lowcodepage/appPage/appMenuGroup.vue
  8. 51
      src/views/sysworkflow/lowcodepage/appPage/appMenus.vue
  9. 94
      src/views/sysworkflow/lowcodepage/appPage/index.vue
  10. 20
      src/views/sysworkflow/lowcodepage/index.vue

32
src/api/DesignForm/requestapi.ts

@ -343,3 +343,35 @@ export function gainFormPageListCont(data: any) {
data: data
});
}
//创建APP
export function createApp(data: any) {
return request({
url: '/systemapi/app/createApp',
method: 'post',
data: data
});
}
//获取应用编辑页面信息
export function gainAppEditPsge(data: any) {
return request({
url: '/systemapi/app/gainAppEditPsge',
method: 'post',
data: data
});
}
//获取除固定菜单以外的数据
export function ginOthenMenuTree(data: any) {
return request({
url: '/systemapi/app/ginOthenMenuTree',
method: 'post',
data: data
});
}
//新增菜单
export function saveAppMenu(data: any) {
return request({
url: '/systemapi/app/saveAppMenu',
method: 'post',
data: data
});
}

16
src/api/date/type.ts

@ -78,9 +78,25 @@ export interface appMenuTreeInfo {
svg?:string; //图标
pcIsShow:number; //pc端显示与隐藏
wapIsShow:number; //移动端显示与隐藏
parent:string; // 父级
appkey:string; //app唯一识别符
isLock:number;
sort:number; //排序
children?:appMenuTreeInfo[]; //子级
}
/**
@ 作者: 秦东
@ 时间: 2024-04-23 16:03:48
@ 功能: appCont
*/
export interface appSetInfo {
appKey:string;
appName:string;
appSvg:string;
state:number;
uuid:string;
}
/**
@ 作者: 秦东
@ 时间: 2024-04-22 08:31:22

1
src/assets/icons/ziJianApp.svg

@ -0,0 +1 @@
<svg t="1713840731502" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11177" width="200" height="200"><path d="M1023.401462 126.021423v227.811239a125.680133 125.680133 0 0 1-125.59481 125.59481h-227.811239a125.680133 125.680133 0 0 1-125.59481-125.637471V126.021423A125.680133 125.680133 0 0 1 669.995413 0.426613h227.811239a125.680133 125.680133 0 0 1 125.59481 125.59481z m-543.931328 539.665201v227.811239a125.680133 125.680133 0 0 1-125.594811 125.552149h-227.811239a125.680133 125.680133 0 0 1-125.552149-125.594811v-227.811239a125.680133 125.680133 0 0 1 125.594811-125.552149h227.768577a125.680133 125.680133 0 0 1 125.594811 125.594811z m0-539.665201v227.811239a125.680133 125.680133 0 0 1-125.594811 125.59481h-227.811239A125.680133 125.680133 0 0 1 0.554597 353.790001V126.021423A126.021423 126.021423 0 0 1 126.106746 0.426613h227.768577a125.680133 125.680133 0 0 1 125.594811 125.59481z m225.336884 822.210863a29.222977 29.222977 0 0 0-34.171686 5.204676l-22.439833 23.122414c0 0.68258-1.066532 0.68258-1.706452 0.682581-1.066532 0-1.407822-0.34129-1.749112-0.682581l-42.490636-42.447974c-0.68258 0-0.68258-1.066532-0.68258-1.749113 0-1.023871 0.34129-1.365161 0.68258-1.706451l22.781124-22.823785a31.057412 31.057412 0 0 0 5.204676-34.171686l-2.772983-5.887257a189.842699 189.842699 0 0 1-8.276288-20.00814l-2.090403-6.228547a29.436284 29.436284 0 0 0-27.9858-20.050802h-2.389032a31.825315 31.825315 0 0 1-32.123944-32.081283c0-17.917738 14.163545-32.123944 32.123944-32.123945h2.389032a29.862896 29.862896 0 0 0 27.9858-20.050802l2.090403-6.185885c3.071612-6.911127 5.545966-14.163545 8.276288-20.050802l2.772983-5.844596a29.222977 29.222977 0 0 0-5.204676-34.171685l-22.781124-22.781124c-0.68258 0-0.68258-1.066532-0.68258-1.706452 0-1.066532 0.34129-1.407822 0.68258-1.749112l41.808055-42.490636c0-0.68258 1.023871-0.68258 1.706452-0.68258 1.023871 0 1.365161 0.34129 1.706451 0.68258l22.823785 22.781124c8.958869 7.934998 22.781124 10.366691 34.129025 5.204676l5.887256-2.772983a189.842699 189.842699 0 0 1 20.050802-8.276288l6.228547-2.090403a29.436284 29.436284 0 0 0 20.050802-27.9858v-2.389032c0-17.960399 14.120884-32.123944 32.081283-32.123944 17.917738 0 32.123944 14.163545 32.123945 32.123944v2.047742a29.862896 29.862896 0 0 0 20.34943 27.9858l6.228547 2.090403c6.911127 3.071612 13.822255 5.503305 20.050802 8.276288l5.844596 2.772983c11.390562 6.185886 25.554107 3.412902 34.171686-5.204676l22.781124-22.781124c0-0.68258 1.066532-0.68258 1.706451-0.68258 1.066532 0 1.407822 0.34129 1.749112 0.68258l42.490636 42.447974c0.68258 0 0.68258 1.066532 0.68258 1.749113 0 1.023871-0.34129 1.365161-0.68258 1.706451l-22.781124 22.823785a32.379912 32.379912 0 0 0-5.204676 34.171686l2.772983 5.887257c3.114273 6.527176 6.228547 13.779594 8.276288 20.00814l2.090403 6.228547a29.436284 29.436284 0 0 0 27.9858 20.050802h2.389032c17.960399 0 32.123944 14.120884 32.123944 32.081283 0 17.917738-14.163545 32.123944-32.123944 32.123945h-2.389032a29.862896 29.862896 0 0 0-27.9858 20.050802l-2.090403 6.185885c-3.071612 6.911127-5.545966 13.822255-8.276288 20.050802l-2.772983 5.844596a29.222977 29.222977 0 0 0 5.204676 34.171686l22.781124 22.781124c0.68258 0 0.68258 0.725242 0.68258 1.706451 0 1.066532-0.34129 1.407822-0.68258 1.749112l-42.490636 42.490636c0 0.34129-1.023871 0.68258-1.706451 0.68258-1.023871 0-1.365161-0.34129-1.706451-0.68258l-22.823785-22.781124a32.379912 32.379912 0 0 0-34.171686-5.204676l-5.887257 2.772983a189.842699 189.842699 0 0 1-20.050802 8.276288l-6.185886 2.090403a29.436284 29.436284 0 0 0-20.050801 27.9858v2.389032c0 17.960399-14.120884 32.123944-32.081284 32.123944a31.825315 31.825315 0 0 1-32.123944-32.123944v-2.389032a29.862896 29.862896 0 0 0-20.050802-27.9858l-6.185886-2.090403c-6.911127-3.071612-13.822255-5.545966-20.050801-8.276288l-5.844596-2.772983zM789.233693 718.415967c-34.768944 0-63.991921 28.839026-63.991921 63.991921s28.839026 63.991921 63.991921 63.991921 63.991921-28.839026 63.991921-63.991921c-0.810564-35.152895-28.455074-63.991921-63.991921-63.991921z" fill="currentColor" p-id="11178"></path></svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

65
src/components/IconSelect/appMenuSvgPage.vue

@ -53,8 +53,8 @@ const handleClose = () => {
@ 时间: 2024-04-22 16:54:03
@ 功能: 确定
*/
const sendClick = () => {
emits("update:svgName","liuChengBiaoDan")
const handleSelect = (svgName:string) => {
emits("update:svgName",svgName)
handleClose()
}
</script>
@ -65,18 +65,61 @@ const sendClick = () => {
width="500"
:before-close="handleClose"
>
<span>{{filterIconNames}}</span>
<el-input
v-model="filterValue"
class="p-2"
placeholder="搜索图标"
clearable
@input="handleFilter"
/>
<el-divider border-style="dashed" style="margin:0px;" />
<el-scrollbar height="250px">
<ul class="icon_list">
<li
v-for="(iconName, index) in filterIconNames"
:key="index"
class="icon-item"
@click="handleSelect(iconName)"
>
<el-tooltip :content="iconName" placement="bottom" effect="light">
<svg-icon color="var(--el-text-color-regular)" :icon-class="iconName" />
</el-tooltip>
</li>
</ul>
</el-scrollbar>
<template #footer>
<div class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="sendClick">
确定
</el-button>
</div>
</template>
</el-dialog>
</template>
<style lang='scss' scoped>
.icon_list {
display: flex;
flex-wrap: wrap;
padding-left: 0px;
margin-top: 10px;
.icon-item {
display: flex;
flex-direction: column;
align-items: center;
justify-items: center;
width: 10%;
padding: 5px;
margin: 0 5px 5px 0;
cursor: pointer;
border: 1px solid #ccc;
padding: 5px 10px;
&:hover {
color: var(--el-color-primary);
border-color: var(--el-color-primary);
transition: all 0.2s;
transform: scaleX(1.1);
}
}
}
.svgBox{
:deep(.el-popper){
padding:0px;
}
}
</style>

4
src/types/components.d.ts

@ -60,8 +60,6 @@ declare module '@vue/runtime-core' {
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
ElMenuMenu: typeof import('element-plus/es')['ElMenuMenu']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
@ -112,10 +110,8 @@ declare module '@vue/runtime-core' {
Hamburger: typeof import('./../components/Hamburger/index.vue')['default']
HeadTools: typeof import('./../components/DesignForm/public/headTools.vue')['default']
HeadToolsNew: typeof import('./../components/DesignForm/public/headToolsNew.vue')['default']
Icon: typeof import('./../components/IconSelect/icon.vue')['default']
IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
IEpClose: typeof import('~icons/ep/close')['default']
IEpDelete: typeof import('~icons/ep/delete')['default']
IEpEdit: typeof import('~icons/ep/edit')['default']

38
src/views/sysworkflow/lowcodepage/appFormList.vue

@ -12,6 +12,7 @@ import { json2string,objToStringify,string2json,stringToObj } from '@/utils/Desi
import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue"
import TaskCustomerForm from '@/views/taskplatform/taskmanagement/taskcustomerformnew.vue'
import TableFlow from '@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue'
import DesignAPPpage from "@/views/sysworkflow/lowcodepage/appPage/index.vue" //
const props = defineProps({
groupId:{
@ -132,6 +133,17 @@ const refreshPage = (pageType:string) =>{
onMounted(()=>{
getFormAppList()
})
/**
@ 作者: 秦东
@ 时间: 2024-04-24 08:21:32
@ 功能: 关闭应用刷新页面
*/
const closeAppPage = () =>{
console.log("关闭应用刷新页面")
getFormAppList()
}
/**
@ 作者: 秦东
@ 时间: 2024-04-01 14:32:18
@ -201,6 +213,18 @@ const state = reactive({
dict: {},
refreshTable: true
})
const appPageShow = ref(false)
const appKey = ref<string>("")
/**
@ 作者: 秦东
@ 时间: 2024-04-23 15:30:17
@ 功能: 编辑app内容
*/
const editAppCont = (val:string) => {
appKey.value = val.toString();
appPageShow.value = true;
}
</script>
<template>
<div>
@ -224,7 +248,18 @@ const state = reactive({
<div class="cardhead">
<el-text class="w-150px mb-2" truncated :title="item.name" @click.top="startUsing(item.versionId,item.name)">{{item.name}}</el-text>
</div>
<el-row>
<el-row v-if="item.classify==3">
<el-col :span="8" class="but_centent">
<el-button size="small" circle class="button" :icon="View" @click="lookFormList(item)"></el-button>
</el-col>
<el-col :span="8" class="but_centent">
<el-button size="small" circle class="button" :icon="Edit" @click="editAppCont(item.signCodeStr)"></el-button>
</el-col>
<el-col :span="8" class="but_centent">
<el-button size="small" circle class="button" :icon="Delete" @click="delFormApp(item.idStr)"></el-button>
</el-col>
</el-row>
<el-row v-else>
<el-col :span="8" class="but_centent">
<el-button size="small" circle class="button" :icon="View" @click="lookFormList(item)"></el-button>
</el-col>
@ -246,6 +281,7 @@ const state = reactive({
<LowCodeFormPage v-if="addFormIsShow" :drawer-with="props.drawerWith" v-model:form-key="formId" @refreshPage="refreshPage" />
<DesignAPPpage v-model:is-show="appPageShow" v-model:form-key="appKey" :drawer-with="props.drawerWith" @refreshPage="closeAppPage" />
<el-drawer
v-model="lookPageIsShow"

165
src/views/sysworkflow/lowcodepage/appPage/appMenuGroup.vue

@ -0,0 +1,165 @@
<!--
@ 作者: 秦东
@ 时间: 2024-04-23 16:56:36
@ 备注: 菜单分组
-->
<script lang='ts' setup>
import { appMenuTreeInfo } from "@/api/date/type"
import { ginOthenMenuTree,saveAppMenu } from '@/api/DesignForm/requestapi'
const props = defineProps({
appCont:{
type:Object,
default(){
return {}
}
},
menuParentKey:{
type:String,
default:""
},
isShow:{
type: Boolean,
default: false,
},
menuType:{
type:Number,
default:1
}
});
const emits = defineEmits(["update:isShow","updateMenu"]);
watch(()=>props.isShow,(val:boolean)=>{
if(val){
console.log("props.appCont",props.appCont)
console.log("props.menuParentKey",props.menuParentKey)
getOldMenuTree()
}
})
const loading = ref(false)
const saveMenuGroup = ref(ElForm);
const menuOldTree = ref<appMenuTreeInfo[]>([])
const menuGroupInfo = reactive({
name:"",
group:""
})
const ssd = ref()
/**
@ 作者: 秦东
@ 时间: 2024-04-24 08:50:40
@ 功能: 关闭
*/
const handleClose = () => {
loading.value = false;
emits("updateMenu")
emits("update:isShow",false)
resetForm()
}
/**
@ 作者: 秦东
@ 时间: 2024-04-24 09:09:24
@ 功能: 获取已有菜单树
*/
const getOldMenuTree = () => {
ginOthenMenuTree({id:props.appCont.uuid})
.then((data) =>{
console.log("获取已有菜单树",data)
if(data.code == 0){
menuOldTree.value = data.data
}
});
}
/**
@ 作者: 秦东
@ 时间: 2024-04-24 09:29:59
@ 功能: 表单验证规则
*/
const rules = reactive({
name: [{ required: true, message: "请输入分组名称", trigger: "blur" }],
});
/**
@ 作者: 秦东
@ 时间: 2024-04-24 09:33:56
@ 功能: 重置表单
*/
const resetForm = () => {
saveMenuGroup.value.resetFields();
saveMenuGroup.value.clearValidate();
menuGroupInfo.name = undefined;
menuGroupInfo.group = "";
}
/**
@ 作者: 秦东
@ 时间: 2024-04-24 09:35:12
@ 功能: 写入菜单分组
*/
const saveMenuData = () => {
console.log("写入菜单分组",menuGroupInfo)
loading.value = true;
saveMenuGroup.value.validate((valid: any) => {
if (valid) {
let groupId = menuGroupInfo.group
if(menuGroupInfo.group == "") {
groupId = props.appCont.uuid
}
let sendCont = {
name:menuGroupInfo.name,
appkey:props.appCont.uuid,
type:props.menuType,
group:groupId
}
console.log("写入菜单分组",sendCont)
saveAppMenu(sendCont)
.then((data) =>{
handleClose()
})
.finally(() =>{
loading.value = false;
})
}else{
loading.value = false;
}
})
}
</script>
<template>
<el-dialog
v-model="props.isShow"
title="新建分组"
width="500"
:before-close="handleClose"
>
<el-form
ref="saveMenuGroup"
:model="menuGroupInfo"
:rules="rules"
label-width="120px"
>
<el-form-item label="分组名称" prop="name">
<el-input v-model="menuGroupInfo.name" clearable placeholder="请输入分组名称" />
</el-form-item>
<el-form-item label="选择上级分组">
<el-tree-select
v-model="menuGroupInfo.group"
:data="menuOldTree"
check-strictly
:render-after-expand="false"
show-checkbox
node-key="id"
value-key="id"
check-on-click-node
clearable
/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" v-loading="loading" :disabled="loading" @click="saveMenuData">确定</el-button>
</div>
</template>
</el-dialog>
</template>
<style lang='scss' scoped>
</style>

51
src/views/sysworkflow/lowcodepage/appPage/appMenus.vue

@ -16,6 +16,12 @@ const props = defineProps({
formKey:{
type:String,
default:""
},
menusTree:{
type:Object,
default(){
return {}
}
}
});
const svgIsShow = ref(false)
@ -30,9 +36,13 @@ const handleDrop = (
dropType: NodeDropType,
ev: DragEvents
) => {
console.log('tree drop:', dropNode.label, dropNode.key)
console.log('tree drop-->上级:', dropNode.parent.label, dropNode.parent.key)
console.log('draggingNode:', draggingNode)
console.log('dropNode:', dropNode)
console.log('dropType:', dropType)
console.log('ev:', ev)
}
const treeList = ref<any[]>([])
/**
@ 作者: 秦东
@ 时间: 2024-04-22 15:53:35
@ -45,10 +55,11 @@ const loadIcons = () => {
const iconName = icon.split("assets/icons/")[1].split(".svg")[0];
allIconNames.push(iconName);
}
console.log("icons",icons)
console.log("allIconNames",allIconNames)
// console.log("icons",icons)
// console.log("allIconNames",allIconNames)
}
onMounted(()=>{
treeList.value = threeShiyanData
loadIcons();
})
/**
@ -57,14 +68,44 @@ onMounted(()=>{
@ 功能: 设置表单图标
*/
const svgName = ref("")
const svgId= ref("")
const setAppMenusSvg = (val:any) =>{
svgName.value = val.svg
svgId.value = val.id
svgIsShow.value = true;
}
watch(()=>svgName.value,(val:string)=>{
console.log("监听----svgName--->",val)
console.log("监听----threeShiyanData--->",threeShiyanData)
diguiData(treeList.value)
})
/**
@ 作者: 秦东
@ 时间: 2024-04-23 09:44:14
@ 功能: 递归判断是哪个节点换了图标
*/
const diguiData = (val:any) =>{
if(Array.isArray(val)){
try {
val.forEach((item:any) => {
if(item.id == svgId.value){
item.svg = svgName.value
throw item;
}
if(item.children&&Array.isArray(item.children)){
diguiData(item.children)
}
});
} catch (e) {
console.log('跳出循环:', threeShiyanData);
}
}
}
</script>
<template>
<el-tree
:data="threeShiyanData"
:data="props.menusTree"
draggable
default-expand-all
node-key="id"

94
src/views/sysworkflow/lowcodepage/appPage/index.vue

@ -4,9 +4,13 @@
@ 备注: 设置自建应用
-->
<script lang='ts' setup>
import { appMenuTreeInfo,appSetInfo } from "@/api/date/type"
import { gainAppEditPsge } from '@/api/DesignForm/requestapi'
import { Search } from '@element-plus/icons-vue'
import SvgIcon from "@/components/SvgIcon/index.vue";
import AppMenus from "@/views/sysworkflow/lowcodepage/appPage/appMenus.vue"
import AppMenuGroup from "@/views/sysworkflow/lowcodepage/appPage/appMenuGroup.vue"
const props = defineProps({
drawerWith:{
@ -16,29 +20,98 @@ const props = defineProps({
formKey:{
type:String,
default:""
},
isShow:{
type: Boolean,
default: false,
}
});
const emits = defineEmits(["update:isShow","update:svgName","refreshPage"]);
const squareUrl = 'https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png'
const drawerOpenOrClose = ref(true)
const drawerOpenOrClose = ref(false)
const tabsActive = ref("1")
const menusTree = ref<appMenuTreeInfo[]>([])
const appCont = reactive<appSetInfo>({
appKey:"1",
appName:"未知应用",
appSvg:"",
state:1,
uuid:"1"
})
const menuParentKey = ref<string>("")
const menuGroupShow = ref(false) //
/**
@ 作者: 秦东
@ 时间: 2024-04-19 15:47:12
@ 功能: 选择选项
*/
const handleClick = () =>{}
/**
@ 作者: 秦东
@ 时间: 2024-04-23 09:56:19
@ 功能: 关闭
*/
const closeAppDraw = () =>{
emits("update:isShow",false)
emits("refreshPage")
}
onMounted(() =>{
// gainAppContent()
})
watch(()=>props.isShow,(val:boolean)=>{
if(val){
gainAppContent()
}
})
/**
@ 作者: 秦东
@ 时间: 2024-04-23 15:23:31
@ 功能: 获取app信息
*/
const gainAppContent = () =>{
let sendInfo = {
id:props.formKey.toString()
}
gainAppEditPsge(sendInfo)
.then((data)=>{
console.log("获取app信息---》",data)
menusTree.value = data.data.menuTree
appCont.appKey = data.data.appKey;
appCont.appName = data.data.appName;
appCont.appSvg = data.data.appSvg;
appCont.state = data.data.state;
appCont.uuid = data.data.uuid;
})
}
/**
@ 作者: 秦东
@ 时间: 2024-04-23 16:57:39
@ 功能: 添加菜单分组
*/
const addMenu = (key?:string) => {
if(key){
menuParentKey.value = key;
}else{
menuParentKey.value = "";
}
menuGroupShow.value = true;
}
</script>
<template>
<div class="drawerClass">
<el-drawer v-model="drawerOpenOrClose" title="设置/编辑自定义表单" :with-header="false" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :size="props.drawerWith">
<AppMenuGroup v-model:is-show="menuGroupShow" :menu-parent-key="menuParentKey" :app-cont="appCont" @updateMenu="gainAppContent" />
<el-drawer v-model="props.isShow" title="设置/编辑自定义表单" :with-header="false" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :size="props.drawerWith">
<div class="common-layout">
<el-container>
<el-header class="headerBox">
<div>
<el-space wrap>
<el-avatar shape="square" :size="25" :src="squareUrl" />
<el-text>未命名应用</el-text>
<el-tag type="success">已启用</el-tag>
<el-avatar shape="square" :size="25" :src="appCont.appSvg" />
<el-text>{{ appCont.appName }}</el-text>
<el-tag v-if="appCont.state==1" type="success">已启用</el-tag>
<el-tag v-else type="danger">已禁用</el-tag>
</el-space>
</div>
<div>
@ -54,7 +127,8 @@ const handleClick = () =>{}
</el-tabs>
</div>
<div>
<el-button plain>访问</el-button>
<el-button plain size="small">访问</el-button>
<el-button type="danger" size="small" @click="closeAppDraw">关闭</el-button>
</div>
</el-header>
<el-container>
@ -97,7 +171,7 @@ const handleClick = () =>{}
</el-col>
</el-row>
</el-dropdown-item>
<el-dropdown-item divided>
<el-dropdown-item divided @click="addMenu">
<el-row>
<el-col :span="24">
<el-space wrap>
@ -116,7 +190,7 @@ const handleClick = () =>{}
</el-col>
</el-row>
<el-scrollbar class="scroBox">
<el-menu
<!-- <el-menu
default-active="1"
@open="handleOpen"
@close="handleClose"
@ -157,9 +231,9 @@ const handleClick = () =>{}
</div>
<div>2</div>
</el-menu-item>
</el-menu>
</el-menu> -->
<AppMenus :form-Key="formKey" />
<AppMenus :form-Key="formKey" :menus-tree="menusTree" />

20
src/views/sysworkflow/lowcodepage/index.vue

@ -5,7 +5,7 @@
-->
<script lang='ts' setup>
import { SearchForm,customerFormCont,customerFormConfig } from "@/api/DesignForm/type";
import { customerFormGroupList,editFormGroupState } from '@/api/DesignForm/requestapi'
import { customerFormGroupList,editFormGroupState,createApp,gainAppEditPsge } from '@/api/DesignForm/requestapi'
/**
@ -48,8 +48,22 @@ const handleCommand = (command: string,groupId: string) => {
drawerWith.value = contbody.value?.clientWidth
addFormIsShow.value = true;
}else if(command == "addFormApp"){
drawerWith.value = contbody.value?.clientWidth
appPageShow.value = true
let sendInfo = {
id:groupId.toString()
}
createApp(sendInfo)
.then((data)=>{
formKey.value = data.data.uuid
nextTick(() =>{
appPageShow.value = true
});
})
.finally(() => {
})
}else{
addFormGroupIsShow.value = true
drawerGroupWith.value = 400
@ -195,7 +209,7 @@ const getRongQiAttr = () => {
<el-pagination layout="prev, pager, next" v-model:current-page="page" :page-size="pageSize" :total="pageTotal" />
</div>
<DesignAPPpage v-if="appPageShow" :drawer-with="drawerWith" v-model:form-key="formKey" @refreshPage="refreshPage" />
<DesignAPPpage v-model:is-show="appPageShow" :drawer-with="drawerWith" v-model:form-key="formKey" @refreshPage="refreshPage" />
<LowCodeFormPage v-if="addFormIsShow" :drawer-with="drawerWith" v-model:form-key="formKey" :form-group-key="formGroupKey" @refreshPage="refreshPage" />
<LowCodeFormGroupPage v-if="addFormGroupIsShow" :drawer-with="drawerGroupWith" :group-key="groupKey" @refreshPage="refreshPage" />

Loading…
Cancel
Save