centaline-data-driven 1.3.71 → 1.3.73

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