hd-idevvue3 3.0.3 → 3.0.4

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 (147) hide show
  1. package/dist/assets/index.9c127719.css +1 -0
  2. package/dist/hd-idevvue3.mjs +3521 -3305
  3. package/dist/hd-idevvue3.umd.js +29 -29
  4. package/npminstall-debug.log +2 -10
  5. package/package.json +3 -1
  6. package/pnpm-lock.yaml +37 -4
  7. package/src/App.vue +11 -15
  8. package/src/assets/sound/notify.wav +0 -0
  9. package/src/demo/demo.vue +9 -10
  10. package/src/demo/dropdemo.vue +42 -43
  11. package/src/demo/extsets.vue +140 -39
  12. package/src/demo/formedit.vue +157 -145
  13. package/src/demo/hightquery.vue +263 -66
  14. package/src/demo/inlineedit.vue +129 -35
  15. package/src/demo/selfdrop.vue +32 -15
  16. package/src/directive/el-dragDialog/drag.js +13 -13
  17. package/src/directive/el-dragDialog/index.js +13 -13
  18. package/src/errorLog.js +3 -3
  19. package/src/hdcom/BigGrid.js +54 -48
  20. package/src/hdcom/BillShow.vue +84 -63
  21. package/src/hdcom/BillUpload.vue +144 -86
  22. package/src/hdcom/BtnRight.vue +26 -23
  23. package/src/hdcom/ErrHint.vue +36 -24
  24. package/src/hdcom/ExtendColumn.vue +97 -90
  25. package/src/hdcom/ExtendCommon.js +24 -13
  26. package/src/hdcom/ExtendForm.vue +107 -80
  27. package/src/hdcom/FacePicUpload.vue +59 -50
  28. package/src/hdcom/FaceRecTest.vue +87 -77
  29. package/src/hdcom/GridChart.vue +175 -162
  30. package/src/hdcom/GridExField.vue +328 -234
  31. package/src/hdcom/GridShow.vue +89 -39
  32. package/src/hdcom/HdAside.vue +192 -145
  33. package/src/hdcom/HdBtn.vue +44 -32
  34. package/src/hdcom/HdButton.vue +141 -117
  35. package/src/hdcom/HdComFaceRec.vue +80 -32
  36. package/src/hdcom/HdComGrid.vue +329 -229
  37. package/src/hdcom/HdComQuery.vue +179 -90
  38. package/src/hdcom/HdComQueryDetail.vue +159 -115
  39. package/src/hdcom/HdComSortDetail.vue +136 -130
  40. package/src/hdcom/HdDatePicker.vue +32 -16
  41. package/src/hdcom/HdDialog.vue +62 -44
  42. package/src/hdcom/HdDrop.vue +163 -138
  43. package/src/hdcom/HdFileUpload.vue +138 -119
  44. package/src/hdcom/HdFilterBox.vue +62 -62
  45. package/src/hdcom/HdFooter.vue +152 -119
  46. package/src/hdcom/HdForm.vue +276 -203
  47. package/src/hdcom/HdFormBtn.vue +81 -39
  48. package/src/hdcom/HdFormItem.vue +14 -10
  49. package/src/hdcom/HdGrid.vue +353 -156
  50. package/src/hdcom/HdGridEditBtn.vue +34 -20
  51. package/src/hdcom/HdGridExt.js +78 -47
  52. package/src/hdcom/HdGridSel.vue +227 -193
  53. package/src/hdcom/HdHeader.vue +149 -117
  54. package/src/hdcom/HdHotKey.vue +70 -67
  55. package/src/hdcom/HdInputHint.vue +40 -36
  56. package/src/hdcom/HdMain.vue +25 -27
  57. package/src/hdcom/HdMessage.vue +180 -171
  58. package/src/hdcom/HdNum.vue +67 -57
  59. package/src/hdcom/HdPopSel.vue +46 -24
  60. package/src/hdcom/HdRightMenu.vue +63 -61
  61. package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
  62. package/src/hdcom/HdTableColumn.vue +156 -109
  63. package/src/hdcom/HdTempSave.vue +138 -116
  64. package/src/hdcom/HdTree.vue +89 -72
  65. package/src/hdcom/HdTreeTable/eval.js +8 -3
  66. package/src/hdcom/HdTreeTable/index.vue +229 -174
  67. package/src/hdcom/ImportExcel.vue +69 -34
  68. package/src/hdcom/index.js +39 -44
  69. package/src/idev.common.js +54 -47
  70. package/src/index.js +3 -6
  71. package/src/utils/HdQuery.js +25 -14
  72. package/src/utils/comutils.js +50 -28
  73. package/src/utils/gogocodeTransfer.js +59 -0
  74. package/src/utils/utils.js +30 -19
  75. package/src/vendor/Blob.js +187 -179
  76. package/src/vendor/Export2Excel.js +231 -220
  77. package/src/vendor/Export2Zip.js +25 -22
  78. package/src/views/layout/AppMain.vue +34 -32
  79. package/src/views/layout/HdLayout.vue +64 -52
  80. package/src/views/layout/header/ElasticSearch.vue +196 -159
  81. package/src/views/layout/header/HZRecorder.js +163 -135
  82. package/src/views/layout/header/HeaderSearch.vue +165 -145
  83. package/src/views/layout/header/Levelbar.vue +55 -49
  84. package/src/views/layout/header/MainHeader.vue +233 -189
  85. package/src/views/layout/header/Navbar.vue +74 -78
  86. package/src/views/layout/header/ScrollPane.vue +103 -81
  87. package/src/views/layout/header/TagsView.vue +169 -164
  88. package/src/views/layout/header/VocRec.vue +86 -78
  89. package/src/views/layout/header/changepswform.vue +98 -64
  90. package/src/views/layout/index.js +5 -7
  91. package/src/views/layout/menu/Hamburger.vue +63 -45
  92. package/src/views/layout/menu/HdMenu.vue +155 -118
  93. package/src/views/layout/menu/index.vue +21 -19
  94. package/src/views/privilege/commsg/commsg.vue +115 -41
  95. package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
  96. package/src/views/privilege/commsg/commsgRole.vue +180 -109
  97. package/src/views/privilege/commsg/commsgform.vue +125 -101
  98. package/src/views/privilege/commsg/commsgiframe.vue +30 -23
  99. package/src/views/privilege/commsg/commsgto.vue +163 -84
  100. package/src/views/privilege/commsg/commsgtoform.vue +64 -58
  101. package/src/views/privilege/commsg/commsgtrans.vue +187 -115
  102. package/src/views/privilege/exfield/comexcolumn.vue +133 -43
  103. package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
  104. package/src/views/privilege/exfield/comexfield.vue +15 -17
  105. package/src/views/privilege/exfield/comexfieldform.vue +71 -53
  106. package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
  107. package/src/views/privilege/index.js +19 -20
  108. package/src/views/privilege/menu/comMenu.vue +49 -41
  109. package/src/views/privilege/menu/menu.vue +166 -49
  110. package/src/views/privilege/menu/menuinfo.vue +41 -34
  111. package/src/views/privilege/menu/rolelist.vue +78 -33
  112. package/src/views/privilege/menu/userlist.vue +76 -33
  113. package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
  114. package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
  115. package/src/views/privilege/orgDept/authOrgn.vue +157 -65
  116. package/src/views/privilege/orgDept/authorgnform.vue +50 -38
  117. package/src/views/privilege/orgDept/orgDept.vue +38 -37
  118. package/src/views/privilege/orgDept/orgTree.vue +99 -88
  119. package/src/views/privilege/orgDept/orgnselect.vue +132 -111
  120. package/src/views/privilege/personDept/authuser.vue +197 -91
  121. package/src/views/privilege/personDept/authuserform.vue +123 -71
  122. package/src/views/privilege/personDept/facerec.vue +128 -83
  123. package/src/views/privilege/personDept/orgncascader.vue +134 -115
  124. package/src/views/privilege/personDept/personDept.vue +9 -7
  125. package/src/views/privilege/quartz/comquartzjob.vue +123 -38
  126. package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
  127. package/src/views/privilege/quartz/comquartzlog.vue +116 -32
  128. package/src/views/privilege/role/btnRole.vue +123 -67
  129. package/src/views/privilege/role/menuRole.vue +65 -45
  130. package/src/views/privilege/role/orgnRole.vue +63 -41
  131. package/src/views/privilege/role/role.vue +26 -9
  132. package/src/views/privilege/role/rolelist.vue +114 -45
  133. package/src/views/privilege/role/roleselect.vue +34 -17
  134. package/src/views/privilege/search/comsearch.vue +164 -73
  135. package/src/views/privilege/search/menu.vue +38 -22
  136. package/src/views/privilege/syscode/syscode.vue +157 -69
  137. package/src/views/privilege/syscode/sysfield.vue +96 -43
  138. package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
  139. package/src/views/privilege/syslog/menulog.vue +38 -22
  140. package/src/views/privilege/syslog/syslog.vue +145 -78
  141. package/src/views/privilege/syslog/syslogconfig.vue +91 -24
  142. package/src/views/privilege/syslog/syslogform.vue +45 -43
  143. package/src/views/privilege/syslog/syslogframe.vue +26 -26
  144. package/src/views/privilege/userRole/userRole.vue +187 -89
  145. package/vite.config.js +7 -0
  146. package/dist/assets/index.774ef40e.css +0 -1
  147. package/src/views/privilege.zip +0 -0
