| | |
| | | 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 = { |
| | | version: '1.0', |
| | | type: 'system', |
| | | Template: 'CommonTable', |
| | | enabled: false, |
| | | easyCode: '', |
| | | setting: { |
| | | actionfixed: false, |
| | | columnfixed: false, |
| | | tableName: '', |
| | | tableType: 'checkbox', |
| | | primaryKey: '', |
| | | orderColumn: '', |
| | | dataresource: '' |
| | | order: '', |
| | | dataresource: '', |
| | | interType: 'system', |
| | | sysInterface: 'false', |
| | | innerFunc: '', |
| | | interface: '', |
| | | outerFunc: '', |
| | | onload: 'true' |
| | | }, |
| | | 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', |
| | | match: 'like', |
| | | 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', |
| | | match: 'equal', |
| | | 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', |
| | | match: 'greater', |
| | | display: 'dropdown' |
| | | } |
| | | // { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // label: 'label', |
| | | // field: '', |
| | | // initval: '', |
| | | // type: 'text', |
| | | // resourceType: '0', |
| | | // options: [], |
| | | // orderType: 'asc', |
| | | // match: 'like', |
| | | // }, { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // label: 'label', |
| | | // field: '', |
| | | // initval: '', |
| | | // type: 'select', |
| | | // resourceType: '0', |
| | | // options: [], |
| | | // orderType: 'asc', |
| | | // match: '=', |
| | | // }, { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // label: 'label', |
| | | // field: '', |
| | | // initval: '', |
| | | // type: 'date', |
| | | // resourceType: '0', |
| | | // options: [], |
| | | // orderType: 'asc', |
| | | // match: 'greater', |
| | | // } |
| | | ], |
| | | action: [ |
| | | { |
| | | origin: true, |
| | | id: 0, |
| | | uuid: Utils.getuuid(), |
| | | label: 'add', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | method: 'POST', |
| | | outerFunc: '', |
| | | sql: '', |
| | | callbackFunc: '', |
| | | Ot: 'notRequired', |
| | | position: 'toolbar', |
| | | execSuccess: 'grid', |
| | | execError: 'never', |
| | | OpenType: 'pop', |
| | | pageTemplate: '', |
| | | url: '', |
| | | icon: 'plus', |
| | | class: 'green' |
| | | }, { |
| | | origin: true, |
| | | id: 1, |
| | | uuid: Utils.getuuid(), |
| | | label: 'update', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | method: 'POST', |
| | | outerFunc: '', |
| | | sql: '', |
| | | callbackFunc: '', |
| | | Ot: 'requiredSgl', |
| | | position: 'grid', |
| | | execSuccess: 'grid', |
| | | execError: 'never', |
| | | OpenType: 'pop', |
| | | pageTemplate: '', |
| | | url: '', |
| | | icon: 'form', |
| | | class: 'purple' |
| | | }, { |
| | | origin: true, |
| | | id: 2, |
| | | uuid: Utils.getuuid(), |
| | | label: 'delete', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | method: 'POST', |
| | | outerFunc: '', |
| | | sql: '', |
| | | callbackFunc: '', |
| | | Ot: 'required', |
| | | position: 'toolbar', |
| | | execSuccess: 'grid', |
| | | execError: 'never', |
| | | OpenType: 'prompt', |
| | | pageTemplate: '', |
| | | url: '', |
| | | icon: 'delete', |
| | | class: 'red' |
| | | }, { |
| | | origin: true, |
| | | id: 3, |
| | | uuid: Utils.getuuid(), |
| | | label: 'freeze', |
| | | intertype: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | method: 'POST', |
| | | outerFunc: '', |
| | | sql: '', |
| | | callbackFunc: '', |
| | | Ot: 'requiredOnce', |
| | | position: 'toolbar', |
| | | OpenType: 'exec', |
| | | pageTemplate: '', |
| | | url: '', |
| | | icon: '', |
| | | class: 'default' |
| | | } |
| | | // { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // label: 'add', |
| | | // intertype: 'system', |
| | | // Ot: 'notRequired', |
| | | // position: 'toolbar', |
| | | // execSuccess: 'grid', |
| | | // execError: 'never', |
| | | // OpenType: 'pop', |
| | | // icon: 'plus', |
| | | // class: 'green', |
| | | // verify: null |
| | | // }, { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // label: 'update', |
| | | // intertype: 'system', |
| | | // Ot: 'requiredSgl', |
| | | // position: 'toolbar', |
| | | // execSuccess: 'grid', |
| | | // execError: 'never', |
| | | // OpenType: 'pop', |
| | | // icon: 'form', |
| | | // class: 'purple', |
| | | // verify: null |
| | | // }, { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // label: 'delete', |
| | | // intertype: 'system', |
| | | // Ot: 'required', |
| | | // position: 'toolbar', |
| | | // execSuccess: 'grid', |
| | | // execError: 'never', |
| | | // OpenType: 'prompt', |
| | | // icon: 'delete', |
| | | // class: 'red', |
| | | // verify: null |
| | | // } |
| | | ], |
| | | 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 |
| | | } |
| | | ] |
| | | // { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // Align: 'left', |
| | | // label: 'label', |
| | | // field: '', |
| | | // Hide: 'false', |
| | | // IsSort: 'true', |
| | | // type: 'text', |
| | | // Width: 120 |
| | | // }, { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // Align: 'left', |
| | | // label: 'label', |
| | | // field: '', |
| | | // Hide: 'false', |
| | | // IsSort: 'true', |
| | | // type: 'text', |
| | | // Width: 120 |
| | | // }, { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // Align: 'left', |
| | | // label: 'label', |
| | | // field: '', |
| | | // Hide: 'false', |
| | | // IsSort: 'true', |
| | | // type: 'text', |
| | | // Width: 120 |
| | | // }, { |
| | | // origin: true, |
| | | // uuid: Utils.getuuid(), |
| | | // Align: 'left', |
| | | // label: 'label', |
| | | // field: '', |
| | | // Hide: 'false', |
| | | // IsSort: 'true', |
| | | // type: 'text', |
| | | // Width: 120 |
| | | // } |
| | | ], |
| | | gridBtn: { |
| | | display: false, |
| | | Align: 'center', |
| | | IsSort: 'false', |
| | | uuid: Utils.getuuid(), |
| | | label: '操作', |
| | | type: 'action', |
| | | style: 'button', |
| | | show: 'horizontal', |
| | | Width: 120 |
| | | }, |
| | | tabgroups: [{ |
| | | uuid: 'tabs', |
| | | sublist: [ |
| | | { |
| | | origin: true, // 是否为示例 |
| | | uuid: Utils.getuuid(), |
| | | label: 'tab1', |
| | | type: 'SubTable', |
| | | linkTab: '', |
| | | supMenu: '' |
| | | }, |
| | | { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | label: 'tab2', |
| | | type: 'SubTable', |
| | | linkTab: '', |
| | | supMenu: '' |
| | | } |
| | | ] |
| | | }], |
| | | expand: false, |
| | | charts: [{ |
| | | uuid: Utils.getuuid(), |
| | | label: '', |
| | | title: '', |
| | | chartType: 'table', |
| | | icon: 'table', |
| | | Hide: 'false', |
| | | blacklist: [] |
| | | }] |
| | | } |
| | | |
| | | searchItems = [ |
| | | { |
| | | type: 'search', |
| | | label: '文本框', |
| | | label: '文本', |
| | | subType: 'text', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '下拉框', |
| | | label: '下拉选择', |
| | | subType: 'select', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '时间框(天)', |
| | | label: '下拉多选', |
| | | subType: 'multiselect', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '联动菜单', |
| | | subType: 'link', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '选项卡', |
| | | subType: 'checkcard', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '日期(天)', |
| | | subType: 'date', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '时间框(周)', |
| | | label: '日期(周)', |
| | | subType: 'dateweek', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '时间框(月)', |
| | | label: '日期(月)', |
| | | subType: 'datemonth', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '时间框(区间)', |
| | | label: '日期(区间)', |
| | | subType: 'daterange', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '日期(组合)', |
| | | subType: 'group', |
| | | url: '' |
| | | } |
| | | ] |
| | |
| | | actionItems = [ |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.popform'], |
| | | label: '弹窗(表单)', |
| | | subType: 'pop', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.popview'], |
| | | subType: 'popview', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.prompt'], |
| | | label: '提示框', |
| | | subType: 'prompt', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.exec'], |
| | | label: '直接执行', |
| | | subType: 'exec', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.tab'], |
| | | label: '导入Excel', |
| | | subType: 'excelIn', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: '导出Excel', |
| | | subType: 'excelOut', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: '弹窗(标签)', |
| | | subType: 'popview', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: '标签页', |
| | | subType: 'tab', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.blank'], |
| | | subType: 'blank', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.newpage.inner'], |
| | | label: '新页面', |
| | | subType: 'innerpage', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.newpage.outer'], |
| | | subType: 'outerpage', |
| | | label: '功能按钮', |
| | | subType: 'funcbutton', |
| | | url: '' |
| | | } |
| | | ] |
| | |
| | | columnItems = [ |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.text'], |
| | | label: '文本', |
| | | subType: 'text', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.picture'], |
| | | label: '数字', |
| | | subType: 'number', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: '图片', |
| | | subType: 'picture', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: '链接', |
| | | subType: 'link', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: '多行文本', |
| | | subType: 'textarea', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: '合并列', |
| | | subType: 'colspan', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: '序号', |
| | | subType: 'index', |
| | | url: '' |
| | | } |
| | | ] |
| | | |
| | | tabItems = [ |
| | | { |
| | | type: 'tabs', |
| | | label: '子表', |
| | | subType: 'SubTable', |
| | | } |
| | | ] |
| | | } |