manage-client 4.0.46 → 4.0.48

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "4.0.46",
3
+ "version": "4.0.48",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -29,23 +29,37 @@
29
29
  >
30
30
  </datepicker>
31
31
  </div>
32
- <div :class="$parent.$parent.style">
33
- <label class="font_normal_body">小&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</label>
34
- <input type="text" style="width:60%" class="input_search" v-model="model.f_residential_area"
35
- condition1="f_residential_area like '%{}%'" placeholder='小区'>
36
- </div>
32
+ <!-- <div :class="$parent.$parent.style">-->
33
+ <!-- <label class="font_normal_body">区&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;县</label>-->
34
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_zones"-->
35
+ <!-- condition="f_zones like '%{}%'" placeholder='区县'>-->
36
+ <!-- </div>-->
37
+ <!-- <div :class="$parent.$parent.style">-->
38
+ <!-- <label class="font_normal_body">小&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</label>-->
39
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_residential_area"-->
40
+ <!-- condition="f_residential_area like '%{}%'" placeholder='小区'>-->
41
+ <!-- </div>-->
42
+
37
43
  <div :class="$parent.$parent.style">
38
44
  <label class="font_normal_body">区&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;县</label>
39
- <input type="text" style="width:60%" class="input_search" v-model="model.f_pcd"
40
- condition1="f_pcd like '%{}%'" placeholder='区县'>
45
+ <v-select
46
+ :value.sync="model.f_zones" :value-single="true"
47
+ v-model="model.f_zones"
48
+ @change="$parent.$parent.communityChange"
49
+ :options='$parent.$parent.sliceArea' placeholder='请选择'
50
+ condition1="f_zones = '{}'"
51
+ close-on-select search="true"></v-select>
41
52
  </div>
42
- <div :class="$parent.$parent.style">
43
- <label class="font_normal_body">用气性质</label>
44
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties" multiple
45
- :options='$parent.$parent.gasproperties' placeholder='请选择'
46
- condition="f_gasproperties in {}"
47
- close-on-select></v-select>
53
+ <div :class="$parent.$parent.style">
54
+ <label class="font_normal_body">小&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</label>
55
+ <v-select :value.sync="model.f_residential_area"
56
+ v-model="model.f_residential_area"
57
+ :value-single="true"
58
+ :options='$parent.$parent.areaslist' placeholder='请选择'
59
+ condition1="ss.f_residential_area = '{}'"
60
+ close-on-select search="true"></v-select>
48
61
  </div>
62
+
49
63
  <div :class="$parent.$parent.style">
50
64
  <label class="font_normal_body">操作类型</label>
51
65
  <v-select :value.sync="model.f_type" v-model="model.f_type"
@@ -60,13 +74,6 @@
60
74
  condition="f_state in {}"
61
75
  close-on-select></v-select>
62
76
  </div>
63
- <div :class="$parent.$parent.style">
64
- <label class="font_normal_body">用户类型</label>
65
- <v-select :value.sync="model.f_user_type" v-model="model.f_user_type"
66
- :options='$parent.$parent.userTypes' placeholder='请选择'
67
- condition="f_user_type in {}"
68
- close-on-select></v-select>
69
- </div>
70
77
  <div :class="$parent.$parent.style">
71
78
  <label class="font_normal_body">包含APP</label>
72
79
  <v-select :value.sync="model.f_hasapp" v-model="model.f_hasapp"
@@ -85,7 +92,21 @@
85
92
  close-on-select clear-button>
86
93
  </v-select>
87
94
  </div>
88
-
95
+ <div class="col-sm-2 form-group">
96
+ <label class="font_normal_body">客户类型</label>
97
+ <v-select :value.sync="model.f_user_type"
98
+ v-model="model.f_user_type" condition="f_user_type = '{}'"
99
+ @change="$parent.$parent.userTypeChange()"
100
+ :options='$parent.$parent.userTypes' placeholder='请选择'
101
+ close-on-select></v-select>
102
+ </div>
103
+ <div class="col-sm-2 form-group">
104
+ <label class="font_normal_body">用气性质</label>
105
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
106
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
107
+ condition="f_gasproperties = '{}'"
108
+ close-on-select></v-select>
109
+ </div>
89
110
  <div class="button-range" style="float:right;margin-top:10px">
