safecheck-client 3.0.33-35 → 3.0.33-36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,595 +1,595 @@
1
- <template lang="html">
2
- <div class="div-4">
3
- <div :style="{height:headheight,background:'#eaeff4'}">
4
- <div class="div-2">
5
- <div class="form-group">
6
- <label v-show="full_screen" class="control-label">安检类型</label>
7
- <v-select v-show="full_screen" :value.sync="plan_type"
8
- :value-single="true"
9
- :options='plan_types' close-on-select clear-button> </v-select>
10
- <button class="but-1" @click="barrdios" v-show="full_screen"><img src='../../../assets/echarts6.png' class="img-1"/>&nbsp;全屏显示
11
- </button>
12
- <button @click="showall" v-show="show_all" class="but-2">返回</button>
13
- </div>
14
- </div>
15
- </div>
16
- <div v-bind:style="{height: barheight,width:'100%'}">
17
- <div class="flex-row" style="height: 90%;">
18
- <div class="span">
19
- <div class="form-inline" v-if="echartsshow" style="height: auto;margin-bottom: 5%;margin-top: 5%">
20
- <div class="form-group">
21
- <label class="control-label">开始时间</label>
22
- <datepicker
23
- :value.sync="f_start_time"
24
- placeholder='开始时间' style="margin-top: 8px"
25
- :disabled-days-of-week="[]"
26
- :format="'yyyy-MM-dd'"
27
- :show-rest-button="reset"
28
- v-model = "f_start_time"
29
- condition="f_offsite_time > ='{} 00:00:00'">
30
- </datepicker>
31
- </div>
32
- <div class="form-group">
33
- <label class="control-label">结束时间</label>
34
- <datepicker
35
- :value.sync="f_end_time"
36
- placeholder='结束时间' style="margin-top: 8px"
37
- :disabled-days-of-week="[]"
38
- :format="'yyyy-MM-dd'"
39
- :show-rest-button="reset"
40
- v-model = "f_end_time"
41
- condition="f_offsite_time <= '{} 23:59:59'">
42
- </datepicker>
43
- </div>
44
- <!--<div class="form-group">-->
45
- <!--<label class="control-label">安检员</label>-->
46
- <!--<chooser :userid.sync='f.id' resource-type="user" :width='200' :select-data.sync='chosenOrg'></chooser>-->
47
- <!--</div>-->
48
- <div class="form-group">
49
- <label class="control-label">安检类型</label>
50
- <v-select :value.sync="plan_type"
51
- :value-single="true"
52
- :options='plan_types' close-on-select clear-button> </v-select>
53
- </div>
54
- </div>
55
-
56
- <div id="chechersafedetail"></div>
57
- </div>
58
-
59
-
60
-
61
- <!--调用子组件绘图查表-->
62
- <div v-show="echartsshow">
63
- <h4 v-if="plan_type == ''" align="center">安检员居民用户安检工作量统计表</h4>
64
- <h4 v-if="plan_type == 'false'" align="center">安检员居民用户年度安检工作量统计表</h4>
65
- <h4 v-if="plan_type == 'true'" align="center">安检员居民用户首次同期安检工作量统计表</h4>
66
- <criteria-paged :model="model" v-ref:crip >
67
- <data-grid :model="model" partial='list' id="datagridstyle1" v-ref:grid1 classname="table table-bordered table table-hover">
68
- <template partial='head'>
69
- <tr>
70
- <th><nobr>安检员</nobr></th>
71
- <th><nobr>入户</nobr></th>
72
- <th><nobr>入户(在用)</nobr></th>
73
- <th><nobr>入户(未用)</nobr></th>
74
- <th><nobr>到访不遇</nobr></th>
75
- <th><nobr>拒检</nobr></th>
76
- </tr>
77
- </template>
78
- <template partial='body' >
79
- <tr class="tr-1">
80
- <td class="td-1" style="text-align: center;">
81
- {{row.f_checker_name}}
82
- </td>
83
- <td class="td-1" style="text-align: center;">
84
- {{row.rh+row.wsy}}
85
- </td>
86
- <td class="td-1" style="text-align: center;">
87
- {{row.rh}}
88
- </td>
89
- <td class="td-1" style="text-align: center;">
90
- {{row.wsy}}
91
- </td>
92
- <td class="td-1" style="text-align: center;">
93
- {{row.dfby}}
94
- </td>
95
- <td class="td-1" style="text-align: center;">
96
- {{row.jj}}
97
- </td>
98
- </tr>
99
- </template>
100
- <!--<template partial='foot'>-->
101
- <!--<tr>-->
102
- <!--<td colspan="1" style="text-align: right">合计:</td>-->
103
- <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.zongliang}}</nobr></td>-->
104
- <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.rh}}</nobr></td>-->
105
- <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.dfby}}</nobr></td>-->
106
- <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.jj}}</nobr></td>-->
107
- <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.wsy}}</nobr></td>-->
108
- <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.checkrate}}</nobr></td>-->
109
- <!--</tr>-->
110
- <!--</template>-->
111
- </data-grid>
112
- </criteria-paged>
113
- </div>
114
- </div>
115
- </div>
116
- </div>
117
- </template>
118
-
119
- <script>
120
- import * as Util from '../../Util'
121
- import co from 'co'
122
- import echarts from 'echarts'
123
- import {HttpResetClass } from 'vue-client'
124
- import {PagedList} from 'vue-client'
125
-
126
- let getData = function * (self) {
127
- let load = new HttpResetClass()
128
- console.log('getData')
129
- console.log('self.plan_type',self.plan_type)
130
- console.log('self.orgid',self.orgid)
131
- self.set()
132
- load.load('POST','rs/sql/YearCheckerCountRate', {data: {orgid:self.orgid,plan_type:self.plan_type,f_start_time:self.f_start_time,f_end_time:self.f_end_time,f_safecheck_type:self.f_safecheck_type}},
133
- {resolveMsg: null, rejectMsg: null})
134
- .then((res) => {
135
- let checkerArrray = []
136
- let ruhuArray = []
137
- let dfbyArray = []
138
- let jjArray = []
139
- let wsytrqArray = []
140
- // self.count.zongliang = 0
141
- // self.count.rh = 0
142
- // self.count.dfby = 0
143
- // self.count.jj = 0
144
- // self.count.wsy = 0
145
- // self.count.checkrate = '0.00%'
146
- for (var i = 0; i < res.data.length; i++) {
147
- checkerArrray[i] = res.data[i].f_checker_name
148
- ruhuArray[i] = res.data[i].rh
149
- dfbyArray[i] = res.data[i].dfby
150
- jjArray[i] = res.data[i].jj
151
- wsytrqArray[i] = res.data[i].wsytrq
152
- // self.count.rh += res.data[i].rh
153
- // self.count.dfby += res.data[i].dfby
154
- // self.count.jj += res.data[i].jj
155
- // self.count.wsy += res.data[i].wsy
156
- }
157
- // self.count.checkrate = (100*self.count.rh/ self.count.zongliang).toFixed(0)+'%'
158
- //掉绘图
159
- self.set(checkerArrray,ruhuArray,dfbyArray,jjArray,wsytrqArray)
160
- self.settable()
161
- })
162
- }
163
- export default {
164
- title: '安检员安检情况统计',
165
- data () {
166
- let options = []
167
- let ye = (new Date()).getFullYear()
168
- for(let i = ye - 5 ; i <= ye; i++ )
169
- {
170
- options.push({label: i + '', value: i + ''})
171
- }
172
- return {
173
- full_screen: true,//控制全屏按键显示状态
174
- show_all: false,//控制返回按键显示状态
175
- //控制图表的显示状态
176
- echartsshow: false,
177
- detailshows: true,
178
-
179
- //控制图表的style
180
- barheight: '88.37%',
181
- headheight: '11.61%',
182
- styledate: {
183
- echartsheight: '95%',
184
- echartsfloat: 'none',
185
- },
186
- c_year_list: options,
187
- f:this.$login.f,
188
- chosenOrg: {
189
- id: 0
190
- },
191
- count:{
192
- zongliang:0,
193
- rh:0,
194
- dfby:0,
195
- jj:0,
196
- wsy:0,
197
- checkrate:'0.00%',
198
- },
199
- model:new PagedList(),
200
- orgid:`('${this.$login.f.orgid}')`,
201
- //测试
202
- // orgid:'2586252.6314787',
203
- year:(new Date()).getFullYear(),
204
- plan_type:'',
205
- f_safecheck_type:'',
206
- f_start_time:'',
207
- f_end_time:'',
208
- xc: '',
209
- plan_types:[{label:'全部',value:''},{label:'年度安检单',value:'false'},{label:'首次通气单',value:'true'}]
210
- }
211
- },
212
- props:{
213
- f_filialeids:{
214
- type:String
215
- }
216
- },
217
- methods: {
218
- barrdios() {//全屏按键事件
219
- console.log("checker`全屏显示事件")
220
- this.barshow = true
221
- this.detailshows = false
222
- this.echartsshow = true
223
- this.show_all = true
224
- this.full_screen = false
225
- this.buttonshow = true
226
- this.showdetail = false
227
- this.styledate.echartsfloat = 'left'
228
- this.styledate.echartsheight = '65%'
229
- this.echartswidth = '50%'
230
- this.headheight = '8%'
231
- this.$parent.echarts = '5'
232
- this.$emit('echarts-changed')
233
- this.newecharts = true
234
-
235
- console.log(this.$parent.echarts, '主图状态')
236
- },
237
- showall() {//返回按键事件
238
- //修改显示状态
239
- this.barshow = false
240
- this.detailshows = true
241
- this.echartsshow = false
242
- this.buttonshow = false
243
- this.newecharts = false
244
- this.show_all = false
245
- this.full_screen = true
246
- this.showdetail = false
247
- this.styledate.echartsheight = '95%'
248
- this.echartswidth = '95%'
249
- this.$parent.echarts = -1
250
- this.headheight = '11.61%'
251
- this.$emit('echarts-changed', this.echarts)
252
- },
253
- settable() {
254
- this.model= new PagedList('rs/sql/YearCheckerCountRate',20, {year:'this.year',orgid:'this.orgid',plan_type:'this.plan_type',f_start_time:'this.f_start_time',f_end_time:'this.f_end_time',f_safecheck_type: 'this.f_safecheck_type'})
255
- this.model.year = this.year
256
- this.model.orgid = this.orgid
257
- this.model.f_start_time = this.f_start_time
258
- this.model.f_end_time = this.f_end_time
259
- this.model.plan_type = this.plan_type
260
- this.model.f_safecheck_type = this.f_safecheck_type
261
- this.model.search('1=1')
262
- },
263
- set(checkerArrray,ruhuArray,dfbyArray,jjArray,wsytrqArray) {
264
- let serieData = [{ //绘图数据
265
- name: '入户',
266
- type: "bar",
267
- barWidth: '15%',
268
- barGap: "30",
269
- itemStyle: {
270
- normal: {
271
- barBorderRadius: 10,
272
- borderColor: '#acf3ed',
273
- color: '#fff',
274
- label: {
275
- show: true,
276
- textStyle: {
277
- color: "#4a7cae"
278
- },
279
- position: "top",
280
- formatter: function (p) {
281
- return p.value > 0 ? (p.value) : '';
282
- }
283
-
284
- }
285
- }
286
- },
287
- data: ruhuArray,
288
- },
289
- { //绘图数据
290
- name: '到访不遇',
291
- type: "bar",
292
- barWidth: '15%',
293
- barGap: "-30%",
294
- itemStyle: {
295
- normal: {
296
- barBorderRadius: 10,
297
- color: '',
298
- label: {
299
- show: true,
300
- textStyle: {
301
- color: "#fccb05"
302
- },
303
- position: "insideTop",
304
- formatter: function (p) {
305
- return p.value > 0 ? (p.value) : '';
306
- }
307
- }
308
- }
309
- },
310
- data: dfbyArray,
311
- },
312
- { //绘图数据
313
- name: '拒检',
314
- type: "bar",
315
- barWidth: '15%',
316
- barGap: "-30%",
317
- itemStyle: {
318
- normal: {
319
- barBorderRadius: 10,
320
- color: '',
321
- label: {
322
- show: true,
323
- textStyle: {
324
- color: "#fccb05"
325
- },
326
- position: "insideTop",
327
- formatter: function (p) {
328
- return p.value > 0 ? (p.value) : '';
329
- }
330
- }
331
- }
332
- },
333
- data: jjArray,
334
- },
335
- { //绘图数据
336
- name: '未使用天然气',
337
- type: "bar",
338
- barWidth: '15%',
339
- barGap: "-30%",
340
- itemStyle: {
341
- normal: {
342
- barBorderRadius: 10,
343
- color: '',
344
- label: {
345
- show: true,
346
- textStyle: {
347
- color: "#fccb05"
348
- },
349
- position: "insideTop",
350
- formatter: function (p) {
351
- return p.value > 0 ? (p.value) : '';
352
- }
353
- }
354
- }
355
- },
356
- data: wsytrqArray
357
- }]
358
-
359
- this.xc = echarts.init(document.getElementById('chechersafedetail'))
360
- let text = ''
361
- if(this.plan_type == ''){
362
- text = '安检员居民用户安检工作量'
363
- }
364
- if(this.plan_type == 'false'){
365
- text = '安检员居民用户年度安检工作量'
366
- }
367
- if(this.plan_type == 'true'){
368
- text = '安检员居民用户首次通气安检工作量'
369
- }
370
- this.xc.setOption({
371
- title : {
372
- text: text,
373
- x: 'left'
374
- },
375
- color: ['#3398DB'],
376
- tooltip: {
377
- trigger: 'axis',
378
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
379
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
380
- },
381
-
382
- extraCssText: 'width: auto;height: auto;'
383
- },
384
- dataZoom: [{
385
- type: 'inside',
386
- show: true,
387
- startValue: '0',
388
- xAxisIndex: [0],
389
- left: '9%',
390
- bottom: -5,
391
- start: 2,
392
- end: 90 //初始化滚动条
393
- }],
394
- grid: {
395
- left: '10',
396
- right: '10',
397
- bottom: '8',
398
- containLabel: true
399
- },
400
- legend: {
401
- data: ['入户', '到访不遇','拒检','未使用天然气'],
402
- right: 10,
403
- top: 12,
404
- textStyle: {
405
- color: "black"
406
- },
407
- itemWidth: 12,
408
- itemHeight: 10,
409
- // itemGap: 20
410
- },
411
- xAxis: [
412
- {
413
- type: 'category',
414
- name: "安检员",
415
- nameTextStyle: {color: "#6f8ba8"},
416
- axisTick: {
417
- alignWithLabel: true
418
- },
419
- axisLine: {show: true,lineStyle :{color:'#999999'}},
420
- axisLabel: {show: true,interval:0,showMinLabel: true,
421
- showMaxLabel: true, textStyle: {color: "#6f8ba8"}},
422
- data: checkerArrray
423
- }
424
- ],
425
- yAxis: [{
426
- type: "value",
427
- name: "数量",
428
- nameTextStyle: {color: "#6f8ba8"},
429
- splitLine: {show: true,lineStyle:{type:'dashed',color:'#e1e1e1'}},
430
- axisTick: {show: true},
431
- axisLine: {show: true,lineStyle :{color:'#999999'}},
432
- axisLabel: {show: true, textStyle: {color: "#6f8ba8"}}
433
- }],
434
- series: serieData
435
- }, true)
436
- },
437
- searchdata () {
438
- console.log('searchdata')
439
- console.log('this.orgid',this.orgid)
440
- console.log('this.plan_type',this.plan_type)
441
- let getGen =getData(this)
442
- co(getGen)
443
- }
444
- },
445
- ready () {
446
- // this.orgid = `('${this.$login.f.orgid}')`
447
- // this.orgid = this.f_filialeids
448
- //测试
449
- // this.orgid = '2586252.6314787'
450
- // this.plan_type = ''
451
- console.log('checker-safe-detail-ready')
452
- // this.year =(new Date()).getFullYear()
453
-
454
- this.searchdata()
455
- },
456
- watch: {
457
- 'year' (val) {
458
- console.log("我是watch")
459
- this.searchdata()
460
- },
461
- 'plan_type' (val) {
462
- console.log("我是plan_type")
463
- this.f_safecheck_type = ''
464
- if (this.plan_type == 'false') {
465
- this.f_safecheck_type = '年度普检'
466
- }
467
- if (this.plan_type == 'true') {
468
- this.f_safecheck_type = '首次通气'
469
- }
470
- this.searchdata()
471
- },
472
- 'f_filialeids'(){
473
- console.log('safeer改变了')
474
- this.orgid = this.f_filialeids
475
- this.searchdata()
476
- }
477
- }
478
-
479
- }
480
- </script>
481
- <style scoped>
482
- .div-1 {
483
- height: 85%;
484
- width: 10%;
485
- margin-left: 5%;
486
- float: left;
487
- margin-top: 1%;
488
- }
489
-
490
- .div-2 {
491
- float: right;
492
- width: 80%;
493
- height: 55.56%;
494
- margin-right: 1%;
495
- margin-top: 0.5%;
496
- }
497
-
498
- .div-3 {
499
- float: left;
500
- margin-left: 2%;
501
- padding-top: 2%;
502
- width: 96%;
503
- height: 99%;
504
- }
505
-
506
- .div-4 {
507
- background-color: #fafafa;
508
- }
509
-
510
- table {
511
- height: 100%;
512
- width: 100%;
513
- font-size: 12px
514
- }
515
-
516
- tr {
517
- height: 25%;
518
- width: 100%
519
- }
520
-
521
- td {
522
- width: 11%;
523
- font-size: 12px;
524
- color: #666666;
525
- }
526
-
527
- .td-1 {
528
- width: 16%;
529
- color: #90addf;
530
- font-size: 12px
531
- }
532
-
533
- .td-2 {
534
- width: 15%;
535
- color: #90addf;
536
- font-size: 12px
537
- }
538
-
539
- span {
540
- color: #90addf;
541
- font-size: 12px
542
- }
543
-
544
- .span-1 {
545
- color: #999999;
546
- font-size: 12px
547
- }
548
-
549
- .p-1 {
550
- font-size: 15px;
551
- height: 99%;
552
- width: 99%;
553
- font-weight: bold;
554
- color: #333333;
555
- }
556
-
557
- button {
558
- width: 10%;
559
- margin-top: 0%;
560
- margin-left: 2%;
561
- float: right;
562
- background-color: #73ca73;
563
- border-radius: 4px;
564
- border: 1px solid #73ca73;
565
- color: #ffffff;
566
- font-size: 15px;
567
- height: 120%;
568
- }
569
-
570
- .but-1 {
571
- width: 17%;
572
- float: right;
573
- border-radius: 4px;
574
- font-size: 12px;
575
- height: 130%;
576
- }
577
-
578
- .but-2 {
579
- background-color: #88b5e2;
580
- border: #88b5e2;
581
- width: 6%;
582
- }
583
-
584
- img {
585
- width: 5px;
586
- height: 18px;
587
- }
588
-
589
- .img-1 {
590
- height: 12px;
591
- width: auto;
592
- }
593
-
594
- </style>
595
-
1
+ <template lang="html">
2
+ <div class="div-4">
3
+ <div :style="{height:headheight,background:'#eaeff4'}">
4
+ <div class="div-2">
5
+ <div class="form-group">
6
+ <label v-show="full_screen" class="control-label">安检类型</label>
7
+ <v-select v-show="full_screen" :value.sync="plan_type"
8
+ :value-single="true"
9
+ :options='plan_types' close-on-select clear-button> </v-select>
10
+ <button class="but-1" @click="barrdios" v-show="full_screen"><img src='../../../assets/echarts6.png' class="img-1"/>&nbsp;全屏显示
11
+ </button>
12
+ <button @click="showall" v-show="show_all" class="but-2">返回</button>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <div v-bind:style="{height: barheight,width:'100%'}">
17
+ <div class="flex-row" style="height: 90%;">
18
+ <div class="span">
19
+ <div class="form-inline" v-if="echartsshow" style="height: auto;margin-bottom: 5%;margin-top: 5%">
20
+ <div class="form-group">
21
+ <label class="control-label">开始时间</label>
22
+ <datepicker
23
+ :value.sync="f_start_time"
24
+ placeholder='开始时间' style="margin-top: 8px"
25
+ :disabled-days-of-week="[]"
26
+ :format="'yyyy-MM-dd'"
27
+ :show-rest-button="reset"
28
+ v-model = "f_start_time"
29
+ condition="f_offsite_time > ='{} 00:00:00'">
30
+ </datepicker>
31
+ </div>
32
+ <div class="form-group">
33
+ <label class="control-label">结束时间</label>
34
+ <datepicker
35
+ :value.sync="f_end_time"
36
+ placeholder='结束时间' style="margin-top: 8px"
37
+ :disabled-days-of-week="[]"
38
+ :format="'yyyy-MM-dd'"
39
+ :show-rest-button="reset"
40
+ v-model = "f_end_time"
41
+ condition="f_offsite_time <= '{} 23:59:59'">
42
+ </datepicker>
43
+ </div>
44
+ <!--<div class="form-group">-->
45
+ <!--<label class="control-label">安检员</label>-->
46
+ <!--<chooser :userid.sync='f.id' resource-type="user" :width='200' :select-data.sync='chosenOrg'></chooser>-->
47
+ <!--</div>-->
48
+ <div class="form-group">
49
+ <label class="control-label">安检类型</label>
50
+ <v-select :value.sync="plan_type"
51
+ :value-single="true"
52
+ :options='plan_types' close-on-select clear-button> </v-select>
53
+ </div>
54
+ </div>
55
+
56
+ <div id="chechersafedetail"></div>
57
+ </div>
58
+
59
+
60
+
61
+ <!--调用子组件绘图查表-->
62
+ <div v-show="echartsshow">
63
+ <h4 v-if="plan_type == ''" align="center">安检员居民用户安检工作量统计表</h4>
64
+ <h4 v-if="plan_type == 'false'" align="center">安检员居民用户年度安检工作量统计表</h4>
65
+ <h4 v-if="plan_type == 'true'" align="center">安检员居民用户首次同期安检工作量统计表</h4>
66
+ <criteria-paged :model="model" v-ref:crip >
67
+ <data-grid :model="model" partial='list' id="datagridstyle1" v-ref:grid1 classname="table table-bordered table table-hover">
68
+ <template partial='head'>
69
+ <tr>
70
+ <th><nobr>安检员</nobr></th>
71
+ <th><nobr>入户</nobr></th>
72
+ <th><nobr>入户(在用)</nobr></th>
73
+ <th><nobr>入户(未用)</nobr></th>
74
+ <th><nobr>到访不遇</nobr></th>
75
+ <th><nobr>拒检</nobr></th>
76
+ </tr>
77
+ </template>
78
+ <template partial='body' >
79
+ <tr class="tr-1">
80
+ <td class="td-1" style="text-align: center;">
81
+ {{row.f_checker_name}}
82
+ </td>
83
+ <td class="td-1" style="text-align: center;">
84
+ {{row.rh+row.wsy}}
85
+ </td>
86
+ <td class="td-1" style="text-align: center;">
87
+ {{row.rh}}
88
+ </td>
89
+ <td class="td-1" style="text-align: center;">
90
+ {{row.wsy}}
91
+ </td>
92
+ <td class="td-1" style="text-align: center;">
93
+ {{row.dfby}}
94
+ </td>
95
+ <td class="td-1" style="text-align: center;">
96
+ {{row.jj}}
97
+ </td>
98
+ </tr>
99
+ </template>
100
+ <!--<template partial='foot'>-->
101
+ <!--<tr>-->
102
+ <!--<td colspan="1" style="text-align: right">合计:</td>-->
103
+ <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.zongliang}}</nobr></td>-->
104
+ <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.rh}}</nobr></td>-->
105
+ <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.dfby}}</nobr></td>-->
106
+ <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.jj}}</nobr></td>-->
107
+ <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.wsy}}</nobr></td>-->
108
+ <!--<td style="text-align: center"><nobr>{{$parent.$parent.$parent.count.checkrate}}</nobr></td>-->
109
+ <!--</tr>-->
110
+ <!--</template>-->
111
+ </data-grid>
112
+ </criteria-paged>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </template>
118
+
119
+ <script>
120
+ import * as Util from '../../Util'
121
+ import co from 'co'
122
+ import echarts from 'echarts'
123
+ import {HttpResetClass } from 'vue-client'
124
+ import {PagedList} from 'vue-client'
125
+
126
+ let getData = function * (self) {
127
+ let load = new HttpResetClass()
128
+ console.log('getData')
129
+ console.log('self.plan_type',self.plan_type)
130
+ console.log('self.orgid',self.orgid)
131
+ self.set()
132
+ load.load('POST','rs/sql/YearCheckerCountRate', {data: {orgid:self.orgid,plan_type:self.plan_type,f_start_time:self.f_start_time,f_end_time:self.f_end_time,f_safecheck_type:self.f_safecheck_type}},
133
+ {resolveMsg: null, rejectMsg: null})
134
+ .then((res) => {
135
+ let checkerArrray = []
136
+ let ruhuArray = []
137
+ let dfbyArray = []
138
+ let jjArray = []
139
+ let wsytrqArray = []
140
+ // self.count.zongliang = 0
141
+ // self.count.rh = 0
142
+ // self.count.dfby = 0
143
+ // self.count.jj = 0
144
+ // self.count.wsy = 0
145
+ // self.count.checkrate = '0.00%'
146
+ for (var i = 0; i < res.data.length; i++) {
147
+ checkerArrray[i] = res.data[i].f_checker_name
148
+ ruhuArray[i] = res.data[i].rh
149
+ dfbyArray[i] = res.data[i].dfby
150
+ jjArray[i] = res.data[i].jj
151
+ wsytrqArray[i] = res.data[i].wsytrq
152
+ // self.count.rh += res.data[i].rh
153
+ // self.count.dfby += res.data[i].dfby
154
+ // self.count.jj += res.data[i].jj
155
+ // self.count.wsy += res.data[i].wsy
156
+ }
157
+ // self.count.checkrate = (100*self.count.rh/ self.count.zongliang).toFixed(0)+'%'
158
+ //掉绘图
159
+ self.set(checkerArrray,ruhuArray,dfbyArray,jjArray,wsytrqArray)
160
+ self.settable()
161
+ })
162
+ }
163
+ export default {
164
+ title: '安检员安检情况统计',
165
+ data () {
166
+ let options = []
167
+ let ye = (new Date()).getFullYear()
168
+ for(let i = ye - 5 ; i <= ye; i++ )
169
+ {
170
+ options.push({label: i + '', value: i + ''})
171
+ }
172
+ return {
173
+ full_screen: true,//控制全屏按键显示状态
174
+ show_all: false,//控制返回按键显示状态
175
+ //控制图表的显示状态
176
+ echartsshow: false,
177
+ detailshows: true,
178
+
179
+ //控制图表的style
180
+ barheight: '88.37%',
181
+ headheight: '11.61%',
182
+ styledate: {
183
+ echartsheight: '95%',
184
+ echartsfloat: 'none',
185
+ },
186
+ c_year_list: options,
187
+ f:this.$login.f,
188
+ chosenOrg: {
189
+ id: 0
190
+ },
191
+ count:{
192
+ zongliang:0,
193
+ rh:0,
194
+ dfby:0,
195
+ jj:0,
196
+ wsy:0,
197
+ checkrate:'0.00%',
198
+ },
199
+ model:new PagedList(),
200
+ orgid:`('${this.$login.f.orgid}')`,
201
+ //测试
202
+ // orgid:'2586252.6314787',
203
+ year:(new Date()).getFullYear(),
204
+ plan_type:'',
205
+ f_safecheck_type:'',
206
+ f_start_time:'',
207
+ f_end_time:'',
208
+ xc: '',
209
+ plan_types:[{label:'全部',value:''},{label:'年度安检单',value:'false'},{label:'首次通气单',value:'true'}]
210
+ }
211
+ },
212
+ props:{
213
+ f_filialeids:{
214
+ type:String
215
+ }
216
+ },
217
+ methods: {
218
+ barrdios() {//全屏按键事件
219
+ console.log("checker`全屏显示事件")
220
+ this.barshow = true
221
+ this.detailshows = false
222
+ this.echartsshow = true
223
+ this.show_all = true
224
+ this.full_screen = false
225
+ this.buttonshow = true
226
+ this.showdetail = false
227
+ this.styledate.echartsfloat = 'left'
228
+ this.styledate.echartsheight = '65%'
229
+ this.echartswidth = '50%'
230
+ this.headheight = '8%'
231
+ this.$parent.echarts = '5'
232
+ this.$emit('echarts-changed')
233
+ this.newecharts = true
234
+
235
+ console.log(this.$parent.echarts, '主图状态')
236
+ },
237
+ showall() {//返回按键事件
238
+ //修改显示状态
239
+ this.barshow = false
240
+ this.detailshows = true
241
+ this.echartsshow = false
242
+ this.buttonshow = false
243
+ this.newecharts = false
244
+ this.show_all = false
245
+ this.full_screen = true
246
+ this.showdetail = false
247
+ this.styledate.echartsheight = '95%'
248
+ this.echartswidth = '95%'
249
+ this.$parent.echarts = -1
250
+ this.headheight = '11.61%'
251
+ this.$emit('echarts-changed', this.echarts)
252
+ },
253
+ settable() {
254
+ this.model= new PagedList('rs/sql/YearCheckerCountRate',20, {year:'this.year',orgid:'this.orgid',plan_type:'this.plan_type',f_start_time:'this.f_start_time',f_end_time:'this.f_end_time',f_safecheck_type: 'this.f_safecheck_type'})
255
+ this.model.year = this.year
256
+ this.model.orgid = this.orgid
257
+ this.model.f_start_time = this.f_start_time
258
+ this.model.f_end_time = this.f_end_time
259
+ this.model.plan_type = this.plan_type
260
+ this.model.f_safecheck_type = this.f_safecheck_type
261
+ this.model.search('1=1')
262
+ },
263
+ set(checkerArrray,ruhuArray,dfbyArray,jjArray,wsytrqArray) {
264
+ let serieData = [{ //绘图数据
265
+ name: '入户',
266
+ type: "bar",
267
+ barWidth: '15%',
268
+ barGap: "30",
269
+ itemStyle: {
270
+ normal: {
271
+ barBorderRadius: 10,
272
+ borderColor: '#acf3ed',
273
+ color: '#fff',
274
+ label: {
275
+ show: true,
276
+ textStyle: {
277
+ color: "#4a7cae"
278
+ },
279
+ position: "top",
280
+ formatter: function (p) {
281
+ return p.value > 0 ? (p.value) : '';
282
+ }
283
+
284
+ }
285
+ }
286
+ },
287
+ data: ruhuArray,
288
+ },
289
+ { //绘图数据
290
+ name: '到访不遇',
291
+ type: "bar",
292
+ barWidth: '15%',
293
+ barGap: "-30%",
294
+ itemStyle: {
295
+ normal: {
296
+ barBorderRadius: 10,
297
+ color: '',
298
+ label: {
299
+ show: true,
300
+ textStyle: {
301
+ color: "#fccb05"
302
+ },
303
+ position: "insideTop",
304
+ formatter: function (p) {
305
+ return p.value > 0 ? (p.value) : '';
306
+ }
307
+ }
308
+ }
309
+ },
310
+ data: dfbyArray,
311
+ },
312
+ { //绘图数据
313
+ name: '拒检',
314
+ type: "bar",
315
+ barWidth: '15%',
316
+ barGap: "-30%",
317
+ itemStyle: {
318
+ normal: {
319
+ barBorderRadius: 10,
320
+ color: '',
321
+ label: {
322
+ show: true,
323
+ textStyle: {
324
+ color: "#fccb05"
325
+ },
326
+ position: "insideTop",
327
+ formatter: function (p) {
328
+ return p.value > 0 ? (p.value) : '';
329
+ }
330
+ }
331
+ }
332
+ },
333
+ data: jjArray,
334
+ },
335
+ { //绘图数据
336
+ name: '未使用天然气',
337
+ type: "bar",
338
+ barWidth: '15%',
339
+ barGap: "-30%",
340
+ itemStyle: {
341
+ normal: {
342
+ barBorderRadius: 10,
343
+ color: '',
344
+ label: {
345
+ show: true,
346
+ textStyle: {
347
+ color: "#fccb05"
348
+ },
349
+ position: "insideTop",
350
+ formatter: function (p) {
351
+ return p.value > 0 ? (p.value) : '';
352
+ }
353
+ }
354
+ }
355
+ },
356
+ data: wsytrqArray
357
+ }]
358
+
359
+ this.xc = echarts.init(document.getElementById('chechersafedetail'))
360
+ let text = ''
361
+ if(this.plan_type == ''){
362
+ text = '安检员居民用户安检工作量'
363
+ }
364
+ if(this.plan_type == 'false'){
365
+ text = '安检员居民用户年度安检工作量'
366
+ }
367
+ if(this.plan_type == 'true'){
368
+ text = '安检员居民用户首次通气安检工作量'
369
+ }
370
+ this.xc.setOption({
371
+ title : {
372
+ text: text,
373
+ x: 'left'
374
+ },
375
+ color: ['#3398DB'],
376
+ tooltip: {
377
+ trigger: 'axis',
378
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
379
+ type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
380
+ },
381
+
382
+ extraCssText: 'width: auto;height: auto;'
383
+ },
384
+ dataZoom: [{
385
+ type: 'inside',
386
+ show: true,
387
+ startValue: '0',
388
+ xAxisIndex: [0],
389
+ left: '9%',
390
+ bottom: -5,
391
+ start: 2,
392
+ end: 90 //初始化滚动条
393
+ }],
394
+ grid: {
395
+ left: '10',
396
+ right: '10',
397
+ bottom: '8',
398
+ containLabel: true
399
+ },
400
+ legend: {
401
+ data: ['入户', '到访不遇','拒检','未使用天然气'],
402
+ right: 10,
403
+ top: 12,
404
+ textStyle: {
405
+ color: "black"
406
+ },
407
+ itemWidth: 12,
408
+ itemHeight: 10,
409
+ // itemGap: 20
410
+ },
411
+ xAxis: [
412
+ {
413
+ type: 'category',
414
+ name: "安检员",
415
+ nameTextStyle: {color: "#6f8ba8"},
416
+ axisTick: {
417
+ alignWithLabel: true
418
+ },
419
+ axisLine: {show: true,lineStyle :{color:'#999999'}},
420
+ axisLabel: {show: true,interval:0,showMinLabel: true,
421
+ showMaxLabel: true, textStyle: {color: "#6f8ba8"}},
422
+ data: checkerArrray
423
+ }
424
+ ],
425
+ yAxis: [{
426
+ type: "value",
427
+ name: "数量",
428
+ nameTextStyle: {color: "#6f8ba8"},
429
+ splitLine: {show: true,lineStyle:{type:'dashed',color:'#e1e1e1'}},
430
+ axisTick: {show: true},
431
+ axisLine: {show: true,lineStyle :{color:'#999999'}},
432
+ axisLabel: {show: true, textStyle: {color: "#6f8ba8"}}
433
+ }],
434
+ series: serieData
435
+ }, true)
436
+ },
437
+ searchdata () {
438
+ console.log('searchdata')
439
+ console.log('this.orgid',this.orgid)
440
+ console.log('this.plan_type',this.plan_type)
441
+ let getGen =getData(this)
442
+ co(getGen)
443
+ }
444
+ },
445
+ ready () {
446
+ // this.orgid = `('${this.$login.f.orgid}')`
447
+ // this.orgid = this.f_filialeids
448
+ //测试
449
+ // this.orgid = '2586252.6314787'
450
+ // this.plan_type = ''
451
+ console.log('checker-safe-detail-ready')
452
+ // this.year =(new Date()).getFullYear()
453
+
454
+ this.searchdata()
455
+ },
456
+ watch: {
457
+ 'year' (val) {
458
+ console.log("我是watch")
459
+ this.searchdata()
460
+ },
461
+ 'plan_type' (val) {
462
+ console.log("我是plan_type")
463
+ this.f_safecheck_type = ''
464
+ if (this.plan_type == 'false') {
465
+ this.f_safecheck_type = '年度普检'
466
+ }
467
+ if (this.plan_type == 'true') {
468
+ this.f_safecheck_type = '首次通气'
469
+ }
470
+ this.searchdata()
471
+ },
472
+ 'f_filialeids'(){
473
+ console.log('safeer改变了')
474
+ this.orgid = this.f_filialeids
475
+ this.searchdata()
476
+ }
477
+ }
478
+
479
+ }
480
+ </script>
481
+ <style scoped>
482
+ .div-1 {
483
+ height: 85%;
484
+ width: 10%;
485
+ margin-left: 5%;
486
+ float: left;
487
+ margin-top: 1%;
488
+ }
489
+
490
+ .div-2 {
491
+ float: right;
492
+ width: 80%;
493
+ height: 55.56%;
494
+ margin-right: 1%;
495
+ margin-top: 0.5%;
496
+ }
497
+
498
+ .div-3 {
499
+ float: left;
500
+ margin-left: 2%;
501
+ padding-top: 2%;
502
+ width: 96%;
503
+ height: 99%;
504
+ }
505
+
506
+ .div-4 {
507
+ background-color: #fafafa;
508
+ }
509
+
510
+ table {
511
+ height: 100%;
512
+ width: 100%;
513
+ font-size: 12px
514
+ }
515
+
516
+ tr {
517
+ height: 25%;
518
+ width: 100%
519
+ }
520
+
521
+ td {
522
+ width: 11%;
523
+ font-size: 12px;
524
+ color: #666666;
525
+ }
526
+
527
+ .td-1 {
528
+ width: 16%;
529
+ color: #90addf;
530
+ font-size: 12px
531
+ }
532
+
533
+ .td-2 {
534
+ width: 15%;
535
+ color: #90addf;
536
+ font-size: 12px
537
+ }
538
+
539
+ span {
540
+ color: #90addf;
541
+ font-size: 12px
542
+ }
543
+
544
+ .span-1 {
545
+ color: #999999;
546
+ font-size: 12px
547
+ }
548
+
549
+ .p-1 {
550
+ font-size: 15px;
551
+ height: 99%;
552
+ width: 99%;
553
+ font-weight: bold;
554
+ color: #333333;
555
+ }
556
+
557
+ button {
558
+ width: 10%;
559
+ margin-top: 0%;
560
+ margin-left: 2%;
561
+ float: right;
562
+ background-color: #73ca73;
563
+ border-radius: 4px;
564
+ border: 1px solid #73ca73;
565
+ color: #ffffff;
566
+ font-size: 15px;
567
+ height: 120%;
568
+ }
569
+
570
+ .but-1 {
571
+ width: 17%;
572
+ float: right;
573
+ border-radius: 4px;
574
+ font-size: 12px;
575
+ height: 130%;
576
+ }
577
+
578
+ .but-2 {
579
+ background-color: #88b5e2;
580
+ border: #88b5e2;
581
+ width: 6%;
582
+ }
583
+
584
+ img {
585
+ width: 5px;
586
+ height: 18px;
587
+ }
588
+
589
+ .img-1 {
590
+ height: 12px;
591
+ width: auto;
592
+ }
593
+
594
+ </style>
595
+