Commit 016af71e by liudx

修改上图图片接口

parent bc3e5144
......@@ -49,25 +49,9 @@ export default {
},
mounted() {
this.init();
},
methods: {
// hover() {
// let chart = echarts.init(document.getElementById(this.id));
// chart.on("mousemove", function (params) {
// console.log(params.event.offsetX);
// // let echartsraodar = document.getElementById("echartsraodar");
// // let tooldiv = echartsraodar.getElementsByTagName("div")[1];
// // tooldiv.style.width= '320px';
// // tooldiv.style.wordBreak='break-all'
// // console.log(tooldiv.innerHTML);
// console.log(params);
// if (params.name == "技术质量") {
// // tooldiv.innerHTML = '从有效专利占专利申请总量比例、有效发明专利占有效专利比例和风险专利占全部申请专利的比例分析'
// }
// // chart.setOption(that.option);
// });
// },
init() {
if (document.getElementById(this.id) == null) {
return;
......@@ -77,8 +61,8 @@ export default {
chart.setOption(this.option);
// let that = this;
// window.addEventListener("resize", chart.resize);
window.addEventListener("resize", chart.resize);
},
},
};
......
<template>
<div class="header">
<div class="header_left">
<img src="../static/login/logo-tylgd.png" alt="" />
<img src="../static/login/logo-tylgd.png" alt="" />
<span>专利成果转化智能推荐系统</span>
</div>
<!-- <div
......@@ -26,7 +26,8 @@
</div> -->
<div class="header_right">
<!-- <img src="" alt=""> -->
<span class="portrait"></span>
<img :src="img" class="portrait" v-if="img"/>
<img src="../static/common/img-tx-big.svg" class="portrait" v-else/>
<a-popover>
<template #content>
<div
......@@ -83,16 +84,15 @@
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { createVNode } from "vue";
import { Modal } from "ant-design-vue";
import { mapState } from "vuex";
import { userInfo } from "@/utils/userAPI";
export default {
name: "HeaderCon",
props: {},
created() {
this.username = localStorage.getItem('login_name');
},
computed: {
// this.username = localStorage.getItem("login_name");
this.getUserInfo();
},
computed: {},
data() {
return {
hover_num: 0,
......@@ -100,9 +100,22 @@ export default {
type: "专利",
keyword: "",
visible: false,
img: "",
};
},
created() {
this.getUserInfo()
},
methods: {
//获取用户信息
getUserInfo() {
userInfo().then((res) => {
if (res.code == 0) {
this.username = res.data.name;
this.img = res.data.head_img;
}
});
},
hover(e, num) {
// console.log(num)
this.hover_num = num;
......@@ -118,16 +131,16 @@ export default {
},
//打开弹窗
openModal() {
let that = this
let that = this;
Modal.confirm({
title: "确认退出登录吗?",
icon: createVNode(ExclamationCircleOutlined),
onOk() {
that.exit();
},
okText: '确认',
okText: "确认",
onCancel() {},
cancelText: '取消',
cancelText: "取消",
});
},
//关闭弹窗
......@@ -167,14 +180,14 @@ export default {
margin: 10px;
// padding: 10px;
border: 2px solid #4079ff;
border-radius: 8px;
// border-radius: 8px;
.type {
width: 160px;
height: 40px;
// margin-top: 10px;
// line-height: 50px;
padding: 0px 0;
background-color: #fff;
// background-color: #fff;
border-color: transparent;
}
:deep(.ant-input-group .ant-input) {
......@@ -188,6 +201,7 @@ export default {
:deep(.ant-input-group-addon:first-child) {
border-color: transparent;
padding-top: 5px;
background-color: transparent !important;
}
:deep(.ant-input-group-addon:last-child) {
height: 48px;
......@@ -207,8 +221,9 @@ export default {
width: 60px;
height: 60px;
// background-color: pink;
background: url('../static/common/img-tx-big.svg') no-repeat;
// background: url("../static/common/img-tx-big.svg") no-repeat;
background-size: 100% 100%;
vertical-align: baseline;
.portrait_btn {
cursor: pointer !important;
......@@ -231,4 +246,7 @@ export default {
}
}
}
:deep(.ant-input-group-addon) {
background-color: transparent;
}
</style>
......@@ -10,7 +10,7 @@ axios.defaults.timeout = 50000;
// // post请求头
// axios.defaults.headers.delete['Content-Type'] = 'application/json;charset=UTF-8';
axios.defaults.headers = {
'Content-Type': 'application/json;charset=UTF-8'
// 'Content-Type': 'application/json;charset=UTF-8'
}
// 请求拦截器
axios.interceptors.request.use(
......
......@@ -101,7 +101,7 @@
</a-form-item>
</a-form>
</a-modal>
<div style="width: 70%;display: none;">
<div style="width: 70%;visibility: hidden;overflow:hidden;height: 20px;">
<EchartsCon
:id="'applyTrend1'"
:option="option1"
......@@ -671,26 +671,39 @@ export default {
};
},
//获取联合申请数据
getOptions1() {
getOptions1() {
let points = [
{
name: this.$route.query.name,
name: this.baseinfo.company_name,
symbolSize: 40,
category: 0,
value: 0,
x: 0,
y: 0,
fixed: true,
},
];
let links = [];
//添加数据
if (this.jointData.joint_application.length != 0) {
this.jointData.joint_application.forEach((item) => {
points.push({
name: item.name,
symbolSize: 40,
category: 1,
value: item.value,
});
this.jointData.joint_application.forEach((item, index) => {
if (index == 0) {
} else {
points.push({
name: item.name,
symbolSize: 40,
category: 1,
value: item.value,
x:
index % 2 == 1
? 300 * Math.ceil(index / 2)
: -300 * Math.ceil(index / 2),
y:80*(10-index)
});
}
links.push({
source: this.$route.query.name,
source: this.baseinfo.company_name,
target: item.name,
value: item.value,
});
......@@ -701,14 +714,18 @@ export default {
show: true,
data: ["搜索的企业", "其他单位"],
},
tooltip: {
show: true,
},
series: [
{
type: "graph",
layout: "force",
layout: "none",
force: {
repulsion: 1500,
repulsion: 100,
edgeLength: 30,
},
bottom: 0,
roam: false,
label: {
show: true,
......
......@@ -100,41 +100,45 @@ export default {
symbolSize: 40,
category: 0,
value: 0,
x: 550,
y: 250,
// fixed: true,
x: 0,
y: 0,
fixed: true,
},
];
let links = [];
//添加数据
if (this.joint.joint_application.length != 0) {
this.joint.joint_application.forEach((item, index) => {
points.push({
name: item.name,
symbolSize: 40,
category: 1,
value: item.value,
// x:
// index % 2 == 1
// ? 550 + (index % 2) * (600)
// : 550 - (index % 2) * 600,
// y: 750,
// x:550+
});
if (index == 0) {
} else {
points.push({
name: item.name,
symbolSize: 40,
category: 1,
value: item.value,
x:
index % 2 == 1
? 300 * Math.ceil(index / 2)
: -300 * Math.ceil(index / 2),
y:80*(10-index)
});
}
links.push({
source: this.company_name,
target: item.name,
value: item.value,
});
});
console.log(points);
}
this.option1 = {
legend: {
show: true,
data: ["搜索的企业", "其他单位"],
},
tooltip: {
show: true,
},
series: [
{
type: "graph",
......
......@@ -452,14 +452,14 @@ export default {
margin: 10px;
// padding: 10px;
border: 2px solid #4079ff;
border-radius: 8px;
// border-radius: 8px;
.type {
width: 90px;
width: 120px;
height: 40px;
// margin-top: 10px;
// line-height: 50px;
padding: 0px 0;
background-color: #fff;
// background-color: #fff;
border-color: transparent;
}
:deep(.ant-input-group .ant-input) {
......@@ -473,6 +473,7 @@ export default {
:deep(.ant-input-group-addon:first-child) {
border-color: transparent;
padding-top: 5px;
background-color: transparent;
}
:deep(.ant-input-group-addon:last-child) {
height: 48px;
......@@ -481,6 +482,7 @@ export default {
color: #fff;
font-size: 18px;
cursor: pointer;
border: 0;
}
}
.company {
......
......@@ -69,14 +69,14 @@
<a-button
type="default"
size="large"
style="width: 100px"
class="btn"
@click="clearvalue"
>重置</a-button
>&nbsp;
<a-button
type="primary"
size="large"
style="width: 100px"
class="btn"
@click="Filter"
>筛选</a-button
>
......@@ -341,6 +341,7 @@ export default {
</script>
<style lang="less" scoped>
.header_con {
box-sizing: border-box;
position: absolute;
top: 0;
left: 30%;
......@@ -350,14 +351,14 @@ export default {
margin: 10px;
// padding: 10px;
border: 2px solid #4079ff;
border-radius: 8px;
// border-radius: 8px;
.type {
width: 90px;
width: 120px;
height: 40px;
// margin-top: 10px;
// line-height: 50px;
padding: 0px 0;
background-color: #fff;
// background-color: #fff;
border-color: transparent;
}
:deep(.ant-input-group .ant-input) {
......@@ -370,6 +371,7 @@ export default {
}
:deep(.ant-input-group-addon:first-child) {
border-color: transparent;
background-color: transparent;
padding-top: 5px;
}
:deep(.ant-input-group-addon:last-child) {
......@@ -378,7 +380,9 @@ export default {
background-color: #4079ff !important;
color: #fff;
font-size: 18px;
// border-radius: 8px;
cursor: pointer;
border: 0;
}
}
.patent {
......@@ -398,12 +402,16 @@ export default {
width: 100%;
height: calc(90%);
display: flex;
justify-content: space-evenly;
justify-content: space-between;
.patent_con_left {
width: 20%;
// height: 90%;
padding: 25px 20px;
background-color: #fff;
.btn{
width: 100px;
margin-top: -40px;
}
}
.patent_con_right {
background-color: #fff;
......
......@@ -649,7 +649,7 @@ export default {
clear: both;
display: flex;
position: relative;
justify-content: space-evenly;
justify-content: space-between;
background-color: #f3f3f6;
.patent_con_left {
.patent_con1 {
......@@ -731,7 +731,7 @@ export default {
.patent_con_right {
margin-top: 15px;
width: 610px;
height: 600px;
height: 680px;
background-color: #fff;
.patent_con1 {
// width: 949px;
......
......@@ -17,14 +17,22 @@
ref="form"
>
<a-form-item label="头像" name="img" class="header_label">
<img src="../../static/user/img-tx-big.png" alt="" class="header" />
<img :src="img" alt="" class="header" v-if="img" />
<img
src="../../static/common/img-tx-big.svg"
alt=""
class="header"
v-else
/>
<!-- <img :src="require(img)" alt="" class="header" /> -->
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/api/common/uploadFile"
:headers="headers"
@change="handleChange"
:show-upload-list="false"
:before-upload="beforeUpload"
:customRequest="imageUpload"
>
<span style="cursor: pointer; padding: 0 15px; color: #3e7bfa">
重新上传
</span>
......@@ -50,7 +58,11 @@
]"
name="phone"
>
<a-input placeholder="请输入手机号" v-model:value="formState.phone">
<a-input
placeholder="请输入手机号"
v-model:value="formState.phone"
:readonly="phone"
>
<template #suffix>
<span
class="code"
......@@ -165,6 +177,7 @@ export default {
code: "",
},
RemainingTime1: "",
img: "",
};
},
created() {
......@@ -176,14 +189,42 @@ export default {
this.login_name = localStorage.getItem("login_name");
},
methods: {
beforeUpload(file) {
const isJpgOrPng =
file.type === "image/jpeg" ||
file.type === "image/png" ||
file.type === "image/gif" ||
file.type === "image/jpg";
if (!isJpgOrPng) {
return this.$message.error("请上传正确的图片格式!");
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
return this.$message.error("图片大小必须小于2MB!");
}
},
imageUpload(file) {
console.log(file);
let data = new FormData();
data.append("head_img", file.file);
console.log(data);
uploadFile(data).then((res) => {
if (res) {
console.log(res);
this.img = res.data.file_url;
// console.log( this.img)
}
});
},
//获取用户信息
getUserInfo() {
userInfo().then((res) => {
if (res.code == 0) {
this.formState.name = res.data.name;
this.formState.head_img = res.data.head_img;
this.img = res.data.head_img;
this.formState.phone = res.data.phone;
this.phone = res.data.phone;
console.log(this.img)
}
});
},
......@@ -204,8 +245,8 @@ export default {
sendSms({ phone: this.updateform.phone }).then((res) => {
// console.log(res)
if (res.code == 0) {
this.updateform.phone = "";
this.updateform.code = "";
// this.updateform.phone = "";
// this.updateform.code = "";
this.isSend = true;
const TIME_COUNT = 60;
message.success(res.msg);
......@@ -268,41 +309,68 @@ export default {
},
//保存个人信息
save() {
//更新手机号修改信息
if (this.phone != "" && this.formState.code == "") {
//第一次绑定手机号
if (this.phone == "") {
//用户没输入验证码
if (this.formState.code == "") {
message.error("请输入验证码");
//用户输入了验证码
} else {
let params = {
head_img: this.img,
name: this.formState.name,
phone: this.formState.phone,
code: this.formState.code,
};
bduserInfo({ ...params }).then((res) => {
if (res.code == 0) {
this.$router.go(0);
message.success(res.msg);
} else {
message.error(res.msg);
}
});
}
}
//修改手机号
else {
updateuserInfo({
head_img: this.formState.head_img,
head_img: this.img,
name: this.formState.name,
phone: this.formState.phone,
}).then((res) => {
if (res.code == 0) {
// this.formState.phone = this.updateform.phone;
this.$router.go(0);
message.success(res.msg);
} else {
message.error(res.msg);
}
});
} else {
//绑定手机号
if (this.formState.phone == "") {
bduserInfo({ ...this.formState }).then((res) => {
if (res.code == 0) {
message.success(res.msg);
location.reload();
} else {
message.error(res.msg);
}
});
} else {
message.error("请输入手机号");
}
}
//更新手机号修改信息
// if (this.phone != "" && this.formState.code == "") {
// } else {
// //绑定手机号
// if (this.phone == "") {
// bduserInfo({ ...this.formState }).then((res) => {
// if (res.code == 0) {
// message.success(res.msg);
// location.reload();
// } else {
// message.error(res.msg);
// }
// });
// } else {
// message.error("请输入手机号");
// }
// }
//
},
//修改手机号
//修改手机号弹窗打开
updatePhone() {
this.visibleupdate = true;
// this.formState.phone = this.updateform.phone
},
},
};
......
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