标准体系

master
zhy521521 12 months ago
parent b37920b5c3
commit ed5259db76

@ -1,7 +1,4 @@
## 项目启动 node-v10版本即可
## 项目适配 使用postcss-px2rem px2rem-loader进行rem适配
https://blog.csdn.net/Refuelefforts/article/details/113933784
实现原理每次打包webpack通过使用插件postcss-px2rem帮我们自动将px单位转换成rem单位
前方有坑UI框架部分组件使用JavaScript将css作为内联样式直接写在html标签内打包适配时不会读取相关css,所以要配置相关样式在style中需要" !important "进行样式覆盖。
## rem作为单位 元素是根据根元素字体大小来计算 rem高度不适配解决方案 媒体查询 vw vh
## /home/project/nginx/html/dist_0228

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -9,6 +9,7 @@
box-sizing: border-box;
// user-select: none;
}
//
* {
scrollbar-color: rgb(13, 43, 85) transparent;
@ -37,6 +38,10 @@
}
}
//el-dialog append-to-body false
.v-modal {
background: transparent !important;
}
@font-face {
font-family: YouSheBiaoTiHei;

@ -24,3 +24,12 @@ export function getSchemeTree(params) {
params,
});
}
// 标准体系查询
export function standardSystemQuery(params) {
return request({
url: "/standard/system/standardSystemQuery",
method: "post",
params,
});
}
//

