From 79715f2d5d7342063f5395c1e39af3a02ce04df7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 10 五月 2022 09:50:49 +0800
Subject: [PATCH] 2022-05-10

---
 public/options.json                                 |   14 +++---
 src/templates/menuconfig/editthdmenu/index.scss     |   12 ++++++
 src/templates/menuconfig/editthdmenu/index.jsx      |   32 +++++++---------
 src/tabviews/zshare/actionList/funcMegvii/index.jsx |    1 
 src/utils/option.js                                 |   17 ++++----
 5 files changed, 42 insertions(+), 34 deletions(-)

diff --git a/public/options.json b/public/options.json
index fa76f1c..f5f2215 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,18 +1,18 @@
 {
-  "appId": "201912040924165801464FF1788654BC5AC73",
-  "appkey": "20191106103859640976D6E924E464D029CF0",
+  "appId": "202108312122504607B107A83F55B40C98CCF",
+  "appkey": "20210831212235413F287EC3BF489424496C8",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mk",
+  "defaultApp": "mkindustry",
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "debugger": false,
-  "licenseKey": "",
-  "probation": "",
+  "licenseKey": "7EFE13KIKLILIJB64C12",
+  "probation": "2021-12-31",
   "keepPassword": "true",
-  "host": "http://qingqiumarket.cn",
-  "service": "MKWMS/"
+  "host": "http://demo.mk9h.cn",
+  "service": "erp_new/"
 }
\ No newline at end of file
diff --git a/src/tabviews/zshare/actionList/funcMegvii/index.jsx b/src/tabviews/zshare/actionList/funcMegvii/index.jsx
index a8c9643..8658f4e 100644
--- a/src/tabviews/zshare/actionList/funcMegvii/index.jsx
+++ b/src/tabviews/zshare/actionList/funcMegvii/index.jsx
@@ -197,6 +197,7 @@
   loginDevice = () => {
     const { lines, selectIp } = this.state
 
+    // 涓婃姤鎺ュ彛璁剧疆锛氬伐绋嬫ā寮�-鍦烘櫙妯″紡-寮�鏀炬帴鍙h缃�-鏁版嵁涓婃姤璁剧疆-鏁版嵁涓婃姤鏈嶅姟鍣ㄥ湴鍧�锛堝紑鍚湇鍔″櫒浜屾閴存潈锛�
     // let ip = 'http://localhost:3001'
     let ip = selectIp.face_ip
 
diff --git a/src/templates/menuconfig/editthdmenu/index.jsx b/src/templates/menuconfig/editthdmenu/index.jsx
index 1c9c99f..50a70cc 100644
--- a/src/templates/menuconfig/editthdmenu/index.jsx
+++ b/src/templates/menuconfig/editthdmenu/index.jsx
@@ -407,6 +407,7 @@
   }
 
   previewPicture = (template) => {
+    if (template.disabled) return
     // 鍥剧墖棰勮
     this.setState({
       preview: template.url,
@@ -555,13 +556,9 @@
 
     Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'menu'}).then(res => {
       let _templates = []
-      let hasRolePermission = false
 
       res.UserTemp.forEach(temp => {
         if (temp.Template === 'NewPage') {
-          return
-        } else if (temp.Template === 'RolePermission') {
-          hasRolePermission = true
           return
         } else if (temp.Template === 'CustomPage' && memberLevel < 20) {
           return
@@ -576,10 +573,9 @@
       })
 
       sysTemplates = sysTemplates.map(temp => {
-        if (temp.type === 'RolePermission' && !hasRolePermission) {
-          temp.hidden = false
-        } else if (temp.type === 'CustomPage' && memberLevel < 20) {
-          temp.hidden = true
+        if (temp.type === 'CustomPage' && memberLevel < 20) {
+          temp.disabled = true
+          temp.disTitle = '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'
         }
 
         return temp
@@ -618,15 +614,15 @@
     let sysTemplates = fromJS(this.state.sysTemplates).toJS()
 
     // 瑙掕壊鏉冮檺鍒嗛厤妯℃澘锛屽彧鍙互娣诲姞涓�娆�
-    if (sysMenu.isSystem && (sysMenu.Template === 'RolePermission')) {
-      sysTemplates = sysTemplates.map(temp => {
-        if (temp.type === sysMenu.type) {
-          temp.hidden = true
-        }
+    // if (sysMenu.isSystem && (sysMenu.Template === 'RolePermission')) {
+    //   sysTemplates = sysTemplates.map(temp => {
+    //     if (temp.type === sysMenu.type) {
+    //       temp.hidden = true
+    //     }
 
-        return temp
-      })
-    }
+    //     return temp
+    //   })
+    // }
 
     this.menuFormRef.handleConfirm().then(res => {
       let PageParam = {
@@ -827,10 +823,10 @@
                 <TabPane tab="绯荤粺妯℃澘" key="1">
                   <Row>
                     {this.state.sysTemplates.map((template, index) => {
-                      if (template.hidden) return null
+                      // if (template.hidden) return null
 
                       return (
-                        <Col key={`${index}`} span={8}>
+                        <Col key={`${index}`} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={8}>
                           <Card
                             title={template.title}>
                             <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/>
diff --git a/src/templates/menuconfig/editthdmenu/index.scss b/src/templates/menuconfig/editthdmenu/index.scss
index 05931e0..83a9525 100644
--- a/src/templates/menuconfig/editthdmenu/index.scss
+++ b/src/templates/menuconfig/editthdmenu/index.scss
@@ -123,6 +123,18 @@
       .ant-col {
         padding: 10px;
       }
+      .ant-col.disabled {
+        cursor: not-allowed;
+        .ant-card-head-title {
+          color: #959595;
+        }
+        .card-operation {
+          display: none;
+        }
+        img {
+          cursor: not-allowed;
+        }
+      }
       .ant-card-head-title {
         text-align: center;
       }
diff --git a/src/utils/option.js b/src/utils/option.js
index 58196a7..2c6f1d5 100644
--- a/src/utils/option.js
+++ b/src/utils/option.js
@@ -66,6 +66,13 @@
     isSubtable: true
   },
   {
+    title: '鑷畾涔�',
+    type: 'CustomPage',
+    url: customImg,
+    baseconfig: '',
+    isSystem: true
+  },
+  {
     title: '鏍戝舰椤甸潰',
     type: 'TreePage',
     url: treepage,
@@ -80,13 +87,6 @@
     isSystem: true
   },
   {
-    title: '鑷畾涔�',
-    type: 'CustomPage',
-    url: customImg,
-    baseconfig: '',
-    isSystem: true
-  },
-  {
     title: '澶栭儴椤甸潰',
     type: 'NewPage',
     url: customImg,
@@ -97,8 +97,7 @@
     title: '瑙掕壊鏉冮檺鍒嗛厤',
     type: 'RolePermission',
     url: rolemanage,
-    isSystem: true,
-    hidden: true
+    isSystem: true
   }
 ]
 

--
Gitblit v1.8.0