From 43b14af93c44ff89cf9f24a45b0451e04e6b473a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 23 十月 2023 10:00:50 +0800
Subject: [PATCH] 2023-10-23

---
 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx |  117 ++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 88 insertions(+), 29 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 14981f8..9142ee4 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -25,17 +25,17 @@
     value: 'number',
     text: '鏁板瓧'
   }, {
-    value: 'textarea',
-    text: '澶氳鏂囨湰'
-  }, {
     value: 'custom',
     text: '鑷畾涔夊垪'
   }, {
-    value: 'colspan',
-    text: '鍚堝苟鍒�'
-  }, {
     value: 'formula',
     text: '鍏紡'
+  }, {
+    value: 'textarea',
+    text: '澶氳鏂囨湰'
+  }, {
+    value: 'colspan',
+    text: '鍚堝苟鍒�'
   }, {
     value: 'index',
     text: '搴忓彿'
@@ -55,22 +55,30 @@
       label: '鏃犲姩浣�'
     }
   ]
-  columns.forEach(col => {
-    if (col.editable === 'true' && col.uuid !== card.uuid) {
-      editCols.push({
-        field: col.uuid,
-        label: col.label
-      })
-    } else if (col.type === 'colspan') {
-      col.subcols.forEach(subcol => {
-        if (subcol.editable === 'true' && subcol.uuid !== card.uuid) {
-          editCols.push({
-            field: subcol.uuid,
-            label: col.label + '-' + subcol.label
-          })
-        }
-      })
-    }
+
+  let cols = []
+  let getcols = (columns, suplabel = '') => {
+    columns.forEach(col => {
+      if (col.editable === 'true' && col.uuid !== card.uuid) {
+        cols.push({
+          field: col.uuid,
+          label: suplabel + col.label
+        })
+      } else if (col.type === 'colspan') {
+        getcols(col.subcols, col.label + '-')
+      }
+    })
+  }
+
+  getcols(columns)
+ 
+  editCols.push(...cols)
+
+  cols.forEach(col => {
+    editCols.push({
+      field: '$next_' + col.field,
+      label: col.label + '锛堜笅涓�琛岋級'
+    })
   })
 
   return [
@@ -125,7 +133,7 @@
       type: 'radio',
       key: 'IsSort',
       label: '鎺掑簭',
-      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
+      initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
       required: true,
       options: [{
         value: 'true',
@@ -136,16 +144,30 @@
       }]
     },
     {
+      type: 'select',
+      key: 'sortField',
+      label: '鎺掑簭瀛楁',
+      initVal: card.sortField || '',
+      required: true,
+      options: fields
+    },
+    {
       type: 'radio',
       key: 'eval',
-      label: '瑙f瀽',
+      label: '瑙f瀽鏂瑰紡',
       initVal: card.eval || 'false',
-      tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��',
+      tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滆绠椻�濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃瓧娈垫浛鎹⑩�濓紝浣跨敤鍑芥暟鏃跺叆鍙備负data锛堟暟缁勶級銆�',
       required: false,
-      options: [
-        { value: 'true', text: '鏄�' },
-        { value: 'false', text: '鍚�' }
-      ]
+      options: [{
+        value: 'false',
+        text: '瀛楁鏇挎崲'
+      }, {
+        value: 'true',
+        text: '璁$畻'
+      }, {
+        value: 'func',
+        text: '鍑芥暟'
+      }]
     },
     {
       type: 'radio',
@@ -193,6 +215,42 @@
       }, {
         value: 'switch',
         text: '寮�鍏�'
+      }, {
+        value: 'date',
+        text: '鏃ユ湡锛堝ぉ锛�'
+      }]
+    },
+    {
+      type: 'radio',
+      key: 'precision',
+      label: '绮剧‘搴�',
+      initVal: card.precision || 'day',
+      options: [{
+        value: 'day',
+        text: '澶�'
+      }, {
+        value: 'hour',
+        text: '灏忔椂'
+      }, {
+        value: 'minute',
+        text: '鍒嗛挓'
+      }, {
+        value: 'second',
+        text: '绉�'
+      }]
+    },
+    {
+      type: 'radio',
+      key: 'declareType',
+      label: '鏁版嵁绫诲瀷',
+      tooltip: '澹版槑鍙橀噺鏃剁殑绫诲瀷锛屾椂闂存牸寮廳atetime鎴栨枃鏈牸寮弉varchar(50)銆�',
+      initVal: card.declareType || 'datetime',
+      options: [{
+        value: 'datetime',
+        text: 'datetime'
+      }, {
+        value: 'nvarchar(50)',
+        text: 'nvarchar(50)'
       }]
     },
     {
@@ -257,6 +315,7 @@
       key: 'dataSource',
       label: '鏁版嵁婧�',
       initVal: card.dataSource || '',
+      placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆傚叕鍏卞�粿BID@銆�',
       required: true,
     },
     {

--
Gitblit v1.8.0