centaline-data-driven 1.1.55 → 1.1.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/.babelrc +12 -12
  2. package/.editorconfig +9 -9
  3. package/.gitattributes +63 -63
  4. package/.postcssrc.js +10 -10
  5. package/.vs/Centaline.Front_End.DataDriven/DesignTimeBuild/.dtbcache +0 -0
  6. package/.vs/Centaline.Front_End.DataDriven/v16/Server/sqlite3/db.lock +0 -0
  7. package/.vs/Centaline.Front_End.DataDriven/v16/Server/sqlite3/storage.ide +0 -0
  8. package/Centaline.Front_End.DataDriven.csproj +37 -37
  9. package/Centaline.Front_End.DataDriven.sln +25 -25
  10. package/Properties/launchSettings.json +26 -26
  11. package/README.md +140 -140
  12. package/build/build.js +41 -41
  13. package/build/centaline/centaline.path.js +59 -59
  14. package/build/centaline/webpack.centaline.conf.js +106 -106
  15. package/build/check-versions.js +54 -54
  16. package/build/utils.js +102 -102
  17. package/build/vue-loader.conf.js +22 -22
  18. package/build/webpack.base.conf.js +82 -82
  19. package/build/webpack.dev.conf.js +111 -111
  20. package/build/webpack.prod.conf.js +145 -145
  21. package/config/dev.env.js +12 -12
  22. package/config/index.js +73 -73
  23. package/config/prod.env.js +4 -4
  24. package/index.html +14 -14
  25. package/obj/Centaline.Front_End.DataDriven.csproj.nuget.dgspec.json +73 -0
  26. package/obj/Centaline.Front_End.DataDriven.csproj.nuget.g.props +29 -0
  27. package/obj/Centaline.Front_End.DataDriven.csproj.nuget.g.targets +15 -0
  28. package/obj/Debug/netcoreapp2.1/Centaline.Front_End.DataDriven.AssemblyInfo.cs +23 -0
  29. package/obj/Debug/netcoreapp2.1/Centaline.Front_End.DataDriven.RazorAssemblyInfo.cs +20 -0
  30. package/obj/project.assets.json +11907 -0
  31. package/package.json +75 -75
  32. package/src/App.vue +10 -10
  33. package/src/Detail.vue +29 -26
  34. package/src/Edit.vue +32 -32
  35. package/src/Form.vue +45 -29
  36. package/src/SearchList.vue +41 -40
  37. package/src/SearchTree.vue +51 -51
  38. package/src/Tabs.vue +19 -19
  39. package/src/centaline/api/index.js +249 -249
  40. package/src/centaline/comfirm/index.js +11 -11
  41. package/src/centaline/comfirm/src/comfirm.vue +44 -44
  42. package/src/centaline/common/index.js +738 -738
  43. package/src/centaline/css/common.css +752 -748
  44. package/src/centaline/css/max.css +208 -208
  45. package/src/centaline/dialogList/index.js +11 -11
  46. package/src/centaline/dialogList/src/dialog.vue +210 -210
  47. package/src/centaline/dialogList/src/dialogList.vue +65 -65
  48. package/src/centaline/dialogList/src/dialogNew.vue +78 -78
  49. package/src/centaline/dialogList/src/drag.js +77 -77
  50. package/src/centaline/directives/index.js +23 -23
  51. package/src/centaline/dynamicBtn/index.js +11 -11
  52. package/src/centaline/dynamicBtn/src/dynamicBtn.vue +100 -100
  53. package/src/centaline/dynamicCb/index.js +11 -11
  54. package/src/centaline/dynamicCb/src/dynamicCb.vue +72 -72
  55. package/src/centaline/dynamicCheckbox/index.js +11 -11
  56. package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +128 -128
  57. package/src/centaline/dynamicComboBoxWithTextBox/index.js +11 -11
  58. package/src/centaline/dynamicComboBoxWithTextBox/src/dynamicComboBoxWithTextBox.vue +240 -240
  59. package/src/centaline/dynamicD/index.js +11 -11
  60. package/src/centaline/dynamicD/src/dynamicD.vue +92 -92
  61. package/src/centaline/dynamicDetail/index.js +10 -10
  62. package/src/centaline/dynamicDetail/src/dynamicDetail.vue +40 -40
  63. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +1280 -1280
  64. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +1346 -1293
  65. package/src/centaline/dynamicDrop/index.js +11 -11
  66. package/src/centaline/dynamicDrop/src/dynamicDrop.vue +54 -54
  67. package/src/centaline/dynamicDtd/index.js +11 -11
  68. package/src/centaline/dynamicDtd/src/dynamicDtd.vue +125 -125
  69. package/src/centaline/dynamicDtd/src/dynamicDtdOld.vue +93 -93
  70. package/src/centaline/dynamicFile/index.js +11 -11
  71. package/src/centaline/dynamicFile/src/dynamicFile.vue +289 -288
  72. package/src/centaline/dynamicForm/index.js +24 -24
  73. package/src/centaline/dynamicForm/src/dynamicForm.vue +564 -564
  74. package/src/centaline/dynamicForm/src/dynamicFormList.vue +209 -209
  75. package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +376 -376
  76. package/src/centaline/dynamicGp/index.js +11 -11
  77. package/src/centaline/dynamicGp/src/dynamicGp.vue +27 -27
  78. package/src/centaline/dynamicHyperLink/index.js +10 -10
  79. package/src/centaline/dynamicHyperLink/src/dynamicHyperLink.vue +54 -54
  80. package/src/centaline/dynamicInput/index.js +35 -35
  81. package/src/centaline/dynamicInput/src/dynamicInput.vue +35 -35
  82. package/src/centaline/dynamicInputNumber/index.js +11 -11
  83. package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +157 -157
  84. package/src/centaline/dynamicIti/index.js +11 -11
  85. package/src/centaline/dynamicIti/src/dynamicIti.vue +148 -148
  86. package/src/centaline/dynamicL/index.js +11 -11
  87. package/src/centaline/dynamicL/src/dynamicL.vue +37 -37
  88. package/src/centaline/dynamicLabel/index.js +11 -11
  89. package/src/centaline/dynamicLabel/src/dynamicLabel.vue +73 -73
  90. package/src/centaline/dynamicLs/index.js +22 -22
  91. package/src/centaline/dynamicLs/src/dynamicLs.vue +233 -233
  92. package/src/centaline/dynamicMo/index.js +13 -13
  93. package/src/centaline/dynamicMo/src/dynamicMo.vue +421 -421
  94. package/src/centaline/dynamicMt/index.js +11 -11
  95. package/src/centaline/dynamicMt/src/dynamicMt.vue +44 -44
  96. package/src/centaline/dynamicPlaceHolder/index.js +10 -10
  97. package/src/centaline/dynamicPlaceHolder/src/dynamicPlaceHolder.vue +29 -29
  98. package/src/centaline/dynamicPopupSearchList/index.js +11 -11
  99. package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchList.vue +157 -157
  100. package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchListTable.vue +239 -239
  101. package/src/centaline/dynamicRichText/index.js +11 -11
  102. package/src/centaline/dynamicRichText/src/dynamicRichText.vue +33 -33
  103. package/src/centaline/dynamicSearchList/index.js +11 -11
  104. package/src/centaline/dynamicSearchList/src/dynamicSearchCategory.vue +121 -121
  105. package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +135 -135
  106. package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +206 -206
  107. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1082 -1069
  108. package/src/centaline/dynamicSearchList/src/dynamicTableStatistics.vue +30 -30
  109. package/src/centaline/dynamicSearchList/src/dynamicTableTip.vue +46 -46
  110. package/src/centaline/dynamicSearchList/src/dynamicTableToolbar.vue +61 -61
  111. package/src/centaline/dynamicSeg/index.js +11 -11
  112. package/src/centaline/dynamicSeg/src/dynamicSeg.vue +100 -100
  113. package/src/centaline/dynamicSensitiveEye/index.js +11 -11
  114. package/src/centaline/dynamicSensitiveEye/src/dynamicSensitiveEye.vue +74 -74
  115. package/src/centaline/dynamicSo/index.js +14 -14
  116. package/src/centaline/dynamicSo/src/dynamicSo.vue +329 -328
  117. package/src/centaline/dynamicSo/src/dynamicSo/345/211/257/346/234/254.vue +69 -69
  118. package/src/centaline/dynamicSos/index.js +14 -14
  119. package/src/centaline/dynamicSos/src/dynamicSos - /345/244/215/345/210/266.vue" +223 -223
  120. package/src/centaline/dynamicSos/src/dynamicSos.vue +261 -260
  121. package/src/centaline/dynamicSw/index.js +11 -11
  122. package/src/centaline/dynamicSw/src/dynamicSw.vue +74 -74
  123. package/src/centaline/dynamicT/index.js +11 -11
  124. package/src/centaline/dynamicT/src/dynamicT.vue +79 -79
  125. package/src/centaline/dynamicTab/index.js +11 -11
  126. package/src/centaline/dynamicTab/src/dynamicTab.vue +49 -49
  127. package/src/centaline/dynamicTabs/index.js +11 -11
  128. package/src/centaline/dynamicTabs/src/dynamicTabs.vue +69 -69
  129. package/src/centaline/dynamicTags/index.js +13 -13
  130. package/src/centaline/dynamicTags/src/dynamicTags - /345/244/215/345/210/266.vue" +391 -391
  131. package/src/centaline/dynamicTags/src/dynamicTags.vue +427 -427
  132. package/src/centaline/dynamicTimeSelect/index.js +11 -11
  133. package/src/centaline/dynamicTimeSelect/src/dynamicTimeSelect.vue +141 -141
  134. package/src/centaline/dynamicTree/index.js +11 -11
  135. package/src/centaline/dynamicTree/src/dynamicSearchTree.vue +66 -66
  136. package/src/centaline/dynamicTree/src/dynamicTree.vue +233 -233
  137. package/src/centaline/dynamicTree/src/dynamicTreeList.vue +74 -74
  138. package/src/centaline/formData/index.js +290 -290
  139. package/src/centaline/imgPreview/index.js +42 -42
  140. package/src/centaline/imgPreview/src/imgPreview.vue +26 -26
  141. package/src/centaline/index.js +51 -51
  142. package/src/centaline/loader/index.js +157 -157
  143. package/src/centaline/loader/src/ctl/Base.js +270 -261
  144. package/src/centaline/loader/src/ctl/Button.js +44 -44
  145. package/src/centaline/loader/src/ctl/Cb.js +27 -27
  146. package/src/centaline/loader/src/ctl/Checkbox.js +107 -107
  147. package/src/centaline/loader/src/ctl/ComboBoxWithTextBox.js +162 -162
  148. package/src/centaline/loader/src/ctl/D.js +31 -31
  149. package/src/centaline/loader/src/ctl/Detail.js +228 -175
  150. package/src/centaline/loader/src/ctl/Dtd.js +115 -115
  151. package/src/centaline/loader/src/ctl/DtdOld.js +129 -129
  152. package/src/centaline/loader/src/ctl/File.js +292 -292
  153. package/src/centaline/loader/src/ctl/Form.js +380 -380
  154. package/src/centaline/loader/src/ctl/FormList.js +428 -428
  155. package/src/centaline/loader/src/ctl/GM.js +20 -20
  156. package/src/centaline/loader/src/ctl/Gp.js +9 -9
  157. package/src/centaline/loader/src/ctl/Hd.js +13 -13
  158. package/src/centaline/loader/src/ctl/HyperLink.js +24 -24
  159. package/src/centaline/loader/src/ctl/InputNumber.js +51 -51
  160. package/src/centaline/loader/src/ctl/Iti.js +108 -108
  161. package/src/centaline/loader/src/ctl/L.js +18 -18
  162. package/src/centaline/loader/src/ctl/Mo.js +183 -183
  163. package/src/centaline/loader/src/ctl/Mt.js +20 -20
  164. package/src/centaline/loader/src/ctl/PlaceHolder.js +15 -15
  165. package/src/centaline/loader/src/ctl/Router.js +273 -273
  166. package/src/centaline/loader/src/ctl/SearchCategory.js +54 -54
  167. package/src/centaline/loader/src/ctl/SearchScreen.js +236 -236
  168. package/src/centaline/loader/src/ctl/SearchTable.js +787 -772
  169. package/src/centaline/loader/src/ctl/Seg.js +37 -37
  170. package/src/centaline/loader/src/ctl/SensitiveEye.js +65 -65
  171. package/src/centaline/loader/src/ctl/So.js +117 -117
  172. package/src/centaline/loader/src/ctl/Sos.js +128 -128
  173. package/src/centaline/loader/src/ctl/Sw.js +27 -27
  174. package/src/centaline/loader/src/ctl/T.js +65 -65
  175. package/src/centaline/loader/src/ctl/Tabs.js +57 -57
  176. package/src/centaline/loader/src/ctl/Tags.js +191 -191
  177. package/src/centaline/loader/src/ctl/TimeSelect.js +87 -87
  178. package/src/centaline/loader/src/ctl/Tree.js +151 -151
  179. package/src/centaline/loader/src/ctl/Ttts.js +78 -78
  180. package/src/centaline/loader/src/ctl/lib/Enum.js +580 -563
  181. package/src/centaline/loader/src/ctl/lib/LibFunction.js +364 -364
  182. package/src/centaline/loader/src/ctl.js +36 -36
  183. package/src/centaline/mixins/dynamicElement.js +151 -151
  184. package/src/centaline/mixins/dynamicSelect.js +84 -84
  185. package/src/centaline/mixins/emitter.js +33 -33
  186. package/src/centaline/progress/index.js +11 -11
  187. package/src/centaline/progress/src/progress.vue +70 -70
  188. package/src/centaline/quickInput/src/quickInput.vue +64 -64
  189. package/src/centaline/selectOption/src/selectOption.vue +61 -61
  190. package/src/centaline/selectOption/src/selectOptionVertical.vue +80 -80
  191. package/src/centaline/templateControls/index.js +17 -17
  192. package/src/centaline/templateControls/src/dynamicTableA.vue +20 -20
  193. package/src/centaline/templateControls/src/dynamicTableCurrency.vue +62 -62
  194. package/src/centaline/templateControls/src/dynamicTableImg.vue +25 -25
  195. package/src/centaline/templates/index.js +34 -34
  196. package/src/centaline/templates/src/ContractSearch.js +67 -67
  197. package/src/centaline/templates/src/test.js +44 -44
  198. package/src/centaline/validate/index.js +332 -332
  199. package/src/main.js +55 -46
  200. package/src/router/index.js +44 -44
  201. package/wwwroot/static/centaline/centaline-data-driven.js +1 -1
  202. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
