From 24f0ce147c8daef39ec437d5def9d089ea5b1839 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 05 六月 2020 17:23:53 +0800 Subject: [PATCH] 2020-06-05 --- src/templates/comtableconfig/source.jsx | 259 +++++++++++++++++++++++++++++++++++---------------- 1 files changed, 179 insertions(+), 80 deletions(-) diff --git a/src/templates/comtableconfig/source.jsx b/src/templates/comtableconfig/source.jsx index 307604d..c7edb97 100644 --- a/src/templates/comtableconfig/source.jsx +++ b/src/templates/comtableconfig/source.jsx @@ -1,73 +1,67 @@ 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 class CommonTableBaseData { baseConfig = { type: 'system', + Template: 'CommonTable', + enabled: false, setting: { actionfixed: false, columnfixed: false, - dataresource: '' + tableName: '', + tableType: 'checkbox', + primaryKey: '', + order: '', + dataresource: '', + interType: 'inner', + sysInterface: 'false', + innerFunc: '', + interface: '', + outerFunc: '', + onload: 'true' }, tables: [], search: [ { origin: true, - id: 0, uuid: Utils.getuuid(), - label: 'text', + label: 'label', 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', + label: 'label', 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', + label: 'label', field: '', initval: '', type: 'date', resourceType: '0', setAll: 'false', options: [], - dataSource: '', - linkField: '', - valueField: '', - valueText: '', - orderBy: '', orderType: 'asc', match: 'greater', display: 'dropdown' @@ -76,77 +70,57 @@ action: [ { origin: true, - id: 0, uuid: Utils.getuuid(), label: 'add', intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', + method: 'POST', Ot: 'notRequired', position: 'toolbar', + execSuccess: 'grid', + execError: 'never', + errorTime: 15, OpenType: 'pop', - pageTemplate: '', icon: 'plus', - class: 'green' + class: 'green', + verify: null }, { origin: true, - id: 1, uuid: Utils.getuuid(), label: 'update', intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', + method: 'POST', Ot: 'requiredSgl', position: 'grid', + execSuccess: 'grid', + execError: 'never', + errorTime: 15, OpenType: 'pop', - pageTemplate: '', icon: 'form', - class: 'purple' + class: 'purple', + verify: null }, { origin: true, - id: 2, uuid: Utils.getuuid(), label: 'delete', intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', + method: 'POST', Ot: 'required', position: 'toolbar', + execSuccess: 'grid', + execError: 'never', + errorTime: 15, OpenType: 'prompt', - pageTemplate: '', icon: 'delete', - class: 'red' - }, { - origin: true, - id: 3, - uuid: Utils.getuuid(), - label: 'freeze', - intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', - Ot: 'requiredOnce', - position: 'toolbar', - OpenType: 'exec', - pageTemplate: '', - icon: '', - class: 'default' + class: 'red', + verify: null } ], columns: [ { origin: true, - id: 0, uuid: Utils.getuuid(), Align: 'left', - label: 'fieldName1', + label: 'label', field: '', Hide: 'false', IsSort: 'true', @@ -154,10 +128,9 @@ Width: 120 }, { origin: true, - id: 1, uuid: Utils.getuuid(), Align: 'left', - label: 'fieldName2', + label: 'label', field: '', Hide: 'false', IsSort: 'true', @@ -165,10 +138,9 @@ Width: 120 }, { origin: true, - id: 2, uuid: Utils.getuuid(), Align: 'left', - label: 'fieldName3', + label: 'label', field: '', Hide: 'false', IsSort: 'true', @@ -176,42 +148,113 @@ Width: 120 }, { origin: true, - id: 3, uuid: Utils.getuuid(), Align: 'left', - label: 'fieldName4', + label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 } - ] + ], + gridBtn: { + display: false, + Align: 'center', + IsSort: 'false', + uuid: Utils.getuuid(), + label: CommonDict['header.form.column.action'], + 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: CommonDict['header.form.text'], subType: 'text', url: '' }, { type: 'search', - label: '涓嬫媺妗�', + label: CommonDict['header.form.select'], subType: 'select', url: '' }, { type: 'search', - label: '鏃堕棿妗嗭紙澶╋級', + label: CommonDict['header.form.multiselect'], + subType: 'multiselect', + url: '' + }, + { + type: 'search', + label: CommonDict['header.form.link'], + subType: 'link', + url: '' + }, + { + type: 'search', + label: CommonDict['header.form.dateday'], subType: 'date', url: '' }, { type: 'search', - label: '鏃堕棿妗嗭紙绉掞級', - subType: 'datetime', + label: CommonDict['header.form.dateweek'], + subType: 'dateweek', + url: '' + }, + { + type: 'search', + label: CommonDict['header.form.datemonth'], + subType: 'datemonth', + url: '' + }, + { + type: 'search', + label: CommonDict['header.form.daterange'], + subType: 'daterange', + url: '' + }, + { + type: 'search', + label: '鏃ユ湡锛堢粍鍚堬級', + subType: 'group', url: '' } ] @@ -219,7 +262,7 @@ actionItems = [ { type: 'action', - label: CommonDict['header.form.pop'], + label: CommonDict['header.form.popform'], subType: 'pop', url: '' }, @@ -237,20 +280,50 @@ }, { type: 'action', + label: CommonDict['header.form.excelIn'], + subType: 'excelIn', + url: '' + }, + { + type: 'action', + label: CommonDict['header.form.excelOut'], + subType: 'excelOut', + url: '' + }, + { + type: 'action', + label: CommonDict['header.form.popview'], + subType: 'popview', + url: '' + }, + { + type: 'action', label: CommonDict['header.form.tab'], subType: 'tab', url: '' }, { type: 'action', - label: CommonDict['header.form.newpage'], - subType: 'newpage', + label: CommonDict['header.form.blank'], + subType: 'blank', url: '' }, { type: 'action', - label: CommonDict['header.form.blank'], - subType: 'blank', + label: CommonDict['header.form.newpage.inner'], + subType: 'innerpage', + url: '' + }, + { + type: 'action', + label: CommonDict['header.form.newpage.outer'], + subType: 'outerpage', + url: '' + }, + { + type: 'action', + label: CommonDict['header.form.funcbutton'], + subType: 'funcbutton', url: '' } ] @@ -264,9 +337,35 @@ }, { type: 'columns', + label: CommonDict['header.form.number'], + subType: 'number', + url: '' + }, + { + type: 'columns', label: CommonDict['header.form.picture'], subType: 'picture', url: '' + }, + { + type: 'columns', + label: CommonDict['header.form.textarea'], + subType: 'textarea', + url: '' + }, + { + type: 'columns', + label: CommonDict['header.form.colspan'], + subType: 'colspan', + url: '' + } + ] + + tabItems = [ + { + type: 'tabs', + label: CommonDict['header.menu.tab.subtable'], + subType: 'SubTable', } ] } -- Gitblit v1.8.0