Commit aee9f71d by liudx

联调导出问题

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