qj-common 4.3.0 → 4.3.2
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/.babelrc +12 -12
- package/.eslintrc.js +25 -25
- package/.idea/common.iml +11 -11
- package/.idea/modules.xml +7 -7
- package/.idea/vcs.xml +5 -5
- package/.postcssrc.js +9 -9
- package/.prettierrc.js +7 -7
- package/.project +37 -37
- package/README.md +2 -2
- package/gulpfile.js +20 -20
- package/package.json +18 -18
- package/src/api/apimanage.js +146 -146
- package/src/api/common/index.js +192 -192
- package/src/api/login.js +160 -160
- package/src/api/shopFbu.js +515 -515
- package/src/api/upload.js +8 -8
- package/src/components/Bounced/index.vue +145 -145
- package/src/components/Breadcrumb/index.vue +71 -71
- package/src/components/Checkbox/index.vue +53 -53
- package/src/components/Hamburger/index.vue +48 -48
- package/src/components/Logistics/logic.vue +186 -186
- package/src/components/ScrollBar/index.vue +60 -60
- package/src/components/Sticky/index.vue +76 -76
- package/src/components/SvgIcon/index.vue +42 -42
- package/src/components/ThemePicker/index.vue +243 -243
- package/src/components/Tinymce/components/editorImage.vue +94 -94
- package/src/components/Tinymce/index.vue +166 -166
- package/src/components/Tinymce/plugins.js +7 -7
- package/src/components/Tinymce/toolbar.js +6 -6
- package/src/components/TreeTable/customEval.js +44 -44
- package/src/components/TreeTable/eval.js +29 -29
- package/src/components/TreeTable/index.vue +124 -124
- package/src/components/TreeTable/readme.md +89 -89
- package/src/components/TreeTableApi/customEval.js +49 -49
- package/src/components/TreeTableApi/eval.js +29 -29
- package/src/components/TreeTableApi/index.vue +124 -124
- package/src/components/TreeTableApi/readme.md +89 -89
- package/src/components/Upload/singleImage.vue +123 -123
- package/src/components/Upload/singleImage2.vue +118 -118
- package/src/components/Upload/singleImage3.vue +138 -138
- package/src/components/Upload/upload.vue +295 -295
- package/src/components/workOrderList/index.vue +158 -158
- package/src/dependencies.js +119 -119
- package/src/iconShop/demo.css +539 -539
- package/src/iconShop/demo_index.html +8445 -8445
- package/src/iconShop/iconfont.css +1451 -1451
- package/src/iconShop/iconfont.json +2522 -2522
- package/src/iconShop/iconfont.svg +1070 -1070
- package/src/iconfont/demo.css +539 -539
- package/src/iconfont/demo_index.html +5276 -5276
- package/src/iconfont/iconfont.css +905 -905
- package/src/iconfont/iconfont.json +1563 -1563
- package/src/iconfont/iconfont.svg +692 -692
- package/src/icons/index.js +9 -9
- package/src/lang/e.js +48 -48
- package/src/lang/en.js +48 -48
- package/src/lang/zh.js +48 -48
- package/src/main.js +62 -62
- package/src/permission.js +283 -283
- package/src/permissionForMall.backup.js +375 -375
- package/src/permissionForMall.js +375 -375
- package/src/preset.js +67 -67
- package/src/router/_import_common.js +1 -1
- package/src/router/_import_development.js +1 -1
- package/src/router/_import_production.js +1 -1
- package/src/store/getters.js +39 -39
- package/src/store/index.js +18 -18
- package/src/store/modules/app.js +34 -30
- package/src/store/modules/menu.js +82 -82
- package/src/store/modules/user.js +227 -227
- package/src/styles/element-ui.scss +1368 -1368
- package/src/styles/index.scss +166 -166
- package/src/styles/mixin.scss +27 -27
- package/src/styles/pc-ui.scss +1031 -1031
- package/src/styles/scrollBar.scss +21 -21
- package/src/styles/sidebar.scss +123 -123
- package/src/styles/transition.scss +32 -32
- package/src/styles/variables.scss +44 -44
- package/src/styles/wf-ui.scss +86 -86
- package/src/utils/auth.js +57 -57
- package/src/utils/dom.js +12 -12
- package/src/utils/getQueryString.js +5 -5
- package/src/utils/import.js +5 -5
- package/src/utils/index.js +355 -355
- package/src/utils/interceptor.js +34 -34
- package/src/utils/menu.js +116 -116
- package/src/utils/proapp.js +35 -35
- package/src/utils/query.js +26 -26
- package/src/utils/request.js +366 -366
- package/src/utils/routeMapping.js +39 -39
- package/src/utils/routeMapping.json +310 -310
- package/src/utils/utils.js +84 -84
- package/src/utils/validate.js +102 -102
- package/src/views/404.vue +72 -72
- package/src/views/Layout.vue +106 -106
- package/src/views/imgSwiper/index.vue +34 -34
- package/src/views/layout/Layout.vue +181 -170
- package/src/views/layout/components/AppMain.vue +20 -20
- package/src/views/layout/components/Footer.vue +22 -22
- package/src/views/layout/components/LeftNavbar.vue +318 -310
- package/src/views/layout/components/NavMenu.vue +15 -15
- package/src/views/layout/components/Navbar.vue +664 -661
- package/src/views/layout/components/Sidebar/SidebarItem.vue +116 -113
- package/src/views/layout/components/Sidebar/index.vue +203 -193
- package/src/views/layout/components/index.js +19 -19
- package/src/views/layout/theme/darkBlue/Layout.vue +140 -140
- package/src/views/layout/theme/darkBlue/components/AppMain.vue +38 -38
- package/src/views/layout/theme/darkBlue/components/Footer.vue +147 -147
- package/src/views/layout/theme/darkBlue/components/LeftNavbar(/345/261/225/347/244/272/345/205/250/351/203/250/350/217/234/345/215/225).vue +448 -448
- package/src/views/layout/theme/darkBlue/components/LeftNavbar.3.vue +191 -191
- package/src/views/layout/theme/darkBlue/components/LeftNavbar.vue +466 -466
- package/src/views/layout/theme/darkBlue/components/Navbar.vue +200 -200
- package/src/views/layout/theme/darkBlue/components/Sidebar/SidebarItem.vue +71 -71
- package/src/views/layout/theme/darkBlue/components/Sidebar/index.vue +49 -49
- package/src/views/layout/theme/darkBlue/components/index.js +15 -15
- package/src/views/layout-default/Layout.vue +134 -134
- package/src/views/layout-default/components/AppMain.vue +19 -19
- package/src/views/layout-default/components/Footer.vue +22 -22
- package/src/views/layout-default/components/LeftNavbar.vue +164 -164
- package/src/views/layout-default/components/Navbar.vue +295 -295
- package/src/views/layout-default/components/Sidebar/SidebarItem.vue +67 -67
- package/src/views/layout-default/components/Sidebar/index.vue +59 -59
- package/src/views/layout-default/components/index.js +4 -4
- package/src/views/layout-default/theme/darkBlue/Layout.vue +140 -140
- package/src/views/layout-default/theme/darkBlue/components/AppMain.vue +38 -38
- package/src/views/layout-default/theme/darkBlue/components/Footer.vue +147 -147
- package/src/views/layout-default/theme/darkBlue/components/LeftNavbar.vue +465 -465
- package/src/views/layout-default/theme/darkBlue/components/Navbar.vue +200 -200
- package/src/views/layout-default/theme/darkBlue/components/Sidebar/SidebarItem.vue +69 -69
- package/src/views/layout-default/theme/darkBlue/components/Sidebar/index.vue +49 -49
- package/src/views/layout-default/theme/darkBlue/components/index.js +15 -15
- package/src/views/pc/Internationalization.vue +80 -80
- package/src/views/pc/default/Layout.vue +442 -442
- package/src/views/pc/default/LayoutCard.vue +424 -424
- package/src/views/pc/default/assets/flex.scss +99 -99
- package/src/views/pc/default/footer-modules/DgFooter/index.vue +179 -179
- package/src/views/pc/default/footer-modules/DgFooter/indexSDX.vue +187 -187
- package/src/views/pc/default/footer-modules/footer.vue +171 -171
- package/src/views/pc/default/footer-modules/footerAns.vue +167 -167
- package/src/views/pc/default/footer-modules/footerBulk.vue +169 -169
- package/src/views/pc/default/footer-modules/footerDM.vue +254 -254
- package/src/views/pc/default/footer-modules/footerDefault.vue +267 -267
- package/src/views/pc/default/footer-modules/footerDefaultA.vue +270 -270
- package/src/views/pc/default/footer-modules/footerDefaultNew.vue +201 -201
- package/src/views/pc/default/footer-modules/footerHDB.vue +153 -153
- package/src/views/pc/default/footer-modules/footerHy.vue +63 -63
- package/src/views/pc/default/footer-modules/footerKYW.vue +163 -163
- package/src/views/pc/default/footer-modules/footerMh.vue +30 -30
- package/src/views/pc/default/footer-modules/footerNew.vue +116 -116
- package/src/views/pc/default/footer-modules/footer_yzj.vue +169 -169
- package/src/views/pc/default/footer-modules/footerayd.vue +85 -85
- package/src/views/pc/default/footer-modules/ymFooter.vue +154 -154
- package/src/views/pc/default/footer-modules/zgl.vue +250 -250
- package/src/views/pc/default/header-modules/DgHeader/Logo.vue +57 -57
- package/src/views/pc/default/header-modules/DgHeader/Search.vue +135 -135
- package/src/views/pc/default/header-modules/DgHeader/Settleup.vue +46 -46
- package/src/views/pc/default/header-modules/DgHeader/index.vue +38 -38
- package/src/views/pc/default/header-modules/active.vue +177 -177
- package/src/views/pc/default/header-modules/header.vue +97 -97
- package/src/views/pc/default/header-modules/headerA.vue +142 -142
- package/src/views/pc/default/header-modules/headerFLPT.vue +157 -157
- package/src/views/pc/default/header-modules/headerMh.vue +187 -187
- package/src/views/pc/default/header-modules/headerNew.vue +121 -121
- package/src/views/pc/default/header-modules/headerSDX.vue +304 -304
- package/src/views/pc/default/header-modules/headerStyle2.vue +173 -173
- package/src/views/pc/default/header-modules/headerStyle3.vue +190 -190
- package/src/views/pc/default/header-modules/headerStyle4.vue +163 -163
- package/src/views/pc/default/header-modules/headerStyleAns.vue +400 -400
- package/src/views/pc/default/header-modules/headerStyleBulk.vue +427 -427
- package/src/views/pc/default/header-modules/headerStyleDefalut.vue +209 -209
- package/src/views/pc/default/header-modules/headerStyleKYW.vue +435 -435
- package/src/views/pc/default/header-modules/headerStyle_yzj.vue +427 -427
- package/src/views/pc/default/header-modules/headerayd.vue +187 -187
- package/src/views/pc/default/header-modules/index.vue +466 -466
- package/src/views/pc/default/header-modules/ymHeader.vue +292 -292
- package/src/views/pc/default/header-modules/ysHeader.vue +248 -248
- package/src/views/pc/default/header-modules/zgl.vue +855 -855
- package/src/views/pc/default/leftMenu-modules/leftMenu-logo.vue +194 -194
- package/src/views/pc/default/leftMenu-modules/leftMenu-style2.vue +206 -206
- package/src/views/pc/default/leftMenu-modules/leftMenu-style3.vue +207 -207
- package/src/views/pc/default/leftMenu-modules/leftMenu-style4.vue +192 -192
- package/src/views/pc/default/leftMenu-modules/leftMenu.vue +183 -183
- package/src/views/pc/default/leftMenu-modules/leftMenuDefault.vue +212 -212
- package/src/views/pc/default/leftMenu-modules/leftMenuDefaultEn.vue +214 -214
- package/src/views/pc/default/leftMenu-modules/leftMenuDefaultFLPT.vue +220 -220
- package/src/views/pc/default/leftMenu-modules/leftMenuDefaultayd.vue +220 -220
- package/src/views/pc/default/nav-modules/nav.vue +52 -52
- package/src/views/pc/default/nav-modules/navAns.vue +60 -60
- package/src/views/pc/default/nav-modules/navBulk.vue +60 -60
- package/src/views/pc/default/top-modules/DgTopShortcut/index.vue +177 -177
- package/src/views/pc/default/top-modules/Toplg.vue +280 -280
- package/src/views/pc/default/top-modules/topA.vue +136 -136
- package/src/views/pc/default/top-modules/topAns.vue +261 -261
- package/src/views/pc/default/top-modules/topAns_yzj.vue +282 -282
- package/src/views/pc/default/top-modules/topBar.vue +304 -304
- package/src/views/pc/default/top-modules/topBulk.vue +280 -280
- package/src/views/pc/default/top-modules/topDefault.vue +244 -244
- package/src/views/pc/default/top-modules/topDefaultDM.vue +197 -197
- package/src/views/pc/default/top-modules/topDefaultNew.vue +271 -271
- package/src/views/pc/default/top-modules/topFLPT.vue +197 -197
- package/src/views/pc/default/top-modules/topHDB.vue +479 -479
- package/src/views/pc/default/top-modules/topKYW.vue +258 -258
- package/src/views/pc/default/top-modules/topMh.vue +174 -174
- package/src/views/pc/default/top-modules/topNew.vue +97 -97
- package/src/views/pc/default/top-modules/topSDX.vue +298 -298
- package/src/views/pc/default/top-modules/topSimple.vue +247 -247
- package/src/views/pc/default/top-modules/topSimpleHy.vue +256 -256
- package/src/views/pc/default/top-modules/topUcc.vue +264 -264
- package/src/views/pc/default/top-modules/topayd.vue +170 -170
- package/src/views/pc/default/top-modules/ymTop.vue +299 -299
- package/src/views/pc/default/top-modules/zgltop.vue +499 -499
- package/src/views/routerView.vue +9 -9
- package/src/views/templates/components/temp-select.vue +80 -80
- package/src/views/templates/components/temp-upload.vue +233 -233
- package/src/views/templates/readme.md +2 -2
- package/src/views/templates/templateInput.vue +421 -421
- package/src/views/templates/templateReadme.html +588 -588
- package/src/views/templates/templateReadme.md +619 -619
- package/src/views/templates/templateTable.vue +2243 -2243
- package/src/views/templates/templateTableData.vue +1883 -1883
- package/src/views/templates/templateUi/templateTableContent.vue +187 -187
- package/src/views/treeTemplate/index.vue +559 -559
- package/src/views/treeTemplate/treeTemplate.md +274 -274
- package/src/views/uploadDialog/index copy.vue +352 -352
- package/src/views/uploadDialog/index.vue +558 -558
- package/src/views/uploadDialog/indexOlay.vue +582 -582
- package/src/views/uploadDialog/indexPM.vue +578 -578
- package/src/views/uploadDialog/indexUpload.vue +543 -543
- package/src/views/uploadDialog/readme.md +45 -45
|
@@ -1,113 +1,116 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="menu-wrapper el-menu-custom">
|
|
3
|
-
<template v-for="item in routes" v-if="item.menuShow == 0">
|
|
4
|
-
<el-submenu :index="item.proappMenuCode" :key="item.proappMenuCode" @select="selectHandler"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
v-else-if="child.menuShow == 0 && proappEnvOpentype != '/'"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<div>
|
|
29
|
-
<span v-if="item.menuShow == 0">{{ item.menuName }}</span>
|
|
30
|
-
</div>
|
|
31
|
-
</el-menu-item>
|
|
32
|
-
</template>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script>
|
|
37
|
-
export default {
|
|
38
|
-
name: 'SidebarItem',
|
|
39
|
-
props: {
|
|
40
|
-
routes: {
|
|
41
|
-
type: Array,
|
|
42
|
-
},
|
|
43
|
-
isNest: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: false,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
data() {
|
|
49
|
-
return {
|
|
50
|
-
proappEnvOpentype: window.sessionStorage.getItem('proappEnvLayout') ? JSON.parse(window.sessionStorage.getItem('proappEnvLayout')).proappEnvOpentype : null, //默认是null
|
|
51
|
-
secDomainName:null
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
mounted() {
|
|
55
|
-
// let proappEnvLayout = window.sessionStorage.getItem("proappEnvLayout");
|
|
56
|
-
// if (proappEnvLayout) {
|
|
57
|
-
// this.proappEnvOpentype = JSON.parse(proappEnvLayout).proappEnvOpentype;
|
|
58
|
-
// }
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
methods: {
|
|
62
|
-
routerPath(item) {
|
|
63
|
-
// console.log(item);
|
|
64
|
-
if (process.env.NODE_ENV === 'development') {
|
|
65
|
-
// 表示本地开发
|
|
66
|
-
location.href = '#/' + item.menuAction;
|
|
67
|
-
} else {
|
|
68
|
-
location.href = this.secDomainName + item.menuTarget + '#/' + item.menuAction;
|
|
69
|
-
}
|
|
70
|
-
this.$emit('getMenu', item.menuName, null);
|
|
71
|
-
this.$store.commit('SET_CURRENT_MENU', item);
|
|
72
|
-
},
|
|
73
|
-
routerLink(item, child) {
|
|
74
|
-
console.log(item, child, '二级和三级');
|
|
75
|
-
this.$emit('getMenu', item.menuName, child.menuName);
|
|
76
|
-
this.$store.commit('SET_CURRENT_MENU', child);
|
|
77
|
-
window.sessionStorage.setItem('menuCode', child.proappModelCode);
|
|
78
|
-
let url = null;
|
|
79
|
-
if (location.href.indexOf('localhost') > -1) {
|
|
80
|
-
// 表示本地
|
|
81
|
-
url = this.proappEnvOpentype == '/' ? `#/${child.menuAction}` : `#/${item.proappMenuCode}/${child.menuAction}`;
|
|
82
|
-
} else {
|
|
83
|
-
url = this.proappEnvOpentype == '/' ? `${child.menuTarget}#/${child.menuAction}` : `${child.menuTarget}#/${item.proappMenuCode}/${child.menuAction}`;
|
|
84
|
-
url = child.menuTarget.indexOf('http')
|
|
85
|
-
}
|
|
86
|
-
location.href = url;
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
</script>
|
|
91
|
-
<style rel="stylesheet" scoped>
|
|
92
|
-
.menu-wrapper li.el-menu-item:hover {
|
|
93
|
-
background-color: #fff !important;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="menu-wrapper el-menu-custom">
|
|
3
|
+
<template v-for="item in routes" v-if="item.menuShow == 0">
|
|
4
|
+
<el-submenu :index="item.proappMenuCode" :key="item.proappMenuCode" @select="selectHandler"
|
|
5
|
+
v-if="item.children && item.children.length > 0">
|
|
6
|
+
<template slot="title">
|
|
7
|
+
<span v-if="item.menuShow == 0">{{ item.menuName }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<template v-for="child in item.children">
|
|
11
|
+
<template v-if="item.children && item.children.length > 0">
|
|
12
|
+
<sidebar-item :is-nest="true" :key="child.menuAction" :routes="[child]" class="nest-menu"
|
|
13
|
+
v-if="child.children && child.menuShow == 0"></sidebar-item>
|
|
14
|
+
|
|
15
|
+
<el-menu-item :index="'/' + child.menuAction" :key="child.menuAction" @click="routerLink(item, child)"
|
|
16
|
+
v-else-if="child.menuShow == 0 && proappEnvOpentype == '/'">
|
|
17
|
+
<span v-if="child.menuShow == 0">{{ child.menuName }}</span>
|
|
18
|
+
</el-menu-item>
|
|
19
|
+
<el-menu-item :index="'/' + item.proappMenuCode + '/' + child.menuAction" :key="child.menuAction"
|
|
20
|
+
@click="routerLink(item, child)" v-else-if="child.menuShow == 0 && proappEnvOpentype != '/'">
|
|
21
|
+
<span v-if="child.menuShow == 0">{{ child.menuName }}</span>
|
|
22
|
+
</el-menu-item>
|
|
23
|
+
</template>
|
|
24
|
+
</template>
|
|
25
|
+
</el-submenu>
|
|
26
|
+
<el-menu-item :index="'/' + item.menuAction" :key="'/' + item.menuAction" @click="routerPath(item)"
|
|
27
|
+
v-if="!item.children || item.children.length == 0">
|
|
28
|
+
<div>
|
|
29
|
+
<span v-if="item.menuShow == 0">{{ item.menuName }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
</el-menu-item>
|
|
32
|
+
</template>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
export default {
|
|
38
|
+
name: 'SidebarItem',
|
|
39
|
+
props: {
|
|
40
|
+
routes: {
|
|
41
|
+
type: Array,
|
|
42
|
+
},
|
|
43
|
+
isNest: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
proappEnvOpentype: window.sessionStorage.getItem('proappEnvLayout') ? JSON.parse(window.sessionStorage.getItem('proappEnvLayout')).proappEnvOpentype : null, //默认是null
|
|
51
|
+
secDomainName: null
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
mounted() {
|
|
55
|
+
// let proappEnvLayout = window.sessionStorage.getItem("proappEnvLayout");
|
|
56
|
+
// if (proappEnvLayout) {
|
|
57
|
+
// this.proappEnvOpentype = JSON.parse(proappEnvLayout).proappEnvOpentype;
|
|
58
|
+
// }
|
|
59
|
+
this.secDomainName = sessionStorage.getItem('secDomainName') ? sessionStorage.getItem('secDomainName') : null
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
routerPath(item) {
|
|
63
|
+
// console.log(item);
|
|
64
|
+
if (process.env.NODE_ENV === 'development') {
|
|
65
|
+
// 表示本地开发
|
|
66
|
+
location.href = '#/' + item.menuAction;
|
|
67
|
+
} else {
|
|
68
|
+
location.href = this.secDomainName + item.menuTarget + '#/' + item.menuAction;
|
|
69
|
+
}
|
|
70
|
+
this.$emit('getMenu', item.menuName, null);
|
|
71
|
+
this.$store.commit('SET_CURRENT_MENU', item);
|
|
72
|
+
},
|
|
73
|
+
routerLink(item, child) {
|
|
74
|
+
console.log(item, child, '二级和三级');
|
|
75
|
+
this.$emit('getMenu', item.menuName, child.menuName);
|
|
76
|
+
this.$store.commit('SET_CURRENT_MENU', child);
|
|
77
|
+
window.sessionStorage.setItem('menuCode', child.proappModelCode);
|
|
78
|
+
let url = null;
|
|
79
|
+
if (location.href.indexOf('localhost') > -1) {
|
|
80
|
+
// 表示本地
|
|
81
|
+
url = this.proappEnvOpentype == '/' ? `#/${child.menuAction}` : `#/${item.proappMenuCode}/${child.menuAction}`;
|
|
82
|
+
} else {
|
|
83
|
+
url = this.proappEnvOpentype == '/' ? `${child.menuTarget}#/${child.menuAction}` : `${child.menuTarget}#/${item.proappMenuCode}/${child.menuAction}`;
|
|
84
|
+
url = child.menuTarget.indexOf('http') == -1 ? this.secDomainName + url : url
|
|
85
|
+
}
|
|
86
|
+
location.href = url;
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
</script>
|
|
91
|
+
<style rel="stylesheet" scoped>
|
|
92
|
+
.menu-wrapper li.el-menu-item:hover {
|
|
93
|
+
background-color: #fff !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.menu-wrapper li.el-menu-item {
|
|
97
|
+
height: 38px;
|
|
98
|
+
line-height: 34px;
|
|
99
|
+
font-size: 12px;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
102
|
+
<style>
|
|
103
|
+
.menu-wrapper {
|
|
104
|
+
font-size: 12px !important;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.el-submenu__title {
|
|
108
|
+
font-size: 12px !important;
|
|
109
|
+
height: 38px !important;
|
|
110
|
+
line-height: 38px !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.el-submenu__icon-arrow {
|
|
114
|
+
margin-top: -3px !important;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -1,193 +1,203 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="background: rgb(234, 237, 241)">
|
|
3
|
-
<div class="app-title">{{ title }}</div>
|
|
4
|
-
<scroll-bar>
|
|
5
|
-
<el-menu mode="vertical" class="el-menu-vertical-demo" :default-active="isActive" background-color="#fff"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
</
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
import
|
|
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
|
-
this.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
this.
|
|
80
|
-
this
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
.
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div style="background: rgb(234, 237, 241)">
|
|
3
|
+
<div class="app-title">{{ title }}</div>
|
|
4
|
+
<scroll-bar>
|
|
5
|
+
<el-menu mode="vertical" class="el-menu-vertical-demo" :default-active="isActive" background-color="#fff"
|
|
6
|
+
@select="handleSelect" @open="handleOpen">
|
|
7
|
+
<sidebar-item :routes="routes" @getMenu="getMenu"></sidebar-item>
|
|
8
|
+
</el-menu>
|
|
9
|
+
</scroll-bar>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import { mapGetters } from 'vuex';
|
|
15
|
+
import SidebarItem from './SidebarItem';
|
|
16
|
+
import ScrollBar from '#/components/ScrollBar';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
components: { SidebarItem, ScrollBar },
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
title: null,
|
|
23
|
+
seconedTitle: null,
|
|
24
|
+
thirdTitle: null,
|
|
25
|
+
current: null,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
mounted() {
|
|
30
|
+
this.getMenuList();
|
|
31
|
+
},
|
|
32
|
+
activated() {
|
|
33
|
+
this.getMenuList();
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
methods: {
|
|
37
|
+
getMenuList() {
|
|
38
|
+
let menuList = window.sessionStorage.getItem('menuList') ? JSON.parse(window.sessionStorage.getItem('menuList')).menuList : null,
|
|
39
|
+
code = window.sessionStorage.getItem('menuCode'),
|
|
40
|
+
secondMenuList = window.sessionStorage.getItem('menu') && JSON.parse(window.sessionStorage.getItem('menu'))[code];
|
|
41
|
+
menuList &&
|
|
42
|
+
menuList.forEach((el) => {
|
|
43
|
+
if (el.proappModelCode == code) {
|
|
44
|
+
this.title = el.menuName;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
console.log(secondMenuList, 'menuName');
|
|
48
|
+
// 获取二级或者三级菜单
|
|
49
|
+
secondMenuList &&
|
|
50
|
+
secondMenuList.forEach((el) => {
|
|
51
|
+
if (!el.menuAction) {
|
|
52
|
+
el.children &&
|
|
53
|
+
el.children.forEach((res) => {
|
|
54
|
+
if (res.routechildren) {
|
|
55
|
+
res.routechildren.map((val) => {
|
|
56
|
+
if (val.menuAction == this.$route.path.replace('/', '')) {
|
|
57
|
+
this.current = res;
|
|
58
|
+
console.log(res, 'l++ll');
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (res.menuAction == this.$route.path.replace('/', '')) {
|
|
63
|
+
this.seconedTitle = el.menuName;
|
|
64
|
+
this.thirdTitle = res.menuName;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
} else if (el.menuAction == this.$route.path.replace('/', '')) {
|
|
68
|
+
// this.current = el;
|
|
69
|
+
this.seconedTitle = el.menuName;
|
|
70
|
+
this.thirdTitle = null;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
this.$emit('getFirstLevelMenu', this.title, this.seconedTitle, this.thirdTitle); // 获取一级菜单
|
|
74
|
+
},
|
|
75
|
+
handleSelect(key, keyPath) {
|
|
76
|
+
// console.log(key, keyPath, "default-openeds");
|
|
77
|
+
},
|
|
78
|
+
getMenu(second, third) {
|
|
79
|
+
this.seconedTitle = second;
|
|
80
|
+
this.thirdTitle = third;
|
|
81
|
+
this.$emit('getFirstLevelMenu', this.title, this.seconedTitle, this.thirdTitle); // 获取一级菜单
|
|
82
|
+
},
|
|
83
|
+
handleOpen(key, keyPath) {
|
|
84
|
+
console.log(key, keyPath, 'fggggggggggggggggggggggggg');
|
|
85
|
+
},
|
|
86
|
+
handleMenu(data) {
|
|
87
|
+
let menu = {};
|
|
88
|
+
data &&
|
|
89
|
+
data.forEach((el) => {
|
|
90
|
+
menu[el.proappModelCode] = el.children;
|
|
91
|
+
});
|
|
92
|
+
this.menuCode(data);
|
|
93
|
+
window.sessionStorage.setItem('menu', JSON.stringify(menu));
|
|
94
|
+
},
|
|
95
|
+
menuCode(data) {
|
|
96
|
+
if (!data || !data.length) {
|
|
97
|
+
return;
|
|
98
|
+
} else {
|
|
99
|
+
for (var i = 0; i < data.length; i++) {
|
|
100
|
+
if (data[i].menuCode == 'P0000111') {
|
|
101
|
+
window.sessionStorage.setItem('menuAction', data[i].menuAction);
|
|
102
|
+
return;
|
|
103
|
+
} else {
|
|
104
|
+
let childs = data[i].children;
|
|
105
|
+
if (childs && childs.length > 0) {
|
|
106
|
+
this.menuCode(childs);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
computed: {
|
|
114
|
+
...mapGetters(['appList']),
|
|
115
|
+
routes() {
|
|
116
|
+
console.log('开始执行', this.$route);
|
|
117
|
+
let menuCode = null;
|
|
118
|
+
if (this.$route.meta.menuCode) {
|
|
119
|
+
menuCode = this.$route.meta.menuCode;
|
|
120
|
+
window.sessionStorage.setItem('menuCode', menuCode);
|
|
121
|
+
} else {
|
|
122
|
+
try {
|
|
123
|
+
menuCode = JSON.parse(window.sessionStorage.getItem('menuCode'));
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.log('出错了' + err);
|
|
126
|
+
menuCode = window.sessionStorage.getItem('menuCode');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (!window.sessionStorage.getItem('menu') || window.sessionStorage.getItem('menu') == '{}') {
|
|
130
|
+
let menuList = window.sessionStorage.getItem('menuList') ? JSON.parse(window.sessionStorage.getItem('menuList')).menuList : null;
|
|
131
|
+
if (menuList) {
|
|
132
|
+
this.handleMenu(menuList.menuList);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return window.sessionStorage.getItem('menu') ? JSON.parse(window.sessionStorage.getItem('menu'))[menuCode] : null;
|
|
136
|
+
},
|
|
137
|
+
isActive() {
|
|
138
|
+
this.getMenuList();
|
|
139
|
+
let current = this.$store.getters.currentMenu;
|
|
140
|
+
console.log(this.current, 'this.current');
|
|
141
|
+
if (!current && this.current) {
|
|
142
|
+
current = this.current;
|
|
143
|
+
}
|
|
144
|
+
if (this.$route.path && this.$route.meta) {
|
|
145
|
+
if ('title' in this.$route.meta && 'icon' in this.$route.meta && 'menuCode' in this.$route.meta && 'params' in this.$route.meta) {
|
|
146
|
+
localStorage.setItem('showMenuAction', this.$route.path)
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
console.log(current, 'current');
|
|
152
|
+
let path = this.$route.path;
|
|
153
|
+
if (current && Array.isArray(current.routechildren) && current.routechildren.length > 0) {
|
|
154
|
+
let arr = current.routechildren.map((res) => '/' + res.menuAction == this.$route.path);
|
|
155
|
+
|
|
156
|
+
if (arr && arr.length > 0) {
|
|
157
|
+
path = '/' + current.menuAction;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
console.log(current, 'path');
|
|
162
|
+
console.log(path, 'path');
|
|
163
|
+
path = localStorage.getItem('showMenuAction') ? localStorage.getItem('showMenuAction') : path
|
|
164
|
+
return path;
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
watch: {
|
|
168
|
+
$route: {
|
|
169
|
+
handler() {
|
|
170
|
+
let menuList = window.sessionStorage.getItem('menuList') ? JSON.parse(window.sessionStorage.getItem('menuList')).menuList : null,
|
|
171
|
+
code = window.sessionStorage.getItem('menuCode');
|
|
172
|
+
menuList &&
|
|
173
|
+
menuList.forEach((el) => {
|
|
174
|
+
if (el.proappModelCode == code) {
|
|
175
|
+
this.title = el.menuName;
|
|
176
|
+
console.log(this.title, 'this.title');
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
</script>
|
|
184
|
+
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
185
|
+
.el-menu-vertical-demo {
|
|
186
|
+
padding-top: 42px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.app-title {
|
|
190
|
+
height: 41px;
|
|
191
|
+
line-height: 42px;
|
|
192
|
+
// text-align: center;
|
|
193
|
+
text-indent: 20px;
|
|
194
|
+
color: #333;
|
|
195
|
+
font-weight: bold;
|
|
196
|
+
position: absolute;
|
|
197
|
+
width: 100%;
|
|
198
|
+
z-index: 1;
|
|
199
|
+
background: #fff;
|
|
200
|
+
font-size: 14px;
|
|
201
|
+
// border-bottom: solid 1px #e5e5e5;
|
|
202
|
+
}
|
|
203
|
+
</style>
|