From 7b0dbecd1d6155d26ec67be0a47a16264c738c85 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 09 五月 2023 14:48:10 +0800
Subject: [PATCH] 2023-05-09

---
 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx |   93 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 73 insertions(+), 20 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 bd69d85..7b052f5 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -14,7 +14,8 @@
     roleList = []
   }
 
-  if (['picture', 'link', 'colspan'].includes(card.type)) {
+  // if (['picture', 'link', 'colspan'].includes(card.type)) {
+  if (['picture', 'link'].includes(card.type)) {
     card.type = 'text'
   }
 
@@ -31,8 +32,11 @@
     value: 'custom',
     text: '鑷畾涔夊垪'
   }, {
-    value: 'action',
-    text: '鎿嶄綔'
+    value: 'colspan',
+    text: '鍚堝苟鍒�'
+  // }, {
+  //   value: 'action',
+  //   text: '鎿嶄綔'
   }, {
     value: 'formula',
     text: '鍏紡'
@@ -40,6 +44,13 @@
     value: 'index',
     text: '搴忓彿'
   }]
+
+  if (!card.isSub) {
+    options.push({
+      value: 'action',
+      text: '鎿嶄綔'
+    })
+  }
 
   let editCols = [
     {
@@ -60,6 +71,15 @@
       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
+          })
+        }
       })
     }
   })
@@ -116,7 +136,7 @@
       type: 'radio',
       key: 'IsSort',
       label: '鎺掑簭',
-      initVal: card.IsSort || 'false',
+      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
       required: true,
       options: [{
         value: 'true',
@@ -143,21 +163,21 @@
         text: '鍙冲榻�'
       }]
     },
-    {
-      type: 'radio',
-      key: 'sum',
-      label: '鏄剧ず鍚堣',
-      initVal: card.sum || 'false',
-      tooltip: '鍚堣淇℃伅鍙湪浣跨敤绯荤粺鏁版嵁婧愭椂鏈夋晥銆�',
-      required: false,
-      options: [{
-        value: 'true',
-        text: '鏄�'
-      }, {
-        value: 'false',
-        text: '鍚�'
-      }]
-    },
+    // {
+    //   type: 'radio',
+    //   key: 'sum',
+    //   label: '鏄剧ず鍚堣',
+    //   initVal: card.sum || 'false',
+    //   tooltip: '鍚堣淇℃伅鍙湪浣跨敤绯荤粺鏁版嵁婧愭椂鏈夋晥銆�',
+    //   required: false,
+    //   options: [{
+    //     value: 'true',
+    //     text: '鏄�'
+    //   }, {
+    //     value: 'false',
+    //     text: '鍚�'
+    //   }]
+    // },
     {
       type: 'radio',
       key: 'editable',
@@ -354,6 +374,24 @@
       tooltip: '鍖呮嫭鏂囨湰鎴栨暟鍊煎洖杞︿簨浠躲�佷笅鎷夎彍鍗曢�変腑浜嬩欢銆佸紑鍏冲垏鎹簨浠躲��',
       options: editCols
     },
+    {
+      type: 'select',
+      key: 'ctrlField',
+      label: '绂佺敤瀛楁',
+      initVal: card.ctrlField || '',
+      tooltip: '鎺у埗鍗曞厓鏍兼槸鍚﹀彲浠ョ紪杈戙��',
+      allowClear: true,
+      required: false,
+      options: fields
+    },
+    {
+      type: 'text',
+      key: 'ctrlValue',
+      label: '绂佺敤鍊�',
+      initVal: card.ctrlValue || '',
+      tooltip: '澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�',
+      required: false
+    },
     // {
     //   type: 'radio',
     //   key: 'footEnter',
@@ -455,7 +493,7 @@
       type: 'radio',
       key: 'eval',
       label: '瑙f瀽',
-      initVal: card.eval || 'true',
+      initVal: card.eval || 'false',
       tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��',
       required: false,
       options: [
@@ -481,6 +519,21 @@
       options: fields
     },
     {
+      type: 'radio',
+      key: 'noValue',
+      label: '绌哄��',
+      initVal: card.noValue || 'show',
+      tooltip: '褰撳�间负0鏃舵槸鍚︽樉绀�',
+      required: false,
+      options: [{
+        value: 'show',
+        text: '鏄剧ず'
+      }, {
+        value: 'hide',
+        text: '闅愯棌'
+      }]
+    },
+    {
       type: 'multiselect',
       key: 'blacklist',
       label: '榛戝悕鍗�',

--
Gitblit v1.8.0