@@ -1,174 +1,229 @@
1
- <template>
2
- <el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
3
- <el-table-column v-if="columns.length===0" width="150">
4
- <template slot-scope="scope">
5
- <span v-for="space in scope.row._level" class="ms-tree-space" :key="space"></span>
6
- <span class="tree-ctrl" v-if="iconShow(0,scope.row)" @click="toggleExpanded(scope.$index)">
7
- <i v-if="!scope.row._expanded" class="el-icon-plus"></i>
8
- <i v-else class="el-icon-minus"></i>
9
- </span>
10
- {{scope.$index}}
11
- </template>
12
- </el-table-column>
13
- <el-table-column v-else v-for="(column, index) in columns" :key="column.value" :label="column.text" :width="column.width">
14
- <template slot-scope="scope">
15
- <span v-if="index === 0" v-for="space in scope.row._level" class="ms-tree-space" :key="space"></span>
16
- <span class="tree-ctrl" v-if="iconShow(index,scope.row)" @click="toggleExpanded(scope.$index)">
17
- <i v-if="!scope.row._expanded" class="el-icon-plus"></i>
18
- <i v-else class="el-icon-minus"></i>
19
- </span>
20
- {{scope.row[column.value]}}
21
- </template>
22
- </el-table-column>
23
- <slot></slot>
24
- </el-table>
25
- </template>
26
-
27
- <script>
28
- /**
29
- Auth: Lei.j1ang
30
- Created: 2018/1/19-13:59
31
- */
32
- import treeToArray from './eval'
33
- export default {
34
- name: 'treeTable',
35
- props: {
36
- data: {
37
- type: [Array, Object],
38
- required: true
39
- },
40
- columns: {
41
- type: Array,
42
- default: () => []
43
- },
44
- evalFunc: Function,
45
- evalArgs: Array,
46
- expandAll: {
47
- type: Boolean,
48
- default: false
49
- }
50
- },
51
- computed: {
52
- // 格式化数据源
53
- formatData: function() {
54
- let tmp
55
- if (!Array.isArray(this.data)) {
56
- tmp = [this.data]
57
- } else {
58
- tmp = this.data
59
- }
60
- const func = this.evalFunc || treeToArray
61
- const args = this.evalArgs ? Array.concat([tmp, this.expandAll], this.evalArgs) : [tmp, this.expandAll]
62
- return func.apply(null, args)
63
- }
64
- },
65
- methods: {
66
- showRow: function(row) {
67
- const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true)
68
- row.row._show = show
69
- return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;'
70
- },
71
- // 切换下级是否展开
72
- toggleExpanded: function(trIndex) {
73
- const record = this.formatData[trIndex]
74
- record._expanded = !record._expanded
75
- },
76
- // 图标显示
77
- iconShow(index, record) {
78
- return (index === 0 && record.children && record.children.length > 0)
79
- }
80
- }
81
- }
82
- </script>
83
- <style rel="stylesheet/css">
84
- @keyframes treeTableShow {
85
- from {opacity: 0;}
86
- to {opacity: 1;}
87
- }
88
- @-webkit-keyframes treeTableShow {
89
- from {opacity: 0;}
90
- to {opacity: 1;}
91
- }
92
- </style>
93
-
94
- <style lang="scss" rel="stylesheet/scss" scoped>
95
- $color-blue: #2196F3;
96
- $space-width: 8px;
97
- .ms-tree-space {
98
- position: relative;
99
- top: 1px;
100
- display: inline-block;
101
- font-style: normal;
102
- font-weight: 400;
103
- line-height: 1;
104
- width: $space-width;
105
- height: 14px;
106
- &::before {
107
- content: ""
108
- }
109
- }
110
- .processContainer{
111
- width: 100%;
112
- height: 100%;
113
- }
114
- table td {
115
- line-height: 26px;
116
- }
117
- .tree-ctrl{
118
- position: relative;
119
- cursor: pointer;
120
- color: $color-blue;
121
- margin-left: -$space-width;
122
- }
123
- .el-table {
124
- height: 100%;
125
- width: 100%;
126
- flex: 1;
127
- .el-table__body-wrapper {
128
- width: 100%;
129
- }
130
- .el-table__header-wrapper th { //列表标题
131
- background-color: #f6f6f6;
132
- }
133
-
134
- .el-table__fixed-header-wrapper th { //固定的列表标题
135
- background-color: #f6f6f6;
136
- }
137
- td, th { //列表标题及内容
138
- padding: 1px 0;
139
- }
140
- .cell, .el-table th div, .el-table--border th:first-child .cell, .el-table--border td:first-child .cell { //列表的margin
141
- padding-left: 5px !important;
142
- padding-right: 1px !important;
143
- padding-top:1.5px !important;
144
- padding-bottom: 1.5px !important;
145
- }
146
- .el-table__empty-block {
147
- position: static;
148
- text-align: center;
149
- width: 100%;
150
- height: 80%
151
- }
152
- .el-table__body { //列表下面加了空白
153
- margin-bottom: 10px;
154
- }
155
- .el-table__body-wrapper {
156
- height: 100%;
157
- overflow-y: auto;
158
- }
159
- .el-input__inner {
160
- height: 27px;
161
- margin-bottom: 0px;
162
- }
163
- .el-input, .el-form-item__content, .el-form-item__label, .el-input__icon {
164
- line-height: 30px;
165
- }
166
- .el-input__inner {
167
- padding: 5px;
168
- }
169
- .el-input--prefix .el-input__inner { //日期的有logo不一样
170
- padding-left: 30px;
171
- }
172
-
173
- }
174
- </style>
1
+ <template>
2
+ <el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
3
+ <el-table-column v-if="columns.length === 0" width="150">
4
+ <template slot-scope="scope">
5
+ <span
6
+ v-for="space in scope.row._level"
7
+ class="ms-tree-space"
8
+ :key="space"
9
+ ></span>
10
+ <span
11
+ class="tree-ctrl"
12
+ v-if="iconShow(0, scope.row)"
13
+ @click="toggleExpanded(scope.$index)"
14
+ >
15
+ <el-icon><el-icon-plus /></el-icon>
16
+ <el-icon><el-icon-minus /></el-icon>
17
+ </span>
18
+ {{ scope.$index }}
19
+ </template>
20
+ </el-table-column>
21
+ <el-table-column
22
+ v-else
23
+ v-for="(column, index) in columns"
24
+ :key="column.value"
25
+ :label="column.text"
26
+ :width="column.width"
27
+ >
28
+ <template slot-scope="scope">
29
+ <span
30
+ v-if="index === 0"
31
+ v-for="space in scope.row._level"
32
+ class="ms-tree-space"
33
+ :key="space"
34
+ ></span>
35
+ <span
36
+ class="tree-ctrl"
37
+ v-if="iconShow(index, scope.row)"
38
+ @click="toggleExpanded(scope.$index)"
39
+ >
40
+ <el-icon><el-icon-plus /></el-icon>
41
+ <el-icon><el-icon-minus /></el-icon>
42
+ </span>
43
+ {{ scope.row[column.value] }}
44
+ </template>
45
+ </el-table-column>
46
+ <slot></slot>
47
+ </el-table>
48
+ </template>
49
+
50
+ <script>
51
+ import { Plus as ElIconPlus, Minus as ElIconMinus } from '@element-plus/icons'
52
+ /**
53
+ Auth: Lei.j1ang
54
+ Created: 2018/1/19-13:59
55
+ */
56
+ import treeToArray from './eval'
57
+ export default {
58
+ components: {
59
+ ElIconPlus,
60
+ ElIconMinus,
61
+ },
62
+ name: 'treeTable',
63
+ props: {
64
+ data: {
65
+ type: [Array, Object],
66
+ required: true,
67
+ },
68
+ columns: {
69
+ type: Array,
70
+ default: () => [],
71
+ },
72
+ evalFunc: Function,
73
+ evalArgs: Array,
74
+ expandAll: {
75
+ type: Boolean,
76
+ default: false,
77
+ },
78
+ },
79
+ computed: {
80
+ // 格式化数据源
81
+ formatData: function () {
82
+ let tmp
83
+ if (!Array.isArray(this.data)) {
84
+ tmp = [this.data]
85
+ } else {
86
+ tmp = this.data
87
+ }
88
+ const func = this.evalFunc || treeToArray
89
+ const args = this.evalArgs
90
+ ? Array.concat([tmp, this.expandAll], this.evalArgs)
91
+ : [tmp, this.expandAll]
92
+ return func.apply(null, args)
93
+ },
94
+ },
95
+ methods: {
96
+ showRow: function (row) {
97
+ const show = row.row.parent
98
+ ? row.row.parent._expanded && row.row.parent._show
99
+ : true
100
+ row.row._show = show
101
+ return show
102
+ ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;'
103
+ : 'display:none;'
104
+ },
105
+ // 切换下级是否展开
106
+ toggleExpanded: function (trIndex) {
107
+ const record = this.formatData[trIndex]
108
+ record._expanded = !record._expanded
109
+ },
110
+ // 图标显示
111
+ iconShow(index, record) {
112
+ return index === 0 && record.children && record.children.length > 0
113
+ },
114
+ },
115
+ }
116
+ </script>
117
+
118
+ <style rel="stylesheet/css">
119
+ @keyframes treeTableShow {
120
+ from {
121
+ opacity: 0;
122
+ }
123
+ to {
124
+ opacity: 1;
125
+ }
126
+ }
127
+ @-webkit-keyframes treeTableShow {
128
+ from {
129
+ opacity: 0;
130
+ }
131
+ to {
132
+ opacity: 1;
133
+ }
134
+ }
135
+ </style>
136
+
137
+ <style lang="scss" rel="stylesheet/scss" scoped>
138
+ $color-blue: #2196f3;
139
+ $space-width: 8px;
140
+ .ms-tree-space {
141
+ position: relative;
142
+ top: 1px;
143
+ display: inline-block;
144
+ font-style: normal;
145
+ font-weight: 400;
146
+ line-height: 1;
147
+ width: $space-width;
148
+ height: 14px;
149
+ &::before {
150
+ content: '';
151
+ }
152
+ }
153
+ .processContainer {
154
+ width: 100%;
155
+ height: 100%;
156
+ }
157
+ table td {
158
+ line-height: 26px;
159
+ }
160
+ .tree-ctrl {
161
+ position: relative;
162
+ cursor: pointer;
163
+ color: $color-blue;
164
+ margin-left: -$space-width;
165
+ }
166
+ .el-table {
167
+ height: 100%;
168
+ width: 100%;
169
+ flex: 1;
170
+ .el-table__body-wrapper {
171
+ width: 100%;
172
+ }
173
+ .el-table__header-wrapper th {
174
+ //列表标题
175
+ background-color: #f6f6f6;
176
+ }
177
+
178
+ .el-table__fixed-header-wrapper th {
179
+ //固定的列表标题
180
+ background-color: #f6f6f6;
181
+ }
182
+ td,
183
+ th {
184
+ //列表标题及内容
185
+ padding: 1px 0;
186
+ }
187
+ .cell,
188
+ .el-table th div,
189
+ .el-table--border th:first-child .cell,
190
+ .el-table--border td:first-child .cell {
191
+ //列表的margin
192
+ padding-left: 5px !important;
193
+ padding-right: 1px !important;
194
+ padding-top: 1.5px !important;
195
+ padding-bottom: 1.5px !important;
196
+ }
197
+ .el-table__empty-block {
198
+ position: static;
199
+ text-align: center;
200
+ width: 100%;
201
+ height: 80%;
202
+ }
203
+ .el-table__body {
204
+ //列表下面加了空白
205
+ margin-bottom: 10px;
206
+ }
207
+ .el-table__body-wrapper {
208
+ height: 100%;
209
+ overflow-y: auto;
210
+ }
211
+ .el-input__inner {
212
+ height: 27px;
213
+ margin-bottom: 0px;
214
+ }
215
+ .el-input,
216
+ .el-form-item__content,
217
+ .el-form-item__label,
218
+ .el-input__icon {
219
+ line-height: 30px;
220
+ }
221
+ .el-input__inner {
222
+ padding: 5px;
223
+ }
224
+ .el-input--prefix .el-input__inner {
225
+ //日期的有logo不一样
226
+ padding-left: 30px;
227
+ }
228
+ }
229
+ </style>
@@ -1,18 +1,48 @@
1
1
  <template>
