From 67036fb0ed31d77ca33b660ce5f9f47c29ae65c0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 03 三月 2024 11:47:46 +0800
Subject: [PATCH] 2024-03-03

---
 src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx |  209 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 129 insertions(+), 80 deletions(-)

diff --git a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
index 1c53e2e..b50848d 100644
--- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -1,8 +1,3 @@
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
-
-const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
-
 /**
  * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭�
  * @param {object} card       // 鎼滅储鏉′欢瀵硅薄
@@ -45,8 +40,17 @@
     value: 'number',
     text: '鏁板瓧'
   }, {
+    value: 'custom',
+    text: '鑷畾涔夊垪'
+  }, {
+    value: 'formula',
+    text: '鍏紡'
+  }, {
     value: 'picture',
     text: '鍥剧墖'
+  }, {
+    value: 'video',
+    text: '瑙嗛'
   }, {
     value: 'link',
     text: '閾炬帴'
@@ -54,25 +58,12 @@
     value: 'textarea',
     text: '澶氳鏂囨湰'
   }, {
-    value: 'custom',
-    text: '鑷畾涔夊垪'
-  }, {
     value: 'colspan',
     text: '鍚堝苟鍒�'
-  }, {
-    value: 'formula',
-    text: '鍏紡'
   }, {
     value: 'index',
     text: '搴忓彿'
   }]
-
-  if (!card.isSub) {
-    options.push({
-      value: 'action',
-      text: '鎿嶄綔'
-    })
-  }
 
   if (!card.linkurl && (!card.linkmenu || card.linkmenu.length === 0)) {
     card.perspective = ''
@@ -89,7 +80,7 @@
     {
       type: 'select',
       key: 'type',
-      label: Formdict['model.form.type'],
+      label: '绫诲瀷',
       initVal: card.type,
       required: true,
       options: options
@@ -97,7 +88,7 @@
     {
       type: 'select',
       key: 'field',
-      label: Formdict['model.form.field'],
+      label: '瀛楁',
       initVal: card.field,
       required: true,
       options: fields
@@ -105,7 +96,7 @@
     {
       type: 'select',
       key: 'nameField',
-      label: Formdict['model.name'] + Formdict['model.form.field'],
+      label: '鍚嶇О瀛楁',
       initVal: card.nameField || '',
       required: false,
       options: [{uuid: 'empty', field: '', label: '绌�'}, ...fields]
@@ -116,68 +107,114 @@
       min: 20,
       max: 1000,
       decimal: 0,
-      label: Formdict['model.form.columnWidth'],
+      label: '鍒楀',
       initVal: card.Width || 120,
       required: true
     },
     {
       type: 'radio',
       key: 'joint',
-      label: Formdict['model.form.paramJoint'],
+      label: '鎷兼帴鍙傛暟',
       initVal: card.joint || 'true',
       required: true,
       options: [{
         value: 'true',
-        text: Formdict['model.true']
+        text: '鏄�'
       }, {
         value: 'false',
-        text: Formdict['model.false']
+        text: '鍚�'
       }]
     },
     {
       type: 'radio',
       key: 'Hide',
-      label: Formdict['model.hidden'],
+      label: '闅愯棌',
       initVal: card.Hide || 'false',
       required: true,
       options: [{
         value: 'true',
-        text: Formdict['model.true']
+        text: '鏄�'
       }, {
         value: 'false',
-        text: Formdict['model.false']
+        text: '鍚�'
       }]
     },
     {
       type: 'radio',
       key: 'IsSort',
-      label: Formdict['model.sort'],
-      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
+      label: '鎺掑簭',
+      initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
       required: true,
       options: [{
         value: 'true',
-        text: Formdict['model.true']
+        text: '鏄�'
       }, {
         value: 'false',
-        text: Formdict['model.false']
+        text: '鍚�'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'sortField',
+      label: '鎺掑簭瀛楁',
+      initVal: card.sortField || '',
+      required: true,
+      options: fields
+    },
+    {
+      type: 'radio',
+      key: 'eval',
+      label: '瑙f瀽鏂瑰紡',
+      initVal: card.eval || 'false',
+      tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滆绠椻�濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃瓧娈垫浛鎹⑩�濓紝浣跨敤鍑芥暟鏃跺叆鍙備负data锛堟暟缁勶級銆�',
+      required: false,
+      options: [{
+        value: 'false',
+        text: '瀛楁鏇挎崲'
+      }, {
+        value: 'true',
+        text: '璁$畻'
+      }, {
+        value: 'func',
+        text: '鍑芥暟'
       }]
     },
     {
       type: 'radio',
       key: 'Align',
-      label: Formdict['model.form.align'],
+      label: '瀵归綈鏂瑰紡',
       initVal: card.Align || 'left',
       required: true,
       options: [{
         value: 'left',
-        text: Formdict['model.form.alignLeft']
+        text: '宸﹀榻�'
       }, {
         value: 'center',
-        text: Formdict['model.form.alignCenter']
+        text: '灞呬腑'
       }, {
         value: 'right',
-        text: Formdict['model.form.alignRight']
+        text: '鍙冲榻�'
       }]
+    },
+    {
+      type: 'number',
+      key: 'startTime',
+      precision: 0,
+      label: '寮�濮嬫椂闂�',
+      initVal: card.startTime || 0,
+      tooltip: '瑙嗛寮�濮嬫挱鏀剧殑鏃堕棿锛岀敤浜庤皟鏁磋棰戝垵濮嬪寲灞曠ず鐨勭晫闈€��',
+      required: false
+    },
+    {
+      type: 'select',
+      key: 'aspectRatio',
+      label: '闀垮姣�',
+      initVal: card.aspectRatio || '16:9',
+      required: true,
+      options: [
+        { value: '4:3', text: '4:3' },
+        { value: '16:9', text: '16:9' }
+      ]
     },
     {
       type: 'radio',
@@ -188,25 +225,10 @@
       required: false,
       options: [{
         value: 'true',
-        text: Formdict['model.true']
+        text: '鏄�'
       }, {
         value: 'false',
-        text: Formdict['model.false']
-      }]
-    },
-    {
-      type: 'radio',
-      key: 'sum',
-      label: '鏄剧ず鍚堣',
-      initVal: card.sum || 'false',
-      tooltip: '鍚堣淇℃伅鍙湪浣跨敤绯荤粺鏁版嵁婧愭椂鏈夋晥銆�',
-      required: false,
-      options: [{
-        value: 'true',
-        text: Formdict['model.true']
-      }, {
-        value: 'false',
-        text: Formdict['model.false']
+        text: '鍚�'
       }]
     },
     {
@@ -215,14 +237,14 @@
       min: 0,
       max: 18,
       decimal: 0,
-      label: Formdict['header.form.decimal'],
-      initVal: card.decimal || 0,
+      label: '灏忔暟浣�',
+      initVal: card.decimal,
       required: false
     },
     {
       type: 'select',
       key: 'format',
-      label: Formdict['header.form.format'],
+      label: '鏍煎紡鍖�',
       initVal: card.format || 'none',
       options: [{
         value: 'none',
@@ -242,7 +264,7 @@
     {
       type: 'select',
       key: 'textFormat',
-      label: Formdict['header.form.format'],
+      label: '鏍煎紡鍖�',
       initVal: card.textFormat || 'none',
       options: [{
         value: 'none',
@@ -262,7 +284,7 @@
     {
       type: 'text',
       key: 'prefix',
-      label: Formdict['header.form.prefix'],
+      label: '鍓嶇紑',
       initVal: card.prefix || '',
       required: false,
       readonly: false
@@ -270,7 +292,7 @@
     {
       type: 'text',
       key: 'postfix',
-      label: Formdict['header.form.postfix'],
+      label: '鍚庣紑',
       initVal: card.postfix || '',
       required: false,
       readonly: false
@@ -313,17 +335,41 @@
     },
     {
       type: 'radio',
+      key: 'backgroundSize',
+      label: '鍥惧儚澶у皬',
+      initVal: card.backgroundSize || 'cover',
+      required: false,
+      options: [
+        { value: 'cover', text: '瑕嗙洊' },
+        { value: 'contain', text: '鍖呭惈' },
+        { value: 'auto', text: '鑷�傚簲' },
+      ]
+    },
+    {
+      type: 'radio',
       key: 'scale',
       label: '鐐瑰嚮缂╂斁',
       initVal: card.scale || 'true',
       required: false,
       options: [{
         value: 'true',
-        text: Formdict['model.true']
+        text: '鏄�'
       }, {
         value: 'false',
-        text: Formdict['model.false']
+        text: '鍚�'
       }]
+    },
+    {
+      type: 'radio',
+      key: 'lostTip',
+      label: '鍥剧墖缂哄け',
+      initVal: card.lostTip || 'true',
+      tooltip: '鍥剧墖鍦板潃涓嶅瓨鍦ㄦ椂锛屾槸鍚︽彁绀哄浘鐗囦涪澶便��',
+      required: false,
+      options: [
+        { value: 'true', text: '鎻愮ず' },
+        { value: 'false', text: '涓嶆彁绀�' }
+      ]
     },
     {
       type: 'radio',
@@ -340,16 +386,16 @@
         value: 'linkurl',
         text: '閾炬帴'
       }],
-      forbidden: appType === 'mob'
+      forbid: appType === 'mob'
     },
     {
       type: appType === 'pc' ? 'select' : 'cascader',
       key: 'linkmenu',
-      label: Formdict['model.menu'],
+      label: '鑿滃崟',
       initVal: card.linkmenu || (appType === 'pc' ? '' : []),
       required: true,
       options: menulist,
-      forbidden: appType === 'mob'
+      forbid: appType === 'mob'
     },
     {
       type: 'textarea',
@@ -357,7 +403,7 @@
       label: '閾炬帴鍦板潃',
       initVal: card.linkurl || '',
       required: true,
-      forbidden: appType === 'mob'
+      forbid: appType === 'mob'
     },
     {
       type: 'multiselect',
@@ -366,7 +412,7 @@
       initVal: card.linkfields || [],
       required: false,
       options: fields,
-      forbidden: appType === 'mob'
+      forbid: appType === 'mob'
     },
     {
       type: 'radio',
@@ -381,18 +427,6 @@
       ]
     },
     {
-      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: '鍏紡',
@@ -402,13 +436,28 @@
       required: true
     },
     {
+      type: 'radio',
+      key: 'noValue',
+      label: '绌哄��',
+      initVal: card.noValue || 'show',
+      tooltip: '鏁板�间负 0 鎴栨椂闂村皬浜� 1949-10-02 鏃讹紝鏄惁鏄剧ず',
+      required: false,
+      options: [{
+        value: 'show',
+        text: '鏄剧ず'
+      }, {
+        value: 'hide',
+        text: '闅愯棌'
+      }]
+    },
+    {
       type: 'multiselect',
       key: 'blacklist',
-      label: Formdict['header.form.blacklist'],
+      label: '榛戝悕鍗�',
       initVal: card.blacklist || [],
       required: false,
       options: roleList,
-      forbidden: appType === 'mob'
+      forbid: appType === 'mob'
     }
   ]
 }

--
Gitblit v1.8.0