|
@@ -14,18 +14,18 @@
|
|
|
placeholder="请输入密码"
|
|
|
show-password
|
|
|
></el-input>
|
|
|
- <el-button @click="loginFunc">登 录</el-button>
|
|
|
+ <el-button @click="loginFunc">登录</el-button>
|
|
|
</div>
|
|
|
<div class="after_login" v-if="loginStatus">
|
|
|
{{ userInfo.username }}
|
|
|
- <el-button @click="logoutFunc">退 出</el-button>
|
|
|
+ <el-button @click="logoutFunc">退出</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="func">
|
|
|
<div>
|
|
|
<el-menu
|
|
|
- :default-active="showIndex"
|
|
|
+ :default-active="showMenuIndex"
|
|
|
class="el-menu-demo"
|
|
|
mode="horizontal"
|
|
|
@select="handleMenuSelect"
|
|
@@ -34,7 +34,7 @@
|
|
|
v-for="(item, index) in funcArr"
|
|
|
:key="index"
|
|
|
:index="item.index"
|
|
|
- >{{ item.name }}</el-menu-item
|
|
|
+ >{{ item.label }}</el-menu-item
|
|
|
>
|
|
|
</el-menu>
|
|
|
</div>
|
|
@@ -42,24 +42,67 @@
|
|
|
</el-header>
|
|
|
<el-container class="router_container">
|
|
|
<el-main>
|
|
|
- <ComprehensiveDisplay v-if="showIndex == '1'"></ComprehensiveDisplay>
|
|
|
- <DataLayer v-if="showIndex == '2'"></DataLayer>
|
|
|
+ <ComprehensiveDisplay
|
|
|
+ v-if="showIndex == '1'"
|
|
|
+ v-bind="{
|
|
|
+ index: 1,
|
|
|
+ }"
|
|
|
+ ></ComprehensiveDisplay>
|
|
|
+ <DataLayer
|
|
|
+ v-if="showIndex == '2'"
|
|
|
+ v-bind="{
|
|
|
+ index: 2,
|
|
|
+ }"
|
|
|
+ ></DataLayer>
|
|
|
<DataQualityInspection
|
|
|
v-if="showIndex == '3'"
|
|
|
+ v-bind="{
|
|
|
+ index: 3,
|
|
|
+ }"
|
|
|
></DataQualityInspection>
|
|
|
- <DataAccess v-if="showIndex == '4'"></DataAccess>
|
|
|
- <DataDisplay v-if="showIndex == '5'"></DataDisplay>
|
|
|
- <DataService v-if="showIndex == '6'"></DataService>
|
|
|
- <Utilities v-if="showIndex == '7'"></Utilities>
|
|
|
- <SecondaryDevelopment v-if="showIndex == '8'"></SecondaryDevelopment>
|
|
|
- <SystemManagement v-if="showIndex == '9'"></SystemManagement>
|
|
|
+ <DataAccess
|
|
|
+ v-if="showIndex == '4'"
|
|
|
+ v-bind="{
|
|
|
+ index: 4,
|
|
|
+ }"
|
|
|
+ ></DataAccess>
|
|
|
+ <DataDisplay
|
|
|
+ v-if="showIndex == '5'"
|
|
|
+ v-bind="{
|
|
|
+ index: 5,
|
|
|
+ }"
|
|
|
+ ></DataDisplay>
|
|
|
+ <DataServices
|
|
|
+ v-if="showIndex == '6'"
|
|
|
+ v-bind="{
|
|
|
+ index: 6,
|
|
|
+ }"
|
|
|
+ ></DataServices>
|
|
|
+ <Utilities
|
|
|
+ v-if="showIndex == '7'"
|
|
|
+ v-bind="{
|
|
|
+ index: 7,
|
|
|
+ }"
|
|
|
+ ></Utilities>
|
|
|
+ <SecondaryDevelopment
|
|
|
+ v-if="showIndex == '8'"
|
|
|
+ v-bind="{
|
|
|
+ index: 8,
|
|
|
+ }"
|
|
|
+ ></SecondaryDevelopment>
|
|
|
+ <SystemManagement
|
|
|
+ v-if="showIndex == '9'"
|
|
|
+ v-bind="{
|
|
|
+ index: 9,
|
|
|
+ }"
|
|
|
+ ></SystemManagement>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import login from "../utils/login";
|
|
|
+import login from "@/utils/login";
|
|
|
import general from "@/api/general";
|
|
|
import icon from "@/api/icon";
|
|
|
export default {
|
|
@@ -71,63 +114,19 @@ export default {
|
|
|
loginStatus: false,
|
|
|
userInfo: null,
|
|
|
requestCode: systemConfig.requestCode,
|
|
|
-
|
|
|
- funcArr: [
|
|
|
- {
|
|
|
- name: "综合展示",
|
|
|
- index: "1",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "数据图层",
|
|
|
- index: "2",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "数据质检",
|
|
|
- index: "3",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "数据接入",
|
|
|
- index: "4",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "数据展示",
|
|
|
- index: "5",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "数据服务",
|
|
|
- index: "6",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "实用工具",
|
|
|
- index: "7",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "二次开发",
|
|
|
- index: "8",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "系统管理",
|
|
|
- index: "9",
|
|
|
- show: true,
|
|
|
- active: false,
|
|
|
- },
|
|
|
+ permissionUnlogin: [
|
|
|
+ 10,
|
|
|
+ 20, 21, 22,
|
|
|
+ 30, 31, 32,
|
|
|
+ 40, 41, 42, 43, 44,
|
|
|
+ 50, 51, 52,
|
|
|
+ 60, 61, 62,63, 64,
|
|
|
+ 70, 71, 72, 73, 74, 75,
|
|
|
+ 80, 81, 82, 83,
|
|
|
+ 90, 91, 92,
|
|
|
],
|
|
|
+ funcArr: null,
|
|
|
+ showMenuIndex: "1",
|
|
|
showIndex: "1",
|
|
|
};
|
|
|
},
|
|
@@ -137,7 +136,7 @@ export default {
|
|
|
DataQualityInspection: () => import("@/views/DataQualityInspection.vue"),
|
|
|
DataAccess: () => import("@/views/DataAccess.vue"),
|
|
|
DataDisplay: () => import("@/views/DataDisplay.vue"),
|
|
|
- DataService: () => import("@/views/DataService.vue"),
|
|
|
+ DataServices: () => import("@/views/DataServices.vue"),
|
|
|
Utilities: () => import("@/views/Utilities.vue"),
|
|
|
SecondaryDevelopment: () => import("@/views/SecondaryDevelopment.vue"),
|
|
|
SystemManagement: () => import("@/views/SystemManagement.vue"),
|
|
@@ -152,7 +151,7 @@ export default {
|
|
|
// 数据展示
|
|
|
// DataDisplay
|
|
|
// 数据服务
|
|
|
- // DataService
|
|
|
+ // DataServices
|
|
|
// 实用工具
|
|
|
// Utilities
|
|
|
// 二次开发
|
|
@@ -170,10 +169,20 @@ export default {
|
|
|
if (this.$store.getters.getUserState) {
|
|
|
this.userInfo = this.$store.getters.getUserInfo;
|
|
|
this.loginStatus = true;
|
|
|
+ this.permissionFiltering([
|
|
|
+ 10, 20, 21, 30, 31, 32, 40, 41, 42, 43, 44, 50, 51, 52, 60, 61, 62, 63,
|
|
|
+ 64, 70, 71, 72, 73, 74, 75, 80, 81, 82, 83, 90, 91, 92,
|
|
|
+ ]);
|
|
|
+ } else {
|
|
|
+ this.permissionFilteringUnlogin();
|
|
|
}
|
|
|
+
|
|
|
this.getMenu();
|
|
|
this.getIcon();
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.funcArr = this.$store.getters.getMenuListTotal;
|
|
|
+ },
|
|
|
methods: {
|
|
|
handleMenuSelect(index) {
|
|
|
this.showIndex = index;
|
|
@@ -208,6 +217,41 @@ export default {
|
|
|
// 页面刷新
|
|
|
location.reload();
|
|
|
},
|
|
|
+ // 权限筛选
|
|
|
+ permissionFiltering(permissionArr) {
|
|
|
+ let list = JSON.parse(
|
|
|
+ JSON.stringify(this.$store.getters.getMenuListTotal)
|
|
|
+ );
|
|
|
+ list = list.filter(function (item) {
|
|
|
+ if (permissionArr.indexOf(item.permission) > -1) {
|
|
|
+ let children = null;
|
|
|
+ if (item.children) {
|
|
|
+ children = item.children.filter(function (_item) {
|
|
|
+ if (!_item.permission) {
|
|
|
+ return true; // 未有权限字段,不做判断
|
|
|
+ }
|
|
|
+ if (permissionArr.indexOf(_item.permission) > -1) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ item.children = children;
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$store.commit("setMenuListTotal", list);
|
|
|
+ },
|
|
|
+ //
|
|
|
+ permissionFilteringUnlogin() {
|
|
|
+ this.permissionFiltering(this.permissionUnlogin);
|
|
|
+ },
|
|
|
+ // 访问接口反馈
|
|
|
checkRequestCode(result) {
|
|
|
let that = this;
|
|
|
return new Promise((resolve, reject) => {
|
|
@@ -240,6 +284,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 获取url参数
|
|
|
getQueryString(name) {
|
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
|
var r = window.location.search.substr(1).match(reg);
|
|
@@ -309,10 +354,10 @@ export default {
|
|
|
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.12);
|
|
|
z-index: 1;
|
|
|
.banner {
|
|
|
- height: 270px;
|
|
|
+ height: 200px;
|
|
|
width: 100%;
|
|
|
position: relative;
|
|
|
- background: url(../assets/images/banner.png);
|
|
|
+ background: url(~@/assets/images/banner.png);
|
|
|
.login_content {
|
|
|
position: absolute;
|
|
|
top: 20px;
|
|
@@ -322,8 +367,12 @@ export default {
|
|
|
.before_login {
|
|
|
.el-input {
|
|
|
width: 150px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
margin-right: 10px;
|
|
|
/deep/ .el-input__inner {
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
background: #ffffff33;
|
|
|
border: 0px;
|
|
|
color: #ffffff;
|
|
@@ -341,9 +390,10 @@ export default {
|
|
|
}
|
|
|
&::placeholder {
|
|
|
color: #ffffff;
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
/deep/ .el-input__clear {
|
|
|
+ line-height: 30px;
|
|
|
color: #e3e3e3;
|
|
|
&:hover {
|
|
|
color: #ffffff;
|
|
@@ -351,10 +401,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.el-button {
|
|
|
+ height: 30px;
|
|
|
+ width: 60px;
|
|
|
+ padding: 0 10px;
|
|
|
background: #ffcc42; //#ffcc42
|
|
|
color: #ffffff;
|
|
|
border: 0px;
|
|
|
- height: 40px;
|
|
|
font-size: 16px;
|
|
|
vertical-align: bottom;
|
|
|
&:hover {
|
|
@@ -364,10 +416,12 @@ export default {
|
|
|
}
|
|
|
.after_login {
|
|
|
.el-button {
|
|
|
+ height: 30px;
|
|
|
+ width: 60px;
|
|
|
+ padding: 0 10px;
|
|
|
background: #ffcc42; //#ffcc42
|
|
|
color: #ffffff;
|
|
|
border: 0px;
|
|
|
- height: 40px;
|
|
|
font-size: 16px;
|
|
|
margin-left: 20px;
|
|
|
&:hover {
|
|
@@ -379,17 +433,27 @@ export default {
|
|
|
}
|
|
|
.func {
|
|
|
height: 60px;
|
|
|
+ background: #40a2ff;
|
|
|
.el-menu {
|
|
|
+ background: transparent;
|
|
|
width: fit-content;
|
|
|
margin: 0 auto;
|
|
|
border-bottom: 0px;
|
|
|
- li {
|
|
|
+ .el-menu-item {
|
|
|
font-family: Source Han Sans CN VF;
|
|
|
font-size: 20px;
|
|
|
- font-weight: bold;
|
|
|
- color: #000;
|
|
|
- width: 140px;
|
|
|
+ color: #ffffff;
|
|
|
+ width: 180px;
|
|
|
text-align: center;
|
|
|
+ border-bottom-color: transparent;
|
|
|
+ &.is-active {
|
|
|
+ font-weight: bold;
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+ &:hover {
|
|
|
+ font-weight: bold;
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|