From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 17 十月 2022 17:57:34 +0800
Subject: [PATCH] 2022-10-17

---
 src/menu/components/table/edit-table/columns/tableIn/index.jsx |   53 +++++++++++++++++++++++++++++++++--------------------
 1 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/tableIn/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/index.jsx
index 633ae38..144df97 100644
--- a/src/menu/components/table/edit-table/columns/tableIn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/tableIn/index.jsx
@@ -21,7 +21,6 @@
 class VerifyTableCard extends Component {
   static propTpyes = {
     columns: PropTypes.array,  // 鏄剧ず鍒�
-    dict: PropTypes.object,    // 瀛楀吀椤�
     card: PropTypes.object,
   }
 
@@ -80,13 +79,13 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopTwoTone style={{marginLeft: '5px'}} twoToneColor="#ff4d4f" />
             </div>
           ) :
           (
             <div>
-              {this.props.dict['model.status.open']}
+              鍚敤
               <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" />
             </div>
           )
@@ -100,12 +99,12 @@
         render: (text) => {
           let title = text.match(/^\s*\/\*.+\*\//)
           title = title && title[0] ? title[0] : ''
-          text = title ? text.replace(title, '') : text
+          let _text = title ? text.replace(title, '') : text
 
           return (
             <div>
-              {title ? <span style={{color: '#a50'}}>{title}</span> : null}
-              <Paragraph copyable ellipsis={{ rows: 4, expandable: true }}>{text}</Paragraph>
+              {title ? <span style={{color: '#a50'}}>{title}<span style={{fontSize: '12px', marginLeft: '5px'}}>{_text.length}</span></span> : null}
+              <Paragraph copyable={{ text: text }} ellipsis={{ rows: 4, expandable: true }}>{_text}</Paragraph>
             </div>
           )
         }
@@ -133,13 +132,13 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopTwoTone style={{marginLeft: '5px'}} twoToneColor="#ff4d4f" />
             </div>
           ) :
           (
             <div>
-              {this.props.dict['model.status.open']}
+              鍚敤
               <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" />
             </div>
           )
@@ -154,10 +153,10 @@
             <span className="operation-btn" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span>
             <span className="operation-btn" onClick={() => this.handleUpDown(record, 'scripts', 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span>
             <span className="operation-btn" onClick={() => this.handleUpDown(record, 'scripts', 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span>
-            <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span>
+            <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span>
             <Popconfirm
               overlayClassName="popover-confirm"
-              title={this.props.dict['model.query.delete']}
+              title="纭畾鍒犻櫎鍚�?"
               onConfirm={() => this.handleDelete(record, 'scripts')
             }>
               <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span>
@@ -196,6 +195,17 @@
   }
 
   componentDidMount () {
+    this.getsysScript()
+  }
+
+  getsysScript = () => {
+    if (sessionStorage.getItem('mk_sys_scripts')) {
+      this.setState({
+        systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts'))
+      })
+      return
+    }
+    
     let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from聽 s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort`
 
     _scriptSql = Utils.formatOptions(_scriptSql)
@@ -214,13 +224,17 @@
     
     Api.getSystemConfig(_sParam).then(res => {
       if (res.status) {
+        let _scripts = res.data.map(item => {
+          return {
+            name: item.funcname,
+            value: window.decodeURIComponent(window.atob(item.longparam))
+          }
+        })
+
+        sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts))
+
         this.setState({
-          systemScripts: res.data.map(item => {
-            return {
-              name: item.funcname,
-              value: window.decodeURIComponent(window.atob(item.longparam))
-            }
-          })
+          systemScripts: _scripts
         })
       } else {
         notification.warning({
@@ -527,12 +541,12 @@
 
     return (
       <div id="verify-excel-box-tab">
-        <Tabs activeKey={activeKey} className="verify-card-box" onChange={this.tabchange}>
+        <Tabs activeKey={activeKey} className="tablein-verify-card-box" onChange={this.tabchange}>
           <TabPane tab="鍩虹楠岃瘉" key="basemsg">
             <Form {...formItemLayout}>
               <Row gutter={24}>
                 <Col span={8}>
-                  <Form.Item required label={this.props.dict['model.form.tablename']}>
+                  <Form.Item required label="琛ㄥ悕">
                     <Input value={verify.sheet} placeholder="" autoComplete="off" onChange={(e) => this.onOptionChange(e.target.value, 'sheet')}/>
                   </Form.Item>
                 </Col>
@@ -592,7 +606,7 @@
               {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null}
             </span>
           } key="unique">
-            <UniqueForm fields={fields} dict={this.props.dict} uniqueChange={this.uniqueChange}/>
+            <UniqueForm fields={fields} uniqueChange={this.uniqueChange}/>
             <EditTable actions={['edit', 'move', 'del']} data={verify.uniques} columns={uniqueColumns} onChange={this.changeUniques}/>
           </TabPane>
           <TabPane disabled={verify.intertype !== 'system'} tab={
@@ -602,7 +616,6 @@
             </span>
           } key="scripts">
             <CustomScript
-              dict={this.props.dict}
               btn={verify}
               usefulfields={fields}
               scripts={verify.scripts}

--
Gitblit v1.8.0