hd-idevvue3 3.0.2 → 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.
- package/dist/assets/index.9c127719.css +1 -0
- package/dist/hd-idevvue3.mjs +3521 -3305
- package/dist/hd-idevvue3.umd.js +29 -29
- package/npminstall-debug.log +2 -10
- package/package.json +4 -2
- package/pnpm-lock.yaml +37 -4
- package/src/App.vue +11 -15
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +9 -10
- package/src/demo/dropdemo.vue +42 -43
- package/src/demo/extsets.vue +140 -39
- package/src/demo/formedit.vue +157 -145
- package/src/demo/hightquery.vue +263 -66
- package/src/demo/inlineedit.vue +129 -35
- package/src/demo/selfdrop.vue +32 -15
- package/src/directive/el-dragDialog/drag.js +13 -13
- package/src/directive/el-dragDialog/index.js +13 -13
- package/src/errorLog.js +3 -3
- package/src/hdcom/BigGrid.js +54 -48
- package/src/hdcom/BillShow.vue +84 -63
- package/src/hdcom/BillUpload.vue +144 -86
- package/src/hdcom/BtnRight.vue +26 -23
- package/src/hdcom/ErrHint.vue +36 -24
- package/src/hdcom/ExtendColumn.vue +97 -90
- package/src/hdcom/ExtendCommon.js +24 -13
- package/src/hdcom/ExtendForm.vue +107 -80
- package/src/hdcom/FacePicUpload.vue +59 -50
- package/src/hdcom/FaceRecTest.vue +87 -77
- package/src/hdcom/GridChart.vue +175 -162
- package/src/hdcom/GridExField.vue +328 -234
- package/src/hdcom/GridShow.vue +89 -39
- package/src/hdcom/HdAside.vue +192 -145
- package/src/hdcom/HdBtn.vue +44 -32
- package/src/hdcom/HdButton.vue +141 -117
- package/src/hdcom/HdComFaceRec.vue +80 -32
- package/src/hdcom/HdComGrid.vue +329 -229
- package/src/hdcom/HdComQuery.vue +179 -90
- package/src/hdcom/HdComQueryDetail.vue +159 -115
- package/src/hdcom/HdComSortDetail.vue +136 -130
- package/src/hdcom/HdDatePicker.vue +32 -16
- package/src/hdcom/HdDialog.vue +62 -44
- package/src/hdcom/HdDrop.vue +163 -138
- package/src/hdcom/HdFileUpload.vue +138 -119
- package/src/hdcom/HdFilterBox.vue +62 -62
- package/src/hdcom/HdFooter.vue +152 -119
- package/src/hdcom/HdForm.vue +276 -203
- package/src/hdcom/HdFormBtn.vue +81 -39
- package/src/hdcom/HdFormItem.vue +14 -10
- package/src/hdcom/HdGrid.vue +353 -156
- package/src/hdcom/HdGridEditBtn.vue +34 -20
- package/src/hdcom/HdGridExt.js +78 -47
- package/src/hdcom/HdGridSel.vue +227 -193
- package/src/hdcom/HdHeader.vue +149 -117
- package/src/hdcom/HdHotKey.vue +70 -67
- package/src/hdcom/HdInputHint.vue +40 -36
- package/src/hdcom/HdMain.vue +25 -27
- package/src/hdcom/HdMessage.vue +180 -171
- package/src/hdcom/HdNum.vue +67 -57
- package/src/hdcom/HdPopSel.vue +46 -24
- package/src/hdcom/HdRightMenu.vue +63 -61
- package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
- package/src/hdcom/HdTableColumn.vue +156 -109
- package/src/hdcom/HdTempSave.vue +138 -116
- package/src/hdcom/HdTree.vue +89 -72
- package/src/hdcom/HdTreeTable/eval.js +8 -3
- package/src/hdcom/HdTreeTable/index.vue +229 -174
- package/src/hdcom/ImportExcel.vue +69 -34
- package/src/hdcom/index.js +39 -44
- package/src/idev.common.js +54 -47
- package/src/index.js +3 -6
- package/src/utils/HdQuery.js +25 -14
- package/src/utils/comutils.js +50 -28
- package/src/utils/gogocodeTransfer.js +59 -0
- package/src/utils/utils.js +30 -19
- package/src/vendor/Blob.js +187 -179
- package/src/vendor/Export2Excel.js +231 -220
- package/src/vendor/Export2Zip.js +25 -22
- package/src/views/layout/AppMain.vue +34 -32
- package/src/views/layout/HdLayout.vue +64 -52
- package/src/views/layout/header/ElasticSearch.vue +196 -159
- package/src/views/layout/header/HZRecorder.js +163 -135
- package/src/views/layout/header/HeaderSearch.vue +165 -145
- package/src/views/layout/header/Levelbar.vue +55 -49
- package/src/views/layout/header/MainHeader.vue +233 -189
- package/src/views/layout/header/Navbar.vue +74 -78
- package/src/views/layout/header/ScrollPane.vue +103 -81
- package/src/views/layout/header/TagsView.vue +169 -164
- package/src/views/layout/header/VocRec.vue +86 -78
- package/src/views/layout/header/changepswform.vue +98 -64
- package/src/views/layout/index.js +5 -7
- package/src/views/layout/menu/Hamburger.vue +63 -45
- package/src/views/layout/menu/HdMenu.vue +155 -118
- package/src/views/layout/menu/index.vue +21 -19
- package/src/views/privilege/commsg/commsg.vue +115 -41
- package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
- package/src/views/privilege/commsg/commsgRole.vue +180 -109
- package/src/views/privilege/commsg/commsgform.vue +125 -101
- package/src/views/privilege/commsg/commsgiframe.vue +30 -23
- package/src/views/privilege/commsg/commsgto.vue +163 -84
- package/src/views/privilege/commsg/commsgtoform.vue +64 -58
- package/src/views/privilege/commsg/commsgtrans.vue +187 -115
- package/src/views/privilege/exfield/comexcolumn.vue +133 -43
- package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
- package/src/views/privilege/exfield/comexfield.vue +15 -17
- package/src/views/privilege/exfield/comexfieldform.vue +71 -53
- package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
- package/src/views/privilege/index.js +19 -20
- package/src/views/privilege/menu/comMenu.vue +49 -41
- package/src/views/privilege/menu/menu.vue +166 -49
- package/src/views/privilege/menu/menuinfo.vue +41 -34
- package/src/views/privilege/menu/rolelist.vue +78 -33
- package/src/views/privilege/menu/userlist.vue +76 -33
- package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
- package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
- package/src/views/privilege/orgDept/authOrgn.vue +157 -65
- package/src/views/privilege/orgDept/authorgnform.vue +50 -38
- package/src/views/privilege/orgDept/orgDept.vue +38 -37
- package/src/views/privilege/orgDept/orgTree.vue +99 -88
- package/src/views/privilege/orgDept/orgnselect.vue +132 -111
- package/src/views/privilege/personDept/authuser.vue +197 -91
- package/src/views/privilege/personDept/authuserform.vue +123 -71
- package/src/views/privilege/personDept/facerec.vue +128 -83
- package/src/views/privilege/personDept/orgncascader.vue +134 -115
- package/src/views/privilege/personDept/personDept.vue +9 -7
- package/src/views/privilege/quartz/comquartzjob.vue +123 -38
- package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
- package/src/views/privilege/quartz/comquartzlog.vue +116 -32
- package/src/views/privilege/role/btnRole.vue +123 -67
- package/src/views/privilege/role/menuRole.vue +65 -45
- package/src/views/privilege/role/orgnRole.vue +63 -41
- package/src/views/privilege/role/role.vue +26 -9
- package/src/views/privilege/role/rolelist.vue +114 -45
- package/src/views/privilege/role/roleselect.vue +34 -17
- package/src/views/privilege/search/comsearch.vue +164 -73
- package/src/views/privilege/search/menu.vue +38 -22
- package/src/views/privilege/syscode/syscode.vue +157 -69
- package/src/views/privilege/syscode/sysfield.vue +96 -43
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
- package/src/views/privilege/syslog/menulog.vue +38 -22
- package/src/views/privilege/syslog/syslog.vue +145 -78
- package/src/views/privilege/syslog/syslogconfig.vue +91 -24
- package/src/views/privilege/syslog/syslogform.vue +45 -43
- package/src/views/privilege/syslog/syslogframe.vue +26 -26
- package/src/views/privilege/userRole/userRole.vue +187 -89
- package/vite.config.js +7 -0
- package/dist/assets/index.774ef40e.css +0 -1
- 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
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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=
|
|
3
|
-
<input
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
11
|
-
|
|
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
|
|
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
|
|
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)
|
|
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) {
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
161
|
+
#excel-upload-input {
|
|
162
|
+
display: none;
|
|
163
|
+
z-index: -9999;
|
|
164
|
+
}
|
|
130
165
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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>
|
package/src/hdcom/index.js
CHANGED
|
@@ -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
|
-
|
|
33
|
+
window.$vueApp.use(require('vue-shortkey'))
|
|
36
34
|
Vue._window = window
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|