|
|
@ -12,7 +12,9 @@ import { Search } from '@element-plus/icons-vue' |
|
|
//引入页面 |
|
|
//引入页面 |
|
|
import AppCardPage from "@/views/sysworkflow/lowcodepage/appCardPage.vue" |
|
|
import AppCardPage from "@/views/sysworkflow/lowcodepage/appCardPage.vue" |
|
|
import AppListPage from "@/views/sysworkflow/lowcodepage/appListPage.vue" |
|
|
import AppListPage from "@/views/sysworkflow/lowcodepage/appListPage.vue" |
|
|
|
|
|
import LowCodeFormGroupPage from "@/views/sysworkflow/lowcodepage/lowCodeFormGroupPage.vue" |
|
|
|
|
|
import DesignAPPpage from "@/views/sysworkflow/lowcodepage/appPage/index.vue" //自建应用 |
|
|
|
|
|
import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue" |
|
|
|
|
|
|
|
|
const contbody = ref() //实例化内容容器 |
|
|
const contbody = ref() //实例化内容容器 |
|
|
const carPage = ref() |
|
|
const carPage = ref() |
|
|
@ -23,6 +25,12 @@ const pageSize = ref<number>(12000) //每页显示几个 |
|
|
const pageTotal = ref<number>(0) //总记录数 |
|
|
const pageTotal = ref<number>(0) //总记录数 |
|
|
const groupFormList = ref<any[]>([]) //记录数组 |
|
|
const groupFormList = ref<any[]>([]) //记录数组 |
|
|
const drawerWith = ref(); //抽屉宽度 |
|
|
const drawerWith = ref(); //抽屉宽度 |
|
|
|
|
|
const groupKey = ref<string>("") //分组标识 |
|
|
|
|
|
const drawerGroupWith = ref(); //编辑表单时抽屉宽度 |
|
|
|
|
|
const addFormGroupIsShow = ref(false) |
|
|
|
|
|
const formKey = ref<string>("") //表单标识 |
|
|
|
|
|
const appPageShow = ref(false) |
|
|
|
|
|
const formGroupKey = ref<string>("") //表单标识 |
|
|
|
|
|
|
|
|
const searchQuery = reactive({ |
|
|
const searchQuery = reactive({ |
|
|
page:1, |
|
|
page:1, |
|
|
@ -117,6 +125,111 @@ const searchSub = () =>{ |
|
|
*/ |
|
|
*/ |
|
|
const getRongQiAttr = () => { |
|
|
const getRongQiAttr = () => { |
|
|
drawerWith.value = contbody.value?.clientWidth |
|
|
drawerWith.value = contbody.value?.clientWidth |
|
|
|
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
@ 作者: 秦东 |
|
|
|
|
|
@ 时间: 2024-03-21 13:53:29 |
|
|
|
|
|
@ 功能: 编辑分组 |
|
|
|
|
|
*/ |
|
|
|
|
|
const editFormGroup = (id: string) =>{ |
|
|
|
|
|
console.log("换挡",appGroup.value,id) |
|
|
|
|
|
|
|
|
|
|
|
if(id.value == "100"){ |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
groupKey.value = id |
|
|
|
|
|
addFormGroupIsShow.value = true |
|
|
|
|
|
drawerGroupWith.value = 400 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
@ 作者: 秦东 |
|
|
|
|
|
@ 时间: 2024-03-09 09:06:44 |
|
|
|
|
|
@ 功能: 刷新页面 |
|
|
|
|
|
*/ |
|
|
|
|
|
const refreshPage = (pageType:string) =>{ |
|
|
|
|
|
console.log("refreshPage",pageType) |
|
|
|
|
|
if(pageType == "formPage"){ |
|
|
|
|
|
addFormIsShow.value = false; |
|
|
|
|
|
}else{ |
|
|
|
|
|
addFormGroupIsShow.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
gainFormGroup() |
|
|
|
|
|
searchSub() |
|
|
|
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
@ 作者: 秦东 |
|
|
|
|
|
@ 时间: 2024-03-09 09:06:32 |
|
|
|
|
|
@ 功能: 选择添加项目 |
|
|
|
|
|
*/ |
|
|
|
|
|
const handleCommand = (command: string,groupId: string) => { |
|
|
|
|
|
// ElMessage(`click on item ${command}`) |
|
|
|
|
|
if(groupId == ""){ |
|
|
|
|
|
groupId = ""; |
|
|
|
|
|
} |
|
|
|
|
|
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 |
|
|
|
|
|
groupKey.value = "" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
@ 作者: 秦东 |
|
|
|
|
|
@ 时间: 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() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<template> |
|
|
<template> |
|
|
@ -146,11 +259,11 @@ const getRongQiAttr = () => { |
|
|
<el-dropdown> |
|
|
<el-dropdown> |
|
|
<el-button class="fa fa-reorder leftLink" /> |
|
|
<el-button class="fa fa-reorder leftLink" /> |
|
|
<template #dropdown> |
|
|
<template #dropdown> |
|
|
<el-dropdown-item @click="handleCommand('addFormGroup',appGroup)" >新增分组</el-dropdown-item> |
|
|
<el-dropdown-item @click="handleCommand('addFormGroup','')" >新增分组</el-dropdown-item> |
|
|
<el-dropdown-item @click="handleCommand('addForm',appGroup)" style="display:none" >添加表单</el-dropdown-item> |
|
|
<el-dropdown-item @click="handleCommand('addForm',appGroup)" style="display:none" >添加表单</el-dropdown-item> |
|
|
<el-dropdown-item @click="handleCommand('addFormApp',appGroup)" >添加应用</el-dropdown-item> |
|
|
<el-dropdown-item v-if="appGroup!='100'" @click="handleCommand('addFormApp',appGroup)" >添加应用</el-dropdown-item> |
|
|
<el-dropdown-item @click="editFormGroup(appGroup)" divided>编辑</el-dropdown-item> |
|
|
<el-dropdown-item v-if="appGroup!='100'" @click="editFormGroup(appGroup)" divided>编辑</el-dropdown-item> |
|
|
<el-dropdown-item @click="eidtGroupStatus(appGroup,3)">删除</el-dropdown-item> |
|
|
<el-dropdown-item v-if="appGroup!='100'" @click="eidtGroupStatus(appGroup,3)">删除</el-dropdown-item> |
|
|
</template> |
|
|
</template> |
|
|
</el-dropdown> |
|
|
</el-dropdown> |
|
|
</el-button-group> |
|
|
</el-button-group> |
|
|
@ -161,6 +274,9 @@ const getRongQiAttr = () => { |
|
|
<AppCardPage ref="carPage" v-if="isClick==1" :app-group="appGroup" :search-query="searchQuery" :drawer-with="drawerWith" @getRongQiAttr="getRongQiAttr" /> |
|
|
<AppCardPage ref="carPage" v-if="isClick==1" :app-group="appGroup" :search-query="searchQuery" :drawer-with="drawerWith" @getRongQiAttr="getRongQiAttr" /> |
|
|
<AppListPage ref="appListPage" v-else :app-group="appGroup" :search-query="searchQuery" :drawer-with="drawerWith" @getRongQiAttr="getRongQiAttr" /> |
|
|
<AppListPage ref="appListPage" v-else :app-group="appGroup" :search-query="searchQuery" :drawer-with="drawerWith" @getRongQiAttr="getRongQiAttr" /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<LowCodeFormGroupPage v-if="addFormGroupIsShow" :drawer-with="drawerGroupWith" :group-key="groupKey" @refreshPage="refreshPage" /> |
|
|
|
|
|
<LowCodeFormPage v-if="addFormIsShow" :drawer-with="drawerWith" v-model:form-key="formKey" :form-group-key="formGroupKey" @refreshPage="refreshPage" /> |
|
|
|
|
|
<DesignAPPpage v-model:is-show="appPageShow" :drawer-with="drawerWith" v-model:form-key="formKey" :group-key="groupKey" @refreshPage="refreshPage" /> |
|
|
</template> |
|
|
</template> |
|
|
<style lang='scss' scoped> |
|
|
<style lang='scss' scoped> |
|
|
.app-container { |
|
|
.app-container { |
|
|
|