[baozhangchao] пре 3 година
родитељ
комит
8628409cdb

+ 1
- 0
package.json Прегледај датотеку

@@ -47,6 +47,7 @@
47 47
   ],
48 48
   "dependencies": {
49 49
     "@amap/amap-jsapi-loader": "^1.0.1",
50
+    "@ant-design/charts": "^1.3.5",
50 51
     "@ant-design/icons": "^4.7.0",
51 52
     "@ant-design/pro-card": "^1.18.34",
52 53
     "@ant-design/pro-descriptions": "^1.10.0",

+ 19
- 0
src/components/ScreenBox/SquareBox/index.jsx Прегледај датотеку

@@ -0,0 +1,19 @@
1
+
2
+
3
+import './style.less'
4
+export default (props) => {
5
+
6
+
7
+  return (
8
+    <div className="win">
9
+      <div className="border_corner border_corner_left_top" />
10
+      <div className="border_corner border_corner_right_top" />
11
+      <div className="border_corner border_corner_left_bottom" />
12
+      <div className="border_corner border_corner_right_bottom" />
13
+      {/* 内容 */}
14
+      <div className="main">
15
+        {props.children}
16
+      </div>
17
+    </div>
18
+  )
19
+}

+ 41
- 0
src/components/ScreenBox/SquareBox/style.less Прегледај датотеку

@@ -0,0 +1,41 @@
1
+.win {
2
+  position: relative;
3
+  display: inline-block;
4
+  margin: 20px;
5
+}
6
+.main {
7
+  color: #fff;
8
+  border: 1px solid rgba(61, 129, 240, 0.5);
9
+  border-radius: 4px;
10
+}
11
+.border_corner {
12
+  position: absolute;
13
+  width: 4px;
14
+  height: 4px;
15
+  background-color: #67ffff;
16
+  border-radius: 50%;
17
+}
18
+.border_corner_left_top {
19
+  top: 0;
20
+  left: -2px;
21
+  border-right: none;
22
+  border-bottom: none;
23
+}
24
+.border_corner_right_top {
25
+  top: 0;
26
+  right: -2px;
27
+  border-bottom: none;
28
+  border-left: none;
29
+}
30
+.border_corner_left_bottom {
31
+  bottom: 0;
32
+  left: -2px;
33
+  border-top: none;
34
+  border-right: none;
35
+}
36
+.border_corner_right_bottom {
37
+  right: -2px;
38
+  bottom: 0;
39
+  border-top: none;
40
+  border-left: none;
41
+}

+ 13
- 0
src/components/ScreenBox/TitleBox/index.jsx Прегледај датотеку

@@ -0,0 +1,13 @@
1
+
2
+
3
+import './style.less'
4
+
5
+export default (props) => {
6
+  const { value } = props
7
+  return (
8
+    <div className='TitleBox'>
9
+      <div className='TitleBox-ListBox' />
10
+      <span>{value}</span>
11
+    </div>
12
+  )
13
+}

+ 22
- 0
src/components/ScreenBox/TitleBox/style.less Прегледај датотеку

@@ -0,0 +1,22 @@
1
+.TitleBox {
2
+  display: flex;
3
+  align-items: center;
4
+  width: 163px;
5
+  padding: 11px 9px 9px 11px;
6
+  border-radius: 4px;
7
+  box-shadow: 0px 0px 10px 0px #3d81f0 inset;
8
+
9
+  .TitleBox-ListBox {
10
+    width: 13px;
11
+    height: 13px;
12
+    margin-right: 10px;
13
+    background: linear-gradient(0deg, #0c49c6, #3bd6e8);
14
+  }
15
+  > span {
16
+    color: transparent;
17
+    font-weight: 800;
18
+    font-size: 17px;
19
+    background: linear-gradient(0deg, #0c49c6, #3bd6e8);
20
+    background-clip: text;
21
+  }
22
+}

+ 48
- 1
src/pages/SystemManagement/UserRights/index.jsx Прегледај датотеку

@@ -1,7 +1,54 @@
1 1
 
2 2
 
3
+
4
+import SquareBox from '@/components/ScreenBox/SquareBox'
5
+import TitleBox from '@/components/ScreenBox/TitleBox'
6
+import { Bar } from '@ant-design/plots';
7
+// import ba from './a.png'
8
+
3 9
 export default (props) => {
10
+
11
+
12
+  const style = {
13
+    bgd: {
14
+      color: 'rgba(0,0,0,.25)',
15
+      height: '100vh',
16
+      // backgroundImage: `url(${ba})`,
17
+      backgroundSize: '100%,100%',
18
+      padding: '5em 10em'
19
+    }
20
+  }
21
+  const data = [
22
+    {
23
+      year: '收割机',
24
+      value: 200,
25
+    },
26
+    {
27
+      year: '播种机',
28
+      value: 150,
29
+    },
30
+    {
31
+      year: '农药机',
32
+      value: 50,
33
+    },
34
+  ];
35
+  const config = {
36
+    data,
37
+    xField: 'value',
38
+    yField: 'year',
39
+    seriesField: 'year',
40
+    legend: {
41
+      position: 'top-left',
42
+    },
43
+    color: [' #FB9900', '#23E8AE', '#E63404'],
44
+  };
45
+
4 46
   return (
5
-    <div>用户权限</div>
47
+    <div style={style.bgd} >
48
+      <TitleBox value='农机类型统计' />
49
+      <SquareBox>
50
+        <Bar  {...config} />
51
+      </SquareBox>
52
+    </div>
6 53
   )
7 54
 }

+ 28
- 0
src/services/PlatformMessageManagement.js Прегледај датотеку

@@ -0,0 +1,28 @@
1
+
2
+/**
3
+ * @表格展示
4
+ * 
5
+ */
6
+
7
+
8
+
9
+
10
+/**
11
+ * @增加
12
+ * 
13
+ */
14
+
15
+
16
+
17
+/**
18
+ * @删除
19
+ * 
20
+ */
21
+
22
+
23
+
24
+
25
+/**
26
+ * @修改
27
+ * 
28
+ */

+ 8
- 8
src/services/swagger/pet.js Прегледај датотеку

@@ -4,7 +4,7 @@
4 4
 import { request } from 'umi';
5 5
 /** Update an existing pet PUT /pet */
6 6
 
7
-export async function updatePet(body, options) {
7
+export async function updatePet (body, options) {
8 8
   return request('/pet', {
9 9
     method: 'PUT',
10 10
     headers: {
@@ -16,7 +16,7 @@ export async function updatePet(body, options) {
16 16
 }
17 17
 /** Add a new pet to the store POST /pet */
18 18
 
19
-export async function addPet(body, options) {
19
+export async function addPet (body, options) {
20 20
   return request('/pet', {
21 21
     method: 'POST',
22 22
     headers: {
@@ -28,7 +28,7 @@ export async function addPet(body, options) {
28 28
 }
29 29
 /** Finds Pets by status Multiple status values can be provided with comma separated strings GET /pet/findByStatus */
30 30
 
31
-export async function findPetsByStatus(params, options) {
31
+export async function findPetsByStatus (params, options) {
32 32
   return request('/pet/findByStatus', {
33 33
     method: 'GET',
34 34
     params: { ...params },
@@ -37,7 +37,7 @@ export async function findPetsByStatus(params, options) {
37 37
 }
38 38
 /** Finds Pets by tags Muliple tags can be provided with comma separated strings. Use         tag1, tag2, tag3 for testing. GET /pet/findByTags */
39 39
 
40
-export async function findPetsByTags(params, options) {
40
+export async function findPetsByTags (params, options) {
41 41
   return request('/pet/findByTags', {
42 42
     method: 'GET',
43 43
     params: { ...params },
@@ -46,7 +46,7 @@ export async function findPetsByTags(params, options) {
46 46
 }
47 47
 /** Find pet by ID Returns a single pet GET /pet/${param0} */
48 48
 
49
-export async function getPetById(params, options) {
49
+export async function getPetById (params, options) {
50 50
   const { petId: param0 } = params;
51 51
   return request(`/pet/${param0}`, {
52 52
     method: 'GET',
@@ -56,7 +56,7 @@ export async function getPetById(params, options) {
56 56
 }
57 57
 /** Updates a pet in the store with form data POST /pet/${param0} */
58 58
 
59
-export async function updatePetWithForm(params, body, options) {
59
+export async function updatePetWithForm (params, body, options) {
60 60
   const { petId: param0 } = params;
61 61
   const formData = new FormData();
62 62
   Object.keys(body).forEach((ele) => {
@@ -78,7 +78,7 @@ export async function updatePetWithForm(params, body, options) {
78 78
 }
79 79
 /** Deletes a pet DELETE /pet/${param0} */
80 80
 
81
-export async function deletePet(params, options) {
81
+export async function deletePet (params, options) {
82 82
   const { petId: param0 } = params;
83 83
   return request(`/pet/${param0}`, {
84 84
     method: 'DELETE',
@@ -88,7 +88,7 @@ export async function deletePet(params, options) {
88 88
 }
89 89
 /** uploads an image POST /pet/${param0}/uploadImage */
90 90
 
91
-export async function uploadFile(params, body, options) {
91
+export async function uploadFile (params, body, options) {
92 92
   const { petId: param0 } = params;
93 93
   const formData = new FormData();
94 94
   Object.keys(body).forEach((ele) => {