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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
| <template>
| <basic-container
| :class="[
| 'witerFontColorInput',
| $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
| $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
| ]"
| >
| <avue-crud
| class="tablesss rowClick"
| :option="tableOption"
| :table-loading="loading"
| :data="tableData"
| :page.sync="page"
| :permission="permissionList"
| ref="crud"
| :search.sync="search"
| @search-change="searchChange"
| @search-reset="searchReset"
| @current-change="currentChange"
| @size-change="sizeChange"
| @refresh-change="refreshChange"
| @on-load="onLoad"
| @cell-click="handleRowClick"
| >
| <template slot="menuLeft">
| <el-button
| type="warning"
| size="small"
| plain
| icon="el-icon-download"
| @click="handleExportSecurityStatisInfo"
| >导出
| </el-button>
| </template>
| </avue-crud>
| <el-dialog
| class="tongji-class"
| :title="dialogTitle"
| width="80%"
| append-to-body
| :visible.sync="dialogShow"
| v-if="dialogShow"
| >
| <companyDetails :fwdeptId="fwdeptId"></companyDetails>
| </el-dialog>
| </basic-container>
| </template>
| <script>
| import { mapGetters } from "vuex";
| import {
| selectLi,
| dictionaryList
| } from "@/api/statisticalQueryManagement/statisticalQueryManagement";
| import companyDetails from "./companyDetails";
| import Qs from "qs";
| import { getToken } from "@/util/auth";
| export default {
| name: "业务情况统计",
| components: {
| companyDetails
| },
| data() {
| return {
| page: {
| pageSize: 10,
| currentPage: 1,
| total: 0,
| ...this.$store.state.control.changePageSize
| },
| search: {},
| query: {},
| value1: "",
| value2: "",
| tableData: [],
| tableOption: {
| align: "center",
| viewBtn: true,
| delBtn: false,
| editBtn: false,
| addBtn: false,
| selection: true,
| menu: false,
| height: "auto",
| menuWidth: 380,
| calcHeight: 30,
| tip: false,
| searchShowBtn: false,
| searchShow: true,
| searchMenuSpan: 6,
| index: true,
| indexLabel: "序号",
| dialogClickModal: false,
| ...this.$store.state.control.clearOtherBut,
| column: [
| {
| label: "公司名称",
| prop: "deptname",
| search: true,
| searchSpan: 4,
| width: 280,
| display: false
| },
| {
| label: "单位类型",
| prop: "stats",
| search: true,
| searchSpan: 4,
| display: false,
| type: "select",
| props: {
| label: "dictValue",
| value: "dictKey"
| },
| dicData: []
| },
| {
| label: "所属辖区",
| prop: "jurname",
| type: "tree",
| props: {
| label: "title",
| value: "value"
| },
| dicData: [],
| rules: [
| {
| required: true,
| message: "请选择所属辖区",
| trigger: "blur"
| }
| ]
| },
| {
| label: "所属辖区",
| prop: "jurisdiction",
| search: true,
| searchSpan: 4,
| type: "tree",
| dicUrl: "/api/jurisdiction/lazy-tree",
| props: {
| label: "title",
| value: "id"
| },
| hide: true,
| checkStrictly: true,
| slot: true,
| rules: [
| {
| required: false,
| message: "请选择所属辖区",
| trigger: "click"
| }
| ]
| },
| {
| label: "单位注册时间",
| prop: "releaseTimeRange",
| type: "date",
| format: "yyyy-MM-dd",
| valueFormat: "yyyy-MM-dd",
| searchRange: true,
| searchSpan: 6,
| searchLabelWidth: 120,
| labelWidth: 160,
| hide: true,
| addDisplay: false,
| editDisplay: false,
| viewDisplay: false,
| search: true,
| rules: [
| {
| required: true,
| message: "请选择单位注册时间",
| trigger: "blur"
| }
| ]
| },
| {
| label: "保安员总数",
| prop: "num",
| display: false
| },
| {
| label: "持证上岗人数",
| prop: "cznum",
| display: false
| },
| {
| label: "未派遣人数",
| prop: "wpqnum",
| display: false
| },
| {
| label: "派遣人数",
| prop: "pqnum",
| display: false
| },
| {
| label: "已采集照片人数",
| prop: "ycjzpnum",
| display: false
| },
| {
| label: "未采集照片人数",
| prop: "wcjzpnum",
| display: false
| },
| {
| label: "已采集指纹人数",
| prop: "ycjzwnum",
| display: false
| },
| {
| label: "资格审查异常人数",
| width: 150,
| prop: "scycnum",
| display: false
| },
| {
| label: "缴纳社保人数",
| prop: "jnsbnum",
| display: false
| }
| ]
| },
| companyName: "",
| loading: true,
| dialogShow: false,
| dialogTitle: ""
| };
| },
| computed: {
| ...mapGetters(["permission"]),
| permissionList() {
| return {
| addBtn: this.vaildData(null, false),
| viewBtn: this.vaildData(null, false),
| delBtn: this.vaildData(null, false),
| editBtn: this.vaildData(null, false)
| };
| }
| },
| methods: {
| //保安员统计信息导出
| handleExportSecurityStatisInfo() {
| this.$confirm("是否导出保安员统计信息数据?", "提示", {
| confirmButtonText: "确定",
| cancelButtonText: "取消",
| type: "warning"
| }).then(() => {
| //获取查询条件
| const { releaseTimeRange } = this.search;
| if (releaseTimeRange) {
| this.search["startTime"] = releaseTimeRange[0];
| this.search["endTime"] = releaseTimeRange[1];
| }
| var data = {
| jurisdiction: this.search.jurisdiction,
| stats: this.search.stats,
| deptid: this.search.deptname,
| startTime: this.search.startTime,
| endTime: this.search.endTime
| };
| // console.log(data,123);
| //序列号url形式,用&拼接
| data = Qs.stringify(data);
| window.open(
| `/api/information/export-security-statis-info?${
| this.website.tokenHeader
| }=${getToken()}&` + data
| );
| });
| },
| getDictionaryList() {
| dictionaryList().then(res => {
| if (res.data.code === 200) {
| this.tableOption.column.forEach(item => {
| if (item.label == "单位类型") {
| item.dicData = res.data.data;
| }
| });
| }
| });
| },
| searchChange(params, done) {
| this.query = params;
| this.page.currentPage = 1;
| this.onLoad(this.page, params);
| done();
| },
|
| searchReset() {
| this.query = {};
| this.onLoad(this.page);
| },
| currentChange(currentPage) {
| this.page.currentPage = currentPage;
| this.onLoad(this.page, this.query);
| },
| sizeChange(pageSize) {
| this.page.pageSize = pageSize;
| this.onLoad(this.page, this.query);
| },
| refreshChange() {
| this.onLoad(this.page, this.query);
| },
| onLoad(page, params = {}) {
| params = this.search;
| this.loading = true;
| let param = {};
| param["jurisdiction"] = params["jurisdiction"] || "";
| param["deptid"] = params["deptname"] || "";
| param["stats"] = params["stats"] || "";
| param["current"] = page.currentPage;
| param["size"] = page.pageSize;
| const { releaseTimeRange } = this.query;
| let values = {
| ...param
| };
| if (releaseTimeRange) {
| values = {
| ...param,
| startTime: releaseTimeRange[0],
| endTime: releaseTimeRange[1],
| ...this.query
| };
| values.releaseTimeRange = null;
| }
| selectLi(values).then(res => {
| const data = res.data.data;
| this.page.total = data.total;
| this.tableData = data.records;
| this.$store.commit("setWindowSizeHeightAdd");
| this.loading = false;
| });
| },
| handleRowClick(row, column, cell, event) {
| if (column.label == "保安员总数") {
| this.dialogTitle = "保安员明细";
| this.fwdeptId = row.departmentid;
| this.dialogShow = true;
| } else {
| this.dialogShow = false;
| }
| }
| },
| mounted() {
| this.getDictionaryList();
| this.$store.commit("setWindowSizeHeightAdd");
| }
| };
| </script>
| <style lang="scss" scoped>
| /deep/ .rowClick .el-table__row:hover td:nth-child(6) {
| cursor: pointer;
| }
| </style>
|
|