From 4b013affeb7afe534bf70204c743c5764db45484 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 03 八月 2023 09:39:54 +0800
Subject: [PATCH] 2023-08-03

---
 src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx |   58 +++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 39 insertions(+), 19 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx
index d279a75..911bb00 100644
--- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx
@@ -1,10 +1,10 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Row, Col, Input, Select, Radio, InputNumber } from 'antd'
+import { Form, Row, Col, Input, Select, Radio, InputNumber, Modal } from 'antd'
+import { FormOutlined } from '@ant-design/icons'
 
 import ColorSketch from '@/mob/colorsketch'
-
 import './index.scss'
 
 const { TextArea } = Input
@@ -16,11 +16,13 @@
   }
 
   state = {
-    formlist: null
+    formlist: null,
+    mknode: null
   }
 
   UNSAFE_componentWillMount () {
     this.setState({
+      mknode: null,
       formlist: this.getFormList(this.props.node)
     })
   }
@@ -28,6 +30,7 @@
   UNSAFE_componentWillReceiveProps(nextProps) {
     if (!is(fromJS(this.props.node), fromJS(nextProps.node))) {
       this.setState({
+        mknode: null,
         formlist: null
       }, () => {
         this.setState({
@@ -127,6 +130,11 @@
           field: 'fontFill',
           label: '棰滆壊',
           initval: font.fill || '#000000'
+        },
+        {
+          type: 'other',
+          label: '鑷畾涔変俊鎭�',
+          initval: node
         }
       ]
     } else if (node.shape === 'lane') {
@@ -350,22 +358,10 @@
           initval: fontFill
         },
         {
-          type: 'title',
-          label: '鑷畾涔変俊鎭�'
-        },
-        {
-          type: 'text',
-          field: 'mksign',
-          label: '鏍囪',
-          initval: node.mksign || ''
-        },
-        {
-          type: 'select',
-          field: 'mkroleid',
-          label: '瑙掕壊',
-          initval: node.mkroleid || '',
-          options: this.props.rolelist.map(item => ({value: item.RoleID, text: item.RoleName}))
-        },
+          type: 'other',
+          label: '鑷畾涔変俊鎭�',
+          initval: node
+        }
       ]
     }
   }
@@ -384,6 +380,10 @@
     }
 
     this.props.onChange(value, key)
+  }
+
+  confirm = () => {
+    this.setState({visible: false})
   }
 
   getFields() {
@@ -462,17 +462,37 @@
             </Form.Item>
           </Col>
         )
+      } else if (item.type === 'other') {
+        fields.push(
+          <Col span={24} key={index}>
+            <span className="split-line">{item.label}锛�<FormOutlined onClick={() => {this.setState({visible: true})}}/></span>
+          </Col>
+        )
       }
     })
     return fields
   }
 
   render() {
+    const { visible } = this.state
+
     return (
       <div className="node-edit-form-wrap">
         <Form className="node-edit-form">
           <Row>{this.getFields()}</Row>
         </Form>
+        <Modal
+          title="鑺傜偣缂栬緫"
+          visible={visible}
+          closable={false}
+          maskClosable={false}
+          width={700}
+          onOk={this.confirm}
+          onCancel={() => this.setState({visible: false})}
+          destroyOnClose
+        >
+
+        </Modal>
       </div>
     )
   }

--
Gitblit v1.8.0