ocpview-plus 0.0.1

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 (195) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/dist/efviewplus.min.esm.js +99954 -0
  4. package/dist/efviewplus.min.js +142 -0
  5. package/dist/locale/lang.js +1 -0
  6. package/dist/locale/zh-CN.js +1 -0
  7. package/dist/locale/zh-TW.js +1 -0
  8. package/dist/locale/zh-UG.js +1 -0
  9. package/dist/style.css +9 -0
  10. package/dist/styles/efviewplus.css +1 -0
  11. package/package.json +144 -0
  12. package/src/components/base/controlbase.vue +191 -0
  13. package/src/components/base/controlbox.vue +102 -0
  14. package/src/components/base/index.js +3 -0
  15. package/src/components/base/load.js +20 -0
  16. package/src/components/base/probase.js +220 -0
  17. package/src/components/base/size.js +78 -0
  18. package/src/components/billbox/billbox.vue +68 -0
  19. package/src/components/billbox/index.js +2 -0
  20. package/src/components/cascaderbox/cascaderbox.vue +184 -0
  21. package/src/components/cascaderbox/index.js +2 -0
  22. package/src/components/checkbox/checkbox.vue +76 -0
  23. package/src/components/checkbox/checkgroupbox.vue +104 -0
  24. package/src/components/checkbox/index.js +3 -0
  25. package/src/components/colorbox/colorbox.vue +44 -0
  26. package/src/components/colorbox/index.js +2 -0
  27. package/src/components/combobox/combobox.vue +220 -0
  28. package/src/components/combobox/index.js +2 -0
  29. package/src/components/conditionbox/conditionbase.vue +195 -0
  30. package/src/components/conditionbox/conditionbox.vue +63 -0
  31. package/src/components/conditionbox/conditionfilterbox.vue +477 -0
  32. package/src/components/conditionbox/conditionselectorbox.vue +237 -0
  33. package/src/components/conditionbox/index.js +5 -0
  34. package/src/components/conditionbox/queryconditionbox.vue +26 -0
  35. package/src/components/conditionbox/queryconditionboxbase.vue +124 -0
  36. package/src/components/conditionbox/searchconditionbox.vue +114 -0
  37. package/src/components/conditionbox/searchgrid.vue +391 -0
  38. package/src/components/datebox/datebox.vue +129 -0
  39. package/src/components/datebox/daterangebox.vue +155 -0
  40. package/src/components/datebox/index.js +3 -0
  41. package/src/components/form/baseform.vue +677 -0
  42. package/src/components/form/detailsbox.vue +487 -0
  43. package/src/components/form/formbox.vue +29 -0
  44. package/src/components/form/formcardbox.vue +268 -0
  45. package/src/components/form/formcardgroupbox.vue +252 -0
  46. package/src/components/form/formcompro.js +19 -0
  47. package/src/components/form/formdetail.vue +129 -0
  48. package/src/components/form/formdetailtwo.vue +302 -0
  49. package/src/components/form/index.js +8 -0
  50. package/src/components/form/toolanchor.js +46 -0
  51. package/src/components/form/workform.vue +168 -0
  52. package/src/components/grid/basegrid.vue +1061 -0
  53. package/src/components/grid/editgrid.vue +51 -0
  54. package/src/components/grid/editgridbase.vue +947 -0
  55. package/src/components/grid/editgridcard.vue +193 -0
  56. package/src/components/grid/expandrow.vue +137 -0
  57. package/src/components/grid/index.js +6 -0
  58. package/src/components/grid/viewgrid.vue +122 -0
  59. package/src/components/grid/viewgridbase.vue +1284 -0
  60. package/src/components/icon/common-icon.vue +53 -0
  61. package/src/components/icon/eicon.vue +29 -0
  62. package/src/components/icon/icons.vue +42 -0
  63. package/src/components/icon/index.js +2 -0
  64. package/src/components/label/index.js +3 -0
  65. package/src/components/label/showtext.vue +95 -0
  66. package/src/components/load/loadcartoon.vue +228 -0
  67. package/src/components/map/index.js +2 -0
  68. package/src/components/map/mapbox.vue +348 -0
  69. package/src/components/masterplate/appendix.vue +586 -0
  70. package/src/components/masterplate/approval.vue +803 -0
  71. package/src/components/masterplate/base.vue +985 -0
  72. package/src/components/masterplate/billasyncimport.vue +614 -0
  73. package/src/components/masterplate/billconditionbox.vue +224 -0
  74. package/src/components/masterplate/billconditionsbox.vue +427 -0
  75. package/src/components/masterplate/billdetailform.vue +990 -0
  76. package/src/components/masterplate/billimport.vue +263 -0
  77. package/src/components/masterplate/billquerygrid.vue +316 -0
  78. package/src/components/masterplate/billsinglegrid.vue +234 -0
  79. package/src/components/masterplate/birtreport.vue +185 -0
  80. package/src/components/masterplate/detailbtntoolbar.vue +311 -0
  81. package/src/components/masterplate/detailsbox.vue +386 -0
  82. package/src/components/masterplate/editgridcard.vue +222 -0
  83. package/src/components/masterplate/editgridcard2.vue +109 -0
  84. package/src/components/masterplate/formcard.vue +106 -0
  85. package/src/components/masterplate/formcardgroupbox.vue +168 -0
  86. package/src/components/masterplate/formdetailtwo.vue +356 -0
  87. package/src/components/masterplate/gridcolset.vue +227 -0
  88. package/src/components/masterplate/index.js +23 -0
  89. package/src/components/masterplate/layouttemplate.vue +33 -0
  90. package/src/components/masterplate/leftlistrightdetails.vue +474 -0
  91. package/src/components/masterplate/leftlistrightlist.vue +465 -0
  92. package/src/components/masterplate/lefttreerightdetails.vue +619 -0
  93. package/src/components/masterplate/levelreport.vue +510 -0
  94. package/src/components/masterplate/listbtntoolbar.vue +257 -0
  95. package/src/components/masterplate/listdetails.vue +769 -0
  96. package/src/components/masterplate/operlog.vue +272 -0
  97. package/src/components/masterplate/options.vue +110 -0
  98. package/src/components/masterplate/page.vue +102 -0
  99. package/src/components/masterplate/promptmessage.vue +74 -0
  100. package/src/components/masterplate/querybar.vue +490 -0
  101. package/src/components/masterplate/report.vue +357 -0
  102. package/src/components/masterplate/rowbtntoolbar.vue +126 -0
  103. package/src/components/masterplate/simpletree.vue +129 -0
  104. package/src/components/masterplate/simpleviewgrid.vue +144 -0
  105. package/src/components/mychart/bar/bar.vue +202 -0
  106. package/src/components/mychart/basechart.vue +190 -0
  107. package/src/components/mychart/complexmychart/barline.vue +154 -0
  108. package/src/components/mychart/gauge/gauge.vue +83 -0
  109. package/src/components/mychart/index.js +9 -0
  110. package/src/components/mychart/line/line.vue +202 -0
  111. package/src/components/mychart/liquidfill/liquidfill.vue +109 -0
  112. package/src/components/mychart/pie/pie.vue +96 -0
  113. package/src/components/mychart/radar/radar.vue +122 -0
  114. package/src/components/mychart/scatter/scatter.vue +76 -0
  115. package/src/components/numberbox/append.js +11 -0
  116. package/src/components/numberbox/index.js +3 -0
  117. package/src/components/numberbox/numberbox.vue +303 -0
  118. package/src/components/numberbox/numberrangebox.vue +423 -0
  119. package/src/components/picturebox/filebox.vue +365 -0
  120. package/src/components/picturebox/index.js +3 -0
  121. package/src/components/picturebox/picturebox.vue +541 -0
  122. package/src/components/picturebox/uploadbox.vue +164 -0
  123. package/src/components/poptagbox/index.js +2 -0
  124. package/src/components/poptagbox/poptagbox.vue +389 -0
  125. package/src/components/poptextbox/index.js +2 -0
  126. package/src/components/poptextbox/poptextbox.vue +601 -0
  127. package/src/components/radiobox/index.js +2 -0
  128. package/src/components/radiobox/radiogroupbox.vue +76 -0
  129. package/src/components/richtextbox/editor.vue +150 -0
  130. package/src/components/richtextbox/index.js +2 -0
  131. package/src/components/richtextbox/richtextbox.vue +448 -0
  132. package/src/components/textbox/index.js +2 -0
  133. package/src/components/textbox/textbox.vue +98 -0
  134. package/src/components/timebox/index.js +2 -0
  135. package/src/components/timebox/timebox.vue +76 -0
  136. package/src/components/toolbar/ebutton.vue +169 -0
  137. package/src/components/toolbar/index.js +3 -0
  138. package/src/components/toolbar/toolbar.vue +446 -0
  139. package/src/components/tree/basetree.vue +725 -0
  140. package/src/components/tree/index.js +3 -0
  141. package/src/components/tree/treedata.vue +51 -0
  142. package/src/components/tree/treedatabase.vue +189 -0
  143. package/src/components/upload/billimport.vue +233 -0
  144. package/src/components/upload/index.js +2 -0
  145. package/src/components/videobox/index.js +2 -0
  146. package/src/components/videobox/uploadbox.vue +148 -0
  147. package/src/components/videobox/videobox.vue +503 -0
  148. package/src/components/wrichtextbox/editor.vue +219 -0
  149. package/src/components/wrichtextbox/index.js +2 -0
  150. package/src/components/wrichtextbox/wrichtextbox.vue +63 -0
  151. package/src/index.js +215 -0
  152. package/src/locale/format.js +51 -0
  153. package/src/locale/index.js +63 -0
  154. package/src/locale/lang/zh-CN.js +123 -0
  155. package/src/locale/lang/zh-TW.js +114 -0
  156. package/src/locale/lang/zh-UG.js +115 -0
  157. package/src/locale/lang.js +15 -0
  158. package/src/method/case/case.js +1180 -0
  159. package/src/method/config/queryconfig.js +24 -0
  160. package/src/method/const/const.js +815 -0
  161. package/src/method/index.js +8 -0
  162. package/src/static/excel/exportexcel.js +627 -0
  163. package/src/static/iview/coustom.js +463 -0
  164. package/src/store/index.js +19 -0
  165. package/src/store/modules/app.js +53 -0
  166. package/src/styles/README.md +3 -0
  167. package/src/styles/common.less +75 -0
  168. package/src/styles/components/anchor.less +74 -0
  169. package/src/styles/components/approval.less +136 -0
  170. package/src/styles/components/button.less +208 -0
  171. package/src/styles/components/card.less +51 -0
  172. package/src/styles/components/content.less +38 -0
  173. package/src/styles/components/font.less +314 -0
  174. package/src/styles/components/form.less +72 -0
  175. package/src/styles/components/iconfont/fonts/iconfont.less +1376 -0
  176. package/src/styles/components/iconfont/fonts/iconfont.svg +699 -0
  177. package/src/styles/components/iconfont/fonts/iconfont.ttf +0 -0
  178. package/src/styles/components/iconfont/fonts/iconfont.woff +0 -0
  179. package/src/styles/components/iconfont/fonts/iconfont.woff2 +0 -0
  180. package/src/styles/components/index.less +16 -0
  181. package/src/styles/components/input.less +290 -0
  182. package/src/styles/components/modal.less +203 -0
  183. package/src/styles/components/page.less +340 -0
  184. package/src/styles/components/select.less +361 -0
  185. package/src/styles/components/steps.less +367 -0
  186. package/src/styles/components/table.less +544 -0
  187. package/src/styles/components/tabs.less +249 -0
  188. package/src/styles/components/upload.less +83 -0
  189. package/src/styles/custom.less +67 -0
  190. package/src/styles/index.less +6 -0
  191. package/src/styles/pack.less +6 -0
  192. package/src/utils/EfuMessenger.js +155 -0
  193. package/src/utils/assist.js +353 -0
  194. package/src/utils/index.js +1 -0
  195. package/src/utils/random_str.js +10 -0
