| | |
| | | import Utils from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/comtable.js' |
| | | import enUS from '@/locales/en-US/comtable.js' |
| | | |
| | | const CommonDict = (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS |
| | | |
| | | class CommonTableBaseData { |
| | | baseConfig = { |
| | | type: 'system', |
| | | setting: { |
| | | actionfixed: false, |
| | | columnfixed: false, |
| | | dataresource: '' |
| | | }, |
| | | tables: [], |
| | | search: [ |
| | | { |
| | | origin: true, |
| | | id: 0, |
| | | uuid: Utils.getuuid(), |
| | | label: 'text', |
| | | field: '', |
| | | initval: '', |
| | | type: 'text', |
| | | resourceType: '0', |
| | | setAll: 'false', |
| | | options: [], |
| | | dataSource: '', |
| | | linkField: '', |
| | | valueField: '', |
| | | valueText: '', |
| | | orderBy: '', |
| | | orderType: 'asc', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | id: 1, |
| | | uuid: Utils.getuuid(), |
| | | label: 'select', |
| | | field: '', |
| | | initval: '', |
| | | type: 'select', |
| | | resourceType: '0', |
| | | setAll: 'false', |
| | | options: [], |
| | | dataSource: '', |
| | | linkField: '', |
| | | valueField: '', |
| | | valueText: '', |
| | | orderBy: '', |
| | | orderType: 'asc', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | id: 2, |
| | | uuid: Utils.getuuid(), |
| | | label: 'date', |
| | | field: '', |
| | | initval: '', |
| | | type: 'date', |
| | | resourceType: '0', |
| | | setAll: 'false', |
| | | options: [], |
| | | dataSource: '', |
| | | linkField: '', |
| | | valueField: '', |
| | | valueText: '', |
| | | orderBy: '', |
| | | orderType: 'asc', |
| | | display: 'dropdown' |
| | | } |
| | | ], |
| | | action: [ |
| | | { |
| | | origin: true, |
| | | id: 0, |
| | | uuid: Utils.getuuid(), |
| | | label: 'add', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | outerFunc: '', |
| | | callbackFunc: '', |
| | | Ot: 'notRequired', |
| | | OpenType: 'pop', |
| | | pageTemplate: '', |
| | | icon: 'plus', |
| | | class: 'green' |
| | | }, { |
| | | origin: true, |
| | | id: 1, |
| | | uuid: Utils.getuuid(), |
| | | label: 'update', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | outerFunc: '', |
| | | callbackFunc: '', |
| | | Ot: 'requiredSgl', |
| | | OpenType: 'pop', |
| | | pageTemplate: '', |
| | | icon: 'form', |
| | | class: 'purple' |
| | | }, { |
| | | origin: true, |
| | | id: 2, |
| | | uuid: Utils.getuuid(), |
| | | label: 'delete', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | outerFunc: '', |
| | | callbackFunc: '', |
| | | Ot: 'required', |
| | | OpenType: 'prompt', |
| | | pageTemplate: '', |
| | | icon: 'delete', |
| | | class: 'red' |
| | | }, { |
| | | origin: true, |
| | | id: 3, |
| | | uuid: Utils.getuuid(), |
| | | label: 'freeze', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | outerFunc: '', |
| | | callbackFunc: '', |
| | | Ot: 'requiredOnce', |
| | | OpenType: 'exec', |
| | | pageTemplate: '', |
| | | icon: '', |
| | | class: 'default' |
| | | } |
| | | ], |
| | | columns: [ |
| | | { |
| | | origin: true, |
| | | id: 0, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'fieldName1', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | }, { |
| | | origin: true, |
| | | id: 1, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'fieldName2', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | }, { |
| | | origin: true, |
| | | id: 2, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'fieldName3', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | }, { |
| | | origin: true, |
| | | id: 3, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'fieldName4', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | } |
| | | ] |
| | | } |
| | | |
| | | searchItems = [ |
| | | export const BaseConfig = { |
| | | type: 'Modal', |
| | | setting: { |
| | | title: '', |
| | | width: 60, |
| | | cols: '2', |
| | | container: 'tab', |
| | | focus: '', |
| | | finish: 'close', |
| | | clickouter: 'unclose', |
| | | display: 'modal' |
| | | }, |
| | | tables: [], |
| | | fields: [ |
| | | { |
| | | type: 'search', |
| | | label: '文本框', |
| | | subType: 'text', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '下拉框', |
| | | subType: 'select', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '时间框(天)', |
| | | subType: 'date', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '时间框(秒)', |
| | | subType: 'datetime', |
| | | url: '' |
| | | } |
| | | ] |
| | | |
| | | actionItems = [ |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.pop'], |
| | | subType: 'pop', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.prompt'], |
| | | subType: 'prompt', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.exec'], |
| | | subType: 'exec', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.tab'], |
| | | subType: 'tab', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.newpage'], |
| | | subType: 'newpage', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.blank'], |
| | | subType: 'blank', |
| | | url: '' |
| | | } |
| | | ] |
| | | |
| | | columnItems = [ |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.text'], |
| | | subType: 'text', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.picture'], |
| | | subType: 'picture', |
| | | url: '' |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | label: 'label', |
| | | field: '', |
| | | initval: '', |
| | | type: 'text', |
| | | resourceType: '0', |
| | | options: [], |
| | | orderType: 'asc', |
| | | decimal: 0, |
| | | span: 12, |
| | | labelwidth: 33.3, |
| | | min: '', |
| | | max: '', |
| | | readonly: 'false', |
| | | required: 'false' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | label: 'label', |
| | | field: '', |
| | | initval: '', |
| | | type: 'select', |
| | | resourceType: '0', |
| | | options: [], |
| | | orderType: 'asc', |
| | | decimal: 0, |
| | | span: 12, |
| | | labelwidth: 33.3, |
| | | min: '', |
| | | max: '', |
| | | readonly: 'false', |
| | | required: 'false' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | label: 'label', |
| | | field: '', |
| | | initval: '', |
| | | type: 'date', |
| | | resourceType: '0', |
| | | options: [], |
| | | orderType: 'asc', |
| | | decimal: 0, |
| | | span: 12, |
| | | labelwidth: 33.3, |
| | | min: '', |
| | | max: '', |
| | | readonly: 'false', |
| | | required: 'false' |
| | | } |
| | | ] |
| | | } |
| | | |
| | | export default new CommonTableBaseData() |
| | | export const SearchItems = [ |
| | | { |
| | | type: 'form', |
| | | label: '文本', |
| | | subType: 'text', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '数字', |
| | | subType: 'number', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '下拉选择', |
| | | subType: 'select', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '多行文本', |
| | | subType: 'textarea', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '下拉多选', |
| | | subType: 'multiselect', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '联动菜单', |
| | | subType: 'link', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '选择器', |
| | | subType: 'popSelect', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '开关', |
| | | subType: 'switch', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '多选框', |
| | | subType: 'checkbox', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '单选框', |
| | | subType: 'radio', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '选项卡', |
| | | subType: 'checkcard', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '文件上传', |
| | | subType: 'fileupload', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '日期(天)', |
| | | subType: 'date', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '日期(月)', |
| | | subType: 'datemonth', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '级联菜单', |
| | | subType: 'cascader', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '评分', |
| | | subType: 'rate', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '颜色', |
| | | subType: 'color', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '富文本', |
| | | subType: 'brafteditor', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '函数变量', |
| | | subType: 'funcvar', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '提示', |
| | | subType: 'hint', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '分割线', |
| | | subType: 'split', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '关联主表', |
| | | subType: 'linkMain', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '公式', |
| | | subType: 'formula', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '验证码', |
| | | subType: 'vercode', |
| | | } |
| | | ] |
| | | |