2
- <el-dialog title="Excel上传" :visible.sync="visible" width='65%' top="10vh">
3
- <input id="excel-upload-input" ref="excel-upload-input" type="file" accept=".xlsx, .xls" class="c-hide"
4
- @change="handkeFileChange">
5
- <div class="excelSel" @drop="handleDrop" @dragover="handleDragover" @dragenter="handleDragover">
6
- {{$t('Excel导入,需要以导出的Excel为模板')}}<br/>
7
- {{$t('Excel文件拖动到或点击按钮上传')}}
8
- <el-button style="margin-left:16px;" type="primary" @click="handleUpload">{{$t('浏览')}}</el-button>
2
+ <el-dialog title="Excel上传" :visible.sync="visible" width="65%" top="10vh">
3
+ <input
4
+ id="excel-upload-input"
5
+ ref="excel-upload-input"
6
+ type="file"
7
+ accept=".xlsx, .xls"
8
+ class="c-hide"
9
+ @change="handkeFileChange"
10
+ />
11
+ <div
12
+ class="excelSel"
13
+ @drop="handleDrop"
14
+ @dragover="handleDragover"
15
+ @dragenter="handleDragover"
16
+ >
17
+ {{ $t('Excel导入,需要以导出的Excel为模板') }}<br />
18
+ {{ $t('Excel文件拖动到或点击按钮上传') }}
19
+ <el-button
20
+ style="margin-left: 16px"
21
+ type="primary"
22
+ @click="handleUpload"
23
+ >{{ $t('浏览') }}</el-button
24
+ >
9
25
  </div>