@@ -0,0 +1,463 @@
1
+ import { scrollTop } from '../../utils/assist';
2
+ import {deepCopy} from '../../utils/assist';
3
+ let common = {};
4
+ function Table_getSelection () {
5
+ // 分别拿根数据和子数据的已选项
6
+ let selectionIndexes = [];
7
+ let selectionRowKeys = [];
8
+ for (let i in this.objData) {
9
+ const objData = this.objData[i];
10
+ if (objData._isChecked) selectionIndexes.push(parseInt(i));
11
+ if (objData.children && objData.children.length) {
12
+ selectionRowKeys = selectionRowKeys.concat(this.getSelectionChildrenRowKeys(objData, selectionRowKeys));
13
+ }
14
+ }
15
+
16
+ // 去重的 RowKeys
17
+ selectionRowKeys = [...new Set(selectionRowKeys)];
18
+
19
+ let selection = [];
20
+
21
+ this.data.forEach((item, index) => {
22
+ if (selectionIndexes.indexOf(index) > -1) {
23
+ // 自定义:加行号索引 便于批量删除
24
+ item._customIndex = index;
25
+
26
+ selection = selection.concat(item);
27
+ }
28
+ if (item.children && item.children.length && selectionRowKeys.length) {
29
+ selection = selection.concat(this.getSelectionChildren(item, selection, selectionRowKeys));
30
+ }
31
+ });
32
+
33
+ selection = [...new Set(selection)];
34
+ return JSON.parse(JSON.stringify(selection));
35
+ }
36
+
37
+ function Table_handleResize () {
38
+ //let tableWidth = parseInt(getStyle(this.$el, 'width')) - 1;
39
+ // 原代码当列宽不设置的时 会出现缩进的现象
40
+ //let tableWidth = this.$el.offsetWidth - 1;
41
+ //自定义
42
+ let tableWidth = this.$el.parentNode.offsetWidth;
43
+ let columnsWidth = {};
44
+ let sumMinWidth = 0;
45
+ let hasWidthColumns = [];
46
+ let noWidthColumns = [];
47
+ let maxWidthColumns = [];
48
+ let noMaxWidthColumns = [];
49
+ this.cloneColumns.forEach((col) => {
50
+ if (col.width) {
51
+ hasWidthColumns.push(col);
52
+ }
53
+ else{
54
+ noWidthColumns.push(col);
55
+ if (col.minWidth) {
56
+ sumMinWidth += col.minWidth;
57
+ }
58
+ if (col.maxWidth) {
59
+ maxWidthColumns.push(col);
60
+ }
61
+ else {
62
+ noMaxWidthColumns.push(col);
63
+ }
64
+ }
65
+ col._width = null;
66
+ });
67
+
68
+ let unUsableWidth = hasWidthColumns.map(cell => cell.width).reduce((a, b) => a + b, 0);
69
+ let usableWidth = tableWidth - unUsableWidth - sumMinWidth - (this.showVerticalScrollBar?this.scrollBarWidth:0) - 1;
70
+ let usableLength = noWidthColumns.length;
71
+ let columnWidth = 0;
72
+ if(usableWidth > 0 && usableLength > 0){
73
+ columnWidth = parseInt(usableWidth / usableLength);
74
+ }
75
+
76
+ for (let i = 0; i < this.cloneColumns.length; i++) {
77
+ const column = this.cloneColumns[i];
78
+ let width = columnWidth + (column.minWidth?column.minWidth:0);
79
+ if(column.width){
80
+ width = column.width;
81
+ }
82
+ else{
83
+ if (column._width) {
84
+ width = column._width;
85
+ }
86
+ else {
87
+ if (column.minWidth > width){
88
+ width = column.minWidth;
89
+ }
90
+ else if (column.maxWidth < width){
91
+ width = column.maxWidth;
92
+ }
93
+
94
+ if (usableWidth>0) {
95
+ usableWidth -= width - (column.minWidth?column.minWidth:0);
96
+ usableLength--;
97
+ if (usableLength > 0) {
98
+ columnWidth = parseInt(usableWidth / usableLength);
99
+ }
100
+ else {
101
+ columnWidth = 0;
102
+ }
103
+ }
104
+ else{
105
+ columnWidth = 0;
106
+ }
107
+ }
108
+ }
109
+
110
+ column._width = width;
111
+
112
+ columnsWidth[column._index] = {
113
+ width: width
114
+ };
115
+
116
+ }
117
+ if(usableWidth>0) {
118
+ usableLength = noMaxWidthColumns.length;
119
+ columnWidth = parseInt(usableWidth / usableLength);
120
+ for (let i = 0; i < noMaxWidthColumns.length; i++) {
121
+ const column = noMaxWidthColumns[i];
122
+ let width = column._width + columnWidth;
123
+ if (usableLength > 1) {
124
+ usableLength--;
125
+ usableWidth -= columnWidth;
126
+ columnWidth = parseInt(usableWidth / usableLength);
127
+ }
128
+ else {
129
+ columnWidth = 0;
130
+ }
131
+
132
+ column._width = width;
133
+
134
+ columnsWidth[column._index] = {
135
+ width: width
136
+ };
137
+
138
+ }
139
+ }
140
+
141
+ this.tableWidth = this.cloneColumns.map(cell => cell._width).reduce((a, b) => a + b, 0) + (this.showVerticalScrollBar?this.scrollBarWidth:0) + 1;
142
+ this.columnsWidth = columnsWidth;
143
+ this.fixedHeader();
144
+ }
145
+
146
+ function Table_highlightCurrentRow (_index, rowKey) {
147
+ const objData = rowKey ? this.getDataByRowKey(rowKey) : this.objData[_index];
148
+ if (!objData) return;
149
+ if (!this.highlightRow || objData._isHighlight) return;
150
+ this.handleCurrentRow('highlight', _index, rowKey);
151
+ }
152
+
153
+ function getRandomStr (len = 32) {
154
+ const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
155
+ const maxPos = $chars.length;
156
+ let str = '';
157
+ for (let i = 0; i < len; i++) {
158
+ str += $chars.charAt(Math.floor(Math.random() * maxPos));
159
+ }
160
+ return str;
161
+ };
162
+
163
+ function Table_makeColumnsId (columns) {
164
+ const cloneColumns = deepCopy(columns);
165
+ return cloneColumns.map(item => {
166
+ if ('children' in item) item.children = this.makeColumnsId(item.children);
167
+ item.__id = getRandomStr(6);
168
+ return item;
169
+ });
170
+ };
171
+
172
+ function TableHead_scrollBarCellClass(){
173
+ let hasRightFixed = false;
174
+ for(let i in this.headRows){
175
+ for(let j in this.headRows[i]){
176
+ if(this.headRows[i][j].fixed === 'right') {
177
+ hasRightFixed=true;
178
+ break;
179
+ }
180
+ if(hasRightFixed) break;
181
+ }
182
+ }
183
+ return [
184
+ {
185
+ [`${this.prefixCls}-hidden`]: hasRightFixed,
186
+ 'efuture-table-scroll-th':true
187
+ }
188
+ ];
189
+ }
190
+
191
+ function handleCheckClick (event, new_window = false) {
192
+ if (this.to) {
193
+ if (this.target === '_blank') {
194
+ return false;
195
+ } else {
196
+ event.preventDefault();
197
+ if (this.to === 'click') {
198
+ this.$emit('click', event);
199
+ } else {
200
+ this.handleClick(new_window);
201
+ }
202
+ }
203
+ }
204
+ }
205
+ function Upload_handleClick () {
206
+ if (this.itemDisabled) return;
207
+ // 自定义:弹框之前check
208
+ if (this.$parent && this.$parent.onClick) {
209
+ this.$parent.onClick()
210
+ } else {
211
+ if (this.$refs.input) {
212
+ this.$refs.input.click();
213
+ }
214
+ }
215
+ }
216
+
217
+ function DatePicker_reset() {
218
+ if (this.$refs.pickerPanel && this.$refs.pickerPanel.reset) {
219
+ this.$refs.pickerPanel.reset();
220
+ }
221
+ }
222
+
223
+ function DatePicker_handleKeydown (e) {
224
+ const pickerPrefixCls = 'ivu-picker';
225
+ const keyCode = e.keyCode;
226
+
227
+ // handle "tab" key
228
+ if (keyCode === 9) {
229
+ if (this.visible) {
230
+ e.stopPropagation();
231
+ e.preventDefault();
232
+
233
+ if (this.isConfirm) {
234
+ const selector = `.${pickerPrefixCls}-confirm > *`;
235
+ const tabbable = this.$refs.drop.$el.querySelectorAll(selector);
236
+ this.internalFocus = true;
237
+ const element = [...tabbable][e.shiftKey ? 'pop' : 'shift']();
238
+ element.focus();
239
+ } else {
240
+ this.handleClose();
241
+ }
242
+ } else {
243
+ this.focused = false;
244
+ }
245
+ }
246
+
247
+ // open the panel
248
+ const arrows = [37, 38, 39, 40];
249
+ if (!this.visible && arrows.includes(keyCode)) {
250
+ this.visible = true;
251
+ return;
252
+ }
253
+
254
+ // close on "esc" key
255
+ if (keyCode === 27) {
256
+ if (this.visible) {
257
+ e.stopPropagation();
258
+ this.handleClose();
259
+ }
260
+ }
261
+
262
+ // select date, "Enter" key
263
+ if (keyCode === 13) {
264
+ const timePickers = this.timeSpinnerList.map(item => item.timeSpinner);
265
+ if (timePickers.length > 0) {
266
+ const columnsPerPicker = timePickers[0].showSeconds ? 3 : 2;
267
+ const pickerIndex = Math.floor(this.focusedTime.column / columnsPerPicker);
268
+ const value = this.focusedTime.time[pickerIndex];
269
+
270
+ timePickers[pickerIndex].chooseValue(value);
271
+ return;
272
+ }
273
+
274
+ if (this.type.match(/range/)) {
275
+ this.$refs.pickerPanel.handleRangePick(this.focusedDate, 'date');
276
+ } else {
277
+ const panels = this.panelTableList.map(item => item.panelTable);
278
+ const compareDate = (d) => {
279
+ const sliceIndex = ['year', 'month', 'date'].indexOf((this.type)) + 1;
280
+ return [d.getFullYear(), d.getMonth(), d.getDate()].slice(0, sliceIndex).join('-');
281
+ };
282
+
283
+ const dateIsValid = panels.find(({ cells }) => {
284
+ return cells.find(({ date, disabled }) => compareDate(date) === compareDate(this.focusedDate) && !disabled);
285
+ });
286
+ if (dateIsValid) {
287
+ if (this.modelValue === null) {
288
+ this.onPick(null, false, 'date');
289
+ } else {
290
+ this.onPick(this.focusedDate, false, 'date');
291
+ }
292
+ }
293
+ }
294
+ }
295
+
296
+ if (!arrows.includes(keyCode)) return; // ignore rest of keys
297
+
298
+ // navigate times and dates
299
+ if (this.focusedTime.active) e.preventDefault(); // to prevent cursor from moving
300
+ this.navigateDatePanel(keyValueMapper[keyCode], e.shiftKey);
301
+ }
302
+
303
+ function DatePicker_handleBlur(e) {
304
+ if (this.internalFocus) {
305
+ this.internalFocus = false;
306
+ return;
307
+ }
308
+ if (this.visible) {
309
+ e.preventDefault();
310
+ return;
311
+ }
312
+
313
+ this.isFocused = false;
314
+ this.onSelectionModeChange(this.type);
315
+ this.internalValue = this.internalValue.slice(); // trigger panel watchers to reset views
316
+ this.reset();
317
+ if (this.$refs.pickerPanel) {
318
+ this.$refs.pickerPanel.onToggleVisibility(false);
319
+ }
320
+ }
321
+ export const isClient = typeof window !== 'undefined';
322
+
323
+ function getScroll(target, top) {
324
+ const prop = top ? 'pageYOffset' : 'pageXOffset';
325
+ const method = top ? 'scrollTop' : 'scrollLeft';
326
+
327
+ let ret = target[prop];
328
+
329
+ if (isClient && typeof ret !== 'number') {
330
+ ret = window.document.documentElement[method];
331
+ }
332
+
333
+ return ret;
334
+ }
335
+
336
+ function getOffset(element) {
337
+ if (!isClient) return;
338
+ const rect = element.getBoundingClientRect();
339
+
340
+ const scrollTop = getScroll(window, true);
341
+ const scrollLeft = getScroll(window);
342
+
343
+ const docEl = window.document.body;
344
+ const clientTop = docEl.clientTop || 0;
345
+ const clientLeft = docEl.clientLeft || 0;
346
+
347
+ return {
348
+ top: rect.top + scrollTop - clientTop,
349
+ left: rect.left + scrollLeft - clientLeft
350
+ };
351
+ }
352
+
353
+ function Anchor_handleScroll (e) {
354
+ this.upperFirstTitle = !!this.titlesOffsetArr[0] && e.target.scrollTop < this.titlesOffsetArr[0].offset;
355
+ if (this.animating) return;
356
+ // this.updateTitleOffset();
357
+ const scrollTop = this.scrollContainer.scrollTop;
358
+ this.getCurrentScrollAtTitleId(scrollTop);
359
+ }
360
+
361
+ function Affix_handleScroll () {
362
+ if (!isClient) return;
363
+ const affix = this.affix;
364
+ const scrollTop = getScroll(window, true);
365
+ const elOffset = getOffset(this.$el);
366
+ const windowHeight = window.innerHeight;
367
+ const elHeight = this.$el.getElementsByTagName('div')[0].offsetHeight;
368
+
369
+ // Fixed Top
370
+ if ((elOffset.top - this.offsetTop) < scrollTop && this.offsetType == 'top' && !affix) {
371
+ this.affix = true;
372
+ this.slotStyle = {
373
+ width: this.$refs.point.clientWidth + 'px',
374
+ height: this.$refs.point.clientHeight + 'px'
375
+ };
376
+ this.slot = true;
377
+ this.styles = {
378
+ top: `${this.offsetTop}px`,
379
+ };
380
+ if (elOffset.left) {
381
+ this.styles.left = `${elOffset.left}px`;
382
+ }
383
+ if (this.$el.offsetWidth) {
384
+ this.styles.width = `${this.$el.offsetWidth}px`;
385
+ }
386
+ this.$emit('on-change', true);
387
+ } else if ((elOffset.top - this.offsetTop) > scrollTop && this.offsetType == 'top' && affix) {
388
+ this.slot = false;
389
+ this.slotStyle = {};
390
+ this.affix = false;
391
+ this.styles = null;
392
+
393
+ this.$emit('on-change', false);
394
+ }
395
+
396
+ // Fixed Bottom
397
+ if ((elOffset.top + this.offsetBottom + elHeight) > (scrollTop + windowHeight) && this.offsetType == 'bottom' && !affix) {
398
+ this.affix = true;
399
+ this.styles = {
400
+ bottom: `${this.offsetBottom}px`,
401
+ left: `${elOffset.left}px`,
402
+ width: `${this.$el.offsetWidth}px`
403
+ };
404
+
405
+ this.$emit('on-change', true);
406
+ } else if ((elOffset.top + this.offsetBottom + elHeight) < (scrollTop + windowHeight) && this.offsetType == 'bottom' && affix) {
407
+ this.affix = false;
408
+ this.styles = null;
409
+
410
+ this.$emit('on-change', false);
411
+ }
412
+ }
413
+ common.initTable = function (obj) {
414
+ obj.methods.getSelection = Table_getSelection;
415
+ obj.methods.handleResize = Table_handleResize;
416
+ obj.methods.highlightCurrentRow = Table_highlightCurrentRow;
417
+ obj.methods.makeColumnsId = Table_makeColumnsId;
418
+ obj.components.tableHead.methods.scrollBarCellClass = TableHead_scrollBarCellClass;
419
+ }
420
+
421
+ common.initBreadcrumbItem = function (obj) {
422
+ obj.mixins[0].methods.handleCheckClick = handleCheckClick;
423
+ }
424
+ common.initButton = function (obj) {
425
+ obj.mixins[0].methods.handleCheckClick = handleCheckClick;
426
+ }
427
+ common.initCard = function (obj) {
428
+ obj.mixins[0].methods.handleCheckClick = handleCheckClick;
429
+ }
430
+ common.initCell = function (obj) {
431
+ obj.mixins[0].methods.handleCheckClick = handleCheckClick;
432
+ }
433
+ common.initMenuItem = function (obj) {
434
+ obj.mixins[1].methods.handleCheckClick = handleCheckClick;
435
+ }
436
+ common.initUpload = function (obj) {
437
+ obj.methods.handleClick = Upload_handleClick;
438
+ }
439
+ common.initDatePicker = function (obj) {
440
+ obj.mixins[0].methods.reset = DatePicker_reset;
441
+ obj.mixins[0].methods.handleBlur = DatePicker_handleBlur;
442
+ obj.mixins[0].methods.handleKeydown = DatePicker_handleKeydown;
443
+ }
444
+
445
+ common.initAffix = function (obj) {
446
+ obj.methods.handleScroll = Affix_handleScroll;
447
+ }
448
+ common.initAnchor = function (obj) {
449
+ obj.methods.handleScroll = Anchor_handleScroll;
450
+ }
451
+ common.initEview = function (ViewUI) {
452
+ common.initTable(ViewUI.Table);
453
+ common.initBreadcrumbItem(ViewUI.BreadcrumbItem);
454
+ common.initButton(ViewUI.Button);
455
+ common.initCard(ViewUI.Card);
456
+ common.initCell(ViewUI.Cell);
457
+ common.initMenuItem(ViewUI.MenuItem);
458
+ common.initUpload(ViewUI.Upload);
459
+ common.initDatePicker(ViewUI.DatePicker);
460
+ common.initAffix(ViewUI.Affix);
461
+ common.initAnchor(ViewUI.Anchor);
462
+ }
463
+ export default common;
@@ -0,0 +1,19 @@
1
+ import { createStore } from 'vuex'
2
+ // 类似 Redux 中的建立状态树
3
+ import app from './modules/app';
4
+
5
+ export default createStore({
6
+
7
+ state: {
8
+ //
9
+ },
10
+ mutations: {
11
+ //
12
+ },
13
+ actions: {
14
+
15
+ },
16
+ modules: {
17
+ app
18
+ }
19
+ });
@@ -0,0 +1,53 @@
1
+ const app = {
2
+ state: {
3
+ clientHeight: window.innerHeight? window.innerHeight: document.documentElement.clientHeight? document.documentElement.clientHeight: screen.height,
4
+ clientWidth: window.innerWidth? window.innerWidth: document.documentElement.clientWidth? document.documentElement.clientWidth: screen.width,
5
+ mychartColor:{
6
+ pie:['#FF8636','#028154','#FC635B','#FDBA4F','#436EFD','#7ACBBD','#6882FF','#819DE4'],
7
+ bar:['#627AE1','#8CBBFF','#8CE8BB'],
8
+ line:['#01332F','#627AE1','#ED6A4C']
9
+ },
10
+ floorMap:{}
11
+ },
12
+ mutations: {
13
+ /**
14
+ * 修改主窗体高度方法
15
+ *
16
+ * @param {any} obj
17
+ */
18
+ setClientHeight (state) {
19
+ //console.log('变更之前:'+ state.clientHeight);
20
+ state.clientHeight =window.innerHeight? window.innerHeight: document.documentElement.clientHeight? document.documentElement.clientHeight: screen.height;
21
+ //console.log('变更之后:'+ state.clientHeight);
22
+ },
23
+ /**
24
+ * 修改主窗体宽度方法
25
+ *
26
+ * @param {any} obj
27
+ */
28
+ setClientWidth (state) {
29
+ state.clientWidth = window.innerWidth? window.innerWidth: document.documentElement.clientWidth? document.documentElement.clientWidth: screen.width;
30
+ },
31
+ /**
32
+ * 颜色组
33
+ *
34
+ * @param {any} obj
35
+ */
36
+ setMychartColor(state,proName,color) {
37
+ let tempColor = [];
38
+ if (color) {
39
+ color.forEach(element => {
40
+ if (element) {
41
+ tempColor.push(element);
42
+ }
43
+ });
44
+ }
45
+ state.mychartColor[proName] = tempColor;
46
+ },
47
+ setFloorMap (state,obj) {
48
+ Object.assign(state.floorMap,obj);
49
+ }
50
+ }
51
+ };
52
+
53
+ export default app;
@@ -0,0 +1,3 @@
1
+ # 样式库说明
2
+
3
+ ## 目录
@@ -0,0 +1,75 @@
1
+
2
+ @primary-color : #AF292E;
3
+ @info-color : #4D4E53;
4
+ @warning-color : #F3B352;
5
+ @success-color : #9DC56A;
6
+ @text-color : #303133;
7
+ @asterisk-color : #EE1616;
8
+ @main-btn-disabled-color: #FFB5B8;
9
+ @table-th-font-size:13px;
10
+ @table-td-font-size:13px;
11
+
12
+ @form-item-margin-bottom:7px;
13
+ @form-item-margin-top:7px;
14
+ @font-size-small:13px;
15
+ @font-size-base:13px;
16
+ @table-th-default-height:36px;
17
+ @table-footer-default-height: 36px;
18
+ @table-td-default-height:36px;
19
+ @table-td-highlight-bg:#FFF3F3;
20
+ @table-td-hover-bg:#FBF4F4;
21
+ @input-disabled-bg: #F5F7FA;
22
+ @modal-header-padding:16px 14px;
23
+ @modal-body-padding:16px 14px;
24
+ @table-td-stripe-bg:#FAFCFF;
25
+ @border-color-base:#DCDFE6;
26
+ @table-thead-bg:#F5F7FA;
27
+ @text-grey:#636569;
28
+ @boder-color:#DCDFE6;
29
+ @btn-icon-size:12px;
30
+ @btn-font-size:13px;
31
+ @btn-padding-base:0px 12px;
32
+ @btn-disable-color : #A8ABB2 ;
33
+ @btn-disable-bg : #F5F7FA;
34
+ @btn-default-color : #606266;
35
+ @btn-ghost-color : #606266;
36
+ @input-disabled-font-color:#A8ABB2;
37
+ @efuture-checkbox-padding:8px;
38
+ @efuture-radiogroupbox-padding:8px;
39
+ @btn-border-radius:2px;
40
+ @body-background: none;
41
+ .gridcelrow:hover {
42
+ background-color:#FBF4F4;
43
+ }
44
+ .ivu-anchor-link {
45
+ border-left: 4px solid #fff
46
+ }
47
+ .ivu-anchor-link.ivu-anchor-link-active {
48
+ border-left: 4px solid #AF292E
49
+ }
50
+
51
+ .ivu-badge-count.badgeclass {
52
+ background:#fff !important;
53
+ border:1px solid #ed4014 !important;
54
+ color:#ed4014 !important;
55
+ }
56
+
57
+ ::-webkit-scrollbar{
58
+ height: 10px;
59
+ width: 10px;
60
+ }
61
+
62
+ ::-webkit-scrollbar-thumb {
63
+ border-radius: 10px;
64
+ border-style: dashed;
65
+ border-color: transparent;
66
+ border-width: 2px;
67
+ background-color: #ccc;
68
+ background-clip: padding-box;
69
+ }
70
+
71
+ ::-webkit-scrollbar-thumb:hover {
72
+ background: #ccc;
73
+ }
74
+
75
+
@@ -0,0 +1,74 @@
1
+ @anchor-prefix: ~"@{css-prefix}anchor";
2
+
3
+ .@{anchor-prefix}{
4
+ &-wrapper{
5
+ overflow: auto;
6
+ padding-left: 4px;
7
+ margin-left: -4px;
8
+ }
9
+
10
+ &{
11
+ position: relative;
12
+ padding-left: @anchor-border-width;
13
+
14
+ &-ink {
15
+ position: absolute;
16
+ height: 100%;
17
+ left: 0;
18
+ top: 0;
19
+ &:before {
20
+ content: ' ';
21
+ position: relative;
22
+ width: @anchor-border-width;
23
+ height: 100%;
24
+ display: block;
25
+ background-color: @border-color-split;
26
+ margin: 0 auto;
27
+ }
28
+ &-ball {
29
+ display: inline-block;
30
+ position: absolute;
31
+ width: 8px;
32
+ height: 8px;
33
+ border-radius: 50%;
34
+ border: 2px solid @primary-color;
35
+ background-color: @body-background;
36
+ left: 50%;
37
+ transition: top @transition-time @ease-in-out;
38
+ transform: translate(-50%, 2px);
39
+ }
40
+ }
41
+
42
+ &.fixed &-ink &-ink-ball {
43
+ display: none;
44
+ }
45
+ }
46
+
47
+ &-link {
48
+ padding: 8px 0 8px 16px;
49
+ line-height: 1.2;
50
+
51
+ &-title {
52
+ display: block;
53
+ position: relative;
54
+ transition: all .3s;
55
+ color: @text-color;
56
+ white-space: nowrap;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ margin-bottom: 8px;
60
+ &:only-child {
61
+ margin-bottom: 0;
62
+ }
63
+ }
64
+
65
+ &-active > &-title {
66
+ color: @primary-color;
67
+ }
68
+ }
69
+
70
+ &-link &-link {
71
+ padding-top: 6px;
72
+ padding-bottom: 6px;
73
+ }
74
+ }