Commit aee9f71d by liudx

联调导出问题

parent aa7927e4
......@@ -24,10 +24,10 @@ export default {
type: String,
default: "130%",
},
dataArr:{
type:Array,
default:[]
}
dataArr: {
type: Array,
default: [],
},
},
computed: {
style() {
......@@ -55,6 +55,16 @@ export default {
methods: {
initchart() {
let myChart = echarts.init(document.getElementById(this.id));
let color = [
"#FF4040",
"#FFA500",
"#3CB371",
"#8470FF",
"#FA8072",
"#EEA9B8",
"#9F79EE",
"#87CEFF",
];
myChart.setOption({
series: [
{
......@@ -72,17 +82,11 @@ export default {
rotationRange: [0, 0],
//随机生成字体颜色
// maskImage: maskImage,
textStyle: {
color: function () {
return (
"rgb(" +
Math.round(Math.random() * 255) +
", " +
Math.round(Math.random() * 255) +
", " +
Math.round(Math.random() * 255) +
")"
);
color: function (params) {
var index = params.dataIndex;
return color[index % color.length];
},
},
left: "center",
......@@ -92,7 +96,7 @@ export default {
width: "100%",
height: "100%",
//数据
data: this.dataArr
data: this.dataArr,
},
],
});
......
<template>
<div class="loading">
<div class="loading-inner"></div>
<div class="loading-inner1">正在导出中~</div>
</div>
</template>
<script>
export default{
name:'load'
}
</script>
<style>
.loading {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.3);
z-index: 9999;
}
.loading-inner {
position: absolute;
top: 50%;
left: 50%;
width: 50px;
height: 50px;
margin-left: -20px;
margin-top: -20px;
border-radius: 50%;
border: 4px solid #1e86fc;
border-top-color: #c6cdd2;
animation: loading 1s ease-in-out infinite;
}
.loading-inner1 {
position: absolute;
top: 55%;
left: 48%;
color: #fff;
font-size: 16px;
}
@keyframes loading {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
</style>
\ No newline at end of file
......@@ -117,8 +117,10 @@
<EchartsCon :option="option10" :id="'yibiao'"></EchartsCon>
</div>
</div>
<Loading v-if="loading"></Loading>
</template>
<script>
import Loading from "../../components/LoadAnimation.vue"
import * as echarts from "echarts";
import EchartsCon from "../../components/EchartsCon";
import EchartsCloud from "../../components/EchartsCloud";
......@@ -166,6 +168,7 @@ export default {
name: "companyDetails",
data() {
return {
loading:false,
id: "",
option1: {},
option2: {},
......@@ -203,6 +206,7 @@ export default {
technology,
EchartsCon,
EchartsCloud,
Loading
},
methods: {
//取消关注
......@@ -989,6 +993,7 @@ export default {
.validate("email")
.then(() => {
this.visible = false;
this.loading = true;
var that = this;
let share_holders = that.baseinfo.share_holders;
//对模板中股东信息进行修改
......@@ -1053,7 +1058,19 @@ export default {
myChart8.setOption(this.option8);
myChart9.setOption(this.option9);
myChart10.setOption(this.option10);
let color = [
"#FF4040",
"#FFA500",
"#3CB371",
"#8470FF",
"#FA8072",
"#EEA9B8",
"#9F79EE",
"#87CEFF",
"#DA70D6",
"#00B2EE",
"#f9e88b",
];
//技术领域云图
myChart6.setOption({
series: [
......@@ -1065,16 +1082,9 @@ export default {
//随机生成字体颜色
// maskImage: maskImage,
textStyle: {
color: function () {
return (
"rgb(" +
Math.round(Math.random() * 255) +
", " +
Math.round(Math.random() * 255) +
", " +
Math.round(Math.random() * 255) +
")"
);
color: function (params) {
var index = params.dataIndex;
return color[index % color.length];
},
},
left: "center",
......@@ -1234,7 +1244,7 @@ export default {
return new Promise((resolve, reject) => {
const fileReader = new FileReader();
fileReader.onload = (e) => {
setTimeout(function () {
exportword({
report_data: e.target.result,
email: email,
......@@ -1243,12 +1253,13 @@ export default {
ent_or_pat_id:id
}).then((res) => {
if (res.code == 0) {
this.loading = false
message.success(res.msg);
} else {
message.error(res.msg);
}
});
}, 300);
};
// readAsDataURL
fileReader.readAsDataURL(blob);
......
......@@ -183,7 +183,11 @@
item.social_code
}}</a-descriptions-item>
<a-descriptions-item label="国民经济行业">
{{ item.company_industry_parent }}
{{
item.company_industry_parent
? item.company_industry_parent + ">"
: ""
}}{{ item.company_industry }}
</a-descriptions-item>
<a-descriptions-item :span="2" label="注册地址">{{
item.address
......
......@@ -253,9 +253,12 @@
{{ item.company_name }}
</div>
<a-tag class="tags" color="#56CA95">{{ item.status }}</a-tag>
<a-tag class="tags" color="#6096E6" v-if="item.quoted_company == 1">{{
"上市挂牌企业"
}}</a-tag>
<a-tag
class="tags"
color="#6096E6"
v-if="item.quoted_company == 1"
>{{ "上市挂牌企业" }}</a-tag
>
<a-tag class="tags" color="#6096E6" v-if="item.high_new == 1">{{
"高新技术企业"
}}</a-tag>
......@@ -349,8 +352,10 @@
</a-form>
</a-modal>
</div>
<Loading v-if="loading"></Loading>
</template>
<script>
import Loading from "../../components/LoadAnimation.vue";
import * as echarts from "echarts";
import "echarts-wordcloud";
import { DownOutlined } from "@ant-design/icons-vue";
......@@ -387,6 +392,7 @@ export default {
name: "patentDetails",
data() {
return {
loading: false,
formState: {
email: "",
},
......@@ -415,6 +421,7 @@ export default {
components: {
EchartsCloud,
DownOutlined,
Loading,
},
methods: {
//取消关注
......@@ -518,6 +525,8 @@ export default {
.then(() => {
// 邮箱号码格式正确,可以发送
var that = this;
that.visible = false;
that.loading = true;
let date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
......@@ -531,6 +540,19 @@ export default {
myChart1 = echarts.init(chartDom1);
//技术领域云图
let color = [
"#FF4040",
"#FFA500",
"#3CB371",
"#8470FF",
"#FA8072",
"#EEA9B8",
"#9F79EE",
"#87CEFF",
"#DA70D6",
"#00B2EE",
"#f9e88b",
];
myChart1.setOption({
series: [
{
......@@ -541,16 +563,9 @@ export default {
//随机生成字体颜色
// maskImage: maskImage,
textStyle: {
color: function () {
return (
"rgb(" +
Math.round(Math.random() * 255) +
", " +
Math.round(Math.random() * 255) +
", " +
Math.round(Math.random() * 255) +
")"
);
color: function (params) {
var index = params.dataIndex;
return color[index % color.length];
},
},
left: "center",
......@@ -566,7 +581,7 @@ export default {
});
//智能推荐表格请求前10个
let listRecommend = []
let listRecommend = [];
Recommend({
id: that.id,
page: that.currentPage,
......@@ -619,10 +634,8 @@ export default {
// 设置图片模块
doc.attachModule(new ImageModule(opts));
listRecommend.forEach((item,index) => {
item.index = index+1
listRecommend.forEach((item, index) => {
item.index = index + 1;
item.qualif = [];
if (item.high_new == 1) {
item.qualif.push("高新技术企业");
......@@ -676,10 +689,14 @@ export default {
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
});
//formData文件流
that.blobToBase64(out, that.formState.email, that.details.gkh,this.id);
that.blobToBase64(
out,
that.formState.email,
that.details.gkh,
that.id
);
// 将目标文件对象保存为目标类型的文件,并命名
// saveAs(out, `专利成果转移转化智能推荐报告.docx`);
that.visible = false;
}
);
}, 1000);
......@@ -690,25 +707,24 @@ export default {
// 处理验证失败的情况
});
},
blobToBase64(blob, email, name) {
blobToBase64(blob, email, name, id) {
return new Promise((resolve, reject) => {
const fileReader = new FileReader();
fileReader.onload = (e) => {
setTimeout(function () {
exportword({
report_data: e.target.result,
email: email,
name: name,
f_type:'patent',
ent_or_pat_id:id
f_type: "patent",
ent_or_pat_id: id,
}).then((res) => {
if (res.code == 0) {
this.loading = false;
message.success(res.msg);
} else {
message.error(res.msg);
}
});
}, 300);
};
// readAsDataURL
fileReader.readAsDataURL(blob);
......@@ -923,7 +939,7 @@ export default {
color: #333333;
font-size: 20px;
}
.tags{
.tags {
margin: 5px;
}
.card_desc {
......
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