From 465be8b618c1fb139d56ed779ff6f4dbc8d89b89 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 04 八月 2023 15:47:14 +0800
Subject: [PATCH] 2023-08-04

---
 src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx |   53 ++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 34 insertions(+), 19 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx
index 83ef825..44e92d5 100644
--- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx
+++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx
@@ -12,9 +12,7 @@
     rolelist: PropTypes.array
   }
 
-  state = {
-    ctrlType: this.props.data.ctrlType || 'role'
-  }
+  state = {}
 
   handleConfirm = () => {
     const { rolelist } = this.props
@@ -49,7 +47,6 @@
   render() {
     const { node, rolelist } = this.props
     const { getFieldDecorator } = this.props.form
-    const { ctrlType } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -61,6 +58,12 @@
       }
     }
     let data = this.props.data || {}
+    let nodetype = node.shape !== 'edge' ? 'node' : 'edge'
+    if (node.mknode === 'start') {
+      nodetype = 'start'
+    } else if (node.mknode === 'end') {
+      nodetype = 'end'
+    }
 
     return (
       <Form {...formItemLayout} className="normal-node-form">
@@ -68,7 +71,7 @@
           <Col span={12}>
             <Form.Item label="鐘舵�佸��">
               {getFieldDecorator('status', {
-                initialValue: data.status || 0,
+                initialValue: data.status === undefined ? 0 : data.status,
                 rules: [
                   {
                     required: true,
@@ -89,7 +92,7 @@
               )}
             </Form.Item>
           </Col>
-          {node.shape !== 'edge' ? <Col span={12}>
+          {nodetype === 'node' ? <Col span={12}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="鏍囪灏嗕綔涓鸿妭鐐笽D">
                 <QuestionCircleOutlined className="mk-form-tip" />
@@ -103,20 +106,32 @@
               )}
             </Form.Item>
           </Col> : null}
-          <Col span={12}>
-            <Form.Item label="绫诲瀷">
-              {getFieldDecorator('ctrlType', {
-                initialValue: data.ctrlType || 'role'
+          {nodetype === 'node' ? <Col span={12}>
+            <Form.Item label="瀹℃壒浜�">
+              {getFieldDecorator('approver', {
+                initialValue: data.approver || 'member'
               })(
-                <Radio.Group onChange={(e) => this.setState({ctrlType: e.target.value})}>
-                  <Radio value="role">瑙掕壊</Radio>
-                  <Radio value="department">閮ㄩ棬</Radio>
-                  <Radio value="none">鏃�</Radio>
+                <Radio.Group>
+                  <Radio value="member">鎸囧畾鎴愬憳</Radio>
+                  <Radio value="departmentManager">閮ㄩ棬涓荤</Radio>
+                  <Radio value="directManager">鐩村睘涓荤</Radio>
                 </Radio.Group>
               )}
             </Form.Item>
-          </Col>
-          {ctrlType === 'role' ? <Col span={12}>
+          </Col> : null}
+          {nodetype === 'node' ? <Col span={12}>
+            <Form.Item label="瀹℃壒鏂瑰紡">
+              {getFieldDecorator('approvalMethod', {
+                initialValue: data.approvalMethod || 'countersign'
+              })(
+                <Radio.Group>
+                  <Radio value="countersign">浼氱</Radio>
+                  <Radio value="orsign">鎴栫</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col> : null}
+          <Col span={12}>
             <Form.Item label="瑙掕壊">
               {getFieldDecorator('roleId', {
                 initialValue: data.roleId || '',
@@ -132,8 +147,8 @@
                 </Select>
               )}
             </Form.Item>
-          </Col> : null}
-          {ctrlType === 'department' ? <Col span={12}>
+          </Col>
+          <Col span={12}>
             <Form.Item label="閮ㄩ棬">
               {getFieldDecorator('depId', {
                 initialValue: data.depId || '',
@@ -149,7 +164,7 @@
                 </Select>
               )}
             </Form.Item>
-          </Col> : null}
+          </Col>
           <Col span={24}>
             <Form.Item label="澶囨敞">
               {getFieldDecorator('remark', {

--
Gitblit v1.8.0