|
@@ -5,11 +5,7 @@
|
|
|
<div class="banner">
|
|
|
<div class="login_content">
|
|
|
<div class="before_login" v-if="!loginStatus">
|
|
|
- 用户名:<el-input
|
|
|
- v-model="username"
|
|
|
- placeholder="请输入用户名"
|
|
|
- ></el-input>
|
|
|
- 密码:<el-input
|
|
|
+ 用户名:<el-input v-model="username" placeholder="请输入用户名"></el-input> 密码:<el-input
|
|
|
v-model="password"
|
|
|
placeholder="请输入密码"
|
|
|
show-password
|
|
@@ -24,18 +20,8 @@
|
|
|
</div>
|
|
|
<div class="func">
|
|
|
<div>
|
|
|
- <el-menu
|
|
|
- :default-active="showMenuIndex"
|
|
|
- class="el-menu-demo"
|
|
|
- mode="horizontal"
|
|
|
- @select="handleMenuSelect"
|
|
|
- >
|
|
|
- <el-menu-item
|
|
|
- v-for="(item, index) in funcArr"
|
|
|
- :key="index"
|
|
|
- :index="item.index"
|
|
|
- >{{ item.label }}</el-menu-item
|
|
|
- >
|
|
|
+ <el-menu :default-active="showMenuIndex" class="el-menu-demo" mode="horizontal" @select="handleMenuSelect">
|
|
|
+ <el-menu-item v-for="(item, index) in funcArr" :key="index" :index="item.index">{{ item.label }}</el-menu-item>
|
|
|
</el-menu>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -45,55 +31,55 @@
|
|
|
<ComprehensiveDisplay
|
|
|
v-if="showIndex == '1'"
|
|
|
v-bind="{
|
|
|
- index: 1,
|
|
|
+ index: 1
|
|
|
}"
|
|
|
></ComprehensiveDisplay>
|
|
|
<DataLayer
|
|
|
v-if="showIndex == '2'"
|
|
|
v-bind="{
|
|
|
- index: 2,
|
|
|
+ index: 2
|
|
|
}"
|
|
|
></DataLayer>
|
|
|
<DataQualityInspection
|
|
|
v-if="showIndex == '3'"
|
|
|
v-bind="{
|
|
|
- index: 3,
|
|
|
+ index: 3
|
|
|
}"
|
|
|
></DataQualityInspection>
|
|
|
<DataAccess
|
|
|
v-if="showIndex == '4'"
|
|
|
v-bind="{
|
|
|
- index: 4,
|
|
|
+ index: 4
|
|
|
}"
|
|
|
></DataAccess>
|
|
|
<DataDisplay
|
|
|
v-if="showIndex == '5'"
|
|
|
v-bind="{
|
|
|
- index: 5,
|
|
|
+ index: 5
|
|
|
}"
|
|
|
></DataDisplay>
|
|
|
<DataServices
|
|
|
v-if="showIndex == '6'"
|
|
|
v-bind="{
|
|
|
- index: 6,
|
|
|
+ index: 6
|
|
|
}"
|
|
|
></DataServices>
|
|
|
<Utilities
|
|
|
v-if="showIndex == '7'"
|
|
|
v-bind="{
|
|
|
- index: 7,
|
|
|
+ index: 7
|
|
|
}"
|
|
|
></Utilities>
|
|
|
<SecondaryDevelopment
|
|
|
v-if="showIndex == '8'"
|
|
|
v-bind="{
|
|
|
- index: 8,
|
|
|
+ index: 8
|
|
|
}"
|
|
|
></SecondaryDevelopment>
|
|
|
<SystemManagement
|
|
|
v-if="showIndex == '9'"
|
|
|
v-bind="{
|
|
|
- index: 9,
|
|
|
+ index: 9
|
|
|
}"
|
|
|
></SystemManagement>
|
|
|
</el-main>
|
|
@@ -115,19 +101,12 @@ export default {
|
|
|
userInfo: null,
|
|
|
requestCode: systemConfig.requestCode,
|
|
|
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,
|
|
|
+ 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,
|
|
|
+ 84, 90, 91, 92
|
|
|
],
|
|
|
funcArr: null,
|
|
|
showMenuIndex: "1",
|
|
|
- showIndex: "1",
|
|
|
+ showIndex: "1"
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -139,7 +118,7 @@ export default {
|
|
|
DataServices: () => import("@/views/DataServices.vue"),
|
|
|
Utilities: () => import("@/views/Utilities.vue"),
|
|
|
SecondaryDevelopment: () => import("@/views/SecondaryDevelopment.vue"),
|
|
|
- SystemManagement: () => import("@/views/SystemManagement.vue"),
|
|
|
+ SystemManagement: () => import("@/views/SystemManagement.vue")
|
|
|
// 综合展示
|
|
|
// ComprehensiveDisplay
|
|
|
// 数据图层
|
|
@@ -169,8 +148,8 @@ export default {
|
|
|
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,
|
|
|
+ 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();
|
|
@@ -190,7 +169,7 @@ export default {
|
|
|
loginFunc() {
|
|
|
let that = this;
|
|
|
login(this.username, this.password)
|
|
|
- .then((result) => {
|
|
|
+ .then(result => {
|
|
|
that.loginStatus = true;
|
|
|
that.userInfo = result.content;
|
|
|
that.$store.commit("setUserInfo", result.content);
|
|
@@ -199,10 +178,10 @@ export default {
|
|
|
// 页面刷新
|
|
|
location.reload();
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
that.$message({
|
|
|
type: "error",
|
|
|
- message: err,
|
|
|
+ message: err
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -219,9 +198,7 @@ export default {
|
|
|
|
|
|
// 权限筛选
|
|
|
permissionFiltering(permissionArr) {
|
|
|
- let list = JSON.parse(
|
|
|
- JSON.stringify(this.$store.getters.getMenuListTotal)
|
|
|
- );
|
|
|
+ let list = JSON.parse(JSON.stringify(this.$store.getters.getMenuListTotal));
|
|
|
list = list.filter(function (item) {
|
|
|
if (permissionArr.indexOf(item.permission) > -1) {
|
|
|
let children = null;
|
|
@@ -259,11 +236,7 @@ export default {
|
|
|
let obj = that.getParams();
|
|
|
let autologin1 = obj.autologin;
|
|
|
let autologin2 = localStorage.getItem("autologin");
|
|
|
- if (
|
|
|
- autologin1 == 1 ||
|
|
|
- autologin2 != null ||
|
|
|
- autologin2 != undefined
|
|
|
- ) {
|
|
|
+ if (autologin1 == 1 || autologin2 != null || autologin2 != undefined) {
|
|
|
that.loginFunc();
|
|
|
} else {
|
|
|
that.$store.commit("setToken", "");
|
|
@@ -273,12 +246,12 @@ export default {
|
|
|
let code = that.requestCode[result.code];
|
|
|
if (code == 206 || code == 207 || code == 208) {
|
|
|
this.$router.push({
|
|
|
- path: "/error",
|
|
|
+ path: "/error"
|
|
|
});
|
|
|
} else {
|
|
|
that.$message({
|
|
|
type: "warning",
|
|
|
- message: that.requestCode[result.code],
|
|
|
+ message: that.requestCode[result.code]
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -303,10 +276,10 @@ export default {
|
|
|
this.$checkRequestCode(result);
|
|
|
}
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
that.$message({
|
|
|
type: "error",
|
|
|
- message: err,
|
|
|
+ message: err
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -315,7 +288,7 @@ export default {
|
|
|
let that = this;
|
|
|
icon
|
|
|
.getIcon()
|
|
|
- .then((result) => {
|
|
|
+ .then(result => {
|
|
|
if (result.code == 200) {
|
|
|
that.$store.commit("setIconList", result.content);
|
|
|
} else {
|
|
@@ -323,14 +296,14 @@ export default {
|
|
|
this.$checkRequestCode(result);
|
|
|
}
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
that.$message({
|
|
|
type: "error",
|
|
|
- message: err,
|
|
|
+ message: err
|
|
|
});
|
|
|
});
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -390,7 +363,7 @@ export default {
|
|
|
}
|
|
|
&::placeholder {
|
|
|
color: #ffffff;
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
/deep/ .el-input__clear {
|
|
|
line-height: 30px;
|