From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 09 二月 2022 11:48:29 +0800
Subject: [PATCH] 2022-02-09

---
 src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx |   47 +++++++++++++++++------------------------------
 1 files changed, 17 insertions(+), 30 deletions(-)

diff --git a/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx b/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx
index 07d195f..e98fb1e 100644
--- a/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx
+++ b/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx
@@ -1,8 +1,9 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Select, Button, Input, InputNumber, Radio, Icon, Cascader, Tooltip } from 'antd'
+import { Form, Row, Col, Select, Button, Input, Radio, Cascader } from 'antd'
 
 import { minkeColorSystem, minkeIconSystem } from '@/utils/option.js'
+import MkIcon from '@/components/mk-icon'
 import './index.scss'
 
 class UniqueForm extends Component {
@@ -53,7 +54,7 @@
       selectIcon: record.icon || '',
       options: this.state.options.map(option => {
         option.children = option.children.map(cell => {
-          cell.label = <div className={_type + cell.value}>{record.icon ? <Icon type={record.icon} /> : cell.value}</div>
+          cell.label = <div className={_type + cell.value}>{record.icon ? <MkIcon type={record.icon} /> : cell.value}</div>
 
           return cell
         })
@@ -145,7 +146,7 @@
       selectIcon: val,
       options: this.state.options.map(option => {
         option.children = option.children.map(cell => {
-          cell.label = <div className={'font ' + cell.value}><Icon type={val} /></div>
+          cell.label = <div className={'font ' + cell.value}><MkIcon type={val} /></div>
 
           return cell
         })
@@ -183,13 +184,11 @@
       }
     }
 
-    let contFields = columns.filter(col => originField.field !== col.field && originField.type === col.type)
-
     return (
       <Form {...formItemLayout} id="model-mark-form-box" className="mingke-table">
         <Row gutter={24}>
           <Col span={6}>
-            <Form.Item label={'瀛楁'}>
+            <Form.Item label="瀛楁">
               {getFieldDecorator('field', {
                 initialValue: originField.field,
                 rules: [
@@ -212,7 +211,7 @@
             </Form.Item>
           </Col>
           <Col span={6}>
-            <Form.Item label={'瀵规瘮绫诲瀷'}>
+            <Form.Item label="瀵规瘮绫诲瀷">
               {getFieldDecorator('contrastType', {
                 initialValue: 'static'
               })(
@@ -224,7 +223,7 @@
             </Form.Item>
           </Col>
           <Col span={6}>
-            <Form.Item label={'瀵规瘮鏂瑰紡'}>
+            <Form.Item label="瀵规瘮鏂瑰紡">
               {getFieldDecorator('match', {
                 initialValue: '=',
                 rules: [
@@ -237,28 +236,22 @@
                 <Select>
                   <Select.Option value="="> = </Select.Option>
                   <Select.Option value="!="> != </Select.Option>
-                  {originField.type === 'number' ? <Select.Option value=">"> > </Select.Option> : null}
-                  {originField.type === 'number' ? <Select.Option value="<"> &lt; </Select.Option> : null}
-                  {originField.type === 'text' ? <Select.Option value="like"> like </Select.Option> : null}
+                  <Select.Option value=">"> &gt; </Select.Option>
+                  <Select.Option value="<"> &lt; </Select.Option>
+                  <Select.Option value="like"> like </Select.Option>
                 </Select>
               )}
             </Form.Item>
           </Col>
           {contrastType === 'static' ? <Col span={6}>
-            <Form.Item label={'瀵规瘮鍊�'}>
+            <Form.Item label="瀵规瘮鍊�">
               {getFieldDecorator('contrastValue', {
-                initialValue: '',
-                rules: [
-                  {
-                    required: true,
-                    message: this.props.dict['form.required.input'] + '瀵规瘮鍊�!'
-                  }
-                ]
-              })(originField.type === 'number' ? <InputNumber /> : <Input placeholder="" autoComplete="off" />)}
+                initialValue: ''
+              })(<Input placeholder="" autoComplete="off" />)}
             </Form.Item>
           </Col> : null}
           {contrastType === 'dynamic' ? <Col span={6}>
-            <Form.Item label={'瀵规瘮瀛楁'}>
+            <Form.Item label="瀵规瘮瀛楁">
               {getFieldDecorator('contrastField', {
                 initialValue: '',
                 rules: [
@@ -272,7 +265,7 @@
                   showSearch
                   filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                 >
-                  {contFields.map(item => (
+                  {columns.map(item => (
                     <Select.Option key={item.uuid} title={item.label + '(' + item.field + ')'} value={item.field}>{item.label + '(' + item.field + ')'}</Select.Option>
                   ))}
                 </Select>
@@ -280,12 +273,7 @@
             </Form.Item>
           </Col> : null}
           <Col span={6}>
-            <Form.Item label={
-              <Tooltip placement="topLeft" title="鍗$墖绫诲瀷锛屽湪鍗$墖鍥捐〃涓捣鏁�">
-                <Icon type="question-circle" />
-                {'鏍囪'}
-              </Tooltip>
-            }>
+            <Form.Item label="鏍囪鏂瑰紡">
               {getFieldDecorator('signType', {
                 initialValue: 'background',
                 rules: [
@@ -327,7 +315,6 @@
                   <Select.Option value="hint">鎻愮ず寤鸿鎬у浘鏍�</Select.Option>
                   <Select.Option value="edit">缂栬緫绫诲浘鏍�</Select.Option>
                   <Select.Option value="data">鏁版嵁绫诲浘鏍�</Select.Option>
-                  <Select.Option value="trademark">鍝佺墝鍜屾爣璇�</Select.Option>
                   <Select.Option value="normal">缃戠珯閫氱敤鍥炬爣</Select.Option>
                 </Select>
               )}
@@ -345,7 +332,7 @@
                 ]
               })(
                 <Select onChange={this.changeIcon} getPopupContainer={() => document.getElementById('model-mark-form-box')}>
-                  {icons.map(icon => <Select.Option key={icon} value={icon}><Icon type={icon} /></Select.Option>)}
+                  {icons.map(icon => <Select.Option key={icon} value={icon}><MkIcon type={icon} /></Select.Option>)}
                 </Select>
               )}
             </Form.Item>

--
Gitblit v1.8.0