From a9b02f6862522b54d0824152017bf2acfec2af7b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 21 三月 2024 10:29:50 +0800
Subject: [PATCH] 2024-03-21

---
 src/menu/components/table/edit-table/columns/tableIn/index.jsx |   64 +++++++++++++++++++++-----------
 1 files changed, 42 insertions(+), 22 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 8d5c18e..ddfa334 100644
--- a/src/menu/components/table/edit-table/columns/tableIn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/tableIn/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
-import { Form, Tabs, Row, Col, Input, Button, Popconfirm, notification, Modal, message, Cascader, Tooltip, InputNumber, Radio, Typography } from 'antd'
+import { Form, Tabs, Row, Col, Input, Button, Popconfirm, notification, Modal, message, Select, Cascader, Tooltip, InputNumber, Radio, Typography } from 'antd'
 import { StopTwoTone, CheckCircleTwoTone, EditOutlined, SwapOutlined, DeleteOutlined, QuestionCircleOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
@@ -196,8 +196,10 @@
         supId = ''
       }
     }
+
+    let menu = window.GLOB.customMenu
     
-    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, uuid, supId)
+    let modules = MenuUtils.getSubModules(menu.components, uuid, supId, menu.interfaces || null)
 
     this.setState({
       fields: fromJS(columns).toJS().filter(item => item.field !== setting.primaryKey),
@@ -223,21 +225,21 @@
     
     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)
+    _scriptSql = Utils.formatOptions(_scriptSql, 'x')
 
     let _sParam = {
       func: 'sPC_Get_SelectedList',
       LText: _scriptSql,
       obj_name: 'data',
-      arr_field: 'funcname,longparam'
+      arr_field: 'funcname,longparam',
+      exec_type: 'x'
     }
     
     _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp)
-
+    _sParam.secretkey = Utils.encrypt('', _sParam.timestamp)
     _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉
     
-    Api.getSystemConfig(_sParam).then(res => {
+    Api.getCloudConfig(_sParam).then(res => {
       if (res.status) {
         let _scripts = res.data.map(item => {
           return {
@@ -498,6 +500,7 @@
   }
 
   render() {
+    const { config } = this.props
     const { verify, scriptsColumns, uniqueColumns, activeKey, fields, modules } = this.state
     const formItemLayout = {
       labelCol: {
@@ -535,8 +538,16 @@
                     <Input value={verify.innerFunc} placeholder="" autoComplete="off" onChange={(e) => this.onOptionChange(e.target.value, 'innerFunc')}/>
                   </Form.Item>
                 </Col> : null}
+                {verify.intertype === 'inner' ? <Col span={8}>
+                  <Form.Item required label="璁板綍鐢ㄦ埛">
+                    <Radio.Group value={verify.recordUser || 'false'} onChange={(e) => this.onOptionChange(e.target.value, 'recordUser')}>
+                      <Radio value="false">鍚�</Radio>
+                      <Radio value="true">鏄�</Radio>
+                    </Radio.Group>
+                  </Form.Item>
+                </Col> : null}
                 {verify.intertype === 'system' ? <Col span={8}>
-                  <Form.Item required label={'榛樿sql'}>
+                  <Form.Item required label="榛樿sql">
                     <Radio.Group value={verify.default} onChange={(e) => this.onOptionChange(e.target.value, 'default')}>
                       <Radio value="true">鎵ц</Radio>
                       <Radio value="false">涓嶆墽琛�</Radio>
@@ -544,25 +555,34 @@
                   </Form.Item>
                 </Col> : null}
                 <Col span={8}>
-                  <Form.Item label={'鎴愬姛鍚�'}>
-                    <Radio.Group style={{whiteSpace: 'nowrap'}} value={verify.execSuccess} onChange={(e) => this.onOptionChange(e.target.value, 'execSuccess')}>
-                      <Radio value="never">涓嶅埛鏂�</Radio>
-                      <Radio value="grid">鍒锋柊琛ㄦ牸</Radio>
-                      <Radio value="mainline">涓婄骇锛堣锛�</Radio>
-                    </Radio.Group>
+                  <Form.Item label={
+                    <Tooltip placement="topLeft" title="銆婂埛鏂拌銆嬩笌銆婂埛鏂拌 / 缁勪欢銆嬪彧鍦ㄦ暟鎹彁浜や负 淇敼椤� 鏃舵湁鏁堛��">
+                      <QuestionCircleOutlined className="mk-form-tip" />
+                      鎴愬姛鍚�
+                    </Tooltip>
+                  }>
+                    <Select value={verify.execSuccess} onChange={(val) => this.onOptionChange(val, 'execSuccess')}>
+                      <Select.Option value="never">涓嶅埛鏂�</Select.Option>
+                      <Select.Option value="line" disabled={config.wrap.commit !== 'change'}>鍒锋柊琛�</Select.Option>
+                      <Select.Option value="grid">鍒锋柊缁勪欢</Select.Option>
+                      <Select.Option value="line_grid" disabled={config.wrap.commit !== 'change'}>鍒锋柊琛� / 缁勪欢</Select.Option>
+                      <Select.Option value="mainline">涓婄骇锛堣锛�</Select.Option>
+                    </Select>
                   </Form.Item>
                 </Col>
                 <Col span={8}>
-                  <Form.Item label={'澶辫触鍚�'}>
-                    <Radio.Group style={{whiteSpace: 'nowrap'}} value={verify.execError} onChange={(e) => this.onOptionChange(e.target.value, 'execError')}>
-                      <Radio value="never">涓嶅埛鏂�</Radio>
-                      <Radio value="grid">鍒锋柊琛ㄦ牸</Radio>
-                      <Radio value="mainline">涓婄骇锛堣锛�</Radio>
-                    </Radio.Group>
+                  <Form.Item label="澶辫触鍚�">
+                    <Select value={verify.execError} onChange={(val) => this.onOptionChange(val, 'execError')}>
+                      <Select.Option value="never">涓嶅埛鏂�</Select.Option>
+                      <Select.Option value="line" disabled={config.wrap.commit !== 'change'}>鍒锋柊琛�</Select.Option>
+                      <Select.Option value="grid">鍒锋柊缁勪欢</Select.Option>
+                      <Select.Option value="line_grid" disabled={config.wrap.commit !== 'change'}>鍒锋柊琛� / 缁勪欢</Select.Option>
+                      <Select.Option value="mainline">涓婄骇锛堣锛�</Select.Option>
+                    </Select>
                   </Form.Item>
                 </Col>
                 {isPop ? <Col span={8}>
-                  <Form.Item label={'鎴愬姛鍚�'}>
+                  <Form.Item label="鎴愬姛鍚�">
                     <Radio.Group style={{whiteSpace: 'nowrap'}} value={verify.closetab || 'false'} onChange={(e) => this.onOptionChange(e.target.value, 'closetab')}>
                       <Radio value="false">鏍囩涓嶅叧闂�</Radio>
                       <Radio value="true">鏍囩鍏抽棴</Radio>
@@ -598,7 +618,7 @@
             </span>
           } key="scripts">
             <FullScripts
-              verify={verify}
+              scripts={verify.scripts}
               getScriptsFullForm={() => this.scriptsFullForm}
               getScriptsForm={() => this.scriptsForm}
               handleStatus={this.handleStatus}

--
Gitblit v1.8.0