From ecbe0dc46ce2b8f607b9afd063104adeb7f10fe8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 30 三月 2021 15:19:31 +0800
Subject: [PATCH] 2021-03-30

---
 src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 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 1ab32f6..46484ca 100644
--- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -1,7 +1,7 @@
 import zhCN from '@/locales/zh-CN/model.js'
 import enUS from '@/locales/en-US/model.js'
 
-const Formdict = localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
+const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
 
 /**
  * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭�
@@ -38,16 +38,20 @@
   }, {
     value: 'custom',
     text: '鑷畾涔夊垪'
+  }, {
+    value: 'colspan',
+    text: '鍚堝苟鍒�'
   }]
 
   if (!card.isSub) {
     options.push({
-      value: 'colspan',
-      text: '鍚堝苟鍒�'
-    }, {
       value: 'action',
       text: '鎿嶄綔'
     })
+  }
+
+  if (!card.linkurl && (!card.linkmenu || card.linkmenu.length === 0)) {
+    card.perspective = ''
   }
 
   return [
@@ -126,6 +130,7 @@
       label: Formdict['model.sort'],
       initVal: card.IsSort || 'true',
       required: true,
+      forbidden: card.isSub,
       options: [{
         value: 'true',
         text: Formdict['model.true']
@@ -294,8 +299,11 @@
       type: 'radio',
       key: 'perspective',
       label: '瀛楁閫忚',
-      initVal: card.perspective || 'linkmenu',
+      initVal: card.perspective || '',
       options: [{
+        value: '',
+        text: '鏃�'
+      }, {
         value: 'linkmenu',
         text: '鑿滃崟'
       }, {
@@ -308,15 +316,23 @@
       key: 'linkmenu',
       label: Formdict['model.menu'],
       initVal: card.linkmenu || [],
-      required: false,
+      required: true,
       options: menulist
     },
     {
-      type: 'text',
+      type: 'textarea',
       key: 'linkurl',
       label: '閾炬帴鍦板潃',
       initVal: card.linkurl || '',
-      required: false
+      required: true
+    },
+    {
+      type: 'multiselect',
+      key: 'linkfields',
+      label: '鍏宠仈瀛楁',
+      initVal: card.linkfields || [],
+      required: false,
+      options: fields
     },
     {
       type: 'multiselect',

--
Gitblit v1.8.0