10
- <el-dialog title="sheet选择" :visible.sync="sheetVisible" width='55%' top="15vh">
11
- <div style="margin: 10px">{{$t('发现excel中存在多个sheet,请选择一个')}}</div>
26
+ <el-dialog
27
+ title="sheet选择"
28
+ :visible.sync="sheetVisible"
29
+ width="55%"
30
+ top="15vh"
31
+ >
32
+ <div style="margin: 10px">
33
+ {{ $t('发现excel中存在多个sheet,请选择一个') }}
34
+ </div>
12
35
  <el-radio-group v-model="selSheet">
13
- <el-radio v-for="(name,index) in allSheet" :label="name" :key="index">{{name}}</el-radio>
36
+ <el-radio
37
+ v-for="(name, index) in allSheet"
38
+ :label="name"
39
+ :key="index"
40
+ >{{ name }}</el-radio
41
+ >
14
42
  </el-radio-group>
15
- <el-button style="margin-left:16px;" type="primary" @click="sheetSure">{{$t('确定')}}</el-button>
43
+ <el-button style="margin-left: 16px" type="primary" @click="sheetSure">{{
44
+ $t('确定')
45
+ }}</el-button>
16
46
  </el-dialog>
17
47
  </el-dialog>
18
48
  </template>
@@ -26,13 +56,13 @@ export default {
26
56
  loading: false,
27
57
  excelData: {
28
58
  header: null,
29
- results: null
59
+ results: null,
30
60
  },
31
61
  visible: false,
32
62
  allSheet: [],
33
63
  selSheet: '',
34
64
  workbook: null,
35
- sheetVisible: false
65
+ sheetVisible: false,
36
66
  }
