From 0a775d67b17400de3bbac4767d5ea25e6f0d14f9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 06 二月 2023 15:15:00 +0800
Subject: [PATCH] 2023-02-06

---
 src/menu/components/form/simple-form/index.jsx |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx
index f53de00..5848926 100644
--- a/src/menu/components/form/simple-form/index.jsx
+++ b/src/menu/components/form/simple-form/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Popover, Modal, Button, Switch, notification } from 'antd'
+import { Popover, Modal, Button, Switch, notification, message } from 'antd'
 import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
@@ -194,7 +194,7 @@
   changeStyle = () => {
     const { card } = this.state
 
-    MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle)
+    MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle)
   }
 
   getStyle = (style) => {
@@ -348,10 +348,7 @@
         index = i
       }
 
-      let label = item.label || ''
-      if (item.field && item.field.toLowerCase() !== label.toLowerCase()) {
-        label = label + ' (' + item.field + ')'
-      }
+      let label = `${item.field || ''}锛�${item.label}锛塦
 
       if (['text', 'number', 'textarea', 'color'].includes(item.type) && _item.field !== item.field) {
         _inputfields.push({
@@ -476,11 +473,13 @@
         let param = {
           func: 's_debug_sql',
           exec_type: 'y',
-          LText: res.dataSource
+          LText: `declare @mk_organization nvarchar(512)
+            ${res.dataSource}`
         }
 
         param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
+        param.LText = param.LText.replace(/\n/g, ' ')
         
         param.LText = Utils.formatOptions(param.LText)
         param.secretkey = Utils.encrypt('', param.timestamp)
@@ -583,7 +582,8 @@
   }
 
   updateWrap = (res) => {
-    let _card = {...this.state.card, wrap: res}
+    let _card = fromJS(this.state.card).toJS()
+    _card.wrap = res
 
     if (res.datatype === 'static') {
       if (res.supModule && res.supModule.length > 0) {
@@ -598,6 +598,12 @@
     _card.subcards[0].setting.align = _card.wrap.align
     _card.subcards[0].setting.enable = _card.wrap.enable
     _card.subcards[0].setting.verticalSpace = _card.wrap.verticalSpace
+
+    if (_card.wrap.closeEnable === 'true' && !_card.subcards[0].closeButton) {
+      _card.subcards[0].closeButton = {label: '鍏抽棴', enable: 'true', type: 'close', style: {backgroundColor: '#ffffff', color: 'rgba(0,0,0,0.65)', borderColor: '#d9d9d9', borderWidth: '1px', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px', marginLeft: '10px'}}
+    } else if (_card.subcards[0].closeButton) {
+      _card.subcards[0].closeButton.enable = _card.wrap.closeEnable
+    }
 
     this.updateComponent(_card)
   }
@@ -681,7 +687,15 @@
         </div>
         <div className="component-name">
           <div className="center">
-            <div className="title">{card.name}</div>
+            <div className="title" onDoubleClick={() => {
+              let oInput = document.createElement('input')
+              oInput.value = card.uuid
+              document.body.appendChild(oInput)
+              oInput.select()
+              document.execCommand('Copy')
+              document.body.removeChild(oInput)
+              message.success('澶嶅埗鎴愬姛銆�')
+            }}>{card.name}</div>
             <div className="content">
               {card.errors && card.errors.map((err, index) => {
                 if (err.level === 0) {

--
Gitblit v1.8.0