| | |
| | | <template> |
| | | <div class="login"> |
| | | <div class="title"> |
| | | <!-- <div class="logo">--> |
| | | <!-- <img class="pics2" :src="logoPng">--> |
| | | <!-- <span style="font-size: 40px;color: black"></span>--> |
| | | <!-- <div style="width: 2px;height: 40px;background-color: #1C68A7;margin-top: 5px;margin-left: 15px;margin-right: 15px"></div>--> |
| | | <!-- <span style="font-size: 28px;color: white">危化品全生命周期管理系统</span>--> |
| | | <!-- </div>--> |
| | | <div class="content"> |
| | | <div class="imgBox"> |
| | | <div class="imG"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="formBox"> |
| | | <div class="loginTitle">危化品全生命周期<br/>管理系统</div> |
| | | <div class="loginTitle">独墅湖高教创新区<br/>危化品智慧管控平台</div> |
| | | <div style="padding: 25px 0;"> |
| | | <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form"> |
| | | <el-form-item> |
| | |
| | | <div class="el-login-footer"> |
| | | <span>Copyright ©2024-{{nowYear}} All Rights Reserved.</span> |
| | | </div> |
| | | <!-- <img class="pics1" :src="dataPng">--> |
| | | <!-- <img class="pics2" :src="searchPng">--> |
| | | |
| | | |
| | | <!-- <div class="login-panel">--> |
| | | <!-- <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">--> |
| | | <!-- <h3 class="title">安全在线教育平台</h3>--> |
| | | <!-- <el-form-item prop="username">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="loginForm.username"--> |
| | | <!-- type="text"--> |
| | | <!-- size="large"--> |
| | | <!-- auto-complete="off"--> |
| | | <!-- placeholder="账号"--> |
| | | <!-- >--> |
| | | <!-- <template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>--> |
| | | <!-- </el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item prop="password">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="loginForm.password"--> |
| | | <!-- type="password"--> |
| | | <!-- size="large"--> |
| | | <!-- auto-complete="off"--> |
| | | <!-- placeholder="密码"--> |
| | | <!-- @keyup.enter="handleLogin"--> |
| | | <!-- show-password--> |
| | | <!-- >--> |
| | | <!-- <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>--> |
| | | <!-- </el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item prop="code" v-if="captchaEnabled">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="loginForm.code"--> |
| | | <!-- size="large"--> |
| | | <!-- auto-complete="off"--> |
| | | <!-- placeholder="验证码"--> |
| | | <!-- style="width: 63%"--> |
| | | <!-- @keyup.enter="handleLogin"--> |
| | | <!-- >--> |
| | | <!-- <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>--> |
| | | <!-- </el-input>--> |
| | | <!-- <div class="login-code">--> |
| | | <!-- <img :src="codeUrl" @click="getCode" class="login-code-img"/>--> |
| | | <!-- </div>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item style="width:100%;">--> |
| | | <!-- <el-button--> |
| | | <!-- :loading="loading"--> |
| | | <!-- size="large"--> |
| | | <!-- type="primary"--> |
| | | <!-- style="width:100%;"--> |
| | | <!-- @click.prevent="handleLogin"--> |
| | | <!-- >--> |
| | | <!-- <span v-if="!loading">登 录</span>--> |
| | | <!-- <span v-else>登 录 中...</span>--> |
| | | <!-- </el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-form>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | // Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | // } |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | |
| | | if(userInfo.userType === 0) { |
| | | sidebarRouters.value = menu.adminMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | }else if(userInfo.userType === 1){ |
| | | const config = JSON.parse(Cookies.get('configInfo')) |
| | | if(config){ |
| | | if(config.useProd === 0){ |
| | | sidebarRouters.value = menu.companyMenu.filter(item => item.path != '/finishedBasicInfo') |
| | | }else { |
| | | sidebarRouters.value = menu.companyMenu |
| | | |
| | | } |
| | | }else { |
| | | ElMessage.warning('请联系管理员完善企业配置') |
| | | sidebarRouters.value = menu.companyMenu |
| | | } |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | }else if(userInfo.userType === 2){ |
| | | const config = JSON.parse(Cookies.get('configInfo')) |
| | | if(config){ |
| | | if(config.useProd === 0){ |
| | | sidebarRouters.value = menu.commonMenu.filter(item => item.path != '/finishedBasicInfo') |
| | | }else { |
| | | sidebarRouters.value = menu.commonMenu |
| | | } |
| | | }else { |
| | | // ElMessage.warning('请联系管理员完善企业配置') |
| | | if(userInfo.userType == 3){ |
| | | sidebarRouters.value = menu.commonMenu |
| | | } |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | }else { |
| | | ElMessage.warning('仅限监管部门账号登录') |
| | | loading.value = false |
| | | return |
| | | } |
| | | |
| | | // if(userInfo.userType === 0) { |
| | | // sidebarRouters.value = menu.adminMenu |
| | | // Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | // }else if(userInfo.userType === 1){ |
| | | // const config = JSON.parse(Cookies.get('configInfo')) |
| | | // if(config){ |
| | | // if(config.useProd === 0){ |
| | | // sidebarRouters.value = menu.companyMenu.filter(item => item.path != '/finishedBasicInfo') |
| | | // }else { |
| | | // sidebarRouters.value = menu.companyMenu |
| | | // |
| | | // } |
| | | // }else { |
| | | // ElMessage.warning('请联系管理员完善企业配置') |
| | | // sidebarRouters.value = menu.companyMenu |
| | | // } |
| | | // Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | // }else if(userInfo.userType === 2){ |
| | | // const config = JSON.parse(Cookies.get('configInfo')) |
| | | // if(config){ |
| | | // if(config.useProd === 0){ |
| | | // sidebarRouters.value = menu.commonMenu.filter(item => item.path != '/finishedBasicInfo') |
| | | // }else { |
| | | // sidebarRouters.value = menu.commonMenu |
| | | // } |
| | | // }else { |
| | | // // ElMessage.warning('请联系管理员完善企业配置') |
| | | // sidebarRouters.value = menu.commonMenu |
| | | // } |
| | | // Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | // } |
| | | let path = "" |
| | | if(sidebarRouters.value[0].children && sidebarRouters.value[0].children.length > 0){ |
| | | path = sidebarRouters.value[0].path + '/'+ sidebarRouters.value[0].children[0].path |