From 8040a18c4b2a848d252bf01838f06c7aec1be9f3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 六月 2024 15:16:11 +0800
Subject: [PATCH] 2024-06-07

---
 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx |  888 +++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 676 insertions(+), 212 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 e2b4ae1..94e2a8c 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -1,14 +1,8 @@
-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       // 鎼滅储鏉′欢瀵硅薄
  */
-export function getColumnForm (card, fields = []) {
-  let appType = sessionStorage.getItem('appType')
+export function getColumnForm (card, fields = [], columns = [], wrap) {
   let roleList = sessionStorage.getItem('sysRoles')
   if (roleList) {
     try {
@@ -20,59 +14,96 @@
     roleList = []
   }
 
-  let menulist = []
-
-  if (appType === 'pc') {
-    menulist = sessionStorage.getItem('appMenus')
-  } else if (!appType) {
-    menulist = sessionStorage.getItem('fstMenuList')
-  }
-
-  if (menulist) {
-    try {
-      menulist = JSON.parse(menulist)
-    } catch (e) {
-      menulist = []
-    }
-  } else {
-    menulist = []
+  if (['picture', 'link'].includes(card.type)) {
+    card.type = 'text'
   }
 
   let options = [{
     value: 'text',
-    text: Formdict['model.form.text']
+    text: '鏂囨湰'
   }, {
     value: 'number',
-    text: Formdict['model.form.number']
-  }, {
-    value: 'picture',
-    text: Formdict['model.form.picture']
-  }, {
-    value: 'link',
-    text: Formdict['model.form.href']
-  }, {
-    value: 'textarea',
-    text: Formdict['model.form.textarea']
+    text: '鏁板瓧'
   }, {
     value: 'custom',
     text: '鑷畾涔夊垪'
   }, {
+    value: 'formula',
+    text: '鍏紡'
+  }, {
+    value: 'textarea',
+    text: '澶氳鏂囨湰'
+  }, {
     value: 'colspan',
     text: '鍚堝苟鍒�'
+  }, {
+    value: 'extend',
+    text: '鎵╁睍鍒�'
   }, {
     value: 'index',
     text: '搴忓彿'
   }]
 
-  if (!card.isSub) {
-    options.push({
-      value: 'action',
-      text: '鎿嶄綔'
+  let editCols = [
+    // {
+    //   field: '$sub',
+    //   label: '鎻愪氦'
+    // },
+    {
+      field: '$noAct',
+      label: '鏃犲姩浣�'
+    },
+    {
+      field: '$next',
+      label: '涓嬩竴琛�'
+    }
+  ]
+
+  if (card.enter === '$sub') {
+    card.enter = '$noAct'
+  }
+  if (wrap.commit === 'change') {
+    editCols[0].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 + '-')
+      }
     })
   }
 
-  if (!card.linkurl && (!card.linkmenu || card.linkmenu.length === 0)) {
-    card.perspective = ''
+  getcols(columns)
+ 
+  editCols.push(...cols)
+
+  cols.forEach(col => {
+    editCols.push({
+      field: '$next_' + col.field,
+      label: col.label + '锛堜笅涓�琛岋級'
+    })
+  })
+
+  editCols.push({
+    field: '$next_' + card.uuid,
+    label: card.label + '锛堜笅涓�琛岋級'
+  })
+
+  if (wrap.commit === 'change') {
+    editCols.push({
+      field: '$noActX',
+      label: '鏃犲姩浣�',
+      disabled: card.editType !== 'select'
+    })
+  } else if (card.enter === '$noActX') {
+    card.enter = '$noAct'
   }
 
   return [
@@ -86,7 +117,7 @@
     {
       type: 'select',
       key: 'type',
-      label: Formdict['model.form.type'],
+      label: '绫诲瀷',
       initVal: card.type,
       required: true,
       options: options
@@ -94,154 +125,672 @@
     {
       type: 'select',
       key: 'field',
-      label: Formdict['model.form.field'],
+      label: '瀛楁',
       initVal: card.field,
       required: true,
       options: fields
-    },
-    {
-      type: 'select',
-      key: 'nameField',
-      label: Formdict['model.name'] + Formdict['model.form.field'],
-      initVal: card.nameField || '',
-      required: false,
-      options: [{uuid: 'empty', field: '', label: '绌�'}, ...fields]
     },
     {
       type: 'number',
       key: 'Width',
       min: 20,
       max: 1000,
-      decimal: 0,
-      label: Formdict['model.form.columnWidth'],
+      precision: 0,
+      label: '鍒楀',
       initVal: card.Width || 120,
       required: true
     },
     {
       type: 'radio',
-      key: 'joint',
-      label: Formdict['model.form.paramJoint'],
-      initVal: card.joint || 'true',
-      required: true,
-      options: [{
-        value: 'true',
-        text: Formdict['model.true']
-      }, {
-        value: 'false',
-        text: Formdict['model.false']
-      }]
-    },
-    {
-      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 || 'true',
+      label: '鎺掑簭',
+      initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
       required: true,
-      forbidden: card.isSub,
       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: 'radio',
-      key: 'rowspan',
-      label: '琛屽悎骞�',
-      initVal: card.rowspan || 'false',
-      tooltip: '鐩搁偦琛屼俊鎭浉鍚屾椂锛屽崟鍏冩牸鍚堝苟銆�',
-      required: false,
+      key: 'colUnit',
+      label: '鍗曚綅',
+      initVal: card.colUnit || 'day',
+      required: true,
       options: [{
-        value: 'true',
-        text: Formdict['model.true']
+        value: 'day',
+        text: '澶�'
       }, {
-        value: 'false',
-        text: Formdict['model.false']
+        value: 'hour',
+        text: '灏忔椂'
+      }]
+    },
+    {
+      type: 'number',
+      key: 'shift',
+      label: '鍋忕Щ閲�',
+      initVal: card.shift || 0,
+      min: -1000,
+      max: 1000,
+      decimal: 0,
+      required: true
+    },
+    {
+      type: 'number',
+      key: 'quota',
+      label: '鎸囨爣鏁�',
+      initVal: card.quota || 7,
+      min: 1,
+      max: 1000,
+      decimal: 0,
+      required: true
+    },
+    {
+      type: 'select',
+      key: 'dayFormat',
+      label: '鏍煎紡鍖�',
+      initVal: card.dayFormat || 'M/DD',
+      required: true,
+      options: [{
+        value: 'M/DD',
+        label: 'M/DD锛�4/29锛�'
+      }, {
+        value: 'M-DD',
+        label: 'M-DD锛�4-29锛�'
+      }, {
+        value: 'M鏈圖D鏃�',
+        label: 'M鏈圖D鏃ワ紙4鏈�29鏃ワ級'
+      }, {
+        value: 'M/DD week',
+        label: 'M/DD week锛�4/29 鏄熸湡涓�锛�'
+      }, {
+        value: 'M-DD week',
+        label: 'M-DD week锛�4-29 鏄熸湡涓�锛�'
+      }, {
+        value: 'M鏈圖D鏃� week',
+        label: 'M鏈圖D鏃� week锛�4鏈�29鏃� 鏄熸湡涓�锛�'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'hourFormat',
+      label: '鏍煎紡鍖�',
+      initVal: card.hourFormat || 'H:00',
+      required: true,
+      options: [{
+        value: 'H:00',
+        label: 'H:00锛�15:00锛�'
+      }, {
+        value: 'H point',
+        label: 'H锛�15鐐癸級'
+      }, {
+        value: 'h:00',
+        label: 'h:00锛�3:00 pm锛�'
+      }]
+    },
+    {
+      type: 'text',
+      key: 'supField',
+      label: '涓婄骇瀛楁',
+      initVal: card.supField || '',
+      tooltip: '鏉ユ簮浜庝笂绾х粍浠剁殑瀛楁闆嗭紙涓婄骇缁勪欢涓虹┖鏃朵粠url鍙傛暟涓�夊彇锛夛紝璇ュ瓧娈靛�硷紙鐢ㄩ�楀彿鍒嗛殧锛夊彲鎺у埗鎵╁睍鍒楃殑鍒楀悕銆�',
+      required: false,
+      rules: [{
+        pattern: /^[0-9a-zA-Z_]*$/ig,
+        message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶄互鍙奯'
       }]
     },
     {
       type: 'radio',
-      key: 'sum',
-      label: '鏄剧ず鍚堣',
-      initVal: card.sum || 'false',
-      tooltip: '鍚堣淇℃伅鍙湪浣跨敤绯荤粺鏁版嵁婧愭椂鏈夋晥銆�',
+      key: 'editable',
+      label: '鍙紪杈�',
+      initVal: card.editable || 'false',
+      required: true,
+      options: [{
+        value: 'false',
+        text: '鍚�'
+      }, {
+        value: 'true',
+        text: '鏄�'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'editType',
+      label: '缂栬緫绫诲瀷',
+      initVal: card.editType || 'text',
+      required: true,
+      options: [{
+        value: 'text',
+        text: '鏂囨湰'
+      }, {
+        value: 'select',
+        text: '涓嬫媺'
+      }, {
+        value: 'switch',
+        text: '寮�鍏�'
+      }, {
+        value: 'date',
+        text: '鏃ユ湡锛堝ぉ锛�'
+      }, {
+        value: 'popSelect',
+        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)'
+      }]
+    },
+    {
+      type: 'radio',
+      key: 'required',
+      label: '蹇呭~',
+      initVal: card.required || 'false',
+      required: false,
+      options: [{
+        value: 'false',
+        text: '鍚�'
+      }, {
+        value: 'true',
+        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: 'options',
+      key: 'options',
+      label: '閫夐」',
+      initVal: card.options || [],
+      required: true,
+    },
+    {
+      type: 'codemirror',
+      key: 'dataSource',
+      label: '鏁版嵁婧�',
+      initVal: card.dataSource || '',
+      placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆傚叕鍏卞�粿BID@銆�',
+      required: true,
+    },
+    {
+      type: 'fields',
+      key: 'columns',
+      label: '瀛楁闆�',
+      initVal: card.columns || [],
+      required: true,
+      readonly: false,
+      columns: [
+        {
+          title: '鍚嶇О',
+          dataIndex: 'label',
+          inputType: 'input',
+          editable: true,
+          initval: 'label',
+          width: '20%'
+        },
+        {
+          title: '瀛楁',
+          dataIndex: 'field',
+          inputType: 'input',
+          editable: true,
+          unique: true,
+          strict: true,
+          copy: true,
+          initval: 'field',
+          rules: [{
+            pattern: /^[\u4E00-\u9FA50-9a-zA-Z_-]*$/ig,
+            message: '璇蜂娇鐢ㄦ暟瀛椼�佸瓧姣嶃�佹眽瀛椾互鍙奯-'
+          }],
+          width: '20%'
+        },
+        {
+          title: '闅愯棌',
+          dataIndex: 'Hide',
+          inputType: 'radio',
+          editable: true,
+          width: '20%',
+          initval: 'false',
+          options: [
+            {value: 'true', text: '鏄�'},
+            {value: 'false', text: '鍚�'},
+          ],
+          render: (text, record) => {
+            if (text === 'true') {
+              return '鏄�'
+            } else {
+              return '鍚�'
+            }
+          }
+        },
+        {
+          title: '鎺掑簭',
+          dataIndex: 'IsSort',
+          inputType: 'radio',
+          editable: true,
+          width: '20%',
+          initval: 'false',
+          options: [
+            {value: 'true', text: '鏄�'},
+            {value: 'false', text: '鍚�'},
+          ],
+          render: (text, record) => {
+            if (text === 'true') {
+              return '鏄�'
+            } else {
+              return '鍚�'
+            }
+          }
+        },
+        {
+          title: '鍒楀',
+          dataIndex: 'Width',
+          inputType: 'number',
+          editable: true,
+          width: '20%',
+          initval: 120
+        }
+      ]
+    },
+    {
+      type: 'select',
+      key: 'primaryKey',
+      label: '涓婚敭',
+      initVal: card.primaryKey || '',
+      required: true,
+      readonly: false,
+      options: 'columns'
+    },
+    {
+      type: 'text',
+      key: 'order',
+      label: '榛樿鎺掑簭',
+      initVal: card.order || '',
+      placeholder: 'ID asc',
+      required: true
+    },
+    {
+      type: 'select',
+      key: 'showField',
+      label: '鏄剧ず瀛楁',
+      initVal: card.showField || '',
+      tooltip: '鐢ㄤ簬鎺у埗鍗曞厓鏍间腑鐨勬樉绀哄唴瀹广��',
+      required: false,
+      options: 'columns'
+    },
+    {
+      type: 'select',
+      key: 'controlField',
+      label: '绂佺敤瀛楁',
+      initVal: card.controlField || '',
+      tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆傚瓧娈靛�间负true鏃讹紝閫夐」涓嶅彲閫夈��',
+      required: false,
+      allowClear: true,
+      joint: true,
+      options: 'columns'
+    },
+    {
+      type: 'text',
+      key: 'searchKey',
+      label: '鎼滅储瀛楁',
+      initVal: card.searchKey || '',
+      tooltip: '澶氫釜鍊艰鐢ㄩ�楀彿鍒嗛殧銆�',
+      required: false,
+      rules: [{
+        pattern: /^[0-9a-zA-Z,_-]*$/ig,
+        message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶄互鍙奯-',
+      }]
+    },
+    {
+      type: 'number',
+      key: 'popWidth',
+      label: '寮圭獥瀹藉害',
+      initVal: card.popWidth || 60,
+      tooltip: '灏忎簬100鏃朵负鐧惧垎鐜囷紝澶т簬100鏃朵负缁濆鍊笺��',
+      required: true
+    },
+    {
+      type: 'radio',
+      key: 'laypage',
+      label: '鍒嗛〉',
+      initVal: card.laypage || 'true',
       required: false,
       options: [{
         value: 'true',
-        text: Formdict['model.true']
+        text: '鏄�'
       }, {
         value: 'false',
-        text: Formdict['model.false']
+        text: '鍚�'
       }]
+    },
+    {
+      type: 'radio',
+      key: 'onload',
+      label: '鍒濆鍖�',
+      initVal: card.onload || 'true',
+      tooltip: '褰撴病鏈夎缃悳绱㈠瓧娈垫椂锛屽垵濮嬪寲鍔犺浇鏁版嵁銆�',
+      required: false,
+      options: [{
+        value: 'true',
+        text: '鍔犺浇'
+      }, {
+        value: 'false',
+        text: '涓嶅姞杞�'
+      }]
+    },
+    {
+      type: 'radio',
+      key: 'cache',
+      label: '閫夐」鏌ヨ',
+      initVal: card.cache || 'true',
+      tooltip: '鏁版嵁鏌ヨ鏄惁浣跨敤缂撳瓨銆�',
+      required: false,
+      options: [{
+        value: 'true',
+        text: '缂撳瓨'
+      }, {
+        value: 'false',
+        text: '瀹炴椂'
+      }]
+    },
+    {
+      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: '姝e簭'
+      }, {
+        value: 'desc',
+        text: '鍊掑簭'
+      }]
+    },
+    {
+      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: 'database',
+      label: '鏁版嵁搴�',
+      initVal: card.database || 'local',
+      options: [{
+        value: 'local',
+        text: '鏈湴'
+      }, {
+        value: 'sso',
+        text: '绯荤粺'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'enter',
+      label: '鍥炶溅鍒囨崲',
+      initVal: card.enter || '$noAct',
+      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: 'select',
+      key: 'clearField',
+      label: '娓呯┖瀛楁',
+      initVal: card.clearField || '',
+      tooltip: '褰撳墠瀛楁缂栬緫鏃堕渶瑕佹竻绌虹殑瀛楁銆�',
+      allowClear: true,
+      required: false,
+      options: fields
     },
     {
       type: 'number',
       key: 'decimal',
       min: 0,
       max: 18,
-      decimal: 0,
-      label: Formdict['header.form.decimal'],
-      initVal: card.decimal || 0,
-      required: true
+      precision: 0,
+      label: '灏忔暟浣�',
+      initVal: card.decimal,
+      required: false
+    },
+    {
+      type: 'number',
+      key: 'min',
+      label: '鏈�灏忓��',
+      initVal: card.min,
+      unlimit: true,
+      required: false
+    },
+    {
+      type: 'number',
+      key: 'max',
+      label: '鏈�澶у��',
+      initVal: card.max,
+      unlimit: true,
+      required: false
     },
     {
       type: 'select',
       key: 'format',
-      label: Formdict['header.form.format'],
+      label: '鏍煎紡鍖�',
       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
     },
     {
       type: 'select',
       key: 'textFormat',
-      label: Formdict['header.form.format'],
+      label: '鏍煎紡鍖�',
       initVal: card.textFormat || 'none',
       options: [{
         value: 'none',
-        text: Formdict['model.empty']
+        text: '鏃�'
+      }, {
+        value: 'encryption',
+        text: '鍔犲瘑'
       }, {
         value: 'YYYY-MM-DD',
         text: 'YYYY-MM-DD'
@@ -254,138 +803,53 @@
     {
       type: 'text',
       key: 'prefix',
-      label: Formdict['header.form.prefix'],
+      label: '鍓嶇紑',
       initVal: card.prefix || '',
       required: false,
-      readonly: false
     },
     {
       type: 'text',
       key: 'postfix',
-      label: Formdict['header.form.postfix'],
+      label: '鍚庣紑',
       initVal: card.postfix || '',
       required: false,
-      readonly: false
-    },
-    {
-      type: 'select',
-      key: 'lenWidRadio',
-      label: '闀垮姣�',
-      initVal: card.lenWidRadio || '1:1',
-      required: true,
-      options: [
-        { value: '1:1', text: '1:1' },
-        { value: '4:3', text: '4:3' },
-        { value: '3:2', text: '3:2' },
-        { value: '16:9', text: '16:9' },
-        { value: '2:1', text: '2:1' },
-        { value: '3:1', text: '3:1' },
-        { value: '4:1', text: '4:1' },
-        { value: '5:1', text: '5:1' },
-        { value: '6:1', text: '6:1' },
-        { value: '7:1', text: '7:1' },
-        { value: '8:1', text: '8:1' },
-        { value: '9:1', text: '9:1' },
-        { value: '10:1', text: '10:1' },
-        { value: '3:4', text: '3:4' },
-        { value: '2:3', text: '2:3' },
-        { value: '9:16', text: '9:16' },
-      ]
-    },
-    {
-      type: 'radio',
-      key: 'picSort',
-      label: '鍥剧墖鎺掑垪',
-      initVal: card.picSort || '1',
-      tooltip: '鍚屼竴鍗曞厓鏍煎唴锛屽惈鏈夊寮犲浘鐗囨椂鐨勫垪鏁般��',
-      required: false,
-      options: [{
-        value: '1',
-        text: '1'
-      }, {
-        value: '2',
-        text: '2'
-      }, {
-        value: '3',
-        text: '3'
-      }, {
-        value: '4',
-        text: '4'
-      }]
-    },
-    {
-      type: 'radio',
-      key: 'scale',
-      label: Formdict['header.form.clickscale'],
-      initVal: card.scale || 'false',
-      required: false,
-      options: [{
-        value: 'true',
-        text: Formdict['model.true']
-      }, {
-        value: 'false',
-        text: Formdict['model.false']
-      }]
-    },
-    {
-      type: 'radio',
-      key: 'perspective',
-      label: '瀛楁閫忚',
-      initVal: card.perspective || '',
-      options: [{
-        value: '',
-        text: '鏃�'
-      }, {
-        value: 'linkmenu',
-        text: '鑿滃崟'
-      }, {
-        value: 'linkurl',
-        text: '閾炬帴'
-      }],
-      forbidden: appType === 'mob'
-    },
-    {
-      type: appType === 'pc' ? 'select' : 'cascader',
-      key: 'linkmenu',
-      label: Formdict['model.menu'],
-      initVal: card.linkmenu || (appType === 'pc' ? '' : []),
-      required: true,
-      options: menulist,
-      forbidden: appType === 'mob'
     },
     {
       type: 'textarea',
-      key: 'linkurl',
-      label: '閾炬帴鍦板潃',
-      initVal: card.linkurl || '',
-      required: true,
-      forbidden: appType === 'mob'
+      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: 'linkfields',
-      label: '鍏宠仈瀛楁',
-      initVal: card.linkfields || [],
-      required: false,
-      options: fields,
-      forbidden: appType === 'mob'
+      key: 'linkSubField',
+      label: '濉厖琛ㄥ崟',
+      tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑瀛楁涓��',
+      initVal: card.linkSubField || [],
+      options: fields
     },
     {
       type: 'radio',
-      key: 'open',
-      label: '鎵撳紑鏂瑰紡',
-      initVal: card.open || 'blank',
+      key: 'noValue',
+      label: '绌哄��',
+      initVal: card.noValue || 'show',
+      tooltip: '鏁板�间负 0 鎴栨椂闂村皬浜� 1949-10-02 鏃讹紝鏄惁鏄剧ず',
       required: false,
-      forbid: appType !== 'pc',
-      options: [
-        { value: 'blank', text: '鏂扮獥鍙�' },
-        { value: 'self', text: '褰撳墠绐楀彛' }
-      ]
+      options: [{
+        value: 'show',
+        text: '鏄剧ず'
+      }, {
+        value: 'hide',
+        text: '闅愯棌'
+      }]
     },
     {
       type: 'multiselect',
       key: 'blacklist',
-      label: Formdict['header.form.blacklist'],
+      label: '榛戝悕鍗�',
       initVal: card.blacklist || [],
       required: false,
       options: roleList

--
Gitblit v1.8.0