37
67
  },
38
68
  methods: {
@@ -74,7 +104,7 @@ export default {
74
104
  },
75
105
  readerData(itemFile) {
76
106
  const reader = new FileReader()
77
- reader.onload = e => {
107
+ reader.onload = (e) => {
78
108
  const data = e.target.result
79
109
  const fixedData = this.fixdata(data)
80
110
  this.workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
@@ -99,7 +129,11 @@ export default {
99
129
  let o = ''
100
130
  let l = 0
101
131
  const w = 10240
102
- for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
132
+ for (; l < data.byteLength / w; ++l)
133
+ o += String.fromCharCode.apply(
134
+ null,
135
+ new Uint8Array(data.slice(l * w, l * w + w))
136
+ )
103
137
  o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
104
138
  return o
105
139
  },
@@ -109,7 +143,8 @@ export default {
109
143
  let C
110
144
  const R = range.s.r
111
145
  /* start in the first row */
112
- for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
146
+ for (C = range.s.c; C <= range.e.c; ++C) {
147
+ /* walk every column in the range */
113
148
  var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })]
114
149
  /* find the cell in the first row */
115
150
  var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
@@ -117,27 +152,27 @@ export default {
117
152
  headers.push(hdr)
118
153
  }
119
154
  return headers
120
- }
121
- }
155
+ },
156
+ },
122
157
  }
