From b78198e00a34eaa2b0a761bb6f42bf14e7771883 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 六月 2024 16:53:44 +0800
Subject: [PATCH] 2024-06-21

---
 src/menu/components/table/edit-table/columns/editColumn/index.jsx |   32 +++++++++++++++++++++-----------
 1 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index dd97ea0..2515403 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Row, Col, Input, Select, InputNumber, Radio, Tooltip, Modal, notification, Popover } from 'antd'
+import { Form, Row, Col, Input, Select, InputNumber, Radio, Checkbox, Tooltip, Modal, notification, Popover } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 
 import Api from '@/api'
@@ -107,8 +107,13 @@
         _options.push('hourFormat')
       }
     }
-    if (this.record.type === 'formula' && this.record.eval === 'true') {
-      _options.push('decimal')
+    if (this.record.type === 'formula') {
+      if (this.record.eval === 'true') {
+        _options.push('decimal')
+      }
+      if (this.record.eval !== 'func') {
+        _options.push('evalchars')
+      }
     } else if (this.record.type === 'custom' && this.record.IsSort === 'true') {
       _options.push('sortField')
     }
@@ -402,6 +407,15 @@
         content = <Radio.Group onChange={(e) => {this.typeChange(item.key, e.target.value)}}>
           {item.options.map(option => <Radio key={option.value} value={option.value}>{option.text}</Radio>)}
         </Radio.Group>
+      } else if (item.type === 'checkbox') {
+        rules = [
+          { required: item.required, message: '璇烽�夋嫨' + item.label + '!' }
+        ]
+        initVal = item.initVal
+
+        content = <Checkbox.Group onChange={(e) => {this.typeChange(item.key, e.target.value)}}>
+          {item.options.map(option => <Checkbox key={option.value} value={option.value}>{option.text}</Checkbox>)}
+        </Checkbox.Group>
       } else if (item.type === 'multiselect') { // 澶氶��
         content = <Select
           showSearch
@@ -447,6 +461,7 @@
           extra = <span className="add-resource-empty" onClick={this.handleEmpty}>绌�</span>
         }
         if (item.placeholder) {
+          className = 'show-public-var'
           extra = <><span className="resource-public-var">{item.placeholder}</span>{extra}</>
         }
 
@@ -580,7 +595,7 @@
           if (!pass) return
         }
 
-        if (values.editType === 'select' && values.resourceType === '1' && values.dataSource) {
+        if (values.editType === 'select' && values.resourceType === '1' && values.database !== 'sso' && values.dataSource) {
           let _option = Utils.getSelectQueryOptions(values)
 
           let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
@@ -588,13 +603,8 @@
   
           // LoginUID|SessionUid|UserID|Appkey 宸叉浛鎹�
           sql = sql.replace(/@\$|\$@/ig, '')
-  
-          let rduri = ''
-          if (window.GLOB.mainSystemApi && values.database === 'sso') {
-            rduri = window.GLOB.mainSystemApi
-          }
           
-          Api.sDebug(sql, rduri).then(result => {
+          Api.sDebug(sql).then(result => {
             if (result.status || result.ErrCode === '-2') {
               this.setState({visible: false, loading: false, formlist: null})
               this.props.submitCol(values)
@@ -692,7 +702,7 @@
           title="鏄剧ず鍒楃紪杈�"
           wrapClassName="mk-scroll-modal"
           visible={visible}
-          width={900}
+          width={950}
           maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}

--
Gitblit v1.8.0