manage-client 3.2.77-aode → 3.2.78-aode
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
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id='app' >
|
|
3
|
+
<criteria-paged :model="model" :pager='false' v-ref:paged>
|
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' 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" v-if="!$parent.$parent.data.f_files_path">
|
|
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="endDate" class="control-label">组织机构</label>
|
|
26
|
+
<right-tree :userid.sync='$parent.$parent.userid' :source.sync='$parent.$parent.source' @re-res="$parent.$parent.getRes"></right-tree>
|
|
27
|
+
<button class="btn btn-primary width-100" @click="search()">查询</button>
|
|
28
|
+
<!--<button class="btn btn-success width-100" @click="$parent.$parent.confirmReport()">保存报表</button>-->
|
|
29
|
+
</div>
|
|
30
|
+
<span></span>
|
|
31
|
+
<div class="form-group">
|
|
32
|
+
<report-print id='gasprice' top='1cm' left='2cm' width='100%' height='100%'></report-print>
|
|
33
|
+
<report-excel id='gasprice' ></report-excel>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</criteria>
|
|
38
|
+
<div partial='list' v-el:handcollect id='gasprice'>
|
|
39
|
+
<table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
|
|
40
|
+
<thead>
|
|
41
|
+
<tr>
|
|
42
|
+
<th colspan='6' style="font-weight: normal; text-align: left;">
|
|
43
|
+
<h3 style="text-align: center">物联网表上报报表</h3>
|
|
44
|
+
</th>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr>
|
|
47
|
+
<th colspan='6' style="font-weight: normal; text-align: center;">
|
|
48
|
+
开始时间:{{model.model.startDate}}
|
|
49
|
+
结束时间:{{ model.model.endDate }}
|
|
50
|
+
</th>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<th colspan='6' style="font-weight: normal; text-align: center;">
|
|
54
|
+
组织机构:{{$parent.filialeNameStr}}
|
|
55
|
+
</th>
|
|
56
|
+
</tr>
|
|
57
|
+
</thead>
|
|
58
|
+
<tr>
|
|
59
|
+
<td colspan='6'>
|
|
60
|
+
{{{ model.data.substring(26,model.data.length-8) }}}
|
|
61
|
+
</td>
|
|
62
|
+
</tr>
|
|
63
|
+
|
|
64
|
+
</table>
|
|
65
|
+
{{{ $parent.reportStr }}}
|
|
66
|
+
</div>
|
|
67
|
+
</criteria-paged>
|
|
68
|
+
<modal :show.sync="show" v-ref:modal small backdrop="false">
|
|
69
|
+
<header slot="modal-header" class="modal-header">
|
|
70
|
+
<h4 class="modal-title">输入文件名称</h4>
|
|
71
|
+
</header>
|
|
72
|
+
<article slot="modal-body" class="modal-body">
|
|
73
|
+
<div class="form-group">
|
|
74
|
+
<input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
|
|
75
|
+
</div>
|
|
76
|
+
</article>
|
|
77
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
78
|
+
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
79
|
+
<button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
|
|
80
|
+
</footer>
|
|
81
|
+
</modal>
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
<script>
|
|
86
|
+
import { DataModel } from 'vue-client'
|
|
87
|
+
import co from 'co'
|
|
88
|
+
import plugins from '../../plugins/GetLoginInfoService'
|
|
89
|
+
let saveFile = function * (self) {
|
|
90
|
+
// 线验证文件是否重名
|
|
91
|
+
let count = yield self.$resetpost('rs/sql/manageSingleTable',
|
|
92
|
+
{data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
|
|
93
|
+
{resolveMsg: null, rejectMsg: null})
|
|
94
|
+
if (count.data.length > 0) {
|
|
95
|
+
self.$showAlert('无法保存,文件名重名', 'warning', 3000)
|
|
96
|
+
return
|
|
97
|
+
}
|
|
98
|
+
let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
|
|
99
|
+
f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-user-collect',
|
|
100
|
+
f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
|
|
101
|
+
f_outlets: this.$login.f.f_parentname})
|
|
102
|
+
if (saveBack.data.status === 'succeed') {
|
|
103
|
+
self.show = false
|
|
104
|
+
self.filename = ''
|
|
105
|
+
// 后台保存完成,通知刷新
|
|
106
|
+
self.$dispatch('save-success', self.filename)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export default {
|
|
110
|
+
title: '用户统计报表',
|
|
111
|
+
props: ['data'],
|
|
112
|
+
data () {
|
|
113
|
+
return {
|
|
114
|
+
model: new DataModel('rs/report/manage_getWebReport', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
|
|
115
|
+
filialeCodeStr: 'this.model.filialeCodeStr', filiale: 'this.model.filiale', f_orgid: 'this.orgCondtionStr'}),
|
|
116
|
+
reportStr: null,
|
|
117
|
+
show: false,
|
|
118
|
+
filename: '',
|
|
119
|
+
filialeNameStr: this.$login.f.orgpathnames,
|
|
120
|
+
filialeCodeStr: this.$login.f.orgpathstr,
|
|
121
|
+
orgCondtionStr: '(' + this.$login.f.orgid + ')',
|
|
122
|
+
userid: this.$login.f.id,
|
|
123
|
+
source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
ready () {
|
|
127
|
+
if (this.data) {
|
|
128
|
+
this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString()
|
|
129
|
+
this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString()
|
|
130
|
+
this.$refs.paged.$refs.criteria.model.filiale = this.$login.f.f_fengongsi
|
|
131
|
+
}
|
|
132
|
+
this.$refs.paged.$refs.criteria.search()
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
selfSearch (args) {
|
|
136
|
+
this.$refs.paged.$refs.criteria.model.filialeCodeStr = this.filialeCodeStr
|
|
137
|
+
this.model.params.f_orgid = this.orgCondtionStr
|
|
138
|
+
this.$refs.paged.search(args)
|
|
139
|
+
},
|
|
140
|
+
getRes(obj) {
|
|
141
|
+
console.log(obj, '组织')
|
|
142
|
+
this.filialeNameStr = obj.res
|
|
143
|
+
this.filialeCodeStr = obj.resids
|
|
144
|
+
this.orgCondtionStr = plugins.convertToIn(obj)
|
|
145
|
+
},
|
|
146
|
+
// 根据文件路径获取储存的报表内容
|
|
147
|
+
getFileContent (path) {
|
|
148
|
+
this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
149
|
+
this.reportStr = res.data.filecontent
|
|
150
|
+
this.model.state = '正确'
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
confirm () {
|
|
154
|
+
if (!this.filename || this.filename === '') {
|
|
155
|
+
this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
|
|
156
|
+
}
|
|
157
|
+
let saveGen = saveFile(this)
|
|
158
|
+
co(saveGen)
|
|
159
|
+
},
|
|
160
|
+
close () {
|
|
161
|
+
this.show = false
|
|
162
|
+
},
|
|
163
|
+
// 将报表保存成文件
|
|
164
|
+
confirmReport () {
|
|
165
|
+
this.show = true
|
|
166
|
+
this.filename = this.data.f_report_name + this.$login.toStandardDateString()
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
watch: {
|
|
170
|
+
'data' (val) {
|
|
171
|
+
if (val.f_files_path) {
|
|
172
|
+
this.getFileContent(val.f_files_path)
|
|
173
|
+
} else {
|
|
174
|
+
this.reportStr = null
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
computed: {
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
</script>
|
|
@@ -160,18 +160,18 @@
|
|
|
160
160
|
</datepicker>
|
|
161
161
|
</div>
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
<label class="font_normal_body"
|
|
163
|
+
<div class="col-sm-2 form-group">
|
|
164
|
+
<label class="font_normal_body">用气天数</label>
|
|
165
165
|
<input type="text" style="width:60%" class="input_search"
|
|
166
|
-
v-model="model.
|
|
166
|
+
v-model="model.f_start_datadiff" placeholder='大于等于'
|
|
167
167
|
>
|
|
168
168
|
</div>
|
|
169
169
|
<div class="col-sm-2 form-group">
|
|
170
170
|
<label class="font_normal_body"> 至 </label>
|
|
171
171
|
<input type="text" style="width:60%" class="input_search"
|
|
172
|
-
v-model="model.
|
|
172
|
+
v-model="model.f_end_datadiff" placeholder='小于等于'
|
|
173
173
|
>
|
|
174
|
-
</div
|
|
174
|
+
</div>
|
|
175
175
|
</div>
|
|
176
176
|
</div>
|
|
177
177
|
</criteria>
|
|
@@ -467,6 +467,8 @@
|
|
|
467
467
|
this.model.params.f_user_type = this.$refs.paged.$refs.cri.model.f_user_type && this.$refs.paged.$refs.cri.model.f_user_type!==''? ` and f_user_type = '${this.$refs.paged.$refs.cri.model.f_user_type}'` :''
|
|
468
468
|
this.model.params.f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties && this.$refs.paged.$refs.cri.model.f_gasproperties!==''? ` and f_gasproperties = '${this.$refs.paged.$refs.cri.model.f_gasproperties}'` :''
|
|
469
469
|
this.model.params.f_residential_area = this.$refs.paged.$refs.cri.model.f_residential_area ==null|| this.$refs.paged.$refs.cri.model.f_residential_area==''?'':` and f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}'`
|
|
470
|
+
this.model.params.f_start_datadiff= this.$refs.paged.$refs.cri.model.f_start_datadiff && this.$refs.paged.$refs.cri.model.f_start_datadiff!==''? ` and datadiff >= ${this.$refs.paged.$refs.cri.model.f_start_datadiff}` :''
|
|
471
|
+
this.model.params.f_end_datadiff= this.$refs.paged.$refs.cri.model.f_end_datadiff && this.$refs.paged.$refs.cri.model.f_end_datadiff!==''? ` and datadiff <= ${this.$refs.paged.$refs.cri.model.f_end_datadiff}` :''
|
|
470
472
|
args.condition = this.condition
|
|
471
473
|
this.model.search(args.condition, args.model)
|
|
472
474
|
},
|
|
@@ -519,7 +521,9 @@
|
|
|
519
521
|
let f_residential_area = this.$refs.paged.$refs.cri.model.f_residential_area ==null|| this.$refs.paged.$refs.cri.model.f_residential_area==''?'':` and a.f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}'`
|
|
520
522
|
let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type && this.$refs.paged.$refs.cri.model.f_user_type!==''? ` and f_user_type = '${this.$refs.paged.$refs.cri.model.f_user_type}'` :''
|
|
521
523
|
let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties && this.$refs.paged.$refs.cri.model.f_gasproperties!==''? ` and f_gasproperties = '${this.$refs.paged.$refs.cri.model.f_gasproperties}'` :''
|
|
522
|
-
|
|
524
|
+
let f_start_datadiff= this.$refs.paged.$refs.cri.model.f_start_datadiff && this.$refs.paged.$refs.cri.model.f_start_datadiff!==''? ` and datadiff >= ${this.$refs.paged.$refs.cri.model.f_start_datadiff}` :''
|
|
525
|
+
let f_end_datadiff= this.$refs.paged.$refs.cri.model.f_end_datadiff && this.$refs.paged.$refs.cri.model.f_end_datadiff!==''? ` and datadiff <= ${this.$refs.paged.$refs.cri.model.f_end_datadiff}` :''
|
|
526
|
+
return {condition: `${this.$refs.paged.$refs.cri.condition} and f_orgid in ` + this.orgCondtionStr, f_residential_area:f_residential_area,startDate: this.$refs.paged.$refs.cri.model.inputStartDate,endDate:this.$refs.paged.$refs.cri.model.inputEndDate,f_orgid:this.orgCondtionStr,f_user_type:f_user_type,f_gasproperties:f_gasproperties,f_start_datadiff:f_start_datadiff,f_end_datadiff:f_end_datadiff}
|
|
523
527
|
},
|
|
524
528
|
getfield() {
|
|
525
529
|
return exportConfig.newwebmeterusergasConfig
|
package/src/reportManage.js
CHANGED
|
@@ -201,4 +201,8 @@ export default function () {
|
|
|
201
201
|
Vue.component('traffic-basic', (resolve) => {
|
|
202
202
|
require(['./components/TelReport/TrafficBasic'], resolve)
|
|
203
203
|
})
|
|
204
|
+
// 物联网上报报表
|
|
205
|
+
Vue.component('web-report-bill', (resolve) => {
|
|
206
|
+
require(['./components/sellReport/getWebReport'], resolve)
|
|
207
|
+
})
|
|
204
208
|
}
|