90
111
  <button class="button_search button_spacing" @click="search()">查询</button>
91
112
  <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
@@ -180,8 +201,8 @@
180
201
  <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
181
202
  </nobr> </td>
182
203
  <td style="text-align: left;"><nobr>{{row.f_user_name}}</nobr></td>
183
- <td style="text-align: left;"><nobr>{{row.f_area}}</nobr></td>
184
- <td style="text-align: left;"><nobr>{{row.f_pcd}}</nobr></td>
204
+ <td style="text-align: left;"><nobr>{{row.f_residential_area}}</nobr></td>
205
+ <td style="text-align: left;"><nobr>{{row.f_zones}}</nobr></td>
185
206
  <td style="text-align: center;"><nobr>{{row.f_address}}</nobr></td>
186
207
  <td style="text-align: center;"><nobr>{{row.f_meter_brand}}</nobr></td>
187
208
  <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
@@ -242,7 +263,7 @@
242
263
 
243
264
  <script>
244
265
 
245
- import { PagedList } from 'vue-client'
266
+ import {HttpResetClass, PagedList} from 'vue-client'
246
267
  import exportConfig from './config/exportConfig'
247
268
  import DayReportSummary from "../../components/sale/report/aode/DayReportSummary";
248
269
  import getLodop from '../../plugins/LodopFuncs'
