manage-client 3.2.75 → 3.2.78

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.
Files changed (71) hide show
  1. package/.babelrc +5 -5
  2. package/.classpath +6 -6
  3. package/.editorconfig +9 -9
  4. package/.gradle/4.4/fileContent/fileContent.lock +0 -0
  5. package/.gradle/4.4/fileHashes/fileHashes.bin +0 -0
  6. package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
  7. package/.gradle/4.4/taskHistory/taskHistory.bin +0 -0
  8. package/.gradle/4.4/taskHistory/taskHistory.lock +0 -0
  9. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  10. package/.project +18 -18
  11. package/README.md +38 -38
  12. package/build/dev-server.js +2 -2
  13. package/build/libs/ManageClient-3.1.0-17.jar +0 -0
  14. package/build/tmp/jar/MANIFEST.MF +2 -0
  15. package/config/dev.env.js +6 -6
  16. package/config/prod.env.js +3 -3
  17. package/config/test.env.js +6 -6
  18. package/package.json +2 -2
  19. package/release.bat +5 -5
  20. package/src/components/MeterManage/ChangeMeterQuery.vue +82 -82
  21. package/src/components/MeterManage/HandQuery.vue +72 -72
  22. package/src/components/MeterManage/ReversalQuery.vue +77 -77
  23. package/src/components/SellReport/GaspriceHas.vue +141 -141
  24. package/src/components/SellReport/ManageBusSummary.vue +224 -224
  25. package/src/components/WebReport/AbnormalInfoEcharts.vue +120 -120
  26. package/src/components/WebReport/Communication.vue +131 -131
  27. package/src/components/WebReport/CompanyUser.vue +79 -79
  28. package/src/components/WebReport/GaspriceHas.vue +141 -141
  29. package/src/components/WebReport/ReportWorklist.vue +220 -220
  30. package/src/components/WebReport/SellType.vue +89 -89
  31. package/src/components/WebReport/Telemanlist.vue +221 -221
  32. package/src/components/WebReport/UserGasEcharts.vue +107 -107
  33. package/src/components/WebReport/ValueEcharts.vue +99 -99
  34. package/src/components/sale/businessquery/ChargeQuery.vue +1277 -1276
  35. package/src/components/sale/businessquery/overDueQuery.vue +12 -0
  36. package/src/components/sale/config/DefaultPrint.js +6 -6
  37. package/src/components/sale/config/exportConfig.js +925 -925
  38. package/src/components/sale/filesquery/detail/oper/ChangeMessage.vue +46 -46
  39. package/src/components/sale/filesquery/detail/oper/HandOper.vue +46 -46
  40. package/src/components/sale/filesquery/detail/oper/HandleMessage.vue +46 -46
  41. package/src/components/webmeter/gasAnalysis/GasAnalysisEcharts.vue +144 -144
  42. package/src/components/webmeter/gasAnalysis/GasAnalysisSummary.vue +162 -162
  43. package/src/components/webmeter/instruction/NewQueryInstruct.vue +446 -446
  44. package/src/components/webmeter/newwebmeter/NewException/NewExceptionEform.vue +149 -149
  45. package/src/filiale/macheng/FxGasTable.vue +236 -0
  46. package/src/filiale/macheng/ManageBusSummary.vue +224 -0
  47. package/src/filiale/macheng/ManageDayGas.vue +248 -0
  48. package/src/filiale/macheng/ManageHandSellMoney.vue +249 -0
  49. package/src/filiale/macheng/ManageMonthGas.vue +250 -0
  50. package/src/filiale/macheng/ManageOtherCharge.vue +251 -0
  51. package/src/filiale/macheng/ManageSellType.vue +287 -0
  52. package/src/filiale/macheng/RecordInfoQuery.vue +2 -2
  53. package/src/filiale/macheng/SellingTable.vue +219 -0
  54. package/src/filiale/macheng/UserBalanceReport.vue +178 -0
  55. package/src/filiale/macheng/config/exportConfig.js +67 -67
  56. package/src/filiale/macheng/reportManage.js +19 -0
  57. package/src/filiale/macheng/sale.js +11 -11
  58. package/src/main.js +2 -2
  59. package/src/plugins/LodopFuncs.js +124 -124
  60. package/src/stores/GetParames.js +15 -15
  61. package/src/stores/Util.js +132 -132
  62. package/test/unit/.eslintrc +5 -5
  63. package/test/unit/TestUtil.js +35 -35
  64. package/test/unit/context.html +20 -20
  65. package/test/unit/index.js +13 -13
  66. package/test/unit/init.js +11 -11
  67. package/test/unit/karma.conf.js +45 -45
  68. package/test/unit/specs/components/CallReport/Repair.spec.js +25 -25
  69. package/test/unit/specs/components/ManageBusiness/EquipmentQuery.spec.js +21 -21
  70. package/test/unit/specs/components/ManageBusiness/TableWithQuery.spec.js +21 -21
  71. package/test/unit/specs/components/ManageBusiness/UserQuery.spec.js +21 -21
