| | |
| | | import Utils from '@/utils/utils.js' |
| | | // import zhCN from '@/locales/zh-CN/comtable.js' |
| | | // import enUS from '@/locales/en-US/comtable.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | |
| | | // const CommonDict = (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS |
| | | const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | |
| | | class CommonTableBaseData { |
| | | baseConfig = { |
| | | type: 'Modal', |
| | | setting: { |
| | | title: '', |
| | | width: 60, |
| | | cols: '2', |
| | | container: 'tab', |
| | | focus: '', |
| | | finish: 'close', |
| | | clickouter: 'unclose', |
| | | display: 'modal' |
| | | }, |
| | | tables: [], |
| | | groups: [], |
| | | fields: [ |
| | | { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | label: 'label', |
| | | field: '', |
| | | initval: '', |
| | | type: 'text', |
| | | resourceType: '0', |
| | | setAll: 'false', |
| | | options: [], |
| | | dataSource: '', |
| | | linkField: '', |
| | | valueField: '', |
| | | valueText: '', |
| | | orderBy: '', |
| | | orderType: 'asc', |
| | | decimal: 0, |
| | | min: '', |
| | | max: '', |
| | | readonly: 'false', |
| | | required: 'false' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | label: 'label', |
| | | field: '', |
| | | initval: '', |
| | | type: 'select', |
| | | resourceType: '0', |
| | | setAll: 'false', |
| | | options: [], |
| | | dataSource: '', |
| | | linkField: '', |
| | | valueField: '', |
| | | valueText: '', |
| | | orderBy: '', |
| | | orderType: 'asc', |
| | | decimal: 0, |
| | | min: '', |
| | | max: '', |
| | | readonly: 'false', |
| | | required: 'false' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | label: 'label', |
| | | field: '', |
| | | initval: '', |
| | | type: 'date', |
| | | resourceType: '0', |
| | | setAll: 'false', |
| | | options: [], |
| | | dataSource: '', |
| | | linkField: '', |
| | | valueField: '', |
| | | valueText: '', |
| | | orderBy: '', |
| | | orderType: 'asc', |
| | | decimal: 0, |
| | | min: '', |
| | | max: '', |
| | | readonly: 'false', |
| | | required: 'false' |
| | | } |
| | | ] |
| | | } |
| | | |
| | | searchItems = [ |
| | | export const BaseConfig = { |
| | | type: 'Modal', |
| | | setting: { |
| | | title: '', |
| | | width: 60, |
| | | cols: '2', |
| | | container: 'tab', |
| | | focus: '', |
| | | finish: 'close', |
| | | clickouter: 'unclose', |
| | | display: 'modal' |
| | | }, |
| | | tables: [], |
| | | fields: [ |
| | | { |
| | | type: 'form', |
| | | label: '文本框', |
| | | subType: 'text', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '数值框', |
| | | subType: 'number', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '下拉框', |
| | | subType: 'select', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '文件上传', |
| | | subType: 'fileupload', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '时间框(天)', |
| | | subType: 'date', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '时间框(月)', |
| | | subType: 'datemonth', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '时间框(秒)', |
| | | subType: 'datetime', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '函数变量', |
| | | subType: 'funcvar', |
| | | 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: CommonDict['model.form.text'], |
| | | subType: 'text', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: CommonDict['model.form.number'], |
| | | subType: 'number', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: CommonDict['model.form.select'], |
| | | subType: 'select', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '多行文本', |
| | | subType: 'textarea', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: CommonDict['model.form.multiselect'], |
| | | subType: 'multiselect', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: CommonDict['model.form.link'], |
| | | subType: 'link', |
| | | }, |
| | | { |
| | | 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: CommonDict['model.form.datemonth'], |
| | | subType: 'datemonth', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '级联菜单', |
| | | subType: 'cascader', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '评分', |
| | | subType: 'rate', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: CommonDict['model.form.color'], |
| | | subType: 'color', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '富文本', |
| | | subType: 'brafteditor', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: CommonDict['header.form.funcvar'], |
| | | subType: 'funcvar', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '提示', |
| | | subType: 'hint', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '分割线', |
| | | subType: 'split', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '关联主表', |
| | | subType: 'linkMain', |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: '公式', |
| | | subType: 'formula', |
| | | } |
| | | ] |
| | | |