Commit 78226d7f by liudx

新建页面

parent 016af71e
......@@ -111,7 +111,7 @@ export default {
getUserInfo() {
userInfo().then((res) => {
if (res.code == 0) {
this.username = res.data.name;
this.username = res.data.account_number;
this.img = res.data.head_img;
}
});
......
......@@ -25,6 +25,7 @@ import securitySetting from "../views/userset/securitySetting.vue"
//管理员设置
import adminset from "../views/adminset/index.vue"
import userInfo from "../views/adminset/userInfo.vue"
import screen from "../views/screen/index.vue"
import notFound from "../views/404.vue"
......@@ -137,6 +138,12 @@ const routes = [
},
]
},
//可视化界面
{
path: '/screen',
name: 'screen',
component: screen,
},
// {
// path: '/404',
// name: 'NotFound',
......
......@@ -31,7 +31,10 @@
}}</span
>件。
</p>
<EchartsCon :option="option2" :id="'echarts2'"></EchartsCon>
<a-empty v-if="empty2"/>
<EchartsCon :option="option2" :id="'echarts2'" v-else></EchartsCon>
</div>
</div>
<div class="company_con_anchor">
......@@ -68,6 +71,7 @@ export default {
option2: null,
joint: {},
company_name: "",
empty2:false
};
},
props: {
......@@ -217,6 +221,9 @@ export default {
},
getOptions2() {
const dataList = this.patentPurchase.patent_purchase;
if(dataList.length == 0){
this.empty2 = true
}
this.option2 = {
tooltip: {
show: false,
......
......@@ -132,14 +132,18 @@ export default {
}).then((res) => {
// console.log(res);
if (res.code == 0) {
message.success("登录成功");
// this.$store.commit('setTOKEN',res.data.token)
// this.$store.commit('setname',this.formState.username)
localStorage.setItem("login_name", this.formState.username);
localStorage.setItem("token", res.data.token);
this.$router.push({
path: "/adminset",
});
if (res.data.is_admin) {
message.success("登录成功");
// this.$store.commit('setTOKEN',res.data.token)
// this.$store.commit('setname',this.formState.username)
localStorage.setItem("login_name", this.formState.username);
localStorage.setItem("token", res.data.token);
this.$router.push({
path: "/adminset",
});
} else {
message.warning("请切换账号登录页面");
}
} else {
message.error(res.msg);
}
......
<template>
<div class="screen">
<header>太原理工大学专利成果转化智能推荐系统</header>
<div class="center"></div>
<div class="bottom">
<div class="bottom_title">专利发展趋势图</div>
<EchartsCon :id="'patent_trend'" :options="option5"></EchartsCon>
</div>
</div>
</template>
<script>
import EchartsCon from "../../components/EchartsCon.vue";
export default {
name: "screen",
data() {
return {
option5: null,
};
},
components: {},
methods: {
init() {
//获取专利发展趋势图
this.getTrend();
},
getTrend() {
this.option5 = {};
},
},
mounted() {},
created() {
this.init();
},
};
</script>
<style lang="less" scoped>
.screen {
background-image: url("../../static/screen/bg-all.png");
background-size: 100%;
width: 100%;
height: 885px;
header {
background-image: url("../../static/screen/bg-top-logo.png");
height: 97px;
background-size: 100%;
font-family: "jiangcheng";
font-weight: 400;
color: #eff8fc;
line-height: 26px;
text-align: center;
font-size: 40px;
line-height: 97px;
opacity: 0.89;
text-shadow: 0px 4px 1px rgba(19, 80, 143, 0.66);
.center {
height: 70%;
}
.bottom {
height: 30%;
width: 50%;
.bottom_title {
background-image: url("../../static/screen/title-long.png");
background-size: 100%;
}
}
}
// background-size:100% 100%;
}
</style>
......@@ -32,7 +32,6 @@
:before-upload="beforeUpload"
:customRequest="imageUpload"
>
<span style="cursor: pointer; padding: 0 15px; color: #3e7bfa">
重新上传
</span>
......@@ -186,7 +185,7 @@ export default {
this.getUserInfo();
},
mounted() {
this.login_name = localStorage.getItem("login_name");
// this.login_name = localStorage.getItem("login_name");
},
methods: {
beforeUpload(file) {
......@@ -209,10 +208,13 @@ export default {
data.append("head_img", file.file);
console.log(data);
uploadFile(data).then((res) => {
if (res) {
console.log(res);
if (res.code == 0) {
message.success(res.msg);
this.img = res.data.file_url;
// console.log( this.img)
} else {
message.error(res.msg);
}
});
},
......@@ -222,9 +224,10 @@ export default {
if (res.code == 0) {
this.formState.name = res.data.name;
this.img = res.data.head_img;
this.login_name = res.data.account_number;
this.formState.phone = res.data.phone;
this.phone = res.data.phone;
console.log(this.img)
console.log(this.img);
}
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment