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,78 +1,90 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div
|
|
3
|
+
:class="[{ hideSidebar: !sidebar.opened }, $store.state.user.skin]"
|
|
4
|
+
class="hd-layout app-wrapper"
|
|
5
|
+
v-if="!onlyContent"
|
|
6
|
+
>
|
|
7
|
+
<main-header
|
|
8
|
+
class="hd-header mainHeader"
|
|
9
|
+
v-if="$store.state.app.headerShow != false"
|
|
10
|
+
></main-header>
|
|
5
11
|
<div class="hd-content">
|
|
6
12
|
<hdmenu class="hd-menu sidebar-container"></hdmenu>
|
|
7
13
|
<div class="hd-main main-container">
|
|
8
14
|
<Navbar></Navbar>
|
|
9
|
-
<AppMain style="flex:1"></AppMain>
|
|
15
|
+
<AppMain style="flex: 1"></AppMain>
|
|
10
16
|
<slot></slot>
|
|
11
17
|
</div>
|
|
12
18
|
</div>
|
|
13
19
|
</div>
|
|
14
|
-
<app-main
|
|
20
|
+
<app-main
|
|
21
|
+
:class="[{ hideSidebar: !sidebar.opened }, $store.state.user.skin]"
|
|
22
|
+
class="app-wrapper"
|
|
23
|
+
v-else
|
|
24
|
+
></app-main>
|
|
15
25
|
</template>
|
|
16
26
|
|
|
17
27
|
<script>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
import Navbar from './header/Navbar'
|
|
29
|
+
import TagsView from './header/TagsView'
|
|
30
|
+
import MainHeader from './header/MainHeader'
|
|
31
|
+
import AppMain from './AppMain'
|
|
32
|
+
import hdmenu from './menu'
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
export default {
|
|
35
|
+
name: 'layout',
|
|
36
|
+
components: {
|
|
37
|
+
MainHeader,
|
|
38
|
+
Navbar,
|
|
39
|
+
hdmenu,
|
|
40
|
+
AppMain,
|
|
41
|
+
TagsView,
|
|
42
|
+
},
|
|
43
|
+
computed: {
|
|
44
|
+
sidebar() {
|
|
45
|
+
return this.$store.state.app.sidebar
|
|
32
46
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
onlyContent() {
|
|
48
|
+
return this.$route.query.onlycontent == 1
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
watch: {
|
|
52
|
+
'$store.state.user.skin': {
|
|
53
|
+
//弹窗的因为和#app平级,无法换肤
|
|
54
|
+
handler: function (newVal, oldVal) {
|
|
55
|
+
document.getElementsByTagName('body')[0].className = 'body-' + newVal
|
|
56
|
+
this.$emit('chgTheme', newVal)
|
|
36
57
|
},
|
|
37
|
-
|
|
38
|
-
return this.$route.query.onlycontent == 1
|
|
39
|
-
}
|
|
58
|
+
immediate: true,
|
|
40
59
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
handler: function (newVal, oldVal) {
|
|
44
|
-
document.getElementsByTagName('body')[0].className = 'body-' + newVal;
|
|
45
|
-
this.$emit("chgTheme", newVal)
|
|
46
|
-
},
|
|
47
|
-
immediate: true
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
60
|
+
},
|
|
61
|
+
}
|
|
51
62
|
</script>
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
|
|
64
|
+
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
65
|
+
.hd-layout {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
|
|
69
|
+
.hd-header {
|
|
70
|
+
height: 52px;
|
|
71
|
+
width: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.hd-content {
|
|
75
|
+
flex: 1;
|
|
54
76
|
display: flex;
|
|
55
|
-
flex-direction:
|
|
77
|
+
flex-direction: row;
|
|
56
78
|
|
|
57
|
-
.hd-
|
|
58
|
-
|
|
59
|
-
width: 100%
|
|
79
|
+
.hd-menu {
|
|
80
|
+
width: 50px;
|
|
60
81
|
}
|
|
61
82
|
|
|
62
|
-
.hd-
|
|
83
|
+
.hd-main {
|
|
63
84
|
flex: 1;
|
|
64
85
|
display: flex;
|
|
65
|
-
flex-direction:
|
|
66
|
-
|
|
67
|
-
.hd-menu {
|
|
68
|
-
width: 50px
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.hd-main {
|
|
72
|
-
flex: 1;
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
}
|
|
86
|
+
flex-direction: column;
|
|
76
87
|
}
|
|
77
88
|
}
|
|
89
|
+
}
|
|
78
90
|
</style>
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="{
|
|
3
|
-
<svg
|
|
4
|
-
|
|
2
|
+
<div :class="{ show: show }" class="header-search">
|
|
3
|
+
<svg
|
|
4
|
+
@click="click"
|
|
5
|
+
class="search-icon screenfull-svg"
|
|
6
|
+
height="32"
|
|
7
|
+
viewBox="-10 -10 150 150"
|
|
8
|
+
width="32"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
>
|
|
5
11
|
<path
|
|
6
|
-
d="M124.884 109.812L94.256 79.166c-.357-.357-.757-.629-1.129-.914a50.366 50.366 0 0 0 8.186-27.59C101.327 22.689 78.656 0 50.67 0 22.685 0 0 22.688 0 50.663c0 27.989 22.685 50.663 50.656 50.663 10.186 0 19.643-3.03 27.6-8.201.286.385.557.771.9 1.114l30.628 30.632a10.633 10.633 0 0 0 7.543 3.129c2.728 0 5.457-1.043 7.543-3.115 4.171-4.157 4.171-10.915.014-15.073M50.671 85.338C31.557 85.338 16 69.78 16 50.663c0-19.102 15.557-34.661 34.67-34.661 19.115 0 34.657 15.559 34.657 34.675 0 19.102-15.557 34.661-34.656 34.661"
|
|
12
|
+
d="M124.884 109.812L94.256 79.166c-.357-.357-.757-.629-1.129-.914a50.366 50.366 0 0 0 8.186-27.59C101.327 22.689 78.656 0 50.67 0 22.685 0 0 22.688 0 50.663c0 27.989 22.685 50.663 50.656 50.663 10.186 0 19.643-3.03 27.6-8.201.286.385.557.771.9 1.114l30.628 30.632a10.633 10.633 0 0 0 7.543 3.129c2.728 0 5.457-1.043 7.543-3.115 4.171-4.157 4.171-10.915.014-15.073M50.671 85.338C31.557 85.338 16 69.78 16 50.663c0-19.102 15.557-34.661 34.67-34.661 19.115 0 34.657 15.559 34.657 34.675 0 19.102-15.557 34.661-34.656 34.661"
|
|
13
|
+
/>
|
|
7
14
|
</svg>
|
|
8
15
|
<el-select
|
|
9
16
|
:placeholder="$t('菜单查询')"
|
|
@@ -16,152 +23,182 @@
|
|
|
16
23
|
remote
|
|
17
24
|
v-model="search"
|
|
18
25
|
>
|
|
19
|
-
<el-option-group
|
|
20
|
-
|
|
26
|
+
<el-option-group
|
|
27
|
+
:key="$t('检索菜单')"
|
|
28
|
+
:label="$t('检索菜单')"
|
|
29
|
+
v-if="options1.length > 0"
|
|
30
|
+
>
|
|
31
|
+
<el-option
|
|
32
|
+
:key="index"
|
|
33
|
+
:label="item.title.join(' > ')"
|
|
34
|
+
:value="item"
|
|
35
|
+
v-for="(item, index) in options1"
|
|
36
|
+
/>
|
|
21
37
|
</el-option-group>
|
|
22
|
-
<el-option-group
|
|
23
|
-
|
|
38
|
+
<el-option-group
|
|
39
|
+
:key="$t('更多结果')"
|
|
40
|
+
:label="$t('更多结果')"
|
|
41
|
+
v-if="options2.length > 0"
|
|
42
|
+
>
|
|
43
|
+
<el-option
|
|
44
|
+
:key="index"
|
|
45
|
+
:label="item.text"
|
|
46
|
+
:value="item"
|
|
47
|
+
v-for="(item, index) in options2"
|
|
48
|
+
/>
|
|
24
49
|
</el-option-group>
|
|
25
50
|
</el-select>
|
|
26
51
|
</div>
|
|
27
52
|
</template>
|
|
28
53
|
|
|
29
54
|
<script>
|
|
30
|
-
|
|
31
|
-
|
|
55
|
+
import Fuse from 'fuse.js'
|
|
56
|
+
import path from 'path'
|
|
32
57
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
export default {
|
|
59
|
+
name: 'ElasticSearch',
|
|
60
|
+
data() {
|
|
61
|
+
return {
|
|
62
|
+
search: '',
|
|
63
|
+
options1: [],
|
|
64
|
+
options2: [],
|
|
65
|
+
searchPool: [],
|
|
66
|
+
show: false,
|
|
67
|
+
fuse: undefined,
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
routes() {
|
|
72
|
+
return this.$store.state.permission.hdMenu
|
|
73
|
+
},
|
|
74
|
+
lang() {
|
|
75
|
+
return this.$store.getters.language
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
lang() {
|
|
80
|
+
this.searchPool = this.generateRoutes(this.routes)
|
|
81
|
+
},
|
|
82
|
+
routes() {
|
|
83
|
+
this.searchPool = this.generateRoutes(this.routes)
|
|
44
84
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
85
|
+
searchPool(list) {
|
|
86
|
+
this.initFuse(list)
|
|
87
|
+
},
|
|
88
|
+
show(value) {
|
|
89
|
+
if (value) {
|
|
90
|
+
document.body.addEventListener('click', this.close)
|
|
91
|
+
} else {
|
|
92
|
+
document.body.removeEventListener('click', this.close)
|
|
51
93
|
}
|
|
52
94
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
this.
|
|
62
|
-
},
|
|
63
|
-
show(value) {
|
|
64
|
-
if (value) {
|
|
65
|
-
document.body.addEventListener('click', this.close)
|
|
66
|
-
} else {
|
|
67
|
-
document.body.removeEventListener('click', this.close)
|
|
68
|
-
}
|
|
95
|
+
},
|
|
96
|
+
mounted() {
|
|
97
|
+
this.searchPool = this.generateRoutes(this.routes)
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
click() {
|
|
101
|
+
this.show = !this.show
|
|
102
|
+
if (this.show) {
|
|
103
|
+
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
|
|
69
104
|
}
|
|
70
105
|
},
|
|
71
|
-
|
|
72
|
-
this.
|
|
106
|
+
close() {
|
|
107
|
+
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
|
|
108
|
+
this.options1 = []
|
|
109
|
+
this.options2 = []
|
|
110
|
+
this.show = false
|
|
73
111
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
close() {
|
|
82
|
-
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
|
|
83
|
-
this.options1 = [];
|
|
84
|
-
this.options2 = [];
|
|
112
|
+
change(val) {
|
|
113
|
+
this.$router.push(val.path)
|
|
114
|
+
this.search = ''
|
|
115
|
+
this.options1 = []
|
|
116
|
+
this.options2 = []
|
|
117
|
+
this.$nextTick(() => {
|
|
85
118
|
this.show = false
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
shouldSort: true,
|
|
99
|
-
threshold: 0.4,
|
|
100
|
-
location: 0,
|
|
101
|
-
distance: 100,
|
|
102
|
-
maxPatternLength: 32,
|
|
103
|
-
minMatchCharLength: 1,
|
|
104
|
-
keys: [{
|
|
119
|
+
})
|
|
120
|
+
},
|
|
121
|
+
initFuse(list) {
|
|
122
|
+
this.fuse = new Fuse(list, {
|
|
123
|
+
shouldSort: true,
|
|
124
|
+
threshold: 0.4,
|
|
125
|
+
location: 0,
|
|
126
|
+
distance: 100,
|
|
127
|
+
maxPatternLength: 32,
|
|
128
|
+
minMatchCharLength: 1,
|
|
129
|
+
keys: [
|
|
130
|
+
{
|
|
105
131
|
name: 'title',
|
|
106
|
-
weight: 0.7
|
|
107
|
-
},
|
|
132
|
+
weight: 0.7,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
108
135
|
name: 'path',
|
|
109
|
-
weight: 0.3
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const data = {
|
|
124
|
-
path: path.resolve(basePath, router.path),
|
|
125
|
-
title: [...prefixTitle]
|
|
126
|
-
}
|
|
136
|
+
weight: 0.3,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
})
|
|
140
|
+
},
|
|
141
|
+
// Filter out the routes that can be displayed in the sidebar
|
|
142
|
+
// And generate the internationalized title
|
|
143
|
+
generateRoutes(routes, basePath = '/', prefixTitle = []) {
|
|
144
|
+
let res = []
|
|
145
|
+
for (const router of routes) {
|
|
146
|
+
// skip hidden router
|
|
147
|
+
if (router.hidden) {
|
|
148
|
+
continue
|
|
149
|
+
}
|
|
127
150
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
151
|
+
const data = {
|
|
152
|
+
path: path.resolve(basePath, router.path),
|
|
153
|
+
title: [...prefixTitle],
|
|
154
|
+
}
|
|
131
155
|
|
|
132
|
-
|
|
156
|
+
if (router.meta && router.meta.title) {
|
|
157
|
+
// generate internationalized title
|
|
158
|
+
const i18ntitle =
|
|
159
|
+
this.$i18n.locale == 'zh' ? router.meta.title : router.meta.enTitle
|
|
133
160
|
|
|
134
|
-
|
|
135
|
-
// only push the routes with title
|
|
136
|
-
// special case: need to exclude parent router without redirect
|
|
137
|
-
res.push(data)
|
|
138
|
-
}
|
|
139
|
-
}
|
|
161
|
+
data.title = [...data.title, i18ntitle]
|
|
140
162
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
res = [...res, ...tempRoutes]
|
|
146
|
-
}
|
|
163
|
+
if (router.redirect !== 'noredirect') {
|
|
164
|
+
// only push the routes with title
|
|
165
|
+
// special case: need to exclude parent router without redirect
|
|
166
|
+
res.push(data)
|
|
147
167
|
}
|
|
148
168
|
}
|
|
149
169
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
// recursive child routes
|
|
171
|
+
if (router.children) {
|
|
172
|
+
const tempRoutes = this.generateRoutes(
|
|
173
|
+
router.children,
|
|
174
|
+
data.path,
|
|
175
|
+
data.title
|
|
176
|
+
)
|
|
177
|
+
if (tempRoutes.length >= 1) {
|
|
178
|
+
res = [...res, ...tempRoutes]
|
|
179
|
+
}
|
|
157
180
|
}
|
|
181
|
+
}
|
|
158
182
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
183
|
+
return res
|
|
184
|
+
},
|
|
185
|
+
querySearch(query) {
|
|
186
|
+
if (query !== '') {
|
|
187
|
+
this.options1 = this.fuse.search(query)
|
|
188
|
+
} else {
|
|
189
|
+
this.options1 = []
|
|
190
|
+
}
|
|
162
191
|
|
|
163
|
-
|
|
164
|
-
|
|
192
|
+
if (this.$store.state.app.elsearch) {
|
|
193
|
+
//
|
|
194
|
+
this.options2 = [{ text: this.$t('加载中...') }]
|
|
195
|
+
this.$http
|
|
196
|
+
.get(
|
|
197
|
+
`/webresources/login/com/ComSearch/search?q=${query}&type=${this.$i18n.locale}`
|
|
198
|
+
)
|
|
199
|
+
.then((response) => {
|
|
200
|
+
this.options2 = []
|
|
201
|
+
response.data.forEach((v) => {
|
|
165
202
|
let t = v.menuPath.reverse().join('=>')
|
|
166
203
|
if (this.$i18n.locale == 'en') {
|
|
167
204
|
t = v.menuEnPath.reverse().join('=>')
|
|
@@ -169,57 +206,57 @@
|
|
|
169
206
|
|
|
170
207
|
this.options2.push({
|
|
171
208
|
path: '/' + v.menuUrl + '?q=' + query,
|
|
172
|
-
text: t + '=>' + v.content
|
|
209
|
+
text: t + '=>' + v.content,
|
|
173
210
|
})
|
|
174
211
|
})
|
|
175
212
|
})
|
|
176
|
-
}
|
|
177
213
|
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
}
|
|
180
217
|
</script>
|
|
181
218
|
|
|
182
219
|
<style lang="scss" scoped>
|
|
183
|
-
|
|
184
|
-
|
|
220
|
+
.header-search {
|
|
221
|
+
font-size: 0 !important;
|
|
185
222
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
223
|
+
.search-icon {
|
|
224
|
+
font-size: 18px;
|
|
225
|
+
vertical-align: middle;
|
|
226
|
+
display: inline-block;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
fill: #e4e9ef;
|
|
229
|
+
/* width: 20px;
|
|
193
230
|
height: 20px;
|
|
194
231
|
vertical-align: 10px;*/
|
|
195
|
-
|
|
232
|
+
}
|
|
196
233
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
234
|
+
.header-search-select {
|
|
235
|
+
font-size: 18px;
|
|
236
|
+
transition: width 0.2s;
|
|
237
|
+
width: 0;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
background: transparent;
|
|
240
|
+
border-radius: 0;
|
|
241
|
+
display: inline-block;
|
|
242
|
+
vertical-align: middle;
|
|
243
|
+
|
|
244
|
+
:deep(.el-input__inner) {
|
|
203
245
|
border-radius: 0;
|
|
204
|
-
|
|
246
|
+
border: 0;
|
|
247
|
+
padding-left: 0;
|
|
248
|
+
padding-right: 0;
|
|
249
|
+
box-shadow: none !important;
|
|
250
|
+
border-bottom: 1px solid #d9d9d9;
|
|
205
251
|
vertical-align: middle;
|
|
206
|
-
|
|
207
|
-
:deep(.el-input__inner) {
|
|
208
|
-
border-radius: 0;
|
|
209
|
-
border: 0;
|
|
210
|
-
padding-left: 0;
|
|
211
|
-
padding-right: 0;
|
|
212
|
-
box-shadow: none !important;
|
|
213
|
-
border-bottom: 1px solid #d9d9d9;
|
|
214
|
-
vertical-align: middle;
|
|
215
|
-
}
|
|
216
252
|
}
|
|
253
|
+
}
|
|
217
254
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
255
|
+
&.show {
|
|
256
|
+
.header-search-select {
|
|
257
|
+
width: 150px;
|
|
258
|
+
margin-left: 10px;
|
|
223
259
|
}
|
|
224
260
|
}
|
|
261
|
+
}
|
|
225
262
|
</style>
|