From c7aece35a62b6e91fd98a625bf0e53f64bfbd18d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 17 八月 2023 16:22:15 +0800
Subject: [PATCH] 2023-08-17

---
 src/templates/sharecomponent/fieldscomponent/editcard/index.jsx |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
index 8f97ec6..4387911 100644
--- a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
+++ b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
@@ -1,6 +1,7 @@
 import React, {Component} from 'react'
 import { is, fromJS } from 'immutable'
-import { Row, Col, Icon, Radio, Input, Button } from 'antd'
+import { Row, Col, Radio, Input, Button } from 'antd'
+import { CheckOutlined } from '@ant-design/icons'
 import './index.scss'
 
 const { Search } = Input
@@ -10,18 +11,25 @@
     super(props)
 
     let _type = props.card.type
-    if (props.type === 'columns') {
-      if (_type === 'date' || _type === 'datetime') {
-        _type = 'text'
+
+    if (!props.card.origin) {
+      if (props.type === 'columns') {
+        if (_type !== 'number') {
+          _type = 'text'
+        }
+      } else if (props.type === 'search') {
+        if (_type === 'date' || _type === 'datetime') {
+          _type = 'date'
+        } else if (_type !== 'select') {
+          _type = 'text'
+        }
+      } else if (props.type === 'form') {
+        if (_type === 'datetime' || _type === 'date') {
+          _type = 'date'
+        } else if (_type !== 'number') {
+          _type = 'text'
+        }
       }
-    } else if (props.type === 'search') {
-      if (_type === 'number') {
-        _type = 'text'
-      } else if (_type === 'datetime') {
-        _type = 'daterange'
-      }
-    } else if (props.type === 'form') {
-      
     }
 
     this.state = {
@@ -69,7 +77,7 @@
     return (
       <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')  + (card.origin ? ' fixed' : '')} >
         <div className="base" onClick={this.changeSelect}>
-          <Icon type="check" />
+          <CheckOutlined />
           <p title={card.field}>瀛楁锛� <span>{card.field}</span></p>
           <p title={card.label}>鍚嶇О锛� <span>{card.label}</span></p>
         </div>
@@ -77,14 +85,13 @@
           <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}>
             <Radio value="text">text</Radio>
             <Radio value="select">select</Radio>
-            <Radio value="daterange">dateRange</Radio>
+            <Radio value="date">date</Radio>
           </Radio.Group> : null
         }
         {type === 'columns' ?
           <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}>
             <Radio value="text">text</Radio>
             <Radio value="number">number</Radio>
-            <Radio value="picture">picture</Radio>
           </Radio.Group> : null
         }
         {type === 'form' ?
@@ -156,7 +163,7 @@
       <div className="common-modal-edit-card">
         <Row className="search-row">
           <Col span={8}>
-            <Search placeholder="璇疯緭鍏ュ瓧娈�" onSearch={value => {this.setState({searchKey: value})}} enterButton />
+            <Search placeholder="璇疯緭鍏ュ瓧娈�" autoFocus onSearch={value => {this.setState({searchKey: value})}} enterButton />
           </Col>
           <Col span={8}>
             <Button onClick={this.reset}>閲嶇疆</Button>

--
Gitblit v1.8.0