manage-client 4.1.97 → 4.1.98-lyls
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/build/dev-server.js +24 -6
- package/package.json +3 -3
- package/src/components/DataGrid.vue +483 -0
- package/src/components/webmeter/instruction/NewQueryInstructHistory.vue +14 -9
- package/src/filiale/WEINAN/BankManager.vue +175 -144
- package/src/filiale/WEINAN/BusinessManage.vue +3 -0
- package/src/filiale/WEINAN/businessquery/abnormalQuery.vue +500 -0
- package/src/filiale/WEINAN/sale.js +2 -0
- package/src/filiale/kelai/NewGasStatistics.vue +98 -26
- package/src/filiale/liaoyuan/HandplanQuery.vue +1 -1
- package/src/filiale/ruihua/config/exportConfig.js +1 -0
- package/src/filiale/tongchuan/GasInspection.vue +18 -7
- package/src/filiale/tongchuan/InspectListGas.vue +11 -5
- package/src/filiale/tongchuan/InspectListUser.vue +22 -6
- package/src/filiale/tongchuan/RecordInfoQuery.vue +1 -1
- package/src/filiale/tongchuan/ResSelectGroupNew.vue +16 -12
- package/src/filiale/tongchuan/RightTree.vue +357 -0
- package/src/filiale/tongchuan/utils/LdapHelper.js +75 -0
- package/src/filiale/xinkang/reportManage.js +4 -0
- package/src/filiale/xinkang/xKGasUsageSummaryNew.vue +176 -0
- package/src/filiale/xinkang/xKGasUserSellingGasNew.vue +176 -0
- package/src/filiale/yangchun/NewGasStatistics.vue +2 -1
- package/.gradle/7.4/checksums/checksums.lock +0 -0
- package/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
- package/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
- package/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/.gradle/7.4/gc.properties +0 -0
- package/.gradle/8.5/checksums/checksums.lock +0 -0
- package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
- package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
- package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
- package/.gradle/8.5/fileChanges/last-build.bin +0 -0
- package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
- package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
- package/.gradle/8.5/gc.properties +0 -0
package/build/dev-server.js
CHANGED
|
@@ -7,32 +7,50 @@ const app = express()
|
|
|
7
7
|
const compiler = webpack(config)
|
|
8
8
|
|
|
9
9
|
const server = 'http://192.168.50.67:31567/'
|
|
10
|
-
const local = 'http://
|
|
10
|
+
const local = 'http://localhost:8080/'
|
|
11
11
|
const proxyTable = {
|
|
12
|
-
'/
|
|
13
|
-
|
|
12
|
+
'/api/af-revenue/logic/openapi/largeDataExport': {
|
|
13
|
+
pathRewrite: {
|
|
14
|
+
'^/api/af-revenue/logic/openapi': '/rs/logic'
|
|
15
|
+
},
|
|
16
|
+
target: local
|
|
17
|
+
},
|
|
18
|
+
'/api/af-revenue/logic/openapi/exportfile': {
|
|
19
|
+
pathRewrite: {
|
|
20
|
+
'^/api/af-revenue/logic/openapi': '/rs/logic'
|
|
21
|
+
},
|
|
22
|
+
target: local
|
|
14
23
|
},
|
|
15
24
|
'/dataManage': {
|
|
16
25
|
target: server
|
|
17
26
|
},
|
|
18
27
|
'/api/af-revenue/sql/': {
|
|
19
28
|
pathRewrite: {
|
|
20
|
-
'^/api/af-revenue': '/'
|
|
29
|
+
'^/api/af-revenue/sql': '/rs/sql'
|
|
21
30
|
},
|
|
22
31
|
target: local
|
|
23
32
|
},
|
|
24
33
|
'/api/af-revenue/report/': {
|
|
25
34
|
pathRewrite: {
|
|
26
|
-
'^/api/af-revenue': '/'
|
|
35
|
+
'^/api/af-revenue': '/rs'
|
|
27
36
|
},
|
|
28
37
|
target: local
|
|
29
38
|
},
|
|
30
39
|
'/api/af-revenue/logic': {
|
|
31
40
|
pathRewrite: {
|
|
32
|
-
'^/api/af-revenue': '/'
|
|
41
|
+
'^/api/af-revenue/logic': '/rs/logic'
|
|
33
42
|
},
|
|
34
43
|
target: local
|
|
35
44
|
},
|
|
45
|
+
// '/api/af-revenue/sql/': {
|
|
46
|
+
// target: local
|
|
47
|
+
// },
|
|
48
|
+
// '/api/af-revenue/report/': {
|
|
49
|
+
// target: local
|
|
50
|
+
// },
|
|
51
|
+
// '/api/af-revenue/logic': {
|
|
52
|
+
// target: local
|
|
53
|
+
// },
|
|
36
54
|
'/api': {
|
|
37
55
|
target: server
|
|
38
56
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manage-client",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.98-lyls",
|
|
4
4
|
"description": "经营管控模块前台组件",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"directories": {
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"style": "0.0.3",
|
|
68
68
|
"style-loader": "^0.20.3",
|
|
69
69
|
"swiper": "^5.4.5",
|
|
70
|
-
"system-clients": "
|
|
70
|
+
"system-clients": "3.2.90-tongchuan",
|
|
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.
|
|
74
|
+
"vue-client": "1.25.29",
|
|
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
|
+
|
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
<div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
|
|
7
7
|
<div class="row">
|
|
8
8
|
<div class="col-sm-2">
|
|
9
|
-
<
|
|
9
|
+
<label class="font_normal_body">组织机构</label>
|
|
10
|
+
<res-select :initresid="$parent.$parent.org"
|
|
11
|
+
style="width:60%"
|
|
12
|
+
@res-select="$parent.$parent.getorg"
|
|
13
|
+
:is-mul=false
|
|
14
|
+
restype='organization'>
|
|
15
|
+
</res-select>
|
|
10
16
|
</div>
|
|
11
17
|
<div class="col-sm-2 form-group ">
|
|
12
18
|
<label class="font_normal_body">客户编号</label>
|
|
@@ -306,11 +312,7 @@
|
|
|
306
312
|
userType:[],
|
|
307
313
|
// instructtype:[],
|
|
308
314
|
// instructstate:[],
|
|
309
|
-
org:
|
|
310
|
-
org:[this.$login.f.orgid],
|
|
311
|
-
dep:[],
|
|
312
|
-
user:[],
|
|
313
|
-
},
|
|
315
|
+
org:[this.$login.f.orgid],
|
|
314
316
|
orgcondition:'',
|
|
315
317
|
show: false,
|
|
316
318
|
condition:'',
|
|
@@ -339,9 +341,12 @@
|
|
|
339
341
|
hidden(){
|
|
340
342
|
this.criteriaShow = !this.criteriaShow
|
|
341
343
|
},
|
|
342
|
-
getorg(
|
|
343
|
-
|
|
344
|
-
|
|
344
|
+
getorg(obj) {
|
|
345
|
+
if(plugins.convertToIn(obj)!==null&&plugins.convertToIn(obj)!==''){
|
|
346
|
+
this.orgcondition = " and f_orgid in " + plugins.convertToIn(obj)
|
|
347
|
+
}else{
|
|
348
|
+
this.orgcondition = " and f_orgid = " + this.$login.f.orgid
|
|
349
|
+
}
|
|
345
350
|
},
|
|
346
351
|
initQueryParam () {
|
|
347
352
|
let arr = []
|