manage-client 4.1.138 → 4.1.140-hyls
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/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/.gradle/9.2.0/gc.properties +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/build/dev-server.js +20 -20
- package/package.json +2 -2
- package/src/components/DataGrid.vue +483 -0
- package/src/components/SellReport/ReportItems.vue +3 -2
- package/src/filiale/liaoyuan/HandplanRatioQuery.vue +42 -2
- package/src/filiale/liaoyuan/WebHandplanRatioQuery.vue +10 -0
- package/src/filiale/meihekou/UserGasList.vue +1 -1
- package/src/main.js +3 -3
- package/src/filiale/jinbin/exportConfig.js +0 -1110
- package/src/filiale/jinbin/sale/businessquery/ChargeQuery.vue +0 -1372
- package/src/filiale/jinbin/sale.js +0 -7
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
package/build/dev-server.js
CHANGED
|
@@ -6,8 +6,8 @@ const proxyMiddleware = require('http-proxy-middleware')
|
|
|
6
6
|
const app = express()
|
|
7
7
|
const compiler = webpack(config)
|
|
8
8
|
|
|
9
|
-
const server = 'http://
|
|
10
|
-
const local = 'http://
|
|
9
|
+
const server = 'http://36.134.191.191:31467/'
|
|
10
|
+
const local = 'http://36.134.191.191:31467/'
|
|
11
11
|
const proxyTable = {
|
|
12
12
|
'/rs/logic/exportfile': {
|
|
13
13
|
target: server
|
|
@@ -15,24 +15,24 @@ const proxyTable = {
|
|
|
15
15
|
'/dataManage': {
|
|
16
16
|
target: server
|
|
17
17
|
},
|
|
18
|
-
'/api/af-revenue/sql/': {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
'/api/af-revenue/report/': {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
'/api/af-revenue/logic': {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
18
|
+
// '/api/af-revenue/sql/': {
|
|
19
|
+
// pathRewrite: {
|
|
20
|
+
// '^/api/af-revenue': '/'
|
|
21
|
+
// },
|
|
22
|
+
// target: local
|
|
23
|
+
// },
|
|
24
|
+
// '/api/af-revenue/report/': {
|
|
25
|
+
// pathRewrite: {
|
|
26
|
+
// '^/api/af-revenue': '/'
|
|
27
|
+
// },
|
|
28
|
+
// target: local
|
|
29
|
+
// },
|
|
30
|
+
// '/api/af-revenue/logic': {
|
|
31
|
+
// pathRewrite: {
|
|
32
|
+
// '^/api/af-revenue': '/'
|
|
33
|
+
// },
|
|
34
|
+
// target: local
|
|
35
|
+
// },
|
|
36
36
|
'/api': {
|
|
37
37
|
target: server
|
|
38
38
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manage-client",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.140-hyls",
|
|
4
4
|
"description": "经营管控模块前台组件",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"directories": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"ldap-clients": "3.0.96",
|
|
72
72
|
"url-loader": "^0.5.7",
|
|
73
73
|
"vue-amap": "0.5.10",
|
|
74
|
-
"vue-client": "1.26.
|
|
74
|
+
"vue-client": "1.26.7",
|
|
75
75
|
"vue-hot-reload-api": "^1.2.0",
|
|
76
76
|
"vue-html-loader": "^1.0.0",
|
|
77
77
|
"vue-loader": "8.2.1",
|
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div @scroll="scroll()" style="overflow:auto;" id="listrefeshx" v-el:grid>
|
|
3
|
+
<table replace='table' class="{{classname}}" v-if="!optional">
|
|
4
|
+
<thead a-partial='head' v-for='h in 1' class="text-left" @dblclick.stop="headDblclickGo($event)" v-el:the>
|
|
5
|
+
</thead>
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr
|
|
8
|
+
:id="'vc-datagrid-'+attach+'-'+$index"
|
|
9
|
+
v-for='row in model.rows || model.children || model.data'
|
|
10
|
+
v-bind:class="{ 'success': isSelected(row)&&!customize,'customizestyle':isSelected(row)&&customize }"
|
|
11
|
+
@click="select(row)" @dblclick.stop="dblclickGo(row, $index)"
|
|
12
|
+
a-partial='body' track-by="$index">
|
|
13
|
+
</tr>
|
|
14
|
+
</tbody>
|
|
15
|
+
<tr a-partial='foot' v-for='f in 1'></tr>
|
|
16
|
+
</table>
|
|
17
|
+
<!-- 自带选择框的table -->
|
|
18
|
+
<table replace='table' class="{{classname}}" v-if="optional">
|
|
19
|
+
<thead v-for='h in 1' class="text-left" @dblclick.stop="headDblclickGo($event)">
|
|
20
|
+
<tr a-partial='head'>
|
|
21
|
+
<th style="text-align:center">
|
|
22
|
+
<input type="checkbox" v-model="checkAll[model.pageIndex-1]" @change="selectAll()" @click.stop/>
|
|
23
|
+
</th>
|
|
24
|
+
</tr>
|
|
25
|
+
</thead>
|
|
26
|
+
<tbody>
|
|
27
|
+
<tr
|
|
28
|
+
:id="'vc-datagrid-'+attach+'-'+$index"
|
|
29
|
+
v-for='row in model.rows || model.children || model.data'
|
|
30
|
+
v-bind:class="{ 'success': isSelected(row)&&!customize,'customizestyle':isSelected(row)&&customize }"
|
|
31
|
+
@click="select(row)" @dblclick.stop="dblclickGo(row, $index)"
|
|
32
|
+
a-partial='body' track-by="$index">
|
|
33
|
+
<td style="text-align: center;">
|
|
34
|
+
<input @click.stop :id="'bodycheckbox'+model.pageIndex" type='checkbox' @change="selectOne($event,row,$index)" :checked="ischecked(model.pageIndex-1,$index)"/>
|
|
35
|
+
</td>
|
|
36
|
+
</tr>
|
|
37
|
+
</tbody>
|
|
38
|
+
<tr a-partial='foot' v-for='f in 1'></tr>
|
|
39
|
+
</table>
|
|
40
|
+
|
|
41
|
+
<modal :show.sync="show" backdrop="false">
|
|
42
|
+
<header slot="modal-header" class="modal-header text-center">
|
|
43
|
+
<h4 class="modal-title">显示列选择</h4>
|
|
44
|
+
<input type="checkbox" :id="'theadNodeAll' + dateTime" v-model="all">
|
|
45
|
+
<label :for="'theadNodeAll' + dateTime" class="font-size">全选</label>
|
|
46
|
+
</header>
|
|
47
|
+
<article slot="modal-body">
|
|
48
|
+
<div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
|
|
49
|
+
<div class="col-sm-3" v-for="f in theadval">
|
|
50
|
+
<input type="checkbox" :id="'water-owe-details-' + dateTime + $index" v-model="modelval" :value="f.index">
|
|
51
|
+
<label :for="'water-owe-details-'+ dateTime + $index" class="font-size">{{f.innerText}}</label>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</article>
|
|
55
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
56
|
+
<center>
|
|
57
|
+
<button type="button" class="btn btn-default" @click='show = false'>取消</button>
|
|
58
|
+
<button type="button" class="btn btn-success" @click='displayColumnSettings()'>确定</button>
|
|
59
|
+
</center>
|
|
60
|
+
</footer>
|
|
61
|
+
</modal>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
// Selector mixin 可能在外部库中,如果不存在则创建一个空的
|
|
67
|
+
let Selector = {}
|
|
68
|
+
try {
|
|
69
|
+
Selector = require('../mixins/Selector').default || require('../mixins/Selector')
|
|
70
|
+
} catch (e) {
|
|
71
|
+
// 如果找不到 Selector,创建一个空的 mixin
|
|
72
|
+
Selector = {
|
|
73
|
+
data() {
|
|
74
|
+
return {
|
|
75
|
+
selectStore: {
|
|
76
|
+
selected: null
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
isSelected(row) {
|
|
82
|
+
return this.selectStore.selected === row
|
|
83
|
+
},
|
|
84
|
+
select(row) {
|
|
85
|
+
this.selectStore.selected = row
|
|
86
|
+
this.$dispatch('select', row)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export default {
|
|
93
|
+
props: {
|
|
94
|
+
classname: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: 'table table-bordered table-striped table-hover'
|
|
97
|
+
},
|
|
98
|
+
model: {},
|
|
99
|
+
thumbWidth: {
|
|
100
|
+
type: Number,
|
|
101
|
+
default: 8
|
|
102
|
+
},
|
|
103
|
+
// 为测试添加,需要为元素指定id
|
|
104
|
+
attach: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: 'name'
|
|
107
|
+
},
|
|
108
|
+
customize: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
// 是否添加勾选框,开启后别加tr标签, 调用getRowData()获取选中数据
|
|
113
|
+
// 建议在重新查询时调用selectInit方法, 重置选中数据, 防止出现bug
|
|
114
|
+
optional: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: false
|
|
117
|
+
},
|
|
118
|
+
//查询后是否滚回第一行
|
|
119
|
+
isScrollto: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
data () {
|
|
125
|
+
return {
|
|
126
|
+
dateTime: new Date().getTime(),
|
|
127
|
+
theadNode: null,
|
|
128
|
+
tbodyTrNode: null,
|
|
129
|
+
theadval: null,
|
|
130
|
+
allTheadRows: null, // 保存所有行的 th,用于显示/隐藏时同时处理
|
|
131
|
+
modelval: [],
|
|
132
|
+
all: false,
|
|
133
|
+
show: false,
|
|
134
|
+
// 选择的用户
|
|
135
|
+
rowsdata: [],
|
|
136
|
+
// 控制全选
|
|
137
|
+
checkAll : [],
|
|
138
|
+
// 控制单选
|
|
139
|
+
radio: []
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
ready () {
|
|
143
|
+
// 做兼容处理
|
|
144
|
+
if (window.NodeList && !NodeList.prototype.forEach) {
|
|
145
|
+
NodeList.prototype.forEach = function (callback, thisArg) {
|
|
146
|
+
thisArg = thisArg || window
|
|
147
|
+
for (var i = 0; i < this.length; i++) {
|
|
148
|
+
callback.call(thisArg, this[i], i, this)
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// var HostApp
|
|
153
|
+
try {
|
|
154
|
+
HostApp
|
|
155
|
+
// 如果为移动端设备,将.span的高度设置为auto
|
|
156
|
+
let spans = document.getElementsByClassName('span')
|
|
157
|
+
for (var i = 0; i < spans.length; i++) {
|
|
158
|
+
spans[i].style.height = 'auto'
|
|
159
|
+
}
|
|
160
|
+
} catch (e) {
|
|
161
|
+
}
|
|
162
|
+
let el = this.$els.grid
|
|
163
|
+
let translate = 'translate(' + (el.scrollLeft - (el.scrollWidth - el.offsetWidth) - this.thumbWidth) + 'px,0)'
|
|
164
|
+
// 新加载时,平移右侧固定列表体
|
|
165
|
+
el.querySelectorAll('table tbody .stickToRight').forEach((element) => {
|
|
166
|
+
element.style.transform = translate
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
translate = 'translate(' + (el.scrollLeft - (el.scrollWidth - el.offsetWidth) - this.thumbWidth) + 'px,' + el.scrollTop + 'px)'
|
|
170
|
+
// 新加载时,平移右侧固定表头
|
|
171
|
+
el.querySelectorAll('table thead th.stickToRight').forEach((element) => {
|
|
172
|
+
element.style.transform = translate
|
|
173
|
+
})
|
|
174
|
+
},
|
|
175
|
+
methods: {
|
|
176
|
+
InitializedData () {
|
|
177
|
+
this.$nextTick(() => {
|
|
178
|
+
const theadElement = this.$el.querySelector('thead')
|
|
179
|
+
// 只获取最后一行的 th 标签(对应实际 td 的列)
|
|
180
|
+
const trs = theadElement.getElementsByTagName('tr')
|
|
181
|
+
const lastTr = trs[trs.length - 1]
|
|
182
|
+
this.theadNode = lastTr ? lastTr.getElementsByTagName('th') : theadElement.getElementsByTagName('th')
|
|
183
|
+
this.tbodyTrNode = theadElement.nextElementSibling.getElementsByTagName('tr')
|
|
184
|
+
})
|
|
185
|
+
},
|
|
186
|
+
scroll () {
|
|
187
|
+
let el = this.$els.grid
|
|
188
|
+
let translate = 'translate(0,' + el.scrollTop + 'px)'
|
|
189
|
+
// 滚动时,平移除右侧除右侧固定以外的表头
|
|
190
|
+
el.querySelectorAll('table thead th:not(.stickToRight)').forEach((element) => {
|
|
191
|
+
element.style.transform = translate
|
|
192
|
+
})
|
|
193
|
+
// 滚动时,平移除右侧除左侧侧固定以外的表头
|
|
194
|
+
el.querySelectorAll('table thead th:not(.stickToLeft)').forEach((element) => {
|
|
195
|
+
element.style.transform = translate
|
|
196
|
+
})
|
|
197
|
+
|
|
198
|
+
// 滚动时,平移左侧固定的表体
|
|
199
|
+
translate = 'translate(' + el.scrollLeft + 'px,0)'
|
|
200
|
+
el.querySelectorAll('table tbody .stickToLeft').forEach((element) => {
|
|
201
|
+
element.style.transform = translate
|
|
202
|
+
})
|
|
203
|
+
// 滚动时,平移右侧固定的表体
|
|
204
|
+
translate = 'translate(' + (el.scrollLeft - (el.scrollWidth - el.offsetWidth) - this.thumbWidth) + 'px,0)'
|
|
205
|
+
el.querySelectorAll('table tbody .stickToRight').forEach((element) => {
|
|
206
|
+
element.style.transform = translate
|
|
207
|
+
})
|
|
208
|
+
// 滚动时,平移左侧固定的表头
|
|
209
|
+
translate = 'translate(' + el.scrollLeft + 'px,' + el.scrollTop + 'px)'
|
|
210
|
+
el.querySelectorAll('table thead th.stickToLeft').forEach((element) => {
|
|
211
|
+
element.style.transform = translate
|
|
212
|
+
})
|
|
213
|
+
// 滚动时,平移右侧固定的表头
|
|
214
|
+
translate = 'translate(' + (el.scrollLeft - (el.scrollWidth - el.offsetWidth) - this.thumbWidth) + 'px,' + el.scrollTop + 'px)'
|
|
215
|
+
el.querySelectorAll('table thead th.stickToRight').forEach((element) => {
|
|
216
|
+
element.style.transform = translate
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
},
|
|
220
|
+
dblclickGo (row, index) {
|
|
221
|
+
this.$dispatch('dblclick', row, index)
|
|
222
|
+
},
|
|
223
|
+
headDblclickGo (e) {
|
|
224
|
+
const theadElement = e.currentTarget
|
|
225
|
+
// 只获取最后一行的 th 标签(对应实际 td 的列)
|
|
226
|
+
const trs = theadElement.getElementsByTagName('tr')
|
|
227
|
+
const lastTr = trs[trs.length - 1]
|
|
228
|
+
this.theadNode = lastTr ? lastTr.getElementsByTagName('th') : theadElement.getElementsByTagName('th')
|
|
229
|
+
// 保存所有行的 th,用于显示/隐藏时同时处理
|
|
230
|
+
this.allTheadRows = []
|
|
231
|
+
for (let i = 0; i < trs.length; i++) {
|
|
232
|
+
this.allTheadRows.push(trs[i].getElementsByTagName('th'))
|
|
233
|
+
}
|
|
234
|
+
// 保存第一行 th 的【初始】原始 colspan,只在首次或列数变化时记录,
|
|
235
|
+
// 避免后面我们动态修改 colspan 之后再被当成“原始值”,导致分组错乱
|
|
236
|
+
if (this.allTheadRows.length > 0) {
|
|
237
|
+
const firstRowThs = this.allTheadRows[0]
|
|
238
|
+
if (!this.originalColspans || this.originalColspans.length !== firstRowThs.length) {
|
|
239
|
+
this.originalColspans = []
|
|
240
|
+
for (let i = 0; i < firstRowThs.length; i++) {
|
|
241
|
+
const th = firstRowThs[i]
|
|
242
|
+
this.originalColspans.push(parseInt(th.getAttribute('colspan') || '1', 10))
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
this.tbodyTrNode = theadElement.nextElementSibling.getElementsByTagName('tr')
|
|
247
|
+
if (!this.tbodyTrNode.length) {
|
|
248
|
+
this.$showMessage('当前无数据, 请查询后再试')
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
if (!this.theadval) {
|
|
252
|
+
this.theadval = []
|
|
253
|
+
for (let i = 0; i < this.theadNode.length; i++) {
|
|
254
|
+
this.theadval.push({index: i, innerText: this.theadNode[i].innerText.replace(/[\n]/g, "").trim()})
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// 初始化 modelval 为当前所有可见列的索引
|
|
258
|
+
this.modelval = []
|
|
259
|
+
for (let i = 0; i < this.theadNode.length; i++) {
|
|
260
|
+
if (this.theadNode[i].style.display !== 'none') {
|
|
261
|
+
this.modelval.push(i)
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// 如果所有列都可见,设置全选为 true
|
|
265
|
+
this.all = this.modelval.length === this.theadNode.length
|
|
266
|
+
this.show = true
|
|
267
|
+
},
|
|
268
|
+
displayColumnSettings (watch) {
|
|
269
|
+
if (this.modelval.length <= 0) {
|
|
270
|
+
// 如果是从监听过来的, 不进行提示
|
|
271
|
+
if (!watch) this.$showMessage('请至少选择一列展示!')
|
|
272
|
+
return
|
|
273
|
+
}
|
|
274
|
+
if (!this.tbodyTrNode || !this.theadNode) return
|
|
275
|
+
|
|
276
|
+
// 将 modelval 中的索引转换为数字数组(因为 v-model 可能返回字符串)
|
|
277
|
+
const selectedIndices = this.modelval.map(v => parseInt(v, 10))
|
|
278
|
+
|
|
279
|
+
for (let tr of this.tbodyTrNode) {
|
|
280
|
+
let td = tr.getElementsByTagName('td')
|
|
281
|
+
for (let i = 0; i < this.theadNode.length; i++) {
|
|
282
|
+
// 检查 td[i] 是否存在,避免访问 undefined
|
|
283
|
+
if (i >= td.length) {
|
|
284
|
+
continue
|
|
285
|
+
}
|
|
286
|
+
// 使用索引来判断是否显示,而不是文本
|
|
287
|
+
const shouldShow = selectedIndices.includes(i)
|
|
288
|
+
|
|
289
|
+
// 显示/隐藏最后一行的 th(对应实际列)
|
|
290
|
+
if (this.theadNode[i]) {
|
|
291
|
+
this.theadNode[i].style.display = shouldShow ? '' : 'none'
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// 显示/隐藏对应的 td
|
|
295
|
+
if (td[i]) {
|
|
296
|
+
td[i].style.display = shouldShow ? '' : 'none'
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// 处理第一行的 th(根据子列的显示状态来决定是否隐藏)
|
|
302
|
+
if (this.allTheadRows && this.allTheadRows.length > 1) {
|
|
303
|
+
this.updateFirstRowThs()
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
this.show = false
|
|
307
|
+
},
|
|
308
|
+
// 更新第一行 th 的显示状态(根据子列的显示状态)
|
|
309
|
+
updateFirstRowThs () {
|
|
310
|
+
if (!this.allTheadRows || this.allTheadRows.length < 2 || !this.theadNode || !this.originalColspans) return
|
|
311
|
+
|
|
312
|
+
const firstRowThs = this.allTheadRows[0]
|
|
313
|
+
let currentColIndex = 0
|
|
314
|
+
|
|
315
|
+
for (let i = 0; i < firstRowThs.length; i++) {
|
|
316
|
+
const th = firstRowThs[i]
|
|
317
|
+
const originalColspan = this.originalColspans[i] || parseInt(th.getAttribute('colspan') || '1', 10)
|
|
318
|
+
|
|
319
|
+
// 统计当前分组下可见的子列数量
|
|
320
|
+
let visibleCount = 0
|
|
321
|
+
for (let j = 0; j < originalColspan && currentColIndex + j < this.theadNode.length; j++) {
|
|
322
|
+
const childTh = this.theadNode[currentColIndex + j]
|
|
323
|
+
if (childTh && childTh.style.display !== 'none') {
|
|
324
|
+
visibleCount++
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// 没有任何可见子列,则隐藏这一组表头
|
|
329
|
+
if (visibleCount === 0) {
|
|
330
|
+
if (th) {
|
|
331
|
+
th.style.display = 'none'
|
|
332
|
+
// 保留原始的 colspan 记录,方便后续再次计算
|
|
333
|
+
th.setAttribute('colspan', originalColspan)
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
// 有可见子列,显示这一组表头,并将 colspan 设置为可见子列数,保证上下表头对齐
|
|
337
|
+
if (th) {
|
|
338
|
+
th.style.display = ''
|
|
339
|
+
th.setAttribute('colspan', visibleCount)
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// 更新列索引(使用原始 colspan,因为我们需要按照原始结构遍历)
|
|
344
|
+
currentColIndex += originalColspan
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
// 多选框初始化
|
|
348
|
+
selectInit () {
|
|
349
|
+
this.rowsdata = []
|
|
350
|
+
this.checkAll = []
|
|
351
|
+
this.radio = []
|
|
352
|
+
},
|
|
353
|
+
// 返回选择数据(合并二维数组并去空)
|
|
354
|
+
getRowData () {
|
|
355
|
+
let data = []
|
|
356
|
+
// 合并
|
|
357
|
+
for (let array of this.rowsdata) {
|
|
358
|
+
data.push.apply(data, array)
|
|
359
|
+
}
|
|
360
|
+
// 去空
|
|
361
|
+
data = this.removeEmpty(data)
|
|
362
|
+
return data
|
|
363
|
+
},
|
|
364
|
+
removeEmpty (data) {
|
|
365
|
+
for (var i = 0; i < data.length; i++) {
|
|
366
|
+
if (data[i] == "" || typeof (data[i]) == "undefined") {
|
|
367
|
+
data.splice(i, 1);
|
|
368
|
+
i--;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return data;
|
|
372
|
+
},
|
|
373
|
+
selectAll () {
|
|
374
|
+
let index = this.model.pageIndex - 1
|
|
375
|
+
console.log('全选', this.checkAll[index])
|
|
376
|
+
if (!this.radio[index]) {
|
|
377
|
+
this.radio.$set(index, [])
|
|
378
|
+
}
|
|
379
|
+
if (this.checkAll[index]) {
|
|
380
|
+
// 数据
|
|
381
|
+
this.rowsdata[index] = Object.assign([], this.model.rows)
|
|
382
|
+
// 勾选
|
|
383
|
+
for (let i = 0; i < this.model.rows.length; i++) {
|
|
384
|
+
this.radio[index].$set(i, true)
|
|
385
|
+
}
|
|
386
|
+
} else {
|
|
387
|
+
// 数据
|
|
388
|
+
this.rowsdata[index] = []
|
|
389
|
+
// 不勾选
|
|
390
|
+
for (let i = 0; i < this.model.rows.length; i++) {
|
|
391
|
+
this.radio[index].$set(i, false)
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
selectOne (event, row, i) {
|
|
396
|
+
console.log('单选', event.target.checked)
|
|
397
|
+
let index = this.model.pageIndex - 1
|
|
398
|
+
if (!this.rowsdata[index]) {
|
|
399
|
+
this.rowsdata[index] = []
|
|
400
|
+
}
|
|
401
|
+
if (!this.radio[index]) {
|
|
402
|
+
this.radio.$set(index, [])
|
|
403
|
+
}
|
|
404
|
+
if (event.target.checked) {
|
|
405
|
+
// 数据
|
|
406
|
+
this.rowsdata[index][i] = row
|
|
407
|
+
// 勾选
|
|
408
|
+
this.radio[index].$set(i, true)
|
|
409
|
+
// 判断是否全部选中
|
|
410
|
+
var allState = true
|
|
411
|
+
if (this.model.rows.length != this.radio[index].length) {
|
|
412
|
+
allState = false
|
|
413
|
+
}
|
|
414
|
+
for (var state of this.radio[index]) {
|
|
415
|
+
if (!state) {
|
|
416
|
+
allState = false
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (allState) {
|
|
420
|
+
this.checkAll.$set(index, true)
|
|
421
|
+
} else {
|
|
422
|
+
this.checkAll.$set(index, false)
|
|
423
|
+
}
|
|
424
|
+
} else {
|
|
425
|
+
// 数据
|
|
426
|
+
this.rowsdata[index][i] = []
|
|
427
|
+
// 不勾选
|
|
428
|
+
this.radio[index].$set(i, false)
|
|
429
|
+
// 任意取消一个则全选状态设为false
|
|
430
|
+
this.checkAll.$set(index, false)
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
watch: {
|
|
435
|
+
'all' (val) {
|
|
436
|
+
this.modelval = []
|
|
437
|
+
if (val) {
|
|
438
|
+
for (let row of this.theadval) {
|
|
439
|
+
this.modelval.push(row.index)
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
'model.rows' () {
|
|
444
|
+
this.selectStore.selected = null
|
|
445
|
+
if (this.model.rows) {
|
|
446
|
+
this.displayColumnSettings('watch')
|
|
447
|
+
this.$dispatch('dataGrid', this.model.rows)
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
'model.pageIndex' () {
|
|
451
|
+
if(this.isScrollto){
|
|
452
|
+
this.$els.grid.scrollTo(0,0)
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
deep: true
|
|
456
|
+
},
|
|
457
|
+
computed: {
|
|
458
|
+
// 判断页面框选中
|
|
459
|
+
ischecked () {
|
|
460
|
+
return function (index, i) {
|
|
461
|
+
// console.log("计算属性")
|
|
462
|
+
if (!this.radio[index]) {
|
|
463
|
+
return false
|
|
464
|
+
}
|
|
465
|
+
return this.radio[index][i]
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
mixins: [Selector]
|
|
470
|
+
}
|
|
471
|
+
</script>
|
|
472
|
+
<style>
|
|
473
|
+
th.stickToLeft {
|
|
474
|
+
position: relative;
|
|
475
|
+
z-index: 1;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
th.stickToRight {
|
|
479
|
+
position: relative;
|
|
480
|
+
z-index: 1;
|
|
481
|
+
}
|
|
482
|
+
</style>
|
|
483
|
+
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
<td>{{row.f_files_name}}</td>
|
|
109
109
|
<td>{{row.f_operator}}</td>
|
|
110
110
|
<td>{{row.f_operate_date}}</td>
|
|
111
|
-
<td><button type="button" class="btn btn-link" @click.stop="$
|
|
111
|
+
<td><button type="button" class="btn btn-link" @click.stop="$dispatch('delete-history-row', row)">删除</button></td>
|
|
112
112
|
</template>
|
|
113
113
|
</data-grid>
|
|
114
114
|
</criteria-paged>
|
|
@@ -164,6 +164,7 @@ export default {
|
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
ready () {
|
|
167
|
+
this.$on('delete-history-row', (row) => this.delete(row))
|
|
167
168
|
// 获取所有报表类型
|
|
168
169
|
this.getReportInfo(null, '1=1 and f_rank=1')
|
|
169
170
|
this.getReportName()
|
|
@@ -178,7 +179,7 @@ export default {
|
|
|
178
179
|
this.model.search('1=1')
|
|
179
180
|
},
|
|
180
181
|
delete (row) {
|
|
181
|
-
this.$
|
|
182
|
+
this.$resetpost('api/af-revenue/logic/deletereport', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
182
183
|
this.$dispatch('delect-report', '删除计划', row)
|
|
183
184
|
this.search()
|
|
184
185
|
})
|
|
@@ -73,6 +73,16 @@
|
|
|
73
73
|
close-on-select :search="false">
|
|
74
74
|
</v-select>
|
|
75
75
|
</div>
|
|
76
|
+
<div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
|
|
77
|
+
<label class="font_normal_body">气量环比 </label>
|
|
78
|
+
<div class="row">
|
|
79
|
+
<input type="text" style="width:27%" class="input_search" v-model="model.amount_ratio1"
|
|
80
|
+
condition="amount_ratio >= {} " placeholder="">
|
|
81
|
+
<label class="font_normal_body"> ≤ x ≤ </label>
|
|
82
|
+
<input type="text" style="width:27%" class="input_search" v-model="model.amount_ratio2"
|
|
83
|
+
condition="amount_ratio <= {} " placeholder="">
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
76
86
|
|
|
77
87
|
</div>
|
|
78
88
|
</div>
|
|
@@ -230,7 +240,7 @@
|
|
|
230
240
|
footer:[],
|
|
231
241
|
data: {},
|
|
232
242
|
ratio: this.$appdata.getSingleValue('环比报警值百分比'),
|
|
233
|
-
model: new PagedList('api/af-revenue/sql/getHandRatioQuery', 20, {
|
|
243
|
+
model: new PagedList('api/af-revenue/sql/getHandRatioQuery', 20, {month_date: 'this.model.month_date', next_month_date: 'this.model.next_month_date', last_month_date: 'this.model.last_month_date'}),
|
|
234
244
|
initres: {
|
|
235
245
|
org:[this.$login.f.orgid],
|
|
236
246
|
dep:[]
|
|
@@ -412,6 +422,8 @@
|
|
|
412
422
|
this.$showMessage('请选择所属年月!')
|
|
413
423
|
return
|
|
414
424
|
}
|
|
425
|
+
let month_date = this.$refs.paged.$refs.cri.model.last_month_date
|
|
426
|
+
let { last_month_date, next_month_date } = this.getAdjacentMonths(month_date)
|
|
415
427
|
this.area = this.$refs.paged.$refs.cri.model.f_residential_area
|
|
416
428
|
if(this.area.length !== 0){
|
|
417
429
|
let str = JSON.stringify(this.area)
|
|
@@ -434,7 +446,11 @@
|
|
|
434
446
|
let ratio1 = this.ratio-0
|
|
435
447
|
let ratio2 = 0-this.ratio
|
|
436
448
|
let condition = `${args.condition} ` + this.orgCondtionStr + ` and (amount_ratio>=${ratio1} or amount_ratio<=${ratio2})`
|
|
437
|
-
this.model.search(condition,
|
|
449
|
+
this.model.search(condition, {
|
|
450
|
+
last_month_date: last_month_date,
|
|
451
|
+
next_month_date: next_month_date,
|
|
452
|
+
month_date: month_date
|
|
453
|
+
})
|
|
438
454
|
},
|
|
439
455
|
clear() {
|
|
440
456
|
//清空部门和人员
|
|
@@ -447,6 +463,30 @@
|
|
|
447
463
|
})
|
|
448
464
|
this.$refs.paged.$refs.cri.model.f_meter_classify = []
|
|
449
465
|
},
|
|
466
|
+
getAdjacentMonths(monthDate) {
|
|
467
|
+
// 解析年份和月份
|
|
468
|
+
let [year, month] = monthDate.split('-').map(Number)
|
|
469
|
+
|
|
470
|
+
// 计算上一个月
|
|
471
|
+
let lastYear = year
|
|
472
|
+
let lastMonth = month - 1
|
|
473
|
+
if (lastMonth < 1) {
|
|
474
|
+
lastMonth = 12
|
|
475
|
+
lastYear = year - 1
|
|
476
|
+
}
|
|
477
|
+
let last_month_date = `${lastYear}-${String(lastMonth).padStart(2, '0')}`
|
|
478
|
+
|
|
479
|
+
// 计算下一个月
|
|
480
|
+
let nextYear = year
|
|
481
|
+
let nextMonth = month + 1
|
|
482
|
+
if (nextMonth > 12) {
|
|
483
|
+
nextMonth = 1
|
|
484
|
+
nextYear = year + 1
|
|
485
|
+
}
|
|
486
|
+
let next_month_date = `${nextYear}-${String(nextMonth).padStart(2, '0')}`
|
|
487
|
+
|
|
488
|
+
return { last_month_date, next_month_date }
|
|
489
|
+
},
|
|
450
490
|
show() {
|
|
451
491
|
this.criteriaShow = true
|
|
452
492
|
},
|