From a8507cc8c42d17d4fb854594dbf1e084d61912ac Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 18 十月 2022 12:44:22 +0800
Subject: [PATCH] 2022-10-18

---
 src/pc/createview/index.jsx |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/pc/createview/index.jsx b/src/pc/createview/index.jsx
index 63e233f..44c6198 100644
--- a/src/pc/createview/index.jsx
+++ b/src/pc/createview/index.jsx
@@ -4,8 +4,6 @@
 import { Button, Modal, notification } from 'antd'
 import moment from 'moment'
 
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
 import Utils from '@/utils/utils.js'
 import MenuUtils from '@/utils/utils-custom.js'
 import SettingForm from './settingform'
@@ -18,7 +16,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     visible: false,
     loading: false
   }
@@ -161,7 +158,15 @@
           }
 
           if (_config.components) {
-            config.components = MenuUtils.resetConfig(_config.components, {}, res.clearMenu === 'true')
+            let uuids = {} // 閲嶇疆鍏叡鏁版嵁婧�
+            if (_config.interfaces && _config.interfaces.length > 0) {
+              config.interfaces = _config.interfaces.map(inter => {
+                uuids[inter.uuid] = this.getuuid()
+                inter.uuid = uuids[inter.uuid]
+                return inter
+              })
+            }
+            config.components = MenuUtils.resetConfig(_config.components, uuids, res.clearMenu === 'true')
             config.tables = _config.tables || []
             config.style = _config.style || {}
             config.statusBarbgColor = _config.statusBarbgColor || ''
@@ -198,7 +203,7 @@
 
   render () {
     const { config } = this.props
-    const { visible, dict, loading } = this.state
+    const { visible, loading } = this.state
 
     return (
       <div className="create-view">
@@ -208,14 +213,13 @@
           visible={visible}
           width={600}
           maskClosable={false}
-          okText={dict['model.submit']}
+          okText="鎻愪氦"
           onOk={this.verifySubmit}
           onCancel={() => { this.setState({ visible: false }) }}
           confirmLoading={loading}
           destroyOnClose
         >
           <SettingForm
-            dict={dict}
             config={config}
             wrappedComponentRef={(inst) => this.verifyRef = inst}
           />

--
Gitblit v1.8.0