Browse Source

修改低代码BUG

qin_v1
超级管理员 1 year ago
parent
commit
5c62b79a66
  1. 2
      src/components/DesignForm/tableListPage/index.vue
  2. 31
      src/views/sysworkflow/lowcodepage/appListPage.vue
  3. 4
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue
  4. 2
      src/views/sysworkflow/lowcodepage/appPage/index.vue
  5. 126
      src/views/sysworkflow/lowcodepage/index.vue
  6. 30
      src/views/sysworkflow/lowcodepage/newLowCode/appLayoutEdit/appContainerPage.vue

2
src/components/DesignForm/tableListPage/index.vue

@ -863,7 +863,7 @@ const tabsView = (val:any,types:number) => {
</template> </template>
<div class="group group-btn" v-if="searchData.length"> <div class="group group-btn" v-if="searchData.length">
<el-button type="primary" @click="getPageData"><el-icon><Search /></el-icon>1</el-button> <el-button type="primary" @click="getPageData"><el-icon><Search /></el-icon></el-button>
<el-button @click="resetFields(ruleSearchForm)"><el-icon><Refresh /></el-icon></el-button> <el-button @click="resetFields(ruleSearchForm)"><el-icon><Refresh /></el-icon></el-button>
</div> </div>
</el-form> </el-form>

31
src/views/sysworkflow/lowcodepage/appListPage.vue

@ -13,7 +13,8 @@ import {
Edit, Edit,
Share, Share,
View, View,
Star Star,
Hide
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
// //
import AppContainer from '@/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue' import AppContainer from '@/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue'
@ -97,7 +98,20 @@ const delFormApp = (val:customerFormCont) => {
loadingApp.value = false loadingApp.value = false
}) })
} }
/**
@ 作者: 秦东
@ 时间: 2024-07-24 09:36:37
@ 功能: 改变App状态
*/
const editAppFormState = (val:customerFormCont) => {
let stateVal = val.states==1?2:1;
editProductionFormStatus({id:[val.id.toString()],status:stateVal,is_delete:false})
.then(({data})=>{
getFormAppList(props.searchQuery)
})
.finally(() => {
})
}
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ -381,11 +395,22 @@ defineExpose({
{{scope.row.creatertimeStr}} {{scope.row.creatertimeStr}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="100" align="center">
<template #default="scope">
<el-switch
v-model="scope.row.isOpen"
inline-prompt
:active-action-icon="View"
:inactive-action-icon="Hide"
@change="editAppFormState(scope.row)"
/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200" align="center"> <el-table-column fixed="right" label="操作" width="200" align="center">
<template #default="scope"> <template #default="scope">
<el-button-group v-if="scope.row.classify==3" class="ml-4"> <el-button-group v-if="scope.row.classify==3" class="ml-4">
<el-button size="small" title="查看" :icon="View" @click="lookAppList(scope.row)" /> <el-button size="small" title="查看" :icon="View" @click="lookAppList(scope.row)" />
<el-button size="small" title="设为常用" :icon="Star" :color="scope.row.isoften?'#FF0000':''" @click="setOften(scope.row)" /> <el-button size="small" title="设为常用" :icon="Star" :color="scope.row.isoften?'#79bbff':''" @click="setOften(scope.row)" />
<el-button size="small" title="编辑" type="success" :icon="Edit" @click="editForm(scope.row)" /> <el-button size="small" title="编辑" type="success" :icon="Edit" @click="editForm(scope.row)" />
<el-popconfirm title="请问是否真的删除?删除后数据将无法找回!" @confirm="delFormApp(scope.row)"> <el-popconfirm title="请问是否真的删除?删除后数据将无法找回!" @confirm="delFormApp(scope.row)">

4
src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue

@ -184,6 +184,8 @@ const emits = defineEmits(["editAppInfo"]);
@ 功能: 获取App页面预览信息 @ 功能: 获取App页面预览信息
*/ */
const editAppPage = (signCode:string) => { const editAppPage = (signCode:string) => {
console.log("获取App页面预览信息",signCode)
emits("editAppInfo",signCode) emits("editAppInfo",signCode)
} }
@ -454,7 +456,7 @@ defineExpose({
} }
} }
.suojing{ .suojing{
height: calc(100vh - 135px); height: calc(100vh - 190px);
} }
.demo-image__error{ .demo-image__error{
margin-top: 15px; margin-top: 15px;

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

@ -69,8 +69,8 @@ const handleClick = () =>{}
@ 功能: 关闭 @ 功能: 关闭
*/ */
const closeAppDraw = () =>{ const closeAppDraw = () =>{
emits("refreshPage","formPage1")
emits("update:isShow",false) emits("update:isShow",false)
emits("refreshPage")
tabsActive.value = 1 tabsActive.value = 1
checkedMenu.value = "" checkedMenu.value = ""
appPageKey.value = "" appPageKey.value = ""

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

@ -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 {

30
src/views/sysworkflow/lowcodepage/newLowCode/appLayoutEdit/appContainerPage.vue

@ -35,7 +35,15 @@ const props = defineProps({
default(){ default(){
return {} return {}
} }
} },
// groupId:{
// type:String,
// default:""
// },
// formKey:{
// type:String,
// default:""
// }
}); });
const emits = defineEmits(["update:editIsOpen","refreshPage"]); const emits = defineEmits(["update:editIsOpen","refreshPage"]);
const tabsActive = ref(1) const tabsActive = ref(1)
@ -44,6 +52,15 @@ const checkedMenu = ref<appMenuTreeInfo>("")
const appPageKey = ref<string>("") //AppId const appPageKey = ref<string>("") //AppId
const isNew = ref(false) const isNew = ref(false)
const saveAppFormIsShow = ref(false) const saveAppFormIsShow = ref(false)
const formKey = computed(() => {
return props.pickAppInfo.signCodeStr
})
const groupId = computed(() => {
return props.pickAppInfo.groupid.toString()
})
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 11:40:06 @ 时间: 2024-07-22 11:40:06
@ -69,6 +86,7 @@ const gainAppContent = () =>{
gainAppEditPsge(sendInfo) gainAppEditPsge(sendInfo)
.then((data)=>{ .then((data)=>{
console.log("获取app信息---》",data) console.log("获取app信息---》",data)
console.log("props.pickAppInfo--->",props.pickAppInfo)
menusTree.value = data.data.menuTree menusTree.value = data.data.menuTree
appCont.appKey = data.data.appKey; appCont.appKey = data.data.appKey;
appCont.appName = data.data.appName; appCont.appName = data.data.appName;
@ -206,15 +224,15 @@ const addAppPageForm = (key?:string) => {
</el-row> </el-row>
<el-scrollbar class="scroBox"> <el-scrollbar class="scroBox">
<AppMenus :form-Key="props.formKey" v-model:menus-tree="menusTree" v-model:app-page-key="appPageKey" :group-key="props.groupKey" :app-cont="appCont" :drawer-with="props.drawerWith" @openAppPageForm="openAppPageForm" /> <AppMenus :form-Key="formKey" v-model:menus-tree="menusTree" v-model:app-page-key="appPageKey" :group-key="groupId" :app-cont="appCont" :drawer-with="props.drawerWith" @openAppPageForm="openAppPageForm" />
<CreateAppFormPage v-if="saveAppFormIsShow" v-model:is-show="saveAppFormIsShow" :is-new="isNew" :drawer-with="props.drawerWith" :form-Key="props.formKey" :app-cont="appCont" :group-key="props.groupKey" :menu-id="props.formKey" v-model:app-page-key="appPageKey" @gainSunAppContent="gainAppContent" @updateInit="updataPageInit" /> <CreateAppFormPage v-if="saveAppFormIsShow" v-model:is-show="saveAppFormIsShow" :is-new="isNew" :drawer-with="props.drawerWith" :form-Key="formKey" :app-cont="appCont" :group-key="groupId" :menu-id="formKey" v-model:app-page-key="appPageKey" @gainSunAppContent="gainAppContent" @updateInit="updataPageInit" />
</el-scrollbar> </el-scrollbar>
</el-aside> </el-aside>
<el-main class="mainBox"> <el-main class="mainBox">
<el-scrollbar class="scroBox"> <el-scrollbar class="scroBox">
<OpenAppFormPage ref="openAppPageInit" :form-Key="props.formKey" :group-key="props.groupKey" :app-cont="appCont" :drawer-with="props.drawerWith" :menus-info="checkedMenu" @editAppInfo="editAppInfo" /> <OpenAppFormPage ref="openAppPageInit" :form-Key="formKey" :group-key="groupId" :app-cont="appCont" :drawer-with="props.drawerWith" :menus-info="checkedMenu" @editAppInfo="editAppInfo" />
</el-scrollbar> </el-scrollbar>
</el-main> </el-main>
</el-container> </el-container>
@ -222,10 +240,10 @@ const addAppPageForm = (key?:string) => {
集成与自动化 集成与自动化
</el-container> </el-container>
<el-container v-if="tabsActive==3"> <el-container v-if="tabsActive==3">
<AppSetUp :app-cont="appCont" :group-key="props.groupKey" /> <AppSetUp :app-cont="appCont" :group-key="groupId" />
</el-container> </el-container>
<el-container v-if="tabsActive==4"> <el-container v-if="tabsActive==4">
<ReleaseApp :app-cont="appCont" :group-key="props.groupKey" /> <ReleaseApp :app-cont="appCont" :group-key="groupId" />
</el-container> </el-container>
</el-container> </el-container>
</div> </div>

Loading…
Cancel
Save