From 7b0dbecd1d6155d26ec67be0a47a16264c738c85 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 09 五月 2023 14:48:10 +0800
Subject: [PATCH] 2023-05-09

---
 src/templates/sharecomponent/actioncomponent/index.jsx |   63 ++++++++++---------------------
 1 files changed, 21 insertions(+), 42 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx
index d520cdf..b871c62 100644
--- a/src/templates/sharecomponent/actioncomponent/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/index.jsx
@@ -6,8 +6,6 @@
 
 import Api from '@/api'
 import Utils, { FuncUtils } from '@/utils/utils.js'
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
 import { getActionForm } from '@/templates/zshare/formconfig'
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 
@@ -37,7 +35,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     card: null,          // 缂栬緫涓厓绱�
     formlist: null,      // 琛ㄥ崟淇℃伅
     actionlist: null,    // 鎸夐挳缁�
@@ -59,15 +56,15 @@
 
   componentDidMount () {
     this.getBillPrintTemp()
-    MKEmitter.addListener('revert', this.revert)
+    // MKEmitter.addListener('revert', this.revert)
     MKEmitter.addListener('pasteButton', this.pasteButton)
   }
 
-  revert = () => {
-    this.setState({
-      actionlist: fromJS(this.props.config.action).toJS()
-    })
-  }
+  // revert = () => {
+  //   this.setState({
+  //     actionlist: fromJS(this.props.config.action).toJS()
+  //   })
+  // }
 
   pasteButton = (MenuId, btn) => {
     const { config } = this.props
@@ -426,7 +423,7 @@
             Align: 'center',
             IsSort: 'false',
             uuid: Utils.getuuid(),
-            label: this.state.dict['model.operation'],
+            label: '鎿嶄綔',
             type: 'action',
             style: 'button',
             show: 'horizontal',
@@ -626,11 +623,10 @@
    */
   deleteElement = (card) => {
     const { config } = this.props
-    const { dict } = this.state
     let _this = this
 
     confirm({
-      content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} 锛焋,
+      content: `纭畾鍒犻櫎 - ${card.label} 锛焋,
       onOk() {
         let _actionlist = fromJS(_this.state.actionlist).toJS()
 
@@ -647,7 +643,7 @@
             Align: 'center',
             IsSort: 'false',
             uuid: Utils.getuuid(),
-            label: this.state.dict['model.operation'],
+            label: '鎿嶄綔',
             type: 'action',
             style: 'button',
             show: 'horizontal',
@@ -678,8 +674,6 @@
       profVisible: true,
       card: element
     })
-
-    MKEmitter.emit('modalStatus', '楠岃瘉淇℃伅')
   }
 
   /**
@@ -707,8 +701,6 @@
       }, () => {
         this.props.updateaction({...config, action: _actionlist})
       })
-
-      MKEmitter.emit('modalStatus', false)
     })
   }
 
@@ -791,11 +783,7 @@
             resolve(false)
           }
         } else if (btn.OpenType === 'excelOut') {
-          let _param = {
-            innerFunc: btn.innerFunc
-          }
-
-          newLText = Utils.formatOptions(FuncUtils.getTableFunc(_param, menu, _config)) // 鍒涘缓瀛樺偍杩囩▼sql
+          newLText = Utils.formatOptions(FuncUtils.getTableFunc(btn.innerFunc, menu, _config)) // 鍒涘缓瀛樺偍杩囩▼sql
           DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
 
           resolve(true)
@@ -859,20 +847,18 @@
     this.setState = () => {
       return
     }
-    MKEmitter.removeListener('revert', this.revert)
+    // MKEmitter.removeListener('revert', this.revert)
     MKEmitter.removeListener('pasteButton', this.pasteButton)
   }
 
   getVerify = (card) => {
     const { config } = this.props
-    const { dict } = this.state
 
     if (!card) return null
 
     if (['pop', 'prompt', 'exec'].includes(card.OpenType)) {
       return <VerifyCard
         card={card}
-        dict={dict}
         config={config}
         columns={config.columns}
         wrappedComponentRef={(inst) => this.verifyRef = inst}
@@ -880,28 +866,25 @@
     } else if (card.OpenType === 'excelIn') {
       return <VerifyExcelIn
         card={card}
-        dict={dict}
         columns={config.columns}
         wrappedComponentRef={(inst) => this.verifyRef = inst}
       />
     } else if (card.OpenType === 'excelOut') {
       return <VerifyExcelOut
         card={card}
-        dict={dict}
         config={config}
         wrappedComponentRef={(inst) => this.verifyRef = inst}
       />
     } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') {
       return <VerifyPrint
         card={card}
-        dict={dict}
-        columns={config.columns}
+        columns={[]}
+        // columns={config.columns}
         wrappedComponentRef={(inst) => this.verifyRef = inst}
       />
     } else if (card.OpenType === 'funcbutton' && card.funcType === 'megvii') {
       return <VerifyMegvii
         card={card}
-        dict={dict}
         columns={config.columns}
         wrappedComponentRef={(inst) => this.verifyRef = inst}
       />
@@ -910,7 +893,7 @@
 
   render() {
     const { config } = this.props
-    const { actionlist, visible, card, dict, copying, profVisible, record } = this.state
+    const { actionlist, visible, card, copying, profVisible, record } = this.state
 
     return (
       <div className="model-table-action-list" style={config.charts && config.charts.length > 1 ? {paddingTop: 25} : null}>
@@ -925,22 +908,21 @@
         />
         {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */}
         <Modal
-          title={dict['model.action'] + '-' + (card && card.copyType === 'action' ? dict['model.copy'] : dict['model.edit'])}
+          title={'鎸夐挳-' + (card && card.copyType === 'action' ? '澶嶅埗' : '缂栬緫')}
           wrapClassName="model-table-action-edit-modal"
           visible={visible}
           width={920}
           maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
-            record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" dict={dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null,
-            record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
-            <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>,
-            <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>{dict['model.confirm']}</Button>
+            record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null,
+            record && record.intertype === 'inner' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
+            <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>,
+            <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>纭畾</Button>
           ]}
           destroyOnClose
         >
           <ActionForm
-            dict={dict}
             card={card}
             formlist={this.state.formlist}
             inputSubmit={this.handleSubmit}
@@ -951,22 +933,19 @@
         </Modal>
         {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */}
         <Modal
-          wrapClassName="model-table-action-verify-modal"
-          title={(card && card.label ? card.label + ' - ' : '') + '楠岃瘉淇℃伅'}
+          wrapClassName="mk-pop-modal"
           visible={profVisible}
           width={'90vw'}
           maskClosable={false}
-          okText={dict['model.submit']}
+          okText="鎻愪氦"
           onOk={this.verifySubmit}
           onCancel={() => {
             if (this.verifyRef.handleCancel) {
               this.verifyRef.handleCancel().then(() => {
                 this.setState({ profVisible: false })
-                MKEmitter.emit('modalStatus', false)
               })
             } else {
               this.setState({ profVisible: false })
-              MKEmitter.emit('modalStatus', false)
             }
           }}
           destroyOnClose

--
Gitblit v1.8.0