From b8e1395f02c929eaa96b949cf6027ee2a43856a6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 06 九月 2022 19:03:37 +0800
Subject: [PATCH] 2022-09-06

---
 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx |  274 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 235 insertions(+), 39 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
index c345c81..06fefad 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -39,14 +39,25 @@
     value: 'action',
     text: '鎿嶄綔'
   }, {
+    value: 'formula',
+    text: '鍏紡'
+  }, {
     value: 'index',
     text: '搴忓彿'
   }]
 
   let editCols = [
     {
+      field: '$sub',
+      label: '鎻愪氦'
+    },
+    {
       field: '$next',
       label: '涓嬩竴琛�'
+    },
+    {
+      field: '$noAct',
+      label: '鏃犲姩浣�'
     }
   ]
   columns.forEach(col => {
@@ -87,7 +98,7 @@
       key: 'Width',
       min: 20,
       max: 1000,
-      decimal: 0,
+      precision: 0,
       label: Formdict['model.form.columnWidth'],
       initVal: card.Width || 120,
       required: true
@@ -112,7 +123,6 @@
       label: Formdict['model.sort'],
       initVal: card.IsSort || 'false',
       required: true,
-      forbidden: card.isSub,
       options: [{
         value: 'true',
         text: Formdict['model.true']
@@ -169,6 +179,153 @@
     },
     {
       type: 'radio',
+      key: 'editType',
+      label: '缂栬緫绫诲瀷',
+      initVal: card.editType || 'text',
+      required: true,
+      options: [{
+        value: 'text',
+        text: '鏂囨湰'
+      }, {
+        value: 'select',
+        text: '涓嬫媺'
+      }, {
+        value: 'switch',
+        text: '寮�鍏�'
+      }]
+    },
+    {
+      type: 'text',
+      key: 'initval',
+      label: '榛樿鍊�',
+      initVal: card.initval,
+      tooltip: '浣跨敤$copy鏃讹紝琛ㄧず鏂板鏃跺鍒朵笂涓�琛屼俊鎭��',
+      required: false
+    },
+    {
+      type: 'text',
+      key: 'openVal',
+      label: '寮�鍚��',
+      initVal: card.openVal || '',
+      required: false
+    },
+    {
+      type: 'text',
+      key: 'closeVal',
+      label: '鍏抽棴鍊�',
+      initVal: card.closeVal || '',
+      required: false
+    },
+    {
+      type: 'text',
+      key: 'openText',
+      label: '寮�鍚彁绀�',
+      initVal: card.openText || '',
+      required: false
+    },
+    {
+      type: 'text',
+      key: 'closeText',
+      label: '鍏抽棴鎻愮ず',
+      initVal: card.closeText || '',
+      required: false
+    },
+    {
+      type: 'radio',
+      key: 'resourceType',
+      label: '閫夐」鏉ユ簮',
+      initVal: card.resourceType || '0',
+      required: true,
+      options: [{
+        value: '0',
+        text: '鑷畾涔�'
+      }, {
+        value: '1',
+        text: '鏁版嵁婧�'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'editField',
+      label: '缂栬緫瀛楁',
+      initVal: card.editField || '',
+      tooltip: '褰撳�间笌鎻愮ず鏂囧瓧涓嶅悓鏃讹紝鍙澶栨坊鍔犵紪杈戝瓧娈碉紝浣滀负瀹為檯鍊肩殑褰曞叆瀛楁銆�',
+      allowClear: true,
+      required: false,
+      options: fields
+    },
+    {
+      type: 'options',
+      key: 'options',
+      label: '閫夐」',
+      initVal: card.options || [],
+      required: true,
+    },
+    {
+      type: 'codemirror',
+      key: 'dataSource',
+      label: '鏁版嵁婧�',
+      initVal: card.dataSource || '',
+      required: true,
+    },
+    {
+      type: 'text',
+      key: 'valueField',
+      label: '鍊悸峰瓧娈�',
+      initVal: card.valueField || '',
+      required: true,
+    },
+    {
+      type: 'text',
+      key: 'valueText',
+      label: '鏂囨湰路瀛楁',
+      initVal: card.valueText || '',
+      required: true,
+    },
+    {
+      type: 'text',
+      key: 'orderBy',
+      label: '鎺掑簭路瀛楁',
+      initVal: card.orderBy || '',
+      required: false,
+    },
+    {
+      type: 'select',
+      key: 'orderType',
+      label: '鎺掑簭鏂瑰紡',
+      initVal: card.orderType || 'asc',
+      options: [{
+        value: 'asc',
+        text: Formdict['header.form.asc']
+      }, {
+        value: 'desc',
+        text: Formdict['header.form.desc']
+      }]
+    },
+    {
+      type: 'text',
+      key: 'disableField',
+      label: '绂佺敤路瀛楁',
+      initVal: card.disableField || '',
+      tooltip: '璁剧疆绂佺敤瀛楁锛屼笖瀛楁鍊间负true鏃讹紝閫夐」涓嶅彲閫夈��',
+      required: false,
+    },
+    {
+      type: 'radio',
+      key: 'dropdown',
+      label: '涓嬫媺瀹藉害',
+      initVal: card.dropdown || 'flex',
+      required: false,
+      options: [{
+        value: 'flex',
+        text: '鑷�傚簲'
+      }, {
+        value: 'fixed',
+        text: '瀹氬'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'required',
       label: '蹇呭~',
       initVal: card.required || 'false',
@@ -182,53 +339,51 @@
       }]
     },
     {
-      type: 'text',
-      key: 'initval',
-      label: '榛樿鍊�',
-      initVal: card.initval,
-      tooltip: '浣跨敤$copy鏃讹紝琛ㄧず鏂板鏃跺鍒朵笂涓�琛屼俊鎭��',
-      required: false
+      type: 'radio',
+      key: 'database',
+      label: '鏁版嵁搴�',
+      initVal: card.database || 'local',
+      options: [{
+        value: 'local',
+        text: '鏈湴'
+      }, {
+        value: 'sso',
+        text: '绯荤粺'
+      }]
     },
     {
       type: 'select',
       key: 'enter',
       label: '鍥炶溅鍒囨崲',
       initVal: card.enter || '$next',
+      tooltip: '鍖呮嫭鏂囨湰鎴栨暟鍊煎洖杞︿簨浠躲�佷笅鎷夎彍鍗曢�変腑浜嬩欢銆佸紑鍏冲垏鎹簨浠躲��',
       options: editCols
     },
-    {
-      type: 'radio',
-      key: 'footEnter',
-      label: '鏈鍥炶溅',
-      initVal: card.footEnter || 'false',
-      tooltip: '鏂板鍔熻兘浠呭湪琛ㄦ牸鍙柊澧炴椂鏈夋晥銆�',
-      options: [{
-        value: 'sub',
-        text: '鎻愪氦'
-      }, {
-        value: 'add',
-        text: '鏂板'
-      }, {
-        value: 'false',
-        text: '鏃犲姩浣�'
-      }]
-    },
+    // {
+    //   type: 'radio',
+    //   key: 'footEnter',
+    //   label: '鏈鍥炶溅',
+    //   initVal: card.footEnter || 'false',
+    //   tooltip: '鏂板鍔熻兘浠呭湪琛ㄦ牸鍙柊澧炴椂鏈夋晥銆�',
+    //   options: [{
+    //     value: 'sub',
+    //     text: '鎻愪氦'
+    //   }, {
+    //     value: 'add',
+    //     text: '鏂板'
+    //   }, {
+    //     value: 'false',
+    //     text: '鏃犲姩浣�'
+    //   }]
+    // },
     {
       type: 'number',
       key: 'decimal',
       min: 0,
       max: 18,
-      decimal: 0,
+      precision: 0,
       label: Formdict['header.form.decimal'],
       initVal: card.decimal || 0,
-      required: true
-    },
-    {
-      type: 'number',
-      key: 'max',
-      label: '鏈�澶у��',
-      initVal: card.max,
-      unlimit: true,
       required: false
     },
     {
@@ -240,19 +395,30 @@
       required: false
     },
     {
+      type: 'number',
+      key: 'max',
+      label: '鏈�澶у��',
+      initVal: card.max,
+      unlimit: true,
+      required: false
+    },
+    {
       type: 'select',
       key: 'format',
       label: Formdict['header.form.format'],
       initVal: card.format || 'none',
       options: [{
         value: 'none',
-        text: Formdict['model.empty']
+        text: '鏃�'
       }, {
         value: 'thdSeparator',
-        text: Formdict['header.form.thdSeparator']
+        text: '鍗冨垎浣�'
       }, {
         value: 'percent',
         text: '鐧惧垎姣�'
+      }, {
+        value: 'abs',
+        text: '缁濆鍊�'
       }],
       required: false
     },
@@ -263,7 +429,10 @@
       initVal: card.textFormat || 'none',
       options: [{
         value: 'none',
-        text: Formdict['model.empty']
+        text: '鏃�'
+      }, {
+        value: 'encryption',
+        text: '鍔犲瘑'
       }, {
         value: 'YYYY-MM-DD',
         text: 'YYYY-MM-DD'
@@ -279,7 +448,6 @@
       label: Formdict['header.form.prefix'],
       initVal: card.prefix || '',
       required: false,
-      readonly: false
     },
     {
       type: 'text',
@@ -287,7 +455,35 @@
       label: Formdict['header.form.postfix'],
       initVal: card.postfix || '',
       required: false,
-      readonly: false
+    },
+    {
+      type: 'radio',
+      key: 'eval',
+      label: '瑙f瀽',
+      initVal: card.eval || 'true',
+      tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��',
+      required: false,
+      options: [
+        { value: 'true', text: '鏄�' },
+        { value: 'false', text: '鍚�' }
+      ]
+    },
+    {
+      type: 'textarea',
+      key: 'formula',
+      label: '鍏紡',
+      initVal: card.formula || '',
+      tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛�',
+      placeholder: '渚嬪锛欯price@ * @number@',
+      required: true
+    },
+    {
+      type: 'multiselect',
+      key: 'linkSubField',
+      label: '濉厖琛ㄥ崟',
+      tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑瀛楁涓��',
+      initVal: card.linkSubField || [],
+      options: fields
     },
     {
       type: 'multiselect',

--
Gitblit v1.8.0