Browse Source

Merge branch 'qin_v6'

# Conflicts:
#	src/components/DesignForm/formControlPropertiNew.vue
lwx_v11
hreenshan112 1 year ago
parent
commit
5f70873491
  1. 279
      src/components/DesignForm/assembly/index.ts
  2. 4483
      src/components/DesignForm/formControlPropertiNew.vue
  3. 36
      src/layout/components/Top.vue
  4. 10
      src/layout/index.vue
  5. 46
      src/views/dashboard/index.vue
  6. 173
      src/views/hr/userBox.vue
  7. 116
      src/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue
  8. 274
      src/views/sysworkflow/lowcodepage/runApp/runAppForm.vue

279
src/components/DesignForm/assembly/index.ts

@ -17,6 +17,146 @@ const config: { optionsType: number } = {
optionsType: 0 // 0固定 1数据源 2 接口字典 3系统表单字段
}
export default [
{
title: '布局字段',
children: [
{
type: 'grid',
label: '格栅布局',
unitName: '格栅布局',
icon: 'grid',
iconFont: 'fa-th-large',
columns: [
// 格栅列数据
{
attr: { span: 12 },
list: []
},
{
attr: { span: 12 },
list: []
}
],
control: {},
config: {},
styles: {
divStyle: {
// marginBot: "15"
},
labelStyle: {
// paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'card',
label: '卡片布局',
unitName: '卡片布局',
icon: 'card',
iconFont: 'fa-credit-card',
list: [],
control: {},
config: {},
item: {}, // label标题相关
styles: {
divStyle: {
// marginBot: "15"
},
labelStyle: {
// paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'flex',
label: '弹性布局',
unitName: '弹性布局',
icon: 'flex',
iconFont: 'fa-file-text-o',
list: [],
tableData: [], // 值集合
control: {},
config: {
addBtnText: '添加一行'
},
styles: {
divStyle: {
// marginBot: "15"
},
labelStyle: {
// paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'div',
label: '容器',
unitName: '容器',
icon: 'div',
iconFont: '',
control: {},
config: {},
list: [],
styles: {
divStyle: {
// marginBot: "15"
},
labelStyle: {
// paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'tabs',
label: '标签页',
unitName: '标签页',
icon: 'tabs',
iconFont: 'fa-folder-o',
columns: [
{
label: 'Tab1',
unitName: '',
list: []
}
],
control: {},
config: {},
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'divider',
label: '分割线',
unitName: '分割线',
icon: 'divider',
iconFont: '',
control: {},
config: {},
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
]
},
{
title: '基础字段',
children: [
@ -391,146 +531,7 @@ export default [
]
},
{
title: '布局字段',
children: [
{
type: 'grid',
label: '格栅布局',
unitName: '格栅布局',
icon: 'grid',
iconFont: 'fa-th-large',
columns: [
// 格栅列数据
{
attr: { span: 12 },
list: []
},
{
attr: { span: 12 },
list: []
}
],
control: {},
config: {},
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'card',
label: '卡片布局',
unitName: '卡片布局',
icon: 'card',
iconFont: 'fa-credit-card',
list: [],
control: {},
config: {},
item: {}, // label标题相关
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'flex',
label: '弹性布局',
unitName: '弹性布局',
icon: 'flex',
iconFont: 'fa-file-text-o',
list: [],
tableData: [], // 值集合
control: {},
config: {
addBtnText: '添加一行'
},
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'div',
label: '容器',
unitName: '容器',
icon: 'div',
iconFont: '',
control: {},
config: {},
list: [],
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'tabs',
label: '标签页',
unitName: '标签页',
icon: 'tabs',
iconFont: 'fa-folder-o',
columns: [
{
label: 'Tab1',
unitName: '',
list: []
}
],
control: {},
config: {},
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
{
type: 'divider',
label: '分割线',
unitName: '分割线',
icon: 'divider',
iconFont: '',
control: {},
config: {},
styles: {
divStyle: {
marginBot: "15"
},
labelStyle: {
paddingLeft: "7",
},
inputStyle: {}
}
},
]
},
{
title: '高级控件',

4483
src/components/DesignForm/formControlPropertiNew.vue

File diff suppressed because it is too large

36
src/layout/components/Top.vue

@ -13,23 +13,23 @@ const myPasswordBoxIsShow = ref(false);
const date: Date = new Date();
const tipsType = ref<number>(1)
const tipsType = ref<number>(1);
//
const greetings = computed(() => {
if (date.getHours() >= 6 && date.getHours() < 8) {
tipsType.value = 1
tipsType.value = 1;
return "晨起披衣出草堂,轩窗已自喜微凉🌅!";
} else if (date.getHours() >= 8 && date.getHours() < 12) {
tipsType.value = 2
tipsType.value = 2;
return "上午好🌞!";
} else if (date.getHours() >= 12 && date.getHours() < 18) {
tipsType.value = 3
tipsType.value = 3;
return "下午好☕!";
} else if (date.getHours() >= 18 && date.getHours() < 24) {
tipsType.value = 4
tipsType.value = 4;
return "晚上好🌃!";
} else if (date.getHours() >= 0 && date.getHours() < 6) {
tipsType.value = 5
tipsType.value = 5;
return "偷偷向银河要了一把碎星,只等你闭上眼睛撒入你的梦中,晚安🌛!";
}
});
@ -58,9 +58,7 @@ function logout() {
/**
* 打开个人资料
*/
const openMyContBox = () => {
}
const openMyContBox = () => {};
/**
* 修改个人密码
*/
@ -68,17 +66,15 @@ const editMyPasswordForm = () => {
// console.log("");
myPasswordBoxIsShow.value = true;
// console.log("",myPasswordBoxIsShow.value );
}
};
</script>
<template>
<div class="top">
<div class="logo">
<img src="../../assets/images/logo.png">
<img src="../../assets/images/logo.png" />
</div>
<div class="flex">
<!-- &lt;!&ndash; 导航栏设置(窄屏隐藏)&ndash;&gt;-->
<div v-if="device !== 'mobile'" class="setting-container">
<!-- <el-text v-if="tipsType==1" class="mx-1" type="success">{{ greetings }}</el-text>-->
@ -88,9 +84,7 @@ const editMyPasswordForm = () => {
<!-- <el-text v-if="tipsType==5" class="mx-1">{{ greetings }}</el-text>-->
<!--全屏 -->
<div class="setting-item" @click="toggle">
<svg-icon
:icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'"
/>
<svg-icon :icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'" />
</div>
<!-- 布局大小 -->
<el-tooltip content="布局大小" effect="dark" placement="bottom">
@ -112,8 +106,12 @@ const editMyPasswordForm = () => {
<router-link to="/">
<el-dropdown-item>{{ $t("navbar.dashboard") }}</el-dropdown-item>
</router-link>
<el-dropdown-item @click="openMyContBox">{{ $t("navbar.archives") }}</el-dropdown-item>
<el-dropdown-item @click="editMyPasswordForm">{{ $t("navbar.password") }}</el-dropdown-item>
<el-dropdown-item @click="openMyContBox">{{
$t("navbar.archives")
}}</el-dropdown-item>
<el-dropdown-item @click="editMyPasswordForm">{{
$t("navbar.password")
}}</el-dropdown-item>
<el-dropdown-item divided @click="logout">
{{ $t("navbar.logout") }}
</el-dropdown-item>
@ -128,7 +126,7 @@ const editMyPasswordForm = () => {
<style scoped lang="scss">
.top {
height: 68px;
background: #1E5EFF;
background: #1e5eff;
position: fixed;
padding: 0 20px;
top: 0;

10
src/layout/index.vue

@ -4,7 +4,7 @@ import {useWindowSize} from "@vueuse/core";
import { AppMain, Navbar, Settings, TagsView } from "./components/index";
import Sidebar from "./components/Sidebar/index.vue";
import RightPanel from "@/components/RightPanel/index.vue";
import Top from './components/Top.vue'
import Top from "./components/Top.vue";
import { useAppStore } from "@/store/modules/app";
import { useSettingsStore } from "@/store/modules/settings";
@ -56,9 +56,7 @@ function handleOutsideClick() {
</script>
<template>
<div :class="classObj" class="app-wrapper">
<!-- 手机设备侧边栏打开遮罩层 -->
<div
v-if="classObj.mobile && classObj.openSidebar"
@ -67,11 +65,10 @@ function handleOutsideClick() {
></div>
<top></top>
<Sidebar class="sidebar-container" />
<div :class="{ hasTagsView: showTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }" style="margin: 10px 20px 0 20px;">
<div :class="{ 'fixed-header': fixedHeader }" style="margin: 10px 20px 0 20px">
<navbar></navbar>
<tags-view v-if="showTagsView" />
</div>
@ -89,7 +86,7 @@ function handleOutsideClick() {
<style lang="scss" scoped>
.app-wrapper {
background: #F5F6FA;
background: #f5f6fa;
position: relative;
width: 100%;
height: 100%;
@ -100,7 +97,6 @@ function handleOutsideClick() {
// content: "";
// }
&.mobile.openSidebar {
position: fixed;
top: 0;

46
src/views/dashboard/index.vue

@ -3,14 +3,17 @@
@ 时间: 2023-11-06 13:39:13
@ 备注: 首页
-->
<script lang='ts' setup>
import * as echarts from 'echarts'; //
<script lang="ts" setup>
import * as echarts from "echarts"; //
import { useUserStore } from "@/store/modules/user";
import { orgInfo } from '@/api/displayboardapi/types'
import { getOrgChiled,getCompanyDeparment,targetListForDepartment } from '@/api/displayboardapi/indexapi'
import { orgInfo } from "@/api/displayboardapi/types";
import {
getOrgChiled,
getCompanyDeparment,
targetListForDepartment,
} from "@/api/displayboardapi/indexapi";
import UserInfo from "@/views/dashboard/components/userinfo.vue";
import SanLianpIng from "@/views/dashboard/components/sanlianping.vue";
@ -22,36 +25,31 @@ import Application from "@/views/dashboard/components/application.vue";
import HostNews from "@/views/dashboard/components/hostnews.vue";
const userStore = useUserStore();
const orgListCont = ref<orgInfo[]>([])
const educationOrgId = ref<number>(309)
const masterBody = ref<any>(null)
const drawerWidht = ref<any>()
const orgListCont = ref<orgInfo[]>([]);
const educationOrgId = ref<number>(309);
const masterBody = ref<any>(null);
const drawerWidht = ref<any>();
/**
* 获取行政组织
*/
function getOrgList() {
getOrgChiled({id:313})
.then(( {data} )=>{
getOrgChiled({ id: 313 }).then(({ data }) => {
// console.log("-2-->",data)
orgListCont.value = data.list
educationOrgId.value = data.current
})
orgListCont.value = data.list;
educationOrgId.value = data.current;
});
}
const orgAllYears = ref<any>(); //
const orgAllYears = ref<any>() //
const oenOrg = ref<any>() //
const oenOrg = ref<any>(); //
//
onMounted(() => {
drawerWidht.value = masterBody.value?.clientWidth
drawerWidht.value = masterBody.value?.clientWidth;
getOrgList();
// console.log("----100---->",drawerWidht.value)
})
});
</script>
<template>
<div ref="masterBody" class="app_container">
@ -81,10 +79,9 @@ onMounted(() => {
<SanLianpIng />
</el-col>
</el-row>
</div>
</template>
<style lang='scss' scoped>
<style lang="scss" scoped>
.app_container {
padding: 10px 20px 0px 20px;
height: calc(100% - 10px);
@ -97,7 +94,6 @@ onMounted(() => {
display: flex;
align-items: center;
justify-content: space-between;
}
.span_icon_left {
margin-right: 10px;

173
src/views/hr/userBox.vue

@ -3,45 +3,45 @@
@ 时间: 2024-05-23 13:50:03
@ 备注: 行政组织及角色选择器
-->
<script lang='ts' setup>
import { Search,ArrowRight } from '@element-plus/icons-vue' //
import { userOrgRole,crumb } from '@/api/hr/search/types'
const circleUrl = ref('https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png')
<script lang="ts" setup>
import { Search, ArrowRight } from "@element-plus/icons-vue"; //
import { userOrgRole, crumb } from "@/api/hr/search/types";
const circleUrl = ref(
"https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
);
//
import OrgPage from '@/views/hr/orgUserRole/org.vue'
import OrgRolePage from '@/views/hr/orgUserRole/orgrole.vue'
import RolePageIng from '@/views/hr/orgUserRole/rolePage.vue'
import OrgPage from "@/views/hr/orgUserRole/org.vue";
import OrgRolePage from "@/views/hr/orgUserRole/orgrole.vue";
import RolePageIng from "@/views/hr/orgUserRole/rolePage.vue";
const props = defineProps({
isOpen: {
type: Boolean,
default:false
default: false,
},
types: {
type: Number,
default:1
default: 1,
},
orgTrue: {
type: Number,
default:1
default: 1,
},
pickList: {
type: Object,
default() {
return {}
}
}
return {};
},
},
});
const taotleLog = ref(0)
const pickListAry = ref<userOrgRole[]>([]) //
const taotleLog = ref(0);
const pickListAry = ref<userOrgRole[]>([]); //
const emits = defineEmits(["update:isOpen", "update:types", "pickInfo"]);
const searchQuery = ref<any>("")
const orgUs = ref(null)
const orgUsRole = ref(null)
const rolePage = ref(null)
const searchQuery = ref<any>("");
const orgUs = ref(null);
const orgUsRole = ref(null);
const rolePage = ref(null);
/**
@ 作者: 秦东
@ 时间: 2024-05-23 13:56:28
@ -50,12 +50,12 @@ const rolePage = ref(null)
const isShow = computed({
get() {
// console.log("",props.isOpen);
return props.isOpen
return props.isOpen;
},
set(val: boolean) {
// console.log("",props.isOpen);
emits('update:isOpen', val)
}
emits("update:isOpen", val);
},
});
/**
@ 作者: 秦东
@ -65,21 +65,21 @@ const isShow = computed({
const userTypes = computed({
get() {
// console.log("",props.isOpen);
return props.types
return props.types;
},
set(val: boolean) {
// console.log("",props.isOpen);
emits('update:types', val)
}
})
emits("update:types", val);
},
});
/**
@ 作者: 秦东
@ 时间: 2024-05-23 14:15:10
@ 功能: 关闭弹出对话框
*/
const handleClose = () => {
emits('update:isOpen', false)
}
emits("update:isOpen", false);
};
/**
@ 作者: 秦东
@ 时间: 2024-05-24 08:21:58
@ -88,23 +88,22 @@ const handleClose = () => {
const searchData = () => {
// console.log("userTypes----->",userTypes);
if (userTypes.value == 1) {
orgUs.value.searchOrgUs(searchQuery.value)
orgUs.value.searchOrgUs(searchQuery.value);
} else if (userTypes.value == 2) {
orgUsRole.value.searchOrgRolePeople(searchQuery.value)
orgUsRole.value.searchOrgRolePeople(searchQuery.value);
} else {
rolePage.value.searchOrgRolePeople(searchQuery.value)
}
rolePage.value.searchOrgRolePeople(searchQuery.value);
}
};
/**
@ 作者: 秦东
@ 时间: 2024-05-24 15:29:20
@ 功能: 更新数据
*/
const updataPickLog = (val: userOrgRole[]) => {
pickListAry.value = val
taotleLog.value = val.length
}
pickListAry.value = val;
taotleLog.value = val.length;
};
/**
@ 作者: 秦东
@ 时间: 2024-05-24 15:36:07
@ -113,10 +112,10 @@ const updataPickLog = (val:userOrgRole[]) => {
const delPickCont = (val: userOrgRole) => {
pickListAry.value.forEach((item: userOrgRole, index: number) => {
if (item.id == val.id) {
pickListAry.value.splice(index,1)
}
})
pickListAry.value.splice(index, 1);
}
});
};
/**
@ 作者: 秦东
@ 时间: 2024-05-24 15:52:58
@ -124,34 +123,42 @@ const delPickCont = (val:userOrgRole) => {
*/
const clearVal = () => {
pickListAry.value = [];
taotleLog.value = 0
}
taotleLog.value = 0;
};
/**
@ 作者: 秦东
@ 时间: 2024-05-24 15:59:11
@ 功能: 提交数据
*/
const submitSend = () => {
emits('pickInfo', pickListAry,props.types)
}
watch(()=>props.isOpen,(val:boolean)=>{
emits("pickInfo", pickListAry, props.types);
};
watch(
() => props.isOpen,
(val: boolean) => {
if (!val) {
clearVal()
clearVal();
} else {
if (props.pickList.length > 0) {
pickListAry.value = props.pickList
taotleLog.value = props.pickList.length
pickListAry.value = props.pickList;
taotleLog.value = props.pickList.length;
}
}
// console.log("",val);
})
}
);
onMounted(() => {
taotleLog.value = props.pickList.length
})
taotleLog.value = props.pickList.length;
});
</script>
<template>
<el-dialog v-model="isShow" title="选择成员" width="700" draggable :before-close="handleClose">
<el-dialog
v-model="isShow"
title="选择成员"
width="700"
draggable
:before-close="handleClose"
>
<el-row class="allBianLink">
<el-col :span="12">
<el-input
@ -161,9 +168,27 @@ onMounted(()=>{
class="inputDeep"
@input="searchData"
/>
<OrgPage ref="orgUs" v-if="userTypes==1" :org-true="orgTrue" :pick-list="pickListAry" @updataPickLog="updataPickLog" />
<OrgRolePage ref="orgUsRole" v-if="userTypes==2" :org-true="orgTrue" :pick-list="pickListAry" @updataPickLog="updataPickLog" />
<RolePageIng ref="rolePage" v-if="userTypes==3" :org-true="orgTrue" :pick-list="pickListAry" @updataPickLog="updataPickLog" />
<OrgPage
ref="orgUs"
v-if="userTypes == 1"
:org-true="orgTrue"
:pick-list="pickListAry"
@updataPickLog="updataPickLog"
/>
<OrgRolePage
ref="orgUsRole"
v-if="userTypes == 2"
:org-true="orgTrue"
:pick-list="pickListAry"
@updataPickLog="updataPickLog"
/>
<RolePageIng
ref="rolePage"
v-if="userTypes == 3"
:org-true="orgTrue"
:pick-list="pickListAry"
@updataPickLog="updataPickLog"
/>
</el-col>
<el-col :span="12" class="leftLink">
@ -179,7 +204,12 @@ onMounted(()=>{
<el-space wrap>
<svg-icon v-if="item.types == 2" icon-class="fenZhu" :size="20" />
<svg-icon v-if="item.types == 3" icon-class="tasp" :size="20" />
<el-avatar v-if="item.types==1" shape="square" :size="20" :src="circleUrl" />
<el-avatar
v-if="item.types == 1"
shape="square"
:size="20"
:src="circleUrl"
/>
<el-text>{{ item.title }}</el-text>
</el-space>
<div>
@ -187,7 +217,6 @@ onMounted(()=>{
</div>
</li>
</ul>
</el-scrollbar>
</el-col>
</el-row>
@ -201,18 +230,18 @@ onMounted(()=>{
</template>
</el-dialog>
</template>
<style lang='scss' scoped>
<style lang="scss" scoped>
.allBianLink {
border: 1px solid #E6E8EB;
border: 1px solid #e6e8eb;
.leftLink {
border-left: 1px solid #E6E8EB;
border-left: 1px solid #e6e8eb;
}
.pickTitle {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 10px;
border-bottom: 1px solid #E6E8EB;
border-bottom: 1px solid #e6e8eb;
}
}
.mianbaoxue {
@ -237,18 +266,18 @@ onMounted(()=>{
}
}
li:hover {
background-color: #EBEEF5;
color: #409EFF;
background-color: #ebeef5;
color: #409eff;
.el-text {
color: #409EFF;
color: #409eff;
}
}
li.active {
background-color: #EBEDF0;
color: #409EFF;
background-color: #ebedf0;
color: #409eff;
.el-text {
color: #409EFF;
color: #409eff;
}
}
}
@ -271,10 +300,10 @@ onMounted(()=>{
}
}
li:hover {
background-color: #F56C6C;
color: #FFFFFF;
background-color: #f56c6c;
color: #ffffff;
.el-text {
color: #FFFFFF;
color: #ffffff;
}
}
}

116
src/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue

@ -3,18 +3,18 @@
@ 时间: 2024-07-22 11:28:18
@ 备注: 自定义App主容器
-->
<script lang='ts' setup>
import { appMenuTreeInfo,appSetInfo } from "@/api/date/type"
<script lang="ts" setup>
import { appMenuTreeInfo, appSetInfo } from "@/api/date/type";
import { useUserStore } from "@/store/modules/user";
import { gainAppEditPsge } from '@/api/DesignForm/requestapi'
import { gainAppEditPsge } from "@/api/DesignForm/requestapi";
import RegularPage from "@/views/sysworkflow/lowcodepage/runApp/regularPage.vue"
import RunAppForm from "@/views/sysworkflow/lowcodepage/runApp/runAppForm.vue"
import RegularPage from "@/views/sysworkflow/lowcodepage/runApp/regularPage.vue";
import RunAppForm from "@/views/sysworkflow/lowcodepage/runApp/runAppForm.vue";
const props = defineProps({
drawerWith: {
type: Number,
default:0
default: 0,
},
runIsOpen: {
type: Boolean,
@ -23,22 +23,22 @@ const props = defineProps({
pickAppInfo: {
type: Object,
default() {
return {}
}
return {};
},
},
searchQuery: {
type: Object,
default() {
return {}
}
}
return {};
},
},
});
const emits = defineEmits(["update:runIsOpen", "refreshPage"]);
const userStore = useUserStore();
const menusTree = ref<appMenuTreeInfo[]>([]) //
const pickAppMenu = ref("") //
const switchPAge = ref(1) // 12
const pickAppMenuSel = ref("") //
const menusTree = ref<appMenuTreeInfo[]>([]); //
const pickAppMenu = ref(""); //
const switchPAge = ref(1); // 12
const pickAppMenuSel = ref(""); //
/**
@ 作者: 秦东
@ 时间: 2024-07-22 11:40:06
@ -50,8 +50,8 @@ const appCont = reactive<appSetInfo>({
appSvg: "",
state: 1,
uuid: "1",
describe:""
})
describe: "",
});
/**
@ 作者: 秦东
@ -60,13 +60,12 @@ const appCont = reactive<appSetInfo>({
*/
const gainAppContent = () => {
let sendInfo = {
id:props.pickAppInfo.signCodeStr
}
id: props.pickAppInfo.signCodeStr,
};
// console.log("app---",props.pickAppInfo)
gainAppEditPsge(sendInfo)
.then((data)=>{
gainAppEditPsge(sendInfo).then((data) => {
// console.log("app---",data)
menusTree.value = data.data.menuTree
menusTree.value = data.data.menuTree;
appCont.appKey = data.data.appKey;
appCont.appName = data.data.appName;
appCont.appSvg = data.data.appSvg;
@ -77,32 +76,35 @@ const gainAppContent = () =>{
if (item.isLock == 1 && item.isMain == 1) {
pickAppMenu.value = item;
isIn = false;
switchPAge.value = 1
switchPAge.value = 1;
}
})
});
if (isIn) {
pickAppMenu.value = data.data.menuTree[0];
if (pickAppMenu.value.type == 2) {
switchPAge.value = 2
switchPAge.value = 2;
}
}
})
}
});
};
/**
@ 作者: 秦东
@ 时间: 2024-05-30 15:17:29
@ 功能: 退出应用
*/
const closeRunApp = () => {
emits("update:runIsOpen",false)
emits("refreshPage",props.searchQuery)
}
emits("update:runIsOpen", false);
emits("refreshPage", props.searchQuery);
};
watch(()=>props.runIsOpen,(val:boolean)=>{
watch(
() => props.runIsOpen,
(val: boolean) => {
if (val) {
gainAppContent()
gainAppContent();
}
})
}
);
/**
@ 作者: 秦东
@ 时间: 2024-05-17 16:45:40
@ -112,16 +114,23 @@ const openAppPage = (val:any) =>{
// console.log("app------>",val)
if (val.type != 1) {
if (val.isLock == 1) {
switchPAge.value = 1
switchPAge.value = 1;
} else {
switchPAge.value = 2
}
pickAppMenu.value = val
switchPAge.value = 2;
}
pickAppMenu.value = val;
}
};
</script>
<template>
<el-drawer v-model="props.runIsOpen" :with-header="false" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :size="props.drawerWith">
<el-drawer
v-model="props.runIsOpen"
:with-header="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
:size="props.drawerWith"
>
<el-container class="common-layout">
<el-header class="headerBox">
<div>
@ -137,11 +146,17 @@ const openAppPage = (val:any) =>{
<el-dropdown-item>
<table class="userTabel">
<tr>
<td rowspan="2"><el-avatar shape="square" :size="55" :src="userStore.avatar" /></td>
<td rowspan="2">
<el-avatar shape="square" :size="55" :src="userStore.avatar" />
</td>
<td>{{ userStore.nickname }}({{ userStore.userInfoCont.number }})</td>
</tr>
<tr>
<td>{{ userStore.userInfoCont.companyname }}/{{ userStore.userInfoCont.departmentname }}</td>
<td>
{{ userStore.userInfoCont.companyname }}/{{
userStore.userInfoCont.departmentname
}}
</td>
</tr>
</table>
</el-dropdown-item>
@ -187,14 +202,22 @@ const openAppPage = (val:any) =>{
</el-tree>
</el-aside>
<el-main class="mainBox">
<RegularPage v-if="switchPAge==1" :pick-app-menu="pickAppMenu" :drawer-with="props.drawerWith" />
<RunAppForm v-else :pick-app-menu="pickAppMenu" :drawer-with="props.drawerWith" />
<RegularPage
v-if="switchPAge == 1"
:pick-app-menu="pickAppMenu"
:drawer-with="props.drawerWith"
/>
<RunAppForm
v-else
:pick-app-menu="pickAppMenu"
:drawer-with="props.drawerWith"
/>
</el-main>
</el-container>
</el-container>
</el-drawer>
</template>
<style lang='scss' scoped>
<style lang="scss" scoped>
.common-layout {
.el-header {
padding-left: 10px;
@ -204,7 +227,7 @@ const openAppPage = (val:any) =>{
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #F1F2F3;
border-bottom: 1px solid #f1f2f3;
:deep(.el-tabs__nav-wrap::after) {
position: static !important;
}
@ -217,14 +240,13 @@ const openAppPage = (val:any) =>{
}
.asideBox {
width: 250px;
border-right: 1px solid #F1F2F3;
border-right: 1px solid #f1f2f3;
height: calc(100vh - 40px);
.asideBoxSearch {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 10px;
}
.appMenuTitle {
width: 100%;
@ -244,7 +266,7 @@ const openAppPage = (val:any) =>{
padding: 0px;
}
.mainBox {
background-color: #F1F2F3;
background-color: #f1f2f3;
padding: 0px;
.scroBox {
height: calc(100vh - 40px);

274
src/views/sysworkflow/lowcodepage/runApp/runAppForm.vue

@ -3,23 +3,40 @@
@ 时间: 2024-05-31 09:22:06
@ 备注: 执行表格
-->
<script lang='ts' setup>
import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form'
import { judgeSubmitCancel,gainAppPageInfo,getFieldRecord } from '@/api/DesignForm/requestapi'
import { Edit,Picture as IconPicture } from '@element-plus/icons-vue'
import { appPageDataInit,appWorkFlow } from "@/api/date/type"
import { notAsA_BasisForJudgment,asAnApprovalActionControl,fixedValueControl,timeControl,timeEquation,submitButton, afreshSubmitButton } from '@/utils/workflow/const'
<script lang="ts" setup>
import {
json2string,
objToStringify,
string2json,
stringToObj,
} from "@/utils/DesignForm/form";
import {
judgeSubmitCancel,
gainAppPageInfo,
getFieldRecord,
} from "@/api/DesignForm/requestapi";
import { Edit, Picture as IconPicture } from "@element-plus/icons-vue";
import { appPageDataInit, appWorkFlow } from "@/api/date/type";
import {
notAsA_BasisForJudgment,
asAnApprovalActionControl,
fixedValueControl,
timeControl,
timeEquation,
submitButton,
afreshSubmitButton,
} from "@/utils/workflow/const";
const props = defineProps({
pickAppMenu: {
type: Object,
default() {
return {}
}
}
return {};
},
},
});
const activePage = ref(0) //
const appInitData = ref<appPageDataInit>("")
const activePage = ref(0); //
const appInitData = ref<appPageDataInit>("");
//app
const stateForm = reactive<any>({
type: 1, // 123 4 5
@ -27,15 +44,15 @@ const stateForm = reactive<any>({
list: [],
form: {},
config: {},
powerstr:{}
powerstr: {},
},
dict: {},
formId: "1",
id: 0,
formId: 0,
versionId: 0,
loading: true
})
loading: true,
});
//
const stateList = reactive({
tableData: {
@ -43,7 +60,7 @@ const stateList = reactive({
columns: [],
config: {},
controlBtn: [],
operateBtn:[]
operateBtn: [],
},
searchData: [],
loading: false,
@ -52,22 +69,22 @@ const stateList = reactive({
pageSize: 10,
searchIsShow: true,
searchFormIsShow: true,
openPageMode:"drawer"
openPageMode: "drawer",
},
tagList: {},
formId: props.formKey || '',
formId: props.formKey || "",
formList: [], //
name: '',
name: "",
treeData: {}, //
previewVisible: false,
tabsName: 'second',
tabsName: "second",
formFieldList: [], //
formApi: {
type: "1",
addApiUrl: "",
editApiUrl: "",
delApiUrl: "",
lookApiUrl:""
lookApiUrl: "",
},
dict: {},
refreshTable: true,
@ -78,8 +95,8 @@ const stateList = reactive({
form: {
sortWord: "",
sortClass: 1,
title:[]
}
title: [],
},
},
date: {
status: false,
@ -88,20 +105,18 @@ const stateList = reactive({
startTime: "",
endTime: "",
dayType: 1,
title:[]
}
}
,
title: [],
},
},
time: {
status: false,
isClick: false,
form: {
sortWord: "",
sort: 1,
title:[]
}
}
,
title: [],
},
},
gantt: {
status: false,
isClick: false,
@ -111,10 +126,9 @@ const stateList = reactive({
dayType: 2,
sortWord: "",
sort: 1,
title:[]
}
}
,
title: [],
},
},
map: {
status: false,
isClick: false,
@ -122,8 +136,8 @@ const stateList = reactive({
mapWord: "",
sortWord: "",
sort: 1,
title:[]
}
title: [],
},
},
card: {
status: false,
@ -139,26 +153,24 @@ const stateList = reactive({
titleWork: "",
describe: "",
ranks: 3,
title:[]
}
}
}
})
const appFormTitle = ref("")
const versionTitle = ref<string>("") //
const versionId = ref<string>("") //
const appFlowInfo = ref<appWorkFlow>("") //
const isFlow = ref(2)
const mastesformjson = ref("") //
title: [],
},
},
},
});
const appFormTitle = ref("");
const versionTitle = ref<string>(""); //
const versionId = ref<string>(""); //
const appFlowInfo = ref<appWorkFlow>(""); //
const isFlow = ref(2);
const mastesformjson = ref(""); //
/**
@ 作者: 秦东
@ 时间: 2024-06-03 09:54:30
@ 功能: 加载页面
*/
onMounted(() => {
initLoadData()
initLoadData();
});
/**
@ 作者: 秦东
@ -168,73 +180,81 @@ onMounted(() => {
const initLoadData = () => {
// console.log("initLoadData",props.pickAppMenu.type,props.pickAppMenu.type != 1)
if (props.pickAppMenu.type != 1) {
appFormTitle.value = props.pickAppMenu.label
gainAppPageInfo({id:props.pickAppMenu.id})
.then((data)=>{
appFormTitle.value = props.pickAppMenu.label;
gainAppPageInfo({ id: props.pickAppMenu.id }).then((data) => {
// console.log("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",data)
appInitData.value = data.data
appInitData.value = data.data;
// console.log("---!",appInitData.value)
mastesformjson.value = data.data.appForm.mastesformjson
isFlow.value = data.data.appForm.flowIsOpen
mastesformjson.value = data.data.appForm.mastesformjson;
isFlow.value = data.data.appForm.flowIsOpen;
if (data.data.page && data.data.pageList && data.data.appFlow) {
activePage.value = 1
activePage.value = 1;
} else if (data.data.page && !data.data.pageList && data.data.appFlow) {
activePage.value = 2
activePage.value = 2;
} else if (!data.data.page && !data.data.pageList && data.data.appFlow) {
activePage.value = 3
activePage.value = 3;
} else if (!data.data.page && data.data.pageList && data.data.appFlow) {
activePage.value = 1
activePage.value = 1;
} else if (data.data.page && !data.data.pageList && !data.data.appFlow) {
activePage.value = 2
activePage.value = 2;
} else {
activePage.value = 1
activePage.value = 1;
}
versionId.value = data.data.appForm.id.toString()
versionTitle.value = data.data.appForm.name
versionId.value = data.data.appForm.id.toString();
versionTitle.value = data.data.appForm.name;
if (data.data.pageList) {
let stateData = string2json(data.data.appForm.listjson)
let stateData = string2json(data.data.appForm.listjson);
// console.log("",stateData)
let holeControlAndConfigStateData = string2json(data.data.appForm.mastesformjson)
let holeControlAndConfigStateData = string2json(data.data.appForm.mastesformjson);
if (stateData.tableData.columns && stateData.tableData.columns.length > 0) {
for (let i = 0; i < stateData.tableData.columns.length; i++) {
for (let u = 0; u < holeControlAndConfigStateData.list.length; u++) {
if(stateData.tableData.columns[i].id==holeControlAndConfigStateData.list[u].name){
stateData.tableData.columns[i].control = holeControlAndConfigStateData.list[u].control
stateData.tableData.columns[i].config = holeControlAndConfigStateData.list[u].config
if (
stateData.tableData.columns[i].id ==
holeControlAndConfigStateData.list[u].name
) {
stateData.tableData.columns[i].control =
holeControlAndConfigStateData.list[u].control;
stateData.tableData.columns[i].config =
holeControlAndConfigStateData.list[u].config;
}
}
if(stateData.tableData.columns[i].config!=undefined && stateData.tableData.columns[i].control!=undefined){
if (
stateData.tableData.columns[i].config != undefined &&
stateData.tableData.columns[i].control != undefined
) {
// console.log(stateData.tableData.columns[i])
let paramx:string = ""+stateData.tableData.columns[i].control.optionsValue3Field
let paramx: string =
"" + stateData.tableData.columns[i].control.optionsValue3Field;
/*
在这里请求后台获取字段
*/
//console.log("runAppForm-----214",paramx)
if (paramx && paramx != "" && paramx != null && paramx != "undefined") {
getFieldRecord(paramx).then(({ data }) => {
stateData.tableData.columns[i].options = data
stateData.tableData.columns[i].options = data;
if (stateData.searchData.length > 0) {
for (let j = 0; j < stateData.searchData.length; j++) {
// console.log(stateData.searchData[j])
if(stateData.searchData[j].id==stateData.tableData.columns[i].id){
stateData.searchData[j].options = data
if (
stateData.searchData[j].id == stateData.tableData.columns[i].id
) {
stateData.searchData[j].options = data;
}
}
}
})
});
}
if (stateData.searchData && stateData.searchData.length > 0) {
for (let j = 0; j < stateData.searchData.length; j++) {
// console.log(stateData.searchData[j])
if (stateData.searchData[j].id == stateData.tableData.columns[i].id) {
// console.log(stateData.tableData.columns[i])
stateData.searchData[j].control = stateData.tableData.columns[i].control
stateData.searchData[j].config = stateData.tableData.columns[i].config
stateData.searchData[j].control =
stateData.tableData.columns[i].control;
stateData.searchData[j].config =
stateData.tableData.columns[i].config;
// console.log(stateData.searchData[j])
}
}
@ -242,72 +262,74 @@ const initLoadData = () => {
}
}
}
stateList.tableData = stateData.tableData
stateList.searchData = stateData.searchData
stateList.tableData = stateData.tableData;
stateList.searchData = stateData.searchData;
if (stateList.searchData == null) {
stateList.searchData = new Array()
}
stateList.loading = stateData.loading
stateList.attrObj = stateData.attrObj
stateList.config = stateData.config
stateList.tagList = stateData.tagList
stateList.formList = stateData.formList
stateList.name = stateData.name
stateList.treeData = stateData.treeData
stateList.previewVisible = stateData.previewVisible
stateList.formFieldList = stateData.formFieldList
stateList.formApi = stateData.formApi
stateList.dict = stateData.dict
stateList.refreshTable = stateData.refreshTable
stateList.searchData = new Array();
}
stateList.loading = stateData.loading;
stateList.attrObj = stateData.attrObj;
stateList.config = stateData.config;
stateList.tagList = stateData.tagList;
stateList.formList = stateData.formList;
stateList.name = stateData.name;
stateList.treeData = stateData.treeData;
stateList.previewVisible = stateData.previewVisible;
stateList.formFieldList = stateData.formFieldList;
stateList.formApi = stateData.formApi;
stateList.dict = stateData.dict;
stateList.refreshTable = stateData.refreshTable;
if (stateData.view) {
stateList.view = stateData.view
stateList.view = stateData.view;
}
}
if (data.data.page) {
// console.log("data.data.mastesform", data.data)
stateForm.id=data.data.appForm.version.toString()
stateForm.formId =data.data.appForm.cfid.toString()
stateForm.versionId =data.data.appForm.id.toString()
stateForm.formData = stringToObj(data.data.appForm.mastesform)
stateForm.dict = string2json(data.data.appForm.dict)
stateForm.formData.powerstr = string2json(data.data.appForm.powerstr)
stateForm.id = data.data.appForm.version.toString();
stateForm.formId = data.data.appForm.cfid.toString();
stateForm.versionId = data.data.appForm.id.toString();
stateForm.formData = stringToObj(data.data.appForm.mastesform);
stateForm.dict = string2json(data.data.appForm.dict);
stateForm.formData.powerstr = string2json(data.data.appForm.powerstr);
// console.log("data.data.mastesform", stateForm.formData)
judgeSubmitCancel({"name":data.data.appForm.mastesformjson})
.then((datajud:any) =>{
judgeSubmitCancel({ name: data.data.appForm.mastesformjson }).then(
(datajud: any) => {
if (datajud.code == 0) {
if (datajud.data == 3 || datajud.data == 4) {
stateForm.formData.list.push(submitButton)
stateForm.formData.list.push(submitButton);
}
}
})
}
if(data.data.appFlow){
appFlowInfo.value = data.data.workFlow
);
}
})
if (data.data.appFlow) {
appFlowInfo.value = data.data.workFlow;
}
});
}
};
/**
@ 作者: 秦东
@ 时间: 2024-06-03 09:26:17
@ 功能: 监听菜单数据变化
*/
watch(() => props.pickAppMenu,(val:any) => {
initLoadData()
},{
deep: true
})
watch(
() => props.pickAppMenu,
(val: any) => {
initLoadData();
},
{
deep: true,
}
);
function optionsValue3Get3(data: any, fieldName: string) {
for (let i = 0; i < stateForm.formData.list.length; i++) {
if (stateForm.formData.list[i].name == fieldName) {
stateForm.formData.list[i].options = []
stateForm.formData.list[i].options = [];
for (let j = 0; j < data.length; j++) {
stateForm.formData.list[i].options.push(data[j])
stateForm.formData.list[i].options.push(data[j]);
}
}
}
@ -321,8 +343,8 @@ function optionsValue3Get3(data: any,fieldName: string){
<el-col :span="24">
<el-scrollbar class="scroBox">
<el-card class="tispMsg" shadow="always">
<AppPageList v-if="appInitData.pageList"
<AppPageList
v-if="appInitData.pageList"
:data="stateList.tableData"
:search-data="stateList.searchData"
:config="stateList.config"
@ -363,14 +385,12 @@ function optionsValue3Get3(data: any,fieldName: string){
add-url="addData"
@optionsValue3Get3="optionsValue3Get3"
/>
</el-card>
</el-scrollbar>
</el-col>
</el-row>
</template>
<style lang='scss' scoped>
<style lang="scss" scoped>
.pageBox {
padding: 0 15px;
.wordFont {
@ -381,7 +401,7 @@ function optionsValue3Get3(data: any,fieldName: string){
display: flex;
align-items: center;
justify-content: space-between;
background-color: #FFFFFF;
background-color: #ffffff;
padding: 15px 15px 5px 15px;
margin-bottom: 15px;
}

Loading…
Cancel
Save