@ -7,7 +7,7 @@
<titleCard>硒产业标准体系统计</titleCard>
<div class="top-item">
<div class="item" v-for="item in topList" :key="item.id"
@click="ckickItem(item.id, item.schemeName)">
@click="ckickItem(item.parentId, item.schemeName)">
<div class="title">
{{ item.schemeName }}
</div>
@ -18,7 +18,7 @@
</div>
<div class="bottom-item">
<div class="item" v-for="item in bottomList" :key="item.id"
@click="ckickItem(item.id, item.schemeName)">
@click="ckickItem(item.parentId, item.schemeName)">
<div class="title">
{{ item.schemeName }}
@ -32,140 +32,237 @@
</div>
<!-- 标准统计 -->
<div class="bztj">
<div class="bztj" v-if="sgowBox">
<titleCard>标准统计</titleCard>
<div class="bztj-card">
<div class="gj">
<div class="gj" @click="clickBztj(hyList.value)">
<div class="title">
{{ gjLIst.name }}
{{ countryList.key }}
</div>
<div class="num">{{ gjLIst.num }}</div>
<div class="num">{{ countryList.value }}</div>
</div>
<div class="hy">
<div class="hy" @click="clickBztj(hyList.value)">
<div class="title">
{{ hyList.name }}
{{ hyList.key }}
</div>
<div class="num">{{ hyList.num }}</div>
<div class="num">{{ hyList.value }}</div>
</div>
<div class="sj">
<div class="sj" @click="clickBztj(hyList.value)">
<div class="title">
{{ sjList.name }}
{{ sjList.key }}
</div>
<div class="num">{{ sjList.num }}</div>
<div class="num">{{ sjList.value }}</div>
</div>
<div class="dbz">
<div class="dbz" @click="clickBztj(hyList.value)">
<div class="title">
{{ dbzList.name }}
{{ dbzList.key }}
</div>
<div class="num">{{ dbzList.num }}</div>
<div class="num">{{ dbzList.value }}</div>
</div>
<div class="all" @click="clickBztj(hyList.value)">
<div class="title">
{{ allList.key }}
</div>
<div class="num">{{ allList.value }}</div>
</div>
</div>
</div>
<!-- 本地标准 -->
<div class="bd">
<titleCard>本地标准</titleCard>
<div class="item">
<div class="item" @click="clickBztj(hyList.value)">
<div class="title">
{{ bdList.name }}
{{ bdList.key }}
</div>
<div class="num">
{{ bdList.num }}
{{ bdList.value }}
</div>
</div>
</div>
</div>
<div class="rightWrap">
<div class="search-wrap">
<div class="search-wrap" :class="{ flexs: showChart }">
<img src="../../../public/images/go-back.png" alt="" class="imgs" v-show="!showChart"
@click="showChart = !showChart">
<div>
<el-input v-model="searchContent" placeholder="请输入搜索内容"></el-input>
<el-input v-model="searchContent" placeholder="请输入搜索内容" @keyup.enter.native="enterKeyup"></el-input>
</div>
</div>
<div id="bztx" class="charts"></div>
<div id="bztx" class="charts" v-show="showChart"></div>
<div v-show="!showChart" class="contents">
<template v-if="fileList.length">
<div class="item" v-for="(item, index) in fileList" :key="index" @click="clickFile(item)">
<div class="imgWrap">
<img src="../../../public/images/pdf.png" alt="" style="width:100% ;height: 100%;">
</div>
<div class="title">
{{ item.fileName }}
</div>
</div>
</template>
<template v-else>
<div class="nodata">
<span>
暂无数据!
</span>
</div>
</template>
</div>
</div>
</div>
<el-dialog :title="fileTitle" :visible.sync="showNewsDialog" :append-to-body="false">
<embed :src="fileSrc" type="application/pdf" width="100%" height="740px"
style="position: relative;z-index: 1008;" />
</el-dialog>
</div>
</template>
<script>
import { standardSystemStatistics, standardSystem, getSchemeTree } from '../../api/bztx/index'
import { standardSystemStatistics, standardSystem, getSchemeTree, standardSystemQuery } from '../../api/bztx/index'
export default {
data() {
return {
topList: [],
bottomList: [],
gjLIst: {
},
sgowBox: false,
names: '',
countryList: {}, // gjLIst
hyList: {},
sjList: {},
dbzList: {},
allList:{},
bdList: {},
option: {
tooltip: {
tooltip: { //
trigger: 'item',
triggerOn: 'mousemove',
backgroundColor: "#fff"
triggerOn: 'mousemove', //
enterable: true, // false
},
series: [
{
type: 'tree',
id: 0,
name: 'tree1',
data: [],
top: '10%',
left: '10%',
bottom: '10%',
right: '10%',
symbolSize: 7,
edgeShape: 'polyline',
edgeForkPosition: '63%',
initialTreeDepth: 3,
lineStyle: {
width: 2
name: '树图',
top: '5%', // 2020%
left: '5%', //
bottom: '5%', //
right: '10%', //
layout: 'orthogonal', // orthogonalradial
orient: 'LR', // 'LR','RL','TB','BT'
edgeShape: 'polyline', // 线curve线polyline
roam: false, // false
// initialTreeDepth: 0, // 0
// symbol: 'arrow', // emptyCircle;circle,rect,roundRect,triangle,diamond,pin,arrow,none
// symbolRotate: 270, // arrow使
symbolSize: 5, // 00
itemStyle: { //
color: '#1890FF', //
borderColor: 'rgba(255, 144, 0, 1)', //
borderWidth: 1, // 线0
borderType: 'dotted', //
borderCap: 'square', // 线buttroundsquare
shadowColor: 'rgba(0,121,221,0.3)', //
shadowBlur: 16, //
opacity: 1 //
},
itemStyle: {
color: 'none', //
borderColorSaturation: 0.6, // 线
borderWidth: 0, // 线
emphasis: {
shadowBlur: 5, //
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
label: { //
show: true, //
distance: 8, //
position: 'left', //
verticalAlign: 'middle', // topmiddlebottom
align: 'center', // leftrightcenter
fontSize: 12, //
color: '#fff', //
backgroundColor: '#042248', //
borderColor: '#1890FF', //
borderWidth: 1, //
borderType: 'solid', // solid dashed dotted
borderRadius: 4, //
padding: [6, 6], //
shadowColor: 'rgba(0,121,221,0.3)', //
shadowBlur: 4, //
width: 80,
// width
overflow: 'truncate', // truncateellipsis...;break;breakAll
ellipsis: '...'
},
label: {
position: 'left',
verticalAlign: 'middle',
align: 'right',
textStyle: {
fontSize: 12,
fontFamily: 'PingFangSC, PingFang SC',
fontWeight: 400,
color: '#fff',
padding: 10,
// backgroundColor: '#fff',
lineStyle: { //
color: '#fff', //
width: 1, //
curveness: 0.5, //
shadowColor: 'rgba(0, 0, 0, 1)', //
// shadowBlur: 10 //
},
emphasis: { //
disabled: true, // false
//
focus: 'self', // noneselfseriesancestordescendantrelative
blurScope: 'coordinateSystem', // focuscoordinateSystemseriesglobal
itemStyle: { //
color: '#1890FF', //
// borderColor: 'rgba(255, 144, 0, 1)', //
borderWidth: 1, // 线0
borderType: 'solid', // solid dashed dotted
borderCap: 'square', // 线buttroundsquare
shadowColor: 'rgba(0,121,221,0.3)', //
shadowBlur: 12, //
opacity: 1 //
},
lineStyle: { //
color: 'rgba(0,0,0,.45)', //
width: 2, //
curveness: 0.5, //
shadowColor: 'rgba(0, 0, 0, 0.5)', //
shadowBlur: 6 //
},
label: { //
color: '#333',
fontWeight: 600
}
},
blur: { // emphasis.focus
itemStyle: {}, //
lineStyle: {}, //
label: {} //
},
leaves: {
label: {
leaves: { //
label: { //
// distance: 8,
// color: '#1890FF',
position: 'right',
verticalAlign: 'middle',
align: 'left'
}
},
emphasis: {
focus: 'descendant'
align: 'center'
},
itemStyle: {}, //
emphasis: {}, //
blur: {}, //
select: {} //
},
expandAndCollapse: false,//
animationDuration: 550,
animationDurationUpdate: 750 //
}
]
},
searchContent: ''
animation: true, //
expandAndCollapse: false, //
animationDuration: 550, //
animationEasing: 'linear', //
animationDelay: 0, //
animationDurationUpdate: 750, //
animationEasingUpdate: 'cubicInOut', //
animationDelayUpdate: 0 //
}]
},
searchContent: '',
showChart: true,
fileList: [],
showNewsDialog: false,
fileSrc: '',
fileTitle: '',
schemeId: '', //id
filetype: '', //
myChart: null
}
},
@ -173,9 +270,11 @@ export default {
this.$store.commit('SET_ROUTERINFO', this.$route.meta)
},
mounted() {
this.standardSystemStatistics()
this.standardSystem()
window.addEventListener("resize", () => {
this.myChart.resize();
});
},
methods: {
//
@ -184,55 +283,52 @@ export default {
if (res.code == 200) {
this.topList = res.data.slice(0, 2)
this.bottomList = res.data.slice(2, 5)
// console.log(this.topList, this.bottomList)
Object.keys(res.data[0]).length && this.ckickItem(res.data[0].id, res.data[0].schemeName)
this.schemeId = res.data[0].parentId
Object.keys(res.data[0]).length && this.getSchemeTree(res.data[0].parentId, res.data[0].schemeName)
}
})
},
//
//
standardSystem() {
standardSystem().then(res => {
if (res.code == 200) {
for (const key in res.data) {
if (key == '国家标准') {
this.gjList = {
name: key,
num: res.data[key]
}
this.countryList = res.data.国家标准
}
if (key == '行业标准') {
this.hyList = {
name: key,
num: res.data[key]
}
this.hyList = res.data.行业标准
}
if (key == '省级地方标准') {
this.sjList = {
name: key,
num: res.data[key]
}
this.sjList = res.data.省级地方标准
}
if (key == '待编制标准') {
this.dbzList = {
name: key,
num: res.data[key]
this.dbzList = res.data.待编制标准
}
if(key == '总数'){
this.allList = {
key:key,
value:res.data[key]
}
}
if (key == '本地标准') {
this.bdList = {
name: key,
num: res.data[key]
}
this.bdList = res.data.本地标准
}
this.sgowBox = true
}
console.log(this.gjList)
}
})
},
//
ckickItem(id, fatherData) {
this.schemeId = id
this.filetype = ""
this.showChart = true
this.getSchemeTree(id, fatherData)
},
//
getSchemeTree(id, fatherData) {
console.log(fatherData)
let params = {
parentId: id
@ -241,146 +337,85 @@ export default {
if (res.code == 200) {
let nweDate = [], echartsData = []
if (res.data.length) {
nweDate = res.data.map(item => {
return {
name: item.schemeName
}
});
echartsData = [{ name: fatherData, children: [...nweDate] }]
nweDate = this.dealData(res.data)
echartsData = [{ name: '硒产业标准体系统计', schemeId: id, children: [...nweDate] }]
}
console.log('树状图数据', echartsData)
this.initEcharts(echartsData)
}
})
},
dealData(data) {
console.log(4444, data)
var treeData = []
data.forEach(item => {
item.name = item.schemeName
item.schemeId = item.parentId
treeData.push({ ...item })
if (item.children) {
console.log([item.children])
this.dealData(item.children)
}
})
return treeData
},
initEcharts(echartsData) {
var chartDom = document.getElementById('bztx');
var myChart = this.$echarts.init(chartDom);
// const data = {
// name: 'flare',
// children: [
// {
// name: 'data',
// children: [
// {
// name: 'converters',
// children: [
// { name: 'Converters', value: 721 },
// { name: 'DelimitedTextConverter', value: 4294 }
// ]
// },
// {
// name: 'DataUtil',
// value: 3322
// }
// ]
// },
// {
// name: 'display',
// children: [
// { name: 'DirtySprite', value: 8833 },
// { name: 'LineSprite', value: 1732 },
// { name: 'RectSprite', value: 3623 }
// ]
// },
// {
// name: 'flex',
// children: [{ name: 'FlareVis', value: 4116 }]
// },
// {
// name: 'query',
// children: [
// { name: 'AggregateExpression', value: 1616 },
// { name: 'And', value: 1027 },
// { name: 'Arithmetic', value: 3891 },
// { name: 'Average', value: 891 },
// { name: 'BinaryExpression', value: 2893 },
// { name: 'Comparison', value: 5103 },
// { name: 'CompositeExpression', value: 3677 },
// { name: 'Count', value: 781 },
// { name: 'DateUtil', value: 4141 },
// { name: 'Distinct', value: 933 },
// { name: 'Expression', value: 5130 },
// { name: 'ExpressionIterator', value: 3617 },
// { name: 'Fn', value: 3240 },
// { name: 'If', value: 2732 },
// { name: 'IsA', value: 2039 },
// { name: 'Literal', value: 1214 },
// { name: 'Match', value: 3748 },
// { name: 'Maximum', value: 843 },
// {
// name: 'methods',
// children: [
// { name: 'add', value: 593 },
// { name: 'and', value: 330 },
// { name: 'average', value: 287 },
// { name: 'count', value: 277 },
// { name: 'distinct', value: 292 },
// { name: 'div', value: 595 },
// { name: 'eq', value: 594 },
// { name: 'fn', value: 460 },
// { name: 'gt', value: 603 },
// { name: 'gte', value: 625 },
// { name: 'iff', value: 748 },
// { name: 'isa', value: 461 },
// { name: 'lt', value: 597 },
// { name: 'lte', value: 619 },
// { name: 'max', value: 283 },
// { name: 'min', value: 283 },
// { name: 'mod', value: 591 },
// { name: 'mul', value: 603 },
// { name: 'neq', value: 599 },
// { name: 'not', value: 386 },
// { name: 'or', value: 323 },
// { name: 'orderby', value: 307 },
// { name: 'range', value: 772 },
// { name: 'select', value: 296 },
// { name: 'stddev', value: 363 },
// { name: 'sub', value: 600 },
// { name: 'sum', value: 280 },
// { name: 'update', value: 307 },
// { name: 'variance', value: 335 },
// { name: 'where', value: 299 },
// { name: 'xor', value: 354 },
// { name: 'x_x', value: 264 }
// ]
// },
// { name: 'Minimum', value: 843 },
// { name: 'Not', value: 1554 },
// { name: 'Or', value: 970 },
// { name: 'Query', value: 13896 },
// { name: 'Range', value: 1594 },
// { name: 'StringUtil', value: 4130 },
// { name: 'Sum', value: 791 },
// { name: 'Variable', value: 1124 },
// { name: 'Variance', value: 1876 },
// { name: 'Xor', value: 1101 }
// ]
// },
// {
// name: 'scale',
// children: [
// { name: 'IScaleMap', value: 2105 },
// { name: 'LinearScale', value: 1316 },
// { name: 'LogScale', value: 3151 },
// { name: 'OrdinalScale', value: 3770 },
// { name: 'QuantileScale', value: 2435 },
// { name: 'QuantitativeScale', value: 4839 },
// { name: 'RootScale', value: 1756 },
// { name: 'Scale', value: 4268 },
// { name: 'ScaleType', value: 1821 },
// { name: 'TimeScale', value: 5833 }
// ]
// }
// ]
// };
this.myChart = this.$echarts.init(chartDom);
this.option.series[0].data = echartsData
console.log(9999, this.option.series[0].data)
this.option && myChart.setOption(this.option);
//
let that = this
this.myChart.on('click', function (params) {
console.log('查看文档', params)
//
// params.data.name
that.getStandardSystemQuery('');
});
this.option && this.myChart.setOption(this.option);
},
//
getStandardSystemQuery(filename) {
console.log('搜索', filename)
let params = {
filename,
schemeId: this.schemeId,
filetype: this.filetype,
}
standardSystemQuery(params).then(res => {
if (res.code == 200) {
this.fileList = res.data
this.showChart = false
}
})
},
//
clickFile(item) {
this.showNewsDialog = true
this.fileTitle = item.fileName
this.fileSrc = process.env.VUE_APP_PATH_PRE + item.filePath
},
//
enterKeyup() {
this.showChart = false
this.getStandardSystemQuery(this.searchContent, '')
},
//
clickBztj(value) {
this.filetype = value
// this.schemeId = ""
this.getStandardSystemQuery()
console.log(value)
}
},
watch: {
searchContent(value) {
if (value.length == 0) {
console.log('监听')
this.showChart = true
}
}
}
}
</script>
@ -398,7 +433,6 @@ export default {
position: relative;
top: 7.8vh;
height: calc(100% - 7.8vh);
// border: 1px solid red;
box-sizing: border-box;
padding: 0 10px;
display: flex;
@ -462,7 +496,7 @@ export default {
.bztj-card {
width: 100%;
height: 240px;
height: 26.086vh;
background-image: url('../../../public/images/bztxcard.png');
background-size: 99% 100%;
background-repeat: no-repeat;
@ -486,42 +520,65 @@ export default {
.gj,
.hy,
.sj,
.dbz {
.dbz,
.all {
width: 100px;
text-align: center;
position: absolute;
// border: 1px solid red;
}
.gj {
left: 0;
top: -10px;
// border: 1px solid red;
}
.gj:hover {
cursor: pointer;
}
.hy {
right: 0;
top: -10px;
}
.hy:hover {
cursor: pointer;
}
.sj {
left: 0;
bottom: 35px;
}
.sj:hover {
cursor: pointer;
}
.dbz {
right: 0;
bottom: 35px;
}
.dbz:hover {
cursor: pointer;
}
.all {
left: 150px;
top:5.978vh;
}
.all:hover {
cursor: pointer;
}
}
.bd {
.item {
margin: auto;
height: 100px;
height: 10.87vh;
width: 40%;
// border: 1px solid red;
background-image: url('../../../public/images/xcybg.png');
background-size: 100% 100%;
background-position-y: 15px;
@ -562,13 +619,18 @@ export default {
.search-wrap {
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
height: 50px;
height: 5.435vh;
width: 100%;
box-sizing: border-box;
padding-right: 20px;
.imgs {
width: 30px;
margin-left: 20px;
}
.search {
width: 150px;
width: 100%;
@ -579,18 +641,97 @@ export default {
border: 1px solid;
border-image: linear-gradient(124deg, rgb(119, 194, 251), rgb(43, 101, 215), rgb(43, 101, 215)) 1 1;
background: none;
height: 30px;
height: 3.261vh;
color: #fff;
}
}
.charts {
.flexs {
justify-content: flex-end;
}
.charts,
.contents {
width: 100%;
height: calc(100% - 50px);
height: calc(100% - 3.261vh);
}
.contents {
box-sizing: border-box;
padding: 20px 0 0 20px;
display: flex;
flex-wrap: wrap;
.item {
width: 200px;
height: 21.74vh;
margin: 0 20px 2.174vh 0;
.imgWrap {
margin: 20px auto;
width: 100px;
height: 10.87vh;
}
.title {
font-size: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.item:hover {
background-image: url('../../../public/images/pdfbg.png');
background-size: 100% 100%;
cursor: pointer;
}
.nodata {
width: 100%;
height: 650px;
line-height: 650px;
text-align: center;
font-size: 20px;
opacity: 0.7;
}
}
}
}
/deep/ .el-dialog__title {
color: #fff;
font-size: 16px;
}
/deep/ .el-dialog__body {
padding: 0 20px 20px;
height: 69.565vh;
}
/deep/.el-dialog__wrapper {
// position: absolute !important;
margin: auto;
height: 86.956vh;
width: 60%;
background-image: url('../../../public/images/vediobg.png');
background-size: 100% 100%;
}
/deep/ .el-dialog {
background: none;
height: 100%;
width: 100%;
margin: 0;
margin-top: 0 !important;
}
}
</style>

@ -20,14 +20,17 @@ export default {
},
mounted() {
productOutput().then(res => {
var xAxisData = res.data.map(item => {
return item.productName
})
var seriesData = res.data.map(item => {
return item.productQuantity
})
this.$refs.cpcl.option.grid.left = 8+"%"
this.$refs.cpcl.getInitEcharts(xAxisData, seriesData)
if (res.code == 200) {
var xAxisData = res.data.map(item => {
return item.productName
})
var seriesData = res.data.map(item => {
return item.productQuantity
})
this.$refs.cpcl.option.grid.left = 8 + "%"
this.$refs.cpcl.getInitEcharts(xAxisData, seriesData)
}
})
},

@ -36,7 +36,11 @@ export default {
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 400;
color: #ECF4F9;
overflow: scroll;
.content{
height: 12vh;
overflow: scroll;
}
}
</style>

@ -19,7 +19,7 @@
<!-- 作者:{{ itemContent.createBy }} -->
</p>
<p class="content">
{{ itemContent.eventTitle }}
{{ itemContent.eventContent }}
</p>
</div>

@ -1,6 +1,6 @@
<template>
<div class="fwfb-wrap">
<titleCard>{{range}}发文省直辖市分布()
<titleCard>{{ range }}发文省直辖市分布()
</titleCard>
<div class="fwfb-chart">
<div id="fwfb" style="width: 100%;height: 100%;"></div>
@ -10,10 +10,10 @@
<script>
import { distributionOfPublicationsBase } from '../../../api/zygk/index'
export default {
props:{
range:{
type:String,
default:'全球'
props: {
range: {
type: String,
default: '全球'
}
},
data() {
@ -75,7 +75,7 @@ export default {
orient: 'vertical',
series: [
{
name: 'Radius Mode',
name: '',
type: 'pie',
radius: [0, 60],
center: ['50%', '50%'],
@ -131,10 +131,14 @@ export default {
},
]
}
},
mapChart:null
}
},
mounted() {
window.addEventListener("resize", () => {
this.mapChart.resize();
});
},
methods: {
getfwfbEchart(courtryIndex) {
@ -152,8 +156,8 @@ export default {
this.option.legend[0].data = this.option.series[0].data.slice(0, 4)
this.option.legend[1].data = this.option.series[0].data.slice(4, 8)
var chartDom = document.getElementById('fwfb');
var myChart = this.$echarts.init(chartDom);
this.option && myChart.setOption(this.option);
this.mapChart = this.$echarts.init(chartDom);
this.option && this.mapChart.setOption(this.option);
}
})

@ -133,10 +133,14 @@ export default {
left: '8%',
right: '0'
}
}
},
mapChart:null,
}
},
mounted() {
window.addEventListener("resize", () => {
this.mapChart.resize();
});
},
methods: {
getfwqsEchart(courtryIndex) {
@ -152,11 +156,8 @@ export default {
return item.count * 1
})
var chartDom = document.getElementById('fxqs');
var myChart = this.$echarts.init(chartDom);
this.option && myChart.setOption(this.option);
window.addEventListener("resize", () => {
this.mapChart.resize();
});
this.mapChart = this.$echarts.init(chartDom);
this.option && this.mapChart.setOption(this.option);
}
})

@ -1,6 +1,6 @@
<template>
<div class="fwyj-wrap">
<titleCard>{{range}}功能农业领域发文研究分支分布</titleCard>
<titleCard>{{ range }}功能农业领域发文研究分支分布</titleCard>
<div class="fwyj-zx">
<div id="fxyj" style="width: 100%;height: 100%;">
</div>
@ -10,10 +10,10 @@
<script>
import { researchBranchDistributionBase } from '../../../api/zygk'
export default {
props:{
range:{
type:String,
default:'全球'
props: {
range: {
type: String,
default: '全球'
}
},
data() {
@ -79,7 +79,7 @@ export default {
},
yAxis: {
type: 'category',
data: ['规划', '万法学', '标准', '精准营养', '精准加工', '养殖', '功能种子', '功能肥料', '功能土壤', '功能成分'],
data: [],
fontSize: 10,
axisLabel: {
interval: 0, //0
@ -105,7 +105,7 @@ export default {
{
// name: '',
type: 'bar',
data: [20, 200, 300, 150, 320, 450, 100, 600, 500, 200],
data: [],
showBackground: true,
barWidth: 6, //
//
@ -132,26 +132,37 @@ export default {
},
]
],
mapChart: null
}
}
},
mounted() {
window.addEventListener("resize", () => {
this.mapChart.resize();
});
},
methods: {
getfwyjEchart(courtryIndex) {
let params = {
articleCountryType: courtryIndex
}
researchBranchDistributionBase(params).then(res => { })
var chartDom = document.getElementById('fxyj');
var myChart = this.$echarts.init(chartDom);
this.option && myChart.setOption(this.option);
window.addEventListener("resize", () => {
this.mapChart.resize();
});
researchBranchDistributionBase(params).then(res => {
if (res.code == 200) {
this.option.yAxis.data = res.data.map(item => {
return item.key
})
this.option.series[0].data = res.data.map(item => {
return item.count * 1
})
var chartDom = document.getElementById('fxyj');
this.mapChart = this.$echarts.init(chartDom);
this.option && this.mapChart.setOption(this.option);
}
})
}
}
}

@ -213,12 +213,15 @@ export default {
},
]
}
},
mapChart:null
}
},
mounted() {
window.addEventListener("resize", () => {
this.mapChart.resize();
});
},
methods: {
getsmzqEchart(courtryIndex) {
@ -236,8 +239,8 @@ export default {
})
console.log("this.option.series[0]", this.option.series[0])
var chartDom = document.getElementById('smzq');
var myChart = this.$echarts.init(chartDom);
this.option && myChart.setOption(this.option);
this.mapChart = this.$echarts.init(chartDom);
this.option && this.mapChart.setOption(this.option);
}
})

@ -1,6 +1,6 @@
<template>
<div class="zlnd-wrap">
<titleCard>{{range}}功能农业领域专利年代分布</titleCard>
<titleCard>{{ range }}功能农业领域专利年代分布</titleCard>
<div class="zlnd-zx">
<div id="zlnd" style="width: 100%;height: 100%;">
</div>
@ -10,10 +10,10 @@
<script>
import { distributionPatentAgesTheAgriculturalField } from '../../../api/zygk/index'
export default {
props:{
range:{
type:String,
default:'全球'
props: {
range: {
type: String,
default: '全球'
}
},
data() {
@ -113,11 +113,14 @@ export default {
left: '10%',
right: '0'
}
}
},
mapChart:null
}
},
mounted() {
window.addEventListener("resize", () => {
this.mapChart.resize();
});
},
methods: {
getzlndEchart(courtryIndex) {
@ -133,11 +136,9 @@ export default {
return item.count * 1
})
var chartDom = document.getElementById('zlnd');
var myChart = this.$echarts.init(chartDom);
this.option && myChart.setOption(this.option);
window.addEventListener("resize", () => {
this.mapChart.resize();
});
this.mapChart = this.$echarts.init(chartDom);
this.option && this.mapChart.setOption(this.option);
}
})

