From fe21d23b147ed5cec22b4f76a88840b05495d4ad Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 18 六月 2022 22:33:59 +0800
Subject: [PATCH] 2022-06-18

---
 src/templates/zshare/verifycard/customscript/index.jsx |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx
index 1909699..257064a 100644
--- a/src/templates/zshare/verifycard/customscript/index.jsx
+++ b/src/templates/zshare/verifycard/customscript/index.jsx
@@ -45,9 +45,18 @@
   }
 
   handleConfirm = () => {
+    const { type } = this.props
     const { editItem } = this.state
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
+      if (type === 'fullscreen' && err) {
+        notification.warning({
+          top: 92,
+          message: '璇疯緭鍏ql!',
+          duration: 5
+        })
+        return
+      }
       if (!err) {
         values.uuid = editItem ? editItem.uuid : ''
         values.position = values.position || (editItem ? editItem.position : 'front')
@@ -231,6 +240,7 @@
   render() {
     const { usefulfields, systemScripts, btn, type } = this.props
     const { getFieldDecorator } = this.props.form
+    const { editItem } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -247,9 +257,9 @@
     return (
       <Form {...formItemLayout} className="verify-form verify-custom-scripts" id={'verify-custom-scripts' + _type}>
         <Row gutter={24}>
-          {!_type && btn.sql ? <Col span={8}>
+          {!_type ? <Col span={8}>
             <Form.Item label={'琛ㄥ悕'} style={{whiteSpace: 'nowrap', margin: 0}}>
-              {btn.sql}
+              {btn.sql || ''}
             </Form.Item>
           </Col> : null}
           {!_type ? <Col span={10}>
@@ -300,7 +310,7 @@
           </Col> : null}
           <Col span={6} className="add">
             <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
-              淇濆瓨
+              {_type === 'fullscreen' && !editItem ? '娣诲姞' : '淇濆瓨'}
             </Button>
             <Button onClick={this.handleCancel} style={{marginBottom: 15, marginLeft: 10}}>
               鍙栨秷

--
Gitblit v1.8.0