139 lines
3.8 KiB
Vue
139 lines
3.8 KiB
Vue
<template>
|
|
<!-- 废弃 -->
|
|
<div class="fullHeight" style="overflow:hidden;text-align:center">
|
|
<el-row :gutter="20" class="fullHeight modulePage">
|
|
<el-col
|
|
:span="6"
|
|
v-for="(item, index) in menuList"
|
|
:key="index"
|
|
class="moduleContainer"
|
|
>
|
|
<div class="moduleBox" @click="itemClick(item)">
|
|
<p>{{ item.moduleName }}</p>
|
|
<img
|
|
:src="
|
|
require('../assets/images/module/' + item.moduleIcon2 + '.png')
|
|
"
|
|
alt=""
|
|
srcset=""
|
|
/>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { getAllModuleApi } from "@/assets/js/api/jxjadmin.js";
|
|
export default {
|
|
data() {
|
|
return {
|
|
menuList: [
|
|
// {
|
|
// moduleName:'生产管理',moduleIcon:'scgl'
|
|
// },{
|
|
// moduleName:'安全管理',moduleIcon:'aqgl'
|
|
// },{
|
|
// moduleName:'质量管理',moduleIcon:'zlgl'
|
|
// },{
|
|
// moduleName:'指挥中心',moduleIcon:'zhzx'
|
|
// },{
|
|
// moduleName:'综合管理',moduleIcon:'zhgl'
|
|
// },{
|
|
// moduleName:'劳务实名制',moduleIcon:'lwsmz'
|
|
// },{
|
|
// moduleName:'物资管理',moduleIcon:'wzgl'
|
|
// },{
|
|
// moduleName:'绿施管理',moduleIcon:'lsgl'
|
|
// },{
|
|
// moduleName:'策划管理',moduleIcon:'chgl'
|
|
// },{
|
|
// moduleName:'人力管理',moduleIcon:'rlgl'
|
|
// },{
|
|
// moduleName:'党建管理',moduleIcon:'djgl'
|
|
// },{
|
|
// moduleName:'商务管理',moduleIcon:'swgl'
|
|
// },{
|
|
// moduleName:'技术管理',moduleIcon:'jsgl'
|
|
// },{
|
|
// moduleName:'系统管理',moduleIcon:'xtgl'
|
|
// },{
|
|
// moduleName:'工作站',moduleIcon:'gzz'
|
|
// },{
|
|
// moduleName:'档案管理',moduleIcon:'dagl'
|
|
// }
|
|
],
|
|
};
|
|
},
|
|
mounted() {
|
|
let arr = this.$store.state.userInfo.menuAuthority.moduleList;
|
|
arr.forEach((element) => {
|
|
if (element.moduleType == 2) {
|
|
this.menuList.push(element);
|
|
}
|
|
});
|
|
// this.getAllModule(arr);
|
|
},
|
|
methods: {
|
|
itemClick(item) {
|
|
if (item.menuList && item.menuList.length > 0) {
|
|
// var arr = item.menuList;
|
|
// arr2 = [];
|
|
// arr.forEach((element) => {
|
|
// if (element.menuEquipment == 0) {
|
|
// arr2.push(element);
|
|
// }
|
|
// });
|
|
var arr2 = item.menuList;
|
|
this.$store.commit("setMenuList", arr2);
|
|
// this.$store.commit("setIsShowBackIndex", true);
|
|
this.$store.commit("setMoudle", item);
|
|
// if (arr2[0].target == "_blank") {
|
|
// let routeUrl = "";
|
|
// if (arr2[0].path.indexOf("http") != -1) {
|
|
// routeUrl = arr2[0].path;
|
|
// } else {
|
|
// let url = this.$router.resolve({
|
|
// path: arr2[0].path,
|
|
// });
|
|
// routeUrl = url.href;
|
|
// }
|
|
// window.open(routeUrl, "_blank");
|
|
// } else {
|
|
// if (arr2[0].path == "" || arr2[0].path.indexOf("/") == -1) {
|
|
// this.$router.push(arr2[0].menuList[0].path);
|
|
// } else {
|
|
// this.$router.push(arr2[0].path);
|
|
// }
|
|
// }
|
|
} else {
|
|
this.$message.error(this.$t("message.projectIndex.tips2"));
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="less" scoped>
|
|
.modulePage {
|
|
max-width: 1400px;
|
|
display: inline-block;
|
|
width: 100%;
|
|
}
|
|
.moduleContainer {
|
|
height: 25%;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
.moduleBox {
|
|
font-size: 20px;
|
|
color: #75c7d2;
|
|
text-align: center;
|
|
background: url("../assets/images/module/moudleBG.png") no-repeat center;
|
|
height: 145px;
|
|
width: 100%;
|
|
cursor: pointer;
|
|
p {
|
|
padding: 20px 0 8px;
|
|
}
|
|
}
|
|
</style>
|