|
@@ -0,0 +1,484 @@
|
|
|
+<template>
|
|
|
+ <div class="appmian">
|
|
|
+ <!-- <v-scale-screen width="1920" height="1080" style="margin: 0;"> -->
|
|
|
+
|
|
|
+ <el-container>
|
|
|
+ <el-header>
|
|
|
+ <loginheader ref="loginheaderref" :name="headerobj.name" />
|
|
|
+ </el-header>
|
|
|
+ <el-main> </el-main>
|
|
|
+ <div class="bgk3" v-show="bgk2false">
|
|
|
+ <div class="bgk4"></div>
|
|
|
+ <div class="bgk2">
|
|
|
+ <div class="bjgg">
|
|
|
+ <el-image :src="dtu" fit="contain"></el-image>
|
|
|
+ <!-- 添加登录框 -->
|
|
|
+
|
|
|
+ <div class="login-form-container">
|
|
|
+ <div
|
|
|
+ class="dialog_class bgcolor tianjia"
|
|
|
+ style="width: 100%; height: 100%; padding: 30px"
|
|
|
+ >
|
|
|
+ <el-form :model="form" label-width="80px" >
|
|
|
+ <el-form-item label="用户名:" label-width="80px" class="form-item-align-left">
|
|
|
+ <el-input
|
|
|
+ v-model="loginform.username"
|
|
|
+ placeholder="请输入用户名"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="密码:" label-width="80px" class="form-item-align-left">
|
|
|
+ <el-input
|
|
|
+ v-model="loginform.password"
|
|
|
+ placeholder="请输入密码"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- <div class="captcha-wrapper">
|
|
|
+ <img :src="imageUrl" alt="验证码" class="captcha-img" />
|
|
|
+ <el-input
|
|
|
+ v-model="loginform.captcha"
|
|
|
+ placeholder="请输入验证码"
|
|
|
+ />
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ class="loginbtn"
|
|
|
+ @click="login"
|
|
|
+ style="width: 100%;"
|
|
|
+ :loading="loading"
|
|
|
+ :disabled="loading"
|
|
|
+ >{{ loading ? '登录中...' : '登录' }}</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="register"
|
|
|
+ style="width: 100%"
|
|
|
+ >注册</el-button
|
|
|
+ > -->
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 底部按钮三个页面 -->
|
|
|
+ </el-container>
|
|
|
+ <!-- </v-scale-screen> -->
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { ref, onMounted, reactive, nextTick } from "vue"
|
|
|
+import { RouterView, RouterLink, useRouter } from "vue-router"
|
|
|
+import VScaleScreen from "v-scale-screen"
|
|
|
+import "@/utils/flexible"
|
|
|
+
|
|
|
+import { request,enPassword } from "@/utils/request"
|
|
|
+
|
|
|
+import logo from "@/assets/logo.png"
|
|
|
+import {
|
|
|
+ ElMessage,
|
|
|
+ ElButton,
|
|
|
+ ElDialog,
|
|
|
+ ElSelect,
|
|
|
+ formEmits
|
|
|
+} from "element-plus"
|
|
|
+
|
|
|
+// import configurator from "./components/configurator.vue"
|
|
|
+import reheader from "@/components/header.vue"
|
|
|
+import loginheader from "@/components/loginheader.vue"
|
|
|
+import result from "./result.vue"
|
|
|
+import Vector from "@/assets/img/Vector.png"
|
|
|
+import s1 from "@/assets/img/s1.png"
|
|
|
+import dtu from "@/assets/img/Group1317.png"
|
|
|
+import s2 from "@/assets/img/s2.png"
|
|
|
+import s3 from "@/assets/img/s3.png"
|
|
|
+import s4 from "@/assets/img/s4.png"
|
|
|
+import b from "@/assets/img/Group1317.png"
|
|
|
+import { timestampToTime, formatTime } from "@/js/lindex.js"
|
|
|
+import emitter from "@/utils/emitter"
|
|
|
+
|
|
|
+import { getToken, setToken, setUserId } from "@/utils/token"
|
|
|
+import router from "@/router"
|
|
|
+
|
|
|
+// import { vtkmodel2 } from "@/control/vtkModel.js";
|
|
|
+let activeIndeximg = ref(null)
|
|
|
+let reheaderref = ref()
|
|
|
+let loginheaderref = ref()
|
|
|
+let lliudialog = ref()
|
|
|
+let sourcedis = ref()
|
|
|
+let classradio = ref()
|
|
|
+let boundary = ref()
|
|
|
+let tanimation = ref()
|
|
|
+let state = ref()
|
|
|
+let menumine = ref()
|
|
|
+let menusen = ref()
|
|
|
+let indexref = ref()
|
|
|
+let configuratorref = ref()
|
|
|
+let bkmodel = ref(false)
|
|
|
+let modelshow = ref(true)
|
|
|
+const title = "灾情推演软件"
|
|
|
+const activeIndex = ref("1")
|
|
|
+const activeIndex2 = ref("1")
|
|
|
+let titlefalse = ref(false)
|
|
|
+
|
|
|
+let headertime = ref({
|
|
|
+ timing: null,
|
|
|
+ loading: true,
|
|
|
+ dateDay: null,
|
|
|
+ dateYear: null,
|
|
|
+ dateWeek: null,
|
|
|
+ weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]
|
|
|
+})
|
|
|
+let bgk2false = ref(true)
|
|
|
+let headerobj = ref({
|
|
|
+ time: "",
|
|
|
+ name: ""
|
|
|
+})
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ timeFn()
|
|
|
+ // childfun();
|
|
|
+})
|
|
|
+
|
|
|
+// 登录相关
|
|
|
+let loginform = ref({
|
|
|
+ username: "",
|
|
|
+ password: "",
|
|
|
+ captcha: "",
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+let loading = ref(false)
|
|
|
+const codeId = ref("") // 验证码ID
|
|
|
+const imageUrl = ref("") // 验证码图片 URL
|
|
|
+
|
|
|
+
|
|
|
+const login = () => {
|
|
|
+ loading.value = true
|
|
|
+ const params = {
|
|
|
+ transCode: "A00002",
|
|
|
+ loginName: loginform.value.username,
|
|
|
+ password: enPassword(loginform.value.password),
|
|
|
+
|
|
|
+ type: "",
|
|
|
+
|
|
|
+ }
|
|
|
+ console.log(params)
|
|
|
+ request(params)
|
|
|
+ .then((res) => {
|
|
|
+ setToken(res.clientToken)
|
|
|
+ setUserId(res.userId)
|
|
|
+
|
|
|
+ router.push({ path: "/" })
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error('错误信息:',err);
|
|
|
+ ElMessage.error(err.returnMsg);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.value = false
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const register = () => {
|
|
|
+ const params = {
|
|
|
+ transCode: "A00003",
|
|
|
+ userName: form.value.username,
|
|
|
+ password: form.value.password,
|
|
|
+ mailOrPhone: "123456",
|
|
|
+ verificationCode: "",
|
|
|
+ channel: "1"
|
|
|
+ }
|
|
|
+ request(params)
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ ElMessage.error(err.returnMsg)
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const getcode = () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// 当前时间
|
|
|
+const timeFn = () => {
|
|
|
+ headertime.value.timing = setInterval(() => {
|
|
|
+ headertime.value.dateDay = formatTime(new Date(), "HH: mm: ss")
|
|
|
+ headertime.value.dateYear = formatTime(new Date(), "yyyy-MM-dd")
|
|
|
+ headertime.value.dateWeek = headertime.value.weekday[new Date().getDay()]
|
|
|
+ }, 1000)
|
|
|
+}
|
|
|
+
|
|
|
+onUnmounted(() => {})
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+@import "../../src/style/style.css";
|
|
|
+</style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.appmian {
|
|
|
+ .el-main {
|
|
|
+ --el-main-padding: 0px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-container {
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+ width: 100%;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 206;
|
|
|
+ top: 0;
|
|
|
+ background-image: url(../../src/assets/img/BJ.png) !important;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.ve_menu_logo {
|
|
|
+ width: 100%;
|
|
|
+ height: 70px;
|
|
|
+ background: #0d1639;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-align: left;
|
|
|
+ overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ background: #0d1639;
|
|
|
+ box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
|
|
|
+ border-radius: 0px 0px 0px 0px;
|
|
|
+ border-bottom: 1px solid;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-image: linear-gradient(
|
|
|
+ 28deg,
|
|
|
+ rgba(31, 107, 255, 1),
|
|
|
+ rgba(31, 107, 255, 0)
|
|
|
+ )
|
|
|
+ 1 1;
|
|
|
+
|
|
|
+ .ve_title {
|
|
|
+ }
|
|
|
+
|
|
|
+ .ve_logo_img {
|
|
|
+ padding-left: 30px;
|
|
|
+ padding-right: 30px;
|
|
|
+ display: inline-block;
|
|
|
+ box-sizing: border-box;
|
|
|
+ vertical-align: middle;
|
|
|
+ padding: 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ve_logo_title {
|
|
|
+ width: 160px;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: inline-block;
|
|
|
+ margin: 0;
|
|
|
+ vertical-align: middle;
|
|
|
+ color: #68adff;
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-menu-demo {
|
|
|
+ width: 60% !important;
|
|
|
+ height: 70px;
|
|
|
+ border: none !important;
|
|
|
+ background: rgba(12, 97, 197, 0);
|
|
|
+
|
|
|
+ .el-menu-item {
|
|
|
+ position: relative;
|
|
|
+ width: 97px;
|
|
|
+ font-family: Microsoft YaHei UI, Microsoft YaHei UI;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #68adff;
|
|
|
+ line-height: 15px;
|
|
|
+ text-align: center;
|
|
|
+ font-style: normal;
|
|
|
+ text-transform: none;
|
|
|
+ width: 110px;
|
|
|
+ height: 70px;
|
|
|
+ border-radius: 0px 0px 0px 0px;
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .is-active {
|
|
|
+ width: 110px;
|
|
|
+ height: 70px;
|
|
|
+ background: radial-gradient(
|
|
|
+ ellipse at 54px 0px,
|
|
|
+ #3aa0ff -37%,
|
|
|
+ #123066 53%
|
|
|
+ );
|
|
|
+ border-radius: 0px 0px 0px 0px;
|
|
|
+ border: 1px solid;
|
|
|
+ border-left: 1px solid rgba(16, 92, 240, 1);
|
|
|
+ border-right: 1px solid rgba(18, 48, 102, 1);
|
|
|
+ border-image: linear-gradient(
|
|
|
+ 347deg,
|
|
|
+ rgba(16, 92, 240, 1),
|
|
|
+ rgba(18, 48, 102, 1)
|
|
|
+ )
|
|
|
+ 1 1;
|
|
|
+
|
|
|
+ &:after {
|
|
|
+ width: 24px;
|
|
|
+ height: 1px;
|
|
|
+ background-color: #fff;
|
|
|
+ -webkit-transition: all ease-out 0.2s;
|
|
|
+ transition: all ease-out 0.2s;
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: 15px;
|
|
|
+ webkit-transform: translate(-50%, 0%);
|
|
|
+ -moz-transform: translate(-50%, 0%);
|
|
|
+ transform: translate(-50%, 0%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .ve_right {
|
|
|
+ // width: 350px;
|
|
|
+ height: 70px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .ve_time {
|
|
|
+ width: 190px;
|
|
|
+ height: 55px;
|
|
|
+ padding-top: 15px;
|
|
|
+ height: 70px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-radius: 0px 0px 0px 0px;
|
|
|
+ border-left: 2px solid rgba(12, 97, 197, 0.2);
|
|
|
+ border-right: 2px solid rgba(12, 97, 197, 0.2);
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 15px 5px;
|
|
|
+ // border-image: linear-gradient(347deg, rgba(31, 107, 255, 1), rgba(164, 195, 255, 1)) 1 1;
|
|
|
+ span {
|
|
|
+ display: block;
|
|
|
+ font-family: Microsoft YaHei UI, Microsoft YaHei UI;
|
|
|
+ color: #ffffff;
|
|
|
+ text-align: center;
|
|
|
+ font-style: normal;
|
|
|
+ text-transform: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .l_huoqing {
|
|
|
+ font-size: 13px;
|
|
|
+ line-height: 15px;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 2;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+
|
|
|
+ .l_time {
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .ve_timeioc {
|
|
|
+ width: 150px;
|
|
|
+ height: 70px;
|
|
|
+ // border-radius: 0px 0px 0px 0px;
|
|
|
+ // border: 1px solid;
|
|
|
+ // border-image: linear-gradient(347deg, rgba(16, 92, 240, 1), rgba(164, 195, 255, 1)) 1 1;
|
|
|
+ font-family: Microsoft YaHei UI, Microsoft YaHei UI;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #68adff;
|
|
|
+ line-height: 15px;
|
|
|
+ text-align: center;
|
|
|
+ font-style: normal;
|
|
|
+ text-transform: none;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ span {
|
|
|
+ padding-left: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.login-form-container {
|
|
|
+ position: absolute;
|
|
|
+ width: 400px;
|
|
|
+ height: 240px;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%); /* 将登录框居中 */
|
|
|
+ // background-color: rgba(255, 255, 255, 0.7); /* 给登录框添加透明背景色 */
|
|
|
+ padding: 20px;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.form-item-align-left {
|
|
|
+ justify-content: flex-start;
|
|
|
+}
|
|
|
+
|
|
|
+.loginbtn {
|
|
|
+ width: 100%;
|
|
|
+ background-color: rgba(61, 219, 252, 0.20) !important;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+
|
|
|
+.loginbtn:hover {
|
|
|
+ background-color: rgba(61, 219, 252, 0.35); /* 鼠标悬停时改变背景色 */
|
|
|
+ transform: scale(1.05); /* 鼠标悬停时轻微放大按钮 */
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style>
|
|
|
+.vtkmodel1 {
|
|
|
+ position: absolute;
|
|
|
+ z-index: 100;
|
|
|
+ width: 100%;
|
|
|
+ height: 100vh;
|
|
|
+}
|
|
|
+body {
|
|
|
+ width: 100%;
|
|
|
+ height: 100vh;
|
|
|
+ background: #161a2a;
|
|
|
+ /* background:#b2bac7; */
|
|
|
+}
|
|
|
+
|
|
|
+button:focus,
|
|
|
+button:focus-visible {
|
|
|
+ outline: none;
|
|
|
+}
|
|
|
+
|
|
|
+.l_Dialog {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.main-conyeny {
|
|
|
+ position: absolute;
|
|
|
+ z-index: 206;
|
|
|
+ top: 70px;
|
|
|
+}
|
|
|
+.L_aside {
|
|
|
+ margin-top: 10px;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+</style>
|