|
@@ -5,7 +5,11 @@
|
|
|
<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
|
|
@@ -20,8 +24,18 @@
|
|
|
</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>
|
|
@@ -37,55 +51,58 @@
|
|
|
<ComprehensiveDisplay
|
|
|
v-if="showIndex == '1'"
|
|
|
v-bind="{
|
|
|
- index: 1
|
|
|
+ permission: 10,
|
|
|
}"
|
|
|
></ComprehensiveDisplay>
|
|
|
<DataLayer
|
|
|
v-if="showIndex == '2'"
|
|
|
v-bind="{
|
|
|
- index: 2
|
|
|
+ permission: 20,
|
|
|
+ defaultPermission: defaultPermission,
|
|
|
}"
|
|
|
></DataLayer>
|
|
|
<DataQualityInspection
|
|
|
v-if="showIndex == '3'"
|
|
|
v-bind="{
|
|
|
- index: 3
|
|
|
+ permission: 30,
|
|
|
}"
|
|
|
></DataQualityInspection>
|
|
|
<DataAccess
|
|
|
v-if="showIndex == '4'"
|
|
|
v-bind="{
|
|
|
- index: 4
|
|
|
+ permission: 40,
|
|
|
}"
|
|
|
></DataAccess>
|
|
|
<DataDisplay
|
|
|
v-if="showIndex == '5'"
|
|
|
v-bind="{
|
|
|
- index: 5
|
|
|
+ permission: 50,
|
|
|
+ defaultPermission: defaultPermission,
|
|
|
}"
|
|
|
></DataDisplay>
|
|
|
<DataServices
|
|
|
v-if="showIndex == '6'"
|
|
|
v-bind="{
|
|
|
- index: 6
|
|
|
+ permission: 60,
|
|
|
+ defaultPermission: defaultPermission,
|
|
|
}"
|
|
|
></DataServices>
|
|
|
<Utilities
|
|
|
v-if="showIndex == '7'"
|
|
|
v-bind="{
|
|
|
- index: 7
|
|
|
+ permission: 70,
|
|
|
}"
|
|
|
></Utilities>
|
|
|
<SecondaryDevelopment
|
|
|
v-if="showIndex == '8'"
|
|
|
v-bind="{
|
|
|
- index: 8
|
|
|
+ permission: 80,
|
|
|
}"
|
|
|
></SecondaryDevelopment>
|
|
|
<SystemManagement
|
|
|
v-if="showIndex == '9'"
|
|
|
v-bind="{
|
|
|
- index: 9
|
|
|
+ permission: 90,
|
|
|
}"
|
|
|
></SystemManagement>
|
|
|
</el-main>
|
|
@@ -106,13 +123,11 @@ export default {
|
|
|
loginStatus: false,
|
|
|
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,
|
|
|
- 84, 90, 91, 92
|
|
|
- ],
|
|
|
+ permissionUnlogin: [10, 20, 30, 31, 50, 60, 70, 71, 72, 73, 74, 75],
|
|
|
funcArr: null,
|
|
|
showMenuIndex: "1",
|
|
|
- showIndex: "1"
|
|
|
+ showIndex: "1",
|
|
|
+ defaultPermission: -1,
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -124,7 +139,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
|
|
|
// 数据图层
|
|
@@ -149,6 +164,7 @@ export default {
|
|
|
window.loginFunc = this.loginFunc;
|
|
|
window.getMenu = this.getMenu;
|
|
|
window.getIcon = this.getIcon;
|
|
|
+ window.jumpModule = this.jumpModule;
|
|
|
|
|
|
let that = this;
|
|
|
if (this.$store.getters.getUserState) {
|
|
@@ -172,6 +188,7 @@ export default {
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
handleMenuSelect(index) {
|
|
|
+ this.defaultPermission = -1;
|
|
|
this.showIndex = index;
|
|
|
},
|
|
|
|
|
@@ -260,7 +277,11 @@ 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", "");
|
|
@@ -270,12 +291,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],
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -302,10 +323,10 @@ export default {
|
|
|
this.$checkRequestCode(result);
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
+ .catch((err) => {
|
|
|
that.$message({
|
|
|
type: "error",
|
|
|
- message: err
|
|
|
+ message: err,
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -315,7 +336,7 @@ export default {
|
|
|
let that = this;
|
|
|
icon
|
|
|
.getIcon()
|
|
|
- .then(result => {
|
|
|
+ .then((result) => {
|
|
|
if (result.code == 200) {
|
|
|
that.$store.commit("setIconList", result.content);
|
|
|
} else {
|
|
@@ -323,18 +344,32 @@ export default {
|
|
|
this.$checkRequestCode(result);
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
+ .catch((err) => {
|
|
|
that.$message({
|
|
|
type: "error",
|
|
|
- message: err
|
|
|
+ message: err,
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ // 跳转模块
|
|
|
+ jumpModule(index, permission) {
|
|
|
+ this.showMenuIndex = index;
|
|
|
+ this.showIndex = index;
|
|
|
+ this.defaultPermission = permission;
|
|
|
+ // jumpModule("2",22) // 跳转图层管理(数据管理)
|
|
|
+ // jumpModule("6",61) // 跳转数据发布(专题发布)
|
|
|
+ // jumpModule("5",52) // 跳转GIS图层管理(数据可视化)
|
|
|
+
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
menuListTotalData() {
|
|
|
return this.$store.state.menuListTotal;
|
|
|
},
|
|
|
+ menuListDeafaultTotal() {
|
|
|
+ return this.$store.state.menuListDeafaultTotal;
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
menuListTotalData: {
|