centaline-data-driven 1.3.72 → 1.3.74

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