Parcourir la source

Merge branch 'master' of http://101.36.160.140:21044/csc/csc-szls-vue

linyanfei il y a 3 ans
Parent
commit
2f563bfc80

+ 1 - 1
shanXiPlatform/src/layoutt/index.vue

@@ -40,7 +40,7 @@
40 40
     </div>
41 41
     <div class="breadcrubox" v-show="isShow">
42 42
       <span class="myspan">当前所在位置: 首页></span>
43
-      <!-- <span v-if="!this.$store.state.isnavigation">{{this.$store.state.depotName}}></span> -->
43
+      <span class="myspan" v-if="this.$store.state.isshowLibrary">{{this.$store.state.depotName}}></span>
44 44
       <breadcrumb id="breadcrumb-container" style="height:54px;line-height:54px; " class="breadcrumb-container" />
45 45
     </div>
46 46
     <app-main></app-main>

+ 11 - 0
shanXiPlatform/src/permission.js

@@ -60,6 +60,17 @@ router.beforeEach(async(to, from, next) => {
60 60
       istable: false
61 61
     })
62 62
   }
63
+  if(to.meta.isshowLibrary){
64
+    store.commit({
65
+      type:'changeisshowLibrary',
66
+      isshowLibrary: true
67
+    })
68
+  }else{
69
+    store.commit({
70
+      type:'changeisshowLibrary',
71
+      isshowLibrary: false
72
+    })
73
+  }
63 74
 
64 75
   // start progress bar
65 76
   NProgress.start()

+ 21 - 3
shanXiPlatform/src/router/index.js

@@ -319,9 +319,27 @@ export const constantRoutes = [
319 319
         hidden: true,
320 320
         meta: { title: '修改密码', icon: 'dashboard', affix: true },
321 321
       },
322
-
323
-
324
-
322
+      {
323
+        path: 'storageStatusTable',
324
+        component: () => import('@/views/home/storageStatusTable'),
325
+        name: 'storageStatusTable',
326
+        hidden: true,
327
+        meta: { title: '储存状态', icon: 'dashboard',isshowLibrary:true, affix: true },
328
+      },
329
+      {
330
+        path: 'typesOfGrainTable',
331
+        component: () => import('@/views/home/storageStatusTable'),
332
+        name: 'typesOfGrainTable',
333
+        hidden: true,
334
+        meta: { title: '粮食种类', icon: 'dashboard',isshowLibrary:true, affix: true },
335
+      },
336
+      {
337
+        path: 'houseStatusTable',
338
+        component: () => import('@/views/home/storageStatusTable'),
339
+        name: 'houseStatusTable',
340
+        hidden: true,
341
+        meta: { title: '仓房状态', icon: 'dashboard',isshowLibrary:true, affix: true },
342
+      },
325 343
     ]
326 344
 
327 345
   },

+ 4 - 1
shanXiPlatform/src/store/index.js

@@ -40,6 +40,7 @@ const state = {
40 40
   informNum:'', //首页右上角通知数量
41 41
   numberOnline: 0, //系统在线人数
42 42
   areacodes: '', //地图区域编码
43
+  isshowLibrary: false, //控制库主任首页左侧echart详情页面包屑是否显示库
43 44
 }
44 45
 
45 46
 const mutations = {
@@ -103,7 +104,9 @@ const mutations = {
103 104
   changeareacode(state,payload) {
104 105
     state.areacodes = payload.areacodes
105 106
   },
106
-  
107
+  changeisshowLibrary(state,payload) {
108
+    state.isshowLibrary = payload.isshowLibrary
109
+  },
107 110
 
108 111
   
109 112
 }

+ 20 - 1
shanXiPlatform/src/views/home/branchOffice.vue

@@ -7,18 +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 11
                         </p>
11 12
                         <div id="myCharttwo" class="oneo"></div>
12 13
                     </div>
13 14
                     <div class="two">
14 15
                         <p class="lsp">
15 16
                             <img src="../../assets/images/rightarrow.png" alt /> 粮食种类
17
+                            <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(2)">更多>></span>
16 18
                         </p>
17 19
                         <div id="myChartone" class="twot"></div>
18 20
                     </div>
19 21
                     <div class="thi">
20 22
                         <p class="lsp">
21 23
                             <img src="../../assets/images/rightarrow.png" alt /> 仓房状态
24
+                            <span v-if="crumbs.length>1" class="echartSpan" @click="leftboxsMore(3)">更多>></span>
22 25
                         </p>
23 26
                         <div id="myChartthi" class="thit"></div>
24 27
                     </div>
@@ -1279,7 +1282,16 @@ export default {
1279 1282
                     }
1280 1283
                 })
1281 1284
             }
1282
-        }
1285
+        },
1286
+        leftboxsMore(type) {
1287
+            if(type == 1){
1288
+                this.$router.push({ name: "storageStatusTable" })
1289
+            }else if(type == 2){
1290
+                this.$router.push({ name: "typesOfGrainTable" })
1291
+            }else if(type == 3){
1292
+                this.$router.push({ name: "houseStatusTable" })
1293
+            }
1294
+        },
1283 1295
     }
1284 1296
 }
1285 1297
 </script>
@@ -1594,4 +1606,11 @@ export default {
1594 1606
         }
1595 1607
     }
1596 1608
 }
1609
+.echartSpan {
1610
+    float:right;
1611
+    font-size:14px;
1612
+    margin-top:2px;
1613
+    color:#999999;
1614
+    cursor:pointer
1615
+}
1597 1616
 </style>

+ 96 - 0
shanXiPlatform/src/views/home/storageStatusTable.vue

@@ -0,0 +1,96 @@
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>
26
+        </div>
27
+    </div>
28
+  </div>
29
+</template>
30
+<script>
31
+import { getList } from '@/api/system/earlyWarningManagement'
32
+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();
74
+    },
75
+    pageChange(v) {
76
+      this.listQuery.page = v;
77
+      this.getList();
78
+    },
79
+  }
80
+}
81
+</script>
82
+<style lang="scss" scoped>
83
+.top {
84
+  height: 40px;
85
+  line-height: 40px;
86
+  border-bottom: 1px solid #ccc;
87
+}
88
+.container {
89
+  padding: 10px;
90
+}
91
+.pagination-container {
92
+  margin-top:10px;
93
+  margin-right:20px;
94
+  text-align: right;
95
+}
96
+</style>