diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index d044462a5..c6496a674 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -966,6 +966,15 @@ "resolved": "https://registry.npmmirror.com/@types/event-emitter/-/event-emitter-0.3.4.tgz", "integrity": "sha512-q68CMfgGnlwrV6BFupIGNSitHbuFhGzA+uTBztFKAQuGCF/Xy0mi33jwEPQaHtnb89cLFlsc7AIxk/2gdtXrvw==" }, + "node_modules/@types/jquery": { + "version": "3.5.29", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.29.tgz", + "integrity": "sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg==", + "dev": true, + "dependencies": { + "@types/sizzle": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.14", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.14.tgz", @@ -1027,6 +1036,12 @@ "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", "dev": true }, + "node_modules/@types/sizzle": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz", + "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", + "dev": true + }, "node_modules/@types/spark-md5": { "version": "3.0.4", "resolved": "https://registry.npmmirror.com/@types/spark-md5/-/spark-md5-3.0.4.tgz", @@ -5265,6 +5280,11 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + }, "node_modules/js-base64": { "version": "2.6.4", "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz", @@ -9747,7 +9767,7 @@ }, "node_modules/unplugin-vue-components": { "version": "0.24.1", - "resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.24.1.tgz", + "resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-0.24.1.tgz", "integrity": "sha512-T3A8HkZoIE1Cja95xNqolwza0yD5IVlgZZ1PVAGvVCx8xthmjsv38xWRCtHtwl+rvZyL9uif42SRkDGw9aCfMA==", "dev": true, "dependencies": { @@ -9765,6 +9785,9 @@ "engines": { "node": ">=14" }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, "peerDependencies": { "@babel/parser": "^7.15.8", "@nuxt/kit": "^3.2.2", diff --git a/package-lock.json b/package-lock.json index 1d1bca102..0485ed049 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "echarts": "^5.4.3", "element-plus": "^2.3.4", "font-awesome": "^4.7.0", + "jquery": "^3.7.1", "js-beautify": "^1.14.8", "js-md5": "^0.7.3", "mapv-three": "^1.0.18", @@ -46,6 +47,7 @@ "@commitlint/cli": "^17.6.3", "@commitlint/config-conventional": "^17.6.3", "@iconify-json/ep": "^1.1.10", + "@types/jquery": "^3.5.29", "@types/md5": "^2.3.2", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", @@ -1363,6 +1365,15 @@ "resolved": "https://registry.npmmirror.com/@types/event-emitter/-/event-emitter-0.3.4.tgz", "integrity": "sha512-q68CMfgGnlwrV6BFupIGNSitHbuFhGzA+uTBztFKAQuGCF/Xy0mi33jwEPQaHtnb89cLFlsc7AIxk/2gdtXrvw==" }, + "node_modules/@types/jquery": { + "version": "3.5.29", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.29.tgz", + "integrity": "sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg==", + "dev": true, + "dependencies": { + "@types/sizzle": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.14", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.14.tgz", @@ -1424,6 +1435,12 @@ "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", "dev": true }, + "node_modules/@types/sizzle": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz", + "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", + "dev": true + }, "node_modules/@types/spark-md5": { "version": "3.0.4", "resolved": "https://registry.npmmirror.com/@types/spark-md5/-/spark-md5-3.0.4.tgz", @@ -5675,6 +5692,11 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + }, "node_modules/js-base64": { "version": "2.6.4", "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz", @@ -10157,7 +10179,7 @@ }, "node_modules/unplugin-vue-components": { "version": "0.24.1", - "resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.24.1.tgz", + "resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-0.24.1.tgz", "integrity": "sha512-T3A8HkZoIE1Cja95xNqolwza0yD5IVlgZZ1PVAGvVCx8xthmjsv38xWRCtHtwl+rvZyL9uif42SRkDGw9aCfMA==", "dev": true, "dependencies": { @@ -10175,6 +10197,9 @@ "engines": { "node": ">=14" }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, "peerDependencies": { "@babel/parser": "^7.15.8", "@nuxt/kit": "^3.2.2", diff --git a/package.json b/package.json index d2856036f..d25cd9ece 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "echarts": "^5.4.3", "element-plus": "^2.3.4", "font-awesome": "^4.7.0", + "jquery": "^3.7.1", "js-beautify": "^1.14.8", "js-md5": "^0.7.3", "mapv-three": "^1.0.18", @@ -77,6 +78,7 @@ "@commitlint/cli": "^17.6.3", "@commitlint/config-conventional": "^17.6.3", "@iconify-json/ep": "^1.1.10", + "@types/jquery": "^3.5.29", "@types/md5": "^2.3.2", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts index c71c34c12..ac414fdfe 100644 --- a/src/api/DesignForm/requestapi.ts +++ b/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 + }); +} diff --git a/src/api/date/type.ts b/src/api/date/type.ts index 045f4e09e..12c679d6b 100644 --- a/src/api/date/type.ts +++ b/src/api/date/type.ts @@ -65,3 +65,131 @@ export interface dataBaseStruct { id?: string; redashDatasourceId?: number; } + +/** +@ 作者: 秦东 +@ 时间: 2024-04-22 11:43:21 +@ 功能: 自建应用菜单树结构 +*/ +export interface appMenuTreeInfo { + id:string; //节点唯一识别符 + label:string; //节点名称 + type:number; //节点类型 1:目录;2:菜单;3:必定存在 + 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 +@ 功能: 实验拖拽树 +*/ +export let threeShiyanData = [ + { + id:"1", + svg:"chaoSongWoDe", + label:"Hr管理", + type:1, + children:[ + { + id:"2", + svg:"chaoSongWoDe", + label:"Hr看板", + type:2, + children:[] + }, + { + id:"3", + svg:"chaoSongWoDe", + label:"员工档案", + type:2, + children:[] + }, + { + id:"4", + svg:"chaoSongWoDe", + label:"绩效考核", + type:1, + children:[ + { + id:"5", + svg:"chaoSongWoDe", + label:"统计分析", + type:1, + children:[ + { + id:"6", + svg:"chaoSongWoDe", + label:"综合成绩", + type:2, + children:[] + }, + { + id:"7", + svg:"chaoSongWoDe", + label:"指标分析", + type:2, + children:[] + } + ] + }, + { + id:"8", + svg:"chaoSongWoDe", + label:"考核方案", + type:1, + children:[ + { + id:"9", + svg:"chaoSongWoDe", + label:"方案生成", + type:2, + children:[] + } + ] + } + ] + }, + { + id:"10", + svg:"chaoSongWoDe", + label:"考勤管理", + type:2, + children:[] + }, + ] + }, + { + id:"11", + svg:"chaoSongWoDe", + label:"应用管理", + type:1, + children:[ + { + id:"", + svg:"chaoSongWoDe", + label:"应用中心", + type:2, + children:[] + }, + ] + } +]; diff --git a/src/assets/icons/chaoSongWoDe.svg b/src/assets/icons/chaoSongWoDe.svg new file mode 100644 index 000000000..6168047d4 --- /dev/null +++ b/src/assets/icons/chaoSongWoDe.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/daiWoCuLi.svg b/src/assets/icons/daiWoCuLi.svg new file mode 100644 index 000000000..e9722ef28 --- /dev/null +++ b/src/assets/icons/daiWoCuLi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/fenZhu.svg b/src/assets/icons/fenZhu.svg new file mode 100644 index 000000000..21d2b6ad6 --- /dev/null +++ b/src/assets/icons/fenZhu.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/liuChengBiaoDan.svg b/src/assets/icons/liuChengBiaoDan.svg new file mode 100644 index 000000000..bb660b041 --- /dev/null +++ b/src/assets/icons/liuChengBiaoDan.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/puTongBiaoDan.svg b/src/assets/icons/puTongBiaoDan.svg new file mode 100644 index 000000000..2395bf465 --- /dev/null +++ b/src/assets/icons/puTongBiaoDan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/woChuangJianDe.svg b/src/assets/icons/woChuangJianDe.svg new file mode 100644 index 000000000..1723efbf7 --- /dev/null +++ b/src/assets/icons/woChuangJianDe.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/woYiChuLi.svg b/src/assets/icons/woYiChuLi.svg new file mode 100644 index 000000000..a1b4454a2 --- /dev/null +++ b/src/assets/icons/woYiChuLi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/ziJianApp.svg b/src/assets/icons/ziJianApp.svg new file mode 100644 index 000000000..fcf841ae5 --- /dev/null +++ b/src/assets/icons/ziJianApp.svg @@ -0,0 +1 @@ + diff --git a/src/assets/images/13.png b/src/assets/images/13.png new file mode 100644 index 000000000..96e90550b Binary files /dev/null and b/src/assets/images/13.png differ diff --git a/src/assets/images/3.png b/src/assets/images/3.png index 96e90550b..9c3543358 100644 Binary files a/src/assets/images/3.png and b/src/assets/images/3.png differ diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index 588f78504..76d13c258 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -599,6 +599,19 @@ const selectOption: any = [ iconFont: 'fa-wpforms', control: { modelValue: '', + hideConditionHtml:'', + hideConditionHtmlCopy:'', + formid: '', + dataRangeConditionHtml:'', + dataRangeConditionHtmlCopy:'', + saveFlag: false, + fillRoles: [ + { + leftValue:'', + rightValue:'', + id:'', + } + ], }, config: {} } diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index 680c9d65a..515cad92c 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -626,6 +626,30 @@ vIf: state.isSearch, vShow: ['associatedForms'] }, + { + label: '关联表单', + value: config.associatedForms, + path: 'config.associatedForms', + type: 'associatedForms_form', + vIf: state.isSearch, + vShow: ['associatedForms'] + }, + { + label: '数据范围', + value: config.associatedForms, + path: 'config.associatedForms', + type: 'associatedForms_dataRange', + vIf: state.isSearch, + vShow: ['associatedForms'] + }, + { + label: '数据填充规则', + value: config.associatedForms, + path: 'config.associatedForms', + type: 'associatedForms_FillRoles', + vIf: state.isSearch, + vShow: ['associatedForms'] + }, { label: '轮播图设置', value: config.carousel, @@ -1543,6 +1567,8 @@ element.imgId = onlyNumber; } }); + }else if(controlData.value.type==='associatedForms'){ + controlData.value.control.fillRoles[0].id = uuidv4().replaceAll('-','').toString(); } }) //轮播图图片上传成功钩子 @@ -1654,6 +1680,7 @@ interface Tree { [key: string]: any } + const addRootNode = () => { let onlyNumber = uuidv4().replaceAll('-','').toString(); controlData.value.control.fixedOptions.push({ @@ -1741,20 +1768,26 @@ const transferDataSourceOptions = [ //liwenxuan20240403 associatedForms start +import AssociatedFormsTinyace from '@/widget/associatedforms/associatedFormsTinyace.vue' +import AssociatedFormsTinyaceRange from '@/widget/associatedforms/associatedFormsTinyaceRange.vue' +import AssociatedFormsFillRole from '@/widget/associatedforms/associatedFormsFillRole.vue' -const associatedFormsHideDialogFlag = ref(false) - -const defaultProps = { +const treeDefaultProps = { children: 'children', label: 'label', } +//拿到子组件AssociatedFormsTinyace的实例 +let aft = ref(); +const aftRange = ref(); function getAssociatedFormsCurrentFieldTree() { + return request({ url: '/javasys/lowCode/AssociatedForms/getFieldTree', method: 'post', data: { - cfid:'1' + //cfid:'13' + cfid:props.customerformid }, }); } @@ -1765,29 +1798,112 @@ function getAssociatedFormsOrgAndManTree() { method: 'post', }); } -const associatedFormsCurrentFormFieldTree = ref() -getAssociatedFormsCurrentFieldTree().then(({ data }) => { +function getCustomerFormList() { + return request({ + url: '/javasys/lowCode/AssociatedForms/getCustomerFormList', + method: 'post', + }); +} +function getAssociatedFormsRoleTree() { + return request({ + url: '/javasys/lowCode/AssociatedForms/getRoleList', + method: 'post', + }); +} + +function getAsfasfFieldTree() { + return request({ + url: '/javasys/lowCode/AssociatedForms/getFieldTree', + method: 'post', + data: { + //cfid:'13' + cfid:controlData.value.control.formid + }, + }); +} + + +const asfasfFieldTree = ref() + +function formidChanged(){ + + if(controlData.value.control.formid===''){ + + }else{ + getAsfasfFieldTree().then(({ data }) => { + + if(data.id==="cfid为空"){ + //alert("cfid为空") + }else{ + let resData = ref(data.children) + //let rootid_ = data.value.label + asfasfFieldTree.value = [{ + id: 'rootid_'+data.label, + label: '关联的表单-'+data.label, + children: [...resData.value], + treeAttrs: data.treeAttrs, + }] + } + }); + } +} + +const associatedFormsCurrentFormFieldTree = ref() +getAssociatedFormsCurrentFieldTree().then(({ data }) => { + + if(data.id==="cfid为空"){ + //alert("cfid为空") + }else{ let resData = ref(data.children) - //let rootid_ = data.value.label - associatedFormsCurrentFormFieldTree.value = [{ + //let rootid_ = data.value.label + associatedFormsCurrentFormFieldTree.value = [{ id: 'rootid_'+data.label, - label: '当前表单', - children: [...resData.value] + label: '当前表单', + children: [...resData.value], + treeAttrs: data.treeAttrs, }] + } +}); + + + +const customerFormTree = ref() +getCustomerFormList().then(({ data }) => { + let resData = ref(data.children) + customerFormTree.value = [{ + id: data.id, + //value: data.value, + //label: data.label, + label: '请选择表单', + children: [...resData.value] + }] }); + const orgAndManTree = ref() - getAssociatedFormsOrgAndManTree().then(({ data }) => { - let resData = ref(data.children) - orgAndManTree.value = [{ - id: data.id, - //label: data.label, - label: '组织机构', - children: [...resData.value] - }] +getAssociatedFormsOrgAndManTree().then(({ data }) => { + let resData = ref(data.children) + orgAndManTree.value = [{ + id: data.id, + //label: data.label, + label: '组织机构', + children: [...resData.value] + }] }); +const roleTree = ref() +getAssociatedFormsRoleTree().then(({ data }) => { + let resData = ref(data.children) + //console.log("roleTree=============="+resData.value); + roleTree.value = [{ + id: data.id, + //label: data.label, + label: '角色', + children: [...resData.value] + }] +}); +// field const fieldTreeSearchFlag = ref(false) function handleFieldTreeExpand(){ @@ -1799,29 +1915,245 @@ function handleFieldTreeCollapse(){ fieldTreeSearchFlag.value = false; } -function handleFieldTreeNodeclick(){ + + +function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ + aft.value.addIcon_field(object) +} +function handleFieldTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){ + aftRange.value.addIcon_field(object) +} + + + +//org +const orgTreeSearchFlag = ref(false) + +function handleOrgTreeExpand(){ + orgTreeSearchFlag.value = true; } -function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ - //console.log(MouseEvent) - console.log(object) - //console.log(Node) - //console.log(element) +function handleOrgTreeCollapse(){ + + orgTreeSearchFlag.value = false; } + +function handleOrgTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ + aft.value.addIcon_org(object) +} +function handleOrgTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){ + aftRange.value.addIcon_org(object) +} +//role +const roleTreeSearchFlag = ref(false) + +function handleRoleTreeExpand(){ + + roleTreeSearchFlag.value = true; +} + +function handleRoleTreeCollapse(){ + + roleTreeSearchFlag.value = false; +} + +function handleRoleTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ + aft.value.addIcon(object) +} +function handleRoleTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){ + aftRange.value.addIcon(object) +} + + import { ElTree } from 'element-plus' + + const fieldTreeFilterText = ref('') +const orgTreeFilterText = ref('') +const roleTreeFilterText = ref('') const fieldTreeRef = ref>() - +const orgTreeRef = ref>() +const roleTreeRef = ref>() watch(fieldTreeFilterText, (val) => { fieldTreeRef.value!.filter(val) }) +watch(orgTreeFilterText, (val) => { + orgTreeRef.value!.filter(val) +}) +watch(roleTreeFilterText, (val) => { + roleTreeRef.value!.filter(val) +}) const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => { if (!value) return true return associatedFormsCurrentFormFieldTree.label.includes(value) } +//关联表单隐藏条件弹窗flag +const associatedFormsHideDialogFlag = ref(false) + +const associatedFormsDataRangeDialogFlag = ref(false) + + + + + +//点击开启隐藏设置 +function associatedFormsHideDialoghandle(){ + + associatedFormsHideDialogFlag.value = true + controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml + nextTick(() => { + aft.value.focusEditor() + }) + +} + + + +function associatedFormsDataRangeDialoghandle(){ + + getAsfasfFieldTree().then(({ data }) => { + + if(data.id==="cfid为空"){ + //alert("cfid为空") + }else{ + let resData = ref(data.children) + //let rootid_ = data.value.label + asfasfFieldTree.value = [{ + id: 'rootid_'+data.label, + label: '关联的表单-'+data.label, + children: [...resData.value], + treeAttrs: data.treeAttrs, + }] + } + }); + + + + associatedFormsDataRangeDialogFlag.value = true + controlData.value.control.dataRangeConditionHtmlCopy = controlData.value.control.dataRangeConditionHtml + + nextTick(() => { + aftRange.value.focusEditor() + }) + +} + +//自定义事件同步父子组件的text +function aftTextChanged(str:string){ + controlData.value.control.hideConditionHtml = str +} + +function aftTextChangedRange(str:string){ + controlData.value.control.dataRangeConditionHtml = str +} +//asf隐藏条件取消编辑 +function asfhTextCancel(){ + determine.value = false + associatedFormsHideDialogFlag.value = false + controlData.value.control.hideConditionHtml = controlData.value.control.hideConditionHtmlCopy + //父组件取消将copy同步至子组件 + aft.value.handelCancel(controlData.value.control.hideConditionHtmlCopy) +} + +function asfhTextCancelRange(){ + determineRange.value = false + associatedFormsDataRangeDialogFlag.value = false + controlData.value.control.dataRangeConditionHtml = controlData.value.control.dataRangeConditionHtmlCopy + //父组件取消将copy同步至子组件 + aftRange.value.handelCancel(controlData.value.control.dataRangeConditionHtmlCopy) +} + +//上次点击了确定为true +let determine = ref(true) +let determineRange = ref(true) +//监听associatedFormsHideDialogFlag true 重新init tinymce +watch(associatedFormsHideDialogFlag, (val) => { + if(val===true&&determine.value===false){ + setTimeout(() => { + aft.value.tinymceReInit() + }, 200); + } +}) + +watch(associatedFormsDataRangeDialogFlag, (val) => { + if(val===true&&determineRange.value===false){ + setTimeout(() => { + aftRange.value.tinymceReInit() + }, 200); + } +}) + +//确定回调 +function handleDetermine(){ + associatedFormsHideDialogFlag.value = false + determine.value = true + controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml +} +function handleDetermineRange(){ + associatedFormsDataRangeDialogFlag.value = false + determineRange.value = true + controlData.value.control.dataRangeConditionHtmlCopy = controlData.value.control.dataRangeConditionHtml +} +//数据填充规则 + +const associatedFormsFillRolesDialogFlag = ref(false) +//数据填充规则设置按钮 +function associatedFormsDataFillRolesDialoghandle(){ + if(controlData.value.control.formid===''){ + alert("请先选择要关联的表单") + + }else{ + associatedFormsFillRolesDialogFlag.value = true + } +} + +function asfhTextCancelFillRoles(){ + associatedFormsFillRolesDialogFlag.value = false +} +//数据填充规则确定按钮 +function handleDetermineFillRoles(){ + + associatedFormsFillRolesDialogFlag.value = false +} + + +watch(()=>store.activeKey, () => { + if(controlData.value.type==='associatedForms'){ + setTimeout(() => { + formidChanged() + }, 800); + } +}) + + +function addFillRole(){ + let onlyNumber = uuidv4().replaceAll('-','').toString(); //获取唯一编码 + controlData.value.control.fillRoles.push({ + leftValue:'', + rightValue:'', + id:onlyNumber, + }) +} + +function delRole(id:String){ + const delRoleData:any = controlData.value.control.fillRoles + for (var i = 0; i < delRoleData.length; i++) { + if(delRoleData[i].id===id){ + delRoleData.splice(i, 1); + i--; // 如果不减,将漏掉一个元素 + } + } +} + + +//liwenxuan20240403 associatedForms end + + + + const optionsCss = [ @@ -1907,6 +2239,9 @@ const gainFormGroupList = () =>{ }) } onMounted(() => { + + + gainFormGroupList() }) @@ -2277,10 +2612,39 @@ const loadNextPage = () => { - 设置隐藏条件 - + 设置隐藏条件 +
+
+ + + +
+ +
+ +
+ + + 设置数据范围 +
+
+ + + + 设置数据填充规则 + + + { - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/src/components/IconSelect/svgPage.vue b/src/components/IconSelect/svgPage.vue new file mode 100644 index 000000000..5511eece8 --- /dev/null +++ b/src/components/IconSelect/svgPage.vue @@ -0,0 +1,87 @@ + + + + diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue index 07b65e8dd..f49176214 100644 --- a/src/components/SvgIcon/index.vue +++ b/src/components/SvgIcon/index.vue @@ -21,7 +21,7 @@ const props = defineProps({ }, color: { type: String, - default: "", + default: "currentColor", }, size: { type: String, diff --git a/src/router/index.ts b/src/router/index.ts index b4448abdb..d068ba1f8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,5 +1,5 @@ import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router"; - +import CreatePage from "@/views/sysworkflow/codepage/createpage.vue"; export const Layout = () => import("@/layout/index.vue"); // 静态路由 @@ -13,6 +13,11 @@ export const constantRoutes: RouteRecordRaw[] = [ path: "/redirect/:path(.*)", component: () => import("@/views/redirect/index.vue"), }, + { + path:"/create", + name: "create", + component: () => import('@/views/sysworkflow/codepage/createpage.vue'), + } ], }, @@ -51,6 +56,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, ], }, + // 外部链接 /*{ diff --git a/src/types/components.d.ts b/src/types/components.d.ts index e2838bd1b..f9db34acf 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -11,6 +11,7 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { AceDrawer: typeof import('./../components/DesignForm/aceDrawer.vue')['default'] AddNode: typeof import('./../components/workflow/addNode.vue')['default'] + AppMenuSvgPage: typeof import('./../components/IconSelect/appMenuSvgPage.vue')['default'] ApproverDrawer: typeof import('./../components/workflow/drwer/approverDrawer.vue')['default'] BianXian: typeof import('./../components/DesignForm/designLayout/bianXian.vue')['default'] Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] @@ -110,7 +111,17 @@ declare module '@vue/runtime-core' { IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default'] IEpClose: typeof import('~icons/ep/close')['default'] +<<<<<<< HEAD IEpSetting: typeof import('~icons/ep/setting')['default'] +======= + IEpDelete: typeof import('~icons/ep/delete')['default'] + IEpEdit: typeof import('~icons/ep/edit')['default'] + IEpPlus: typeof import('~icons/ep/plus')['default'] + IEpRefresh: typeof import('~icons/ep/refresh')['default'] + IEpSearch: typeof import('~icons/ep/search')['default'] + IEpSetting: typeof import('~icons/ep/setting')['default'] + IEpView: typeof import('~icons/ep/view')['default'] +>>>>>>> v8_master LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] LayoutPage: typeof import('./../components/DesignForm/layoutPage/index.vue')['default'] List: typeof import('./../components/DesignForm/public/form/components/list.vue')['default'] @@ -135,6 +146,7 @@ declare module '@vue/runtime-core' { SingleUpload: typeof import('./../components/Upload/SingleUpload.vue')['default'] SizeSelect: typeof import('./../components/SizeSelect/index.vue')['default'] SvgIcon: typeof import('./../components/SvgIcon/index.vue')['default'] + SvgPage: typeof import('./../components/IconSelect/svgPage.vue')['default'] TableListPage: typeof import('./../components/DesignForm/tableListPage/index.vue')['default'] Template: typeof import('./../components/DesignForm/template.vue')['default'] TextPage: typeof import('./../components/DesignForm/designLayout/textPage.vue')['default'] diff --git a/src/views/sysworkflow/codepage/createpage.vue b/src/views/sysworkflow/codepage/createpage.vue new file mode 100644 index 000000000..c29609219 --- /dev/null +++ b/src/views/sysworkflow/codepage/createpage.vue @@ -0,0 +1,594 @@ + + + + diff --git a/src/views/sysworkflow/codepage/editpage.vue b/src/views/sysworkflow/codepage/editpage.vue new file mode 100644 index 000000000..6f4a37aa2 --- /dev/null +++ b/src/views/sysworkflow/codepage/editpage.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/src/views/sysworkflow/codepage/page.vue b/src/views/sysworkflow/codepage/page.vue index 4d85332a1..217e483f1 100644 --- a/src/views/sysworkflow/codepage/page.vue +++ b/src/views/sysworkflow/codepage/page.vue @@ -1,213 +1,252 @@ - diff --git a/src/views/sysworkflow/codepage/page0318.vue b/src/views/sysworkflow/codepage/page0318.vue new file mode 100644 index 000000000..7284b0f41 --- /dev/null +++ b/src/views/sysworkflow/codepage/page0318.vue @@ -0,0 +1,213 @@ + + + + diff --git a/src/views/sysworkflow/lowcodepage/appFormList.vue b/src/views/sysworkflow/lowcodepage/appFormList.vue index 854c8a1b9..573ac8c0b 100644 --- a/src/views/sysworkflow/lowcodepage/appFormList.vue +++ b/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("") +/** +@ 作者: 秦东 +@ 时间: 2024-04-23 15:30:17 +@ 功能: 编辑app内容 +*/ +const editAppCont = (val:string) => { + appKey.value = val.toString(); + appPageShow.value = true; +}