123
158
  </script>
124
159
 
125
160
  <style scoped>
126
- #excel-upload-input {
127
- display: none;
128
- z-index: -9999;
129
- }
161
+ #excel-upload-input {
162
+ display: none;
163
+ z-index: -9999;
164
+ }
130
165
 
131
- .excelSel {
132
- border: 2px dashed #bbb;
133
- width: 600px;
134
- height: 160px;
135
- line-height: 80px;
136
- margin: 0 auto;
137
- font-size: 24px;
138
- border-radius: 5px;
139
- text-align: center;
140
- color: #bbb;
141
- position: relative;
142
- }
166
+ .excelSel {
167
+ border: 2px dashed #bbb;
168
+ width: 600px;
169
+ height: 160px;
170
+ line-height: 80px;
171
+ margin: 0 auto;
172
+ font-size: 24px;
173
+ border-radius: 5px;
174
+ text-align: center;
175
+ color: #bbb;
176
+ position: relative;
177
+ }
143
178
  </style>
@@ -28,53 +28,48 @@ import HdTempSave from './HdTempSave'
28
28
  import HdComFaceRec from './HdComFaceRec.vue'
29
29
  import HdInputHint from './HdInputHint'
30
30
 
31
-
32
-
33
31
  export default {
34
32
  install(Vue) {
35
- Vue.use(require('vue-shortkey'))
33
+ window.$vueApp.use(require('vue-shortkey'))
36
34
  Vue._window = window
37
- Vue.component('HdDrop', HdDrop)
38
- Vue.component('HdGrid', HdGrid)
39
- Vue.component('HdBtn', HdBtn)
40
- Vue.component('HdNum', HdNum)
41
- Vue.component('elTreeTable', HdTreeTable)
42
- Vue.component('elButton', HdButton) // 替换element ui
43
- Vue.component('elDialog', HdDialog)
44
- Vue.component('elAside', HdAside)
45
- Vue.component('elFooter', HdFooter)
46
- Vue.component('elHeader', HdHeader)
47
- Vue.component('elMain', HdMain)
48
- Vue.component('HdTreeTable', HdTreeTable)
49
- Vue.component('HdButton', HdButton) // 替换element ui
50
- Vue.component('HdDialog', HdDialog)
51
- Vue.component('HdAside', HdAside)
52
- Vue.component('HdFooter', HdFooter)
53
- Vue.component('HdHeader', HdHeader)
54
- Vue.component('HdMain', HdMain)
55
- Vue.component('HdInputHint', HdInputHint)
56
-
35
+ window.$vueApp.component('HdDrop', HdDrop)
36
+ window.$vueApp.component('HdGrid', HdGrid)
37
+ window.$vueApp.component('HdBtn', HdBtn)
38
+ window.$vueApp.component('HdNum', HdNum)
39
+ window.$vueApp.component('elTreeTable', HdTreeTable)
40
+ window.$vueApp.component('elButton', HdButton) // 替换element ui
41
+ window.$vueApp.component('elDialog', HdDialog)
42
+ window.$vueApp.component('elAside', HdAside)
43
+ window.$vueApp.component('elFooter', HdFooter)
44
+ window.$vueApp.component('elHeader', HdHeader)
45
+ window.$vueApp.component('elMain', HdMain)
46
+ window.$vueApp.component('HdTreeTable', HdTreeTable)
47
+ window.$vueApp.component('HdButton', HdButton) // 替换element ui
48
+ window.$vueApp.component('HdDialog', HdDialog)
49
+ window.$vueApp.component('HdAside', HdAside)
50
+ window.$vueApp.component('HdFooter', HdFooter)
51
+ window.$vueApp.component('HdHeader', HdHeader)
52
+ window.$vueApp.component('HdMain', HdMain)
53
+ window.$vueApp.component('HdInputHint', HdInputHint)
57
54
 
58
55
  // Vue.component('el-popover', HdPopover)
59
- Vue.component('elFormItem', HdFormItem)
60
- Vue.component('HdFormItem', HdFormItem)
61
- Vue.component('HdTree', HdTree)
62
- Vue.component('HdDatePicker', HdDatePicker)
63
- Vue.component('HdHotKey', HdHotkey)
64
- Vue.component('HdComGrid', HdComGrid)
65
- Vue.component('HdForm', HdForm)
66
- Vue.component('HdFormBtn', HdFormBtn)
67
- Vue.component('HdPopSel', HdPopSel)
68
- Vue.component('elTableColumn', HdTableColumn)
69
- Vue.component('HdTableColumn', HdTableColumn)
70
- Vue.component('ErrHint', ErrHint)
71
- Vue.component('HdMessage', HdMessage)
72
- Vue.component('HdFileUpload', HdFileUpload)
73
- Vue.component('HdGridSel', HdGridSel)
74
- Vue.component('HdGridEditBtn', HdGridEditBtn)
75
- Vue.component('HdTempSave', HdTempSave)
76
- Vue.component('HdComFaceRec', HdComFaceRec)
77
-
78
- }
56
+ window.$vueApp.component('elFormItem', HdFormItem)
57
+ window.$vueApp.component('HdFormItem', HdFormItem)
58
+ window.$vueApp.component('HdTree', HdTree)
59
+ window.$vueApp.component('HdDatePicker', HdDatePicker)
60
+ window.$vueApp.component('HdHotKey', HdHotkey)
61
+ window.$vueApp.component('HdComGrid', HdComGrid)
62
+ window.$vueApp.component('HdForm', HdForm)
63
+ window.$vueApp.component('HdFormBtn', HdFormBtn)
64
+ window.$vueApp.component('HdPopSel', HdPopSel)
65
+ window.$vueApp.component('elTableColumn', HdTableColumn)
66
+ window.$vueApp.component('HdTableColumn', HdTableColumn)
67
+ window.$vueApp.component('ErrHint', ErrHint)
68
+ window.$vueApp.component('HdMessage', HdMessage)
69
+ window.$vueApp.component('HdFileUpload', HdFileUpload)
70
+ window.$vueApp.component('HdGridSel', HdGridSel)
71
+ window.$vueApp.component('HdGridEditBtn', HdGridEditBtn)
72
+ window.$vueApp.component('HdTempSave', HdTempSave)
73
+ window.$vueApp.component('HdComFaceRec', HdComFaceRec)
74
+ },
79
75
  }
80
-