From f0602b981659c6d1ff18e8dba4ca1ce89c5f5610 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 22 三月 2020 21:18:34 +0800 Subject: [PATCH] 2020-03-22 --- src/templates/modalconfig/source.jsx | 250 ++++++++++++++++++++++++++----------------------- 1 files changed, 132 insertions(+), 118 deletions(-) diff --git a/src/templates/modalconfig/source.jsx b/src/templates/modalconfig/source.jsx index 638f6af..c340150 100644 --- a/src/templates/modalconfig/source.jsx +++ b/src/templates/modalconfig/source.jsx @@ -1,128 +1,142 @@ 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/comtable.js' +import enUS from '@/locales/en-US/comtable.js' -// const CommonDict = (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS +const CommonDict = (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS -class CommonTableBaseData { - baseConfig = { - type: 'modal', - setting: { - title: '', - width: 60, - cols: '2' - }, - tables: [], - groups: [{ - label: '鏈垎缁�', - default: true, - sort: 101, +export const 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(), - sublist: [] + label: 'label', + field: '', + initval: '', + type: 'text', + resourceType: '0', + setAll: 'false', + options: [], + orderType: 'asc', + decimal: 0, + min: '', + max: '', + readonly: 'false', + required: 'false' }, { - label: '缁�1', - sort: 1, - default: false, + origin: true, uuid: Utils.getuuid(), - sublist: [] - }], - fields: [ - { - 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' - } - ] - } - - searchItems = [ - { - type: 'form', - label: '鏂囨湰妗�', - subType: 'text', - url: '' - }, - { - type: 'form', - label: '鏁板�兼', - subType: 'number', - url: '' - }, - { - type: 'form', - label: '涓嬫媺妗�', - subType: 'select', - url: '' - }, - { - type: 'form', - label: '鏃堕棿妗嗭紙澶╋級', - subType: 'date', - url: '' - }, - { - type: 'form', - label: '鏃堕棿妗嗭紙鏈堬級', - subType: 'datemonth', - url: '' - }, - { - type: 'form', - label: '鏃堕棿妗嗭紙绉掞級', - subType: 'datetime', - url: '' + label: 'label', + field: '', + initval: '', + type: 'select', + resourceType: '0', + setAll: 'false', + options: [], + 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: [], + orderType: 'asc', + decimal: 0, + min: '', + max: '', + readonly: 'false', + required: 'false' } ] } -export default new CommonTableBaseData() +export const SearchItems = [ + { + type: 'form', + label: CommonDict['header.form.text'], + subType: 'text', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.number'], + subType: 'number', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.select'], + subType: 'select', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.multiselect'], + subType: 'multiselect', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.link'], + subType: 'link', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.fileupload'], + subType: 'fileupload', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.dateday'], + subType: 'date', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.datemonth'], + subType: 'datemonth', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.datetime'], + subType: 'datetime', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.textarea'], + subType: 'textarea', + url: '' + }, + { + type: 'form', + label: CommonDict['header.form.funcvar'], + subType: 'funcvar', + url: '' + } +] + -- Gitblit v1.8.0