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.
- 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 +3 -1
- 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,96 +1,130 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
2
|
<el-dialog title="修改密码" :visible.sync="visiable">
|
|
4
|
-
<el-form
|
|
3
|
+
<el-form
|
|
4
|
+
label-width="100px"
|
|
5
|
+
:model="hdform"
|
|
6
|
+
ref="hdform"
|
|
7
|
+
:rules="checkRules"
|
|
8
|
+
>
|
|
5
9
|
<el-row>
|
|
6
10
|
<el-col :span="24">
|
|
7
11
|
<el-form-item label="旧密码" prop="oldPassword">
|
|
8
|
-
<el-input
|
|
12
|
+
<el-input
|
|
13
|
+
type="text"
|
|
14
|
+
v-model="hdform.oldPassword"
|
|
15
|
+
placeholder="请输入旧密码"
|
|
16
|
+
>
|
|
9
17
|
</el-input>
|
|
10
18
|
</el-form-item>
|
|
11
19
|
</el-col>
|
|
12
20
|
<el-col :span="24">
|
|
13
21
|
<el-form-item label="新密码" prop="newPassword">
|
|
14
|
-
<el-input
|
|
22
|
+
<el-input
|
|
23
|
+
type="password"
|
|
24
|
+
v-model="hdform.newPassword"
|
|
25
|
+
placeholder="请输入密码"
|
|
26
|
+
autocomplete="new-password"
|
|
27
|
+
>
|
|
15
28
|
</el-input>
|
|
16
29
|
</el-form-item>
|
|
17
30
|
</el-col>
|
|
18
31
|
<el-col :span="24">
|
|
19
32
|
<el-form-item label="重复确认" prop="passwordTemp">
|
|
20
|
-
<el-input
|
|
33
|
+
<el-input
|
|
34
|
+
type="password"
|
|
35
|
+
v-model="hdform.passwordTemp"
|
|
36
|
+
placeholder="请重复输入密码"
|
|
37
|
+
autocomplete="new-password"
|
|
38
|
+
>
|
|
21
39
|
</el-input>
|
|
22
40
|
</el-form-item>
|
|
23
41
|
</el-col>
|
|
24
42
|
</el-row>
|
|
25
43
|
</el-form>
|
|
26
44
|
<div slot="footer" class="dialog-footer">
|
|
27
|
-
<el-button @click="visiable = false">{{$t('取 消')}}</el-button>
|
|
28
|
-
<el-button type="primary" @click="doRegist" :loading="loading">
|
|
45
|
+
<el-button @click="visiable = false">{{ $t('取 消') }}</el-button>
|
|
46
|
+
<el-button type="primary" @click="doRegist" :loading="loading">
|
|
47
|
+
{{ $t('确 定') }}</el-button
|
|
48
|
+
>
|
|
29
49
|
</div>
|
|
30
50
|
</el-dialog>
|
|
31
|
-
|
|
32
51
|
</template>
|
|
33
52
|
|
|
34
53
|
<script>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const validatePasswordSame = (rule, value, callback) => {
|
|
46
|
-
if (this.hdform.newPassword !== this.hdform.passwordTemp) {
|
|
47
|
-
callback(new Error(this.$t('两次输入密码不一致')))
|
|
48
|
-
} else {
|
|
49
|
-
callback()
|
|
50
|
-
}
|
|
54
|
+
export default {
|
|
55
|
+
name: 'registform',
|
|
56
|
+
data() {
|
|
57
|
+
const validatePassword = (rule, value, callback) => {
|
|
58
|
+
if (!value || value.length < 2) {
|
|
59
|
+
callback(new Error(this.$t('密码不能小于2位')))
|
|
60
|
+
} else {
|
|
61
|
+
callback()
|
|
51
62
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
oldPassword: [{ required: true, trigger: 'change', validator: validatePassword }],
|
|
59
|
-
newPassword: [{ required: true, trigger: 'change', validator: validatePassword }],
|
|
60
|
-
passwordTemp: [{ required: true, trigger: 'change', validator: validatePasswordSame }]
|
|
61
|
-
}
|
|
63
|
+
}
|
|
64
|
+
const validatePasswordSame = (rule, value, callback) => {
|
|
65
|
+
if (this.hdform.newPassword !== this.hdform.passwordTemp) {
|
|
66
|
+
callback(new Error(this.$t('两次输入密码不一致')))
|
|
67
|
+
} else {
|
|
68
|
+
callback()
|
|
62
69
|
}
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
hdform: {},
|
|
73
|
+
visiable: false,
|
|
74
|
+
tsLoading: false,
|
|
75
|
+
loading: false,
|
|
76
|
+
checkRules: {
|
|
77
|
+
oldPassword: [
|
|
78
|
+
{ required: true, trigger: 'change', validator: validatePassword },
|
|
79
|
+
],
|
|
80
|
+
newPassword: [
|
|
81
|
+
{ required: true, trigger: 'change', validator: validatePassword },
|
|
82
|
+
],
|
|
83
|
+
passwordTemp: [
|
|
84
|
+
{
|
|
85
|
+
required: true,
|
|
86
|
+
trigger: 'change',
|
|
87
|
+
validator: validatePasswordSame,
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
show() {
|
|
95
|
+
this.visiable = true
|
|
63
96
|
},
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
this.$
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
this.visiable = false
|
|
97
|
+
doRegist() {
|
|
98
|
+
this.$refs['hdform'].validate((valid) => {
|
|
99
|
+
if (!valid) {
|
|
100
|
+
return false
|
|
101
|
+
}
|
|
102
|
+
if (this.hdform.passwordTemp !== this.hdform.newPassword) {
|
|
103
|
+
this.$alert(this.$t('两次密码输入不一致'), this.$t('错误'))
|
|
104
|
+
return false
|
|
105
|
+
}
|
|
106
|
+
this.loading = true
|
|
107
|
+
this.$http
|
|
108
|
+
.post(
|
|
109
|
+
'/webresources/login/privilege/AuthUser/modifyPasswordVue?oldPassword=' +
|
|
110
|
+
this.hdform.oldPassword +
|
|
111
|
+
'&newPassword=' +
|
|
112
|
+
this.hdform.newPassword
|
|
113
|
+
)
|
|
114
|
+
.then((response) => {
|
|
115
|
+
this.loading = false
|
|
116
|
+
const data = response.data
|
|
117
|
+
this.$message({
|
|
118
|
+
type: data.code === '-1' ? 'error' : 'success',
|
|
119
|
+
message: data.message,
|
|
90
120
|
})
|
|
121
|
+
if (data.code === '-1') {
|
|
122
|
+
return
|
|
123
|
+
}
|
|
124
|
+
this.visiable = false
|
|
91
125
|
})
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
126
|
+
})
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
}
|
|
95
130
|
</script>
|
|
96
|
-
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import HdLayout from './HdLayout'
|
|
2
2
|
import HdSearch from './header/HeaderSearch'
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
export default {
|
|
6
|
-
install(Vue) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
install(Vue) {
|
|
6
|
+
//布局,包括菜单,多任务tag,用户设置等
|
|
7
|
+
window.$vueApp.component('HdLayout', HdLayout)
|
|
8
|
+
window.$vueApp.component('HdSearch', HdSearch)
|
|
9
|
+
},
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
@@ -1,45 +1,63 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span>
|
|
3
|
-
<svg
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<span>
|
|
3
|
+
<svg
|
|
4
|
+
t="1492500959545"
|
|
5
|
+
@click="toggleClick"
|
|
6
|
+
class="wscn-icon hamburger"
|
|
7
|
+
:class="{ 'is-active': isActive }"
|
|
8
|
+
style=""
|
|
9
|
+
viewBox="0 0 1024 1024"
|
|
10
|
+
version="1.1"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
p-id="1691"
|
|
13
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
14
|
+
width="64"
|
|
15
|
+
height="64"
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z"
|
|
19
|
+
p-id="1692"
|
|
20
|
+
></path>
|
|
21
|
+
<path
|
|
22
|
+
d="M966.8023 881.527125 57.196677 881.527125c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 856.07443 998.200404 881.527125 966.8023 881.527125z"
|
|
23
|
+
p-id="1693"
|
|
24
|
+
></path>
|
|
25
|
+
<path
|
|
26
|
+
d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z"
|
|
27
|
+
p-id="1694"
|
|
28
|
+
></path>
|
|
29
|
+
</svg>
|
|
30
|
+
</span>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
name: 'hamburger',
|
|
36
|
+
props: {
|
|
37
|
+
isActive: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
toggleClick: {
|
|
42
|
+
type: Function,
|
|
43
|
+
default: null,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style scoped>
|
|
50
|
+
.hamburger {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
width: 20px;
|
|
54
|
+
height: 20px;
|
|
55
|
+
transform: rotate(90deg);
|
|
56
|
+
transition: 0.38s;
|
|
57
|
+
transform-origin: 30% 50%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.hamburger.is-active {
|
|
61
|
+
transform: rotate(0deg);
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
@@ -1,39 +1,70 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div class="menuSvg" ref="menuSvg">
|
|
4
|
-
<hamburger
|
|
4
|
+
<hamburger
|
|
5
|
+
:isActive="sidebar.opened"
|
|
6
|
+
:toggleClick="toggleSideBar"
|
|
7
|
+
class="hamburger-container"
|
|
8
|
+
></hamburger>
|
|
5
9
|
</div>
|
|
6
10
|
<div class="product_sort">
|
|
7
|
-
<el-scrollbar ref="scrollbar" style="height: 100
|
|
11
|
+
<el-scrollbar ref="scrollbar" style="height: 100%">
|
|
8
12
|
<div class="bd">
|
|
9
|
-
<div
|
|
10
|
-
|
|
13
|
+
<div
|
|
14
|
+
@mouseleave="mouseLeave($event)"
|
|
15
|
+
@mouseover="mouseOver($event)"
|
|
16
|
+
class="item"
|
|
17
|
+
v-for="(item, index) in routes"
|
|
18
|
+
>
|
|
11
19
|
<div class="title" v-show="$store.state.app.sidebar.opened">
|
|
12
20
|
<a href="javascript:void(0)">
|
|
13
|
-
<i
|
|
14
|
-
|
|
21
|
+
<i
|
|
22
|
+
:class="item.meta.icon"
|
|
23
|
+
style="display: inline"
|
|
24
|
+
v-if="item.meta && item.meta.icon"
|
|
25
|
+
></i>
|
|
26
|
+
<span v-if="item.meta && item.meta.title">{{
|
|
27
|
+
generateTitle(item.meta)
|
|
28
|
+
}}</span>
|
|
15
29
|
<!--<span>{{item.meta.title}}</span>-->
|
|
16
30
|
</a>
|
|
17
31
|
</div>
|
|
18
32
|
<div class="arrow" v-if="$store.state.app.sidebar.opened">></div>
|
|
19
|
-
<div class="arrow" v-else
|
|
20
|
-
|
|
33
|
+
<div class="arrow" v-else>
|
|
34
|
+
<i
|
|
35
|
+
:class="item.meta.icon"
|
|
36
|
+
style="color: #494949"
|
|
37
|
+
v-if="item.meta && item.meta.icon"
|
|
38
|
+
></i>
|
|
39
|
+
</div>
|
|
21
40
|
<div class="line"></div>
|
|
22
41
|
<div class="subitem">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<div class="inner" v-for="itemTwo,indexTwo in item.children">
|
|
42
|
+
<template v-if="item.children && item.children.length > 0">
|
|
43
|
+
<div class="inner" v-for="(itemTwo, indexTwo) in item.children">
|
|
26
44
|
<div class="tit tit1">
|
|
27
|
-
<div class="name" v-if="itemTwo.meta&&itemTwo.meta.title">
|
|
28
|
-
<i
|
|
29
|
-
|
|
45
|
+
<div class="name" v-if="itemTwo.meta && itemTwo.meta.title">
|
|
46
|
+
<i
|
|
47
|
+
:class="itemTwo.meta.icon"
|
|
48
|
+
style="display: inline"
|
|
49
|
+
v-if="itemTwo.meta.icon"
|
|
50
|
+
></i>
|
|
51
|
+
{{ generateTitle(itemTwo.meta) }}
|
|
30
52
|
</div>
|
|
31
53
|
<ul>
|
|
32
|
-
<li
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
54
|
+
<li
|
|
55
|
+
@click="clickOne(itemThree)"
|
|
56
|
+
v-for="(itemThree, indexThree) in itemTwo.children"
|
|
57
|
+
>
|
|
58
|
+
<a
|
|
59
|
+
href="javascript:void(0)"
|
|
60
|
+
v-if="itemThree.meta && itemThree.meta.title"
|
|
61
|
+
>
|
|
62
|
+
<i
|
|
63
|
+
:class="itemThree.meta.icon"
|
|
64
|
+
style="display: inline"
|
|
65
|
+
v-if="itemThree.meta.icon"
|
|
66
|
+
></i>
|
|
67
|
+
{{ generateTitle(itemThree.meta) }}
|
|
37
68
|
</a>
|
|
38
69
|
</li>
|
|
39
70
|
</ul>
|
|
@@ -47,121 +78,127 @@
|
|
|
47
78
|
</div>
|
|
48
79
|
</div>
|
|
49
80
|
</template>
|
|
81
|
+
|
|
50
82
|
<script>
|
|
51
|
-
|
|
52
|
-
|
|
83
|
+
import { mapGetters } from 'vuex'
|
|
84
|
+
import Hamburger from './Hamburger'
|
|
53
85
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
86
|
+
export default {
|
|
87
|
+
name: 'SidebarItem',
|
|
88
|
+
components: {
|
|
89
|
+
Hamburger,
|
|
90
|
+
},
|
|
91
|
+
props: {
|
|
92
|
+
routes: {
|
|
93
|
+
type: Array,
|
|
58
94
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
95
|
+
},
|
|
96
|
+
data() {
|
|
97
|
+
return {
|
|
98
|
+
menuVisitUrl: '',
|
|
99
|
+
menuSelUrl: '',
|
|
100
|
+
isShow: false,
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
mounted() {},
|
|
104
|
+
methods: {
|
|
105
|
+
generateTitle(meta) {
|
|
106
|
+
if (this.$i18n.locale == 'zh') {
|
|
107
|
+
return meta.title //i18n wxl
|
|
108
|
+
} else {
|
|
109
|
+
return meta.enTitle //
|
|
62
110
|
}
|
|
111
|
+
//return this.$t('route.' + title)
|
|
63
112
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
menuSelUrl: "",
|
|
68
|
-
isShow: false
|
|
113
|
+
mouseOver(e) {
|
|
114
|
+
if (this.isShow == true) {
|
|
115
|
+
return
|
|
69
116
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
let subcls = e.currentTarget.getElementsByClassName('subitem')[0]
|
|
90
|
-
e.currentTarget.classList.add('layer')
|
|
91
|
-
subcls.style.left = e.currentTarget.offsetWidth - 10 + "px";
|
|
92
|
-
subcls.style.position = 'fixed'
|
|
93
|
-
subcls.style.overflow = 'auto'
|
|
94
|
-
//距离页面顶的距离
|
|
95
|
-
let itemTop = e.currentTarget.offsetTop - this.$refs.scrollbar.wrap.scrollTop + outerheight + this.$refs.menuSvg.clientHeight
|
|
96
|
-
let menuHeight = subcls.clientHeight;
|
|
97
|
-
let windowHeigth = document.body.clientHeight;
|
|
98
|
-
if ((itemTop + menuHeight) > windowHeigth) {
|
|
99
|
-
if (itemTop + +e.currentTarget.clientHeight - menuHeight < 0) {
|
|
100
|
-
subcls.style.top = '0px'
|
|
101
|
-
subcls.style.bottom = '0px'
|
|
102
|
-
} else {
|
|
103
|
-
subcls.style.top = itemTop + e.currentTarget.clientHeight - menuHeight + "px";
|
|
104
|
-
// subcls.style.bottom = '0px'
|
|
105
|
-
}
|
|
117
|
+
let outerheight =
|
|
118
|
+
document.getElementsByClassName('hd-header')[0].clientHeight
|
|
119
|
+
let subcls = e.currentTarget.getElementsByClassName('subitem')[0]
|
|
120
|
+
e.currentTarget.classList.add('layer')
|
|
121
|
+
subcls.style.left = e.currentTarget.offsetWidth - 10 + 'px'
|
|
122
|
+
subcls.style.position = 'fixed'
|
|
123
|
+
subcls.style.overflow = 'auto'
|
|
124
|
+
//距离页面顶的距离
|
|
125
|
+
let itemTop =
|
|
126
|
+
e.currentTarget.offsetTop -
|
|
127
|
+
this.$refs.scrollbar.wrap$.scrollTop +
|
|
128
|
+
outerheight +
|
|
129
|
+
this.$refs.menuSvg.clientHeight
|
|
130
|
+
let menuHeight = subcls.clientHeight
|
|
131
|
+
let windowHeigth = document.body.clientHeight
|
|
132
|
+
if (itemTop + menuHeight > windowHeigth) {
|
|
133
|
+
if (itemTop + +e.currentTarget.clientHeight - menuHeight < 0) {
|
|
134
|
+
subcls.style.top = '0px'
|
|
135
|
+
subcls.style.bottom = '0px'
|
|
106
136
|
} else {
|
|
107
|
-
subcls.style.top =
|
|
137
|
+
subcls.style.top =
|
|
138
|
+
itemTop + e.currentTarget.clientHeight - menuHeight + 'px'
|
|
108
139
|
// subcls.style.bottom = '0px'
|
|
109
140
|
}
|
|
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
|
-
|
|
141
|
+
} else {
|
|
142
|
+
subcls.style.top = itemTop + 'px'
|
|
143
|
+
// subcls.style.bottom = '0px'
|
|
144
|
+
}
|
|
145
|
+
this.isShow = true
|
|
146
|
+
},
|
|
147
|
+
mouseLeave(e) {
|
|
148
|
+
this.isShow = false
|
|
149
|
+
e.currentTarget.classList.remove('layer')
|
|
150
|
+
},
|
|
151
|
+
clickOne(item) {
|
|
152
|
+
if (!item.path && !item.redirect) {
|
|
153
|
+
return false
|
|
154
|
+
}
|
|
155
|
+
let obj = {
|
|
156
|
+
path: item.path ? item.path : item.url,
|
|
157
|
+
menuId: item.menuId,
|
|
158
|
+
title: item.meta.title,
|
|
159
|
+
}
|
|
160
|
+
//记录菜单点击
|
|
161
|
+
this.$http
|
|
162
|
+
.post('/webresources/login/com/ComMenuHistory/menuClick', obj)
|
|
163
|
+
.then((response) => {
|
|
164
|
+
this.menuSelUrl = this.menuVisitUrl
|
|
165
|
+
})
|
|
166
|
+
if (item.meta.type === '2') {
|
|
167
|
+
if (item.redirect) {
|
|
168
|
+
window.open(item.redirect, '_blank')
|
|
136
169
|
} else {
|
|
137
|
-
this.$router.
|
|
170
|
+
let routeData = this.$router.resolve({
|
|
138
171
|
name: item.name,
|
|
139
|
-
params: item.meta.addQuery
|
|
140
|
-
})
|
|
172
|
+
params: item.meta.addQuery,
|
|
173
|
+
})
|
|
174
|
+
window.open(routeData.href, '_blank')
|
|
141
175
|
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
176
|
+
} else {
|
|
177
|
+
this.$router.push({
|
|
178
|
+
name: item.name,
|
|
179
|
+
params: item.meta.addQuery,
|
|
180
|
+
})
|
|
181
|
+
}
|
|
146
182
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
'sidebar',
|
|
150
|
-
])
|
|
183
|
+
toggleSideBar() {
|
|
184
|
+
this.$store.dispatch('toggleSideBar')
|
|
151
185
|
},
|
|
152
|
-
}
|
|
153
|
-
|
|
186
|
+
},
|
|
187
|
+
computed: {
|
|
188
|
+
...mapGetters(['sidebar']),
|
|
189
|
+
},
|
|
190
|
+
}
|
|
154
191
|
</script>
|
|
192
|
+
|
|
155
193
|
<style lang="scss" scoped>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
194
|
+
@import 'css/menu.css'; // normalize.css 样式格式化
|
|
195
|
+
.product_sort {
|
|
196
|
+
:deep(.el-scrollbar__wrap) {
|
|
197
|
+
overflow-x: hidden;
|
|
198
|
+
}
|
|
161
199
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
200
|
+
:deep(.is-horizontal) {
|
|
201
|
+
height: 0;
|
|
165
202
|
}
|
|
203
|
+
}
|
|
166
204
|
</style>
|
|
167
|
-
|