|
|
@@ -1,100 +1,170 @@
|
|
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"> </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>
|
|
|
2
|
+ <div class="global">
|
|
|
3
|
+ <div class="contentContainerGg">
|
|
|
4
|
+ <div class="container">
|
|
|
5
|
+ <el-table
|
|
|
6
|
+ border
|
|
|
7
|
+ :data="tableList"
|
|
|
8
|
+ highlight-current-row
|
|
|
9
|
+ style="width:100%"
|
|
|
10
|
+ :header-cell-style="{ background: '#f8f8f8' }"
|
|
|
11
|
+ >
|
|
|
12
|
+ <el-table-column
|
|
|
13
|
+ type="index"
|
|
|
14
|
+ align="center"
|
|
|
15
|
+ label="序号"
|
|
|
16
|
+ width="50px"
|
|
|
17
|
+ >
|
|
|
18
|
+ </el-table-column>
|
|
|
19
|
+ <el-table-column prop="hname" label="仓房" align="center">
|
|
|
20
|
+ </el-table-column>
|
|
|
21
|
+ <el-table-column property="depotName" label="所属公司" align="center">
|
|
|
22
|
+ <template slot-scope="scope">
|
|
|
23
|
+ {{ depotDic[scope.row.depotId] }}
|
|
|
24
|
+ </template>
|
|
|
25
|
+ </el-table-column>
|
|
|
26
|
+ <el-table-column
|
|
|
27
|
+ prop="storageStatus"
|
|
|
28
|
+ label="储存状态(个)"
|
|
|
29
|
+ align="center"
|
|
|
30
|
+ >
|
|
|
31
|
+ <template slot-scope="scope">
|
|
|
32
|
+ <p v-for="item in storageOption" :key="item.enumId">
|
|
|
33
|
+ <span v-if="scope.row.storageStatus == item.enumId">{{
|
|
|
34
|
+ item.enumName
|
|
|
35
|
+ }}</span>
|
|
|
36
|
+ </p>
|
|
|
37
|
+ </template>
|
|
|
38
|
+ </el-table-column>
|
|
|
39
|
+ <el-table-column
|
|
|
40
|
+ prop="grainVarieties"
|
|
|
41
|
+ label="粮食种类(个)"
|
|
|
42
|
+ align="center"
|
|
|
43
|
+ >
|
|
|
44
|
+ <template slot-scope="scope">
|
|
|
45
|
+ <p v-for="item in barnOption" :key="item.enumId">
|
|
|
46
|
+ <span v-if="scope.row.grainVarieties == item.enumId">{{
|
|
|
47
|
+ item.enumName
|
|
|
48
|
+ }}</span>
|
|
|
49
|
+ </p>
|
|
|
50
|
+ </template>
|
|
|
51
|
+ </el-table-column>
|
|
|
52
|
+ <el-table-column
|
|
|
53
|
+ prop="warehouseStatus"
|
|
|
54
|
+ label="仓房状态(个)"
|
|
|
55
|
+ align="center"
|
|
|
56
|
+ >
|
|
|
57
|
+ <template slot-scope="scope">
|
|
|
58
|
+ <p v-for="item in warehouseOption" :key="item.enumId">
|
|
|
59
|
+ <span v-if="scope.row.warehouseStatus == item.enumId">{{
|
|
|
60
|
+ item.enumName
|
|
|
61
|
+ }}</span>
|
|
|
62
|
+ </p>
|
|
|
63
|
+ </template>
|
|
|
64
|
+ </el-table-column>
|
|
|
65
|
+ </el-table>
|
|
|
66
|
+ <div class="pagination-container">
|
|
|
67
|
+ <el-pagination
|
|
|
68
|
+ class="right"
|
|
|
69
|
+ background
|
|
|
70
|
+ :current-page.sync="listQuery.page"
|
|
|
71
|
+ :page-size="listQuery.limit"
|
|
|
72
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
73
|
+ :total="total"
|
|
|
74
|
+ @size-change="sizeChange"
|
|
|
75
|
+ @current-change="pageChange"
|
|
|
76
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
77
|
+ ></el-pagination>
|
|
21
|
78
|
</div>
|
|
|
79
|
+ </div>
|
|
22
|
80
|
</div>
|
|
|
81
|
+ </div>
|
|
23
|
82
|
</template>
|
|
24
|
83
|
<script>
|
|
25
|
84
|
import { getcf } from "@/api/organizationalStructureManagement/index.js"
|
|
26
|
85
|
// import { getList } from '@/api/system/earlyWarningManagement'
|
|
27
|
86
|
export default {
|
|
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
|
|
- }
|
|
|
87
|
+ data() {
|
|
|
88
|
+ return {
|
|
|
89
|
+ // 列表数据
|
|
|
90
|
+ tableList: [],
|
|
|
91
|
+ // 分页
|
|
|
92
|
+ total: 0,
|
|
|
93
|
+ listLoading: true,
|
|
|
94
|
+ listQuery: {
|
|
|
95
|
+ page: 1,
|
|
|
96
|
+ limit: 10
|
|
|
97
|
+ },
|
|
|
98
|
+ roleList: [],
|
|
|
99
|
+ depotDic: [],
|
|
|
100
|
+ basicOption: [], //仓房状态字典表
|
|
|
101
|
+ barnOption: [], // 粮食种类
|
|
|
102
|
+ storageOption: [], //储存状态
|
|
|
103
|
+ warehouseOption: [] //仓房状态
|
|
|
104
|
+ }
|
|
|
105
|
+ },
|
|
|
106
|
+ created() {
|
|
|
107
|
+ this.getList()
|
|
|
108
|
+ this.depotDic = JSON.parse(localStorage.getItem("deportDic"))
|
|
|
109
|
+ },
|
|
|
110
|
+ mounted() {
|
|
|
111
|
+ this.basicOption = JSON.parse(localStorage.getItem("basicOption"))
|
|
|
112
|
+ // console.log(this.basicOption,'basicOption......')
|
|
|
113
|
+ this.barnOption = this.basicOption.parentMap[2]
|
|
|
114
|
+ this.storageOption = this.basicOption.parentMap[3]
|
|
|
115
|
+ this.warehouseOption = this.basicOption.parentMap[4]
|
|
|
116
|
+ },
|
|
|
117
|
+ methods: {
|
|
|
118
|
+ getList() {
|
|
|
119
|
+ var condition = {
|
|
|
120
|
+ depotId: this.$store.state.depotId
|
|
|
121
|
+ }
|
|
|
122
|
+ condition = JSON.stringify(condition)
|
|
|
123
|
+ let data = {
|
|
|
124
|
+ condition: condition,
|
|
|
125
|
+ pageIndex: this.listQuery.page,
|
|
|
126
|
+ pageSize: this.listQuery.limit
|
|
|
127
|
+ }
|
|
|
128
|
+ getcf(data)
|
|
|
129
|
+ .then(res => {
|
|
|
130
|
+ if (res.code == 200) {
|
|
|
131
|
+ this.tableList = res.data.records
|
|
|
132
|
+ this.listQuery.limit = res.data.size
|
|
|
133
|
+ this.total = res.data.total
|
|
|
134
|
+ } else {
|
|
|
135
|
+ this.$message({
|
|
|
136
|
+ type: "error",
|
|
|
137
|
+ message: res.msg
|
|
|
138
|
+ })
|
|
|
139
|
+ }
|
|
|
140
|
+ })
|
|
|
141
|
+ .catch(err => {
|
|
|
142
|
+ console.log(err)
|
|
|
143
|
+ })
|
|
42
|
144
|
},
|
|
43
|
|
- created() {
|
|
44
|
|
- this.getList()
|
|
45
|
|
- this.depotDic = JSON.parse(localStorage.getItem("deportDic"))
|
|
|
145
|
+ sizeChange(v) {
|
|
|
146
|
+ this.listQuery.limit = v
|
|
|
147
|
+ this.getList()
|
|
46
|
148
|
},
|
|
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
|
|
- }
|
|
|
149
|
+ pageChange(v) {
|
|
|
150
|
+ this.listQuery.page = v
|
|
|
151
|
+ this.getList()
|
|
83
|
152
|
}
|
|
|
153
|
+ }
|
|
84
|
154
|
}
|
|
85
|
155
|
</script>
|
|
86
|
156
|
<style lang="scss" scoped>
|
|
87
|
157
|
.top {
|
|
88
|
|
- height: 40px;
|
|
89
|
|
- line-height: 40px;
|
|
90
|
|
- border-bottom: 1px solid #ccc;
|
|
|
158
|
+ height: 40px;
|
|
|
159
|
+ line-height: 40px;
|
|
|
160
|
+ border-bottom: 1px solid #ccc;
|
|
91
|
161
|
}
|
|
92
|
162
|
.container {
|
|
93
|
|
- padding: 10px;
|
|
|
163
|
+ padding: 10px;
|
|
94
|
164
|
}
|
|
95
|
165
|
.pagination-container {
|
|
96
|
|
- margin-top: 10px;
|
|
97
|
|
- margin-right: 20px;
|
|
98
|
|
- text-align: right;
|
|
|
166
|
+ margin-top: 10px;
|
|
|
167
|
+ margin-right: 20px;
|
|
|
168
|
+ text-align: right;
|
|
99
|
169
|
}
|
|
100
|
170
|
</style>
|