From 49d0886f6855f1fb1c628b8205a8ae299aa3db09 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 14 七月 2022 18:05:28 +0800 Subject: [PATCH] 2022-07-14 --- src/templates/modalconfig/source.jsx | 291 ++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 180 insertions(+), 111 deletions(-) diff --git a/src/templates/modalconfig/source.jsx b/src/templates/modalconfig/source.jsx index 0e29aa5..d3818c5 100644 --- a/src/templates/modalconfig/source.jsx +++ b/src/templates/modalconfig/source.jsx @@ -1,119 +1,188 @@ 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' - }, - tables: [], - groups: [], - fields: [ - { - origin: true, - id: Utils.getuuid(), - uuid: Utils.getuuid(), - label: 'label', - field: '', - initval: '', - type: 'text', - resourceType: '0', - setAll: 'false', - options: [], - dataSource: '', - linkField: '', - valueField: '', - valueText: '', - orderBy: '', - orderType: 'asc', - readonly: 'false', - required: 'false' - }, { - origin: true, - id: Utils.getuuid(), - uuid: Utils.getuuid(), - label: 'label', - field: '', - initval: '', - type: 'select', - resourceType: '0', - setAll: 'false', - options: [], - dataSource: '', - linkField: '', - valueField: '', - valueText: '', - orderBy: '', - orderType: 'asc', - readonly: 'false', - required: 'false' - }, { - origin: true, - id: Utils.getuuid(), - uuid: Utils.getuuid(), - label: 'label', - field: '', - initval: '', - type: 'date', - resourceType: '0', - setAll: 'false', - options: [], - dataSource: '', - linkField: '', - valueField: '', - valueText: '', - orderBy: '', - orderType: 'asc', - 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: 'date', - url: '' - }, - { - type: 'form', - label: '鏃堕棿妗嗭紙鏈堬級', - subType: 'datemonth', - url: '' - }, - { - type: 'form', - label: '鏃堕棿妗嗭紙绉掞級', - subType: 'datetime', - 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: 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: CommonDict['model.form.textarea'], + subType: 'textarea', + }, + { + 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', + } +] + -- Gitblit v1.8.0