Browse Source

字段和组件分组排序调整

lwx_v9
liwenxuan 2 years ago
parent
commit
665f4b093e
  1. 615
      src/components/DesignForm/assembly/index.ts

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

@ -21,15 +21,14 @@ const selectOption: any = [
title: '基础字段', title: '基础字段',
children: [ children: [
{ {
type: 'input', type: 'title',
label: '单行文本', label: '标题',
icon: 'input', icon: 'title',
iconFont: 'fa-text-width', iconFont: 'fa-header',
control: { control: {
// 组件所有属性 modelValue: '标题'
modelValue: ''
}, },
config: {}, // 其他配置信息 config: {},
styles:{ styles:{
divStyle:{}, divStyle:{},
labelStyle:{}, labelStyle:{},
@ -60,6 +59,23 @@ const selectOption: any = [
inputStyle:{} inputStyle:{}
} }
}, },
{
type: 'input',
label: '单行文本',
icon: 'input',
iconFont: 'fa-text-width',
control: {
// 组件所有属性
modelValue: ''
},
config: {}, // 其他配置信息
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{ {
type: 'textarea', type: 'textarea',
label: '多行文本', label: '多行文本',
@ -127,6 +143,22 @@ const selectOption: any = [
inputStyle:{} inputStyle:{}
} }
}, },
{
type: 'cascader',
label: '级联选择器',
icon: 'cascader',
iconFont: 'fa-sitemap',
control: {
modelValue: []
},
options: [],
config: config,
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{ {
type: 'datePicker', type: 'datePicker',
label: '日期选择器', label: '日期选择器',
@ -159,24 +191,12 @@ const selectOption: any = [
} }
}, },
{ {
type: 'switch', type: 'txt',
label: '开关', label: '文字描述',
icon: 'switch', icon: 'text',
iconFont: 'fa-toggle-on', iconFont: 'fa-file-word-o',
control: { control: {
modelValue: "", modelValue: ''
glxxszSwitch:[
{
conditionField:'',
openValue:"",
showFields:[]
},
{
conditionField:'',
offValue:"",
showFields:[]
},
]
}, },
config: {}, config: {},
styles:{ styles:{
@ -186,12 +206,11 @@ const selectOption: any = [
} }
}, },
{ {
type: 'inputNumber', type: 'organization',
label: '计数器', label: '联系地址',
icon: 'number', icon: 'marker',
iconFont: 'fa-sort-numeric-asc', iconFont: 'fa-map-marker',
control: { control: {
modelValue: 0
}, },
config: {}, config: {},
styles:{ styles:{
@ -201,28 +220,24 @@ const selectOption: any = [
} }
}, },
{ {
type: 'cascader', type: 'switch',
label: '级联选择器', label: '开关',
icon: 'cascader', icon: 'switch',
iconFont: 'fa-sitemap', iconFont: 'fa-toggle-on',
control: { control: {
modelValue: [] modelValue: "",
}, glxxszSwitch:[
options: [], {
config: config, conditionField:'',
styles:{ openValue:"",
divStyle:{}, showFields:[]
labelStyle:{},
inputStyle:{}
}
}, },
{ {
type: 'rate', conditionField:'',
label: '评分', offValue:"",
icon: 'rate', showFields:[]
iconFont: 'fa-star-o', },
control: { ]
modelValue: 0
}, },
config: {}, config: {},
styles:{ styles:{
@ -232,12 +247,12 @@ const selectOption: any = [
} }
}, },
{ {
type: 'slider', type: 'button',
label: '滑块', label: '按钮',
icon: 'slider', icon: 'button',
iconFont: 'fa-sliders', iconFont: 'fa-square-o',
control: { control: {
modelValue: 0 label: '保存'
}, },
config: {}, config: {},
styles:{ styles:{
@ -247,32 +262,56 @@ const selectOption: any = [
} }
}, },
{ {
type: 'treeSelect', type: 'inputNumber',
label: '树形控件', label: '计数器',
icon: 'tree2', icon: 'number',
iconFont: '', iconFont: 'fa-sort-numeric-asc',
control: { control: {
modelValue: '', modelValue: 0
data: [],
renderAfterExpand: false
},
config: {
optionsType: 0
}, },
config: {},
styles:{ styles:{
divStyle:{}, divStyle:{},
labelStyle:{}, labelStyle:{},
inputStyle:{} inputStyle:{}
} }
}, },
]
},
{ {
type: 'txt', title: '布局字段',
label: '文字', children: [
icon: 'text', {
iconFont: 'fa-file-word-o', type: 'grid',
control: { label: '格栅布局',
modelValue: '' icon: 'grid',
iconFont: 'fa-th-large',
columns: [
// 格栅列数据
{
attr: { span: 12 },
list: []
}, },
{
attr: { span: 12 },
list: []
}
],
control: {},
config: {}, config: {},
styles:{ styles:{
divStyle:{}, divStyle:{},
@ -281,14 +320,14 @@ const selectOption: any = [
} }
}, },
{ {
type: 'title', type: 'card',
label: '标题', label: '卡片布局',
icon: 'title', icon: 'card',
iconFont: 'fa-header', iconFont: 'fa-credit-card',
control: { list: [],
modelValue: '标题' control: {},
},
config: {}, config: {},
item: {}, // label标题相关
styles:{ styles:{
divStyle:{}, divStyle:{},
labelStyle:{}, labelStyle:{},
@ -296,14 +335,16 @@ const selectOption: any = [
} }
}, },
{ {
type: 'button', type: 'flex',
label: '按钮', label: '弹性布局',
icon: 'button', icon: 'flex',
iconFont: 'fa-square-o', iconFont: 'fa-file-text-o',
control: { list: [],
label: '保存' tableData: [], // 值集合
control: {},
config: {
addBtnText: '添加一行'
}, },
config: {},
styles:{ styles:{
divStyle:{}, divStyle:{},
labelStyle:{}, labelStyle:{},
@ -311,15 +352,13 @@ const selectOption: any = [
} }
}, },
{ {
type: 'serialNumber', type: 'div',
label: '编码', label: '容器',
icon: 'number', icon: 'div',
iconFont: 'fa-list-ol', iconFont: '',
control: { control: {},
}, config: {},
config: { list: [],
automatic:false
},
styles:{ styles:{
divStyle:{}, divStyle:{},
labelStyle:{}, labelStyle:{},
@ -327,12 +366,17 @@ const selectOption: any = [
} }
}, },
{ {
type: 'urllink', type: 'tabs',
label: '链接', label: '标签页',
icon: 'link', icon: 'tabs',
iconFont: 'fa-link', iconFont: 'fa-folder-o',
control: { columns: [
}, {
label: 'Tab1',
list: []
}
],
control: {},
config: {}, config: {},
styles:{ styles:{
divStyle:{}, divStyle:{},
@ -340,13 +384,13 @@ const selectOption: any = [
inputStyle:{} inputStyle:{}
} }
}, },
{ {
type: 'organization', type: 'divider',
label: '联系地址', label: '分割线',
icon: 'marker', icon: 'divider',
iconFont: 'fa-map-marker', iconFont: '',
control: { control: {},
},
config: {}, config: {},
styles:{ styles:{
divStyle:{}, divStyle:{},
@ -354,28 +398,73 @@ const selectOption: any = [
inputStyle:{} inputStyle:{}
} }
}, },
]
},
{ {
type: 'baidumap', title: '高级控件',
label: '地图', children: [
icon: 'map', {
iconFont: 'fa-map-o', type: 'lowcodeImage',
label: '图片',
icon: '',
iconFont: 'fa-photo',
control: { 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: {}, config: {}
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}, },
{ {
type: 'videoUpAndPlay',
type: 'colorPicker', label: '视频',
label: '取色器', icon: '',
icon: 'color', iconFont: 'fa-play-circle',
iconFont: '',
control: { control: {
modelValue: '' 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: {}, config: {},
styles:{ styles:{
@ -385,11 +474,13 @@ const selectOption: any = [
} }
}, },
{ {
type: 'orgCentent',
label: '行政组织', type: 'upload',
icon: 'sliders', label: '文件',
iconFont: 'fa-sliders', icon: 'image',
iconFont: 'fa-file-image-o',
control: { control: {
modelValue: '' // 也可以是[{name:'',url:''}]形式
}, },
config: {}, config: {},
styles:{ styles:{
@ -397,12 +488,13 @@ const selectOption: any = [
labelStyle:{}, labelStyle:{},
inputStyle:{} inputStyle:{}
} }
}, },
{ {
type: 'signaturemap', type: 'urllink',
label: '签名板', label: '链接',
icon: 'faedit', icon: 'link',
iconFont: 'fa-edit', iconFont: 'fa-link',
control: { control: {
}, },
config: {}, config: {},
@ -411,12 +503,7 @@ const selectOption: any = [
labelStyle:{}, labelStyle:{},
inputStyle:{} inputStyle:{}
} }
}
]
}, },
{
title: '高级字段',
children: [
{ {
type: 'table', type: 'table',
label: '子表', label: '子表',
@ -437,12 +524,11 @@ const selectOption: any = [
} }
}, },
{ {
type: 'component', type: 'baidumap',
label: '自定义组件', label: '地图',
icon: 'component', icon: 'map',
iconFont: 'fa-cubes', iconFont: 'fa-map-o',
control: { control: {
modelValue: ''
}, },
config: {}, config: {},
styles:{ styles:{
@ -450,17 +536,14 @@ const selectOption: any = [
labelStyle:{}, labelStyle:{},
inputStyle:{} inputStyle:{}
} }
/*template: '', //
component: '' // 根据template注入的组件*/
}, },
{ {
type: 'slider',
type: 'upload', label: '滑块',
label: '图片/文件', icon: 'slider',
icon: 'image', iconFont: 'fa-sliders',
iconFont: 'fa-file-image-o',
control: { control: {
modelValue: '' // 也可以是[{name:'',url:''}]形式 modelValue: 0
}, },
config: {}, config: {},
styles:{ styles:{
@ -468,15 +551,14 @@ const selectOption: any = [
labelStyle:{}, labelStyle:{},
inputStyle:{} inputStyle:{}
} }
}, },
{ {
type: 'tinymce', type: 'rate',
label: '富文本', label: '评分',
icon: 'tinymce', icon: 'rate',
iconFont: '', iconFont: 'fa-star-o',
control: { control: {
modelValue: '' modelValue: 0
}, },
config: {}, config: {},
styles:{ styles:{
@ -486,32 +568,12 @@ const selectOption: any = [
} }
}, },
{ {
type: 'videoUpAndPlay', type: 'tinymce',
label: '视频', label: '富文本',
icon: '', icon: 'tinymce',//
iconFont: 'fa-play-circle', iconFont: 'fa-list-alt',
control: { control: {
modelValue: '', 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: {}, config: {},
styles:{ styles:{
@ -548,6 +610,21 @@ const selectOption: any = [
inputStyle:{} inputStyle:{}
} }
}, },
{
type: 'signaturemap',
label: '签名板',
icon: 'faedit',
iconFont: 'fa-edit',
control: {
},
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{ {
type: 'lowcodeTransfer', type: 'lowcodeTransfer',
label: '穿梭框', label: '穿梭框',
@ -576,37 +653,39 @@ const selectOption: any = [
} }
}, },
{ {
type: 'lowcodeImage',
label: '图片', type: 'colorPicker',
icon: '', label: '取色器',
iconFont: 'fa-photo', icon: 'color',
iconFont: '',
control: {
modelValue: ''
},
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'treeSelect',
label: '树形控件',
icon: 'tree2',
iconFont: '',
control: { control: {
modelValue: '', modelValue: '',
uploadFlag:false, data: [],
imgId:'', renderAfterExpand: false
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: {} config: {
optionsType: 0
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}, },
{ {
type: 'associatedForms', type: 'associatedForms',
@ -630,120 +709,54 @@ const selectOption: any = [
], ],
}, },
config: {} config: {}
}
]
}, },
{ {
title: '布局字段', type: 'component',
children: [ label: '自定义组件',
{ icon: 'component',
type: 'grid', iconFont: 'fa-cubes',
label: '格栅布局', control: {
icon: 'grid', modelValue: ''
iconFont: 'fa-th-large',
columns: [
// 格栅列数据
{
attr: { span: 12 },
list: []
}, },
{
attr: { span: 12 },
list: []
}
],
control: {},
config: {}, config: {},
styles:{ styles:{
divStyle:{}, divStyle:{},
labelStyle:{}, labelStyle:{},
inputStyle:{} inputStyle:{}
} }
/*template: '', //
component: '' // 根据template注入的组件*/
}, },
{
type: 'tabs',
label: '标签页',
icon: 'tabs',
iconFont: 'fa-folder-o',
columns: [
{
label: 'Tab1',
list: [] ]
}
],
control: {},
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}, },
{ {
type: 'card', title: '系统控件',//扩展组件
label: '卡片布局', children: [
icon: 'card',
iconFont: 'fa-credit-card',
list: [],
control: {},
config: {},
item: {}, // label标题相关
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{ {
type: 'flex', type: 'serialNumber',
label: '弹性布局', label: '编码',
icon: 'flex', icon: 'number',
iconFont: 'fa-file-text-o', iconFont: 'fa-list-ol',
list: [], control: {
tableData: [], // 值集合
control: {},
config: {
addBtnText: '添加一行'
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}, },
{ config: {
type: 'divider', automatic:false
label: '分割线',
icon: 'divider',
iconFont: '',
control: {},
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}, },
{
type: 'div',
label: '容器',
icon: 'div',
iconFont: '',
control: {},
config: {},
list: [],
styles:{ styles:{
divStyle:{}, divStyle:{},
labelStyle:{}, labelStyle:{},
inputStyle:{} inputStyle:{}
} }
}
]
}, },
{
title: '扩展组件',
children: [
{ {
type: 'expand-user', type: 'expand-user',
label: '选择用户', label: '选择用户',
@ -762,7 +775,7 @@ const selectOption: any = [
}, },
{ {
type: 'orgCentent', type: 'orgCentent',
label: '行政组织', label: '选择组织',
icon: 'sliders', icon: 'sliders',
iconFont: 'fa-sliders', iconFont: 'fa-sliders',
control: { control: {
@ -775,6 +788,10 @@ const selectOption: any = [
} }
} }
] ]
},
{
title: '扩展组件',//
chileren:[]
} }
] ]
Loading…
Cancel
Save