Browse Source

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

GaoYuPeng 3 years ago
parent
commit
ccb56f2e06

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

@@ -29,6 +29,7 @@ export function  getpointll(homeType , depotId) {
29 29
     method: 'get'
30 30
   })
31 31
 }
32
+//异常粮情省图的table
32 33
 export function  getyclq( data  ) {
33 34
   return request({              
34 35
     url: `/csc-szls-business/grainConditionRecord/authority/getGrainErrorCount`,
@@ -36,6 +37,15 @@ export function  getyclq( data  ) {
36 37
     data : data
37 38
   })
38 39
 }
40
+//异常粮情库图的table
41
+export function  getyclqk( data  ) {
42
+  return request({              
43
+    url: `/csc-szls-business/grainConditionRecord/authority/getGrainErrorHouseList`,
44
+    method: 'post',
45
+    data : data
46
+  })
47
+}
48
+
39 49
 //异常粮情折线图
40 50
 export function  getzxt( depotId) {
41 51
   return request({

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

@@ -42,6 +42,7 @@
42 42
       <span class="myspan">当前所在位置: 首页></span>
43 43
       <span class="myspan" v-if="this.$store.state.isshowLibrary && this.$route.query.midprovinceName == '山西省'">山西省></span>
44 44
       <span class="myspan" v-if="this.$store.state.isshowLibrary && this.$route.query.midprovinceName == ''">{{this.$store.state.depotName}}></span>
45
+      <span class="myspan" v-if="this.$store.state.isshowLibrary && this.$route.query.midprovinceName != '' && this.$route.query.midprovinceName != '山西省'">{{this.$route.query.midprovinceName}}></span>
45 46
       <breadcrumb id="breadcrumb-container" style="height:54px;line-height:54px; " class="breadcrumb-container" />
46 47
     </div>
47 48
     <app-main></app-main>

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

@@ -372,6 +372,14 @@ export const constantRoutes = [
372 372
         meta: { title: '异常粮情', icon: 'dashboard',isshowLibrary:true, affix: true },
373 373
       },
374 374
       {
375
+        path: 'cnyclqtable',
376
+        component: () => import('@/views/home/cnyclqtable'),
377
+        name: 'cnyclqtable',
378
+        hidden: true,
379
+        meta: { title: '粮情检查', icon: 'dashboard',isshowLibrary:true, affix: true },
380
+      },
381
+      
382
+      {
375 383
         path: 'gzjftable',
376 384
         component: () => import('@/views/home/gzjftable'),
377 385
         name: 'gzjftable',

+ 1 - 1
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/facilitiesTabs.vue

@@ -10,7 +10,7 @@
10 10
           label="全部设施检查记录"
11 11
           name="AllFacilities"
12 12
         ></el-tab-pane>
13
-        <el-tab-pane label="设施维修改造" name="Maintenance"></el-tab-pane>
13
+        <!-- <el-tab-pane label="设施维修改造" name="Maintenance"></el-tab-pane> -->
14 14
       </el-tabs>
15 15
         <div id="main">
16 16
 

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

@@ -1295,14 +1295,25 @@ export default {
1295 1295
             }
1296 1296
         },
1297 1297
         yclq() {
1298
-            this.$router.push({
1299
-                name: "yclqTable",
1300
-                query: {
1301
-                    depotId: this.midprovinceid,
1302
-                    midprovinceName: this.midprovinceName,
1303
-                    isshow: this.isxian
1304
-                }
1305
-            })
1298
+            if (this.homeType == '1') {
1299
+                this.$router.push({
1300
+                    name: "yclqTable",
1301
+                    query: {
1302
+                        depotId: this.midprovinceid,
1303
+                        midprovinceName: this.midprovinceName,
1304
+                        isshow: this.isxian
1305
+                    }
1306
+                })
1307
+            }else if(this.homeType == '2'){
1308
+                 this.$router.push({
1309
+                    name: "cnyclqtable",
1310
+                    query: {
1311
+                        depotId: this.midprovinceid,
1312
+                        midprovinceName: this.midprovinceName,
1313
+                        // isshow: this.isxian
1314
+                    }
1315
+                })
1316
+            }
1306 1317
         },
1307 1318
         gzjf() {
1308 1319
             this.$router.push({
@@ -1321,7 +1332,7 @@ export default {
1321 1332
                     midprovinceName: this.midprovinceName
1322 1333
                 }
1323 1334
             })
1324
-        },
1335
+        }
1325 1336
     }
1326 1337
 }
1327 1338
 </script>

+ 206 - 0
shanXiPlatform/src/views/home/cnyclqtable.vue

@@ -0,0 +1,206 @@
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 property="depotName" label="时间" align="center">
17
+                        <template slot-scope="scope">
18
+                            {{ scope.row.yearJoinWeek}}
19
+                        </template>
20
+                    </el-table-column>
21
+                    <el-table-column property="depotName" label="仓房" align="center">
22
+                        <template slot-scope="scope">
23
+                            <span style="color:green;" @click="houseclick(scope.$index, scope.row)"> {{ hourseDic[scope.row.houseId] }}</span>
24
+                        </template>
25
+                    </el-table-column>
26
+                    <el-table-column property="depotName" label="所属公司" align="center">
27
+                        <template slot-scope="scope">
28
+                            {{ depotDic[scope.row.depotId] }}
29
+                        </template>
30
+                    </el-table-column>
31
+                    <el-table-column label="粮情异常情况" align="center">
32
+                        <template slot-scope="scope">
33
+                            <p style="height:45px;line-height:45px;margin:0;padding-top:7px;">
34
+                                <span class='colorspano' v-if="scope.row.grainError != '191'"></span>
35
+                                <span class='colorspant' v-if="scope.row.grainError == '191'"></span>
36
+                            </p>
37
+                        </template>
38
+                    </el-table-column>
39
+                    <el-table-column property="operation" label="操作" align="center">
40
+                        <template slot-scope="scope">
41
+                            <el-button size="mini" type="detailbtn" @click="detailbtn(scope.$index, scope.row )">详情</el-button>
42
+                        </template>
43
+                    </el-table-column>
44
+                </el-table>
45
+                <div class="pagination-container">
46
+                    <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>
47
+                </div>
48
+            </div>
49
+        </div>
50
+    </div>
51
+</template>
52
+<script>
53
+import { getcf } from "@/api/organizationalStructureManagement/index.js"
54
+import { getyclqk } from "@/api/branchoff/index.js"
55
+export default {
56
+    data() {
57
+        return {
58
+            datetime: "",
59
+            // 列表数据
60
+            tableList: [],
61
+            // 分页
62
+            total: 0,
63
+            listLoading: true,
64
+            listQuery: {
65
+                page: 1,
66
+                limit: 10
67
+            },
68
+            roleList: [],
69
+            depotDic: [],
70
+            checkYear: "",
71
+            checkYearWeek: "",
72
+            condition: {}
73
+        }
74
+    },
75
+    created() {
76
+        this.condition = {
77
+            depotId: this.$route.query.depotId
78
+        }
79
+        this.getList()
80
+        this.depotDic = JSON.parse(localStorage.getItem("deportDic"))
81
+        this.hourseDic = JSON.parse(localStorage.getItem("hourseDic"))
82
+    },
83
+    methods: {
84
+        houseclick(index, row) {
85
+            this.$store.commit({
86
+                type: "changeDepotId",
87
+                depotId: row.depotId
88
+            })
89
+            this.$store.commit({
90
+                type: "changeHouseId",
91
+                houseId: row.houseId
92
+            })
93
+            this.$store.commit({
94
+                type: "changeHouseName",
95
+                houseName: this.hourseDic[row.houseId]
96
+            })
97
+            this.$store.commit({
98
+                type: "changeDepotName",
99
+                depotName: this.depotDic[row.depotId]
100
+            })
101
+            this.$router.push("/countQuality/warehouseInformation")
102
+        },
103
+        timechange() {
104
+            this.$nextTick(() => {
105
+                let week = document.querySelector("#getWeek").value
106
+                if (week == "") {
107
+                    this.condition = {
108
+                        depotId: this.$route.query.depotId
109
+                    }
110
+                    return
111
+                }
112
+                console.log(week, "weekweek")
113
+                this.checkYear = week.slice(0, 4)
114
+                this.checkYearWeek = week.slice(5, 7)
115
+                this.condition = {
116
+                    depotId: this.$route.query.depotId,
117
+                    checkYear: this.checkYear,
118
+                    checkYearWeek: this.checkYearWeek
119
+                }
120
+            })
121
+        },
122
+        getList() {
123
+            var condition = JSON.stringify(this.condition)
124
+            let data = {
125
+                condition: condition,
126
+                pageIndex: this.listQuery.page,
127
+                pageSize: this.listQuery.limit
128
+            }
129
+            getyclqk(data)
130
+                .then(res => {
131
+                    if (res.code == 200) {
132
+                        this.tableList = res.data.records
133
+                        this.listQuery.limit = res.data.size
134
+                        this.total = res.data.total
135
+                    } else {
136
+                        this.$message({
137
+                            type: "error",
138
+                            message: res.msg
139
+                        })
140
+                    }
141
+                })
142
+                .catch(err => {
143
+                    console.log(err)
144
+                })
145
+        },
146
+        sizeChange(v) {
147
+            this.listQuery.limit = v
148
+            this.getList()
149
+        },
150
+        pageChange(v) {
151
+            this.listQuery.page = v
152
+            this.getList()
153
+        },
154
+        detailbtn(index, row) {
155
+            this.$store.commit({
156
+                type: "changeDepotId",
157
+                depotId: row.depotId
158
+            })
159
+            this.$store.commit({
160
+                type: "changeHouseId",
161
+                houseId: row.houseId
162
+            })
163
+            this.$store.commit({
164
+                type: "changeHouseName",
165
+                houseName: this.hourseDic[row.houseId]
166
+            })
167
+            this.$store.commit({
168
+                type: "changeDepotName",
169
+                depotName: this.depotDic[row.depotId]
170
+            })
171
+            this.$router.push({
172
+                name: "AllGrain"
173
+            })
174
+        }
175
+    }
176
+}
177
+</script>
178
+<style lang="scss" scoped>
179
+.top {
180
+    height: 40px;
181
+    line-height: 40px;
182
+    border-bottom: 1px solid #ccc;
183
+}
184
+.container {
185
+    padding: 10px;
186
+}
187
+.pagination-container {
188
+    margin-top: 10px;
189
+    margin-right: 20px;
190
+    text-align: right;
191
+}
192
+.colorspano {
193
+    width: 140px;
194
+    height: 30px;
195
+    background-color: #199856;
196
+    display: inline-block;
197
+    border-radius: 5px;
198
+}
199
+.colorspant {
200
+    width: 140px;
201
+    height: 30px;
202
+    background-color: #ffff00;
203
+    display: inline-block;
204
+    border-radius: 5px;
205
+}
206
+</style>

+ 28 - 30
shanXiPlatform/src/views/home/yclqtable.vue

@@ -13,32 +13,18 @@
13 13
                     </el-form-item>
14 14
                 </el-form>
15 15
                 <el-table border :data="tableList" highlight-current-row style="width:100%" :header-cell-style="{background:'#f8f8f8'}">
16
-                    <!-- <el-table-column prop="operationTime" label="时间" align="center" /> -->
17 16
                     <el-table-column property="depotName" label="时间" align="center">
18 17
                         <template slot-scope="scope">
19
-                            {{ scope.row.checkYear }}年 {{ scope.row.checkYearWeek}}周
18
+                            {{ scope.row.yearJoinWeek}}
20 19
                         </template>
21 20
                     </el-table-column>
22
-                    <el-table-column v-if="this.$route.query.isshow" property="depotName" label="仓房" align="center">
21
+                    <el-table-column property="depotName" label="公司" align="center">
23 22
                         <template slot-scope="scope">
24
-                            <span style="color:green;" > {{ scope.row.depotId }}</span>
23
+                            {{ depotDic[scope.row.depotId] }}
25 24
                         </template>
26 25
                     </el-table-column>
27
-                    <el-table-column  property="depotName" label="公司" align="center">
28
-                        <template slot-scope="scope" >
29
-                             {{ depotDic[scope.row.depotId] }} 
30
-                        </template>
31
-                    </el-table-column>
32
-                    <el-table-column v-if="this.$route.query.isshow" label="粮情异常情况" align="center">
33
-                        <template slot-scope="scope">
34
-                            <p style="height:45px;line-height:45px;margin:0;padding-top:7px;">
35
-                                <span class='colorspano' v-if="scope.row.grainError == '191'"></span>
36
-                                <span class='colorspant' v-if="scope.row.grainError != '191'"></span>
37
-                            </p>
38
-                        </template>
39
-                    </el-table-column>
40
-                    <el-table-column v-if="!this.$route.query.isshow" prop="grainVarieties" label="仓房数量(个)" align="center" />
41
-                    <el-table-column v-if="!this.$route.query.isshow" prop="warehouseStatus" label="粮情异常仓房数量(个)" align="center" />
26
+                    <el-table-column  prop="houseCount" label="仓房数量(个)" align="center" />
27
+                    <el-table-column  prop="grainErrorCount" label="粮情异常仓房数量(个)" align="center" />
42 28
                     <el-table-column property="operation" label="操作" align="center">
43 29
                         <template slot-scope="scope">
44 30
                             <el-button size="mini" type="detailbtn" @click="detailbtn(scope.$index, scope.row)">详情</el-button>
@@ -69,10 +55,16 @@ export default {
69 55
                 limit: 10
70 56
             },
71 57
             roleList: [],
72
-            depotDic: []
58
+            depotDic: [],
59
+            checkYear: "",
60
+            checkYearWeek: "",
61
+            condition: {}
73 62
         }
