This commit is contained in:
xuyucheng 2022-03-30 09:29:59 +08:00
parent dcf8f39144
commit e378bcd7f9
4 changed files with 102 additions and 10 deletions

93
package-lock.json generated
View File

@ -5092,6 +5092,11 @@
"type": "^1.0.1"
}
},
"d3-array": {
"version": "1.2.4",
"resolved": "https://registry.npmmirror.com/d3-array/-/d3-array-1.2.4.tgz",
"integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw=="
},
"d3-color": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-color/-/d3-color-3.0.1.tgz",
@ -5124,6 +5129,11 @@
"d3-color": "1 - 3"
}
},
"d3-polygon": {
"version": "1.0.6",
"resolved": "https://registry.npmmirror.com/d3-polygon/-/d3-polygon-1.0.6.tgz",
"integrity": "sha512-k+RF7WvI08PC8reEoXa/w2nSg5AUMTi+peBD9cmFc+0ixHfbs4QmxxkarVal1IkVkgxVuk9JSHhJURHiyHKAuQ=="
},
"d3-selection": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
@ -5696,6 +5706,11 @@
"stream-shift": "^1.0.0"
}
},
"earcut": {
"version": "2.2.3",
"resolved": "https://registry.npmmirror.com/earcut/-/earcut-2.2.3.tgz",
"integrity": "sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug=="
},
"echarts": {
"version": "5.1.2",
"resolved": "https://registry.nlark.com/echarts/download/echarts-5.1.2.tgz?cache=0&sync_timestamp=1623167246710&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fecharts%2Fdownload%2Fecharts-5.1.2.tgz",
@ -7064,6 +7079,26 @@
"resolved": "https://registry.nlark.com/flatten/download/flatten-1.0.3.tgz",
"integrity": "sha1-wSg6yfJ7Noq8HjbR/3sEUBowNWs="
},
"flubber": {
"version": "0.4.2",
"resolved": "https://registry.npmmirror.com/flubber/-/flubber-0.4.2.tgz",
"integrity": "sha512-79RkJe3rA4nvRCVc2uXjj7U/BAUq84TS3KHn6c0Hr9K64vhj83ZNLUziNx4pJoBumSPhOl5VjH+Z0uhi+eE8Uw==",
"requires": {
"d3-array": "^1.2.0",
"d3-polygon": "^1.0.3",
"earcut": "^2.1.1",
"svg-path-properties": "^0.2.1",
"svgpath": "^2.2.1",
"topojson-client": "^3.0.0"
},
"dependencies": {
"svg-path-properties": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/svg-path-properties/-/svg-path-properties-0.2.2.tgz",
"integrity": "sha512-GmrB+b6woz6CCdQe6w1GHs/1lt25l7SR5hmhF8jRdarpv/OgjLyuQygLu1makJapixeb1aQhP/Oa1iKi93o/aQ=="
}
}
},
"flush-write-stream": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/flush-write-stream/download/flush-write-stream-1.1.1.tgz",
@ -13324,6 +13359,16 @@
"rc-util": "^5.5.0"
}
},
"rc-tween-one": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/rc-tween-one/-/rc-tween-one-3.0.3.tgz",
"integrity": "sha512-sU4Ci6sgN9Rglsctdk2C3G7r0bWcOv/4l3xBWfrBoTTV8c3Qsoch8a7oBR7ZRovW2PyzdPnCmM08byEYwHbPDQ==",
"requires": {
"@babel/runtime": "^7.11.1",
"style-utils": "^0.3.4",
"tween-one": "^1.0.50"
}
},
"rc-upload": {
"version": "4.3.2",
"resolved": "https://registry.npmmirror.com/rc-upload/download/rc-upload-4.3.2.tgz?cache=0&sync_timestamp=1634707732937&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Frc-upload%2Fdownload%2Frc-upload-4.3.2.tgz",
@ -15314,6 +15359,11 @@
"schema-utils": "^2.7.0"
}
},
"style-utils": {
"version": "0.3.4",
"resolved": "https://registry.npmmirror.com/style-utils/-/style-utils-0.3.4.tgz",
"integrity": "sha512-7hUxeI95H6J0REP/7Y4WTPj0YsRrKljWIz0Q3Tex1nzzba9xAgGOnm3dr5qwsvEbAHcgu0V/sXfZDdqZ/tDtfg=="
},
"stylehacks": {
"version": "4.0.3",
"resolved": "https://registry.nlark.com/stylehacks/download/stylehacks-4.0.3.tgz",
@ -15373,6 +15423,11 @@
"resolved": "https://registry.npm.taobao.org/svg-parser/download/svg-parser-2.0.4.tgz",
"integrity": "sha1-/cLinhOVFzYUC3bLEiyO5mMOtrU="
},
"svg-path-properties": {
"version": "1.0.11",
"resolved": "https://registry.npmmirror.com/svg-path-properties/-/svg-path-properties-1.0.11.tgz",
"integrity": "sha512-Wo6SjzONZPL9UAgrnwcCkDGRYP9CbHJGkNcPFIgEVRjiOiJxSd/AtwnGk/4N4iOLGUoas57TMxY0xASDeb9YJg=="
},
"svgo": {
"version": "1.3.2",
"resolved": "https://registry.npmmirror.com/svgo/download/svgo-1.3.2.tgz",
@ -15393,6 +15448,11 @@
"util.promisify": "~1.0.0"
}
},
"svgpath": {
"version": "2.5.0",
"resolved": "https://registry.npmmirror.com/svgpath/-/svgpath-2.5.0.tgz",
"integrity": "sha512-o/vohwqjUO9nDAh4rcjE3KaW/v//At8UJu2LJMybXidf5QLQLVA4bxH0//4YCsr+1H4Gw1Wi/Jc62ynzSBYidw=="
},
"symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npm.taobao.org/symbol-tree/download/symbol-tree-3.2.4.tgz",
@ -15741,6 +15801,21 @@
"resolved": "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz",
"integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM="
},
"topojson-client": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/topojson-client/-/topojson-client-3.1.0.tgz",
"integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==",
"requires": {
"commander": "2"
},
"dependencies": {
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
}
}
},
"tough-cookie": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-4.0.0.tgz",
@ -15804,6 +15879,24 @@
"resolved": "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY="
},
"tween-functions": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/tween-functions/-/tween-functions-1.2.0.tgz",
"integrity": "sha512-PZBtLYcCLtEcjL14Fzb1gSxPBeL7nWvGhO5ZFPGqziCcr8uvHp0NDmdjBchp6KHL+tExcg0m3NISmKxhU394dA=="
},
"tween-one": {
"version": "1.0.58",
"resolved": "https://registry.npmmirror.com/tween-one/-/tween-one-1.0.58.tgz",
"integrity": "sha512-CE50CO5QQHnvjUqBRrQTfwNCDfPgO/0wOOUWWnxR6JJ6/8gdogYvdENouZu/P/szLW+TNOgbS5L26PjuKf9wzQ==",
"requires": {
"@babel/runtime": "^7.11.1",
"flubber": "^0.4.2",
"raf": "^3.4.1",
"style-utils": "^0.3.0",
"svg-path-properties": "^1.0.4",
"tween-functions": "^1.2.0"
}
},
"type": {
"version": "1.2.0",
"resolved": "https://registry.nlark.com/type/download/type-1.2.0.tgz",

View File

@ -53,6 +53,7 @@
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "5.0.2",
"prompts": "2.4.0",
"rc-tween-one": "^3.0.3",
"react": "^17.0.2",
"react-app-polyfill": "^2.0.0",
"react-dev-utils": "^11.0.3",

View File

@ -73,14 +73,6 @@ body,
height: 90% !important;
}
.ant-input {
/* padding: 10px ; */
}
.ant-input:focus {
/* border: none !important; */
}
p {
font-size: 16px;
}

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { withRouter } from "react-router-dom";
import { Row, Input, Button, Form, Tag, Modal, Select, Card, Col, message } from 'antd';
import { Row, Input, Button, Form, Tag, Modal, Select, Card, Col, message,Collapse } from 'antd';
import { PlusOutlined,MinusOutlined } from '@ant-design/icons';
import api from "@/api/request"
@ -8,6 +8,8 @@ const { Search, TextArea } = Input
const { Option } = Select
const { Panel } = Collapse;
class Threshold extends Component {
constructor(props) {
super(props)
@ -86,8 +88,10 @@ class Threshold extends Component {
{(fields, { add, remove }) => {
return (
<>
{fields.map((field) => (
<Collapse defaultActiveKey={['1']} >
{fields.map((field,index) => (
<>
<Panel header={"内容"+Number(index+1)} key={index}>
<Form.Item label="类别" name={[field.name, 'label']}><Input /></Form.Item>
<Form.List name={[field.name, 'children']}>
{(fields, { add, remove }) => {
@ -155,8 +159,10 @@ class Threshold extends Component {
}}
</Form.List>
<Row justify='center'><Button type="danger" onClick={() => remove(field.name)} block icon={<MinusOutlined />}>删除类别</Button></Row>
</Panel>
</>
))}
</Collapse>
<Form.Item>
<Button type="primary" onClick={() => add()} block icon={<PlusOutlined />} style={{ marginTop: 20 }}>
添加类别