diff --git a/src/assets/paintboard.png b/src/assets/paintboard.png index 252b4631e..f2c79e0bb 100644 Binary files a/src/assets/paintboard.png and b/src/assets/paintboard.png differ diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index 7d739262f..5513bbdbd 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -12,757 +12,792 @@ const selectOption: any = [ label: '标签3', value: 'value3' }*/ - ] - const config: { optionsType: number } = { +] +const config: { optionsType: number } = { optionsType: 0 // 0固定 1数据源 2 接口字典 - } - export default [ +} +export default [ { - title: '基础字段', - children: [ - { - type: 'input', - label: '单行文本', - icon: 'input', - iconFont: 'fa-text-width', - control: { - // 组件所有属性 - modelValue: '' - }, - config: {}, // 其他配置信息 - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'digitpage', - label: '数值', - icon: 'money', - iconFont: 'fa-money', - control: { - // 组件所有属性 - modelValue: '', - mathFormula:{ - formulaHtml:'', - mathsString:'', - mathsFormula:'', - takingMethod:1, - digit:2 - } - }, - config: {}, // 其他配置信息 - selectvalue: "default", - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'textarea', - label: '多行文本', - icon: 'textarea', - iconFont: 'fa-text-height', - control: { - modelValue: '' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'radio', - label: '单选框组', - icon: 'radio', - iconFont: 'fa-dot-circle-o', - control: { - modelValue: '', - glxxsz:[], - }, - options: selectOption, // 下拉选项数据集合 - config: config, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'checkbox', - label: '多选框组', - icon: 'checkbox', - iconFont: 'fa-check-square-o', - control: { - modelValue: [], - glxxszForCheckBox:[], - }, - options: selectOption, - config: config, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'select', - label: '下拉选择框', - icon: 'select', - iconFont: 'fa-toggle-down', - control: { - modelValue: '', - appendToBody: true, - glxxsz:[], - }, - options: selectOption, - config: config, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'datePicker', - label: '日期选择器', - icon: 'todo', - iconFont: 'fa-calendar', - control: { - modelValue: '', - type: 'date' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'timePicker', - label: '时间选择器', - icon: 'time', - iconFont: 'fa-clock-o', - control: { - modelValue: '' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'switch', - label: '开关', - icon: 'switch', - iconFont: 'fa-toggle-on', - control: { - modelValue: false - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'inputNumber', - label: '计数器', - icon: 'number', - iconFont: 'fa-sort-numeric-asc', - control: { - modelValue: 0 - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'cascader', - label: '级联选择器', - icon: 'cascader', - iconFont: 'fa-sitemap', - control: { - modelValue: [] - }, - options: [], - config: config, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'rate', - label: '评分', - icon: 'rate', - iconFont: 'fa-star-o', - control: { - modelValue: 0 - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'slider', - label: '滑块', - icon: 'slider', - iconFont: 'fa-sliders', - control: { - modelValue: 0 - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'treeSelect', - label: '树形控件', - icon: 'tree2', - iconFont: '', - control: { - modelValue: '', - data: [], - renderAfterExpand: false - }, - config: { - optionsType: 0 - }, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'txt', - label: '文字', - icon: 'text', - iconFont: 'fa-file-word-o', - control: { - modelValue: '' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'title', - label: '标题', - icon: 'title', - iconFont: 'fa-header', - control: { - modelValue: '标题' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'button', - label: '按钮', - icon: 'button', - iconFont: 'fa-square-o', - control: { - label: '保存' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'serialNumber', - label: '编码', - icon: 'number', - iconFont: 'fa-list-ol', - control: { - }, - config: { - automatic:false - }, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'urllink', - label: '链接', - icon: 'link', - iconFont: 'fa-link', - control: { - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'organization', - label: '联系地址', - icon: 'marker', - iconFont: 'fa-map-marker', - control: { - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'baidumap', - label: '地图', - icon: 'map', - iconFont: 'fa-map-o', - control: { - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - - type: 'colorPicker', - label: '取色器', - icon: 'color', - iconFont: '', - control: { - modelValue: '' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'orgCentent', - label: '行政组织', - icon: 'sliders', - iconFont: 'fa-sliders', - control: { - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'signaturemap', - label: '签名板', - icon: 'faedit', - iconFont: 'fa-edit', - control: { - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - } - ] + title: '基础字段', + children: [ + { + type: 'title', + label: '标题', + icon: 'title', + iconFont: 'fa-header', + control: { + modelValue: '标题' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'digitpage', + label: '数值', + icon: 'money', + iconFont: 'fa-money', + control: { + // 组件所有属性 + modelValue: '', + mathFormula: { + formulaHtml: '', + mathsString: '', + mathsFormula: '', + takingMethod: 1, + digit: 2 + } + }, + config: {}, // 其他配置信息 + selectvalue: "default", + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'input', + label: '单行文本', + icon: 'input', + iconFont: 'fa-text-width', + control: { + // 组件所有属性 + modelValue: '' + }, + config: {}, // 其他配置信息 + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + + { + type: 'textarea', + label: '多行文本', + icon: 'textarea', + iconFont: 'fa-text-height', + control: { + modelValue: '' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'radio', + label: '单选框组', + icon: 'radio', + iconFont: 'fa-dot-circle-o', + control: { + modelValue: '', + glxxsz: [], + optionsValue3Formid:'', + optionsValue3Field:'', + }, + options: selectOption, // 下拉选项数据集合 + config: config, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'checkbox', + label: '多选框组', + icon: 'checkbox', + iconFont: 'fa-check-square-o', + control: { + modelValue: [], + glxxszForCheckBox: [], + optionsValue3Formid:'', + optionsValue3Field:'', + }, + options: selectOption, + config: config, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'select', + label: '下拉选择框', + icon: 'select', + iconFont: 'fa-toggle-down', + control: { + modelValue: '', + appendToBody: true, + glxxsz: [], + optionsValue3Formid:'', + optionsValue3Field:'', + }, + options: selectOption, + config: config, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'cascader', + label: '级联选择器', + icon: 'cascader', + iconFont: 'fa-sitemap', + control: { + modelValue: [] + }, + options: [], + config: config, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'datePicker', + label: '日期选择器', + icon: 'todo', + iconFont: 'fa-calendar', + control: { + modelValue: '', + type: 'date' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'timePicker', + label: '时间选择器', + icon: 'time', + iconFont: 'fa-clock-o', + control: { + modelValue: '' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'txt', + label: '文字描述', + icon: 'text', + iconFont: 'fa-file-word-o', + control: { + modelValue: '' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'organization', + label: '联系地址', + icon: 'marker', + iconFont: 'fa-map-marker', + control: { + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'switch', + label: '开关', + icon: 'switch', + iconFont: 'fa-toggle-on', + control: { + modelValue: "", + glxxszSwitch: [ + { + conditionField: '', + openValue: "", + showFields: [] + }, + { + conditionField: '', + offValue: "", + showFields: [] + }, + ] + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'button', + label: '按钮', + icon: 'button', + iconFont: 'fa-square-o', + control: { + label: '保存' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'inputNumber', + label: '计数器', + icon: 'number', + iconFont: 'fa-sort-numeric-asc', + control: { + modelValue: 0 + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + + + + + + + + + + + + + + + ] }, { - title: '高级字段', - children: [ - { - type: 'table', - label: '子表', - icon: 'table', - iconFont: 'fa-table', - list: [], - tableData: [], // 子表表格列表数据集合 - control: { - border: true - }, - config: { - addBtnText: '添加一行' - }, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'component', - label: '自定义组件', - icon: 'component', - iconFont: 'fa-cubes', - control: { - modelValue: '' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - /*template: '', // 组件模板名称 - component: '' // 根据template注入的组件*/ - }, - { - - type: 'upload', - label: '图片/文件', - icon: 'image', - iconFont: 'fa-file-image-o', - control: { - modelValue: '' // 也可以是[{name:'',url:''}]形式 - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - - }, - { - type: 'tinymce', - label: '富文本', - icon: 'tinymce', - iconFont: '', - control: { - modelValue: '' - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'videoUpAndPlay', - label: '视频', - icon: '', - iconFont: 'fa-play-circle', - control: { - modelValue: '', - videoMsg:[{ - CreatedAt: '', - UpdatedAt: '', - fileSize: "0n", - id: "0n", - key: '', - name: '', - physicspath: '', - size: '', - tag: '', - type: 0, - url: '', - videoReady: false, - videoHeight:400, - videoWidth:700, - videoAutoPlay: false, - attrId: '', - poster:'', - loop: false - }] - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'lowcodeCarsusel', - label: '轮播图', - icon: '', - iconFont: 'fa-window-restore', - control: { - modelValue: '', - carsuselConfigArr:[{ - uploadFlag:false, - imgId:'', - imgSort:1, - imgUrl: '', - link: '' - }], + title: '布局字段', + children: [ + { + type: 'grid', + label: '格栅布局', + icon: 'grid', + iconFont: 'fa-th-large', + columns: [ + // 格栅列数据 + { + attr: { span: 12 }, + list: [] + }, + { + attr: { span: 12 }, + list: [] + } + ], + control: {}, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'card', + label: '卡片布局', + icon: 'card', + iconFont: 'fa-credit-card', + list: [], + control: {}, + config: {}, + item: {}, // label标题相关 + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'flex', + label: '弹性布局', + icon: 'flex', + iconFont: 'fa-file-text-o', + list: [], + tableData: [], // 值集合 + control: {}, config: { - carsuselWidth:448, - carsuselHeight:252, - interval:2000, + addBtnText: '添加一行' + }, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} } }, - - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'lowcodeTransfer', - label: '穿梭框', - icon: '', - iconFont: 'fa-arrows-h', - control: { - modelValue: '', - fixedOptions: [{ - id: 'thefirstrootnode', - label: '根节点1', - disabled: false, - children: [] - }, - { - id: 'thesecondrootnode', - label: '根节点2', - disabled: false, - children: [] - }] - }, - config: { - transferName:'穿梭框', - transferDataSource:'固定选项', - apiUrl:'/javasys/lowCode/transfer/getOrgAndManTree', - method:'post', - } - }, - { - type: 'lowcodeImage', - label: '图片', - icon: '', - iconFont: 'fa-photo', - control: { - modelValue: '', - uploadFlag:false, - imgId:'', - imgUrl: '', - link: '', - fit:1, - radius:false, - radiusNum:5, - boderAndShadow:false, - showMode:'自定义像素值', - pxWidth:448, - pxHeight:252, - widthPercent:90, - heightPercent:90, - mt:0, - mb:0, - ml:0, - mr:0, - pt:0, - pb:0, - pl:0, - pr:0, - floatFlag:false, - floatValue:'left', - }, - config: {} - }, - { - type: 'associatedForms', - label: '关联表单', - icon: '', - iconFont: 'fa-wpforms', - control: { - modelValue: '', - hideConditionHtml:'', - hideConditionHtmlCopy:'', - formid: '', - dataRangeConditionHtml:'', - dataRangeConditionHtmlCopy:'', - saveFlag: false, - fillRoles: [ + { + type: 'div', + label: '容器', + icon: 'div', + iconFont: '', + control: {}, + config: {}, + list: [], + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'tabs', + label: '标签页', + icon: 'tabs', + iconFont: 'fa-folder-o', + columns: [ { - leftValue:'', - rightValue:'', - id:'', + label: 'Tab1', + list: [] } ], + control: {}, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + + { + type: 'divider', + label: '分割线', + icon: 'divider', + iconFont: '', + control: {}, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } }, - config: {} - } - - ] + + ] }, + { - title: '布局字段', - children: [ - { - type: 'grid', - label: '格栅布局', - icon: 'grid', - iconFont: 'fa-th-large', - columns: [ - // 格栅列数据 - { - attr: { span: 12 }, - list: [] - }, - { - attr: { span: 12 }, - list: [] - } - ], - control: {}, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'tabs', - label: '标签页', - icon: 'tabs', - iconFont: 'fa-folder-o', - columns: [ - { - label: 'Tab1', - list: [] - } - ], - control: {}, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'card', - label: '卡片布局', - icon: 'card', - iconFont: 'fa-credit-card', - list: [], - control: {}, - config: {}, - item: {}, // label标题相关 - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'flex', - label: '弹性布局', - icon: 'flex', - iconFont: 'fa-file-text-o', - list: [], - tableData: [], // 值集合 - control: {}, - config: { - addBtnText: '添加一行' - }, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'divider', - label: '分割线', - icon: 'divider', - iconFont: '', - control: {}, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'div', - label: '容器', - icon: 'div', - iconFont: '', - control: {}, - config: {}, - list: [], - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - } - ] + title: '高级控件', + children: [ + { + type: 'lowcodeImage', + label: '图片', + icon: '', + iconFont: 'fa-photo', + control: { + modelValue: '', + uploadFlag: false, + imgId: '', + imgUrl: '', + link: '', + fit: 1, + radius: false, + radiusNum: 5, + boderAndShadow: false, + showMode: '自定义像素值', + pxWidth: 448, + pxHeight: 252, + widthPercent: 90, + heightPercent: 90, + mt: 0, + mb: 0, + ml: 0, + mr: 0, + pt: 0, + pb: 0, + pl: 0, + pr: 0, + floatFlag: false, + floatValue: 'left', + }, + config: {} + }, + { + type: 'videoUpAndPlay', + label: '视频', + icon: '', + iconFont: 'fa-play-circle', + control: { + modelValue: '', + videoMsg: [{ + CreatedAt: '', + UpdatedAt: '', + fileSize: "0n", + id: "0n", + key: '', + name: '', + physicspath: '', + size: '', + tag: '', + type: 0, + url: '', + videoReady: false, + videoHeight: 400, + videoWidth: 700, + videoAutoPlay: false, + attrId: '', + poster: '', + loop: false + }] + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + + type: 'upload', + label: '文件', + icon: 'image', + iconFont: 'fa-file-image-o', + control: { + modelValue: '' // 也可以是[{name:'',url:''}]形式 + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + + }, + { + type: 'urllink', + label: '链接', + icon: 'link', + iconFont: 'fa-link', + control: { + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'table', + label: '子表', + icon: 'table', + iconFont: 'fa-table', + list: [], + tableData: [], // 子表表格列表数据集合 + control: { + border: true + }, + config: { + addBtnText: '添加一行' + }, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'baidumap', + label: '地图', + icon: 'map', + iconFont: 'fa-map-o', + control: { + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'slider', + label: '滑块', + icon: 'slider', + iconFont: 'fa-sliders', + control: { + modelValue: 0 + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'rate', + label: '评分', + icon: 'rate', + iconFont: 'fa-star-o', + control: { + modelValue: 0 + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'tinymce', + label: '富文本', + icon: 'tinymce',// + iconFont: 'fa-list-alt', + control: { + modelValue: '' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'lowcodeCarsusel', + label: '轮播图', + icon: '', + iconFont: 'fa-window-restore', + control: { + modelValue: '', + carsuselConfigArr: [{ + uploadFlag: false, + imgId: '', + imgSort: 1, + imgUrl: '', + link: '' + }], + config: { + carsuselWidth: 448, + carsuselHeight: 252, + interval: 2000, + } + }, + + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + + { + type: 'signaturemap', + label: '签名板', + icon: 'faedit', + iconFont: 'fa-edit', + control: { + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'lowcodeTransfer', + label: '穿梭框', + icon: '', + iconFont: 'fa-arrows-h', + control: { + modelValue: '', + fixedOptions: [{ + id: 'thefirstrootnode', + label: '根节点1', + disabled: false, + children: [] + }, + { + id: 'thesecondrootnode', + label: '根节点2', + disabled: false, + children: [] + }] + }, + config: { + transferName: '穿梭框', + transferDataSource: '固定选项', + apiUrl: '/javasys/lowCode/transfer/getOrgAndManTree', + method: 'post', + } + }, + { + + type: 'colorPicker', + label: '取色器', + icon: 'color', + iconFont: '', + control: { + modelValue: '' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'treeSelect', + label: '树形控件', + icon: 'tree2', + iconFont: '', + control: { + modelValue: '', + data: [], + renderAfterExpand: false + }, + config: { + optionsType: 0 + }, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'associatedForms', + label: '关联表单', + icon: '', + iconFont: 'fa-wpforms', + control: { + modelValue: '', + hideConditionHtml: '', + hideConditionHtmlCopy: '', + formid: '', + dataRangeConditionHtml: '', + dataRangeConditionHtmlCopy: '', + saveFlag: false, + asfasfLabel:'', + fillRoles: [ + { + leftValue: '', + rightValue: '', + id: '', + } + ], + }, + config: {} + }, + { + type: 'component', + label: '自定义组件', + icon: 'component', + iconFont: 'fa-cubes', + control: { + modelValue: '' + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + /*template: '', // 组件模板名称 + component: '' // 根据template注入的组件*/ + }, + + + + + + + + + ] }, + { - title: '扩展组件', - children: [ - { - type: 'expand-user', - label: '选择用户', - icon: 'user', - iconFont: 'fa-user-o', - control: { - // 组件所有属性 - modelValue: '' - }, - config: {}, // 其他配置信息 - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} - } - }, - { - type: 'orgCentent', - label: '行政组织', - icon: 'sliders', - iconFont: 'fa-sliders', - control: { - }, - config: {}, - styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} + title: '系统控件',//扩展组件 + children: [ + { + type: 'serialNumber', + label: '编码', + icon: 'number', + iconFont: 'fa-list-ol', + control: { + }, + config: { + automatic: false + }, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'expand-user', + label: '选择用户', + icon: 'user', + iconFont: 'fa-user-o', + control: { + // 组件所有属性 + modelValue: '' + }, + config: {}, // 其他配置信息 + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } + }, + { + type: 'orgCentent', + label: '选择组织', + icon: 'sliders', + iconFont: 'fa-sliders', + control: { + }, + config: {}, + styles: { + divStyle: {}, + labelStyle: {}, + inputStyle: {} + } } - } - ] + ] + }, + { + title: '扩展组件',// + chileren: [] } - ] - \ No newline at end of file +] diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index d7e815205..d9518656c 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -619,19 +619,19 @@ path: 'config.componentName', vShow: ['component'] }, - { - label: '隐藏条件', + { + label: '关联表单', value: config.associatedForms, path: 'config.associatedForms', - type: 'associatedForms_hide', + type: 'associatedForms_form', vIf: state.isSearch, vShow: ['associatedForms'] }, - { - label: '关联表单', + { + label: '隐藏条件', value: config.associatedForms, path: 'config.associatedForms', - type: 'associatedForms_form', + type: 'associatedForms_hide', vIf: state.isSearch, vShow: ['associatedForms'] }, @@ -1609,7 +1609,8 @@ let currentUploadImgid = ""; //刚拖拽视频组件时,初始化imgid监听designForm.activeKey,变化时,如果controlData.value.type=='lowcodeCarsusel',就遍历轮播图数组把imgid=''的都生成uuid - watch(()=>store.activeKey, () => { + watch(()=>store.activeKey, (newVal) => { + //啊啊啊啊 if(controlData.value.type==='lowcodeCarsusel'){ const carsuselConfigData:CarsuselConfig[] = controlData.value.control.carsuselConfigArr carsuselConfigData.forEach(element => { @@ -1623,6 +1624,35 @@ }else if(controlData.value.type==='associatedForms'){ controlData.value.control.fillRoles[0].id = uuidv4().replaceAll('-','').toString(); } + //实现关联表单设置可选字段中没有当前字段效果 start + //console.log(controlData.value.name) + resDataForGlxxszExceptself1 = JSON.parse(JSON.stringify(resDataForGlxxszExceptself)); + //console.log(resDataForGlxxszExceptself1) + + for(let i = 0;i() +const asfasfFieldTreeOptionsValue3 = ref() + function formidChanged(){ if(controlData.value.control.formid===''){ @@ -1898,14 +1941,85 @@ function formidChanged(){ treeAttrs: data.treeAttrs, }] } + controlData.value.control.asfasfLabel = data.label + }); + } + +} + +function formidChangedOptionsValue3(){ + if(controlData.value.control.optionsValue3Formid===''){ + + }else{ + getAsfasfFieldTreeOptionsValue3().then(({ data }) => { + + if(data.id==="cfid为空"){ + //alert("cfid为空") + }else{ + + if(data.treeAttrs.onlyToShowTableId==""){//当前选中的是主表 + let resData = ref(data.children) + //let rootid_ = data.value.label + asfasfFieldTreeOptionsValue3.value = [{ + id: 'rootid_'+data.label, + label: '关联的表单-'+data.label, + children: [...resData.value], + treeAttrs: data.treeAttrs, + }] + }else{//当前选中的是子表 + let resData = ref(data.children) + resData.value = resData.value.filter((item: { children: null }) => item.children != null) + let arr = JSON.parse(JSON.stringify(resData.value)); + arr = arr.filter( (item: { label: any }) => item.label == data.treeAttrs.onlyToShowTableId ) + + arr = arr[0].children + //console.log(arr) + asfasfFieldTreeOptionsValue3.value = [{ + id: 'rootid_'+data.label, + label: '关联的表单-'+data.label, + children: [...arr], + treeAttrs: data.treeAttrs, + }] + + + } + let optionsValue3Formid = controlData.value.control.optionsValue3Formid + let str_optionsValue3Formid = optionsValue3Formid.split(":")[0] + let optionsValue3Field = controlData.value.control.optionsValue3Field + let str_optionsValue3Field = optionsValue3Field.split(":")[1] + //alert(str_optionsValue3Field) + if(typeof(str_optionsValue3Field)!='undefined'){ + if(str_optionsValue3Formid!=str_optionsValue3Field){ + controlData.value.control.optionsValue3Field = "" + }else{ + if(optionsValue3Formid.includes(":zibiaoid-")){ + let zibiaoid = optionsValue3Formid.split(":zibiaoid-")[1] + if(!optionsValue3Field.includes(zibiaoid)){ + controlData.value.control.optionsValue3Field = "" + } + } + } + + + } + + + } + }); } } const associatedFormsCurrentFormFieldTree = ref() const associatedFormsCurrentFormFieldTreeForGlxxsz = ref() +let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref() +let resDataForGlxxszExceptself: any[] = [] +let resDataForGlxxszExceptself1: any[] = [] +let getAssociatedFormsCurrentFieldTreeData:any getAssociatedFormsCurrentFieldTree().then(({ data }) => { - + //console.log(data) + getAssociatedFormsCurrentFieldTreeData = JSON.parse(JSON.stringify(data)) + //console.log(getAssociatedFormsCurrentFieldTreeData) if(data.id==="cfid为空"){ //alert("cfid为空") }else{ @@ -1921,6 +2035,11 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { let resDataForGlxxsz = ref(data.children.slice(8)) + resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value)); + + //console.log(resDataForGlxxszExceptself) + + associatedFormsCurrentFormFieldTreeForGlxxsz.value = [{ id: 'rootid_'+data.label, @@ -1929,6 +2048,15 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { children: [...resDataForGlxxsz.value], treeAttrs: data.treeAttrs, }] + associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value = [{ + id: 'rootid_'+data.label, + //label: '当前表单', + label: '当前表单-'+data.treeAttrs.show, + children: [...resDataForGlxxsz.value], + treeAttrs: data.treeAttrs,//getAssociatedFormsCurrentFieldTreeData + }] + + } }); @@ -2191,6 +2319,11 @@ watch(()=>store.activeKey, () => { setTimeout(() => { formidChanged() }, 800); + }else if(controlData.value.type==='radio'||controlData.value.type==='select'||controlData.value.type==='checkbox'){ + + setTimeout(() => { + formidChangedOptionsValue3() + }, 800); } }) @@ -2213,6 +2346,14 @@ function delRole(id:String){ } } } +const associatedFormsChooseDialogFlag = ref(false) +function chooseAssociatedForm(){ + associatedFormsChooseDialogFlag.value = true +} +function handleDetermineAssociatedFormsChooseDialog(){ + associatedFormsChooseDialogFlag.value = false +} + //liwenxuan20240403 associatedForms end @@ -2222,6 +2363,14 @@ function delRole(id:String){ const glxxszDialogFlag = ref(false) const glxxszDialogFlagCheckBox = ref(false) +const glxxszDialogFlagSwitch = ref(false) +function handelGlxxszDialogSwitch(){ + if(controlData.value.control.activeValue==undefined||controlData.value.control.inactiveValue==undefined){ + alert("请先设置开关状态打开/关闭时的值") + }else{ + glxxszDialogFlagSwitch.value = true + } +} function handelGlxxszDialog(){ if(controlData.value.options.length===0){ alert("无可配置选项,请先添加。") @@ -2237,9 +2386,27 @@ function handelGlxxszDialogCheckbox(){ function handleDetermineGlxxszDialog(){ glxxszDialogFlag.value = false } +function handleDetermineGlxxszDialogSwitch(){ + glxxszDialogFlagSwitch.value = false +} function handleDetermineGlxxszDialogCheckBox(){ glxxszDialogFlagCheckBox.value = false } +//同步开关的设置值和开关关联选项设置的值 +watch(()=>controlData.value.control,(newVal) => { + if(typeof(newVal)!="undefined"){ + if(typeof(newVal.glxxszSwitch)!="undefined"){ + if(typeof(controlData.value.control.activeValue)!="undefined"){ + controlData.value.control.glxxszSwitch[0].openValue = controlData.value.control.activeValue + controlData.value.control.glxxszSwitch[0].conditionField = controlData.value.name + } + if(typeof(controlData.value.control.inactiveValue)!="undefined"){ + controlData.value.control.glxxszSwitch[1].offValue = controlData.value.control.inactiveValue + controlData.value.control.glxxszSwitch[1].conditionField = controlData.value.name + } + } + } +},{ deep: true }) @@ -2295,8 +2462,17 @@ function createRowForGlxxsz(){ function deleteRowForGlxxsz(row: { id: any }){ controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id) } +/* */ + +const optionsValue3SettingDialogOpenFlag = ref(false) +function optionsValue3Setting(){ + optionsValue3SettingDialogOpenFlag.value = true +} +function handleDetermineoptionsValue3(){ + optionsValue3SettingDialogOpenFlag.value = false +} + -//修复bug:当字段标识改变时,关联选项设置的字段标识未同步更改 //liwenxuan20240426 单选多选下拉 关联选项设置 end @@ -2765,18 +2941,8 @@ const loadNextPage = () => { -
- -
- + {{ controlData.control.asfasfLabel==''?'选择关联表单':controlData.control.asfasfLabel }} +
@@ -2920,6 +3086,9 @@ const loadNextPage = () => { +
+ 关联选项设置 +
关联选项设置
@@ -2955,6 +3124,7 @@ const loadNextPage = () => { @change="controlData.config.optionsFun = ''" > + @@ -2984,6 +3154,10 @@ const loadNextPage = () => { {{ controlData.type === 'cascader' ? '编辑' : '新增' }} + - + @@ -3803,7 +4003,7 @@ const loadNextPage = () => { @@ -3831,7 +4031,68 @@ const loadNextPage = () => { + + + + + + + + + + + + + + + + + + + + +