From 58826d6f4eab9f8c9acf9fa8696f60039c645cfe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 20 八月 2024 18:18:00 +0800
Subject: [PATCH] 2024-08-20

---
 src/templates/sharecomponent/treesettingcomponent/index.jsx |   39 +++++++++++++++------------------------
 1 files changed, 15 insertions(+), 24 deletions(-)

diff --git a/src/templates/sharecomponent/treesettingcomponent/index.jsx b/src/templates/sharecomponent/treesettingcomponent/index.jsx
index 141d90e..51faa23 100644
--- a/src/templates/sharecomponent/treesettingcomponent/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/index.jsx
@@ -3,10 +3,7 @@
 import { Modal } from 'antd'
 import { SettingOutlined } from '@ant-design/icons'
 
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
 import SettingForm from './settingform'
-import MKEmitter from '@/utils/events.js'
 
 import './index.scss'
 
@@ -18,7 +15,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     menu: null,          // 鑿滃崟淇℃伅
     visible: false,      // 妯℃�佹鎺у埗
     loading: false       // 璁剧疆淇℃伅楠岃瘉淇濆瓨涓�
@@ -35,7 +31,6 @@
       visible: true,
       menu: menu
     })
-    MKEmitter.emit('modalStatus', '鏁版嵁婧�')
   }
 
   /**
@@ -48,17 +43,17 @@
       loading: true
     })
     this.settingRef.handleConfirm().then(res => {
-      if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
-        window.GLOB.funcs.forEach(m => {
-          let reg = new RegExp('\\$ex@' + m.func_code + '@ex\\$', 'ig')
-          res.scripts.forEach(item => {
-            item.sql = item.sql.replace(reg, `/*$ex@${m.func_code}-begin*/\n${m.key_sql}\n/*@ex$-end*/`)
-          })
-          if (res.dataresource) {
-            res.dataresource = res.dataresource.replace(reg, `/*$ex@${m.func_code}-begin*/\n${m.key_sql}\n/*@ex$-end*/`)
-          }
-        })
-      }
+      // if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
+      //   window.GLOB.funcs.forEach(m => {
+      //     let reg = new RegExp('\\$ex@' + m.func_code + '@ex\\$', 'ig')
+      //     res.scripts.forEach(item => {
+      //       item.sql = item.sql.replace(reg, `/*$ex@${m.func_code}-begin*/\n${m.key_sql}\n/*@ex$-end*/`)
+      //     })
+      //     if (res.dataresource) {
+      //       res.dataresource = res.dataresource.replace(reg, `/*$ex@${m.func_code}-begin*/\n${m.key_sql}\n/*@ex$-end*/`)
+      //     }
+      //   })
+      // }
       this.setState({
         visible: false,
         loading: false
@@ -72,8 +67,6 @@
       res.searchLwidth = config.setting.searchLwidth !== undefined ? config.setting.searchLwidth : 33.3
 
       this.props.updatesetting({...config, setting: res})
-
-      MKEmitter.emit('modalStatus', false)
     }, () => {
       this.setState({
         loading: false
@@ -92,25 +85,23 @@
 
   render() {
     const { config } = this.props
-    const { dict, visible, loading } = this.state
+    const { visible, loading } = this.state
 
     return (
       <div className="model-tree-menu-setting">
         <SettingOutlined onClick={this.changeSetting} />
         {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */}
         <Modal
-          wrapClassName="model-tree-setting-verify-modal"
-          title="鏁版嵁婧愰厤缃�"
+          wrapClassName="mk-pop-modal"
           visible={visible}
-          width={900}
+          width={'75vw'}
           maskClosable={false}
-          onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false })}}
+          onCancel={() => { this.setState({ visible: false })}}
           confirmLoading={loading}
           onOk={this.settingSave}
           destroyOnClose
         >
           <SettingForm
-            dict={dict}
             config={config}
             menu={this.state.menu}
             inputSubmit={this.settingSave}

--
Gitblit v1.8.0