three-trees-ui 1.0.59 → 1.0.61
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/lib/three-trees-ui.common.js +167 -390
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +167 -390
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/Table/src/Table.vue +1 -1
- package/src/mixins/onlineSubtable.js +0 -283
- package/src/mixins/querySqlPreview.js +32 -40
- package/src/mixins/templatePreview.js +54 -31
- package/src/utils.js +1 -32
package/package.json
CHANGED
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
:highlight-current-row="highlightCurrentRow"
|
|
113
113
|
:row-class-name="rowClassName"
|
|
114
114
|
:cell-class-name="cellClassName"
|
|
115
|
-
:
|
|
115
|
+
:style="{ height: `${tableMaxHeight ? tableMaxHeight : 400}` + 'px' }"
|
|
116
116
|
:row-key="rowKey"
|
|
117
117
|
:show-summary="showSummary"
|
|
118
118
|
:summary-method="getSummaries"
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import SubPagination from '../services/SubPagination.js'
|
|
2
|
-
import utils from '../utils.js'
|
|
3
2
|
|
|
4
3
|
export default {
|
|
5
4
|
data() {
|
|
6
5
|
return {
|
|
7
|
-
searchVal: '', //搜索关键字
|
|
8
6
|
fillOrg: {},
|
|
9
7
|
fillOrgConfMap: {},
|
|
10
8
|
transitionIndex: -1,
|
|
@@ -54,287 +52,6 @@ export default {
|
|
|
54
52
|
}
|
|
55
53
|
},
|
|
56
54
|
methods: {
|
|
57
|
-
//合计计算
|
|
58
|
-
getSummaries(param, list) {
|
|
59
|
-
let CancelTheCalculation = sessionStorage.getItem(
|
|
60
|
-
'Cancel_The_Calculation'
|
|
61
|
-
)
|
|
62
|
-
? JSON.parse(sessionStorage.getItem('Cancel_The_Calculation'))
|
|
63
|
-
: {}
|
|
64
|
-
//
|
|
65
|
-
let listChange = JSON.parse(Base64.decode(list, 'utf-8'))
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
if (listChange.length < 1) {
|
|
70
|
-
return
|
|
71
|
-
}
|
|
72
|
-
const { columns, data } = param
|
|
73
|
-
this.tableData = data
|
|
74
|
-
const sums = []
|
|
75
|
-
let calcProp = []
|
|
76
|
-
let columnsDep = _.cloneDeep(columns)
|
|
77
|
-
listChange.forEach((item, idex) => {
|
|
78
|
-
if (item.addFunc == 'calcFunc') {
|
|
79
|
-
columnsDep.forEach((column, index) => {
|
|
80
|
-
if (
|
|
81
|
-
item.mathExp &&
|
|
82
|
-
item.mathExp.indexOf('.' + column.property) > -1
|
|
83
|
-
) {
|
|
84
|
-
calcProp.push(column.property)
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
columnsDep.forEach((column, index) => {
|
|
90
|
-
if (item.columnField == column.property) {
|
|
91
|
-
column.combinedOption = item
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
columnsDep.forEach((column, index) => {
|
|
97
|
-
if (index === 0 && columnsDep[0].type == 'index') {
|
|
98
|
-
sums[index] = ''
|
|
99
|
-
return
|
|
100
|
-
}
|
|
101
|
-
//当有需要才合计
|
|
102
|
-
if (column.combinedOption) {
|
|
103
|
-
let {
|
|
104
|
-
addFunc,
|
|
105
|
-
columnField,
|
|
106
|
-
name,
|
|
107
|
-
unit,
|
|
108
|
-
showType,
|
|
109
|
-
num,
|
|
110
|
-
tag,
|
|
111
|
-
mainTarget,
|
|
112
|
-
} = column.combinedOption
|
|
113
|
-
|
|
114
|
-
let Bol =
|
|
115
|
-
tag &&
|
|
116
|
-
CancelTheCalculation &&
|
|
117
|
-
CancelTheCalculation[tag] &&
|
|
118
|
-
CancelTheCalculation[tag].length > 0
|
|
119
|
-
const values = data.map((item) => Number(item[column.property]))
|
|
120
|
-
let depValues = _.cloneDeep(values)
|
|
121
|
-
if (Bol) {
|
|
122
|
-
let delMin = []
|
|
123
|
-
depValues.forEach((item, i) => {
|
|
124
|
-
if (!CancelTheCalculation[tag].includes(i)) {
|
|
125
|
-
delMin.push(item)
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
depValues = delMin
|
|
130
|
-
}
|
|
131
|
-
let units = unit ? unit : ''
|
|
132
|
-
//求和
|
|
133
|
-
if (addFunc === 'add') {
|
|
134
|
-
if (!depValues.every((value) => isNaN(value))) {
|
|
135
|
-
sums[index] = depValues.reduce((prev, curr) => {
|
|
136
|
-
const value = Number(curr)
|
|
137
|
-
if (!isNaN(value)) {
|
|
138
|
-
return prev + curr
|
|
139
|
-
} else {
|
|
140
|
-
return prev
|
|
141
|
-
}
|
|
142
|
-
}, 0)
|
|
143
|
-
|
|
144
|
-
sums[index] = this.dealWithDataHtml(
|
|
145
|
-
name,
|
|
146
|
-
sums[index],
|
|
147
|
-
showType,
|
|
148
|
-
num,
|
|
149
|
-
units,
|
|
150
|
-
mainTarget
|
|
151
|
-
)
|
|
152
|
-
} else {
|
|
153
|
-
sums[index] = this.dealWithDataHtml(
|
|
154
|
-
name,
|
|
155
|
-
0,
|
|
156
|
-
showType,
|
|
157
|
-
num,
|
|
158
|
-
units,
|
|
159
|
-
mainTarget
|
|
160
|
-
)
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
//计数
|
|
164
|
-
if (addFunc === 'count') {
|
|
165
|
-
let numCount = values.length
|
|
166
|
-
|
|
167
|
-
if (Bol) {
|
|
168
|
-
numCount = values.length - CancelTheCalculation[tag].length
|
|
169
|
-
}
|
|
170
|
-
sums[index] = this.dealWithDataHtml(
|
|
171
|
-
name,
|
|
172
|
-
numCount,
|
|
173
|
-
showType,
|
|
174
|
-
num,
|
|
175
|
-
units,
|
|
176
|
-
mainTarget
|
|
177
|
-
)
|
|
178
|
-
}
|
|
179
|
-
//平均值
|
|
180
|
-
if (addFunc === 'average') {
|
|
181
|
-
let sum = 0
|
|
182
|
-
var average = 0
|
|
183
|
-
|
|
184
|
-
for (var i = 0; i < depValues.length; i++) {
|
|
185
|
-
sum += depValues[i]
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
depValues.length > 0
|
|
189
|
-
? (average = sum / depValues.length)
|
|
190
|
-
: (average = 0)
|
|
191
|
-
|
|
192
|
-
sums[index] = this.dealWithDataHtml(
|
|
193
|
-
name,
|
|
194
|
-
average,
|
|
195
|
-
showType,
|
|
196
|
-
num,
|
|
197
|
-
units,
|
|
198
|
-
mainTarget
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
|
-
//最大值
|
|
202
|
-
if (addFunc === 'max') {
|
|
203
|
-
let maxNum = Math.max.apply(
|
|
204
|
-
null,
|
|
205
|
-
depValues.length > 0 ? depValues : [0]
|
|
206
|
-
)
|
|
207
|
-
|
|
208
|
-
sums[index] = this.dealWithDataHtml(
|
|
209
|
-
name,
|
|
210
|
-
maxNum,
|
|
211
|
-
showType,
|
|
212
|
-
num,
|
|
213
|
-
units,
|
|
214
|
-
mainTarget
|
|
215
|
-
)
|
|
216
|
-
}
|
|
217
|
-
//最小值
|
|
218
|
-
if (addFunc === 'min') {
|
|
219
|
-
let minNum = Math.min.apply(
|
|
220
|
-
null,
|
|
221
|
-
depValues.length > 0 ? depValues : [0]
|
|
222
|
-
)
|
|
223
|
-
sums[index] = this.dealWithDataHtml(
|
|
224
|
-
name,
|
|
225
|
-
minNum,
|
|
226
|
-
showType,
|
|
227
|
-
num,
|
|
228
|
-
units,
|
|
229
|
-
mainTarget
|
|
230
|
-
)
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
//公式计算
|
|
234
|
-
if (addFunc === 'calcFunc') {
|
|
235
|
-
const calcVal = this.dealCustomCalc(data, column.combinedOption)
|
|
236
|
-
sums[index] = this.dealWithDataHtml(
|
|
237
|
-
name,
|
|
238
|
-
calcVal,
|
|
239
|
-
showType,
|
|
240
|
-
num,
|
|
241
|
-
units,
|
|
242
|
-
mainTarget
|
|
243
|
-
)
|
|
244
|
-
}
|
|
245
|
-
} else if (calcProp.indexOf(column.property) > -1) {
|
|
246
|
-
const values = data.map((item) => Number(item[column.property]))
|
|
247
|
-
}
|
|
248
|
-
})
|
|
249
|
-
|
|
250
|
-
return sums
|
|
251
|
-
},
|
|
252
|
-
//合计行
|
|
253
|
-
handleSummary(summary) {
|
|
254
|
-
return summary && !this.searchVal ? true : false
|
|
255
|
-
},
|
|
256
|
-
dealWithDataHtml(name, type, showType, num, units, mainTarget) {
|
|
257
|
-
let { data, monCap } = this.dealWithData(type, showType, num, mainTarget)
|
|
258
|
-
if (monCap) {
|
|
259
|
-
return name + ':' + data + units + '\n' + monCap
|
|
260
|
-
}
|
|
261
|
-
return name + ':' + data + units
|
|
262
|
-
},
|
|
263
|
-
//处理数据
|
|
264
|
-
dealWithData(data, showType, numfix = 0, mainTarget) {
|
|
265
|
-
data = Number(data)
|
|
266
|
-
|
|
267
|
-
let list = showType
|
|
268
|
-
let num = {
|
|
269
|
-
data: 0,
|
|
270
|
-
monCap: '',
|
|
271
|
-
}
|
|
272
|
-
// 保留小数位
|
|
273
|
-
if (list.includes('keepSmall')) {
|
|
274
|
-
const fixData = data.toFixedRound(numfix)
|
|
275
|
-
num.data = fixData
|
|
276
|
-
if (mainTarget) {
|
|
277
|
-
mainTarget = !mainTarget.startsWith('data.')
|
|
278
|
-
? 'data.' + mainTarget
|
|
279
|
-
: mainTarget
|
|
280
|
-
utils.setValueByConfigKey(this, { trget: mainTarget }, 'trget', data)
|
|
281
|
-
}
|
|
282
|
-
} else {
|
|
283
|
-
if (mainTarget && data != null) {
|
|
284
|
-
mainTarget = !mainTarget.startsWith('data.')
|
|
285
|
-
? 'data.' + mainTarget
|
|
286
|
-
: mainTarget
|
|
287
|
-
utils.setValueByConfigKey(
|
|
288
|
-
this,
|
|
289
|
-
{ trget: mainTarget },
|
|
290
|
-
'trget',
|
|
291
|
-
data.toFixedRound(4)
|
|
292
|
-
)
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
//百分比
|
|
297
|
-
if (list.includes('percentage')) {
|
|
298
|
-
num.data = Number(data * 100) + '%'
|
|
299
|
-
}
|
|
300
|
-
// 千分位
|
|
301
|
-
if (list.includes('Micrometer')) {
|
|
302
|
-
num.data = utils.thousandBit(data)
|
|
303
|
-
}
|
|
304
|
-
if (
|
|
305
|
-
list.includes('keepSmall') &&
|
|
306
|
-
list.includes('percentage') &&
|
|
307
|
-
list.includes('Micrometer')
|
|
308
|
-
) {
|
|
309
|
-
num.data =
|
|
310
|
-
utils.thousandBit(Number(data * 100).toFixedRound(numfix)) + '%'
|
|
311
|
-
|
|
312
|
-
return num
|
|
313
|
-
}
|
|
314
|
-
if (list.includes('keepSmall') && list.includes('percentage')) {
|
|
315
|
-
num.data = Number(data * 100).toFixedRound(numfix) + '%'
|
|
316
|
-
|
|
317
|
-
return num
|
|
318
|
-
}
|
|
319
|
-
if (list.includes('Micrometer') && list.includes('percentage')) {
|
|
320
|
-
num.data = utils.thousandBit(Number(data * 100)) + '%'
|
|
321
|
-
return num
|
|
322
|
-
}
|
|
323
|
-
if (list.includes('keepSmall') && list.includes('Micrometer')) {
|
|
324
|
-
num.data = utils.thousandBit(data.toFixedRound(numfix))
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
// 货币大写
|
|
328
|
-
if (list.includes('monCap')) {
|
|
329
|
-
num = {
|
|
330
|
-
data: data,
|
|
331
|
-
monCap: utils.convertCurrency(data),
|
|
332
|
-
}
|
|
333
|
-
return num
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
return num
|
|
337
|
-
},
|
|
338
55
|
getExpandArr(data, type) {
|
|
339
56
|
if (type === 'expand' && data) {
|
|
340
57
|
let arr = []
|
|
@@ -554,19 +554,11 @@ export default {
|
|
|
554
554
|
? operationType[operation]
|
|
555
555
|
: operation
|
|
556
556
|
} else if (
|
|
557
|
-
typeof $(searchItems[i])
|
|
558
|
-
.children()
|
|
559
|
-
.attr('ht-query') != 'undefined'
|
|
557
|
+
typeof $(searchItems[i]).children().attr('ht-query') != 'undefined'
|
|
560
558
|
) {
|
|
561
559
|
//查询条件类型
|
|
562
|
-
operation = $(searchItems[i])
|
|
563
|
-
|
|
564
|
-
.attr('operation')
|
|
565
|
-
operationMap[
|
|
566
|
-
$(searchItems[i])
|
|
567
|
-
.children()
|
|
568
|
-
.attr('ht-query')
|
|
569
|
-
] =
|
|
560
|
+
operation = $(searchItems[i]).children().attr('operation')
|
|
561
|
+
operationMap[$(searchItems[i]).children().attr('ht-query')] =
|
|
570
562
|
typeof operationType[operation] != 'undefined'
|
|
571
563
|
? operationType[operation]
|
|
572
564
|
: operation
|
|
@@ -588,16 +580,12 @@ export default {
|
|
|
588
580
|
searchItems[i]
|
|
589
581
|
).attr('field-query')
|
|
590
582
|
} else if (
|
|
591
|
-
typeof $(searchItems[i])
|
|
592
|
-
.children()
|
|
593
|
-
.attr('ht-query') != 'undefined'
|
|
583
|
+
typeof $(searchItems[i]).children().attr('ht-query') != 'undefined'
|
|
594
584
|
) {
|
|
595
585
|
//查询条件字段
|
|
596
|
-
fieldQueryMap[
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
.attr('ht-query')
|
|
600
|
-
] = $(searchItems[i])
|
|
586
|
+
fieldQueryMap[$(searchItems[i]).children().attr('ht-query')] = $(
|
|
587
|
+
searchItems[i]
|
|
588
|
+
)
|
|
601
589
|
.children()
|
|
602
590
|
.attr('field-query')
|
|
603
591
|
}
|
|
@@ -619,19 +607,12 @@ export default {
|
|
|
619
607
|
? true
|
|
620
608
|
: false
|
|
621
609
|
} else if (
|
|
622
|
-
typeof $(searchItems[i])
|
|
623
|
-
.children()
|
|
624
|
-
.attr('ht-query') != 'undefined'
|
|
610
|
+
typeof $(searchItems[i]).children().attr('ht-query') != 'undefined'
|
|
625
611
|
) {
|
|
626
612
|
//查询条件字段
|
|
627
|
-
fieldQueryMap[
|
|
628
|
-
$(searchItems[i])
|
|
629
|
-
|
|
630
|
-
.attr('ht-query')
|
|
631
|
-
] =
|
|
632
|
-
typeof $(searchItems[i])
|
|
633
|
-
.children()
|
|
634
|
-
.attr('special-query') != 'undefined'
|
|
613
|
+
fieldQueryMap[$(searchItems[i]).children().attr('ht-query')] =
|
|
614
|
+
typeof $(searchItems[i]).children().attr('special-query') !=
|
|
615
|
+
'undefined'
|
|
635
616
|
? true
|
|
636
617
|
: false
|
|
637
618
|
}
|
|
@@ -727,7 +708,7 @@ export default {
|
|
|
727
708
|
punchOrder() {
|
|
728
709
|
this.$store
|
|
729
710
|
.dispatch('storeProcess/downLoadToFile', 'Batchkeijyo')
|
|
730
|
-
.then(() => {
|
|
711
|
+
.then(() => {})
|
|
731
712
|
},
|
|
732
713
|
beforeAvatarUpload(file) {
|
|
733
714
|
var fileName = new Array()
|
|
@@ -754,7 +735,7 @@ export default {
|
|
|
754
735
|
this.$message.success('送付状成功')
|
|
755
736
|
window.location.reload()
|
|
756
737
|
},
|
|
757
|
-
handlePreview() {
|
|
738
|
+
handlePreview() {},
|
|
758
739
|
//确定导出
|
|
759
740
|
submitExport() {
|
|
760
741
|
if (!this.exportData || this.exportData.expField.length < 1) {
|
|
@@ -772,17 +753,28 @@ export default {
|
|
|
772
753
|
expField += this.exportData.expField[i].fieldName
|
|
773
754
|
}
|
|
774
755
|
expField = Base64.encode(expField).replace(/\+/g, '%2B')
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
756
|
+
const dataTemplateQueryVo = {
|
|
757
|
+
queryFilter: this.queryParam,
|
|
758
|
+
}
|
|
759
|
+
//保存查询参数,用于作为导出的查询参数
|
|
760
|
+
if (this.queryViewOptions) {
|
|
761
|
+
//关联查询字段
|
|
762
|
+
if (
|
|
763
|
+
this.queryViewOptions.selectList &&
|
|
764
|
+
this.queryViewOptions.selectList.length > 0
|
|
765
|
+
) {
|
|
766
|
+
dataTemplateQueryVo.selectList = this.queryViewOptions.selectList
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
779
770
|
let data = {
|
|
780
771
|
sqlAlias: this.sqlAlias || this.queryView.sqlAlias,
|
|
781
772
|
alias: this.alias || this.queryView.alias,
|
|
782
773
|
getType: this.exportData.getType,
|
|
783
774
|
expField: expField,
|
|
775
|
+
query: dataTemplateQueryVo,
|
|
784
776
|
}
|
|
785
|
-
|
|
777
|
+
|
|
786
778
|
let loadingInstance = Loading.service({ fullscreen: true }) //开始
|
|
787
779
|
this.$requestConfig
|
|
788
780
|
.querySqlViewExport(data)
|
|
@@ -1029,9 +1021,9 @@ export default {
|
|
|
1029
1021
|
)
|
|
1030
1022
|
return checkField.length
|
|
1031
1023
|
? checkField.filter(
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1024
|
+
(field) =>
|
|
1025
|
+
field.checked && ['序号', '操作'].indexOf(field.value) == -1
|
|
1026
|
+
)
|
|
1035
1027
|
: customColumns
|
|
1036
1028
|
},
|
|
1037
1029
|
ChangeRecordDialogsShow(FormDataid, templateKey) {
|
|
@@ -11,7 +11,7 @@ const { saveAs } = require('file-saver')
|
|
|
11
11
|
import _ from 'lodash'
|
|
12
12
|
import { decode } from '@/util/base64'
|
|
13
13
|
|
|
14
|
-
const req = function
|
|
14
|
+
const req = function(url, data = {}, option = {}) {
|
|
15
15
|
const requestData = {
|
|
16
16
|
url: url,
|
|
17
17
|
data: data,
|
|
@@ -253,7 +253,7 @@ export default {
|
|
|
253
253
|
deep: true,
|
|
254
254
|
},
|
|
255
255
|
ents: {
|
|
256
|
-
handler: function
|
|
256
|
+
handler: function(newVal, oldValue) {
|
|
257
257
|
if (newVal && newVal.length >= 1 && newVal != oldValue) {
|
|
258
258
|
this.getSubData(this, this.refId)
|
|
259
259
|
}
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
262
262
|
immediate: true,
|
|
263
263
|
},
|
|
264
264
|
templateInfo: {
|
|
265
|
-
handler: function
|
|
265
|
+
handler: function(newVal) {
|
|
266
266
|
if (newVal && newVal.id) {
|
|
267
267
|
let _me = this
|
|
268
268
|
_me.templateInfo = newVal
|
|
@@ -382,13 +382,13 @@ export default {
|
|
|
382
382
|
deep: true,
|
|
383
383
|
immediate: true,
|
|
384
384
|
},
|
|
385
|
-
currentTabName: function
|
|
385
|
+
currentTabName: function(newVal) {
|
|
386
386
|
if (newVal) {
|
|
387
387
|
this.querySubValue = ''
|
|
388
388
|
}
|
|
389
389
|
},
|
|
390
390
|
rows: {
|
|
391
|
-
handler: function
|
|
391
|
+
handler: function(newVal) {
|
|
392
392
|
if (this.templateInfo.defId) {
|
|
393
393
|
let this_ = this
|
|
394
394
|
let boAlias = this.templateInfo.boDefAlias
|
|
@@ -430,8 +430,9 @@ export default {
|
|
|
430
430
|
if (val) {
|
|
431
431
|
this.$nextTick(() => {
|
|
432
432
|
if (document.getElementById('summaryDiv')) {
|
|
433
|
-
this.summaryTableHeight =
|
|
434
|
-
|
|
433
|
+
this.summaryTableHeight = document.getElementById(
|
|
434
|
+
'summaryDiv'
|
|
435
|
+
).clientHeight
|
|
435
436
|
}
|
|
436
437
|
})
|
|
437
438
|
}
|
|
@@ -442,7 +443,7 @@ export default {
|
|
|
442
443
|
//如果当前页面被嵌入iframe里面不显示草稿
|
|
443
444
|
return !this.isJoinFlow
|
|
444
445
|
},
|
|
445
|
-
navbarCollapseStyle: function
|
|
446
|
+
navbarCollapseStyle: function() {
|
|
446
447
|
if (this.asideShow) {
|
|
447
448
|
return { left: '200px' }
|
|
448
449
|
}
|
|
@@ -481,7 +482,7 @@ export default {
|
|
|
481
482
|
})
|
|
482
483
|
this.handelBindFiledValua()
|
|
483
484
|
let this_ = this
|
|
484
|
-
this.$on('data-reload-success', function
|
|
485
|
+
this.$on('data-reload-success', function() {
|
|
485
486
|
this_.calcScriptBtnPermission()
|
|
486
487
|
})
|
|
487
488
|
this.$emit('afterMounted')
|
|
@@ -807,7 +808,7 @@ export default {
|
|
|
807
808
|
this.listSelectable = false
|
|
808
809
|
}
|
|
809
810
|
let _this = this
|
|
810
|
-
setTimeout(function
|
|
811
|
+
setTimeout(function() {
|
|
811
812
|
let tdDom = _this.$el.querySelector('td.right_menu')
|
|
812
813
|
if (
|
|
813
814
|
!tdDom ||
|
|
@@ -912,7 +913,7 @@ export default {
|
|
|
912
913
|
selectList[i].selectValue = value
|
|
913
914
|
|
|
914
915
|
//添加监听
|
|
915
|
-
pInst.$watch(path, function
|
|
916
|
+
pInst.$watch(path, function(newVal, oldVal) {
|
|
916
917
|
// 监听中使用间隔请求,减少请求次数
|
|
917
918
|
clearTimeout(this.timeout)
|
|
918
919
|
this.timeout = setTimeout(() => {
|
|
@@ -935,7 +936,7 @@ export default {
|
|
|
935
936
|
const value = utils.getValueByPath(pInst, path)
|
|
936
937
|
|
|
937
938
|
bindList[i].fillValue = value
|
|
938
|
-
pInst.$watch(path, function
|
|
939
|
+
pInst.$watch(path, function(newVal, oldVal) {
|
|
939
940
|
// 监听中使用间隔请求,减少请求次数
|
|
940
941
|
clearTimeout(this.timeout)
|
|
941
942
|
this.timeout = setTimeout(() => {
|
|
@@ -1193,7 +1194,7 @@ export default {
|
|
|
1193
1194
|
}
|
|
1194
1195
|
let msg = document.createElement('canvas')
|
|
1195
1196
|
|
|
1196
|
-
this.$qrcode.toCanvas(msg, QRCodeurl, function
|
|
1197
|
+
this.$qrcode.toCanvas(msg, QRCodeurl, function(error) {
|
|
1197
1198
|
console.error(error)
|
|
1198
1199
|
})
|
|
1199
1200
|
let _canvas = document.createElement('div')
|
|
@@ -1233,7 +1234,7 @@ export default {
|
|
|
1233
1234
|
.generateAsync({
|
|
1234
1235
|
type: 'blob',
|
|
1235
1236
|
})
|
|
1236
|
-
.then(function
|
|
1237
|
+
.then(function(content) {
|
|
1237
1238
|
let eleLink = document.createElement('a')
|
|
1238
1239
|
eleLink.download = '二维码.zip'
|
|
1239
1240
|
eleLink.style.display = 'none'
|
|
@@ -1286,7 +1287,7 @@ export default {
|
|
|
1286
1287
|
context.scale(2, 2)
|
|
1287
1288
|
return html2canvas(document.querySelector(classs), {
|
|
1288
1289
|
canvas: canvas2,
|
|
1289
|
-
}).then(function
|
|
1290
|
+
}).then(function(canvas) {
|
|
1290
1291
|
resolve(canvas)
|
|
1291
1292
|
})
|
|
1292
1293
|
})
|
|
@@ -1328,7 +1329,7 @@ export default {
|
|
|
1328
1329
|
// Base64.encode(this.$store.state.login.currentUser.account);
|
|
1329
1330
|
let msg = document.getElementById('QRCode')
|
|
1330
1331
|
|
|
1331
|
-
this.$qrcode.toCanvas(msg, this.QRCodeurl, function
|
|
1332
|
+
this.$qrcode.toCanvas(msg, this.QRCodeurl, function(error) {
|
|
1332
1333
|
console.log(error)
|
|
1333
1334
|
})
|
|
1334
1335
|
this.QRCodeShow = true
|
|
@@ -1351,13 +1352,13 @@ export default {
|
|
|
1351
1352
|
this.rowTemplateId = templateId
|
|
1352
1353
|
this.rowId = id
|
|
1353
1354
|
},
|
|
1354
|
-
handleSizeChange: function
|
|
1355
|
+
handleSizeChange: function(size) {
|
|
1355
1356
|
//每页下拉显示数据
|
|
1356
1357
|
this.pagination.page = 1
|
|
1357
1358
|
this.pagination.pageSize = size
|
|
1358
1359
|
this.$refs.multipleTemplateTable.handleFilterChange()
|
|
1359
1360
|
},
|
|
1360
|
-
handleCurrentChange: function
|
|
1361
|
+
handleCurrentChange: function(currentPage) {
|
|
1361
1362
|
//点击第几页
|
|
1362
1363
|
this.pagination.page = currentPage
|
|
1363
1364
|
this.$refs.multipleTemplateTable.handleFilterChange()
|
|
@@ -1876,10 +1877,18 @@ export default {
|
|
|
1876
1877
|
? operationType[operation]
|
|
1877
1878
|
: operation
|
|
1878
1879
|
} else if (
|
|
1879
|
-
typeof $(searchItems[i])
|
|
1880
|
+
typeof $(searchItems[i])
|
|
1881
|
+
.children()
|
|
1882
|
+
.attr('ht-query') != 'undefined'
|
|
1880
1883
|
) {
|
|
1881
|
-
operation = $(searchItems[i])
|
|
1882
|
-
|
|
1884
|
+
operation = $(searchItems[i])
|
|
1885
|
+
.children()
|
|
1886
|
+
.attr('operation')
|
|
1887
|
+
operationMap[
|
|
1888
|
+
$(searchItems[i])
|
|
1889
|
+
.children()
|
|
1890
|
+
.attr('ht-query')
|
|
1891
|
+
] =
|
|
1883
1892
|
typeof operationType[operation] != 'undefined'
|
|
1884
1893
|
? operationType[operation]
|
|
1885
1894
|
: operation
|
|
@@ -1905,10 +1914,18 @@ export default {
|
|
|
1905
1914
|
? operationType[operation]
|
|
1906
1915
|
: operation
|
|
1907
1916
|
} else if (
|
|
1908
|
-
typeof $(searchItems[i])
|
|
1917
|
+
typeof $(searchItems[i])
|
|
1918
|
+
.children()
|
|
1919
|
+
.attr('ht-query') != 'undefined'
|
|
1909
1920
|
) {
|
|
1910
|
-
operation = $(searchItems[i])
|
|
1911
|
-
|
|
1921
|
+
operation = $(searchItems[i])
|
|
1922
|
+
.children()
|
|
1923
|
+
.attr('type')
|
|
1924
|
+
operationMap[
|
|
1925
|
+
$(searchItems[i])
|
|
1926
|
+
.children()
|
|
1927
|
+
.attr('ht-query')
|
|
1928
|
+
] =
|
|
1912
1929
|
typeof operationType[operation] != 'undefined'
|
|
1913
1930
|
? operationType[operation]
|
|
1914
1931
|
: operation
|
|
@@ -1931,12 +1948,19 @@ export default {
|
|
|
1931
1948
|
? true
|
|
1932
1949
|
: false
|
|
1933
1950
|
} else if (
|
|
1934
|
-
typeof $(searchItems[i])
|
|
1951
|
+
typeof $(searchItems[i])
|
|
1952
|
+
.children()
|
|
1953
|
+
.attr('ht-query') != 'undefined'
|
|
1935
1954
|
) {
|
|
1936
1955
|
//查询条件字段
|
|
1937
|
-
fieldQueryMap[
|
|
1938
|
-
|
|
1939
|
-
|
|
1956
|
+
fieldQueryMap[
|
|
1957
|
+
$(searchItems[i])
|
|
1958
|
+
.children()
|
|
1959
|
+
.attr('ht-query')
|
|
1960
|
+
] =
|
|
1961
|
+
typeof $(searchItems[i])
|
|
1962
|
+
.children()
|
|
1963
|
+
.attr('special-query') != 'undefined'
|
|
1940
1964
|
? true
|
|
1941
1965
|
: false
|
|
1942
1966
|
}
|
|
@@ -2004,7 +2028,7 @@ export default {
|
|
|
2004
2028
|
}
|
|
2005
2029
|
},
|
|
2006
2030
|
//回车查询
|
|
2007
|
-
searchEnterFun: function
|
|
2031
|
+
searchEnterFun: function(e) {
|
|
2008
2032
|
let keyCode = window.event ? e.keyCode : e.which
|
|
2009
2033
|
if (keyCode == 13) {
|
|
2010
2034
|
this.search()
|
|
@@ -4079,8 +4103,7 @@ export default {
|
|
|
4079
4103
|
this.printDetail(parameter.templateId, parameter.id, parameter.action)
|
|
4080
4104
|
} else if (btnAlias == 'sub' && this.checkSelect()) {
|
|
4081
4105
|
this.showSubList(this.tableData.selectRows[0].id_, parameter)
|
|
4082
|
-
} else if (btnAlias == 'js') {
|
|
4083
|
-
if (parameter.needValidateSelect && !this.checkSelect()) return
|
|
4106
|
+
} else if (btnAlias == 'js' && this.checkSelect()) {
|
|
4084
4107
|
this.customEvilJS(this.tableData.selectRows[0], parameter.jsValue)
|
|
4085
4108
|
} else if (
|
|
4086
4109
|
btnAlias == 'startFlow' &&
|