@@ -1,1069 +1,1082 @@
1
- <template>
2
- <div style="width:100%;" class="ct-searchtable" ref="searchTable">
3
- <ct-tableStatistics ref="listHeader" class="ct-search-table-list-header" :tip="model.listHeader" v-if="!isLoading && searchDataStatisticsApi"></ct-tableStatistics>
4
- <ct-tabletoolbar ref="toolbar" v-if="!isLoading" :buttons="model.buttons"
5
- @click="toolbarClickHandler($event)"
6
- @importComplete="importComplete"
7
- :optionApi="model.optionApi"
8
- :searchModel="model.searchModel"></ct-tabletoolbar>
9
- <ct-tabletip ref="listHeader" class="ct-search-table-list-header" :tip="model.listHeader" v-if="!isLoading"></ct-tabletip>
10
- <div v-loading="tableLoading" v-if="!isLoading" :style="{'height':'0px','top':model.tableHeight*0.55+'px'}">
11
- </div>
12
- <div v-loading="operationLoading">
13
- </div>
14
- <div class="ct-tableParent" ref="tableParent" v-bind="model.attrs" v-if="!isLoading"
15
- :style="{'height':model.tableHeight+'px'}"
16
- @scroll="scrollHandle($event)" v-focus="true"
17
- @keydown.up="rowKeyDownHandle($event,0)" @keydown.down="rowKeyDownHandle($event,1)"
18
- tabindex="-1">
19
- <div class="ct-table-content">
20
- <table border="0" cellpadding="0" cellspacing="0"
21
- :class="['ct-table',model.attrs.size?'ct-table-'+model.attrs.size:'']">
22
- <!--表头-->
23
- <thead ref="tableHead">
24
- <tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr">
25
- <th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th checkbox-td">
26
- <input type="checkbox" @click="selectAll($event)" v-model="model.selectAll" class="checkbox-td-1" />
27
- </th>
28
- <th :ref="column.fixed?(column.fixed==='left'?'headLeftThs':'headRightThs'):'headThs'" v-for="(column,colIndex) in columns"
29
- v-if="column.show" class="ct-td ct-searchtable-th"
30
- :rowspan="column.rowspan"
31
- :colspan="column.colspan"
32
- :class="[colHasWidth[colIndex],column.sortAction,
33
- colIndex === leftShadow?'shadowLeft':null,
34
- colIndex === rightShadow?'shadowRight':null,
35
- column.fixed === 'left'?'left-fixation-th':null,
36
- column.fixed === 'right'?'right-fixation-th':null,
37
- typeof column.fixed === 'undefined'?'right-no-fixation-th':null]"
38
- @mousemove="thMouseMoveHandle($event)" @mousedown="thMouseDownHandle($event,colIndex)"
39
- v-bind="column.attrs">
40
-
41
- <span>{{column.name}}</span>
42
- <span class="caret-wrapper" v-if="column.sort" @click="toSort($event,column);" @contextmenu.prevent="clearSort($event,column);">
43
- <i class="sort-caret ascending" @click.left="toSort($event,column,'asc')" @contextmenu.prevent="clearSort($event,column);"></i>
44
- <i class="sort-caret descending" @click.left="toSort($event,column,'desc')" @contextmenu.prevent="clearSort($event,column);"></i>
45
- </span>
46
- </th>
47
-
48
- <!--<th v-if="model.rowRouter.length > 0" class="ct-td tdFiexd" :class="[-1 === rightShadow?'shadowRight':null]" :style="{'min-width':'20px','transform':'translate('+scrollRight+'px, '+scrollTop+'px)'}">
49
- 操作
50
- </th>-->
51
- </tr>
52
- </thead>
53
- <!--表体-->
54
- <tbody>
55
- <!--这一行仅用于设置未加载数据时的列宽-->
56
- <!--<tr v-if="model.listData.length === 0" class="ct-tr" style="visibility: hidden;">
57
- <td v-if="model.isMulti">
58
- </td>
59
- <td v-for="(column,colIndex) in model.dataFieldcolumns" class="ct-td" v-if="column.show">
60
- <div :style="{'width': column.width + 'px'}">
61
- </div>
62
- </td>
63
- </tr>-->
64
- <!--可视区域的行数据-->
65
- <tr v-for="(row,rowindex) in model.listData"
66
- v-if="pageRowMin <= rowindex && rowindex <= pageRowMax"
67
- :ref="'rows.'+rowindex" @click="rowClickHandle($event,rowindex)"
68
- class="ct-tr"
69
- :style="row.$style">
70
- <td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td" align="center">
71
- <input v-if="!model.rightMulti || row[model.rightMulti] == 1" type="checkbox" v-model="row.$select" @change="selectOne($event)" class="checkbox-td-1" />
72
- </td>
73
- <td :ref="column.fixed?(column.fixed==='left'?'headLeftTds':'headRightTds'):null"
74
- v-for="(column,colIndex) in model.dataFieldcolumns"
75
- v-if="tdShow(column, row)"
76
- :rowspan="tdRowspan(column, row)"
77
- class="ct-td"
78
- :class="[colHasWidth[colIndex],
79
- colIndex === leftShadow?'shadowLeft':null,
80
- colIndex === rightShadow?'shadowRight':null,
81
- column.fixed === 'left'?'left-fixation':null,
82
- column.fixed === 'right'?'right-fixation':null]"
83
- v-bind="column.attrs">
84
- <!--操作列-->
85
- <div v-if="column.id==='operation'" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
86
- <ct-tablecurrency v-for="(router,rowRouterIndex) in model.rowRouter" :key="rowRouterIndex" v-if="!router.rightField || row[router.rightField] == 1" :isOperationalColumn="true"
87
- :router="router" :colValue="router.label" :rowData="row" @click="rolRouterClickHandler">
88
- </ct-tablecurrency>
89
- </div>
90
-
91
- <!--可点击的列-->
92
- <ct-tablecurrency v-else-if="column.router" :align="column.attrs.align" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :router="column.router" :colValue="row[column.id]" :rowData="row"
93
- @click="rolRouterClickHandler">
94
- </ct-tablecurrency>
95
-
96
- <!--正常的列-->
97
- <div v-else-if="typeof column.template === 'undefined'" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
98
- {{row[column.id]}}
99
- </div>
100
-
101
- <!--模版列(启用)-->
102
- <!--<component v-else :is="column.template(row).component" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :vmodel="column.template(row)" :style="{'width': column.width + 'px'}">
103
- <template slot="value">
104
- {{row[column.id]}}
105
- </template>
106
- </component>-->
107
- </td>
108
- </tr>
109
-
110
-
111
-
112
- <!--适配滚动条-->
113
- <tr v-else v-bind:style="{ height: row.$heigth + 'px' }"></tr>
114
- </tbody>
115
- </table>
116
- </div>
117
- </div>
118
-
119
- <ct-tabletip ref="listFooter" class="ct-search-table-list-footer" :tip="model.listFooter" v-if="!isLoading"></ct-tabletip>
120
- <ct-tabletip ref="footer" class="ct-search-table-footer" :tip="model.footer" v-if="!isLoading"></ct-tabletip>
121
- <div v-if="isLoading && searchLoading" v-loading="isLoading" style="top:30px;">
122
- </div>
123
- </div>
124
- </template>
125
- <script>
126
- import dynamicElement from '../../mixins/dynamicElement';
127
- import dynamicTableTip from './dynamicTableTip.vue';
128
- import dynamicTableToolbar from './dynamicTableToolbar.vue';
129
- import dynamicTableStatistics from './dynamicTableStatistics.vue';
130
- export default {
131
- name: 'ct-searchtable',
132
- mixins: [dynamicElement],
133
- components: {
134
- 'ct-tabletip': dynamicTableTip,
135
- 'ct-tabletoolbar': dynamicTableToolbar,
136
- 'ct-tableStatistics': dynamicTableStatistics
137
- },
138
- props: {
139
- vmodel: Object,
140
- api: String,
141
- searchDataStatisticsApi: String
142
- },
143
- computed: {
144
- },
145
- data() {
146
- return {
147
- currentTh: null,
148
- isLoading: true,
149
- searchLoading: true,
150
- tableLoading: false,//表格等待
151
- operationLoading: false,//操作等待
152
- tempSearchModel: null,
153
- isBusy: false,
154
- screenComplate: false,
155
- tableComplate: false,
156
- scrollTop: 0,
157
- scrollLeft: 0,
158
- scrollRight: 0,
159
- leftShadow: -1,//左阴影个数
160
- rightShadow: -1,//右阴影个数
161
- currentRow: null,
162
- colHasWidth: {},//有无列宽集合
163
- test: true,
164
- firstRow: 0,//展示出来可视的第一行号
165
- pageRowMin: 0,//页面实际的第一行号
166
- pageRowMax: 100,//页面实际的第后行号
167
- displayRowNumber: 30
168
- }
169
- },
170
- activated() {
171
- this.$nextTick(() => {
172
- // this.calculatingRowHeight();
173
- this.setTableHeight();
174
- })
175
- },
176
- methods: {
177
- load(data) {
178
- var self = this;
179
- self.model = data;
180
- self.model.$vue = self;
181
- self.model.columns.forEach((v, vi) => {
182
- if (v.fixed === 'left') {
183
- self.leftShadow = vi;
184
- }
185
- if (v.fixed === 'right' && self.rightShadow < 0) {
186
- self.rightShadow = vi;
187
- }
188
- if (typeof v.width !== 'undefined') {
189
- self.colHasWidth[vi] = '';
190
- }
191
- else {
192
- self.colHasWidth[vi] = 'nowidth';
193
- }
194
- });
195
-
196
- self.isLoading = false;
197
- self.$forceUpdate();
198
- this.model.scripts.formData = this.model.formData;
199
- this.model.scripts.formData.formTable = this.model;
200
-
201
- self.$emit('loaded');
202
- self.$emit('showTitle');
203
- if (this.tempSearchModel !== null) {
204
- self.model.searchModel = this.tempSearchModel;
205
- }
206
- //自动查询 调用合并列
207
- if (self.model.rowMergedColumns.length > 0 && self.model.listData.length > 0) {
208
- self.model.setRow(self.model.listData);
209
- }
210
- self.tableComplate = true;
211
- this.setTableHeight();
212
- this.$nextTick(() => {
213
- window.addEventListener("resize", (ev) => {
214
- self.setTableHeight();
215
- });
216
- //self.rowColorChange();
217
- self.fiexdHead();
218
-
219
- //当表格没有占满表格框时,主动请求下一页
220
- var next = function (rtn) {
221
- if (rtn) {
222
- self.$forceUpdate();
223
- self.$nextTick(() => {
224
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
225
- self.tableLoading = true;
226
- self.model.nextPage(next);
227
- }
228
- else {
229
- self.tableLoading = false;
230
- self.rowColorChange();
231
-
232
- self.calculatingRowHeight();
233
- }
234
- });
235
- }
236
- else {
237
- self.tableLoading = false;
238
- }
239
- }
240
- next(true);
241
-
242
- self.setfixedSize();
243
- });
244
- },
245
- thMouseMoveHandle(ev) {
246
- if (ev.offsetX > ev.currentTarget.offsetWidth - 10) {
247
- ev.currentTarget.style.cursor = 'col-resize';
248
- ev.currentTarget.canResize = true;
249
- }
250
- else {
251
- ev.currentTarget.style.cursor = 'default';
252
- ev.currentTarget.canResize = false;
253
- }
254
- },
255
- thMouseDownHandle(ev, colIndex) {
256
- var self = this;
257
- var col = self.model.columns[colIndex];
258
- if (ev.currentTarget.canResize) {
259
- ev.currentTarget.isDown = true;
260
- ev.currentTarget.oldX = ev.x;
261
- ev.currentTarget.oldWidth = ev.currentTarget.offsetWidth;
262
- this.currentTh = ev.currentTarget;
263
- var MouseUpHandle = function () {
264
- self.currentTh.isDown = false;
265
- self.currentTh = null;
266
- document.removeEventListener("mouseup", MouseUpHandle, false);
267
- document.removeEventListener("mousemove", MouseMoveHandle, false);
268
-
269
- //如果是高度可变的列,重新计算整个表的高度
270
- if (col.autoRowHeight) {
271
- self.model.listData.forEach(v => {
272
- v.$heigth = undefined;
273
- });
274
- self.$nextTick(() => {
275
- self.calculatingRowHeight();
276
- })
277
- }
278
- }
279
- var MouseMoveHandle = function () {
280
- var ev1 = event || e;
281
- if (self.currentTh.isDown) {
282
- if (self.currentTh) {
283
- if (typeof col.width === 'undefined') {
284
- self.colHasWidth[colIndex] = '';
285
- self.$forceUpdate();
286
- self.$nextTick(() => {
287
- var index = self.model.selectIndex;
288
- for (var j = 0; j < self.$refs['rows.' + index][0].children.length; j++) {
289
- self.$refs['rows.' + index][0].children[j].classList.add('select');
290
- }
291
- });
292
- }
293
-
294
- //col.width = (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX));
295
- self.$set(col, "width", (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX)));
296
- if (typeof self.$refs.headTr !== 'undefined' && self.$refs.headTr.length > 0) {
297
- self.currentTh.style.minWidth = col.width + 'px';
298
- self.currentTh.style.width = col.width + 'px';
299
- self.getScrollAttr();
300
- }
301
- }
302
- }
303
- }
304
- document.addEventListener("mouseup", MouseUpHandle, false);
305
- document.addEventListener("mousemove", MouseMoveHandle, false);
306
- }
307
- },
308
- getPage(index) {
309
- var self = this;
310
- if (typeof self.$refs.tableParent !== 'undefined') {
311
- self.$refs.tableParent.scrollTop = 0;
312
- self.$refs.tableParent.scrollLeft = 0;
313
- self.scrollTop = 0;
314
- self.scrollLeft = 0;
315
- }
316
- var next = function (rtn) {
317
- if (rtn) {
318
- self.$forceUpdate();
319
- self.$nextTick(() => {
320
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
321
- self.tableLoading = true;
322
- self.model.nextPage(next);
323
- }
324
- else {
325
- self.tableLoading = false;
326
- self.rowColorChange();
327
- self.resetScroll();
328
- self.calculatingRowHeight();
329
- self.getScrollAttr();
330
- }
331
- self.setfixedSize();
332
- });
333
- }
334
- else {
335
- self.tableLoading = false;
336
- self.rowColorChange();
337
- }
338
- self.$emit('searchComplate');
339
- }
340
- self.tableLoading = true;
341
- this.model.getPage(index, next);
342
- },
343
- toSort(ev, col, action) {
344
- var self = this;
345
- this.model.toSort(col, action, () => {
346
- self.$forceUpdate();
347
- self.getScrollAttr();
348
- });
349
- ev.cancelBubble = true;
350
- ev.stopPropagation();
351
- },
352
- clearSort(ev, col) {
353
- var self = this;
354
- this.model.clearSort(col, () => {
355
- self.$forceUpdate();
356
- self.getScrollAttr();
357
- });
358
- ev.cancelBubble = true;
359
- ev.stopPropagation();
360
- },
361
- fiexdHead() {
362
- this.$nextTick(() => {
363
- var self = this;
364
- var tableCont = this.$refs.tableParent;
365
- function scrollHandle(e) {
366
- self.getScrollAttr();
367
- }
368
- tableCont.addEventListener('scroll', self.getScrollAttr);
369
- });
370
- },
371
- removeScrollEvent() {
372
- var tableCont = this.$refs.tableParent;
373
- //移除事件监听器
374
- tableCont.removeEventListener("scroll", this.getScrollAttr, false);
375
- //tableCont.removeEventListener("scroll", this.scrollHandle, false);
376
- },
377
- addScrollEvent() {
378
- var tableCont = this.$refs.tableParent;
379
- //添加事件监听器
380
- tableCont.addEventListener("scroll", this.getScrollAttr, false);
381
- },
382
- freezeData() {
383
- Object.freeze(this.model.listData);
384
- },
385
- setfixedSize() {
386
- if (typeof this.$refs.headTr !== 'undefined' && this.$refs.headTr.length > 0) {
387
- let fixedSize = 0;
388
- let j = 0;
389
- let fixationThArr = this.$refs.headTr[0].getElementsByClassName('left-fixation-th');
390
- if (fixationThArr.length > 0) {
391
- if (this.model.isMulti) {
392
- fixedSize = fixationThArr[j++].offsetWidth
393
- }
394
- for (let i = 0; i < this.model.columns.length; i++) {
395
- if (this.model.columns[i].fixed === 'left' && this.model.columns[i].show) {
396
- this.model.columns[i].fixedSize = fixedSize;
397
- fixedSize = fixedSize + fixationThArr[j++].offsetWidth;
398
- }
399
- }
400
-
401
- fixedSize = 0;
402
- fixationThArr = this.$refs.headTr[0].getElementsByClassName('right-fixation-th');
403
- j = fixationThArr.length - 1;
404
- for (let i = this.model.columns.length - 1; i > 0; i--) {
405
- if (this.model.columns[i].fixed === 'right' && this.model.columns[i].show) {
406
- this.model.columns[i].fixedSize = fixedSize;
407
- fixedSize = fixedSize + fixationThArr[j--].offsetWidth;
408
- }
409
- }
410
- }
411
- }
412
- },
413
- getScrollAttr(e) {
414
- if (typeof this.$refs.tableParent !== 'undefined' && typeof this.$refs.headThs !== 'undefined') {
415
-
416
- this.calculatingRowHeight();
417
-
418
- var scrollTop = this.$refs.tableParent.scrollTop;
419
- var scrollLeft = this.$refs.tableParent.scrollLeft;
420
- var scrollRight = this.$refs.tableParent.scrollWidth - scrollLeft - this.$refs.tableParent.clientWidth;
421
-
422
- //计算可视范围的第一条数据
423
- let index = 0;
424
- let topHeigth = 0;
425
- for (; index < this.model.listData.length; index++) {
426
- if (topHeigth >= scrollTop) {
427
- break;
428
- }
429
- else {
430
- topHeigth = topHeigth + this.model.listData[index].$heigth;
431
- }
432
- }
433
- this.firstRow = index - 1;
434
- this.setTrLazyLoading();
435
- //若每行高度是固定的,可直接使用下面方法即可
436
- //this.firstRow = parseInt(scrollTop / 33);
437
-
438
- this.scrollTop = scrollTop;
439
- this.scrollLeft = scrollLeft;
440
- this.scrollRight = scrollRight;
441
- }
442
- },
443
- setTrLazyLoading() {
444
- this.pageRowMax = this.firstRow + this.displayRowNumber;
445
- this.pageRowMin = this.firstRow - this.displayRowNumber;
446
- if (this.pageRowMin > 0 && this.model.listData[this.pageRowMin].$rowspan === 0) {
447
- for (let i = this.pageRowMin; i >= 0; i--) {
448
- if (this.model.listData[i].$rowspan > 0) {
449
- this.pageRowMin = i;
450
- break;
451
- }
452
- }
453
- }
454
-
455
- //debugger
456
- //let index = this.model.listData.length - 1;
457
- //let isSet = false;
458
- //for (; index >= 0; index--) {
459
- // if (Math.abs(index - this.firstRow) < this.displayRowNumber || typeof (this.model.listData[index].$heigth) === 'undefined') {
460
- // //this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
461
- // }
462
- // else {
463
- // if (index < this.firstRow && !isSet) {
464
- // if (this.model.listData[index].$rowspan === 0) {
465
- // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
466
- // continue;
467
- // }
468
- // else {
469
- // isSet = true;
470
- // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
471
- // continue;
472
- // }
473
- // }
474
- // this.$set(this.model.listData[index], "$trLazyLoadingShow", false);
475
- // }
476
- //}
477
- },
478
- setTableHeight() {
479
- var self = this;
480
- this.$nextTick(() => {
481
- if (this.$refs.searchTable && this.$refs.toolbar && this.$refs.searchTable.parentElement) {
482
- var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
483
- var h2 = this.$refs.searchTable.offsetTop | 0;
484
- var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
485
- var h4 = this.$refs.footer.$el.offsetHeight | 0;
486
- var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
487
- var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
488
- let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - 22;
489
- this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
490
- this.$nextTick(() => {
491
- self.getScrollAttr();
492
- });
493
- }
494
- });
495
- },
496
- scrollHandle(ev) {
497
- var self = this;
498
- if ((this.$refs.tableParent.scrollTop + this.$refs.tableParent.clientHeight) >= (this.$refs.tableParent.scrollHeight - 5)) {
499
- if (!this.isBusy) {
500
- self.isBusy = true;
501
- self.tableLoading = true;
502
- self.model.nextPage((rtn) => {
503
- if (rtn) {
504
- self.$nextTick(() => {
505
- self.calculatingRowHeight();
506
- self.getScrollAttr();
507
-
508
- });
509
- self.$forceUpdate();
510
- }
511
- self.isBusy = false;
512
- self.tableLoading = false;
513
- });
514
- }
515
- }
516
- ev.cancelBubble = true;
517
- ev.stopPropagation();
518
- },
519
- rowClickHandle(ev, index) {
520
- this.model.selectIndex = index;
521
- this.rowColorChange();
522
- ev.cancelBubble = true;
523
- ev.stopPropagation();
524
- },
525
- rowColorChange() {
526
- var index = this.model.selectIndex;
527
- if (typeof this.$refs['rows.' + index] !== "undefined" && this.currentRow !== this.$refs['rows.' + index][0]) {
528
- if (this.currentRow !== null) {
529
- for (var i = 0; i < this.currentRow.children.length; i++) {
530
- this.currentRow.children[i].classList.remove('select');
531
- }
532
- }
533
- if(this.$refs['rows.' + index][0])
534
- {
535
- for (var j = 0; j < this.$refs['rows.' + index][0].children.length; j++) {
536
- this.$refs['rows.' + index][0].children[j].classList.add('select');
537
- }
538
- }
539
- this.currentRow = this.$refs['rows.' + index][0]||null;
540
- }
541
- },
542
- resetScroll: function () {
543
- var self = this;
544
- if (self.$refs.tableParent.scrollTop > self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableHead.offsetHeight) {
545
- self.$refs.tableParent.scrollTop = self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableHead.offsetHeight;
546
- }
547
- if (self.$refs.tableParent.scrollTop + self.$refs.tableParent.clientHeight <= self.$refs['rows.' + self.model.selectIndex][0].offsetTop + self.$refs['rows.' + self.model.selectIndex][0].offsetHeight) {
548
- self.$refs.tableParent.scrollTop = self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableParent.clientHeight + self.$refs['rows.' + self.model.selectIndex][0].offsetHeight;
549
- }
550
- self.scrollTop = self.$refs.tableParent.scrollTop;
551
- },
552
- rowKeyDownHandle(ev, action) {
553
- var self = this;
554
- if (action === 1) {
555
- this.model.downKey();
556
- }
557
- else {
558
- this.model.upKey();
559
- }
560
- this.rowColorChange();
561
- this.resetScroll();
562
- if (!this.isBusy) {
563
- if (this.model.selectIndex === this.model.listData.length - 1) {
564
- self.isBusy = true;
565
- self.tableLoading = true;
566
- self.model.nextPage((rtn) => {
567
- if (rtn) {
568
- self.$nextTick(() => {
569
- self.calculatingRowHeight();
570
- self.getScrollAttr();
571
- });
572
- self.$forceUpdate();
573
- }
574
- self.isBusy = false;
575
- self.tableLoading = false;
576
- });
577
- }
578
- }
579
- ev.cancelBubble = true;
580
- ev.stopPropagation();
581
- ev.preventDefault();
582
- },
583
- searchComplate(m, defaultSearch) {
584
- var self = this;
585
- this.$nextTick(function () {
586
- if (typeof this.api !== 'undefined') {
587
- self.loaderObj.SearchTable(self.api, self.load, m, defaultSearch);
588
- }
589
- if (typeof this.source !== 'undefined') {
590
- self.load(self.loaderObj.SearchTable(self.source));
591
- }
592
- if (typeof self.vmodel !== 'undefined') {
593
- self.load(self.vmodel);
594
- }
595
- });
596
- },
597
- toolbarClickHandler(field) {
598
- let self = this;
599
- let submitData = {};
600
- let action = field.action;
601
-
602
- var tempListData = self.model.getSelectRowData(field);
603
- if (tempListData != null) {
604
- field.submitListField.forEach((k) => {
605
- if (field.isMulti) {
606
- submitData[k] = [];
607
- for (var ri = 0; ri < tempListData.length; ri++) {
608
- submitData[k].push(tempListData[ri][k]);
609
- }
610
- }
611
- else {
612
- submitData[k] = tempListData[0][k];
613
- }
614
- });
615
-
616
- if (field.isSingle && tempListData.length > 0 && field.actionField) {
617
- action = tempListData[0][field.actionField];
618
- }
619
- }
620
-
621
- if (field.flagAttachSearchCondition) {
622
- submitData['searchFields'] = self.model.searchModel.searchData;
623
- }
624
-
625
- //如果是导出按钮,则直接交给父组件处理
626
- if (field.isExport) {
627
- self.$emit('toolbarClick', field, submitData);
628
- return;
629
- }
630
-
631
- this.routerClickHandler(field, submitData, action);
632
- },
633
- rolRouterClickHandler(field, rowData) {
634
- var self = this;
635
- var submitData = {};
636
- field.submitListField.forEach((k) => {
637
- submitData[k] = rowData[k];
638
- });
639
-
640
- let action = field.action;
641
- if (field.actionField) {
642
- action = rowData[field.actionField];
643
- }
644
-
645
- this.routerClickHandler(field, submitData, action);
646
- },
647
- routerClickHandler(field, submitData, action) {
648
- let self = this;
649
- action = action || field.action;
650
-
651
- var clickAcion = function () {
652
- //若不是客户端方法,则直接访问接口
653
- if (!field.isClientFuntion) {
654
- // 外部框架tab页打开
655
- if (field.isFormPageInTab || field.isSearchPageInTab) {
656
- submitData = field.getActionPara(submitData).para;
657
- if (field.pageStyle) {
658
- submitData.pageStyle = field.pageStyle;
659
- }
660
- self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model);
661
- }
662
- else if (field.isBrowserNewTab) {// 浏览器打开
663
- submitData = field.getActionPara(submitData).para;
664
- let query = self.$common.objectToQueryStr(submitData);
665
- window.open(action + query, "_blank");
666
- }
667
- else {
668
- //self.operationLoading = true;
669
-
670
- //Form
671
- if (field.isOpenForm) {
672
- var dialogOption = {
673
- title: field.pageTitle,
674
- pane: self.$common.getParentPane(self),
675
- content: [{
676
- component: field.navToNewPageName,
677
- attrs: {
678
- //source: data.content,
679
- api: action,
680
- apiParam: field.getActionPara(submitData).para,
681
- showTitle: false,
682
- width: field.dialogWidth + 'px',
683
- height: field.dialogHeight + 'px'
684
- },
685
- on: {
686
- submit(ev) {
687
- if (!field.flagFreshCurrentRow) {
688
- self.model.doAction(ev);
689
- }
690
- self.$forceUpdate();
691
- self.$refs.footer.$forceUpdate();
692
- self.$common.closeDialog(dialogOption.dialog);
693
- self.updateCurrentRow(field);
694
- },
695
- refreshParent() {
696
- self.getPage(1);
697
- self.$common.closeDialog(dialogOption.dialog);
698
- },
699
- closeDialog() {
700
- self.updateCurrentRow(field);
701
- }
702
- }
703
- }]
704
- };
705
- self.$common.openDialog(dialogOption);
706
- }
707
- //SearchList
708
- else if (field.isOpenList) {
709
- var dialogOption = {
710
- title: field.pageTitle,
711
- pane: self.$common.getParentPane(self),
712
- content: [{
713
- component: field.navToNewPageName,
714
- attrs: {
715
- searchConditionApi: field.actionForSearchLayout,
716
- searchDataApi: field.actionForSearch,
717
- apiParam: submitData,
718
- width: field.dialogWidth + 'px',
719
- height: field.dialogHeight + 'px'
720
- },
721
- on: {
722
- refreshParent() {
723
- self.getPage(1);
724
- self.$common.closeDialog(dialogOption.dialog);
725
- },
726
- closeDialog() {
727
- self.updateCurrentRow(field);
728
- }
729
- }
730
- }]
731
- };
732
- self.$common.openDialog(dialogOption);
733
- }
734
- //Tabs
735
- else if (field.isOpenTabs) {
736
- var dialogOption = {
737
- title: field.pageTitle,
738
- pane: self.$common.getParentPane(self),
739
- content: [{
740
- component: field.navToNewPageName,
741
- attrs: {
742
- searchConditionApi: field.actionForSearchLayout,
743
- searchDataApi: field.actionForSearch,
744
- apiParam: submitData,
745
- width: field.dialogWidth + 'px',
746
- height: field.dialogHeight + 'px'
747
- },
748
- on: {
749
- }
750
- }]
751
- };
752
- self.$common.openDialog(dialogOption);
753
- }
754
- else {
755
- self.operationLoading = true;
756
- field.doAction(submitData, (data) => {
757
- self.operationLoading = false;
758
- self.model.doAction({ responseData: data });
759
- self.$forceUpdate();
760
- self.$refs.footer.$forceUpdate();
761
- })
762
- }
763
- }
764
- }
765
- //执行客户端脚本
766
- else {
767
- // let parm={submitData:submitData,field:field}
768
- // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
769
- let title=field.pageTitle==undefined ?field.label:field.pageTitle;
770
- submitData.actionType=field.actionType;
771
- var fun =self.$common.getDataDrivenOpts().handler[action];
772
- fun(submitData,title,self.model);
773
- // var fun = self.model.scripts.formData[action];
774
- // fun(submitData,field);
775
- }
776
- }
777
-
778
- if (field.alert) {
779
- self.$common.confirm(field.alertMsg, field.alertCaption, {
780
- confirmButtonText: field.alertOKButtonText,
781
- cancelButtonText: field.alertCancelButtonText,
782
- //type: 'warning'
783
- center: field.alertCenter
784
- }).then(() => {
785
- clickAcion();
786
- }).catch(() => {
787
- });
788
- }
789
- else {
790
- clickAcion();
791
- }
792
- },
793
- selectAll($ev) {
794
- this.model.listData.forEach((ro) => {
795
- if (!this.model.rightMulti || ro[this.model.rightMulti] == 1) {
796
- ro.$select = $ev.srcElement.checked;
797
- }
798
- });
799
- this.model.setButtonsDisabled();
800
- this.$forceUpdate();
801
- },
802
- selectOne($ev) {
803
- this.model.setButtonsDisabled();
804
- },
805
- calculatingRowHeight() {
806
- let self = this;
807
- let count = 0;
808
-
809
- //查询出所有没有设置$heigth的数据并重新设置$heigth
810
- let notHeigthData = self.model.listData.filter(item => {
811
- return item.$heigth === undefined || item.$heigth <= 0
812
- })
813
- if (notHeigthData && notHeigthData.length > 0) {
814
- notHeigthData.forEach((v, i) => {
815
- if (self.$refs["rows." + i] && self.$refs["rows." + i].length > 0) {
816
- self.$set(v, "$heigth", self.$refs["rows." + i][0].clientHeight);
817
- }
818
- });
819
- }
820
-
821
- //for (let i = 0; i < self.model.listData.length; i++) {
822
- // if (self.$refs[]) {
823
- // }
824
- //}
825
- //self.$refs
826
- },
827
- updateCurrentRow(router) {
828
- let self = this;
829
- if (router.flagFreshCurrentRow) {
830
- self.tableComplate = true;
831
- self.model.getCurrentRowApiData(function () {
832
- self.$forceUpdate();
833
- self.tableComplate = false;
834
- });
835
- }
836
- },
837
- importComplete(res) {
838
- this.model.doAction(res);
839
- },
840
- tdRowspan(column, row) {
841
- if (!column.show) {
842
- return '';
843
- }
844
-
845
- //合并行
846
- if (row.$rowspan !== 0 && this.model.rowMergedColumns.indexOf(column.id) > -1) {
847
- return row.$rowspan;
848
- }
849
-
850
- return '';
851
- },
852
- tdShow(column, row) {
853
- if (!column.show) {
854
- return false;
855
- }
856
-
857
- //合并行
858
- if (row.$rowspan === 0 && this.model.rowMergedColumns.indexOf(column.id) > -1) {
859
- return false;
860
- }
861
-
862
- return true;
863
- },
864
- closeTabThen(ev) {
865
- let self = this;
866
- if (self.model.checkCloseTabThen(ev.notification)) {
867
- self.model.doAction(ev);
868
- self.$forceUpdate();
869
- self.$refs.footer.$forceUpdate();
870
- }
871
- }
872
- },
873
- }</script>
874
- <style>
875
- .ct-tableParent {
876
- overflow: auto;
877
- border-bottom: 1px solid #ebeef5;
878
- width: 100%;
879
- outline: 0;
880
- }
881
-
882
- .ct-searchtable .ct-table {
883
- min-width: 100%;
884
- }
885
-
886
- .ct-searchtable .ct-table th {
887
- background-color: #f4f7fa !important;
888
- border-top: 1px solid #ebeef5;
889
- }
890
-
891
- .ct-searchtable .ct-tr > .ct-td {
892
- /*border: 1px solid #e7e8eb;*/
893
- border-bottom: 1px solid #e7e8eb;
894
- /*border-right: 1px solid #e7e8eb;
895
- border-left: 1px solid #e7e8eb;*/
896
- padding: 2px 20px;
897
- cursor: default;
898
- background-color: #ffffff;
899
- }
900
-
901
- .shadowLeft {
902
- border-right: 1px solid #e7e8eb;
903
- box-shadow: 2px 0 3px -1px rgba(0,0,0,0.1);
904
- }
905
-
906
- .shadowRight {
907
- box-shadow: -2px 0 3px -1px rgba(0,0,0,0.1);
908
- }
909
-
910
- .ct-searchtable body:last-child > .ct-td {
911
- border-bottom: 0px;
912
- }
913
-
914
- .ct-searchtable .ct-tr > .ct-td.nowidth {
915
- white-space: nowrap;
916
- }
917
- /*.ct-searchtable tbody .ct-tr:hover .ct-td {
918
- background-color: #ebeef5 !important;
919
- }*/
920
-
921
- .ct-table {
922
- color: #606266;
923
- font-size: 18px;
924
- line-height: 40px;
925
- min-height: 40px;
926
- }
927
-
928
- .ct-table-mini {
929
- font-size: 12px;
930
- line-height: 26px;
931
- min-height: 28px;
932
- }
933
-
934
- .ct-table-small {
935
- font-size: 14px;
936
- line-height: 32px;
937
- min-height: 32px;
938
- }
939
-
940
- .ct-table-medium {
941
- font-size: 16px;
942
- line-height: 36px;
943
- min-height: 36px;
944
- }
945
-
946
- .ct-table .ct-td > .caret-wrapper {
947
- display: inline-flex;
948
- flex-direction: column;
949
- align-items: center;
950
- height: 34px;
951
- width: 10px;
952
- vertical-align: middle;
953
- cursor: pointer;
954
- overflow: initial;
955
- position: relative;
956
- }
957
-
958
- .ct-table .ct-td > .caret-wrapper > .sort-caret {
959
- width: 0;
960
- height: 0;
961
- border: 5px solid transparent;
962
- position: absolute;
963
- left: 7px;
964
- }
965
-
966
- .ct-table .ct-td > .caret-wrapper > .sort-caret.ascending {
967
- border-bottom-color: #c0c4cc;
968
- top: 5px;
969
- }
970
-
971
- .ct-table .ct-td > .caret-wrapper > .sort-caret.descending {
972
- border-top-color: #c0c4cc;
973
- bottom: 7px;
974
- }
975
-
976
- .ct-table .ct-td.select {
977
- background-color: #ecf5ff !important;
978
- }
979
-
980
- .ct-table .ct-tr:hover .ct-td.select {
981
- background-color: #ecf5ff !important;
982
- }
983
-
984
- .ct-table .ct-td.asc > .caret-wrapper > .sort-caret.ascending {
985
- border-bottom-color: #409eff;
986
- top: 5px;
987
- }
988
-
989
- .ct-table .ct-td.desc > .caret-wrapper > .sort-caret.descending {
990
- border-top-color: #409eff;
991
- bottom: 7px;
992
- }
993
-
994
-
995
- .ct-table .cell {
996
- /*white-space: nowrap;*/
997
- text-overflow: ellipsis;
998
- /*min-width: 50px; todo 实际宽度-21即可*/
999
- overflow: hidden;
1000
- /*padding-right: 10px;*/
1001
- }
1002
-
1003
- /*强制换行 todo 可去掉改成强制不换行*/
1004
- .ct-table .cell {
1005
- /* 这两个在技术上是一样的, 为了兼容了浏览器两个都加上 */
1006
- overflow-wrap: break-word;
1007
- word-wrap: break-word;
1008
- -ms-word-break: break-all;
1009
- /* 这个的使用在web-kit中有些危险,他可能会阶段所有东西 */
1010
- word-break: break-all;
1011
- /* Instead use this non-standard one: */
1012
- word-break: break-word;
1013
- /* 如果浏览器支持的话增加一个连接符(Blink不支持) */
1014
- -ms-hyphens: auto;
1015
- -moz-hyphens: auto;
1016
- -webkit-hyphens: auto;
1017
- hyphens: auto;
1018
- }
1019
-
1020
- .ct-table .lineFeedCell {
1021
- min-width: 40px;
1022
- /*padding-right: 10px;*/
1023
- }
1024
-
1025
- /*.ct-table .cell.ct-tooltip:hover {
1026
- text-overflow: inherit;
1027
- overflow: visible;
1028
- }*/
1029
-
1030
- .ct-table .left-fixation {
1031
- position: sticky;
1032
- }
1033
-
1034
- .ct-table .right-fixation {
1035
- position: sticky;
1036
- }
1037
-
1038
- .ct-table .left-fixation-th {
1039
- position: sticky;
1040
- top: 0px;
1041
- z-index: 99;
1042
- }
1043
-
1044
- .ct-table .right-fixation-th {
1045
- position: sticky;
1046
- top: 0px;
1047
- z-index: 99;
1048
- }
1049
-
1050
- .ct-table .right-no-fixation-th {
1051
- position: sticky;
1052
- top: 0px;
1053
- z-index: 50;
1054
- }
1055
-
1056
- .ct-table .ct-searchtable-th {
1057
- /*text-align: center*/
1058
- }
1059
-
1060
- .ct-table .checkbox-td {
1061
- min-width: 20px;
1062
- width: 20px;
1063
- left: 0px;
1064
- }
1065
-
1066
- .ct-table .checkbox-td .checkbox-td-1 {
1067
- vertical-align: inherit;
1068
- }
1069
- </style>
1
+ <template>
2
+ <div style="width:100%;" class="ct-searchtable" ref="searchTable">
3
+ <ct-tableStatistics ref="listHeader" class="ct-search-table-list-header" :tip="model.listHeader" v-if="!isLoading && searchDataStatisticsApi"></ct-tableStatistics>
4
+ <ct-tabletoolbar ref="toolbar" v-if="!isLoading" :buttons="model.buttons"
5
+ @click="toolbarClickHandler($event)"
6
+ @importComplete="importComplete"
7
+ :optionApi="model.optionApi"
8
+ :searchModel="model.searchModel"></ct-tabletoolbar>
9
+ <ct-tabletip ref="listHeader" class="ct-search-table-list-header" :tip="model.listHeader" v-if="!isLoading"></ct-tabletip>
10
+ <div v-loading="tableLoading" v-if="!isLoading" :style="{'height':'0px','top':model.tableHeight*0.55+'px'}">
11
+ </div>
12
+ <div v-loading="operationLoading">
13
+ </div>
14
+ <div class="ct-tableParent" ref="tableParent" v-bind="model.attrs" v-if="!isLoading"
15
+ :style="{'height':model.tableHeight+'px'}"
16
+ @scroll="scrollHandle($event)" v-focus="true"
17
+ @keydown.up="rowKeyDownHandle($event,0)" @keydown.down="rowKeyDownHandle($event,1)"
18
+ tabindex="-1">
19
+ <div class="ct-table-content">
20
+ <table border="0" cellpadding="0" cellspacing="0"
21
+ :class="['ct-table',model.attrs.size?'ct-table-'+model.attrs.size:'']">
22
+ <!--表头-->
23
+ <thead ref="tableHead">
24
+ <tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr">
25
+ <th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th checkbox-td" :class="[model.tdClass]">
26
+ <input type="checkbox" @click="selectAll($event)" v-model="model.selectAll" class="checkbox-td-1" />
27
+ </th>
28
+ <th :ref="column.fixed?(column.fixed==='left'?'headLeftThs':'headRightThs'):'headThs'" v-for="(column,colIndex) in columns"
29
+ v-if="column.show" class="ct-td ct-searchtable-th"
30
+ :rowspan="column.rowspan"
31
+ :colspan="column.colspan"
32
+ :class="[colHasWidth[colIndex],column.sortAction,model.tdClass,
33
+ colIndex === leftShadow?'shadowLeft':null,
34
+ colIndex === rightShadow?'shadowRight':null,
35
+ column.fixed === 'left'?'left-fixation-th':null,
36
+ column.fixed === 'right'?'right-fixation-th':null,
37
+ column.width === undefined?'ct-table-auto':null,
38
+ typeof column.fixed === 'undefined'?'right-no-fixation-th':null]"
39
+ @mousemove="thMouseMoveHandle($event)" @mousedown="thMouseDownHandle($event,colIndex)"
40
+ v-bind="column.attrs">
41
+
42
+ <span>{{column.name}}</span>
43
+ <span class="caret-wrapper" v-if="column.sort" @click="toSort($event,column);" @contextmenu.prevent="clearSort($event,column);">
44
+ <i class="sort-caret ascending" @click.left="toSort($event,column,'asc')" @contextmenu.prevent="clearSort($event,column);"></i>
45
+ <i class="sort-caret descending" @click.left="toSort($event,column,'desc')" @contextmenu.prevent="clearSort($event,column);"></i>
46
+ </span>
47
+ </th>
48
+
49
+ <!--<th v-if="model.rowRouter.length > 0" class="ct-td tdFiexd" :class="[-1 === rightShadow?'shadowRight':null]" :style="{'min-width':'20px','transform':'translate('+scrollRight+'px, '+scrollTop+'px)'}">
50
+ 操作
51
+ </th>-->
52
+ </tr>
53
+ </thead>
54
+ <!--表体-->
55
+ <tbody>
56
+ <!--这一行仅用于设置未加载数据时的列宽-->
57
+ <!--<tr v-if="model.listData.length === 0" class="ct-tr" style="visibility: hidden;">
58
+ <td v-if="model.isMulti">
59
+ </td>
60
+ <td v-for="(column,colIndex) in model.dataFieldcolumns" class="ct-td" v-if="column.show">
61
+ <div :style="{'width': column.width + 'px'}">
62
+ </div>
63
+ </td>
64
+ </tr>-->
65
+ <!--可视区域的行数据-->
66
+ <tr v-for="(row,rowindex) in model.listData"
67
+ v-if="pageRowMin <= rowindex && rowindex <= pageRowMax"
68
+ :ref="'rows.'+rowindex" @click="rowClickHandle($event,rowindex)"
69
+ class="ct-tr"
70
+ :style="row.$style">
71
+ <td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td" :class="[model.tdClass]" align="center">
72
+ <input v-if="!model.rightMulti || row[model.rightMulti] == 1" type="checkbox" v-model="row.$select" @change="selectOne($event)" class="checkbox-td-1" />
73
+ </td>
74
+ <td :ref="column.fixed?(column.fixed==='left'?'headLeftTds':'headRightTds'):null"
75
+ v-for="(column,colIndex) in model.dataFieldcolumns"
76
+ v-if="tdShow(column, row)"
77
+ :rowspan="tdRowspan(column, row)"
78
+ class="ct-td"
79
+ :class="[colHasWidth[colIndex],model.tdClass,
80
+ colIndex === leftShadow?'shadowLeft':null,
81
+ colIndex === rightShadow?'shadowRight':null,
82
+ column.fixed === 'left'?'left-fixation':null,
83
+ column.width === undefined?'ct-table-auto':null,
84
+ column.fixed === 'right'?'right-fixation':null]"
85
+ v-bind="column.attrs">
86
+ <!--操作列-->
87
+ <div v-if="column.id==='operation'" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
88
+ <ct-tablecurrency v-for="(router,rowRouterIndex) in model.rowRouter" :key="rowRouterIndex" v-if="!router.rightField || row[router.rightField] == 1" :isOperationalColumn="true"
89
+ :router="router" :colValue="router.label" :rowData="row" @click="rolRouterClickHandler">
90
+ </ct-tablecurrency>
91
+ </div>
92
+
93
+ <!--可点击的列-->
94
+ <ct-tablecurrency v-else-if="column.router" :align="column.attrs.align" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :router="column.router" :colValue="row[column.id]" :rowData="row"
95
+ @click="rolRouterClickHandler">
96
+ </ct-tablecurrency>
97
+
98
+ <!--正常的列-->
99
+ <div v-else-if="typeof column.template === 'undefined'" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
100
+ {{row[column.id]}}
101
+ </div>
102
+
103
+ <!--模版列(启用)-->
104
+ <!--<component v-else :is="column.template(row).component" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :vmodel="column.template(row)" :style="{'width': column.width + 'px'}">
105
+ <template slot="value">
106
+ {{row[column.id]}}
107
+ </template>
108
+ </component>-->
109
+ </td>
110
+ </tr>
111
+
112
+ <!--适配滚动条-->
113
+ <tr v-else v-bind:style="{ height: row.$heigth + 'px' }"></tr>
114
+ </tbody>
115
+ </table>
116
+ </div>
117
+ </div>
118
+
119
+ <ct-tabletip ref="listFooter" class="ct-search-table-list-footer" :tip="model.listFooter" v-if="!isLoading"></ct-tabletip>
120
+ <ct-tabletip ref="footer" class="ct-search-table-footer" :tip="model.footer" v-if="!isLoading"></ct-tabletip>
121
+ <div v-if="isLoading && searchLoading" v-loading="isLoading" style="top:30px;">
122
+ </div>
123
+ </div>
124
+ </template>
125
+ <script>
126
+ import dynamicElement from '../../mixins/dynamicElement';
127
+ import dynamicTableTip from './dynamicTableTip.vue';
128
+ import dynamicTableToolbar from './dynamicTableToolbar.vue';
129
+ import dynamicTableStatistics from './dynamicTableStatistics.vue';
130
+ export default {
131
+ name: 'ct-searchtable',
132
+ mixins: [dynamicElement],
133
+ components: {
134
+ 'ct-tabletip': dynamicTableTip,
135
+ 'ct-tabletoolbar': dynamicTableToolbar,
136
+ 'ct-tableStatistics': dynamicTableStatistics
137
+ },
138
+ props: {
139
+ vmodel: Object,
140
+ api: String,
141
+ searchDataStatisticsApi: String
142
+ },
143
+ computed: {
144
+ },
145
+ data() {
146
+ return {
147
+ currentTh: null,
148
+ isLoading: true,
149
+ searchLoading: true,
150
+ tableLoading: false,//表格等待
151
+ operationLoading: false,//操作等待
152
+ tempSearchModel: null,
153
+ isBusy: false,
154
+ screenComplate: false,
155
+ tableComplate: false,
156
+ scrollTop: 0,
157
+ scrollLeft: 0,
158
+ scrollRight: 0,
159
+ leftShadow: -1,//左阴影个数
160
+ rightShadow: -1,//右阴影个数
161
+ currentRow: null,
162
+ colHasWidth: {},//有无列宽集合
163
+ test: true,
164
+ firstRow: 0,//展示出来可视的第一行号
165
+ pageRowMin: 0,//页面实际的第一行号
166
+ pageRowMax: 100,//页面实际的第后行号
167
+ displayRowNumber: 30
168
+ }
169
+ },
170
+ activated() {
171
+ this.$nextTick(() => {
172
+ this.setTableHeight();
173
+ })
174
+ },
175
+ methods: {
176
+ load(data) {
177
+ var self = this;
178
+ self.model = data;
179
+ self.model.$vue = self;
180
+ self.model.columns.forEach((v, vi) => {
181
+ if (v.fixed === 'left') {
182
+ self.leftShadow = vi;
183
+ }
184
+ if (v.fixed === 'right' && self.rightShadow < 0) {
185
+ self.rightShadow = vi;
186
+ }
187
+ if (typeof v.width !== 'undefined') {
188
+ self.colHasWidth[vi] = '';
189
+ }
190
+ else {
191
+ self.colHasWidth[vi] = 'nowidth';
192
+ }
193
+ });
194
+
195
+ self.isLoading = false;
196
+ self.$forceUpdate();
197
+ this.model.scripts.formData = this.model.formData;
198
+ this.model.scripts.formData.formTable = this.model;
199
+
200
+ self.$emit('loaded');
201
+ self.$emit('showTitle');
202
+ if (this.tempSearchModel !== null) {
203
+ self.model.searchModel = this.tempSearchModel;
204
+ }
205
+ //自动查询 调用合并列
206
+ if (self.model.rowMergedColumns.length > 0 && self.model.listData.length > 0) {
207
+ self.model.setRow(self.model.listData);
208
+ }
209
+ self.tableComplate = true;
210
+ this.setTableHeight();
211
+ this.$nextTick(() => {
212
+ window.addEventListener("resize", (ev) => {
213
+ self.setTableHeight();
214
+ });
215
+ //self.rowColorChange();
216
+ self.fiexdHead();
217
+
218
+ //当表格没有占满表格框时,主动请求下一页
219
+ var next = function (rtn) {
220
+ if (rtn) {
221
+ self.$forceUpdate();
222
+ self.$nextTick(() => {
223
+ if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
224
+ self.tableLoading = true;
225
+ self.model.nextPage(next);
226
+ }
227
+ else {
228
+ self.tableLoading = false;
229
+ self.rowColorChange();
230
+
231
+ self.calculatingRowHeight();
232
+ }
233
+ });
234
+ }
235
+ else {
236
+ self.tableLoading = false;
237
+ }
238
+ }
239
+ next(true);
240
+
241
+ self.setfixedSize();
242
+ });
243
+ },
244
+ thMouseMoveHandle(ev) {
245
+ if (ev.offsetX > ev.currentTarget.offsetWidth - 10) {
246
+ ev.currentTarget.style.cursor = 'col-resize';
247
+ ev.currentTarget.canResize = true;
248
+ }
249
+ else {
250
+ ev.currentTarget.style.cursor = 'default';
251
+ ev.currentTarget.canResize = false;
252
+ }
253
+ },
254
+ thMouseDownHandle(ev, colIndex) {
255
+ var self = this;
256
+ var col = self.model.columns[colIndex];
257
+ if (ev.currentTarget.canResize) {
258
+ ev.currentTarget.isDown = true;
259
+ ev.currentTarget.oldX = ev.x;
260
+ ev.currentTarget.oldWidth = ev.currentTarget.offsetWidth;
261
+ this.currentTh = ev.currentTarget;
262
+ var MouseUpHandle = function () {
263
+ self.currentTh.isDown = false;
264
+ self.currentTh = null;
265
+ document.removeEventListener("mouseup", MouseUpHandle, false);
266
+ document.removeEventListener("mousemove", MouseMoveHandle, false);
267
+
268
+ //如果是高度可变的列,重新计算整个表的高度
269
+ if (col.autoRowHeight) {
270
+ self.model.listData.forEach(v => {
271
+ v.$heigth = undefined;
272
+ });
273
+ self.$nextTick(() => {
274
+ self.calculatingRowHeight();
275
+ })
276
+ }
277
+ }
278
+ var MouseMoveHandle = function () {
279
+ var ev1 = event || e;
280
+ if (self.currentTh.isDown) {
281
+ if (self.currentTh) {
282
+ if (typeof col.width === 'undefined') {
283
+ self.colHasWidth[colIndex] = '';
284
+ self.$forceUpdate();
285
+ self.$nextTick(() => {
286
+ var index = self.model.selectIndex;
287
+ for (var j = 0; j < self.$refs['rows.' + index][0].children.length; j++) {
288
+ self.$refs['rows.' + index][0].children[j].classList.add('select');
289
+ }
290
+ });
291
+ }
292
+
293
+ //col.width = (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX));
294
+ self.$set(col, "width", (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX)));
295
+ if (typeof self.$refs.headTr !== 'undefined' && self.$refs.headTr.length > 0) {
296
+ self.currentTh.style.minWidth = col.width + 'px';
297
+ self.currentTh.style.width = col.width + 'px';
298
+ self.getScrollAttr();
299
+ }
300
+ }
301
+ }
302
+ }
303
+ document.addEventListener("mouseup", MouseUpHandle, false);
304
+ document.addEventListener("mousemove", MouseMoveHandle, false);
305
+ }
306
+ },
307
+ getPage(index) {
308
+ var self = this;
309
+ if (typeof self.$refs.tableParent !== 'undefined') {
310
+ self.$refs.tableParent.scrollTop = 0;
311
+ self.$refs.tableParent.scrollLeft = 0;
312
+ self.scrollTop = 0;
313
+ self.scrollLeft = 0;
314
+ }
315
+ var next = function (rtn) {
316
+ if (rtn) {
317
+ self.$forceUpdate();
318
+ self.$nextTick(() => {
319
+ if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
320
+ self.tableLoading = true;
321
+ self.model.nextPage(next);
322
+ }
323
+ else {
324
+ self.tableLoading = false;
325
+ self.rowColorChange();
326
+ self.resetScroll();
327
+ self.calculatingRowHeight();
328
+ self.getScrollAttr();
329
+ }
330
+ self.setfixedSize();
331
+ });
332
+ }
333
+ else {
334
+ self.tableLoading = false;
335
+ self.rowColorChange();
336
+ }
337
+ self.$emit('searchComplate');
338
+ }
339
+ self.tableLoading = true;
340
+ this.model.getPage(index, next);
341
+ },
342
+ toSort(ev, col, action) {
343
+ var self = this;
344
+ this.model.toSort(col, action, () => {
345
+ self.$forceUpdate();
346
+ self.getScrollAttr();
347
+ });
348
+ ev.cancelBubble = true;
349
+ ev.stopPropagation();
350
+ },
351
+ clearSort(ev, col) {
352
+ var self = this;
353
+ this.model.clearSort(col, () => {
354
+ self.$forceUpdate();
355
+ self.getScrollAttr();
356
+ });
357
+ ev.cancelBubble = true;
358
+ ev.stopPropagation();
359
+ },
360
+ fiexdHead() {
361
+ this.$nextTick(() => {
362
+ var self = this;
363
+ var tableCont = this.$refs.tableParent;
364
+ function scrollHandle(e) {
365
+ self.getScrollAttr();
366
+ }
367
+ tableCont.addEventListener('scroll', self.getScrollAttr);
368
+ });
369
+ },
370
+ removeScrollEvent() {
371
+ var tableCont = this.$refs.tableParent;
372
+ //移除事件监听器
373
+ tableCont.removeEventListener("scroll", this.getScrollAttr, false);
374
+ //tableCont.removeEventListener("scroll", this.scrollHandle, false);
375
+ },
376
+ addScrollEvent() {
377
+ var tableCont = this.$refs.tableParent;
378
+ //添加事件监听器
379
+ tableCont.addEventListener("scroll", this.getScrollAttr, false);
380
+ },
381
+ freezeData() {
382
+ Object.freeze(this.model.listData);
383
+ },
384
+ setfixedSize() {
385
+ if (typeof this.$refs.headTr !== 'undefined' && this.$refs.headTr.length > 0) {
386
+ let fixedSize = 0;
387
+ let j = 0;
388
+ let fixationThArr = this.$refs.headTr[0].getElementsByClassName('left-fixation-th');
389
+ if (fixationThArr.length > 0) {
390
+ if (this.model.isMulti) {
391
+ fixedSize = fixationThArr[j++].offsetWidth
392
+ }
393
+ for (let i = 0; i < this.model.columns.length; i++) {
394
+ if (this.model.columns[i].fixed === 'left' && this.model.columns[i].show) {
395
+ this.model.columns[i].fixedSize = fixedSize;
396
+ fixedSize = fixedSize + fixationThArr[j++].offsetWidth;
397
+ }
398
+ }
399
+
400
+ fixedSize = 0;
401
+ fixationThArr = this.$refs.headTr[0].getElementsByClassName('right-fixation-th');
402
+ j = fixationThArr.length - 1;
403
+ for (let i = this.model.columns.length - 1; i > 0; i--) {
404
+ if (this.model.columns[i].fixed === 'right' && this.model.columns[i].show) {
405
+ this.model.columns[i].fixedSize = fixedSize;
406
+ fixedSize = fixedSize + fixationThArr[j--].offsetWidth;
407
+ }
408
+ }
409
+ }
410
+ }
411
+ },
412
+ getScrollAttr(e) {
413
+ if (typeof this.$refs.tableParent !== 'undefined' && typeof this.$refs.headThs !== 'undefined') {
414
+
415
+ this.calculatingRowHeight();
416
+
417
+ var scrollTop = this.$refs.tableParent.scrollTop;
418
+ var scrollLeft = this.$refs.tableParent.scrollLeft;
419
+ var scrollRight = this.$refs.tableParent.scrollWidth - scrollLeft - this.$refs.tableParent.clientWidth;
420
+
421
+ //计算可视范围的第一条数据
422
+ let index = 0;
423
+ let topHeigth = 0;
424
+ for (; index < this.model.listData.length; index++) {
425
+ if (topHeigth >= scrollTop) {
426
+ break;
427
+ }
428
+ else {
429
+ topHeigth = topHeigth + this.model.listData[index].$heigth;
430
+ }
431
+ }
432
+ this.firstRow = index - 1;
433
+ this.setTrLazyLoading();
434
+ //若每行高度是固定的,可直接使用下面方法即可
435
+ //this.firstRow = parseInt(scrollTop / 33);
436
+
437
+ this.scrollTop = scrollTop;
438
+ this.scrollLeft = scrollLeft;
439
+ this.scrollRight = scrollRight;
440
+ }
441
+ },
442
+ setTrLazyLoading() {
443
+ this.pageRowMax = this.firstRow + this.displayRowNumber;
444
+ this.pageRowMin = this.firstRow - this.displayRowNumber;
445
+ if (this.pageRowMin > 0 && this.model.listData[this.pageRowMin].$rowspan === 0) {
446
+ for (let i = this.pageRowMin; i >= 0; i--) {
447
+ if (this.model.listData[i].$rowspan > 0) {
448
+ this.pageRowMin = i;
449
+ break;
450
+ }
451
+ }
452
+ }
453
+
454
+ //debugger
455
+ //let index = this.model.listData.length - 1;
456
+ //let isSet = false;
457
+ //for (; index >= 0; index--) {
458
+ // if (Math.abs(index - this.firstRow) < this.displayRowNumber || typeof (this.model.listData[index].$heigth) === 'undefined') {
459
+ // //this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
460
+ // }
461
+ // else {
462
+ // if (index < this.firstRow && !isSet) {
463
+ // if (this.model.listData[index].$rowspan === 0) {
464
+ // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
465
+ // continue;
466
+ // }
467
+ // else {
468
+ // isSet = true;
469
+ // this.$set(this.model.listData[index], "$trLazyLoadingShow", true);
470
+ // continue;
471
+ // }
472
+ // }
473
+ // this.$set(this.model.listData[index], "$trLazyLoadingShow", false);
474
+ // }
475
+ //}
476
+ },
477
+ setTableHeight() {
478
+ var self = this;
479
+ this.$nextTick(() => {
480
+ if (this.$refs.searchTable && this.$refs.toolbar && this.$refs.searchTable.parentElement) {
481
+ var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
482
+ var h2 = this.$refs.searchTable.offsetTop | 0;
483
+ var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
484
+ var h4 = this.$refs.footer.$el.offsetHeight | 0;
485
+ var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
486
+ var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
487
+ let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - 22;
488
+ this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
489
+ this.$nextTick(() => {
490
+ self.getScrollAttr();
491
+ });
492
+ }
493
+ });
494
+ },
495
+ scrollHandle(ev) {
496
+ var self = this;
497
+ if ((this.$refs.tableParent.scrollTop + this.$refs.tableParent.clientHeight) >= (this.$refs.tableParent.scrollHeight - 5)) {
498
+ if (!this.isBusy) {
499
+ self.isBusy = true;
500
+ self.tableLoading = true;
501
+ self.model.nextPage((rtn) => {
502
+ if (rtn) {
503
+ self.$nextTick(() => {
504
+ self.calculatingRowHeight();
505
+ self.getScrollAttr();
506
+
507
+ });
508
+ self.$forceUpdate();
509
+ }
510
+ self.isBusy = false;
511
+ self.tableLoading = false;
512
+ });
513
+ }
514
+ }
515
+ ev.cancelBubble = true;
516
+ ev.stopPropagation();
517
+ },
518
+ rowClickHandle(ev, index) {
519
+ this.model.selectIndex = index;
520
+ this.rowColorChange();
521
+ ev.cancelBubble = true;
522
+ ev.stopPropagation();
523
+ },
524
+ rowColorChange() {
525
+ var index = this.model.selectIndex;
526
+ if (typeof this.$refs['rows.' + index] !== "undefined" && this.currentRow !== this.$refs['rows.' + index][0]) {
527
+ if (this.currentRow !== null) {
528
+ for (var i = 0; i < this.currentRow.children.length; i++) {
529
+ this.currentRow.children[i].classList.remove('select');
530
+ }
531
+ }
532
+ if(this.$refs['rows.' + index][0])
533
+ {
534
+ for (var j = 0; j < this.$refs['rows.' + index][0].children.length; j++) {
535
+ this.$refs['rows.' + index][0].children[j].classList.add('select');
536
+ }
537
+ }
538
+ this.currentRow = this.$refs['rows.' + index][0]||null;
539
+ }
540
+ },
541
+ resetScroll: function () {
542
+ var self = this;
543
+ if (self.$refs.tableParent.scrollTop > self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableHead.offsetHeight) {
544
+ self.$refs.tableParent.scrollTop = self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableHead.offsetHeight;
545
+ }
546
+ if (self.$refs.tableParent.scrollTop + self.$refs.tableParent.clientHeight <= self.$refs['rows.' + self.model.selectIndex][0].offsetTop + self.$refs['rows.' + self.model.selectIndex][0].offsetHeight) {
547
+ self.$refs.tableParent.scrollTop = self.$refs['rows.' + self.model.selectIndex][0].offsetTop - self.$refs.tableParent.clientHeight + self.$refs['rows.' + self.model.selectIndex][0].offsetHeight;
548
+ }
549
+ self.scrollTop = self.$refs.tableParent.scrollTop;
550
+ },
551
+ rowKeyDownHandle(ev, action) {
552
+ var self = this;
553
+ if (action === 1) {
554
+ this.model.downKey();
555
+ }
556
+ else {
557
+ this.model.upKey();
558
+ }
559
+ this.rowColorChange();
560
+ this.resetScroll();
561
+ if (!this.isBusy) {
562
+ if (this.model.selectIndex === this.model.listData.length - 1) {
563
+ self.isBusy = true;
564
+ self.tableLoading = true;
565
+ self.model.nextPage((rtn) => {
566
+ if (rtn) {
567
+ self.$nextTick(() => {
568
+ self.calculatingRowHeight();
569
+ self.getScrollAttr();
570
+ });
571
+ self.$forceUpdate();
572
+ }
573
+ self.isBusy = false;
574
+ self.tableLoading = false;
575
+ });
576
+ }
577
+ }
578
+ ev.cancelBubble = true;
579
+ ev.stopPropagation();
580
+ ev.preventDefault();
581
+ },
582
+ searchComplate(m, defaultSearch) {
583
+ var self = this;
584
+ this.$nextTick(function () {
585
+ if (typeof this.api !== 'undefined') {
586
+ self.loaderObj.SearchTable(self.api, self.load, m, defaultSearch);
587
+ }
588
+ if (typeof this.source !== 'undefined') {
589
+ self.load(self.loaderObj.SearchTable(self.source));
590
+ }
591
+ if (typeof self.vmodel !== 'undefined') {
592
+ self.load(self.vmodel);
593
+ }
594
+ });
595
+ },
596
+ toolbarClickHandler(field) {
597
+ let self = this;
598
+ let submitData = {};
599
+ let action = field.action;
600
+
601
+ var tempListData = self.model.getSelectRowData(field);
602
+ if (tempListData != null) {
603
+ field.submitListField.forEach((k) => {
604
+ if (field.isMulti) {
605
+ submitData[k] = [];
606
+ for (var ri = 0; ri < tempListData.length; ri++) {
607
+ submitData[k].push(tempListData[ri][k]);
608
+ }
609
+ }
610
+ else {
611
+ submitData[k] = tempListData[0][k];
612
+ }
613
+ });
614
+
615
+ if (field.isSingle && tempListData.length > 0 && field.actionField) {
616
+ action = tempListData[0][field.actionField];
617
+ }
618
+ }
619
+
620
+ if (field.flagAttachSearchCondition) {
621
+ submitData['searchFields'] = self.model.searchModel.searchData;
622
+ }
623
+
624
+ //如果是导出按钮,则直接交给父组件处理
625
+ if (field.isExport) {
626
+ self.$emit('toolbarClick', field, submitData);
627
+ return;
628
+ }
629
+
630
+ this.routerClickHandler(field, submitData, action);
631
+ },
632
+ rolRouterClickHandler(field, rowData) {
633
+ var self = this;
634
+ var submitData = {};
635
+ field.submitListField.forEach((k) => {
636
+ submitData[k] = rowData[k];
637
+ });
638
+
639
+ let action = field.action;
640
+ if (field.actionField) {
641
+ action = rowData[field.actionField];
642
+ }
643
+
644
+ this.routerClickHandler(field, submitData, action);
645
+ },
646
+ routerClickHandler(field, submitData, action) {
647
+ let self = this;
648
+ action = action || field.action;
649
+
650
+ var clickAcion = function () {
651
+ //若不是客户端方法,则直接访问接口
652
+ if (!field.isClientFuntion) {
653
+ // 外部框架tab页打开
654
+ if (field.isFormPageInTab || field.isSearchPageInTab) {
655
+ submitData = field.getActionPara(submitData).para;
656
+ if (field.pageStyle) {
657
+ submitData.pageStyle = field.pageStyle;
658
+ }
659
+ self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model);
660
+ }
661
+ else if (field.isBrowserNewTab) {// 浏览器打开
662
+ submitData = field.getActionPara(submitData).para;
663
+ let query = self.$common.objectToQueryStr(submitData);
664
+ window.open(action + query, "_blank");
665
+ }
666
+ else {
667
+ //self.operationLoading = true;
668
+
669
+ //Form
670
+ if (field.isOpenForm) {
671
+ var dialogOption = {
672
+ title: field.pageTitle,
673
+ pane: self.$common.getParentPane(self),
674
+ content: [{
675
+ component: field.navToNewPageName,
676
+ attrs: {
677
+ //source: data.content,
678
+ api: action,
679
+ apiParam: field.getActionPara(submitData).para,
680
+ showTitle: false,
681
+ width: field.dialogWidth + 'px',
682
+ height: field.dialogHeight + 'px'
683
+ },
684
+ on: {
685
+ submit(ev) {
686
+ if (!field.flagFreshCurrentRow) {
687
+ self.model.doAction(ev);
688
+ }
689
+ self.$forceUpdate();
690
+ self.$refs.footer.$forceUpdate();
691
+ self.$common.closeDialog(dialogOption.dialog);
692
+ self.updateCurrentRow(field);
693
+ },
694
+ refreshParent() {
695
+ self.getPage(1);
696
+ self.$common.closeDialog(dialogOption.dialog);
697
+ },
698
+ closeDialog() {
699
+ self.updateCurrentRow(field);
700
+ }
701
+ }
702
+ }]
703
+ };
704
+ self.$common.openDialog(dialogOption);
705
+ }
706
+ //SearchList
707
+ else if (field.isOpenList) {
708
+ var dialogOption = {
709
+ title: field.pageTitle,
710
+ pane: self.$common.getParentPane(self),
711
+ content: [{
712
+ component: field.navToNewPageName,
713
+ attrs: {
714
+ searchConditionApi: field.actionForSearchLayout,
715
+ searchDataApi: field.actionForSearch,
716
+ apiParam: submitData,
717
+ width: field.dialogWidth + 'px',
718
+ height: field.dialogHeight + 'px'
719
+ },
720
+ on: {
721
+ refreshParent() {
722
+ self.getPage(1);
723
+ self.$common.closeDialog(dialogOption.dialog);
724
+ },
725
+ closeDialog() {
726
+ self.updateCurrentRow(field);
727
+ }
728
+ }
729
+ }]
730
+ };
731
+ self.$common.openDialog(dialogOption);
732
+ }
733
+ //Tabs
734
+ else if (field.isOpenTabs) {
735
+ var dialogOption = {
736
+ title: field.pageTitle,
737
+ pane: self.$common.getParentPane(self),
738
+ content: [{
739
+ component: field.navToNewPageName,
740
+ attrs: {
741
+ searchConditionApi: field.actionForSearchLayout,
742
+ searchDataApi: field.actionForSearch,
743
+ apiParam: submitData,
744
+ width: field.dialogWidth + 'px',
745
+ height: field.dialogHeight + 'px'
746
+ },
747
+ on: {
748
+ }
749
+ }]
750
+ };
751
+ self.$common.openDialog(dialogOption);
752
+ }
753
+ else {
754
+ self.operationLoading = true;
755
+ field.doAction(submitData, (data) => {
756
+ self.operationLoading = false;
757
+ self.model.doAction({ responseData: data });
758
+ self.$forceUpdate();
759
+ self.$refs.footer.$forceUpdate();
760
+ })
761
+ }
762
+ }
763
+ }
764
+ //执行客户端脚本
765
+ else {
766
+ // let parm={submitData:submitData,field:field}
767
+ // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
768
+ let title=field.pageTitle==undefined ?field.label:field.pageTitle;
769
+ submitData.actionType=field.actionType;
770
+ var fun =self.$common.getDataDrivenOpts().handler[action];
771
+ fun(submitData,title,self.model);
772
+ // var fun = self.model.scripts.formData[action];
773
+ // fun(submitData,field);
774
+ }
775
+ }
776
+
777
+ if (field.alert) {
778
+ self.$common.confirm(field.alertMsg, field.alertCaption, {
779
+ confirmButtonText: field.alertOKButtonText,
780
+ cancelButtonText: field.alertCancelButtonText,
781
+ //type: 'warning'
782
+ center: field.alertCenter
783
+ }).then(() => {
784
+ clickAcion();
785
+ }).catch(() => {
786
+ });
787
+ }
788
+ else {
789
+ clickAcion();
790
+ }
791
+ },
792
+ selectAll($ev) {
793
+ this.model.listData.forEach((ro) => {
794
+ if (!this.model.rightMulti || ro[this.model.rightMulti] == 1) {
795
+ ro.$select = $ev.srcElement.checked;
796
+ }
797
+ });
798
+ this.model.setButtonsDisabled();
799
+ this.$forceUpdate();
800
+ },
801
+ selectOne($ev) {
802
+ this.model.setButtonsDisabled();
803
+ },
804
+ calculatingRowHeight() {
805
+ let self = this;
806
+ let count = 0;
807
+
808
+ //查询出所有没有设置$heigth的数据并重新设置$heigth
809
+ let notHeigthData = self.model.listData.filter(item => {
810
+ return item.$heigth === undefined || item.$heigth <= 0
811
+ })
812
+ if (notHeigthData && notHeigthData.length > 0) {
813
+ notHeigthData.forEach((v, i) => {
814
+ if (self.$refs["rows." + i] && self.$refs["rows." + i].length > 0) {
815
+ self.$set(v, "$heigth", self.$refs["rows." + i][0].clientHeight);
816
+ }
817
+ });
818
+ }
819
+
820
+ //for (let i = 0; i < self.model.listData.length; i++) {
821
+ // if (self.$refs[]) {
822
+ // }
823
+ //}
824
+ //self.$refs
825
+ },
826
+ updateCurrentRow(router) {
827
+ let self = this;
828
+ if (router.flagFreshCurrentRow) {
829
+ self.tableComplate = true;
830
+ self.model.getCurrentRowApiData(function () {
831
+ self.$forceUpdate();
832
+ self.tableComplate = false;
833
+ });
834
+ }
835
+ },
836
+ importComplete(res) {
837
+ this.model.doAction(res);
838
+ },
839
+ tdRowspan(column, row) {
840
+ if (!column.show) {
841
+ return '';
842
+ }
843
+
844
+ //合并行
845
+ if (row.$rowspan !== 0 && this.model.rowMergedColumns.indexOf(column.id) > -1) {
846
+ return row.$rowspan;
847
+ }
848
+
849
+ return '';
850
+ },
851
+ tdShow(column, row) {
852
+ if (!column.show) {
853
+ return false;
854
+ }
855
+
856
+ //合并行
857
+ if (row.$rowspan === 0 && this.model.rowMergedColumns.indexOf(column.id) > -1) {
858
+ return false;
859
+ }
860
+
861
+ return true;
862
+ },
863
+ closeTabThen(ev) {
864
+ let self = this;
865
+ if (self.model.checkCloseTabThen(ev.notification)) {
866
+ self.model.doAction(ev);
867
+ self.$forceUpdate();
868
+ self.$refs.footer.$forceUpdate();
869
+ }
870
+ }
871
+ },
872
+ }</script>
873
+ <style>
874
+ .ct-tableParent {
875
+ overflow: auto;
876
+ border-bottom: 1px solid #ebeef5;
877
+ width: 100%;
878
+ outline: 0;
879
+ }
880
+
881
+ .ct-searchtable .ct-table {
882
+ min-width: 100%;
883
+ border-collapse: collapse;
884
+ }
885
+
886
+ .ct-searchtable .ct-table th {
887
+ background-color: #f4f7fa !important;
888
+ border-top: 1px solid #ebeef5;
889
+ }
890
+
891
+ .ct-searchtable .ct-tr > .ct-td {
892
+ /*border: 1px solid #e7e8eb;
893
+ border-bottom: 1px solid #e7e8eb;
894
+ border-right: 1px solid #e7e8eb;
895
+ border-left: 1px solid #e7e8eb;*/
896
+ padding: 2px 20px;
897
+ cursor: default;
898
+ background-color: #ffffff;
899
+ }
900
+ .ct-searchtable .ct-tr > .ct-td1 {
901
+ border-right: 1px solid #e7e8eb;
902
+ border-left: 1px solid #e7e8eb;
903
+ }
904
+ .ct-searchtable .ct-tr:last-child > .ct-td1 {
905
+ border-bottom: 1px solid #e7e8eb;
906
+ }
907
+ .ct-searchtable .ct-tr > .ct-td2 {
908
+ border-bottom: 1px solid #e7e8eb;
909
+ }
910
+ .ct-searchtable .ct-tr > .ct-td3 {
911
+ border: 1px solid #e7e8eb;
912
+ }
913
+
914
+ .shadowLeft {
915
+ border-right: 1px solid #e7e8eb;
916
+ box-shadow: 2px 0 3px -1px rgba(0,0,0,0.1);
917
+ }
918
+
919
+ .shadowRight {
920
+ box-shadow: -2px 0 3px -1px rgba(0,0,0,0.1);
921
+ }
922
+
923
+ .ct-searchtable body:last-child > .ct-td {
924
+ border-bottom: 0px;
925
+ }
926
+
927
+ .ct-searchtable .ct-tr > .ct-td.nowidth {
928
+ white-space: nowrap;
929
+ }
930
+ /*.ct-searchtable tbody .ct-tr:hover .ct-td {
931
+ background-color: #ebeef5 !important;
932
+ }*/
933
+
934
+ .ct-table {
935
+ color: #606266;
936
+ font-size: 18px;
937
+ line-height: 40px;
938
+ min-height: 40px;
939
+ }
940
+
941
+ .ct-table-mini {
942
+ font-size: 12px;
943
+ line-height: 26px;
944
+ min-height: 28px;
945
+ }
946
+
947
+ .ct-table-small {
948
+ font-size: 14px;
949
+ line-height: 32px;
950
+ min-height: 32px;
951
+ }
952
+
953
+ .ct-table-medium {
954
+ font-size: 16px;
955
+ line-height: 36px;
956
+ min-height: 36px;
957
+ }
958
+
959
+ .ct-table .ct-td > .caret-wrapper {
960
+ display: inline-flex;
961
+ flex-direction: column;
962
+ align-items: center;
963
+ height: 34px;
964
+ width: 10px;
965
+ vertical-align: middle;
966
+ cursor: pointer;
967
+ overflow: initial;
968
+ position: relative;
969
+ }
970
+
971
+ .ct-table .ct-td > .caret-wrapper > .sort-caret {
972
+ width: 0;
973
+ height: 0;
974
+ border: 5px solid transparent;
975
+ position: absolute;
976
+ left: 7px;
977
+ }
978
+
979
+ .ct-table .ct-td > .caret-wrapper > .sort-caret.ascending {
980
+ border-bottom-color: #c0c4cc;
981
+ top: 5px;
982
+ }
983
+
984
+ .ct-table .ct-td > .caret-wrapper > .sort-caret.descending {
985
+ border-top-color: #c0c4cc;
986
+ bottom: 7px;
987
+ }
988
+
989
+ .ct-table .ct-td.select {
990
+ background-color: #ecf5ff !important;
991
+ }
992
+
993
+ .ct-table .ct-tr:hover .ct-td.select {
994
+ background-color: #ecf5ff !important;
995
+ }
996
+
997
+ .ct-table .ct-td.asc > .caret-wrapper > .sort-caret.ascending {
998
+ border-bottom-color: #409eff;
999
+ top: 5px;
1000
+ }
1001
+
1002
+ .ct-table .ct-td.desc > .caret-wrapper > .sort-caret.descending {
1003
+ border-top-color: #409eff;
1004
+ bottom: 7px;
1005
+ }
1006
+
1007
+
1008
+ .ct-table .cell {
1009
+ /*white-space: nowrap;*/
1010
+ text-overflow: ellipsis;
1011
+ /*min-width: 50px; todo 实际宽度-21即可*/
1012
+ overflow: hidden;
1013
+ /*padding-right: 10px;*/
1014
+ }
1015
+
1016
+ /*强制换行 todo 可去掉改成强制不换行*/
1017
+ .ct-table .cell {
1018
+ /* 这两个在技术上是一样的, 为了兼容了浏览器两个都加上 */
1019
+ overflow-wrap: break-word;
1020
+ word-wrap: break-word;
1021
+ -ms-word-break: break-all;
1022
+ /* 这个的使用在web-kit中有些危险,他可能会阶段所有东西 */
1023
+ word-break: break-all;
1024
+ /* Instead use this non-standard one: */
1025
+ word-break: break-word;
1026
+ /* 如果浏览器支持的话增加一个连接符(Blink不支持) */
1027
+ -ms-hyphens: auto;
1028
+ -moz-hyphens: auto;
1029
+ -webkit-hyphens: auto;
1030
+ hyphens: auto;
1031
+ }
1032
+
1033
+ .ct-table .lineFeedCell {
1034
+ min-width: 40px;
1035
+ /*padding-right: 10px;*/
1036
+ }
1037
+
1038
+ /*.ct-table .cell.ct-tooltip:hover {
1039
+ text-overflow: inherit;
1040
+ overflow: visible;
1041
+ }*/
1042
+
1043
+ .ct-table .left-fixation {
1044
+ position: sticky;
1045
+ }
1046
+
1047
+ .ct-table .right-fixation {
1048
+ position: sticky;
1049
+ }
1050
+
1051
+ .ct-table .left-fixation-th {
1052
+ position: sticky;
1053
+ top: 0px;
1054
+ z-index: 99;
1055
+ }
1056
+
1057
+ .ct-table .right-fixation-th {
1058
+ position: sticky;
1059
+ top: 0px;
1060
+ z-index: 99;
1061
+ }
1062
+
1063
+ .ct-table .right-no-fixation-th {
1064
+ position: sticky;
1065
+ top: 0px;
1066
+ z-index: 50;
1067
+ }
1068
+
1069
+ .ct-table .ct-searchtable-th {
1070
+ /*text-align: center*/
1071
+ }
1072
+
1073
+ .ct-table .checkbox-td {
1074
+ min-width: 20px;
1075
+ width: 20px;
1076
+ left: 0px;
1077
+ }
1078
+
1079
+ .ct-table .checkbox-td .checkbox-td-1 {
1080
+ vertical-align: inherit;
1081
+ }
1082
+ </style>