From e543372cc70a19ff2630c79d8421c2c593e54e5f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 六月 2021 17:15:21 +0800
Subject: [PATCH] 2021-06-02

---
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx |   74 +++++++++++++++++++++++++++----------
 1 files changed, 54 insertions(+), 20 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index c2d4c20..6a0f7b9 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -33,14 +33,14 @@
         inputType: 'input',
         editable: true,
         unique: true,
-        width: '25%'
+        width: '20%'
       },
       {
         title: this.props.dict['model.name'],
         dataIndex: 'Text',
         inputType: 'input',
         editable: true,
-        width: '25%'
+        width: '20%'
       },
       {
         title: this.props.dict['model.form.columnWidth'],
@@ -49,7 +49,45 @@
         min: 5,
         max: 200,
         editable: true,
-        width: '25%'
+        width: '20%'
+      },
+      {
+        title: '绫诲瀷',
+        dataIndex: 'type',
+        inputType: 'select',
+        editable: true,
+        required: false,
+        width: '20%',
+        render: (text) => {
+          if (text === 'image') {
+            return '鍥剧墖'
+          } else {
+            return '鏂囨湰'
+          }
+        },
+        options: [
+          {value: 'text', text: '鏂囨湰'},
+          {value: 'image', text: '鍥剧墖'}
+        ]
+      },
+      {
+        title: '鍙栫粷瀵瑰��',
+        dataIndex: 'abs',
+        inputType: 'select',
+        editable: true,
+        required: false,
+        width: '20%',
+        render: (text) => {
+          if (text === 'true') {
+            return '鏄�'
+          } else {
+            return '鍚�'
+          }
+        },
+        options: [
+          {value: 'true', text: '鏄�'},
+          {value: 'false', text: '鍚�'}
+        ]
       }
     ]
   }
@@ -65,23 +103,14 @@
     _verify.enable = _verify.enable || 'false'
     _verify.columns = _verify.columns || []
 
-    // 鍚屾鏄剧ず鍒�
-    // if (!_verify.columns || _verify.columns.length === 0) {
-    //   _verify.columns = []
-    //   config.columns.forEach(item => {
-    //     if (!item.field) return
-  
-    //     _verify.columns.push({
-    //       Column: item.field,
-    //       Text: item.label,
-    //       Width: 20,
-    //       uuid: Utils.getuuid()
-    //     })
-    //   })
-    // }
-
     if (card.intertype !== 'system') {
       _verify.enable = 'false'
+    }
+    if (_verify.columns[0] && !_verify.columns[0].type) {
+      _verify.columns = _verify.columns.map(col => {
+        col.type = col.type || 'text'
+        return col
+      })
     }
 
     let defaultscript = ''
@@ -159,6 +188,7 @@
       return
     }
     values.uuid = Utils.getuuid()
+    values.abs = 'false'
     verify.columns.push(values)
 
     this.setState({
@@ -308,6 +338,7 @@
     
             let param = {
               func: 's_debug_sql',
+              exec_type: 'y',
               LText: values.sql
             }
     
@@ -315,7 +346,7 @@
     
             param.LText = Utils.formatOptions(param.LText)
             param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-            param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+            param.secretkey = Utils.encrypt('', param.timestamp)
             
             Api.getLocalConfig(param).then(res => {
               if (res.status) {
@@ -363,6 +394,8 @@
         Column: item.field,
         Text: item.label,
         Width: 20,
+        abs: 'false',
+        type: 'text',
         uuid: Utils.getuuid()
       })
     })
@@ -421,7 +454,8 @@
             <Button className="excel-col-add mk-red" title="娓呯┖Excel鍒�" onClick={this.clearField}>
               娓呯┖Excel鍒�
             </Button>
-            <EditTable data={verify.columns} columns={excelColumns} onChange={(columns) => this.setState({verify: {...verify, columns}})}/>
+            <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>濡傞渶瀵煎嚭搴忓彿锛岃浣跨敤瀛楁 $Index銆�</div>
+            <EditTable actions={['edit', 'move', 'copy', 'del']} type="exceloutcolumn" data={verify.columns} columns={excelColumns} onChange={(columns) => this.setState({verify: {...verify, columns}})}/>
           </TabPane>
           {card.intertype === 'system' ? <TabPane tab={
             <span>

--
Gitblit v1.8.0