From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:42:43 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/templates/zshare/customscript/index.jsx |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx
index 186bfc1..f68cca2 100644
--- a/src/templates/zshare/customscript/index.jsx
+++ b/src/templates/zshare/customscript/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
-import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography } from 'antd'
+import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Tooltip } from 'antd'
 import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
@@ -9,6 +9,7 @@
 import Api from '@/api'
 import CodeMirror from '@/templates/zshare/codemirror'
 import asyncComponent from '@/utils/asyncComponent'
+import MKEmitter from '@/utils/events.js'
 import './index.scss'
 
 const { Paragraph } = Typography
@@ -30,6 +31,7 @@
     editItem: null,
     loading: false,
     usefulFields: '',
+    urlFields: '',
     systemScripts: [],
     scriptsColumns: [
       {
@@ -43,7 +45,7 @@
 
           return (
             <div>
-              {title ? <span style={{color: '#a50'}}>{title}</span> : null}
+              {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>
           )
@@ -56,7 +58,7 @@
         render: (text, record) => record.status === 'false' ?
           (
             <div style={{color: '#ff4d4f'}}>
-              {this.props.dict['model.status.forbidden']}
+              绂佺敤
               <StopOutlined style={{marginLeft: '5px'}} />
             </div>
           ) :
@@ -104,15 +106,12 @@
       } else if (_usefulFields.includes(item.field)) {
         _usefulFields.push(item.field + '1')
       } else {
-        _usefulFields.push(item.field)
+        _usefulFields.push(item.field.replace(/,/ig, ', '))
       }
     })
 
-    if (urlFields) {
-      _usefulFields.push(...urlFields)
-    }
-
     this.setState({
+      urlFields: urlFields ? urlFields.join(', ') : '',
       usefulFields: _usefulFields.join(', '),
       scripts: fromJS(scripts).toJS()
     })
@@ -260,6 +259,8 @@
         editItem: null
       })
 
+      MKEmitter.emit('editLineId', values.uuid)
+
       this.props.scriptsUpdate(_scripts)
       this.props.form.setFieldsValue({
         sql: ''
@@ -350,7 +351,7 @@
   render() {
     const { setting, defaultSql, scripts } = this.props
     const { getFieldDecorator } = this.props.form
-    const { usefulFields, scriptsColumns, systemScripts } = this.state
+    const { usefulFields, scriptsColumns, systemScripts, urlFields } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -378,7 +379,10 @@
             </Col>
             <Col span={24} className="sqlfield">
               <Form.Item label={'鍙敤瀛楁'}>
-                id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''}
+                <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
+                <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
+                <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鎺掑簭銆佸垎椤典互鍙婃悳绱㈡潯浠跺彉閲忥紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}>orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''}</Tooltip>
+                {urlFields ?<Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url鍙橀噺锛岃鎸夌収@xxx@鏍煎紡浣跨敤銆�'}>, <span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> : ''}
               </Form.Item>
             </Col>
             <Col span={10} className="quick-add">
@@ -390,6 +394,9 @@
                   onChange={this.selectScript}
                 >
                   <Select.Option key="default" value={defaultSql}>榛樿sql</Select.Option>
+                  <Select.Option key="debugger" value={`z_debug: select @ErrorCode='E',@retmsg='娴嬭瘯鏂偣' goto aaa`}>
+                    娴嬭瘯鏂偣
+                  </Select.Option>
                   {systemScripts.map((option, i) =>
                     <Select.Option style={{whiteSpace: 'normal'}} key={i} value={option.value}>{option.name}</Select.Option>
                   )}

--
Gitblit v1.8.0