Przeglądaj źródła

图表接口联调

钞小赢 3 lat temu
rodzic
commit
83460661d7

+ 7 - 0
shanXiPlatform/src/api/branchoff/index.js

@@ -29,3 +29,10 @@ export function  getpointll(homeType , depotId) {
29 29
     method: 'get'
30 30
   })
31 31
 }
32
+export function  getyclq( data  ) {
33
+  return request({              
34
+    url: `/csc-szls-business/grainConditionRecord/authority/getGrainErrorCount`,
35
+    method: 'post',
36
+    data : data
37
+  })
38
+}

+ 7 - 0
shanXiPlatform/src/router/index.js

@@ -340,6 +340,13 @@ export const constantRoutes = [
340 340
         hidden: true,
341 341
         meta: { title: '仓房状态', icon: 'dashboard',isshowLibrary:true, affix: true },
342 342
       },
343
+      {
344
+        path: 'yclqTable',
345
+        component: () => import('@/views/home/yclqtable'),
346
+        name: 'yclqTable',
347
+        hidden: true,
348
+        meta: { title: '异常粮情', icon: 'dashboard',isshowLibrary:true, affix: true },
349
+      },
343 350
     ]
344 351
 
345 352
   },

+ 29 - 15
shanXiPlatform/src/views/home/branchOffice.vue

@@ -7,21 +7,21 @@
7 7
                     <div class="one">
8 8
                         <p class="lsp">
9 9
                             <img src="../../assets/images/rightarrow.png" alt /> 储存状态
10
-                            <!-- <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(1)">更多>></span> -->
10
+                            <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(1)">更多>></span>
11 11
                         </p>
12 12
                         <div id="myCharttwo" class="oneo"></div>
13 13
                     </div>
14 14
                     <div class="two">
15 15
                         <p class="lsp">
16 16
                             <img src="../../assets/images/rightarrow.png" alt /> 粮食种类
17
-                            <!-- <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(2)">更多>></span> -->
17
+                            <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(2)">更多>></span>
18 18
                         </p>
19 19
                         <div id="myChartone" class="twot"></div>
20 20
                     </div>
21 21
                     <div class="thi">
22 22
                         <p class="lsp">
23 23
                             <img src="../../assets/images/rightarrow.png" alt /> 仓房状态
24
-                            <!-- <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(3)">更多>></span> -->
24
+                            <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(3)">更多>></span>
25 25
                         </p>
26 26
                         <div id="myChartthi" class="thit"></div>
27 27
                     </div>
@@ -247,6 +247,7 @@
247 247
                         <p class="lsp">
248 248
                             <img src="../../assets/images/rightarrow.png" alt />
249 249
                             异常粮情
250
+                            <span v-if="crumbs.length>1" class="echartSpan" @click="yclq()">更多>></span>
250 251
                         </p>
251 252
                         <div id="myChartfor" class="rboto"></div>
252 253
                     </div>
@@ -306,7 +307,9 @@ export default {
306 307
                 { id: "141024", name: "洪洞县" },
307 308
                 { id: "140800", name: "运城市" },
308 309
                 { id: "140882", name: "河津市" },
309
-                { id: "140700", name: "晋中市" }
310
+                { id: "140700", name: "晋中市" },
311
+                { id: "140300", name: "阳泉市" },
312
+                { id: "140321", name: "平定县" }
310 313
             ],
311 314
             datastr: "",
