centaline-data-driven 1.3.18 → 1.3.21

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 (31) hide show
  1. package/package.json +1 -1
  2. package/src/Detail.vue +1 -1
  3. package/src/Form.vue +2 -2
  4. package/src/SearchList.vue +4 -2
  5. package/src/centaline/common/index.js +123 -92
  6. package/src/centaline/css/common.css +15 -2
  7. package/src/centaline/dynamicBtn/src/dynamicBtn.vue +8 -0
  8. package/src/centaline/dynamicDetail/src/dynamicContactList.vue +4 -0
  9. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +17 -4
  10. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +83 -149
  11. package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +13 -8
  12. package/src/centaline/dynamicForm/src/dynamicForm.vue +19 -14
  13. package/src/centaline/dynamicLayout/src/dynamicLayout.vue +5 -2
  14. package/src/centaline/dynamicLayout/src/dynamicLayoutChildren.vue +9 -3
  15. package/src/centaline/dynamicLayout/src/dynamicLayoutChildrenFor.vue +7 -2
  16. package/src/centaline/dynamicLayout/src/dynamicLayoutImage.vue +13 -2
  17. package/src/centaline/dynamicLayout/src/dynamicLayoutLabel.vue +7 -2
  18. package/src/centaline/dynamicLayout/src/dynamicLayoutLine.vue +4 -1
  19. package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +6 -2
  20. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1340 -1153
  21. package/src/centaline/loader/src/ctl/CellLayout.js +13 -1
  22. package/src/centaline/loader/src/ctl/Contact.js +1 -1
  23. package/src/centaline/loader/src/ctl/ContactList.js +1 -1
  24. package/src/centaline/loader/src/ctl/Detail.js +22 -0
  25. package/src/centaline/loader/src/ctl/Router.js +35 -31
  26. package/src/centaline/loader/src/ctl/SearchTable.js +1 -1
  27. package/src/centaline/loader/src/ctl/lib/Enum.js +124 -133
  28. package/src/centaline/quickInputSos/src/quickInput.vue +19 -30
  29. package/src/main.js +6 -4
  30. package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
  31. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
@@ -16,7 +16,7 @@
16
16
  <div v-loading="operationLoading">
17
17
  </div>
18
18
  <div class="ct-tableParent" ref="tableParent" v-bind="model.attrs" v-if="!isLoading"
19
- :style="{'height':from=='form'?'100%':model.tableHeight+'px','border-bottom':isLayout?'none':''}"
19
+ :style="{'height':from=='form'?'100%':model.tableHeight+'px','border-bottom':isLayout?'none':'','border-top':isLayout?'none':''}"
20
20
  @scroll="scrollHandle($event)" :v-focus="model.flagFocus"
21
21
  @keydown.up="rowKeyDownHandle($event,0)" @keydown.down="rowKeyDownHandle($event,1)"
22
22
  tabindex="-1">
@@ -150,687 +150,790 @@
150
150
  </div>
151
151
  </template>
152
152
  <script>
