From d7ec8fbd65cd7225ce8d405a0ee0a1f166f44d7b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 九月 2021 17:23:54 +0800
Subject: [PATCH] 2021-09-16

---
 src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx |   58 +++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 47 insertions(+), 11 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 09abffc..e2b4ae1 100644
--- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -6,18 +6,36 @@
 /**
  * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭�
  * @param {object} card       // 鎼滅储鏉′欢瀵硅薄
- * @param {Array}  menulist   // 鑿滃崟鍒楄〃-鐢ㄤ簬瀛楁閫忚
  */
-export function getColumnForm (card, menulist = [], fields = []) {
+export function getColumnForm (card, fields = []) {
+  let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
   if (roleList) {
     try {
       roleList = JSON.parse(roleList)
-    } catch {
+    } catch (e) {
       roleList = []
     }
   } else {
     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 = []
   }
 
   let options = [{
@@ -41,6 +59,9 @@
   }, {
     value: 'colspan',
     text: '鍚堝苟鍒�'
+  }, {
+    value: 'index',
+    text: '搴忓彿'
   }]
 
   if (!card.isSub) {
@@ -243,12 +264,11 @@
       key: 'postfix',
       label: Formdict['header.form.postfix'],
       initVal: card.postfix || '',
-      tooltipClass: 'middle',
       required: false,
       readonly: false
     },
     {
-      type: 'radio',
+      type: 'select',
       key: 'lenWidRadio',
       label: '闀垮姣�',
       initVal: card.lenWidRadio || '1:1',
@@ -321,22 +341,25 @@
       }, {
         value: 'linkurl',
         text: '閾炬帴'
-      }]
+      }],
+      forbidden: appType === 'mob'
     },
     {
-      type: 'cascader',
+      type: appType === 'pc' ? 'select' : 'cascader',
       key: 'linkmenu',
       label: Formdict['model.menu'],
-      initVal: card.linkmenu || [],
+      initVal: card.linkmenu || (appType === 'pc' ? '' : []),
       required: true,
-      options: menulist
+      options: menulist,
+      forbidden: appType === 'mob'
     },
     {
       type: 'textarea',
       key: 'linkurl',
       label: '閾炬帴鍦板潃',
       initVal: card.linkurl || '',
-      required: true
+      required: true,
+      forbidden: appType === 'mob'
     },
     {
       type: 'multiselect',
@@ -344,7 +367,20 @@
       label: '鍏宠仈瀛楁',
       initVal: card.linkfields || [],
       required: false,
-      options: fields
+      options: fields,
+      forbidden: appType === 'mob'
+    },
+    {
+      type: 'radio',
+      key: 'open',
+      label: '鎵撳紑鏂瑰紡',
+      initVal: card.open || 'blank',
+      required: false,
+      forbid: appType !== 'pc',
+      options: [
+        { value: 'blank', text: '鏂扮獥鍙�' },
+        { value: 'self', text: '褰撳墠绐楀彛' }
+      ]
     },
     {
       type: 'multiselect',

--
Gitblit v1.8.0