@ -75,7 +75,7 @@ export default {
orient: 'vertical',
series: [
{
name: 'Radius Mode',
name: '',
type: 'pie',
radius: [0, 60],
center: ['50%', '50%'],

@ -78,7 +78,7 @@ export default {
},
yAxis: {
type: 'category',
data: ['规划', '万法学', '标准', '精准营养', '精准加工', '养殖', '功能种子', '功能肥料', '功能土壤', '功能成分'],
data: [],
fontSize: 10,
axisLabel: {
interval: 0, //0
@ -104,7 +104,7 @@ export default {
{
// name: '',
type: 'bar',
data: [20, 200, 300, 150, 320, 450, 100, 600, 500, 200],
data: [],
showBackground: true,
barWidth: 6, //
itemStyle: {
@ -131,7 +131,8 @@ export default {
]
}
},
mapChart:null
}
},
@ -146,11 +147,19 @@ export default {
articleCountryType: courtryIndex
}
researchBranchDistribution(params).then(res => {
if (res.code == 200) {
this.option.yAxis.data = res.data.map(item => {
return item.key
})
this.option.series[0].data = res.data.map(item => {
return item.count * 1
})
var chartDom = document.getElementById('zlyjfb');
this.mapChart = this.$echarts.init(chartDom);
this.option && this.mapChart.setOption(this.option);
}
})
var chartDom = document.getElementById('zlyjfb');
var myChart = this.$echarts.init(chartDom);
this.option && myChart.setOption(this.option);
}
}

@ -18,7 +18,6 @@ export default {
},
data() {
return {
option: {
tooltip: {
trigger: 'axis',
@ -124,11 +123,8 @@ export default {
bottom: '30%',
},
}
},
mapChart:null
}
},
mounted() {
@ -156,8 +152,8 @@ export default {
})
console.log(this.option.xAxis.data, this.option.yAxis.data, this.option.series.data)
var chartDom = document.getElementById('zxfb');
var myChart = this.$echarts.init(chartDom);
this.option && myChart.setOption(this.option);
this.mapChart = this.$echarts.init(chartDom);
this.option && this.mapChart.setOption(this.option);
}
})

Loading…
Cancel
Save