|
@@ -1,25 +1,12 @@
|
|
|
<template>
|
|
|
- <div class="contenter">
|
|
|
- <div class="head-left">
|
|
|
- <img class="head-icon" src="@/assets/images/login/login-return.png" @click="backTo" alt="404">
|
|
|
- </div>
|
|
|
-<!-- 等UI图更新继续画 <div>-->
|
|
|
- <div class="head-title">
|
|
|
- <div v-if="headinfo.title">{{headinfo.title}}</div>
|
|
|
- </div>
|
|
|
- <div class="contrast-box" >
|
|
|
- <img class="contrast" v-show="headinfo.contrast" src="@/assets/images/environment/contrast-btn.png"
|
|
|
- @click="contrastTo">
|
|
|
- <p class="text" v-show="headinfo.contrast">{{contrastSize}}</p>
|
|
|
- </div>
|
|
|
- <div class="head-right" v-if="!headinfo.isLogin">
|
|
|
- <div class="right-user">
|
|
|
- <img src="@/assets/images/wakeup/user.png" @click="backTo" alt="404">
|
|
|
- </div>
|
|
|
- <el-button class="head-right-btn1" v-if="headinfo.isHome">使用说明</el-button>
|
|
|
- <el-button class="head-right-btn1" v-else @click="homeUrlTo">首页</el-button>
|
|
|
- <el-button class="head-right-btn2" @click="exit">退出登录</el-button>
|
|
|
- </div>
|
|
|
+ <div class="contenter">
|
|
|
+ <div class="head-left">
|
|
|
+ <img
|
|
|
+ class="head-icon"
|
|
|
+ src="@/assets/images/login/login-return.png"
|
|
|
+ @click="backTo"
|
|
|
+ alt="404"
|
|
|
+ />
|
|
|
</div>
|
|
|
<!-- 等UI图更新继续画 <div>-->
|
|
|
<div class="head-title">
|
|
@@ -27,11 +14,12 @@
|
|
|
</div>
|
|
|
<div class="contrast-box">
|
|
|
<img
|
|
|
- v-show="headinfo.contrast"
|
|
|
class="contrast"
|
|
|
+ v-show="headinfo.contrast"
|
|
|
src="@/assets/images/environment/contrast-btn.png"
|
|
|
@click="contrastTo"
|
|
|
/>
|
|
|
+ <p class="text" v-show="headinfo.contrast">{{ contrastSize }}</p>
|
|
|
</div>
|
|
|
<div class="head-right" v-if="!headinfo.isLogin">
|
|
|
<div class="right-user">
|
|
@@ -46,41 +34,60 @@
|
|
|
<el-button class="head-right-btn2" @click="exit">退出登录</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 等UI图更新继续画 <div>-->
|
|
|
+ <div class="head-title">
|
|
|
+ <div v-if="headinfo.title">{{ headinfo.title }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="contrast-box">
|
|
|
+ <img
|
|
|
+ v-show="headinfo.contrast"
|
|
|
+ class="contrast"
|
|
|
+ src="@/assets/images/environment/contrast-btn.png"
|
|
|
+ @click="contrastTo"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="head-right" v-if="!headinfo.isLogin">
|
|
|
+ <div class="right-user">
|
|
|
+ <img src="@/assets/images/wakeup/user.png" @click="backTo" alt="404" />
|
|
|
+ </div>
|
|
|
+ <el-button class="head-right-btn1" v-if="headinfo.isHome"
|
|
|
+ >使用说明</el-button
|
|
|
+ >
|
|
|
+ <el-button class="head-right-btn1" v-else @click="homeUrlTo"
|
|
|
+ >首页</el-button
|
|
|
+ >
|
|
|
+ <el-button class="head-right-btn2" @click="exit">退出登录</el-button>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-<<<<<<< HEAD
|
|
|
import { ElMessage } from "element-plus";
|
|
|
+import { getCompareSize } from "@/api/xjc-integratedmachine/environment/common.js";
|
|
|
import { defineEmits } from "vue";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const router = useRouter();
|
|
|
const props = defineProps({
|
|
|
headinfo: {},
|
|
|
});
|
|
|
-const emit = defineEmits(["backTo"]);
|
|
|
+const contrastSize = ref(null);
|
|
|
+const emit = defineEmits(["childEvent"]);
|
|
|
function backTo() {
|
|
|
+ clear();
|
|
|
if (props.headinfo.backUrlUse) {
|
|
|
router.push({
|
|
|
path: props.headinfo.backUrl,
|
|
|
+ query: {
|
|
|
+ code: props.headinfo.backQuery,
|
|
|
+ },
|
|
|
});
|
|
|
} else {
|
|
|
router.go(-1);
|
|
|
}
|
|
|
- clearData();
|
|
|
+ emit("childEvent");
|
|
|
}
|
|
|
-function clearData() {
|
|
|
- let contrastList = [];
|
|
|
- console.log("props.headinfo.contrastType", props.headinfo.contrastType);
|
|
|
- if (props.headinfo.contrastType === "major") {
|
|
|
- contrastList = JSON.parse(sessionStorage.getItem("majorList"));
|
|
|
- if (contrastList && contrastList.length >= 2) {
|
|
|
- sessionStorage.removeItem("majorList");
|
|
|
- }
|
|
|
- } else if (props.headinfo.contrastType === "university") {
|
|
|
- contrastList = JSON.parse(sessionStorage.getItem("contrastList"));
|
|
|
- if (contrastList && contrastList.length >= 2) {
|
|
|
- sessionStorage.removeItem("contrastList");
|
|
|
- }
|
|
|
+function clear() {
|
|
|
+ if (props.headinfo.contrastPage) {
|
|
|
+ // clearData()
|
|
|
}
|
|
|
}
|
|
|
function homeUrlTo() {
|
|
@@ -88,17 +95,24 @@ function homeUrlTo() {
|
|
|
path: props.headinfo.homeUrl,
|
|
|
});
|
|
|
}
|
|
|
+//跳转对比页面
|
|
|
function contrastTo() {
|
|
|
- let contrastList = [];
|
|
|
- if (props.headinfo.contrastType === "major") {
|
|
|
- contrastList = JSON.parse(sessionStorage.getItem("majorList"));
|
|
|
- } else if (props.headinfo.contrastType === "university") {
|
|
|
- contrastList = JSON.parse(sessionStorage.getItem("contrastList"));
|
|
|
- } else if (props.headinfo.contrastType === "occ") {
|
|
|
- contrastList = JSON.parse(sessionStorage.getItem("occList"));
|
|
|
- }
|
|
|
- if (contrastList && contrastList.length <= 2) {
|
|
|
- //暂无
|
|
|
+ console.log("contrastSize.value", contrastSize.value);
|
|
|
+ if (contrastSize.value === 2) {
|
|
|
+ console.log("props.headinfo.contrastType", props.headinfo.contrastType);
|
|
|
+ if (props.headinfo.contrastType === 2) {
|
|
|
+ router.push({
|
|
|
+ path: "/xjc-integratedmachine/environment/contrast_major",
|
|
|
+ });
|
|
|
+ } else if (props.headinfo.contrastType === 1) {
|
|
|
+ router.push({
|
|
|
+ path: "/xjc-integratedmachine/environment/contrast_university",
|
|
|
+ });
|
|
|
+ } else if (props.headinfo.contrastType === 3) {
|
|
|
+ router.push({
|
|
|
+ path: "/xjc-integratedmachine/environment/contrast_career",
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
type: "info",
|
|
@@ -106,20 +120,6 @@ function contrastTo() {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if (props.headinfo.contrastType === "major") {
|
|
|
- router.push({
|
|
|
- path: "/xjc-integratedmachine/environment/contrast_major",
|
|
|
- });
|
|
|
- } else if (props.headinfo.contrastType === "university") {
|
|
|
- router.push({
|
|
|
- path: "/xjc-integratedmachine/environment/contrast_university",
|
|
|
- });
|
|
|
- } else if (props.headinfo.contrastType === "occ") {
|
|
|
- router.push({
|
|
|
- path: "/xjc-integratedmachine/environment/contrast_career",
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
function exit() {
|
|
@@ -133,6 +133,23 @@ function exit() {
|
|
|
.then(() => {})
|
|
|
.catch(() => {});
|
|
|
}
|
|
|
+//拿到对比数量
|
|
|
+function getCompareSizeData(num) {
|
|
|
+ console.log("num", num);
|
|
|
+ setTimeout(() => {
|
|
|
+ getCompareSize({
|
|
|
+ type: props.headinfo.contrastType || num,
|
|
|
+ }).then((resp) => {
|
|
|
+ contrastSize.value = resp.data;
|
|
|
+ });
|
|
|
+ }, 500);
|
|
|
+}
|
|
|
+onMounted(() => {
|
|
|
+ // getCompareSizeData()
|
|
|
+});
|
|
|
+defineExpose({
|
|
|
+ getCompareSizeData,
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
@@ -155,7 +172,7 @@ function exit() {
|
|
|
margin-left: 74px;
|
|
|
}
|
|
|
.head-title {
|
|
|
- width: 232px;
|
|
|
+ width: 464px;
|
|
|
//margin: ;
|
|
|
text-align: center;
|
|
|
font-weight: bold;
|
|
@@ -165,10 +182,22 @@ function exit() {
|
|
|
.contrast-box {
|
|
|
width: 209px;
|
|
|
height: 80px;
|
|
|
+ position: relative;
|
|
|
img {
|
|
|
width: 209px;
|
|
|
height: 80px;
|
|
|
}
|
|
|
+ .text {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 3px;
|
|
|
+ left: 107px;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #2bc17b;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #2bc17b;
|
|
|
+ line-height: 31px;
|
|
|
+ bottom: -7px;
|
|
|
+ }
|
|
|
}
|
|
|
.head-right {
|
|
|
width: 750px;
|
|
@@ -199,178 +228,6 @@ function exit() {
|
|
|
img {
|
|
|
width: 85px;
|
|
|
height: 85px;
|
|
|
-=======
|
|
|
- import {ElMessage} from "element-plus";
|
|
|
- import {getCompareSize} from '@/api/xjc-integratedmachine/environment/common.js'
|
|
|
- import {defineEmits} from "vue";
|
|
|
- const {proxy} = getCurrentInstance()
|
|
|
- const router = useRouter()
|
|
|
- const props = defineProps({
|
|
|
- headinfo: {}
|
|
|
- })
|
|
|
- const contrastSize = ref(null);
|
|
|
- const emit = defineEmits(['childEvent']);
|
|
|
- function backTo() {
|
|
|
- clear()
|
|
|
- if(props.headinfo.backUrlUse){
|
|
|
- router.push({
|
|
|
- path: props.headinfo.backUrl,
|
|
|
- query:{
|
|
|
- code : props.headinfo.backQuery
|
|
|
- }
|
|
|
- })
|
|
|
- }else {
|
|
|
- router.go(-1);
|
|
|
- }
|
|
|
- emit('childEvent')
|
|
|
- }
|
|
|
- function clear(){
|
|
|
- if(props.headinfo.contrastPage){
|
|
|
- // clearData()
|
|
|
- }
|
|
|
- }
|
|
|
- function homeUrlTo() {
|
|
|
- router.push({
|
|
|
- path: props.headinfo.homeUrl
|
|
|
- })
|
|
|
- }
|
|
|
- //跳转对比页面
|
|
|
- function contrastTo(){
|
|
|
- console.log('contrastSize.value',contrastSize.value)
|
|
|
- if(contrastSize.value === 2){
|
|
|
- console.log("props.headinfo.contrastType",props.headinfo.contrastType)
|
|
|
- if(props.headinfo.contrastType === 2){
|
|
|
- router.push({
|
|
|
- path: '/xjc-integratedmachine/environment/contrast_major'
|
|
|
- })
|
|
|
- }else if(props.headinfo.contrastType === 1){
|
|
|
- router.push({
|
|
|
- path: '/xjc-integratedmachine/environment/contrast_university'
|
|
|
- })
|
|
|
- }else if(props.headinfo.contrastType === 3){
|
|
|
- router.push({
|
|
|
- path: '/xjc-integratedmachine/environment/contrast_career'
|
|
|
- })
|
|
|
- }
|
|
|
- }else {
|
|
|
- ElMessage({
|
|
|
- type: 'info',
|
|
|
- message: '对比列表不满两组数据',
|
|
|
- })
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- function exit() {
|
|
|
- proxy.$modal.confirm('您确认退出吗').then(function () {
|
|
|
- router.push({
|
|
|
- path: '/xjc_login'
|
|
|
- })
|
|
|
- }).then(() => {
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
- }
|
|
|
- //拿到对比数量
|
|
|
- function getCompareSizeData (num){
|
|
|
- console.log("num",num)
|
|
|
- setTimeout(() => {
|
|
|
- getCompareSize({
|
|
|
- type:props.headinfo.contrastType || num
|
|
|
- }).then(resp => {
|
|
|
- contrastSize.value = resp.data
|
|
|
- })
|
|
|
- }, 500)
|
|
|
-
|
|
|
- }
|
|
|
- onMounted(() => {
|
|
|
- // getCompareSizeData()
|
|
|
- })
|
|
|
- defineExpose({
|
|
|
- getCompareSizeData
|
|
|
- });
|
|
|
-</script>
|
|
|
-
|
|
|
-<style scoped lang='scss'>
|
|
|
- .contenter{
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- width:100%;
|
|
|
- height: 100px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- background-color: rgba(251,252,253,0.5);
|
|
|
- justify-content: space-between;
|
|
|
- .head-left{
|
|
|
- width: 750px;
|
|
|
- }
|
|
|
- .head-icon{
|
|
|
- width: 74px;
|
|
|
- height: 74px;
|
|
|
- margin-left: 74px;
|
|
|
- }
|
|
|
- .head-title{
|
|
|
- width: 464px;
|
|
|
- //margin: ;
|
|
|
- text-align: center;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 48px;
|
|
|
- color: #060606;
|
|
|
- }
|
|
|
- .contrast-box{
|
|
|
- width: 209px;
|
|
|
- height: 80px;
|
|
|
- position: relative;
|
|
|
- img{
|
|
|
- width: 209px;
|
|
|
- height: 80px;
|
|
|
- }
|
|
|
- .text{
|
|
|
- position: absolute;
|
|
|
- bottom: 3px;
|
|
|
- left: 107px;
|
|
|
- font-size: 20px;
|
|
|
- color: #2BC17B;
|
|
|
- font-size: 20px;
|
|
|
- color: #2BC17B;
|
|
|
- line-height: 31px;
|
|
|
- bottom: -7px;
|
|
|
- }
|
|
|
- }
|
|
|
- .head-right{
|
|
|
- width:750px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-around;
|
|
|
- align-items: center;
|
|
|
- width: 464px;
|
|
|
- .head-right-btn1{
|
|
|
- width: 136px;
|
|
|
- height: 74px;
|
|
|
- background: #2BC17B;
|
|
|
- border-radius: 10px 10px 10px 10px;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 24px;
|
|
|
- color: #FFFFFF;
|
|
|
- }
|
|
|
- .head-right-btn2{
|
|
|
- width: 136px;
|
|
|
- height: 74px;
|
|
|
- background: #FB5451;
|
|
|
- border-radius: 10px 10px 10px 10px;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 24px;
|
|
|
- color: #FFFFFF;
|
|
|
- margin-right: 48px;
|
|
|
- }
|
|
|
- .right-user{
|
|
|
-
|
|
|
- img{
|
|
|
- width: 85px;
|
|
|
- height: 85px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
->>>>>>> 5b33994a39751a55209a84f426e3274d1d08191d
|
|
|
}
|
|
|
}
|
|
|
}
|