312 315
             objone: {
@@ -855,10 +858,18 @@ export default {
855 858
                                     }
856 859
                                     this.clickNumber = 2
857 860
                                 } else if (params.data[5]) {
861
+                                    this.$store.commit({
862
+                                        type: "changeDepotId",
863
+                                        depotId: params.data[4]
864
+                                    })
865
+                                    this.$store.commit({
866
+                                        type: "changeDepotName",
867
+                                        depotName: params.data[7]
868
+                                    })
858 869
                                     var cityId = params.data[5]
859 870
                                     if (cityId.slice(4, 6) == "00") {
860 871
                                         this.areacodearr.forEach(item => {
861
-                                            if (cityId == item.id) {
872
+                                            if ( Number(cityId)  == Number( item.id)) {
862 873
                                                 this.crumbs = [
863 874
                                                     { name: "山西省" }
864 875
                                                 ]
@@ -887,7 +898,7 @@ export default {
887 898
                                 }
888 899
                             } else if (this.clickNumber == 2) {
889 900
                                 this.areacodearr.forEach(item => {
890
-                                    if (params.data[5] == item.id) {
901
+                                    if (Number(params.data[5] )  == Number(item.id )) {
891 902
                                         this.crumbs = [{ name: "山西省" }]
892 903
                                         this.crumbs.push({ name: item.name })
893 904
                                         this.crumbs.push({
@@ -1199,7 +1210,7 @@ export default {
1199 1210
                 color: "#88C06A",
1200 1211
                 xAxis: {
1201 1212
                     type: "value",
1202
-                    data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
1213
+                    data: [],
1203 1214
                     name: "",
1204 1215
                     axisLabel: {
1205 1216
                         interval: 0
@@ -1284,14 +1295,17 @@ export default {
1284 1295
             }
1285 1296
         },
1286 1297
         leftboxsMore(type) {
1287
-            if(type == 1){
1298
+            if (type == 1) {
1288 1299
                 this.$router.push({ name: "storageStatusTable" })
1289
-            }else if(type == 2){
1300
+            } else if (type == 2) {
1290 1301
                 this.$router.push({ name: "typesOfGrainTable" })
1291
-            }else if(type == 3){
1302
+            } else if (type == 3) {
1292 1303
                 this.$router.push({ name: "houseStatusTable" })
1293 1304
             }
1294 1305
         },
1306
+        yclq() {
1307
+            this.$router.push({ name: "yclqTable" })
1308
+        }
1295 1309
     }
1296 1310
 }
1297 1311
 </script>
@@ -1607,10 +1621,10 @@ export default {
1607 1621
     }
1608 1622
 }
1609 1623
 .echartSpan {
1610
-    float:right;
1611
-    font-size:14px;
1612
-    margin-top:2px;
1613
-    color:#999999;
1614
-    cursor:pointer
1624
+    float: right;
1625
+    font-size: 14px;
1626
+    margin-top: 2px;
1627
+    color: #999999;
1628
+    cursor: pointer;
1615 1629
 }
1616 1630
 </style>

+ 82 - 78
shanXiPlatform/src/views/home/storageStatusTable.vue

@@ -1,96 +1,100 @@
1 1
 <template>
2
-  <div class="global">
3
-    <div class="contentContainerGg">
4
-        <div class="container">
5
-          <el-table  border  :data="tableList"  highlight-current-row  style="width:100%"  :header-cell-style="{background:'#f8f8f8'}">
6
-            <el-table-column  type="index"  align="center"  label="序号"  width="50px"/>
7
-            <el-table-column prop="warnName" label="仓房" align="center" />
8
-            <el-table-column prop="warnName" label="所属公司" align="center" />
9
-            <el-table-column prop="warnName" label="储存状态(个)" align="center" />
10
-            <el-table-column prop="warnName" label="粮食种类(个)" align="center" />
11
-            <el-table-column prop="warnName" label="仓房状态(个)" align="center" />
12
-          </el-table>
13
-          <div class="pagination-container">
14
-            <el-pagination
15
-              class="right"
16
-              background
17
-              :current-page.sync="listQuery.page"
18
-              :page-size="listQuery.limit"
19
-              :page-sizes="[10,20,30,40]"
20
-              :total="total"
21
-              @size-change="sizeChange"
22
-              @current-change="pageChange"
23
-              layout="total, sizes, prev, pager, next, jumper"
24
-            ></el-pagination>
25
-          </div>
2
+    <div class="global">
3
+        <div class="contentContainerGg">
4
+            <div class="container">
5
+                <el-table border :data="tableList" highlight-current-row style="width:100%" :header-cell-style="{background:'#f8f8f8'}">
6
+                    <el-table-column type="index" align="center" label="序号" width="50px"> </el-table-column>
7
+                    <el-table-column prop="hname" label="仓房" align="center"> </el-table-column>
8
+                    <el-table-column property="depotName" label="所属公司" align="center">
9
+                        <template slot-scope="scope">
10
+                             {{ depotDic[scope.row.depotId] }}
11
+                        </template>
12
+                    </el-table-column>
13
+                    <el-table-column prop="storageStatus" label="储存状态(个)" align="center"> </el-table-column>
14
+                    <el-table-column prop="grainVarieties" label="粮食种类(个)" align="center"> </el-table-column>
15
+                    <el-table-column prop="warehouseStatus" label="仓房状态(个)" align="center"> </el-table-column>
16
+                </el-table>
17
+                <div class="pagination-container">
18
+                    <el-pagination class="right" background :current-page.sync="listQuery.page" :page-size="listQuery.limit" :page-sizes="[10,20,30,40]" :total="total" @size-change="sizeChange" @current-change="pageChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
19
+                </div>
20
+            </div>
26 21
         </div>
27 22
     </div>
28
-  </div>
29 23
 </template>
30 24
 <script>
31
-import { getList } from '@/api/system/earlyWarningManagement'
25
+import { getcf } from "@/api/organizationalStructureManagement/index.js"
26
+// import { getList } from '@/api/system/earlyWarningManagement'
32 27
 export default {
33
-  data() {
34
-    return {
35
-      // 列表数据
36
-      tableList: [],
37
-      // 分页
38
-      total: 0,
39
-      listLoading: true,
40
-      listQuery: {
41
-        page: 1,
42
-        limit: 10,
43
-      },
44
-      roleList:[]
45
-    }
46
-  },
47
-  created() {
48
-    this.getList()
49
-  },
50
-  methods: {
51
-    getList() {
52
-      let data = {
53
-        pageIndex: this.listQuery.page,
54
-        pageSize: this.listQuery.limit
55
-      }
56
-      getList(data).then((res) => {
57
-          if (res.code == 200) {
58
-            this.tableList = res.data.records
59
-            this.listQuery.limit = res.data.size
60
-            this.total = res.data.total
61
-          }else{
62
-            this.$message({
63
-              type: 'error',
64
-              message: res.msg
65
-            })
66
-          }
67
-      }).catch((err) => {
68
-          console.log(err)
69
-        })
70
-    },
71
-    sizeChange(v) {
72
-      this.listQuery.limit = v;
73
-      this.getList();
28
+    data() {
29
+        return {
30
+            // 列表数据
31
+            tableList: [],
32
+            // 分页
33
+            total: 0,
34
+            listLoading: true,
35
+            listQuery: {
36
+                page: 1,
37
+                limit: 10
38
+            },
39
+            roleList: [],
40
+            depotDic: []
41
+        }
74 42
     },
75
-    pageChange(v) {
76
-      this.listQuery.page = v;
77
-      this.getList();
43
+    created() {
44
+        this.getList()
45
+        this.depotDic = JSON.parse(localStorage.getItem("deportDic"))
78 46
     },
79
-  }
47
+    methods: {
48
+        getList() {
49
+            var condition = {
50
+                depotId: this.$store.state.depotId
51
+            }
52
+            condition = JSON.stringify(condition)
53
+            let data = {
54
+                condition: condition,
55
+                pageIndex: this.listQuery.page,
56
+                pageSize: this.listQuery.limit
57
+            }
58
+            getcf(data)
59
+                .then(res => {
60
+                    if (res.code == 200) {
61
+                        this.tableList = res.data.records
62
+                        this.listQuery.limit = res.data.size
63
+                        this.total = res.data.total
64
+                    } else {
65
+                        this.$message({
66
+                            type: "error",
67
+                            message: res.msg
68
+                        })
69
+                    }
70
+                })
71
+                .catch(err => {
72
+                    console.log(err)
73
+                })
74
+        },
75
+        sizeChange(v) {
76
+            this.listQuery.limit = v
77
+            this.getList()
78
+        },
79
+        pageChange(v) {
80
+            this.listQuery.page = v
81
+            this.getList()
82
+        }
83
+    }
80 84
 }
81 85
 </script>
82 86
 <style lang="scss" scoped>
83 87
 .top {
84
-  height: 40px;
85
-  line-height: 40px;
86
-  border-bottom: 1px solid #ccc;
88
+    height: 40px;
89
+    line-height: 40px;
90
+    border-bottom: 1px solid #ccc;
87 91
 }
88 92
 .container {
89
-  padding: 10px;
93
+    padding: 10px;
90 94
 }
91 95
 .pagination-container {
92
-  margin-top:10px;
93
-  margin-right:20px;
94
-  text-align: right;
96
+    margin-top: 10px;
97
+    margin-right: 20px;
98
+    text-align: right;
95 99
 }
96 100
 </style>

+ 120 - 0
shanXiPlatform/src/views/home/yclqtable.vue

@@ -0,0 +1,120 @@
1
+<template>
2
+    <div class="global">
3
+        <div class="contentContainerGg">
4
+            <div class="container">
5
+                <el-form  :inline="true">
6
+                    <el-form-item label="时间:">
7
+                        <el-date-picker @change="timechange" id="getWeek" v-model="datetime" type="week" format="yyyy年WW周" placeholder="选择周">
8
+                        </el-date-picker>
9
+                    </el-form-item>
10
+                    <el-form-item>
11
+                        <el-button icon="el-icon-search" type="success" plain @click="getList()">
12
+                            查询</el-button>
13
+                    </el-form-item>
14
+                </el-form>
15
+                <el-table border :data="tableList" highlight-current-row style="width:100%" :header-cell-style="{background:'#f8f8f8'}">
16
+                    <el-table-column prop="hname" label="时间" align="center" />
17
+                    <el-table-column prop="warnName" label="公司" align="center" />
18
+                    <el-table-column prop="storageStatus" label="所属市" align="center" />
19
+                    <el-table-column prop="grainVarieties" label="仓房数量(个)" align="center" />
20
+                    <el-table-column prop="warehouseStatus" label="粮情异常仓房数量(个)" align="center" />
21
+                    <el-table-column property="operation" label="操作" align="center">
22
+                        <template slot-scope="scope">
23
+                            <el-button size="mini" type="detailbtn" @click="detailbtn(scope.$index, scope.row)">详情</el-button>
24
+                        </template>
25
+                    </el-table-column>
26
+                </el-table>
27
+                <div class="pagination-container">
28
+                    <el-pagination class="right" background :current-page.sync="listQuery.page" :page-size="listQuery.limit" :page-sizes="[10,20,30,40]" :total="total" @size-change="sizeChange" @current-change="pageChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
29
+                </div>
30
+            </div>
31
+        </div>
32
+    </div>
33
+</template>
34
+<script>
35
+import { getcf } from "@/api/organizationalStructureManagement/index.js"
36
+import {  getyclq } from "@/api/branchoff/index.js"
37
+export default {
38
+    data() {
39
+        return {
40
+            datetime: "",
41
+            // 列表数据
42
+            tableList: [],
43
+            // 分页
44
+            total: 0,
45
+            listLoading: true,
46
+            listQuery: {
47
+                page: 1,
48
+                limit: 10
49
+            },
50
+            roleList: []
51
+        }
52
+    },
53
+    created() {
54
+        this.getList()
55
+    },
56
+    methods: {
57
+        timechange() {
58
+            this.$nextTick(() => {
59
+                let week = document.querySelector("#getWeek").value
60
+                this.checkYear = week.slice(0, 4)
61
+                this.checkYearWeek = week.slice(5, 7)
62
+                this.getList()
63
+            })
64
+        },
65
+        getList() {
66
+            var condition = {
67
+                depotId: this.$store.state.depotId,
68
+                checkYear: this.checkYear,
69
+                checkYearWeek: this.checkYearWeek
70
+            }
71
+            condition = JSON.stringify(condition)
72
+            let data = {
73
+                condition: condition,
74
+                pageIndex: this.listQuery.page,
75
+                pageSize: this.listQuery.limit
76
+            }
77
+            getyclq(data)
78
+                .then(res => {
79
+                    if (res.code == 200) {
80
+                        this.tableList = res.data.records
81
+                        this.listQuery.limit = res.data.size
82
+                        this.total = res.data.total
83
+                    } else {
84
+                        this.$message({
85
+                            type: "error",
86
+                            message: res.msg
87
+                        })
88
+                    }
89
+                })
90
+                .catch(err => {
91
+                    console.log(err)
92
+                })
93
+        },
94
+        sizeChange(v) {
95
+            this.listQuery.limit = v
96
+            this.getList()
97
+        },
98
+        pageChange(v) {
99
+            this.listQuery.page = v
100
+            this.getList()
101
+        },
102
+        detailbtn() {}
103
+    }
104
+}
105
+</script>
106
+<style lang="scss" scoped>
107
+.top {
108
+    height: 40px;
109
+    line-height: 40px;
110
+    border-bottom: 1px solid #ccc;
111
+}
112
+.container {
113
+    padding: 10px;
114
+}
115
+.pagination-container {
116
+    margin-top: 10px;
117
+    margin-right: 20px;
118
+    text-align: right;
119
+}
120
+</style>

+ 4 - 4
shanXiPlatform/vue.config.js

@@ -39,8 +39,8 @@ module.exports = {
39 39
 
40 40
     proxy: {  //配置跨域
41 41
       '/': {
42
-        //  target: 'http://101.36.160.140:21061',  //这里后台的地址模拟的;应该填写你们真实的后台接口
43
-        target: 'http://101.36.160.140:21021',  //这里后台的地址模拟的;应该填写你们真实的后台接口
42
+         target: 'http://101.36.160.140:21061',  //这里后台的地址模拟的;应该填写你们真实的后台接口
43
+        //target: 'http://101.36.160.140:21021',  //这里后台的地址模拟的;应该填写你们真实的后台接口
44 44
         // target:'http://172.16.0.02:9601',
45 45
         changOrigin: true,  //允许跨域
46 46
 
@@ -53,8 +53,8 @@ module.exports = {
53 53
       },
54 54
       '/apk': {
55 55
         // ws: true,
56
-        target: 'http://101.36.160.140:21021',
57
-        // target: 'http://101.36.160.140:21061', 
56
+        //target: 'http://101.36.160.140:21021',
57
+         target: 'http://101.36.160.140:21061', 
58 58
         changOrigin: true,
59 59
         pathRewrite: {
60 60
             '^/apk': ''