74 63
     },
75 64
     created() {
65
+        this.condition = {
66
+            depotId: this.$route.query.depotId
67
+        }
76 68
         this.getList()
77 69
         this.depotDic = JSON.parse(localStorage.getItem("deportDic"))
78 70
     },
@@ -80,18 +72,24 @@ export default {
80 72
         timechange() {
81 73
             this.$nextTick(() => {
82 74
                 let week = document.querySelector("#getWeek").value
75
+                if (week == "") {
76
+                    this.condition = {
77
+                        depotId: this.$route.query.depotId
78
+                    }
79
+                    return
80
+                }
81
+                console.log(week, "weekweek")
83 82
                 this.checkYear = week.slice(0, 4)
84 83
                 this.checkYearWeek = week.slice(5, 7)
84
+                this.condition = {
85
+                    depotId: this.$route.query.depotId,
86
+                    checkYear: this.checkYear,
87
+                    checkYearWeek: this.checkYearWeek
88
+                }
85 89
             })
86 90
         },
87 91
         getList() {
88
-            var condition = {
89
-                // depotId: this.$store.state.depotId,
90
-                depotId: this.$route.query.depotId,
91
-                checkYear: this.checkYear,
92
-                checkYearWeek: this.checkYearWeek
93
-            }
94
-            condition = JSON.stringify(condition)
92
+            var condition = JSON.stringify(this.condition)
95 93
             let data = {
96 94
                 condition: condition,
97 95
                 pageIndex: this.listQuery.page,
@@ -124,10 +122,10 @@ export default {
124 122
         },
125 123
         detailbtn(index, row) {
126 124
             this.$router.push({
127
-                name: "AllGrain",
125
+                name: "cnyclqtable",
128 126
                 query: {
129
-                    // depotId: row.depotId,
130
-                    // midprovinceName: this.$route.query.midprovinceName
127
+                    depotId: row.depotId,
128
+                    midprovinceName: this.depotDic[row.depotId]
131 129
                 }
132 130
             })
133 131
         }