From 6ca240a14ccf55d4e0a94fff77e95f64db2cdfcc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 11 十月 2024 17:34:25 +0800
Subject: [PATCH] 2024-10-11

---
 src/templates/sharecomponent/chartgroupcomponent/index.jsx |   34 +++++++++++++++-------------------
 1 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/src/templates/sharecomponent/chartgroupcomponent/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/index.jsx
index 6b25913..2c18248 100644
--- a/src/templates/sharecomponent/chartgroupcomponent/index.jsx
+++ b/src/templates/sharecomponent/chartgroupcomponent/index.jsx
@@ -1,12 +1,11 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Icon, Modal } from 'antd'
+import { Modal } from 'antd'
+import { DownOutlined, UpOutlined } from '@ant-design/icons'
 
 import Utils from '@/utils/utils.js'
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
-import { getChartViewForm } from '@/templates/zshare/formconfig'
+import { getChartViewForm } from './formconfig'
 
 import ChartForm from './chartform'
 import DragChartView from './dragchartview'
@@ -17,12 +16,10 @@
 class ChartGroupComponent extends Component {
   static propTpyes = {
     config: PropTypes.object,         // 鑿滃崟閰嶇疆淇℃伅
-    sysRoles: PropTypes.array,        // 瑙掕壊鍒楄〃锛岄粦鍚嶅崟浣跨敤
     updatechartgroup: PropTypes.func  // 鍥捐〃鏇存柊
   }
 
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     chartlist: null,      // 鍥捐〃闆�
     card: null,           // 缂栬緫涓厓绱�
     formlist: null,       // 琛ㄥ崟淇℃伅
@@ -90,7 +87,7 @@
         icon: 'line-chart',
         Hide: 'false',
         blacklist: [],
-        correction: 7
+        barSize: 35
       }
     }
 
@@ -148,7 +145,7 @@
     this.setState({
       card: item,
       modaltype: _type,
-      formlist: getChartViewForm(item, this.props.sysRoles, _columns, actions, extraActions)
+      formlist: getChartViewForm(item, _columns, actions, extraActions)
     })
   }
 
@@ -206,14 +203,13 @@
    */
   deletechart = (plot) => {
     const { config } = this.props
-    const { dict } = this.state
-    let _this = this
+    let that = this
 
     confirm({
-      content: dict['model.confirm'] + dict['model.delete'] + ` ${plot.title} 锛焋,
+      content: `纭畾鍒犻櫎 ${plot.title} 锛焋,
       onOk() {
-        let _chartlist = fromJS(_this.state.chartlist).toJS()
-        let _chartview = _this.state.chartview
+        let _chartlist = fromJS(that.state.chartlist).toJS()
+        let _chartview = that.state.chartview
 
         _chartlist = _chartlist.filter(item => item.uuid !== plot.uuid)
 
@@ -221,11 +217,11 @@
           _chartview = _chartlist[0].uuid
         }
 
-        _this.setState({
+        that.setState({
           chartlist: _chartlist,
           chartview: _chartview
         })
-        _this.props.updatechartgroup({...config, charts: _chartlist}, _chartview)
+        that.props.updatechartgroup({...config, charts: _chartlist}, _chartview)
       },
       onCancel() {}
     })
@@ -254,14 +250,15 @@
     }
   }
 
+  // 宸插純鐢紝涓嶅湪寮�鏀炬坊鍔犻�氶亾
   render() {
     const { config } = this.props
-    const { dict, chartlist, modaltype, card, chartview } = this.state
+    const { chartlist, modaltype, card, chartview } = this.state
 
     return (
       <div className="model-table-chartview-list">
-        <Icon type="plus" onClick={() => this.handleChart()} />
-        {chartlist.length > 1 ? <Icon type={config.expand ? 'up' : 'down'} title="灞曞紑/鍚堝苟" onClick={this.onChartChange} /> : null}
+        {/* <PlusOutlined onClick={() => this.handleChart()} /> */}
+        {chartlist.length > 1 ? (config.expand ? <UpOutlined onClick={this.onChartChange} /> : <DownOutlined onClick={this.onChartChange} />) : null}
         {chartlist.length > 1 ? <DragChartView
           activeKey={chartview}
           list={chartlist}
@@ -282,7 +279,6 @@
           destroyOnClose
         >
           <ChartForm
-            dict={dict}
             card={card}
             formlist={this.state.formlist}
             inputSubmit={this.submitChart}

--
Gitblit v1.8.0