Commit 016af71e by liudx

修改上图图片接口

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