@@ -259,6 +280,12 @@
259
280
  data() {
260
281
  return {
261
282
  orderDefault: "'f_operate_date'",
283
+ gasproperties:[],
284
+ areaslist: [],
285
+ f_filialeids: '',
286
+ //片区
287
+ sliceArea: [],
288
+ slice_area:[],
262
289
  orderFields: {
263
290
  f_userinfo_code: 'no'
264
291
  },
@@ -299,7 +326,6 @@
299
326
  listpage:false,
300
327
  rowdata: {},
301
328
  orgCondtionStr: '',
302
- userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')],
303
329
  count: 0,
304
330
  sumsmodel: {},
305
331
  printshow: false,
@@ -316,9 +342,15 @@
316
342
  this.$refs.paged.$refs.cri.model.f_hasapp = [`!= '悦生活'`]
317
343
  this.$refs.paged.$refs.cri.model.f_startDate = this.$login.toStandardDateString()
318
344
  this.$refs.paged.$refs.cri.model.f_endDate = this.$login.toStandardDateString()
345
+ this.initdata()
319
346
  // this.search()
320
347
  },
321
348
  methods: {
349
+ async initdata(){
350
+ this.f_filialeids = this.orgCondtionStr.match(/'(\d+)'/)
351
+ this.initAreas(this.f_filialeids[1])
352
+ // this.initareas(` f_orgid = '${this.$login.f.orgid}'`)
353
+ },
322
354
  showmsg(obj){
323
355
  this.criteriaShow = false
324
356
  this.$emit('close')
@@ -342,17 +374,19 @@
342
374
  this.model.params.endDate = this.$refs.paged.$refs.cri.model.f_endDate + ' 23:59:59'
343
375
 
344
376
  this.model.params.operatorState = this.$refs.paged.$refs.cri.model.f_type + ''
377
+
345
378
  console.log("========")
346
379
  console.log(this.$refs.paged.$refs.cri.model.f_residential_area)
347
- if(this.$refs.paged.$refs.cri.model.f_residential_area != '' && this.$refs.paged.$refs.cri.model.f_pcd != ''){
348
- this.$refs.paged.model.params.condition1 = `f_residential_area like '%${this.$refs.paged.$refs.cri.model.f_residential_area}%' and f_pcd like '%${this.$refs.paged.$refs.cri.model.f_pcd}%'`
380
+ if(this.$refs.paged.$refs.cri.model.f_residential_area != '' && this.$refs.paged.$refs.cri.model.f_zones != undefined && this.$refs.paged.$refs.cri.model.f_residential_area != undefined && this.$refs.paged.$refs.cri.model.f_zones != ''){
381
+ this.$refs.paged.model.params.condition1 = `ss.f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' and f_zones = '${this.$refs.paged.$refs.cri.model.f_zones}'`
349
382
  }else if (this.$refs.paged.$refs.cri.model.f_residential_area != ''){
350
- this.$refs.paged.model.params.condition1 = `f_residential_area like '%${this.$refs.paged.$refs.cri.model.f_residential_area}%'`
351
- }else if (this.$refs.paged.$refs.cri.model.f_pcd != '') {
352
- this.$refs.paged.model.params.condition1 = `f_pcd like '%${this.$refs.paged.$refs.cri.model.f_pcd}%'`
383
+ this.$refs.paged.model.params.condition1 = `ss.f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}'`
384
+ }else if (this.$refs.paged.$refs.cri.model.f_zones != '') {
385
+ this.$refs.paged.model.params.condition1 = `f_zones = '${this.$refs.paged.$refs.cri.model.f_zones}'`
353
386
  }else {
354
387
  this.$refs.paged.model.params.condition1 = `1=1`
355
388
  }
389
+
356
390
  await this.model.search(args.condition, args.model)
357
391
  this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
358
392
  console.log('计算合计。', this.sumsmodel)
@@ -380,6 +414,16 @@
380
414
  this.$refs.paged.$refs.cri.model.f_startDate = this.$login.toStandardDateString()
381
415
  this.$refs.paged.$refs.cri.model.f_endDate = this.$login.toStandardDateString()
382
416
  },
417
+ userTypeChange () {
418
+ this.gasproperties=[]
419
+ if(this.$refs.paged.$refs.cri.model !==null) {
420
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
421
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
422
+ }
423
+ else{
424
+ this.gasproperties =[{label: '全部', value: ''}]
425
+ }
426
+ },
383
427
  close() {
384
428
  this.printshow = false
385
429
  },
@@ -416,6 +460,92 @@
416
460
 
417
461
  this.search()
418
462
  },
463
+ // 初始化片区
464
+ async initAreas (val) {
465
+ if (val) {
466
+ let http = new HttpResetClass()
467
+ let getAllArea = await http.load('POST', '/rs/search', {
468
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
469
+ userid: this.$login.f.id
470
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
471
+ let arr = getAllArea.data.filter((res) => {
472
+ if(Array.isArray(val)){
473
+ for (let i = 0; i <val.length ; i++) {
474
+ if(res.parentid == val[i]){
475
+ return true
476
+ }
477
+ }
478
+ }
479
+ return res.parentid == val
480
+ })
481
+ this.sliceArea = []
482
+ this.slice_area = []
483
+ arr.forEach((res) => {
484
+ this.sliceArea.push({label: res.name, value: res.name})
485
+ })
486
+ console.log("===============")
487
+ console.log(this.sliceArea)
488
+ }
489
+ },
490
+ //初始化小区添加小区
491
+ async initareas(pconditon){
492
+ console.log(123)
493
+ // if(this.usertype){
494
+ // pconditon=pconditon+` and f_special='1' `
495
+ // }
496
+ this.areaslist = []
497
+ let HttpReset = new HttpResetClass()
498
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/querySingleTable?pageNo=1&pageSize=9999999', {
499
+ data: {
500
+ items: '*',
501
+ tablename: 't_area',
502
+ condition: pconditon
503
+ }
504
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
505
+ let redata = []
506
+ req.data.forEach((row) => {
507
+ redata.push({
508
+ label: row.f_residential_area,
509
+ value: row.f_residential_area,
510
+ data: row,
511
+ id: row.id
512
+ })
513
+ })
514
+ this.areaslist=redata
515
+ console.log('看看modal',this.model)
516
+ console.log('小区', redata)
517
+ },
518
+ async communityChange(val){
519
+ console.log("val")
520
+ console.log(val)
521
+ if(val){
522
+ await this.initareas(` f_orgid = '${this.f_filialeids[1]}' and f_slice_area ='${val}' `)
523
+ if(this.model.f_residential_area_id){
524
+ // if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
525
+ // let pcd_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_community_id
526
+ // if(pcd_id!=val){
527
+ // this.model.f_residential_area_id=''
528
+ // }
529
+ // } else {
530
+ // this.model.f_residential_area_id=''
531
+ // }
532
+
533
+ }
534
+ // if(this.model.f_pcd_id.length==0){
535
+ // if (this.findbyid(this.streetslist,this.model.f_street_id)) {
536
+ // this.model.f_pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
537
+ // }
538
+ // }
539
+ }
540
+ },
541
+ },
542
+ watch: {
543
+ // 监听 `this.$login.f.orgid` 的变化
544
+ 'orgname'() {
545
+ // 检查是否发生了变化
546
+ // 重新初始化数据
547
+ this.initdata();
548
+ }
419
549
  },
420
550
  computed: {
421
551
  getCondition() {
@@ -430,9 +560,6 @@
430
560
  getfield() {
431
561
  return exportConfig.dataReportConfig
432
562
  },
433
- gasproperties() {
434
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用气性质')]
435
- },
436
563
  payments() {
437
564
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')]
438
565
  },
@@ -1644,8 +1644,8 @@ export default {
1644
1644
  dataReportConfig: {
1645
1645
  'f_userinfo_code': '客户编号',
1646
1646
  'f_user_name': '客户姓名',
1647
- 'f_area': '小区',
1648
- 'f_pcd': '区/县',
1647
+ 'f_residential_area': '小区',
1648
+ 'f_zones': '区/县',
1649
1649
  'f_address': '地址',
1650
1650
  'f_meter_brand': '气表厂家',
1651
1651
  'f_meternumber': '表号',
@@ -0,0 +1,143 @@
1
+ <template lang="html">
2
+ <div :class="classname" v-if="jurisdiction.includes('首页')" :style="{width:width,height:height}">
3
+ <div class="form-horizontal select-overspread container-fluid auto">
4
+ <div class="row">
5
+ <div class="col-sm-3 form-group">
6
+ <label class="font_normal_body" for="startDate">开始日期:</label>
7
+ <datepicker id="startDate" placeholder="开始日期"
8
+ style="width:60%"
9
+ v-model="model.startDate"
10
+ :value.sync="model.startDate"
11
+ :disabled-days-of-Week="[]"
12
+ class="datepicker"
13
+ :format="'yyyy-MM-dd'"
14
+ :show-reset-button="reset">
15
+ </datepicker>
16
+ </div>
17
+ <div class="col-sm-3 form-group">
18
+ <label class="font_normal_body" for="endDate">结束日期:</label>
19
+ <datepicker id="endDate" placeholder="结束日期"
20
+ style="width:60%"
21
+ class="datepicker"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :disabled-days-of-Week="[]"
25
+ :format="'yyyy-MM-dd'"
26
+ :show-reset-button="reset">
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-3 form-group">
30
+ <label class="font_normal_body" for="endDate">使用公司:</label>
31
+ <res-select restype='organization'
32
+ @res-select="getRes"
33
+ :initresid="model.id">
34
+ </res-select>
35
+ <button class="button_search button_spacing" @click="changePage()">下一页</button>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div style="height: 97%;" v-if="showPage === 1">
40
+ <div class="flex-row" style="flex: 1;border-bottom: 1px dashed #888;height: 48%">
41
+ <div style="flex: 1;border-right: 1px dashed #888;width: 50%">
42
+ <site-manager :startdate='model.startDate' :enddate='model.endDate' :orgid='model.orgid'
43
+ v-ref:pay></site-manager>
44
+ <!-- <test></test>-->
45
+ </div>
46
+ <div style="flex: 1;width: 50%">
47
+ <bank-manager :startdate='model.startDate' :enddate='model.endDate' :orgid='model.orgid'
48
+ v-ref:pay></bank-manager>
49
+ </div>
50
+ </div>
51
+ <div class="flex-row" style="flex: 1;height: 48%">
52
+
53
+ <div class="flex-row" style="flex: 1;width: 50%;border-right: 1px dashed #888;">
54
+ <div style="flex: 1;">
55
+ <paymentpie :startdate='model.startDate' :enddate='model.endDate' :orgid='model.orgid'
56
+ v-ref:pay></paymentpie>
57
+ </div>
58
+ <!-- <div style="flex: 1;">-->
59
+ <!-- <usertype-pie :startdate='model.startDate' :enddate='model.endDate' :orgid='model.orgid[0]' v-ref:pay ></usertype-pie>-->
60
+ <!-- </div>-->
61
+ </div>
62
+
63
+ <div style="flex: 1;width: 50%">
64
+ <!-- <bussiness-type :startdate='model.startDate' :enddate='model.endDate' :orgid='model.orgid'-->
65
+ <!-- v-ref:pay></bussiness-type>-->
66
+ <user-gas-echarts-list-index :startdate='model.startDate' :enddate='model.endDate' :orgid='model.orgid' v-ref:pay></user-gas-echarts-list-index>
67
+
68
+ </div>
69
+ </div>
70
+ </div>
71
+ <div style="height: 97%;" v-if="showPage === 2">
72
+ <div class="flex-row" style="flex: 1;height: 96%">
73
+ <div style="flex: 1">
74
+ <gas-properties-manager :startdate='model.startDate' :enddate='model.endDate' :orgid='model.orgid'></gas-properties-manager>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ </template>
81
+
82
+ <script>
83
+ import * as Util from '../../Util'
84
+
85
+ export default {
86
+ props: {
87
+ classname: {
88
+ type: String,
89
+ default: 'basic-main'
90
+ },
91
+ width: {
92
+ type: String,
93
+ default: '98.5%'
94
+ },
95
+ height: {
96
+ type: String,
97
+ default: '98%'
98
+ }
99
+ },
100
+ data () {
101
+ return {
102
+ showPage: 1,
103
+ page: [1, 2],
104
+ jurisdiction: this.$login.r,
105
+ model: {
106
+ id: [this.$login.f.orgid],
107
+ orgid: this.$login.f.orgid,
108
+ startDate: Util.toStandardDateString(),
109
+ endDate: Util.toStandardDateString()
110
+ }
111
+ }
112
+ },
113
+ methods: {
114
+ searchdata () {
115
+ this.$refs.pay.searchdata()
116
+ },
117
+ changePage () {
118
+ let curPage = this.page.indexOf(this.showPage)
119
+ if (curPage + 1 === this.page.length) {
120
+ this.showPage = this.page[0]
121
+ } else {
122
+ this.showPage = this.page[curPage + 1]
123
+ }
124
+ },
125
+ getRes (obj) {
126
+ console.log('obj--------',obj)
127
+ let stringValue = ''
128
+ for (var i = 0; i < obj.length; i++) {
129
+ if (i === obj.length - 1) {
130
+ stringValue = stringValue + "'" + obj[i] + "'"
131
+ } else {
132
+ stringValue = stringValue + "'" + obj[i] + "',"
133
+ }
134
+ }
135
+ console.log('stringValue--------',stringValue)
136
+ this.model.orgid = stringValue
137
+ }
138
+ }
139
+ }
140
+ </script>
141
+
142
+ <style lang="css">
143
+ </style>
@@ -42,7 +42,7 @@
42
42
  <button @click="$parent.$parent.clearmsg" class="button_clear button_spacing">清空</button>
43
43
  <export-excel :data="$parent.$parent.getCondition()"
44
44
  :field="$parent.$parent.getfield"
45
- sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="webmeter_getUserGasList" template-name='未用气分析'
45
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="newGasRecordQuery" template-name='未用气分析'
46
46
  v-ref:exports
47
47
  :choose-col="true"></export-excel>
48
48
  <button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()" >显示汇总</button>
@@ -0,0 +1,279 @@
1
+ <template lang="html">
2
+ <div id="charts">
3
+ <div id="userhandplan" :style="{width:'100%',height:'98%'}"></div>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ import * as Util from '../../Util'
9
+ import co from 'co'
10
+ import echarts from 'echarts'
11
+ import { HttpResetClass } from 'vue-client'
12
+
13
+ let getData = function * (self) {
14
+ let load = new HttpResetClass()
15
+ load.load('POST', 'api/af-revenue/sql/webmeter_getNewHandChanceList', {data: {condition: self.condition, startDate: self.startdate, endDate: self.enddate}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
16
+ // eslint-disable-next-line camelcase
17
+ let every_time = res.data.map(x => x.f_insert_date)
18
+ // eslint-disable-next-line camelcase
19
+ let f_bv1 = res.data.map(x => x.f_bv1)
20
+ // eslint-disable-next-line camelcase
21
+ let f_gas1 = res.data.map(x => x.f_gas1)
22
+ let c = res.data.map(x => x.c)
23
+ let c1 = res.data.map(x => x.c1)
24
+ console.log(self.echarts)
25
+ self.set(every_time, f_bv1, f_gas1, c, c1)
26
+ })
27
+ }
28
+ export default {
29
+ props: {
30
+ echarts: {
31
+ type: Boolean,
32
+ default: false
33
+ },
34
+ startdate: {
35
+ type: String,
36
+ default: Util.toStandardDateString()
37
+ },
38
+ enddate: {
39
+ type: String,
40
+ default: Util.toStandardDateString()
41
+ },
42
+ condition: {
43
+ type: String,
44
+ default: '1=1'
45
+ }
46
+ },
47
+ data () {
48
+ return {
49
+ xc: ''
50
+ }
51
+ },
52
+ ready () {
53
+ this.searchdata()
54
+ console.log(this.echarts)
55
+ },
56
+ methods: {
57
+ // every_time: 日期 f_bv1: 抄表成功率 f_gas: 日用气量
58
+ // eslint-disable-next-line camelcase
59
+ set (every_time, f_bv1, f_gas1, c, c1) {
60
+ const statInfo = document.getElementById('userhandplan') // 获取图表元素
61
+ // statInfo.style.width = window.innerWidth - 200 + "px" // 初始化echarts图表宽度
62
+ // statInfo.style.height = window.innerHeight - 200 + "px" // 初始化echarts图表宽度
63
+ this.xc = this.$echarts.init(statInfo)
64
+ // 设置宽度自适应
65
+ window.addEventListener('resize', () => {
66
+ // statInfo.style.width = window.innerWidth - 200 + "px"
67
+ // statInfo.style.height = window.innerHeight - 200 + "px"
68
+ this.xc.resize()
69
+ })
70
+ this.xc.setOption({
71
+ 'title': {
72
+ 'text': '抄表率分析',
73
+ 'left': 'center',
74
+ 'y': '10',
75
+ 'textStyle': {
76
+ 'color': '#696969',
77
+ fontSize: 20
78
+ }
79
+ },
80
+
81
+ 'tooltip': {
82
+ 'trigger': 'axis',
83
+ 'extraCssText': 'height: auto;'
84
+ },
85
+ 'legend': {
86
+ 'data': [
87
+ {
88
+ 'name': '日均用气量(m³)',
89
+ 'icon': 'circle',
90
+ 'textStyle': {
91
+ 'color': '#7b5541',
92
+ fontSize: 12
93
+ }
94
+ },
95
+ {
96
+ 'name': '抄表成功户数',
97
+ 'icon': 'circle',
98
+ 'textStyle': {
99
+ 'color': '#45c1b6',
100
+ fontSize: 12
101
+ }
102
+ },
103
+ {
104
+ 'name': '再用户数',
105
+ 'icon': 'circle',
106
+ 'textStyle': {
107
+ 'color': '#8a9e64',
108
+ fontSize: 12
109
+ }
110
+ },
111
+ {
112
+ 'name': '抄表成功率%',
113
+ 'icon': 'circle',
114
+ 'textStyle': {
115
+ 'color': '#ffaa00',
116
+ fontSize: 12
117
+ }
118
+ }
119
+ ],
120
+ 'top': '10%',
121
+ 'textStyle': {
122
+ 'color': '#fff'
123
+ }
124
+ },
125
+ 'xAxis': [
126
+ {
127
+ 'type': 'category',
128
+ 'data': every_time,
129
+ 'axisPointer': {
130
+ 'type': 'shadow'
131
+ },
132
+ 'axisLabel': {
133
+ 'show': true,
134
+ 'textStyle': {
135
+ 'color': '#7d838b',
136
+ fontSize: 10
137
+ }
138
+ }
139
+ }
140
+ ],
141
+ 'yAxis': [
142
+ {
143
+ 'type': 'value',
144
+ 'name': '用气量(m³)',
145
+ nameTextStyle: {
146
+ fontSize: 10
147
+ },
148
+ 'show': true,
149
+ 'axisLabel': {
150
+ 'show': true,
151
+ 'textStyle': {
152
+ 'color': '#7d8000',
153
+ fontSize: 10
154
+ }
155
+ }
156
+ },
157
+ {
158
+ 'type': 'value',
159
+ 'name': '完成率(%)',
160
+ nameTextStyle: {
161
+ fontSize: 10
162
+ },
163
+ 'show': true,
164
+ 'axisLabel': {
165
+ 'show': true,
166
+ 'textStyle': {
167
+ 'color': '#7d838b',
168
+ fontSize: 10
169
+ }
170
+ }
171
+ }
172
+ ],
173
+ 'grid': {
174
+ 'top': '15%'
175
+ },
176
+ 'series': [
177
+ {
178
+ 'name': '日均用气量(m³)',
179
+ 'type': 'line',
180
+ 'yAxisIndex': 1,
181
+ 'data': f_gas1,
182
+ 'itemStyle': {
183
+ 'normal': {
184
+ 'color': '#7b5541',
185
+ fontSize: 10
186
+ }
187
+ },
188
+ 'smooth': true
189
+ },
190
+ {
191
+ 'name': '抄表成功户数',
192
+ nameTextStyle: {
193
+ fontSize: 10
194
+ },
195
+ 'type': 'bar',
196
+ 'data': c1,
197
+ 'barWidth': 'auto',
198
+ markPoint: {
199
+ data: [
200
+ {type: 'max', name: '最大值'},
201
+ {type: 'min', name: '最小值'}
202
+ ]
203
+ },
204
+ markLine: {
205
+ data: [
206
+ {type: 'average', name: '平均值'}
207
+ ]
208
+ },
209
+ 'itemStyle': {
210
+ 'normal': {
211
+ 'color': '#45c1b6'
212
+ }
213
+ },
214
+ 'barGap': '0'
215
+ },
216
+ {
217
+ 'name': '再用户数',
218
+ nameTextStyle: {
219
+ fontSize: 10
220
+ },
221
+ 'type': 'bar',
222
+ 'data': c,
223
+ 'barWidth': 'auto',
224
+ markPoint: {
225
+ data: [
226
+ {type: 'max', name: '最大值'},
227
+ {type: 'min', name: '最小值'}
228
+ ]
229
+ },
230
+ markLine: {
231
+ data: [
232
+ {type: 'average', name: '平均值'}
233
+ ]
234
+ },
235
+ 'itemStyle': {
236
+ 'normal': {
237
+ 'color': '#8a9e64'
238
+ }
239
+ },
240
+ 'barGap': '0'
241
+ },
242
+ {
243
+ 'name': '抄表成功率%',
244
+ 'type': 'line',
245
+ 'yAxisIndex': 1,
246
+ 'data': f_bv1,
247
+ 'itemStyle': {
248
+ 'normal': {
249
+ 'color': '#ffaa00',
250
+ fontSize: 10
251
+ }
252
+ },
253
+ 'smooth': true
254
+ }
255
+ ]
256
+ })
257
+ },
258
+ searchdata () {
259
+ let getGen = getData(this)
260
+ co(getGen)
261
+ }
262
+ },
263
+ watch: {
264
+ 'echarts' () {
265
+ console.log(this.echarts)
266
+ this.searchdata()
267
+ },
268
+ 'startdate' (val) {
269
+ this.searchdata()
270
+ },
271
+ 'enddate' (val) {
272
+ this.searchdata()
273
+ },
274
+ 'orgid' (val) {
275
+ this.searchdata()
276
+ }
277
+ }
278
+ }
279
+ </script>
@@ -0,0 +1,12 @@
1
+ // 分公司特殊组件页面注册
2
+ import Vue from 'vue'
3
+
4
+ export default function () {
5
+ // 气价分组汇总表
6
+ Vue.component('user-gas-echarts-list-index', (resolve) => {
7
+ require(['./UserGasEchartsListIndex'], resolve)
8
+ })
9
+ Vue.component('echarts-box', (resolve) => {
10
+ require(['./EchartsBox'], resolve)
11
+ })
12
+ }