@@ -1,221 +1,221 @@
1
- <template>
2
- <div id='app' >
3
- <criteria-paged :model="model" :pager='false' v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='search' v-ref:criteria>
5
- <div novalidate class="form-inline auto " partial >
6
- <p class="bg-info text-center" style="padding: 8px;">话务员考核报表</p>
7
- <div class="flex-row auto" style="justify-content: space-between">
8
- <div class="form-group" >
9
- <label for="startDate">开始日期:</label>
10
- <datepicker id="startDate" placeholder="开始日期"
11
- v-model="model.startDate"
12
- :value.sync="model.startDate"
13
- :disabled-days-of-Week="[]"
14
- :format="'yyyy-MM-dd'"
15
- :show-reset-button="reset">
16
- </datepicker>
17
- <label for="endDate">结束日期:</label>
18
- <datepicker id="endDate" placeholder="结束日期"
19
- v-model="model.endDate"
20
- :value.sync="model.endDate"
21
- :disabled-days-of-Week="[]"
22
- :format="'yyyy-MM-dd'"
23
- :show-reset-button="reset">
24
- </datepicker>
25
- <label for="outlets" class="control-label">营业网点</label>
26
- <v-select :value.sync="model.outlets" v-model="model.outlets"
27
- @change='$parent.$parent.outletsChange'
28
- default-value="['']"
29
- :options='$parent.$parent.outlets' placeholder='营业网点'
30
- close-on-select></v-select>
31
- <button class="btn btn-success width-100" @click="search()">查询</button>
32
- <button class="btn btn-success width-100" @click="$parent.$parent.confirmReport()">保存报表</button>
33
- </div>
34
- <span></span>
35
- <div class="form-group">
36
- <report-print id='bussummary' top='1cm' left='2cm' width='100%' height='100%'></report-print>
37
- <report-excel id='bussummary' ></report-excel>
38
- </div>
39
- </div>
40
- </div>
41
- </criteria>
42
- <div partial='list' v-el:handcollect id='bussummary'>
43
- <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
44
- <thead>
45
- <tr>
46
- <th colspan='12' style="font-weight: normal; text-align: left;">
47
- <h3 style="text-align: center">话务员考核报表</h3>
48
- </th>
49
- </tr>
50
- <tr>
51
- <th colspan='12' style="font-weight: normal; text-align: center;">
52
- 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
53
- 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;&nbsp;
54
- 营业网点:{{model.model.outlets}}&nbsp;
55
- </th>
56
- </tr>
57
- </thead>
58
- <tr>
59
- <td colspan='12'>
60
- {{{ model.data.substring(26,model.data.length-8) }}}
61
- </td>
62
- </tr>
63
- </table>
64
- {{{ $parent.reportStr }}}
65
- </div>
66
- <!-- <div partial='list' v-el:handcollect v-if="data.f_files_path">
67
-
68
- </div> -->
69
- </criteria-paged>
70
-
71
- <modal :show.sync="show" v-ref:modal small backdrop="false">
72
- <header slot="modal-header" class="modal-header">
73
- <h4 class="modal-title">输入文件名称</h4>
74
- </header>
75
- <article slot="modal-body" class="modal-body">
76
- <div class="form-group">
77
- <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
78
- </div>
79
- </article>
80
- <footer slot="modal-footer" class="modal-footer">
81
- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
82
- <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
83
- </footer>
84
- </modal>
85
-
86
- </div>
87
- </template>
88
-
89
- <script>
90
- import { DataModel, HttpResetClass } from 'vue-client'
91
- import * as Util from '../../Util'
92
- import AppData from '../../stores/AppData'
93
- import co from 'co'
94
-
95
- let outletGen = function * (self) {
96
- let http = new HttpResetClass()
97
- let outlets = yield http.load('POST', '/rs/search', {source: 'tool.getChildrenOfResName($话务员考核报表$)', userid: ''}, {resolveMsg: null, rejectMsg: null})
98
- outlets.data.forEach((item, next) => {
99
- let temp = {}
100
- temp.label = item.name
101
- temp.value = item.name
102
- self.outlets.push(temp)
103
- })
104
- self.outlets = [{label: '全部', value: ''}, ...self.outlets]
105
- }
106
- let operatorGen = function * (self, val) {
107
- if (val[0] === '') {
108
- self.operator = [{label: '全部', value: ''}]
109
- // self.$refs.paged.$refs.criteria.model.operator[0] = ''
110
- console.log('11111114444444', self.$refs.paged.$refs.criteria)
111
- } else {
112
- let operators = yield self.$resetpost('/rs/search', {source: `tool.getChildrenOfResName($${val}$)`, userid: ''}, {resolveMsg: null, rejectMsg: null})
113
- operators.data.forEach((item, next) => {
114
- let temp = {}
115
- temp.label = item.name
116
- temp.value = item.name
117
- self.operator.push(temp)
118
- })
119
- self.operator = [{label: '全部', value: ''}, ...self.operator]
120
- }
121
- self.$set('$refs.paged.$refs.criteria.model.operator[0]', '')
122
- }
123
-
124
- let saveFile = function * (self) {
125
- // 线验证文件是否重名
126
- let count = yield self.$resetpost('rs/sql/manageSingleTable',
127
- {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
128
- {resolveMsg: null, rejectMsg: null})
129
- if (count.data.length > 0) {
130
- self.$showAlert('无法保存,文件名重名', 'warning', 3000)
131
- return
132
- }
133
- let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
134
- f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'bus-summary',
135
- f_operator: Util.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
136
- f_outlets: Util.f.f_parentname})
137
-
138
- if (saveBack.data.status === 'succeed') {
139
- self.show = false
140
- self.filename = ''
141
- // 后台保存完成,通知刷新
142
- self.$dispatch('save-success', self.filename)
143
- }
144
- }
145
-
146
-
147
- export default {
148
- title: '话务员考核报表',
149
- props: ['data'],
150
- data () {
151
- return {
152
- model: new DataModel('rs/report/operator', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
153
- outlets: 'this.model.outlets[0]'}),
154
- reportStr: null,
155
- show: false,
156
- outlets: [],
157
- filename: ''
158
- }
159
- },
160
- ready () {
161
- //this.getOutlets()
162
- if (this.data) {
163
- this.$refs.paged.$refs.criteria.model.startDate = Util.toStandardDateString()
164
- this.$refs.paged.$refs.criteria.model.endDate = Util.toStandardDateString()
165
- this.$refs.paged.$refs.criteria.model.operator = [`${Util.f.name}`]
166
- this.$refs.paged.$refs.criteria.model.outlets = [`${Util.f.f_parentname}`]
167
- }
168
- },
169
- methods: {
170
- outletsChange (val) {
171
- this.operator = []
172
- let operator = operatorGen(this, val)
173
- return co(operator)
174
- },
175
- getOutlets () {
176
- let outlet = outletGen(this)
177
- return co(outlet)
178
- },
179
- // 根据文件路径获取储存的报表内容
180
- getFileContent (path) {
181
- this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
182
- this.reportStr = res.data.filecontent
183
- this.model.state = '正确'
184
- })
185
- },
186
- confirm () {
187
- if (!this.filename || this.filename === '') {
188
- this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
189
- }
190
- let saveGen = saveFile(this)
191
- co(saveGen)
192
- },
193
- close () {
194
- this.show = false
195
- },
196
- // 将报表保存成文件
197
- confirmReport () {
198
- this.show = true
199
- this.filename = this.data.f_report_name + Util.toStandardDateString()
200
- }
201
- },
202
- // watch: {
203
- // 'data' (val) {
204
- // if (val.f_files_path) {
205
- // this.getFileContent(val.f_files_path)
206
- // } else {
207
- // this.reportStr = null
208
- // }
209
- // }
210
- // },
211
- computed: {
212
- outlets () {
213
- consoloe.log('获取营业网点。', AppData)
214
- return [{label: '全部', value: ''}, ...AppData.getParam('营业网点')]
215
- }
216
- // operator () {
217
- // return [{label: '全部', value: ''}, ...AppData.getParam('操作员')]
218
- // }
219
- }
220
- }
221
- </script>
1
+ <template>
2
+ <div id='app' >
3
+ <criteria-paged :model="model" :pager='false' v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='search' v-ref:criteria>
5
+ <div novalidate class="form-inline auto " partial >
6
+ <p class="bg-info text-center" style="padding: 8px;">话务员考核报表</p>
7
+ <div class="flex-row auto" style="justify-content: space-between">
8
+ <div class="form-group" >
9
+ <label for="startDate">开始日期:</label>
10
+ <datepicker id="startDate" placeholder="开始日期"
11
+ v-model="model.startDate"
12
+ :value.sync="model.startDate"
13
+ :disabled-days-of-Week="[]"
14
+ :format="'yyyy-MM-dd'"
15
+ :show-reset-button="reset">
16
+ </datepicker>
17
+ <label for="endDate">结束日期:</label>
18
+ <datepicker id="endDate" placeholder="结束日期"
19
+ v-model="model.endDate"
20
+ :value.sync="model.endDate"
21
+ :disabled-days-of-Week="[]"
22
+ :format="'yyyy-MM-dd'"
23
+ :show-reset-button="reset">
24
+ </datepicker>
25
+ <label for="outlets" class="control-label">营业网点</label>
26
+ <v-select :value.sync="model.outlets" v-model="model.outlets"
27
+ @change='$parent.$parent.outletsChange'
28
+ default-value="['']"
29
+ :options='$parent.$parent.outlets' placeholder='营业网点'
30
+ close-on-select></v-select>
31
+ <button class="btn btn-success width-100" @click="search()">查询</button>
32
+ <button class="btn btn-success width-100" @click="$parent.$parent.confirmReport()">保存报表</button>
33
+ </div>
34
+ <span></span>
35
+ <div class="form-group">
36
+ <report-print id='bussummary' top='1cm' left='2cm' width='100%' height='100%'></report-print>
37
+ <report-excel id='bussummary' ></report-excel>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </criteria>
42
+ <div partial='list' v-el:handcollect id='bussummary'>
43
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
44
+ <thead>
45
+ <tr>
46
+ <th colspan='12' style="font-weight: normal; text-align: left;">
47
+ <h3 style="text-align: center">话务员考核报表</h3>
48
+ </th>
49
+ </tr>
50
+ <tr>
51
+ <th colspan='12' style="font-weight: normal; text-align: center;">
52
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
53
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;&nbsp;
54
+ 营业网点:{{model.model.outlets}}&nbsp;
55
+ </th>
56
+ </tr>
57
+ </thead>
58
+ <tr>
59
+ <td colspan='12'>
60
+ {{{ model.data.substring(26,model.data.length-8) }}}
61
+ </td>
62
+ </tr>
63
+ </table>
64
+ {{{ $parent.reportStr }}}
65
+ </div>
66
+ <!-- <div partial='list' v-el:handcollect v-if="data.f_files_path">
67
+
68
+ </div> -->
69
+ </criteria-paged>
70
+
71
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
72
+ <header slot="modal-header" class="modal-header">
73
+ <h4 class="modal-title">输入文件名称</h4>
74
+ </header>
75
+ <article slot="modal-body" class="modal-body">
76
+ <div class="form-group">
77
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
78
+ </div>
79
+ </article>
80
+ <footer slot="modal-footer" class="modal-footer">
81
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
82
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
83
+ </footer>
84
+ </modal>
85
+
86
+ </div>
87
+ </template>
88
+
89
+ <script>
90
+ import { DataModel, HttpResetClass } from 'vue-client'
91
+ import * as Util from '../../Util'
92
+ import AppData from '../../stores/AppData'
93
+ import co from 'co'
94
+
95
+ let outletGen = function * (self) {
96
+ let http = new HttpResetClass()
97
+ let outlets = yield http.load('POST', '/rs/search', {source: 'tool.getChildrenOfResName($话务员考核报表$)', userid: ''}, {resolveMsg: null, rejectMsg: null})
98
+ outlets.data.forEach((item, next) => {
99
+ let temp = {}
100
+ temp.label = item.name
101
+ temp.value = item.name
102
+ self.outlets.push(temp)
103
+ })
104
+ self.outlets = [{label: '全部', value: ''}, ...self.outlets]
105
+ }
106
+ let operatorGen = function * (self, val) {
107
+ if (val[0] === '') {
108
+ self.operator = [{label: '全部', value: ''}]
109
+ // self.$refs.paged.$refs.criteria.model.operator[0] = ''
110
+ console.log('11111114444444', self.$refs.paged.$refs.criteria)
111
+ } else {
112
+ let operators = yield self.$resetpost('/rs/search', {source: `tool.getChildrenOfResName($${val}$)`, userid: ''}, {resolveMsg: null, rejectMsg: null})
113
+ operators.data.forEach((item, next) => {
114
+ let temp = {}
115
+ temp.label = item.name
116
+ temp.value = item.name
117
+ self.operator.push(temp)
118
+ })
119
+ self.operator = [{label: '全部', value: ''}, ...self.operator]
120
+ }
121
+ self.$set('$refs.paged.$refs.criteria.model.operator[0]', '')
122
+ }
123
+
124
+ let saveFile = function * (self) {
125
+ // 线验证文件是否重名
126
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
127
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
128
+ {resolveMsg: null, rejectMsg: null})
129
+ if (count.data.length > 0) {
130
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
131
+ return
132
+ }
133
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
134
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'bus-summary',
135
+ f_operator: Util.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
136
+ f_outlets: Util.f.f_parentname})
137
+
138
+ if (saveBack.data.status === 'succeed') {
139
+ self.show = false
140
+ self.filename = ''
141
+ // 后台保存完成,通知刷新
142
+ self.$dispatch('save-success', self.filename)
143
+ }
144
+ }
145
+
146
+
147
+ export default {
148
+ title: '话务员考核报表',
149
+ props: ['data'],
150
+ data () {
151
+ return {
152
+ model: new DataModel('rs/report/operator', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
153
+ outlets: 'this.model.outlets[0]'}),
154
+ reportStr: null,
155
+ show: false,
156
+ outlets: [],
157
+ filename: ''
158
+ }
159
+ },
160
+ ready () {
161
+ //this.getOutlets()
162
+ if (this.data) {
163
+ this.$refs.paged.$refs.criteria.model.startDate = Util.toStandardDateString()
164
+ this.$refs.paged.$refs.criteria.model.endDate = Util.toStandardDateString()
165
+ this.$refs.paged.$refs.criteria.model.operator = [`${Util.f.name}`]
166
+ this.$refs.paged.$refs.criteria.model.outlets = [`${Util.f.f_parentname}`]
167
+ }
168
+ },
169
+ methods: {
170
+ outletsChange (val) {
171
+ this.operator = []
172
+ let operator = operatorGen(this, val)
173
+ return co(operator)
174
+ },
175
+ getOutlets () {
176
+ let outlet = outletGen(this)
177
+ return co(outlet)
178
+ },
179
+ // 根据文件路径获取储存的报表内容
180
+ getFileContent (path) {
181
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
182
+ this.reportStr = res.data.filecontent
183
+ this.model.state = '正确'
184
+ })
185
+ },
186
+ confirm () {
187
+ if (!this.filename || this.filename === '') {
188
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
189
+ }
190
+ let saveGen = saveFile(this)
191
+ co(saveGen)
192
+ },
193
+ close () {
194
+ this.show = false
195
+ },
196
+ // 将报表保存成文件
197
+ confirmReport () {
198
+ this.show = true
199
+ this.filename = this.data.f_report_name + Util.toStandardDateString()
200
+ }
201
+ },
202
+ // watch: {
203
+ // 'data' (val) {
204
+ // if (val.f_files_path) {
205
+ // this.getFileContent(val.f_files_path)
206
+ // } else {
207
+ // this.reportStr = null
208
+ // }
209
+ // }
210
+ // },
211
+ computed: {
212
+ outlets () {
213
+ consoloe.log('获取营业网点。', AppData)
214
+ return [{label: '全部', value: ''}, ...AppData.getParam('营业网点')]
215
+ }
216
+ // operator () {
217
+ // return [{label: '全部', value: ''}, ...AppData.getParam('操作员')]
218
+ // }
219
+ }
220
+ }
221
+ </script>
@@ -1,107 +1,107 @@
1
- <template lang="html">
2
- <div id="charts">
3
- <div id="info" :style="{width:'100%',height:'100%'}"></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,condition) {
14
- let load = new HttpResetClass()
15
- load.load('POST','rs/sql/getUserGasCount',
16
- {data:{condition:condition}},
17
- {resolveMsg: null, rejectMsg: null})
18
- .then((res) => {
19
- let arrparams = []
20
- let gasdata = []
21
- for (var i = 0; i < res.data.length; i++) {
22
- arrparams[i] = res.data[i].f_usertype
23
- gasdata[i] = res.data[i].f_pregas
24
- }
25
- self.set(arrparams,gasdata)
26
- })
27
- }
28
- export default {
29
- props: {
30
- startdate: {
31
- type: String,
32
- default: Util.toStandardDateString()
33
- },
34
- enddate: {
35
- type: String,
36
- default: Util.toStandardDateString()
37
- },
38
- condition: {
39
- type: String,
40
- default: '1=1'
41
- }
42
- },
43
- data () {
44
- title: '业务类型'
45
- return {
46
- xc: ''
47
- }
48
- },
49
- methods: {
50
- set (arrparams,gasdata) {
51
- this.xc = echarts.init(document.getElementById('info'))
52
- this.xc.setOption({
53
- title: {
54
- text: '用户用气量报表',
55
- subtext: '数据截止',
56
- x: 'center'
57
- },
58
- color: ['#3398DB'],
59
- tooltip : {
60
- trigger: 'axis',
61
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
62
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
63
- }
64
- },
65
- grid: {
66
- left: '3%',
67
- right: '4%',
68
- bottom: '3%',
69
- containLabel: true
70
- },
71
- xAxis : [
72
- {
73
- type : 'category',
74
- data : arrparams,
75
- axisTick: {
76
- alignWithLabel: true
77
- }
78
- }
79
- ],
80
- yAxis : [
81
- {
82
- type : 'value'
83
- }
84
- ],
85
- series : [
86
- {
87
- name:'直接访问',
88
- type:'bar',
89
- barWidth: '30%',
90
- data:gasdata
91
- }
92
- ]
93
- })
94
- },
95
- searchdata (condition) {
96
- let getGen =getData(this,condition)
97
- co(getGen)
98
- }
99
- },
100
- watch: {
101
- 'condition' (val) {
102
- console.log('ddddddd', val)
103
- this.searchdata(val)
104
- }
105
- }
106
- }
107
- </script>
1
+ <template lang="html">
2
+ <div id="charts">
3
+ <div id="info" :style="{width:'100%',height:'100%'}"></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,condition) {
14
+ let load = new HttpResetClass()
15
+ load.load('POST','rs/sql/getUserGasCount',
16
+ {data:{condition:condition}},
17
+ {resolveMsg: null, rejectMsg: null})
18
+ .then((res) => {
19
+ let arrparams = []
20
+ let gasdata = []
21
+ for (var i = 0; i < res.data.length; i++) {
22
+ arrparams[i] = res.data[i].f_usertype
23
+ gasdata[i] = res.data[i].f_pregas
24
+ }
25
+ self.set(arrparams,gasdata)
26
+ })
27
+ }
28
+ export default {
29
+ props: {
30
+ startdate: {
31
+ type: String,
32
+ default: Util.toStandardDateString()
33
+ },
34
+ enddate: {
35
+ type: String,
36
+ default: Util.toStandardDateString()
37
+ },
38
+ condition: {
39
+ type: String,
40
+ default: '1=1'
41
+ }
42
+ },
43
+ data () {
44
+ title: '业务类型'
45
+ return {
46
+ xc: ''
47
+ }
48
+ },
49
+ methods: {
50
+ set (arrparams,gasdata) {
51
+ this.xc = echarts.init(document.getElementById('info'))
52
+ this.xc.setOption({
53
+ title: {
54
+ text: '用户用气量报表',
55
+ subtext: '数据截止',
56
+ x: 'center'
57
+ },
58
+ color: ['#3398DB'],
59
+ tooltip : {
60
+ trigger: 'axis',
61
+ axisPointer : { // 坐标轴指示器,坐标轴触发有效
62
+ type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
63
+ }
64
+ },
65
+ grid: {
66
+ left: '3%',
67
+ right: '4%',
68
+ bottom: '3%',
69
+ containLabel: true
70
+ },
71
+ xAxis : [
72
+ {
73
+ type : 'category',
74
+ data : arrparams,
75
+ axisTick: {
76
+ alignWithLabel: true
77
+ }
78
+ }
79
+ ],
80
+ yAxis : [
81
+ {
82
+ type : 'value'
83
+ }
84
+ ],
85
+ series : [
86
+ {
87
+ name:'直接访问',
88
+ type:'bar',
89
+ barWidth: '30%',
90
+ data:gasdata
91
+ }
92
+ ]
93
+ })
94
+ },
95
+ searchdata (condition) {
96
+ let getGen =getData(this,condition)
97
+ co(getGen)
98
+ }
99
+ },
100
+ watch: {
101
+ 'condition' (val) {
102
+ console.log('ddddddd', val)
103
+ this.searchdata(val)
104
+ }
105
+ }
106
+ }
107
+ </script>