153
- import dynamicElement from '../../mixins/dynamicElement';
154
- import dynamicTableTip from './dynamicTableTip.vue';
155
- import dynamicTableToolbar from './dynamicTableToolbar.vue';
156
- import dynamicTableStats from './dynamicTableStats.vue';
157
- import dynamicLayout from '../../dynamicLayout/src/dynamicLayout.vue';
158
- export default {
159
- name: 'ct-searchtable',
160
- mixins: [dynamicElement],
161
- components: {
162
- 'ct-tabletip': dynamicTableTip,
163
- 'ct-tabletoolbar': dynamicTableToolbar,
164
- 'ct-tableStats': dynamicTableStats,
165
- 'ct-layout': dynamicLayout
153
+ import dynamicElement from "../../mixins/dynamicElement";
154
+ import dynamicTableTip from "./dynamicTableTip.vue";
155
+ import dynamicTableToolbar from "./dynamicTableToolbar.vue";
156
+ import dynamicTableStats from "./dynamicTableStats.vue";
157
+ import dynamicLayout from "../../dynamicLayout/src/dynamicLayout.vue";
158
+ export default {
159
+ name: "ct-searchtable",
160
+ mixins: [dynamicElement],
161
+ components: {
162
+ "ct-tabletip": dynamicTableTip,
163
+ "ct-tabletoolbar": dynamicTableToolbar,
164
+ "ct-tableStats": dynamicTableStats,
165
+ "ct-layout": dynamicLayout
166
+ },
167
+ props: {
168
+ vmodel: Object,
169
+ api: String,
170
+ searchStatsApi: String,
171
+ flagFocus: {
172
+ Boolean,
173
+ default: true
166
174
  },
167
- props: {
168
- vmodel: Object,
169
- api: String,
170
- searchStatsApi: String,
171
- flagFocus: {
172
- Boolean,
173
- default: true
174
- },
175
- from: {
176
- String,
177
- default: 'searchlist'
178
- },
179
- },
180
- computed: {
181
-
182
- },
183
- data() {
184
- return {
185
- currentTh: null,
186
- isLoading: true,
187
- isLayout: false,
188
- searchLoading: true,
189
- tableLoading: false,//表格等待
190
- operationLoading: false,//操作等待
191
- tempSearchModel: null,
192
- isBusy: false,
193
- screenComplate: false,
194
- tableComplate: false,
195
- scrollTop: 0,
196
- scrollLeft: 0,
197
- scrollRight: 0,
198
- leftShadow: -1,//左阴影个数
199
- rightShadow: -1,//右阴影个数
200
- currentRow: null,
201
- colHasWidth: {},//有无列宽集合
202
- test: true,
203
- firstRow: 0,//展示出来可视的第一行号
204
- pageRowMin: 0,//页面实际的第一行号
205
- pageRowMax: 100,//页面实际的第后行号
206
- displayRowNumber: 30,
207
- selectAllType: 1,
208
- option: {
209
- isHidden: true,//是否开启操作栏隐藏设置,默认开启
210
- showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
211
- appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
212
- trigger: 'hover',//触发方式,传值可查看Popper UI组件trigger属性
213
- placement: 'right-start',//方向,传值可查看Popper UI组件placement属性
214
- },
175
+ from: {
176
+ String,
177
+ default: "searchlist"
178
+ }
179
+ },
180
+ computed: {},
181
+ data() {
182
+ return {
183
+ currentTh: null,
184
+ isLoading: true,
185
+ isLayout: false,
186
+ searchLoading: true,
187
+ tableLoading: false, //表格等待
188
+ operationLoading: false, //操作等待
189
+ tempSearchModel: null,
190
+ isBusy: false,
191
+ screenComplate: false,
192
+ tableComplate: false,
193
+ scrollTop: 0,
194
+ scrollLeft: 0,
195
+ scrollRight: 0,
196
+ leftShadow: -1, //左阴影个数
197
+ rightShadow: -1, //右阴影个数
198
+ currentRow: null,
199
+ colHasWidth: {}, //有无列宽集合
200
+ test: true,
201
+ firstRow: 0, //展示出来可视的第一行号
202
+ pageRowMin: 0, //页面实际的第一行号
203
+ pageRowMax: 100, //页面实际的第后行号
204
+ displayRowNumber: 30,
205
+ selectAllType: 1,
206
+ option: {
207
+ isHidden: true, //是否开启操作栏隐藏设置,默认开启
208
+ showNum: 3, //如果isHidden为true时,个数大于3就会隐藏,默认是3
209
+ appendId: "", //将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
210
+ trigger: "hover", //触发方式,传值可查看Popper UI组件trigger属性
211
+ placement: "right-start" //方向,传值可查看Popper UI组件placement属性
212
+ }
213
+ };
214
+ },
215
+ activated() {
216
+ this.$nextTick(() => {
217
+ this.setTableHeight();
218
+ });
219
+ },
220
+ methods: {
221
+ rowCheckClass(row) {
222
+ if (row.$select) {
223
+ return "is-checked";
215
224
  }
216
225
  },
217
- activated() {
218
- this.$nextTick(() => {
219
- this.setTableHeight();
220
- })
221
- },
222
- methods: {
223
- rowCheckClass(row) {
224
- if (row.$select) {
225
- return 'is-checked';
226
+ load(data) {
227
+ var self = this;
228
+ self.model = data;
229
+ self.model.$vue = self;
230
+ self.model.columns.forEach((v, vi) => {
231
+ if (v.fixed === "left") {
232
+ self.leftShadow = vi;
226
233
  }
227
- },
228
- load(data) {
229
- var self = this;
230
- self.model = data;
231
- self.model.$vue = self;
232
- self.model.columns.forEach((v, vi) => {
233
- if (v.fixed === 'left') {
234
- self.leftShadow = vi;
235
- }
236
- if (v.fixed === 'right' && self.rightShadow < 0) {
237
- self.rightShadow = vi;
238
- }
239
- if (typeof v.width !== 'undefined') {
240
- self.colHasWidth[vi] = '';
241
- }
242
- else {
243
- self.colHasWidth[vi] = 'nowidth';
244
- }
245
- });
246
- if (typeof self.model.cellLayout !== 'undefined') {
247
- self.isLayout = true;
234
+ if (v.fixed === "right" && self.rightShadow < 0) {
235
+ self.rightShadow = vi;
248
236
  }
249
- self.isLoading = false;
250
- self.$forceUpdate();
251
- this.model.scripts.formData = this.model.formData;
252
- this.model.scripts.formData.formTable = this.model;
253
-
254
- self.$emit('loaded');
255
- self.$emit('showTitle');
256
- if (this.tempSearchModel !== null) {
257
- self.model.searchModel = this.tempSearchModel;
237
+ if (typeof v.width !== "undefined") {
238
+ self.colHasWidth[vi] = "";
239
+ } else {
240
+ self.colHasWidth[vi] = "nowidth";
258
241
  }
259
- //自动查询 调用合并列
260
- if (self.model.rowMergedColumns.length > 0 && self.model.listData.length > 0) {
261
- self.model.setRow(self.model.listData);
262
- }
263
- self.tableComplate = true;
264
- this.setTableHeight();
265
- this.selectAllType = this.model.getSelectAll();
266
-
267
- this.$nextTick(() => {
268
- self.loadStats();
269
- window.addEventListener("resize", (ev) => {
270
- self.setTableHeight();
271
- });
272
- self.rowColorChange();
273
- self.fiexdHead();
274
-
275
- //当表格没有占满表格框时,主动请求下一页
276
- var next = function (rtn) {
277
- if (rtn) {
278
- self.$forceUpdate();
279
- self.$nextTick(() => {
280
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
281
- self.tableLoading = true;
282
- self.model.nextPage(next);
283
- }
284
- else {
285
- self.tableLoading = false;
286
- self.rowColorChange();
287
-
288
- self.calculatingRowHeight();
289
- }
290
- });
291
- }
292
- else {
293
- self.tableLoading = false;
294
- }
295
- }
296
- next(true);
242
+ });
243
+ if (typeof self.model.cellLayout !== "undefined") {
244
+ self.isLayout = true;
245
+ }
246
+ self.isLoading = false;
247
+ self.$forceUpdate();
248
+ this.model.scripts.formData = this.model.formData;
249
+ this.model.scripts.formData.formTable = this.model;
250
+
251
+ self.$emit("loaded");
252
+ self.$emit("showTitle");
253
+ if (this.tempSearchModel !== null) {
254
+ self.model.searchModel = this.tempSearchModel;
255
+ }
256
+ //自动查询 调用合并列
257
+ if (
258
+ self.model.rowMergedColumns.length > 0 &&
259
+ self.model.listData.length > 0
260
+ ) {
261
+ self.model.setRow(self.model.listData);
262
+ }
263
+ self.tableComplate = true;
264
+ this.setTableHeight();
265
+ this.selectAllType = this.model.getSelectAll();
297
266
 
298
- self.setfixedSize();
267
+ this.$nextTick(() => {
268
+ self.loadStats();
269
+ window.addEventListener("resize", ev => {
270
+ self.setTableHeight();
299
271
  });
300
- },
301
- thMouseMoveHandle(ev) {
302
- if (ev.offsetX > ev.currentTarget.offsetWidth - 10) {
303
- ev.currentTarget.style.cursor = 'col-resize';
304
- ev.currentTarget.canResize = true;
305
- }
306
- else {
307
- ev.currentTarget.style.cursor = 'default';
308
- ev.currentTarget.canResize = false;
309
- }
310
- },
311
- thMouseDownHandle(ev, colIndex) {
312
- var self = this;
313
- var col = self.model.columns[colIndex];
314
- if (ev.currentTarget.canResize) {
315
- ev.currentTarget.isDown = true;
316
- ev.currentTarget.oldX = ev.x;
317
- ev.currentTarget.oldWidth = ev.currentTarget.offsetWidth;
318
- this.currentTh = ev.currentTarget;
319
- var MouseUpHandle = function () {
320
- self.currentTh.isDown = false;
321
- self.currentTh = null;
322
- document.removeEventListener("mouseup", MouseUpHandle, false);
323
- document.removeEventListener("mousemove", MouseMoveHandle, false);
324
-
325
- //如果是高度可变的列,重新计算整个表的高度
326
- if (col.autoRowHeight) {
327
- self.model.listData.forEach(v => {
328
- v.$heigth = undefined;
329
- });
330
- self.$nextTick(() => {
331
- self.calculatingRowHeight();
332
- })
333
- }
334
- }
335
- var MouseMoveHandle = function () {
336
- var ev1 = event || e;
337
- if (self.currentTh.isDown) {
338
- if (self.currentTh) {
339
- if (typeof col.width === 'undefined') {
340
- self.colHasWidth[colIndex] = '';
341
- self.$forceUpdate();
342
- self.$nextTick(() => {
343
- var index = self.model.selectIndex;
344
- for (var j = 0; j < self.$refs['rows.' + index][0].children.length; j++) {
345
- self.$refs['rows.' + index][0].children[j].classList.add('select');
346
- }
347
- });
348
- }
272
+ self.rowColorChange();
273
+ self.fiexdHead();
349
274
 
350
- //col.width = (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX));
351
- self.$set(col, "width", (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX)));
352
- if (typeof self.$refs.headTr !== 'undefined' && self.$refs.headTr.length > 0) {
353
- self.currentTh.style.minWidth = col.width + 'px';
354
- self.currentTh.style.width = col.width + 'px';
355
- self.getScrollAttr();
356
- }
357
- }
358
- }
359
- }
360
- document.addEventListener("mouseup", MouseUpHandle, false);
361
- document.addEventListener("mousemove", MouseMoveHandle, false);
362
- }
363
- },
364
- getPage(index) {
365
- var self = this;
366
- if (typeof self.$refs.tableParent !== 'undefined') {
367
- self.$refs.tableParent.scrollTop = 0;
368
- self.$refs.tableParent.scrollLeft = 0;
369
- self.scrollTop = 0;
370
- self.scrollLeft = 0;
371
- }
372
- var next = function (rtn) {
275
+ //当表格没有占满表格框时,主动请求下一页
276
+ var next = function(rtn) {
373
277
  if (rtn) {
374
278
  self.$forceUpdate();
375
279
  self.$nextTick(() => {
376
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
280
+ if (
281
+ self.$refs.tableParent.scrollHeight <=
282
+ self.$refs.tableParent.offsetHeight
283
+ ) {
377
284
  self.tableLoading = true;
378
285
  self.model.nextPage(next);
379
- }
380
- else {
286
+ } else {
381
287
  self.tableLoading = false;
382
288
  self.rowColorChange();
383
- self.resetScroll();
289
+
384
290
  self.calculatingRowHeight();
385
- self.getScrollAttr();
386
291
  }
387
- self.setfixedSize();
388
292
  });
389
- }
390
- else {
293
+ } else {
391
294
  self.tableLoading = false;
392
- self.rowColorChange();
393
295
  }
394
- self.$emit('searchComplate', index);
395
- }
396
- self.tableLoading = true;
296
+ };
297
+ next(true);
397
298
 
398
- this.model.getPage(index, next);
399
- },
400
- toSort(ev, col, action) {
401
- var self = this;
402
- this.model.toSort(col, action, () => {
403
- self.$forceUpdate();
404
- self.getScrollAttr();
405
- });
406
- ev.cancelBubble = true;
407
- ev.stopPropagation();
408
- },
409
- clearSort(ev, col) {
410
- var self = this;
411
- this.model.clearSort(col, () => {
412
- self.$forceUpdate();
413
- self.getScrollAttr();
414
- });
415
- ev.cancelBubble = true;
416
- ev.stopPropagation();
417
- },
418
- fiexdHead() {
419
- this.$nextTick(() => {
420
- var self = this;
421
- var tableCont = this.$refs.tableParent;
422
- function scrollHandle(e) {
423
- self.getScrollAttr();
299
+ self.setfixedSize();
300
+ });
301
+ },
302
+ thMouseMoveHandle(ev) {
303
+ if (ev.offsetX > ev.currentTarget.offsetWidth - 10) {
304
+ ev.currentTarget.style.cursor = "col-resize";
305
+ ev.currentTarget.canResize = true;
306
+ } else {
307
+ ev.currentTarget.style.cursor = "default";
308
+ ev.currentTarget.canResize = false;
309
+ }
310
+ },
311
+ thMouseDownHandle(ev, colIndex) {
312
+ var self = this;
313
+ var col = self.model.columns[colIndex];
314
+ if (ev.currentTarget.canResize) {
315
+ ev.currentTarget.isDown = true;
316
+ ev.currentTarget.oldX = ev.x;
317
+ ev.currentTarget.oldWidth = ev.currentTarget.offsetWidth;
318
+ this.currentTh = ev.currentTarget;
319
+ var MouseUpHandle = function() {
320
+ self.currentTh.isDown = false;
321
+ self.currentTh = null;
322
+ document.removeEventListener("mouseup", MouseUpHandle, false);
323
+ document.removeEventListener("mousemove", MouseMoveHandle, false);
324
+
325
+ //如果是高度可变的列,重新计算整个表的高度
326
+ if (col.autoRowHeight) {
327
+ self.model.listData.forEach(v => {
328
+ v.$heigth = undefined;
329
+ });
330
+ self.$nextTick(() => {
331
+ self.calculatingRowHeight();
332
+ });
424
333
  }
425
- tableCont.addEventListener('scroll', self.getScrollAttr);
426
- });
427
- },
428
- removeScrollEvent() {
429
- var tableCont = this.$refs.tableParent;
430
- //移除事件监听器
431
- tableCont.removeEventListener("scroll", this.getScrollAttr, false);
432
- //tableCont.removeEventListener("scroll", this.scrollHandle, false);
433
- },
434
- addScrollEvent() {
435
- var tableCont = this.$refs.tableParent;
436
- //添加事件监听器
437
- tableCont.addEventListener("scroll", this.getScrollAttr, false);
438
- },
439
- freezeData() {
440
- Object.freeze(this.model.listData);
441
- },
442
- setfixedSize() {
443
- if (typeof this.$refs.headTr !== 'undefined' && this.$refs.headTr.length > 0) {
444
- let fixedSize = 0;
445
- let j = 0;
446
- let fixationThArr = this.$refs.headTr[0].getElementsByClassName('left-fixation-th');
447
- if (fixationThArr.length > 0) {
448
- if (this.model.isMulti) {
449
- fixedSize = fixationThArr[j++].offsetWidth
450
- }
451
- for (let i = 0; i < this.model.columns.length; i++) {
452
- if (this.model.columns[i].fixed === 'left' && this.model.columns[i].show) {
453
- this.model.columns[i].fixedSize = fixedSize;
454
- fixedSize = fixedSize + fixationThArr[j++].offsetWidth;
334
+ };
335
+ var MouseMoveHandle = function() {
336
+ var ev1 = event || e;
337
+ if (self.currentTh.isDown) {
338
+ if (self.currentTh) {
339
+ if (typeof col.width === "undefined") {
340
+ self.colHasWidth[colIndex] = "";
341
+ self.$forceUpdate();
342
+ self.$nextTick(() => {
343
+ var index = self.model.selectIndex;
344
+ for (
345
+ var j = 0;
346
+ j < self.$refs["rows." + index][0].children.length;
347
+ j++
348
+ ) {
349
+ self.$refs["rows." + index][0].children[j].classList.add(
350
+ "select"
351
+ );
352
+ }
353
+ });
455
354
  }
456
- }
457
355
 
458
- fixedSize = 0;
459
- fixationThArr = this.$refs.headTr[0].getElementsByClassName('right-fixation-th');
460
- j = fixationThArr.length - 1;
461
- for (let i = this.model.columns.length - 1; i > 0; i--) {
462
- if (this.model.columns[i].fixed === 'right' && this.model.columns[i].show) {
463
- this.model.columns[i].fixedSize = fixedSize;
464
- fixedSize = fixedSize + fixationThArr[j--].offsetWidth;
356
+ //col.width = (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX));
357
+ self.$set(
358
+ col,
359
+ "width",
360
+ self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX)
361
+ );
362
+ if (
363
+ typeof self.$refs.headTr !== "undefined" &&
364
+ self.$refs.headTr.length > 0
365
+ ) {
366
+ self.currentTh.style.minWidth = col.width + "px";
367
+ self.currentTh.style.width = col.width + "px";
368
+ self.getScrollAttr();
465
369
  }
466
370
  }
467
371
  }
372
+ };
373
+ document.addEventListener("mouseup", MouseUpHandle, false);
374
+ document.addEventListener("mousemove", MouseMoveHandle, false);
375
+ }
376
+ },
377
+ getPage(index) {
378
+ var self = this;
379
+ if (typeof self.$refs.tableParent !== "undefined") {
380
+ self.$refs.tableParent.scrollTop = 0;
381
+ self.$refs.tableParent.scrollLeft = 0;
382
+ self.scrollTop = 0;
383
+ self.scrollLeft = 0;
384
+ }
385
+ var next = function(rtn) {
386
+ if (rtn) {
387
+ self.$forceUpdate();
388
+ self.$nextTick(() => {
389
+ if (
390
+ self.$refs.tableParent.scrollHeight <=
391
+ self.$refs.tableParent.offsetHeight
392
+ ) {
393
+ self.tableLoading = true;
394
+ self.model.nextPage(next);
395
+ } else {
396
+ self.tableLoading = false;
397
+ self.rowColorChange();
398
+ self.resetScroll();
399
+ self.calculatingRowHeight();
400
+ self.getScrollAttr();
401
+ }
402
+ self.setfixedSize();
403
+ });
404
+ } else {
405
+ self.tableLoading = false;
406
+ self.rowColorChange();
407
+ }
408
+ self.$emit("searchComplate", index);
409
+ };
410
+ self.tableLoading = true;
411
+
412
+ this.model.getPage(index, next);
413
+ },
414
+ toSort(ev, col, action) {
415
+ var self = this;
416
+ this.model.toSort(col, action, () => {
417
+ self.$forceUpdate();
418
+ self.getScrollAttr();
419
+ });
420
+ ev.cancelBubble = true;
421
+ ev.stopPropagation();
422
+ },
423
+ clearSort(ev, col) {
424
+ var self = this;
425
+ this.model.clearSort(col, () => {
426
+ self.$forceUpdate();
427
+ self.getScrollAttr();
428
+ });
429
+ ev.cancelBubble = true;
430
+ ev.stopPropagation();
431
+ },
432
+ fiexdHead() {
433
+ this.$nextTick(() => {
434
+ var self = this;
435
+ var tableCont = this.$refs.tableParent;
436
+ function scrollHandle(e) {
437
+ self.getScrollAttr();
468
438
  }
469
- },
470
- getScrollAttr(e) {
471
- if (typeof this.$refs.tableParent !== 'undefined' && typeof this.$refs.headThs !== 'undefined') {
472
-
473
- this.calculatingRowHeight();
474
-
475
- var scrollTop = this.$refs.tableParent.scrollTop;
476
- var scrollLeft = this.$refs.tableParent.scrollLeft;
477
- var scrollRight = this.$refs.tableParent.scrollWidth - scrollLeft - this.$refs.tableParent.clientWidth;
478
-
479
- //计算可视范围的第一条数据
480
- let index = 0;
481
- let topHeigth = 0;
482
- for (; index < this.model.listData.length; index++) {
483
- if (topHeigth >= scrollTop) {
484
- break;
439
+ tableCont.addEventListener("scroll", self.getScrollAttr);
440
+ });
441
+ },
442
+ removeScrollEvent() {
443
+ var tableCont = this.$refs.tableParent;
444
+ //移除事件监听器
445
+ tableCont.removeEventListener("scroll", this.getScrollAttr, false);
446
+ //tableCont.removeEventListener("scroll", this.scrollHandle, false);
447
+ },
448
+ addScrollEvent() {
449
+ var tableCont = this.$refs.tableParent;
450
+ //添加事件监听器
451
+ tableCont.addEventListener("scroll", this.getScrollAttr, false);
452
+ },
453
+ freezeData() {
454
+ Object.freeze(this.model.listData);
455
+ },
456
+ setfixedSize() {
457
+ if (
458
+ typeof this.$refs.headTr !== "undefined" &&
459
+ this.$refs.headTr.length > 0
460
+ ) {
461
+ let fixedSize = 0;
462
+ let j = 0;
463
+ let fixationThArr = this.$refs.headTr[0].getElementsByClassName(
464
+ "left-fixation-th"
465
+ );
466
+ if (fixationThArr.length > 0) {
467
+ if (this.model.isMulti) {
468
+ fixedSize = fixationThArr[j++].offsetWidth;
469
+ }
470
+ for (let i = 0; i < this.model.columns.length; i++) {
471
+ if (
472
+ this.model.columns[i].fixed === "left" &&
473
+ this.model.columns[i].show
474
+ ) {
475
+ this.model.columns[i].fixedSize = fixedSize;
476
+ fixedSize = fixedSize + fixationThArr[j++].offsetWidth;
485
477
  }
486
- else {
487
- topHeigth = topHeigth + this.model.listData[index].$heigth;
478
+ }
479
+
480
+ fixedSize = 0;
481
+ fixationThArr = this.$refs.headTr[0].getElementsByClassName(
482
+ "right-fixation-th"
483
+ );
484
+ j = fixationThArr.length - 1;
485
+ for (let i = this.model.columns.length - 1; i > 0; i--) {
486
+ if (
487
+ this.model.columns[i].fixed === "right" &&
488
+ this.model.columns[i].show
489
+ ) {
490
+ this.model.columns[i].fixedSize = fixedSize;
491
+ fixedSize = fixedSize + fixationThArr[j--].offsetWidth;
488
492
  }
489
493
  }
490
- this.firstRow = index - 1;
491
- this.setTrLazyLoading();
492
- //若每行高度是固定的,可直接使用下面方法即可
493
- //this.firstRow = parseInt(scrollTop / 33);
494
-
495
- this.scrollTop = scrollTop;
496
- this.scrollLeft = scrollLeft;
497
- this.scrollRight = scrollRight;
498
494
  }
499
- },
500
- setTrLazyLoading() {
501
- this.pageRowMax = this.firstRow + this.displayRowNumber;
502
- this.pageRowMin = this.firstRow - this.displayRowNumber;
503
- this.pageRowMin = this.pageRowMin > 0 ? this.pageRowMin : 0;
504
- if (this.pageRowMin > 0 && this.model.listData[this.pageRowMin].$rowspan === 0) {
505
- for (let i = this.pageRowMin; i >= 0; i--) {
506
- if (this.model.listData[i].$rowspan > 0) {
507
- this.pageRowMin = i;
508
- break;
509
- }
495
+ }
496
+ },
497
+ getScrollAttr(e) {
498
+ if (
499
+ typeof this.$refs.tableParent !== "undefined" &&
500
+ typeof this.$refs.headThs !== "undefined"
501
+ ) {
502
+ this.calculatingRowHeight();
503
+
504
+ var scrollTop = this.$refs.tableParent.scrollTop;
505
+ var scrollLeft = this.$refs.tableParent.scrollLeft;
506
+ var scrollRight =
507
+ this.$refs.tableParent.scrollWidth -
508
+ scrollLeft -
509
+ this.$refs.tableParent.clientWidth;
510
+
511
+ //计算可视范围的第一条数据
512
+ let index = 0;
513
+ let topHeigth = 0;
514
+ for (; index < this.model.listData.length; index++) {
515
+ if (topHeigth >= scrollTop) {
516
+ break;
517
+ } else {
518
+ topHeigth = topHeigth + this.model.listData[index].$heigth;
519
+ }
520
+ }
521
+ this.firstRow = index - 1;
522
+ this.setTrLazyLoading();
523
+ //若每行高度是固定的,可直接使用下面方法即可
524
+ //this.firstRow = parseInt(scrollTop / 33);
525
+
526
+ this.scrollTop = scrollTop;
527
+ this.scrollLeft = scrollLeft;
528
+ this.scrollRight = scrollRight;
529
+ }
530
+ },
531
+ setTrLazyLoading() {
532
+ this.pageRowMax = this.firstRow + this.displayRowNumber;
533
+ this.pageRowMin = this.firstRow - this.displayRowNumber;
534
+ this.pageRowMin = this.pageRowMin > 0 ? this.pageRowMin : 0;
535
+ if (
536
+ this.pageRowMin > 0 &&
537
+ this.model.listData[this.pageRowMin].$rowspan === 0
538
+ ) {
539
+ for (let i = this.pageRowMin; i >= 0; i--) {
540
+ if (this.model.listData[i].$rowspan > 0) {
541
+ this.pageRowMin = i;
542
+ break;
510
543
  }
511
544
  }
545
+ }
512
546
 
513
- //let index = this.model.listData.length - 1;
514
- //let isSet = false;
515
- //for (; index >= 0; index--) {
516
- // if (Math.abs(index - this.firstRow) < this.displayRowNumber || typeof (this.model.listData[index].$heigth) === 'undefined') {
517
- // //this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
518
- // }
519
- // else {
520
- // if (index < this.firstRow && !isSet) {
521
- // if (this.model.listData[index].$rowspan === 0) {
522
- // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
523
- // continue;
524
- // }
525
- // else {
526
- // isSet = true;
527
- // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
528
- // continue;
529
- // }
530
- // }
531
- // this.$set(this.model.listData[index], "$trLazyLoadingShow", false);
532
- // }
533
- //}
534
- },
535
- setTableHeight() {
536
- var self = this;
537
- this.$nextTick(() => {
538
- if (this.$refs.searchTable && this.$refs.toolbar && this.$refs.searchTable.parentElement && !self.isLayout) {
539
- var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
540
- var h2 = this.$refs.searchTable.offsetTop | 0;
541
- var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
542
- var h4 = this.$refs.footer.$el.offsetHeight | 0;
543
- var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
544
- var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
545
- var h7 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7 | 0) : 0;
546
- let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - 22;
547
- this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
547
+ //let index = this.model.listData.length - 1;
548
+ //let isSet = false;
549
+ //for (; index >= 0; index--) {
550
+ // if (Math.abs(index - this.firstRow) < this.displayRowNumber || typeof (this.model.listData[index].$heigth) === 'undefined') {
551
+ // //this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
552
+ // }
553
+ // else {
554
+ // if (index < this.firstRow && !isSet) {
555
+ // if (this.model.listData[index].$rowspan === 0) {
556
+ // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
557
+ // continue;
558
+ // }
559
+ // else {
560
+ // isSet = true;
561
+ // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
562
+ // continue;
563
+ // }
564
+ // }
565
+ // this.$set(this.model.listData[index], "$trLazyLoadingShow", false);
566
+ // }
567
+ //}
568
+ },
569
+ setTableHeight() {
570
+ var self = this;
571
+ this.$nextTick(() => {
572
+ if (
573
+ this.$refs.searchTable &&
574
+ this.$refs.toolbar &&
575
+ this.$refs.searchTable.parentElement &&
576
+ !self.isLayout
577
+ ) {
578
+ var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
579
+ var h2 = this.$refs.searchTable.offsetTop | 0;
580
+ var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
581
+ var h4 = this.$refs.footer.$el.offsetHeight | 0;
582
+ var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
583
+ var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
584
+ var h7 = this.$refs.tableStats
585
+ ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0
586
+ : 0;
587
+ let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - 22;
588
+ this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
589
+ this.$nextTick(() => {
590
+ self.getScrollAttr();
591
+ });
592
+ } else {
593
+ if (
594
+ this.$parent.$parent.$vnode.componentOptions.tag ===
595
+ "ct-PropertySimpleDetailRET"
596
+ ) {
597
+ var h1 =
598
+ this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight |
599
+ 0;
600
+ var h2 = 0;
601
+ if (this.$parent.$parent.$refs.contact) {
602
+ h2 = this.$parent.$parent.$refs.contact.offsetHeight | 0;
603
+ }
604
+ var h3 = 0;
605
+ if (this.$parent.$parent.$refs.title) {
606
+ h3 = this.$parent.$parent.$refs.title.offsetHeight | 0;
607
+ }
608
+ var h4 = 0;
609
+ if (this.$parent.$parent.$refs.shortcutFollow) {
610
+ h4 = this.$parent.$parent.$refs.shortcutFollow.offsetHeight | 0;
611
+ }
612
+ let tableHeight = h1 - h2 - h3 - h4 - 290;
613
+ if (h2 == 0) {
614
+ tableHeight = tableHeight + 15;
615
+ }
616
+ this.model.tableHeight = tableHeight;
548
617
  this.$nextTick(() => {
549
618
  self.getScrollAttr();
550
619
  });
551
620
  }
552
- else {
553
- if (this.$parent.$parent.$vnode.componentOptions.tag === 'ct-PropertySimpleDetailRET') {
554
- var h1 = this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight | 0;
555
- var h2 = 0;
556
- if (this.$parent.$parent.$refs.contact) {
557
- h2 = this.$parent.$parent.$refs.contact.offsetHeight | 0;
558
- }
559
- var h3 = 0;
560
- if (this.$parent.$parent.$refs.title) {
561
- h3 = this.$parent.$parent.$refs.title.offsetHeight | 0;
562
- }
563
- var h4 = 0;
564
- if (this.$parent.$parent.$refs.shortcutFollow) {
565
- h4 = this.$parent.$parent.$refs.shortcutFollow.offsetHeight | 0;
566
- }
567
- let tableHeight = h1 - h2 - h3-h4 - 290;
568
- if (h2 == 0) {
569
- tableHeight = tableHeight + 15;
570
- }
571
- this.model.tableHeight = tableHeight;
572
- this.$nextTick(() => {
573
- self.getScrollAttr();
574
- });
575
- }
576
-
577
- }
578
- });
579
- },
580
- scrollHandle(ev) {
581
- var self = this;
582
- if ((this.$refs.tableParent.scrollTop + this.$refs.tableParent.clientHeight) >= (this.$refs.tableParent.scrollHeight - 5)) {
583
- if (!this.isBusy) {
584
- self.isBusy = true;
585
- self.tableLoading = true;
586
- self.model.nextPage((rtn) => {
587
- if (rtn) {
588
- self.getScrollAttr();
589
- self.$forceUpdate();
590
- }
591
- self.isBusy = false;
592
- self.tableLoading = false;
593
- });
594
- }
595
621
  }
596
- this.$emit('scrollHandle',this.$refs.tableParent.scrollTop,this.$refs.tableParent.scrollLeft)
597
- ev.cancelBubble = true;
598
- ev.stopPropagation();
599
- },
600
- rowClickHandle(ev, index) {
601
- this.model.selectIndex = index;
602
- this.rowColorChange();
603
- this.$emit('rowClickHandle');
604
- ev.cancelBubble = true;
605
- ev.stopPropagation();
606
- },
607
- rowColorChange() {
608
- var index = this.model.selectIndex;
609
- if (typeof this.$refs['rows.' + index] !== "undefined" && this.currentRow !== this.$refs['rows.' + index][0]) {
610
- if (this.currentRow !== null) {
611
- for (var i = 0; i < this.currentRow.children.length; i++) {
612
- this.currentRow.children[i].classList.remove('select');
613
- }
614
- }
615
- if (this.$refs['rows.' + index][0]) {
616
- for (var j = 0; j < this.$refs['rows.' + index][0].children.length; j++) {
617
- this.$refs['rows.' + index][0].children[j].classList.add('select');
622
+ });
623
+ },
624
+ scrollHandle(ev) {
625
+ var self = this;
626
+ if (
627
+ this.$refs.tableParent.scrollTop +
628
+ this.$refs.tableParent.clientHeight >=
629
+ this.$refs.tableParent.scrollHeight - 5
630
+ ) {
631
+ if (!this.isBusy) {
632
+ self.isBusy = true;
633
+ self.tableLoading = true;
634
+ self.model.nextPage(rtn => {
635
+ if (rtn) {
636
+ self.getScrollAttr();
637
+ self.$forceUpdate();
618
638
  }
619
- }
620
- this.currentRow = this.$refs['rows.' + index][0] || null;
639
+ self.isBusy = false;
640
+ self.tableLoading = false;
641
+ });
621
642
  }
622
- },
623
- resetScroll: function () {
624
- var self = this;
625
- if (self.$refs.tableParent.scrollTop > self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableHead.offsetHeight) {
626
- self.$refs.tableParent.scrollTop = self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableHead.offsetHeight;
643
+ }
644
+ this.$emit(
645
+ "scrollHandle",
646
+ this.$refs.tableParent.scrollTop,
647
+ this.$refs.tableParent.scrollLeft
648
+ );
649
+ ev.cancelBubble = true;
650
+ ev.stopPropagation();
651
+ },
652
+ rowClickHandle(ev, index) {
653
+ this.model.selectIndex = index;
654
+ this.rowColorChange();
655
+ this.$emit("rowClickHandle");
656
+ ev.cancelBubble = true;
657
+ ev.stopPropagation();
658
+ },
659
+ rowColorChange() {
660
+ var index = this.model.selectIndex;
661
+ if (
662
+ typeof this.$refs["rows." + index] !== "undefined" &&
663
+ this.currentRow !== this.$refs["rows." + index][0]
664
+ ) {
665
+ if (this.currentRow !== null) {
666
+ for (var i = 0; i < this.currentRow.children.length; i++) {
667
+ this.currentRow.children[i].classList.remove("select");
668
+ }
627
669
  }
628
- if (self.$refs.tableParent.scrollTop + self.$refs.tableParent.clientHeight <= self.$refs['rows.' + self.model.selectIndex][0].offsetTop + self.$refs['rows.' + self.model.selectIndex][0].offsetHeight) {
629
- self.$refs.tableParent.scrollTop = self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableParent.clientHeight + self.$refs['rows.' + self.model.selectIndex][0].offsetHeight;
670
+ if (this.$refs["rows." + index][0]) {
671
+ for (
672
+ var j = 0;
673
+ j < this.$refs["rows." + index][0].children.length;
674
+ j++
675
+ ) {
676
+ this.$refs["rows." + index][0].children[j].classList.add("select");
677
+ }
630
678
  }
631
- self.scrollTop = self.$refs.tableParent.scrollTop;
632
- },
633
- rowKeyDownHandle(ev, action) {
634
- var self = this;
635
- if (action === 1) {
636
- this.model.downKey();
679
+ this.currentRow = this.$refs["rows." + index][0] || null;
680
+ }
681
+ },
682
+ resetScroll: function() {
683
+ var self = this;
684
+ if (
685
+ self.$refs.tableParent.scrollTop >
686
+ self.$refs["rows." + self.model.selectIndex][0].offsetTop -
687
+ self.$refs.tableHead.offsetHeight
688
+ ) {
689
+ self.$refs.tableParent.scrollTop =
690
+ self.$refs["rows." + self.model.selectIndex][0].offsetTop -
691
+ self.$refs.tableHead.offsetHeight;
692
+ }
693
+ if (
694
+ self.$refs.tableParent.scrollTop +
695
+ self.$refs.tableParent.clientHeight <=
696
+ self.$refs["rows." + self.model.selectIndex][0].offsetTop +
697
+ self.$refs["rows." + self.model.selectIndex][0].offsetHeight
698
+ ) {
699
+ self.$refs.tableParent.scrollTop =
700
+ self.$refs["rows." + self.model.selectIndex][0].offsetTop -
701
+ self.$refs.tableParent.clientHeight +
702
+ self.$refs["rows." + self.model.selectIndex][0].offsetHeight;
703
+ }
704
+ self.scrollTop = self.$refs.tableParent.scrollTop;
705
+ },
706
+ rowKeyDownHandle(ev, action) {
707
+ var self = this;
708
+ if (action === 1) {
709
+ this.model.downKey();
710
+ } else {
711
+ this.model.upKey();
712
+ }
713
+ this.rowColorChange();
714
+ this.resetScroll();
715
+ this.$emit("rowClickHandle");
716
+ if (!this.isBusy) {
717
+ if (this.model.selectIndex === this.model.listData.length - 1) {
718
+ self.isBusy = true;
719
+ self.tableLoading = true;
720
+ self.model.nextPage(rtn => {
721
+ if (rtn) {
722
+ self.$nextTick(() => {
723
+ self.calculatingRowHeight();
724
+ self.getScrollAttr();
725
+ });
726
+ self.$forceUpdate();
727
+ }
728
+ self.isBusy = false;
729
+ self.tableLoading = false;
730
+ });
637
731
  }
638
- else {
639
- this.model.upKey();
732
+ }
733
+ if (ev) {
734
+ ev.cancelBubble = true;
735
+ ev.stopPropagation();
736
+ ev.preventDefault();
737
+ }
738
+ },
739
+ searchComplate(m, defaultSearch) {
740
+ var self = this;
741
+
742
+ this.$nextTick(function() {
743
+ if (typeof this.api !== "undefined") {
744
+ self.loaderObj.SearchTable(self.api, self.load, m, defaultSearch);
640
745
  }
641
- this.rowColorChange();
642
- this.resetScroll();
643
- this.$emit('rowClickHandle');
644
- if (!this.isBusy) {
645
- if (this.model.selectIndex === this.model.listData.length - 1) {
646
- self.isBusy = true;
647
- self.tableLoading = true;
648
- self.model.nextPage((rtn) => {
649
- if (rtn) {
650
- self.$nextTick(() => {
651
- self.calculatingRowHeight();
652
- self.getScrollAttr();
653
- });
654
- self.$forceUpdate();
655
- }
656
- self.isBusy = false;
657
- self.tableLoading = false;
658
- });
659
- }
746
+ if (typeof this.source !== "undefined") {
747
+ self.load(self.loaderObj.SearchTable(self.source));
660
748
  }
661
- if (ev) {
662
- ev.cancelBubble = true;
663
- ev.stopPropagation();
664
- ev.preventDefault();
749
+ if (typeof self.vmodel !== "undefined") {
750
+ self.load(self.vmodel);
665
751
  }
666
- },
667
- searchComplate(m, defaultSearch) {
668
- var self = this;
669
-
670
- this.$nextTick(function () {
671
-
672
- if (typeof this.api !== 'undefined') {
673
- self.loaderObj.SearchTable(self.api, self.load, m, defaultSearch);
674
- }
675
- if (typeof this.source !== 'undefined') {
676
- self.load(self.loaderObj.SearchTable(self.source));
677
- }
678
- if (typeof self.vmodel !== 'undefined') {
679
- self.load(self.vmodel);
680
- }
681
- });
682
- },
683
- toolbarClickHandler(field) {
684
- let self = this;
685
- let submitData = {};
686
- let action = field.action;
687
-
688
- var tempListData = self.model.getSelectRowData(field);
689
- if (tempListData != null) {
690
- field.submitListField.forEach((k) => {
691
- if (field.isMulti) {
692
- submitData[k] = [];
693
- for (var ri = 0; ri < tempListData.length; ri++) {
694
- submitData[k].push(tempListData[ri][k]);
695
- }
696
- }
697
- else {
698
- submitData[k] = tempListData[0][k];
752
+ });
753
+ },
754
+ toolbarClickHandler(field) {
755
+ let self = this;
756
+ let submitData = {};
757
+ let action = field.action;
758
+
759
+ var tempListData = self.model.getSelectRowData(field);
760
+ if (tempListData != null) {
761
+ field.submitListField.forEach(k => {
762
+ if (field.isMulti) {
763
+ submitData[k] = [];
764
+ for (var ri = 0; ri < tempListData.length; ri++) {
765
+ submitData[k].push(tempListData[ri][k]);
699
766
  }
700
- });
701
-
702
- if (field.isSingle && tempListData.length > 0 && field.actionField) {
703
- action = tempListData[0][field.actionField];
767
+ } else {
768
+ submitData[k] = tempListData[0][k];
704
769
  }
705
- }
770
+ });
706
771
 
707
- if (field.flagAttachSearchCondition) {
708
- submitData['searchFields'] = self.model.searchModel.searchData;
772
+ if (field.isSingle && tempListData.length > 0 && field.actionField) {
773
+ action = tempListData[0][field.actionField];
709
774
  }
775
+ }
710
776
 
711
- //如果是导出按钮,则直接交给父组件处理
712
- if (field.isExport) {
713
- self.$emit('toolbarClick', field, submitData);
714
- return;
715
- }
777
+ if (field.flagAttachSearchCondition) {
778
+ submitData["searchFields"] = self.model.searchModel.searchData;
779
+ }
716
780
 
717
- this.routerClickHandler(field, submitData, action);
718
- },
719
- rolRouterClickHandler(field, rowData, rowindex) {
720
- if (this.$refs['popover' + rowindex]) {
721
- this.$refs['popover' + rowindex][0].doClose();
722
- }
781
+ //如果是导出按钮,则直接交给父组件处理
782
+ if (field.isExport) {
783
+ self.$emit("toolbarClick", field, submitData);
784
+ return;
785
+ }
723
786
 
724
- var self = this;
725
- var submitData = {};
726
- field.submitListField.forEach((k) => {
727
- submitData[k] = rowData[k];
728
- });
787
+ this.routerClickHandler(field, submitData, action);
788
+ },
789
+ rolRouterClickHandler(field, rowData, rowindex) {
790
+ if (this.$refs["popover" + rowindex]) {
791
+ this.$refs["popover" + rowindex][0].doClose();
792
+ }
729
793
 
730
- let action = field.action;
731
- if (field.actionField) {
732
- action = rowData[field.actionField];
733
- }
794
+ var self = this;
795
+ var submitData = {};
796
+ field.submitListField.forEach(k => {
797
+ submitData[k] = rowData[k];
798
+ });
734
799
 
735
- this.routerClickHandler(field, submitData, action);
736
- },
737
- routerClickHandler(field, submitData, action) {
738
- let self = this;
739
- action = action || field.action;
800
+ let action = field.action;
801
+ if (field.actionField) {
802
+ action = rowData[field.actionField];
803
+ }
740
804
 
741
- var clickAcion = function () {
742
- //若不是客户端方法,则直接访问接口
743
- if (!field.isClientFuntion) {
744
- // 外部框架tab页打开
745
- if (field.isFormPageInTab) {
746
- submitData = field.getActionPara(submitData).para;
747
- if (field.pageStyle) {
748
- submitData.pageStyle = field.pageStyle;
749
- }
750
- self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
751
- }
752
- else if (field.isSearchPageInTab) {// 外部框架tab页打开
753
- submitData = field.getActionPara(submitData).para;
754
- self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
755
- }
756
- else if (field.isBrowserNewTab) {// 浏览器打开
757
- submitData = field.getActionPara(submitData).para;
758
- let query = self.$common.objectToQueryStr(submitData);
759
- window.open(action + query, "_blank");
760
- }
761
- else if (field.isOpenUrlInBrowse) {// 浏览器打开
762
- window.open(submitData[field.submitFormField], "_blank");
763
- }
764
- else if (field.isSeeVoice) {//看视频
765
- self.$common.browseVideo(field,submitData)
805
+ this.routerClickHandler(field, submitData, action);
806
+ },
807
+ routerClickHandler(field, submitData, action) {
808
+ let self = this;
809
+ action = action || field.action;
810
+ var clickAcion = function() {
811
+ //若不是客户端方法,则直接访问接口
812
+ if (!field.isClientFuntion) {
813
+ // 外部框架tab页打开
814
+ if (field.isFormPageInTab) {
815
+ submitData = field.getActionPara(submitData).para;
816
+ if (field.pageStyle) {
817
+ submitData.pageStyle = field.pageStyle;
766
818
  }
767
- else if (field.isUrlInLayer) {//URL页面(弹层)
768
- var dialogOption = {
769
- title: field.pageTitle,
770
- pane: self.$common.getParentPane(self),
771
- content: [{
772
- component: 'ct-iframe',
773
- attrs: {
774
- src: submitData[field.submitListField],
775
- width: field.dialogWidth + 'px',
776
- height: field.dialogHeight + 'px'
819
+ self.$common
820
+ .getDataDrivenOpts()
821
+ .handler.openTab(
822
+ action,
823
+ submitData,
824
+ field.pageTitle,
825
+ self.model,
826
+ field.dialogWidth
827
+ );
828
+ }
829
+ else if (field.isSearchPageInTab) {
830
+ // 外部框架tab页打开
831
+ submitData = field.getActionPara(submitData).para;
832
+ self.$common
833
+ .getDataDrivenOpts()
834
+ .handler.openTabSearch(field, submitData);
835
+ }
836
+ else if (field.isBrowserNewTab) {
837
+ // 浏览器打开
838
+ submitData = field.getActionPara(submitData).para;
839
+ let query = self.$common.objectToQueryStr(submitData);
840
+ window.open(action + query, "_blank");
841
+ }
842
+ else if (field.isOpenUrlInBrowse) {
843
+ // 浏览器打开
844
+ window.open(submitData[field.submitFormField], "_blank");
845
+ }
846
+ else if (field.isSeeVoice) {
847
+ //看视频
848
+ self.$common.browseVideo(field, submitData);
849
+ }
850
+ else if (field.isBrowseAttachment) {
851
+ //浏览附件
852
+ var MediaAlbum = [
853
+ { albumName: self.model.title || "媒体", medias: [] }
854
+ ];
855
+ submitData.mediaData.forEach(v => {
856
+ MediaAlbum[0].medias.push(v);
857
+ });
858
+ self.$common.viewerfile(field, MediaAlbum, 0, 0);
859
+ }
860
+ else if (field.isUrlInLayer) {
861
+ //URL页面(弹层)
862
+ var dialogOption = {
863
+ title: field.pageTitle,
864
+ pane: self.$common.getParentPane(self),
865
+ content: [
866
+ {
867
+ component: "ct-iframe",
868
+ attrs: {
869
+ src: submitData[field.submitListField],
870
+ width: field.dialogWidth + "px",
871
+ height: field.dialogHeight + "px"
872
+ },
873
+ on: {
874
+ new(id) {
875
+ field.flagAddRowAfterAction = true;
876
+ field.flagFreshCurrentRow = false;
877
+ var res = { responseData: { content: id } };
878
+ self.updateCurrentRow(field, res);
879
+ self.$forceUpdate();
880
+ self.$refs.footer.$forceUpdate();
881
+ self.$common.closeDialog(dialogOption.dialog);
777
882
  },
778
- on: {
779
- new(id) {
780
- field.flagAddRowAfterAction=true;
781
- field.flagFreshCurrentRow=false;
782
- var res={responseData:{content:id}};
783
- self.updateCurrentRow(field, res);
784
- self.$forceUpdate();
785
- self.$refs.footer.$forceUpdate();
786
- self.$common.closeDialog(dialogOption.dialog);
787
- },
788
- update() {
789
- field.flagAddRowAfterAction=false;
790
- field.flagFreshCurrentRow=true;
791
- self.updateCurrentRow(field, null);
792
- self.$common.closeDialog(dialogOption.dialog);
793
- },
794
- delete() {
795
- var res={};
796
- res.notification=4;
797
- res.content=self.model.listData[self.model.selectIndex][self.model.primaryKey];
798
- self.model.doAction(res);
799
- self.$common.closeDialog(dialogOption.dialog);
800
- },
801
- refreshParent() {
802
- self.getPage(1);
803
- self.$common.closeDialog(dialogOption.dialog);
804
- },
805
- closeDialog() {
806
- self.$common.closeDialog(dialogOption.dialog);
807
- },
883
+ update() {
884
+ field.flagAddRowAfterAction = false;
885
+ field.flagFreshCurrentRow = true;
886
+ self.updateCurrentRow(field, null);
887
+ self.$common.closeDialog(dialogOption.dialog);
888
+ },
889
+ delete() {
890
+ var res = {};
891
+ res.notification = 4;
892
+ res.content =
893
+ self.model.listData[self.model.selectIndex][
894
+ self.model.primaryKey
895
+ ];
896
+ self.model.doAction(res);
897
+ self.$common.closeDialog(dialogOption.dialog);
898
+ },
899
+ refreshParent() {
900
+ self.getPage(1);
901
+ self.$common.closeDialog(dialogOption.dialog);
902
+ },
903
+ closeDialog() {
904
+ self.$common.closeDialog(dialogOption.dialog);
808
905
  }
809
- }]
810
- };
811
- self.$common.openDialog(dialogOption);
812
- }
813
- else {
814
- //self.operationLoading = true;
815
-
816
- //Form
817
- if (field.isOpenForm) {
818
- var dialogOption = {
819
- title: field.pageTitle,
820
- pane: self.$common.getParentPane(self),
821
- content: [{
906
+ }
907
+ }
908
+ ]
909
+ };
910
+ self.$common.openDialog(dialogOption);
911
+ }
912
+ else {
913
+ //self.operationLoading = true;
914
+
915
+ //Form
916
+ if (field.isOpenForm) {
917
+ var dialogOption = {
918
+ title: field.pageTitle,
919
+ pane: self.$common.getParentPane(self),
920
+ content: [
921
+ {
822
922
  component: field.navToNewPageName,
823
923
  attrs: {
824
924
  //source: data.content,
825
925
  api: action,
826
926
  apiParam: field.getActionPara(submitData).para,
827
927
  showTitle: false,
828
- width: field.dialogWidth + 'px',
829
- height: field.dialogHeight + 'px'
928
+ width: field.dialogWidth + "px",
929
+ height: field.dialogHeight + "px"
830
930
  },
831
931
  on: {
832
932
  submit(ev) {
833
- if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
933
+ if (
934
+ !field.flagFreshCurrentRow &&
935
+ !field.flagAddRowAfterAction
936
+ ) {
834
937
  self.model.doAction(ev);
835
938
  }
836
939
  self.$forceUpdate();
@@ -846,23 +949,25 @@
846
949
  self.updateCurrentRow(field);
847
950
  }
848
951
  }
849
- }]
850
- };
851
- self.$common.openDialog(dialogOption);
852
- }
853
- //SearchList
854
- else if (field.isOpenList) {
855
- var dialogOption = {
856
- title: field.pageTitle,
857
- pane: self.$common.getParentPane(self),
858
- content: [{
952
+ }
953
+ ]
954
+ };
955
+ self.$common.openDialog(dialogOption);
956
+ }
957
+ //SearchList
958
+ else if (field.isOpenList) {
959
+ var dialogOption = {
960
+ title: field.pageTitle,
961
+ pane: self.$common.getParentPane(self),
962
+ content: [
963
+ {
859
964
  component: field.navToNewPageName,
860
965
  attrs: {
861
966
  searchConditionApi: field.actionForSearchLayout,
862
967
  searchDataApi: field.actionForSearch,
863
968
  apiParam: submitData,
864
- width: field.dialogWidth + 'px',
865
- height: field.dialogHeight + 'px'
969
+ width: field.dialogWidth + "px",
970
+ height: field.dialogHeight + "px"
866
971
  },
867
972
  on: {
868
973
  refreshParent() {
@@ -873,148 +978,178 @@
873
978
  self.updateCurrentRow(field);
874
979
  }
875
980
  }
876
- }]
877
- };
878
- self.$common.openDialog(dialogOption);
879
- }
880
- //Tabs
881
- else if (field.isOpenTabs) {
882
- var dialogOption = {
883
- title: field.pageTitle,
884
- pane: self.$common.getParentPane(self),
885
- content: [{
981
+ }
982
+ ]
983
+ };
984
+ self.$common.openDialog(dialogOption);
985
+ }
986
+ //Tabs
987
+ else if (field.isOpenTabs) {
988
+ var dialogOption = {
989
+ title: field.pageTitle,
990
+ pane: self.$common.getParentPane(self),
991
+ content: [
992
+ {
886
993
  component: field.navToNewPageName,
887
994
  attrs: {
888
995
  searchConditionApi: field.actionForSearchLayout,
889
996
  searchDataApi: field.actionForSearch,
890
997
  apiParam: submitData,
891
- width: field.dialogWidth + 'px',
892
- height: field.dialogHeight + 'px'
998
+ width: field.dialogWidth + "px",
999
+ height: field.dialogHeight + "px"
893
1000
  },
894
- on: {
895
- }
896
- }]
897
- };
898
- self.$common.openDialog(dialogOption);
899
- }
900
- else {
901
- self.operationLoading = true;
902
- field.doAction(submitData, (data) => {
903
- self.operationLoading = false;
904
- if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
905
- self.model.doAction({ responseData: data });
1001
+ on: {}
906
1002
  }
907
- self.$forceUpdate();
908
- self.$refs.footer.$forceUpdate();
909
- self.updateCurrentRow(field, data);
910
- })
911
- }
1003
+ ]
1004
+ };
1005
+ self.$common.openDialog(dialogOption);
1006
+ }
1007
+ else {
1008
+ self.operationLoading = true;
1009
+ field.doAction(submitData, data => {
1010
+ self.operationLoading = false;
1011
+ if ( !field.flagFreshCurrentRow &&!field.flagAddRowAfterAction) {
1012
+ self.model.doAction({ responseData: data });
1013
+ self.$emit("refreshRowHandle");
1014
+ }
1015
+ self.$forceUpdate();
1016
+ self.$refs.footer.$forceUpdate();
1017
+ self.updateCurrentRow(field, data);
1018
+ });
912
1019
  }
913
1020
  }
914
- //执行客户端脚本
915
- else {
916
- // let parm={submitData:submitData,field:field}
917
- // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
918
- // var fun = self.model.scripts.formData[action];
919
- // fun(submitData,field);
920
- let title = field.pageTitle == undefined ? field.label : field.pageTitle;
921
- submitData.actionType = field.actionType;
922
- var fun = self.$common.getDataDrivenOpts().handler[action];
923
- fun(submitData, title, self.$parent);
924
- }
925
1021
  }
1022
+ //执行客户端脚本
1023
+ else {
1024
+ // let parm={submitData:submitData,field:field}
1025
+ // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
1026
+ // var fun = self.model.scripts.formData[action];
1027
+ // fun(submitData,field);
1028
+ let title =
1029
+ field.pageTitle == undefined ? field.label : field.pageTitle;
1030
+ submitData.actionType = field.actionType;
1031
+ var fun = self.$common.getDataDrivenOpts().handler[action];
1032
+ fun(submitData, title, self.$parent);
1033
+ }
1034
+ };
926
1035
 
927
- if (field.alert) {
928
- self.$common.confirm(field.alertMsg, field.alertCaption, {
1036
+ if (field.alert) {
1037
+ self.$common
1038
+ .confirm(field.alertMsg, field.alertCaption, {
929
1039
  confirmButtonText: field.alertOKButtonText,
930
1040
  cancelButtonText: field.alertCancelButtonText,
931
1041
  //type: 'warning'
932
1042
  center: field.alertCenter
933
- }).then(() => {
1043
+ })
1044
+ .then(() => {
934
1045
  clickAcion();
935
- }).catch(() => {
936
- });
937
- }
938
- else {
939
- clickAcion();
940
- }
941
- },
942
- rolRouterCellClickHandler(routerKey, rowindex, forname, forrowindex) {
943
- var self = this;
944
- var submitData = {};
945
- var rowData = self.model.listData[rowindex];
946
- var actionRouter = self.model.actionRouter;
947
- let field = actionRouter.find(b => {
948
- return b.id === routerKey;
1046
+ })
1047
+ .catch(() => {});
1048
+ }
1049
+ else {
1050
+ clickAcion();
1051
+ }
1052
+ },
1053
+ rolRouterCellClickHandler(routerKey, rowindex, forname, forrowindex) {
1054
+ var self = this;
1055
+ var submitData = {};
1056
+ var rowData = self.model.listData[rowindex];
1057
+ var actionRouter = self.model.actionRouter;
1058
+ let field = actionRouter.find(b => {
1059
+ return b.id === routerKey;
1060
+ });
1061
+ if (typeof forname !== "undefined") {
1062
+ field.submitListField.forEach(k => {
1063
+ submitData[k] = rowData[forname][forrowindex][k];
949
1064
  });
950
- if (typeof forname !== "undefined") {
951
- field.submitListField.forEach((k) => {
952
- submitData[k] = rowData[forname][forrowindex][k];
953
- });
954
- }
955
- else {
956
- field.submitListField.forEach((k) => {
957
- submitData[k] = rowData[k];
958
- });
959
- }
960
- let action = field.action;
961
- if (field.actionField) {
962
- action = rowData[field.actionField];
963
- }
964
- self.model.selectIndex = rowindex;
965
- this.routerCellClickHandler(field, submitData, action, rowindex, forname, forrowindex);
966
- },
967
- routerCellClickHandler(field, submitData, action, rowindex, forname, forrowindex) {
968
- let self = this;
969
- action = action || field.action;
970
-
971
- var clickAcion = function () {
972
- //若不是客户端方法,则直接访问接口
973
- if (!field.isClientFuntion) {
974
- // 外部框架tab页打开
975
- if (field.isFormPageInTab) {
976
- submitData = field.getActionPara(submitData).para;
977
- if (field.pageStyle) {
978
- submitData.pageStyle = field.pageStyle;
979
- }
980
- self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
981
- }
982
- else if (field.isSearchPageInTab) {// 外部框架tab页打开
983
- submitData = field.getActionPara(submitData).para;
984
- self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
985
- }
986
- else if (field.isBrowserNewTab) {// 浏览器打开
987
- submitData = field.getActionPara(submitData).para;
988
- let query = self.$common.objectToQueryStr(submitData);
989
- window.open(action + query, "_blank");
990
- }
991
- else if (field.isOpenUrlInBrowse) {// 浏览器打开
992
- window.open(submitData[field.submitFormField], "_blank");
993
- }
994
- else if (field.isSeeVoice) {//看视频
995
- self.$common.browseVideo(field,submitData)
1065
+ } else {
1066
+ field.submitListField.forEach(k => {
1067
+ submitData[k] = rowData[k];
1068
+ });
1069
+ }
1070
+ let action = field.action;
1071
+ if (field.actionField) {
1072
+ action = rowData[field.actionField];
1073
+ }
1074
+ self.model.selectIndex = rowindex;
1075
+ this.routerCellClickHandler(
1076
+ field,
1077
+ submitData,
1078
+ action,
1079
+ rowindex,
1080
+ forname,
1081
+ forrowindex
1082
+ );
1083
+ },
1084
+ routerCellClickHandler( field, submitData, action, rowindex, forname,forrowindex) {
1085
+ let self = this;
1086
+ action = action || field.action;
1087
+
1088
+ var clickAcion = function() {
1089
+ //若不是客户端方法,则直接访问接口
1090
+ if (!field.isClientFuntion) {
1091
+ // 外部框架tab页打开
1092
+ if (field.isFormPageInTab) {
1093
+ submitData = field.getActionPara(submitData).para;
1094
+ if (field.pageStyle) {
1095
+ submitData.pageStyle = field.pageStyle;
996
1096
  }
997
- else {
998
- //self.operationLoading = true;
999
-
1000
- //Form
1001
- if (field.isOpenForm) {
1002
- var dialogOption = {
1003
- title: field.pageTitle,
1004
- pane: self.$common.getParentPane(self),
1005
- content: [{
1097
+ self.$common
1098
+ .getDataDrivenOpts()
1099
+ .handler.openTab(
1100
+ action,
1101
+ submitData,
1102
+ field.pageTitle,
1103
+ self.model,
1104
+ field.dialogWidth
1105
+ );
1106
+ }
1107
+ else if (field.isSearchPageInTab) {
1108
+ // 外部框架tab页打开
1109
+ submitData = field.getActionPara(submitData).para;
1110
+ self.$common
1111
+ .getDataDrivenOpts()
1112
+ .handler.openTabSearch(field, submitData);
1113
+ }
1114
+ else if (field.isBrowserNewTab) {
1115
+ // 浏览器打开
1116
+ submitData = field.getActionPara(submitData).para;
1117
+ let query = self.$common.objectToQueryStr(submitData);
1118
+ window.open(action + query, "_blank");
1119
+ }
1120
+ else if (field.isOpenUrlInBrowse) {
1121
+ // 浏览器打开
1122
+ window.open(submitData[field.submitFormField], "_blank");
1123
+ }
1124
+ else if (field.isSeeVoice) {
1125
+ //看视频
1126
+ self.$common.browseVideo(field, submitData);
1127
+ }
1128
+ else {
1129
+ //self.operationLoading = true;
1130
+
1131
+ //Form
1132
+ if (field.isOpenForm) {
1133
+ var dialogOption = {
1134
+ title: field.pageTitle,
1135
+ pane: self.$common.getParentPane(self),
1136
+ content: [
1137
+ {
1006
1138
  component: field.navToNewPageName,
1007
1139
  attrs: {
1008
1140
  //source: data.content,
1009
1141
  api: action,
1010
1142
  apiParam: field.getActionPara(submitData).para,
1011
1143
  showTitle: false,
1012
- width: field.dialogWidth + 'px',
1013
- height: field.dialogHeight + 'px'
1144
+ width: field.dialogWidth + "px",
1145
+ height: field.dialogHeight + "px"
1014
1146
  },
1015
1147
  on: {
1016
1148
  submit(ev) {
1017
- if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
1149
+ if (
1150
+ !field.flagFreshCurrentRow &&
1151
+ !field.flagAddRowAfterAction
1152
+ ) {
1018
1153
  self.model.doAction(ev);
1019
1154
  }
1020
1155
  self.$forceUpdate();
@@ -1029,23 +1164,25 @@
1029
1164
  self.updateCurrentRow(field);
1030
1165
  }
1031
1166
  }
1032
- }]
1033
- };
1034
- self.$common.openDialog(dialogOption);
1035
- }
1036
- //SearchList
1037
- else if (field.isOpenList) {
1038
- var dialogOption = {
1039
- title: field.pageTitle,
1040
- pane: self.$common.getParentPane(self),
1041
- content: [{
1167
+ }
1168
+ ]
1169
+ };
1170
+ self.$common.openDialog(dialogOption);
1171
+ }
1172
+ //SearchList
1173
+ else if (field.isOpenList) {
1174
+ var dialogOption = {
1175
+ title: field.pageTitle,
1176
+ pane: self.$common.getParentPane(self),
1177
+ content: [
1178
+ {
1042
1179
  component: field.navToNewPageName,
1043
1180
  attrs: {
1044
1181
  searchConditionApi: field.actionForSearchLayout,
1045
1182
  searchDataApi: field.actionForSearch,
1046
1183
  apiParam: submitData,
1047
- width: field.dialogWidth + 'px',
1048
- height: field.dialogHeight + 'px'
1184
+ width: field.dialogWidth + "px",
1185
+ height: field.dialogHeight + "px"
1049
1186
  },
1050
1187
  on: {
1051
1188
  refreshParent() {
@@ -1056,451 +1193,501 @@
1056
1193
  self.updateCurrentRow(field);
1057
1194
  }
1058
1195
  }
1059
- }]
1060
- };
1061
- self.$common.openDialog(dialogOption);
1062
- }
1063
- //Tabs
1064
- else if (field.isOpenTabs) {
1065
- var dialogOption = {
1066
- title: field.pageTitle,
1067
- pane: self.$common.getParentPane(self),
1068
- content: [{
1196
+ }
1197
+ ]
1198
+ };
1199
+ self.$common.openDialog(dialogOption);
1200
+ }
1201
+ //Tabs
1202
+ else if (field.isOpenTabs) {
1203
+ var dialogOption = {
1204
+ title: field.pageTitle,
1205
+ pane: self.$common.getParentPane(self),
1206
+ content: [
1207
+ {
1069
1208
  component: field.navToNewPageName,
1070
1209
  attrs: {
1071
1210
  searchConditionApi: field.actionForSearchLayout,
1072
1211
  searchDataApi: field.actionForSearch,
1073
1212
  apiParam: submitData,
1074
- width: field.dialogWidth + 'px',
1075
- height: field.dialogHeight + 'px'
1213
+ width: field.dialogWidth + "px",
1214
+ height: field.dialogHeight + "px"
1076
1215
  },
1077
- on: {
1078
- }
1079
- }]
1080
- };
1081
- self.$common.openDialog(dialogOption);
1082
- }
1083
- else {
1084
- field.doAction(submitData, (data) => {
1085
- self.model.doAction(data, field);
1086
- if (field.actionType === 19) {
1087
- self.callTelClick(self.$refs['layout' + rowindex][0], data, forname, forrowindex)
1216
+ on: {}
1088
1217
  }
1089
- })
1090
- }
1218
+ ]
1219
+ };
1220
+ self.$common.openDialog(dialogOption);
1221
+ }
1222
+ else {
1223
+ field.doAction(submitData, data => {
1224
+ self.model.doAction(data, field);
1225
+ if (field.actionType === 19) {
1226
+ if (self.model.currentCallTellayout) {
1227
+ self.closeCallTel(
1228
+ self.$refs[self.model.currentCallTellayout][0]
1229
+ );
1230
+ }
1231
+ self.model.currentCallTellayout = "layout" + rowindex;
1232
+ self.model.currentCallTelrouter =
1233
+ "router" + forname + forrowindex;
1234
+ self.callTelClick(
1235
+ self.$refs["layout" + rowindex][0],
1236
+ data,
1237
+ forname,
1238
+ forrowindex
1239
+ );
1240
+ }
1241
+ });
1091
1242
  }
1092
1243
  }
1093
- //执行客户端脚本
1094
- else {
1095
- // let parm={submitData:submitData,field:field}
1096
- // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
1097
- let title = field.pageTitle == undefined ? field.label : field.pageTitle;
1098
- submitData.actionType = field.actionType;
1099
- var fun = self.$common.getDataDrivenOpts().handler[action];
1100
- fun(submitData, title, self.model);
1101
- // var fun = self.model.scripts.formData[action];
1102
- // fun(submitData,field);
1103
- }
1104
1244
  }
1245
+ //执行客户端脚本
1246
+ else {
1247
+ // let parm={submitData:submitData,field:field}
1248
+ // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
1249
+ let title =
1250
+ field.pageTitle == undefined ? field.label : field.pageTitle;
1251
+ submitData.actionType = field.actionType;
1252
+ var fun = self.$common.getDataDrivenOpts().handler[action];
1253
+ fun(submitData, title, self.model);
1254
+ // var fun = self.model.scripts.formData[action];
1255
+ // fun(submitData,field);
1256
+ }
1257
+ };
1105
1258
 
1106
- if (field.alert) {
1107
- self.$common.confirm(field.alertMsg, field.alertCaption, {
1259
+ if (field.alert) {
1260
+ self.$common
1261
+ .confirm(field.alertMsg, field.alertCaption, {
1108
1262
  confirmButtonText: field.alertOKButtonText,
1109
1263
  cancelButtonText: field.alertCancelButtonText,
1110
1264
  //type: 'warning'
1111
1265
  center: field.alertCenter
1112
- }).then(() => {
1266
+ })
1267
+ .then(() => {
1113
1268
  clickAcion();
1114
- }).catch(() => {
1115
- });
1116
- }
1117
- else {
1118
- clickAcion();
1269
+ })
1270
+ .catch(() => {});
1271
+ }
1272
+ else {
1273
+ clickAcion();
1274
+ }
1275
+ },
1276
+ callTelClick(VueCom, data, forname, forrowindex) {
1277
+ var self = this;
1278
+ if (
1279
+ typeof VueCom.$refs["router" + forname + forrowindex] !== "undefined"
1280
+ ) {
1281
+ VueCom.callTelClick(data);
1282
+ return true;
1283
+ }
1284
+ if (VueCom.$children.length > 0) {
1285
+ for (var i = 0; i < VueCom.$children.length; i++) {
1286
+ var item = VueCom.$children[i];
1287
+ var result = this.callTelClick(item, data, forname, forrowindex);
1288
+ if (result) {
1289
+ return result;
1290
+ }
1119
1291
  }
1120
- },
1121
- callTelClick(VueCom, data, forname, forrowindex) {
1122
- if (typeof VueCom.$refs['router' + forname + forrowindex] !== "undefined") {
1123
- VueCom.callTelClick(data);
1292
+ }
1293
+ },
1294
+ closeCallTel(VueCom) {
1295
+ var self = this;
1296
+ if (self.model.currentCallTelrouter) {
1297
+ if (
1298
+ typeof VueCom.$refs[self.model.currentCallTelrouter] !== "undefined"
1299
+ ) {
1300
+ console.log(VueCom);
1301
+ VueCom.closeCallTel();
1124
1302
  return true;
1125
1303
  }
1126
1304
  if (VueCom.$children.length > 0) {
1127
1305
  for (var i = 0; i < VueCom.$children.length; i++) {
1128
1306
  var item = VueCom.$children[i];
1129
- var result = this.callTelClick(item, data, forname, forrowindex);
1307
+ var result = this.closeCallTel(item);
1130
1308
  if (result) {
1131
1309
  return result;
1132
1310
  }
1133
1311
  }
1134
1312
  }
1135
- },
1136
- selectAll($ev) {
1137
- this.model.listData.forEach((ro) => {
1138
- if (!this.model.rightMulti || ro[this.model.rightMulti] == 1) {
1139
- ro.$select = $ev.srcElement.checked;
1140
- }
1141
- });
1142
- this.model.setButtonsDisabled();
1143
- this.selectAllType = this.model.getSelectAll();
1144
- this.$forceUpdate();
1145
- },
1146
- selectOne($ev) {
1147
- this.model.setButtonsDisabled();
1148
- this.model.setSelectAll();
1149
- this.selectAllType = this.model.getSelectAll();
1150
- },
1151
- calculatingRowHeight() {
1152
- let self = this;
1153
-
1154
- //查询出所有没有设置$heigth的数据并重新设置$heigth
1155
- self.model.listData.forEach((item, i) => {
1156
- if (item.$heigth === undefined || item.$heigth <= 0) {
1157
- if (self.$refs["rows." + i] && self.$refs["rows." + i].length > 0) {
1158
- self.$set(item, "$heigth", self.$refs["rows." + i][0].clientHeight);
1159
- }
1313
+ }
1314
+ },
1315
+ selectAll($ev) {
1316
+ this.model.listData.forEach(ro => {
1317
+ if (!this.model.rightMulti || ro[this.model.rightMulti] == 1) {
1318
+ ro.$select = $ev.srcElement.checked;
1319
+ }
1320
+ });
1321
+ this.model.setButtonsDisabled();
1322
+ this.selectAllType = this.model.getSelectAll();
1323
+ this.$forceUpdate();
1324
+ },
1325
+ selectOne($ev) {
1326
+ this.model.setButtonsDisabled();
1327
+ this.model.setSelectAll();
1328
+ this.selectAllType = this.model.getSelectAll();
1329
+ },
1330
+ calculatingRowHeight() {
1331
+ let self = this;
1332
+
1333
+ //查询出所有没有设置$heigth的数据并重新设置$heigth
1334
+ self.model.listData.forEach((item, i) => {
1335
+ if (item.$heigth === undefined || item.$heigth <= 0) {
1336
+ if (self.$refs["rows." + i] && self.$refs["rows." + i].length > 0) {
1337
+ self.$set(item, "$heigth", self.$refs["rows." + i][0].clientHeight);
1160
1338
  }
1161
- });
1162
- },
1163
- updateCurrentRow(router, data) {
1164
- let self = this;
1165
- if (router.flagFreshCurrentRow || router.flagAddRowAfterAction) {
1166
- self.tableComplate = true;
1167
- self.model.getCurrentRowApiData(function () {
1339
+ }
1340
+ });
1341
+ },
1342
+ updateCurrentRow(router, data) {
1343
+ let self = this;
1344
+ if (router.flagFreshCurrentRow || router.flagAddRowAfterAction) {
1345
+ self.tableComplate = true;
1346
+ self.model.getCurrentRowApiData(
1347
+ function() {
1168
1348
  self.$forceUpdate();
1169
1349
  self.tableComplate = false;
1170
- }, data, router);
1171
- }
1172
- },
1173
- importComplete(res) {
1174
- this.model.doAction(res);
1175
- },
1176
- tdRowspan(column, row) {
1177
- if (!column.show) {
1178
- return '';
1179
- }
1350
+ },
1351
+ data,
1352
+ router
1353
+ );
1354
+ }
1355
+ },
1356
+ importComplete(res) {
1357
+ this.model.doAction(res);
1358
+ },
1359
+ tdRowspan(column, row) {
1360
+ if (!column.show) {
1361
+ return "";
1362
+ }
1180
1363
 
1181
- //合并行
1182
- if (row.$rowspan !== 0 && this.model.rowMergedColumns.indexOf(column.id) > -1) {
1183
- return row.$rowspan;
1184
- }
1364
+ //合并行
1365
+ if (
1366
+ row.$rowspan !== 0 &&
1367
+ this.model.rowMergedColumns.indexOf(column.id) > -1
1368
+ ) {
1369
+ return row.$rowspan;
1370
+ }
1185
1371
 
1186
- return '';
1187
- },
1188
- tdShow(column, row) {
1189
- if (!column.show) {
1190
- return false;
1191
- }
1372
+ return "";
1373
+ },
1374
+ tdShow(column, row) {
1375
+ if (!column.show) {
1376
+ return false;
1377
+ }
1192
1378
 
1193
- //合并行
1194
- if (row.$rowspan === 0 && this.model.rowMergedColumns.indexOf(column.id) > -1) {
1195
- return false;
1196
- }
1379
+ //合并行
1380
+ if (
1381
+ row.$rowspan === 0 &&
1382
+ this.model.rowMergedColumns.indexOf(column.id) > -1
1383
+ ) {
1384
+ return false;
1385
+ }
1197
1386
 
1198
- return true;
1199
- },
1200
- closeTabThen(ev) {
1201
- let self = this;
1202
- if (self.model.checkCloseTabThen(ev.notification)) {
1203
- self.model.doAction(ev);
1204
- self.$forceUpdate();
1205
- self.$refs.footer.$forceUpdate();
1206
- }
1207
- },
1208
- loadStats() {
1209
- if (this.searchStatsApi) {
1210
- this.$refs.tableStats.searchStatsComplate();
1211
- }
1212
- },
1213
- searchStats(m) {
1214
- let self = this;
1215
- self.model.searchStats = m;
1216
- self.getPage(1);
1217
- },
1218
- getRowRouterShow(row) {
1219
- let self = this;
1220
- let rowRouterShow = [];
1221
- self.model.rowRouter.forEach((v) => {
1222
- if (v.show) {
1223
- if (!v.rightField || row[v.rightField] == 1) {
1224
- if (rowRouterShow.length < self.model.rowMenuDisplayCount) {
1225
- rowRouterShow.push(v);
1226
- }
1227
- }
1228
- }
1229
- });
1230
- return rowRouterShow;
1231
- },
1232
- getRowRouterDisplay(row) {
1233
- let self = this;
1234
- let rowRouterDisplay = [];
1235
- let i = 0;
1236
- self.model.rowRouter.forEach((v) => {
1237
- if (v.show) {
1238
- if (!v.rightField || row[v.rightField] == 1) {
1239
- i = i + 1;
1240
- if (i > self.model.rowMenuDisplayCount) {
1241
- rowRouterDisplay.push(v);
1242
- }
1387
+ return true;
1388
+ },
1389
+ closeTabThen(ev) {
1390
+ let self = this;
1391
+ if (self.model.checkCloseTabThen(ev.notification)) {
1392
+ self.model.doAction(ev);
1393
+ self.$forceUpdate();
1394
+ self.$refs.footer.$forceUpdate();
1395
+ }
1396
+ },
1397
+ loadStats() {
1398
+ if (this.searchStatsApi) {
1399
+ this.$refs.tableStats.searchStatsComplate();
1400
+ }
1401
+ },
1402
+ searchStats(m) {
1403
+ let self = this;
1404
+ self.model.searchStats = m;
1405
+ self.getPage(1);
1406
+ },
1407
+ getRowRouterShow(row) {
1408
+ let self = this;
1409
+ let rowRouterShow = [];
1410
+ self.model.rowRouter.forEach(v => {
1411
+ if (v.show) {
1412
+ if (!v.rightField || row[v.rightField] == 1) {
1413
+ if (rowRouterShow.length < self.model.rowMenuDisplayCount) {
1414
+ rowRouterShow.push(v);
1243
1415
  }
1244
1416
  }
1245
- });
1246
- return rowRouterDisplay;
1247
- },
1248
- refreshFromSimple(field, data) {
1249
- var self = this;
1250
- if (field.isOpenForm) {
1251
- if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
1252
- self.model.doAction(data);
1253
- }
1254
- self.$forceUpdate();
1255
- self.$refs.footer.$forceUpdate();
1256
- self.updateCurrentRow(field, data);
1257
1417
  }
1258
- else {
1259
- if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
1260
- self.model.doAction({ responseData: data });
1418
+ });
1419
+ return rowRouterShow;
1420
+ },
1421
+ getRowRouterDisplay(row) {
1422
+ let self = this;
1423
+ let rowRouterDisplay = [];
1424
+ let i = 0;
1425
+ self.model.rowRouter.forEach(v => {
1426
+ if (v.show) {
1427
+ if (!v.rightField || row[v.rightField] == 1) {
1428
+ i = i + 1;
1429
+ if (i > self.model.rowMenuDisplayCount) {
1430
+ rowRouterDisplay.push(v);
1431
+ }
1261
1432
  }
1262
- self.$forceUpdate();
1263
- self.$refs.footer.$forceUpdate();
1264
- self.updateCurrentRow(field, data);
1265
1433
  }
1266
- },
1434
+ });
1435
+ return rowRouterDisplay;
1267
1436
  },
1268
- }</script>
1269
- <style>
1270
- .ct-tableParent {
1271
- overflow: auto;
1272
- border-bottom: 1px solid #ebeef5;
1273
- width: 100%;
1274
- outline: 0;
1275
- border-top: 1px solid #ebeef5;
1276
- }
1277
-
1278
- .ct-searchtable .ct-table {
1279
- min-width: 100%;
1280
- border-collapse: collapse;
1281
- }
1282
-
1283
- .ct-searchtable .ct-table th {
1284
- background-color: #f4f7fa !important;
1285
-
1437
+ refreshFromSimple(field, data) {
1438
+ var self = this;
1439
+ if (field.isOpenForm) {
1440
+ if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
1441
+ self.model.doAction(data);
1442
+ }
1443
+ self.$forceUpdate();
1444
+ self.$refs.footer.$forceUpdate();
1445
+ self.updateCurrentRow(field, data);
1446
+ }
1447
+ else {
1448
+ if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
1449
+ self.model.doAction({ responseData: data });
1450
+ }
1451
+ self.$forceUpdate();
1452
+ self.$refs.footer.$forceUpdate();
1453
+ self.updateCurrentRow(field, data);
1454
+ }
1286
1455
  }
1287
-
1288
- .ct-searchtable .ct-tr > .ct-td {
1289
- /*border: 1px solid #e7e8eb;
1290
- border-bottom: 1px solid #e7e8eb;
1291
- border-right: 1px solid #e7e8eb;
1292
- border-left: 1px solid #e7e8eb;*/
1293
- padding: 2px 20px;
1294
- cursor: default;
1295
- background-color: #ffffff;
1296
- }
1297
-
1298
- .ct-searchtable .ct-tr > .ct-td1 {
1299
- border-right: 1px solid #e7e8eb;
1300
- border-left: 1px solid #e7e8eb;
1301
- }
1302
-
1303
- .ct-searchtable .ct-tr:last-child > .ct-td1 {
1304
- border-bottom: 1px solid #e7e8eb;
1305
1456
  }
1306
-
1307
- .ct-searchtable .ct-tr > .ct-td2 {
1457
+ };
1458
+ </script>
1459
+ <style>
1460
+ .ct-tableParent {
1461
+ overflow: auto;
1462
+ border-bottom: 1px solid #ebeef5;
1463
+ width: 100%;
1464
+ outline: 0;
1465
+ border-top: 1px solid #ebeef5;
1466
+ }
1467
+
1468
+ .ct-searchtable .ct-table {
1469
+ min-width: 100%;
1470
+ border-collapse: collapse;
1471
+ }
1472
+
1473
+ .ct-searchtable .ct-table th {
1474
+ background-color: #f4f7fa !important;
1475
+ }
1476
+
1477
+ .ct-searchtable .ct-tr > .ct-td {
1478
+ /*border: 1px solid #e7e8eb;
1308
1479
  border-bottom: 1px solid #e7e8eb;
1309
- }
1310
-
1311
- .ct-searchtable .ct-tr > .ct-td3 {
1312
- border: 1px solid #e7e8eb;
1313
- }
1314
-
1315
- .shadowLeft {
1316
1480
  border-right: 1px solid #e7e8eb;
1317
- box-shadow: 2px 0 3px -1px rgba(0,0,0,0.1);
1318
- }
1319
-
1320
- .shadowRight {
1321
- box-shadow: -2px 0 3px -1px rgba(0,0,0,0.1);
1322
- }
1323
-
1324
- .ct-searchtable body:last-child > .ct-td {
1325
- border-bottom: 0px;
1326
- }
1327
-
1328
- .ct-searchtable .ct-tr > .ct-td.nowidth {
1329
- white-space: nowrap;
1330
- }
1331
-
1332
- .ct-table {
1333
- color: #606266;
1334
- font-size: 18px;
1335
- line-height: 40px;
1336
- min-height: 40px;
1337
- }
1338
-
1339
- .ct-table-mini {
1340
- font-size: 12px;
1341
- line-height: 26px;
1342
- min-height: 28px;
1343
- }
1344
-
1345
- .ct-table-small {
1346
- font-size: 14px;
1347
- line-height: 32px;
1348
- min-height: 32px;
1349
- }
1350
-
1351
- .ct-table-medium {
1352
- font-size: 16px;
1353
- line-height: 36px;
1354
- min-height: 36px;
1355
- }
1356
-
1357
- .ct-table .ct-td > .caret-wrapper {
1358
- display: inline-flex;
1359
- flex-direction: column;
1360
- align-items: center;
1361
- height: 34px;
1362
- width: 10px;
1363
- vertical-align: middle;
1364
- cursor: pointer;
1365
- overflow: initial;
1366
- position: relative;
1367
- }
1368
-
1369
- .ct-table .ct-td > .caret-wrapper > .sort-caret {
1370
- width: 0;
1371
- height: 0;
1372
- border: 5px solid transparent;
1373
- position: absolute;
1374
- left: 7px;
1375
- }
1376
-
1377
- .ct-table .ct-td > .caret-wrapper > .sort-caret.ascending {
1378
- border-bottom-color: #c0c4cc;
1379
- top: 5px;
1380
- }
1381
-
1382
- .ct-table .ct-td > .caret-wrapper > .sort-caret.descending {
1383
- border-top-color: #c0c4cc;
1384
- bottom: 7px;
1385
- }
1386
-
1387
- .ct-table .ct-td.select {
1388
- background-color: #ecf5ff !important;
1389
- }
1390
-
1391
- .ct-table .ct-tr:hover .ct-td.select {
1392
- background-color: #ecf5ff !important;
1393
- }
1394
-
1395
- .ct-table .ct-td.asc > .caret-wrapper > .sort-caret.ascending {
1396
- border-bottom-color: #409eff;
1397
- top: 5px;
1398
- }
1399
-
1400
- .ct-table .ct-td.desc > .caret-wrapper > .sort-caret.descending {
1401
- border-top-color: #409eff;
1402
- bottom: 7px;
1403
- }
1404
-
1405
- .ct-table .cell {
1406
- /*white-space: nowrap;*/
1407
- text-overflow: ellipsis;
1408
- /*min-width: 50px; todo 实际宽度-21即可*/
1409
- overflow: hidden;
1410
- /*padding-right: 10px;*/
1411
- }
1412
- /*强制换行 todo 可去掉改成强制不换行*/
1413
- .ct-table .cell {
1414
- /* 这两个在技术上是一样的, 为了兼容了浏览器两个都加上 */
1415
- overflow-wrap: break-word;
1416
- word-wrap: break-word;
1417
- -ms-word-break: break-all;
1418
- /* 这个的使用在web-kit中有些危险,他可能会阶段所有东西 */
1419
- word-break: break-all;
1420
- /* Instead use this non-standard one: */
1421
- word-break: break-word;
1422
- /* 如果浏览器支持的话增加一个连接符(Blink不支持) */
1423
- -ms-hyphens: auto;
1424
- -moz-hyphens: auto;
1425
- -webkit-hyphens: auto;
1426
- hyphens: auto;
1427
- }
1428
-
1429
- .ct-table .lineFeedCell {
1430
- min-width: 40px;
1431
- }
1432
-
1433
- .ct-table .left-fixation {
1434
- position: sticky;
1435
- }
1436
-
1437
- .ct-table .right-fixation {
1438
- position: sticky;
1439
- }
1440
-
1441
- .ct-table .left-fixation-th {
1442
- position: sticky;
1443
- top: 0px;
1444
- z-index: 99;
1445
- }
1446
-
1447
- .ct-table .right-fixation-th {
1448
- position: sticky;
1449
- top: 0px;
1450
- z-index: 99;
1451
- }
1452
-
1453
- .ct-table .right-no-fixation-th {
1454
- position: sticky;
1455
- top: 0px;
1456
- z-index: 50;
1457
- }
1458
-
1459
- .ct-table .checkbox-td {
1460
- min-width: 20px;
1461
- width: 20px;
1462
- left: 0px;
1463
- }
1464
-
1465
- .ct-table .checkbox-td .checkbox-td-1 {
1466
- vertical-align: inherit;
1467
- }
1468
-
1469
- .tab-list {
1470
- position: relative;
1471
- margin-bottom: 0px !important;
1472
- ;
1473
- height: auto !important;
1474
- ;
1475
- display: block;
1476
- padding-left: 8px;
1477
- padding-right: 4px;
1478
- }
1479
-
1480
- .tab-list .subdiv_allinline {
1481
- float: none;
1482
- display: block;
1483
- width: -webkit-fill-available;
1484
- cursor: pointer;
1485
- }
1486
-
1487
- .div_allinline .Stats-popover {
1488
- float: right;
1489
- margin-top: 3px;
1490
- margin-left: 4px;
1491
- height: 16px;
1492
- }
1493
-
1494
- .icon-more {
1495
- background: url('../../../assets/XL.png')no-repeat;
1496
- background-size: 100% 100%;
1497
- width: 16px;
1498
- height: 16px;
1499
- display: table-caption;
1500
- cursor: pointer;
1501
- }
1502
-
1503
- .el-popover1 {
1504
- min-width: inherit !important;
1505
- }
1481
+ border-left: 1px solid #e7e8eb;*/
1482
+ padding: 2px 20px;
1483
+ cursor: default;
1484
+ background-color: #ffffff;
1485
+ }
1486
+
1487
+ .ct-searchtable .ct-tr > .ct-td1 {
1488
+ border-right: 1px solid #e7e8eb;
1489
+ border-left: 1px solid #e7e8eb;
1490
+ }
1491
+
1492
+ .ct-searchtable .ct-tr:last-child > .ct-td1 {
1493
+ border-bottom: 1px solid #e7e8eb;
1494
+ }
1495
+
1496
+ .ct-searchtable .ct-tr > .ct-td2 {
1497
+ border-bottom: 1px solid #e7e8eb;
1498
+ }
1499
+
1500
+ .ct-searchtable .ct-tr > .ct-td3 {
1501
+ border: 1px solid #e7e8eb;
1502
+ }
1503
+
1504
+ .shadowLeft {
1505
+ border-right: 1px solid #e7e8eb;
1506
+ box-shadow: 2px 0 3px -1px rgba(0, 0, 0, 0.1);
1507
+ }
1508
+
1509
+ .shadowRight {
1510
+ box-shadow: -2px 0 3px -1px rgba(0, 0, 0, 0.1);
1511
+ }
1512
+
1513
+ .ct-searchtable body:last-child > .ct-td {
1514
+ border-bottom: 0px;
1515
+ }
1516
+
1517
+ .ct-searchtable .ct-tr > .ct-td.nowidth {
1518
+ white-space: nowrap;
1519
+ }
1520
+
1521
+ .ct-table {
1522
+ color: #606266;
1523
+ font-size: 18px;
1524
+ line-height: 40px;
1525
+ min-height: 40px;
1526
+ }
1527
+
1528
+ .ct-table-mini {
1529
+ font-size: 12px;
1530
+ line-height: 26px;
1531
+ min-height: 28px;
1532
+ }
1533
+
1534
+ .ct-table-small {
1535
+ font-size: 14px;
1536
+ line-height: 32px;
1537
+ min-height: 32px;
1538
+ }
1539
+
1540
+ .ct-table-medium {
1541
+ font-size: 16px;
1542
+ line-height: 36px;
1543
+ min-height: 36px;
1544
+ }
1545
+
1546
+ .ct-table .ct-td > .caret-wrapper {
1547
+ display: inline-flex;
1548
+ flex-direction: column;
1549
+ align-items: center;
1550
+ height: 34px;
1551
+ width: 10px;
1552
+ vertical-align: middle;
1553
+ cursor: pointer;
1554
+ overflow: initial;
1555
+ position: relative;
1556
+ }
1557
+
1558
+ .ct-table .ct-td > .caret-wrapper > .sort-caret {
1559
+ width: 0;
1560
+ height: 0;
1561
+ border: 5px solid transparent;
1562
+ position: absolute;
1563
+ left: 7px;
1564
+ }
1565
+
1566
+ .ct-table .ct-td > .caret-wrapper > .sort-caret.ascending {
1567
+ border-bottom-color: #c0c4cc;
1568
+ top: 5px;
1569
+ }
1570
+
1571
+ .ct-table .ct-td > .caret-wrapper > .sort-caret.descending {
1572
+ border-top-color: #c0c4cc;
1573
+ bottom: 7px;
1574
+ }
1575
+
1576
+ .ct-table .ct-td.select {
1577
+ background-color: #ecf5ff !important;
1578
+ }
1579
+
1580
+ .ct-table .ct-tr:hover .ct-td.select {
1581
+ background-color: #ecf5ff !important;
1582
+ }
1583
+
1584
+ .ct-table .ct-td.asc > .caret-wrapper > .sort-caret.ascending {
1585
+ border-bottom-color: #409eff;
1586
+ top: 5px;
1587
+ }
1588
+
1589
+ .ct-table .ct-td.desc > .caret-wrapper > .sort-caret.descending {
1590
+ border-top-color: #409eff;
1591
+ bottom: 7px;
1592
+ }
1593
+
1594
+ .ct-table .cell {
1595
+ /*white-space: nowrap;*/
1596
+ text-overflow: ellipsis;
1597
+ /*min-width: 50px; todo 实际宽度-21即可*/
1598
+ overflow: hidden;
1599
+ /*padding-right: 10px;*/
1600
+ }
1601
+ /*强制换行 todo 可去掉改成强制不换行*/
1602
+ .ct-table .cell {
1603
+ /* 这两个在技术上是一样的, 为了兼容了浏览器两个都加上 */
1604
+ overflow-wrap: break-word;
1605
+ word-wrap: break-word;
1606
+ -ms-word-break: break-all;
1607
+ /* 这个的使用在web-kit中有些危险,他可能会阶段所有东西 */
1608
+ word-break: break-all;
1609
+ /* Instead use this non-standard one: */
1610
+ word-break: break-word;
1611
+ /* 如果浏览器支持的话增加一个连接符(Blink不支持) */
1612
+ -ms-hyphens: auto;
1613
+ -moz-hyphens: auto;
1614
+ -webkit-hyphens: auto;
1615
+ hyphens: auto;
1616
+ }
1617
+
1618
+ .ct-table .lineFeedCell {
1619
+ min-width: 40px;
1620
+ }
1621
+
1622
+ .ct-table .left-fixation {
1623
+ position: sticky;
1624
+ }
1625
+
1626
+ .ct-table .right-fixation {
1627
+ position: sticky;
1628
+ }
1629
+
1630
+ .ct-table .left-fixation-th {
1631
+ position: sticky;
1632
+ top: 0px;
1633
+ z-index: 99;
1634
+ }
1635
+
1636
+ .ct-table .right-fixation-th {
1637
+ position: sticky;
1638
+ top: 0px;
1639
+ z-index: 99;
1640
+ }
1641
+
1642
+ .ct-table .right-no-fixation-th {
1643
+ position: sticky;
1644
+ top: 0px;
1645
+ z-index: 50;
1646
+ }
1647
+
1648
+ .ct-table .checkbox-td {
1649
+ min-width: 20px;
1650
+ width: 20px;
1651
+ left: 0px;
1652
+ }
1653
+
1654
+ .ct-table .checkbox-td .checkbox-td-1 {
1655
+ vertical-align: inherit;
1656
+ }
1657
+
1658
+ .tab-list {
1659
+ position: relative;
1660
+ margin-bottom: 0px !important;
1661
+ height: auto !important;
1662
+ display: block;
1663
+ padding-left: 8px;
1664
+ padding-right: 4px;
1665
+ }
1666
+
1667
+ .tab-list .subdiv_allinline {
1668
+ float: none;
1669
+ display: block;
1670
+ width: -webkit-fill-available;
1671
+ cursor: pointer;
1672
+ }
1673
+
1674
+ .div_allinline .Stats-popover {
1675
+ float: right;
1676
+ margin-top: 3px;
1677
+ margin-left: 4px;
1678
+ height: 16px;
1679
+ }
1680
+
1681
+ .icon-more {
1682
+ background: url("../../../assets/XL.png") no-repeat;
1683
+ background-size: 100% 100%;
1684
+ width: 16px;
1685
+ height: 16px;
1686
+ display: table-caption;
1687
+ cursor: pointer;
1688
+ }
1689
+
1690
+ .el-popover1 {
1691
+ min-width: inherit !important;
1692
+ }
1506
1693
  </style>