123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <div v-if="this.rolerShow">
- <dev v-if="billType != 12">
- <div v-if="billType && saberTenantId != 212186 && saberTenantId != 504978 && billType != 11">
- <tongjiSchool v-if="billType == 1"></tongjiSchool>
- <landTransportation v-else-if="billType == 7"></landTransportation>
- <jiatongPage v-else-if="billType == 8"></jiatongPage>
- <noctite v-else-if="billType == 9"></noctite>
- <equipment-control v-else-if="billType == 10"></equipment-control>
- <tireindex v-else-if="billType == 11" :sysType="billType"></tireindex>
- <defaultPage v-else :sysType="billType"></defaultPage>
- </div>
- <div v-else-if="saberTenantId == 212186" style="padding: 10px">
- <el-card class="home-container__card">
- <div class="title">
- <span>
- 快速发起
- </span>
- </div>
- <div class="content">
- <div class="content-icon" @click="inPage('/productionManagement/index')">
- <i class="tradingIcon icon-purchase" style="color:#75CD28"></i>
- <span style="font-size: 14px">模拟生产</span>
- </div>
- </div>
- </el-card>
- </div>
- <div v-else-if="saberTenantId == 504978" style="padding: 10px">
- <el-card class="home-container__card">
- <div class="title">
- <span>
- 快速发起
- </span>
- </div>
- <div class="content">
- <div class="content-icon" @click="inPage('/EquipmentArchives/index')">
- <i class="tradingIcon icon-purchase" style="color:#75CD28"></i>
- <span style="font-size: 14px">设备档案</span>
- </div>
- <div class="content-icon" @click="inPage('/maintenanceQ/index')">
- <i class="tradingIcon icon-purchase" style="color:#75CD28"></i>
- <span style="font-size: 14px">设备维修</span>
- </div>
- </div>
- </el-card>
- </div>
- <!--青岛鑫动力新的首页-->
- <div v-else-if="billType == 11">
- <xindongPower :sysType="billType"></xindongPower>
- </div>
- </dev>
- <!--货代首页 货代billType 12 -->
- <div v-if="billType == 12">
- <los-home :sysType="billType"></los-home>
- </div>
- </div>
- </template>
- <script>
- import tireindex from '@/views/wel/home/tirezujian/tireindex';
- import defaultPage from "@/views/wel/home/defaultPage";
- import tongjiSchool from "@/views/wel/home/tongjiSchool";
- import landTransportation from "@/views/wel/home/landTransportation/landTransportation";
- import jiatongPage from "@/views/wel/home/jiatongPage/landTransportation";
- import noctite from "@/views/wel/home/noctite/landTransportation";
- import equipmentControl from "@/views/wel/home/equipmentControl/landTransportation";
- import { getUserInfo } from "@/api/system/user";
- import { setStore } from "@/util/store";
- import { areaTypeTree } from "@/api/basicData/customerInformation";
- import xindongPower from "@/views/wel/home/xindongPower/xindongPower.vue";
- import losHome from "@/views/wel/components/losHome.vue";
- export default {
- name: "wel",
- data() {
- return {
- billType: "",
- saberTenantId: '',
- roler: '',
- rolerShow:true,
- };
- },
- created() {
- this.saberTenantId = JSON.parse(localStorage.getItem('saber-tenantId')).content
- let obj = JSON.parse(localStorage.getItem('saber-userInfo')).content
- if (obj) {
- this.roler = obj.role_name
- this.getRegex(this.roler)
- }
- getUserInfo().then(res => {
- this.billType = res.data.data.billType;
- localStorage.setItem('sysitemType', this.billType)
- });
- if (!localStorage.getItem('areaTypeTree')) {
- areaTypeTree().then(res => {
- localStorage.setItem('areaTypeTree', JSON.stringify(res.data.data));
- })
- }
- },
- components: {
- tireindex,
- tongjiSchool,
- defaultPage,
- jiatongPage,
- noctite,
- equipmentControl,
- landTransportation,
- xindongPower,
- losHome
- },
- methods: {
- getRegex(str) {
- let regex = new RegExp('API', "g"); // g 标志表示全局匹配
- let matches = str.match(regex);
- if (matches) {
- this.rolerShow=false
- } else {
- this.rolerShow=true
- }
- },
- inPage(url) {
- this.$router.push(url);
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- .content {
- display: flex;
- &-icon {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin: 1.5vh 1vw 0vh 1vw;
- span {
- margin-top: 0.2vh;
- }
- }
- }
- .tradingIcon {
- font-size: 36px;
- }
- </style>
|