From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 十月 2022 17:57:34 +0800 Subject: [PATCH] 2022-10-17 --- src/templates/modalconfig/source.jsx | 437 ++++++++++++++++++++++-------------------------------- 1 files changed, 177 insertions(+), 260 deletions(-) diff --git a/src/templates/modalconfig/source.jsx b/src/templates/modalconfig/source.jsx index f2c786b..7c81e6e 100644 --- a/src/templates/modalconfig/source.jsx +++ b/src/templates/modalconfig/source.jsx @@ -1,267 +1,184 @@ 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 = { - type: 'system', - setting: { - actionfixed: false, - columnfixed: false, - dataresource: '' - }, - 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', - 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' - } - ], - action: [ - { - origin: true, - id: 0, - uuid: Utils.getuuid(), - label: 'add', - intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', - Ot: 'notRequired', - OpenType: 'pop', - pageTemplate: '', - icon: 'plus', - class: 'green' - }, { - origin: true, - id: 1, - uuid: Utils.getuuid(), - label: 'update', - intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', - Ot: 'requiredSgl', - OpenType: 'pop', - pageTemplate: '', - icon: 'form', - class: 'purple' - }, { - origin: true, - id: 2, - uuid: Utils.getuuid(), - label: 'delete', - intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', - Ot: 'required', - OpenType: 'prompt', - pageTemplate: '', - icon: 'delete', - class: 'red' - }, { - origin: true, - id: 3, - uuid: Utils.getuuid(), - label: 'freeze', - intertype: 'inner', - innerFunc: '', - interface: '', - outerFunc: '', - callbackFunc: '', - Ot: 'requiredOnce', - OpenType: 'exec', - pageTemplate: '', - icon: '', - class: 'default' - } - ], - 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 - } - ] - } - - searchItems = [ +export const BaseConfig = { + type: 'Modal', + setting: { + title: '', + width: 60, + cols: '2', + container: 'tab', + focus: '', + finish: 'close', + clickouter: 'unclose', + display: 'modal' + }, + tables: [], + fields: [ { - type: 'search', - label: '鏂囨湰妗�', - subType: 'text', - url: '' - }, - { - type: 'search', - label: '涓嬫媺妗�', - subType: 'select', - url: '' - }, - { - type: 'search', - label: '鏃堕棿妗嗭紙澶╋級', - subType: 'date', - url: '' - }, - { - type: 'search', - label: '鏃堕棿妗嗭紙绉掞級', - subType: 'datetime', - url: '' - } - ] - - actionItems = [ - { - type: 'action', - label: CommonDict['header.form.pop'], - subType: 'pop', - url: '' - }, - { - type: 'action', - label: CommonDict['header.form.prompt'], - subType: 'prompt', - url: '' - }, - { - type: 'action', - label: CommonDict['header.form.exec'], - subType: 'exec', - url: '' - }, - { - type: 'action', - label: CommonDict['header.form.tab'], - subType: 'tab', - url: '' - }, - { - type: 'action', - label: CommonDict['header.form.newpage'], - subType: 'newpage', - url: '' - }, - { - type: 'action', - label: CommonDict['header.form.blank'], - subType: 'blank', - url: '' - } - ] - - columnItems = [ - { - type: 'columns', - label: CommonDict['header.form.text'], - subType: 'text', - url: '' - }, - { - type: 'columns', - label: CommonDict['header.form.picture'], - subType: 'picture', - 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: '鏂囨湰', + subType: 'text', + }, + { + type: 'form', + label: '鏁板瓧', + subType: 'number', + }, + { + type: 'form', + label: '涓嬫媺閫夋嫨', + subType: 'select', + }, + { + type: 'form', + label: '澶氳鏂囨湰', + subType: 'textarea', + }, + { + type: 'form', + label: '涓嬫媺澶氶��', + subType: 'multiselect', + }, + { + type: 'form', + label: '鑱斿姩鑿滃崟', + 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: '鏃ユ湡锛堟湀锛�', + subType: 'datemonth', + }, + { + type: 'form', + label: '绾ц仈鑿滃崟', + subType: 'cascader', + }, + { + type: 'form', + label: '璇勫垎', + subType: 'rate', + }, + { + type: 'form', + label: '棰滆壊', + subType: 'color', + }, + { + type: 'form', + label: '瀵屾枃鏈�', + subType: 'brafteditor', + }, + { + type: 'form', + label: '鍑芥暟鍙橀噺', + 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