gwt-report
v1.0.60
Published
金水报告功能插件
Downloads
353
Readme
gwt-report
金水报告功能插件
简介
gwt-report
是一套基于Vue2,将转换docx文件为HTML进行编辑,并导出docx的插件
采用jszip
解压docx为xml进行数据读取;
采用echarts
和elementUI
对数据具现化展示;
采用docx.js
将动态数据导出为docx文件;
实现对docx文件的在线编辑和导出
插件展示
插件使用
# main.js
import GwtReport from 'gwt-report'
import 'gwt-report/dist/style.css'
Vue.use(GwtReport)
# 组件内 optData,title可不传,内设有默认值
<GwtReport :optData="mocData" :title="title"></GwtReport>
参数
title = 'XX报告'
mockData = {
"riverStatusList": [
{
"index": 1,
"province": "河南",
"riverName": "丹江",
"riverGrade": 79.6,
"siteCount": 10
},
{
"index": 2,
"province": "河南",
"riverName": "湘江西源",
"riverGrade": 78.5,
"siteCount": 10
},
{
"index": 3,
"province": "四川",
"riverName": "嘉陵江(四川)",
"riverGrade": 78.5,
"siteCount": 10
},
{
"index": 3,
"province": "四川",
"riverName": "雅砻江(四川)",
"riverGrade": 78.5,
"siteCount": 10
},
{
"index": 3,
"province": "西藏",
"riverName": "嘉陵江(四川)",
"riverGrade": 78.5,
"siteCount": 10
}
],
"YangAnimalStatusList": [
{
"river": "雅砻江",
"currentScore": 13,
"targetScore": 16,
"markLine": 15,
"province": "四川",
"basin": "长江上游支流"
},
{
"river": "岷江",
"currentScore": 12,
"targetScore": 16,
"markLine": 15,
"province": "四川",
"basin": "长江上游支流"
},
{
"river": "赤水河(云南)",
"currentScore": 12,
"targetScore": 17,
"markLine": 15,
"province": "云南",
"basin": "长江上游支流"
},
{
"river": "湘江",
"currentScore": 13,
"targetScore": 16,
"province": "湖南",
"basin": "长江中游支流"
},
{
"river": "沅江",
"currentScore": 14,
"targetScore": 15,
"province": "湖南",
"basin": "长江中游支流"
},
{
"river": "丹江(河南)",
"currentScore": 13.5,
"targetScore": 18,
"province": "河南",
"basin": "长江中游支流"
}
],
"secQuotaYangtzeQinghai": {
"fishProtectSum": 50,
"waterProtectSum": 50,
"groundProtectSum": 50,
"bigAnimalProtectSum": 50,
"keyPointProtectSum": 80,
"natureProtectSum": 90
},
"长江流域": {
"year": 2024,
"lastYear": 2023,
"lastYearBefore": 2022,
"avgGrade": 78,
"worstGrade": 60,
"bestGrade": 92
},
"黄河流域": {
"year": 2024,
"lastYear": 2023,
"lastYearBefore": 2022,
"avgGrade": 78,
"worstGrade": 60,
"bestGrade": 92,
"riverStatusList": [
{
"index": 1,
"province": "河南",
"riverName": "丹江",
"riverGrade": 79.6,
"siteCount": 10
},
{
"index": 2,
"province": "广西",
"riverName": "湘江西源",
"riverGrade": 78.5,
"siteCount": 10
},
{
"index": 3,
"province": "四川",
"riverName": "嘉陵江(四川)",
"riverGrade": 80,
"siteCount": 10
}
],
"animalStatusList": [
{
"river": "雅砻江",
"currentScore": 13,
"targetScore": 16,
"province": "四川",
"basin": "长江上游支流"
},
{
"river": "岷江",
"currentScore": 12,
"targetScore": 16,
"province": "四川",
"basin": "长江上游支流"
},
{
"river": "赤水河(云南)",
"currentScore": 12,
"targetScore": 17,
"province": "云南",
"basin": "长江上游支流"
},
{
"river": "湘江",
"currentScore": 13,
"targetScore": 16,
"province": "湖南",
"basin": "长江中游支流"
},
{
"river": "沅江",
"currentScore": 14,
"targetScore": 15,
"province": "湖南",
"basin": "长江中游支流"
},
{
"river": "丹江(河南)",
"currentScore": 13.5,
"targetScore": 18,
"province": "河南",
"basin": "长江中游支流"
}
],
"secQuotaYangtzeQinghai": {
"fishProtectSum": 40,
"waterProtectSum": 50,
"groundProtectSum": 60,
"bigAnimalProtectSum": 70,
"keyPointProtectSum": 80,
"natureProtectSum": 90
}
},
"辽河流域": {
"year": 2024,
"lastYear": 2023,
"lastYearBefore": 2022,
"avgGrade": 78,
"worstGrade": 60,
"bestGrade": 92,
"riverStatusList": [
{
"index": 1,
"province": "河南",
"riverName": "丹江",
"score": 79.6,
"siteCount": 10
},
{
"index": 2,
"province": "广西",
"riverName": "湘江西源",
"score": 78.5,
"siteCount": 10
},
{
"index": 3,
"province": "四川",
"riverName": "嘉陵江(四川)",
"score": 80,
"siteCount": 10
}
],
"animalStatusList": [
{
"river": "雅砻江",
"currentScore": 13,
"targetScore": 16,
"province": "四川",
"basin": "长江上游支流"
},
{
"river": "岷江",
"currentScore": 12,
"targetScore": 16,
"province": "四川",
"basin": "长江上游支流"
},
{
"river": "赤水河(云南)",
"currentScore": 12,
"targetScore": 17,
"province": "云南",
"basin": "长江上游支流"
},
{
"river": "湘江",
"currentScore": 13,
"targetScore": 16,
"province": "湖南",
"basin": "长江中游支流"
},
{
"river": "沅江",
"currentScore": 14,
"targetScore": 15,
"province": "湖南",
"basin": "长江中游支流"
},
{
"river": "丹江(河南)",
"currentScore": 13.5,
"targetScore": 18,
"province": "河南",
"basin": "长江中游支流"
}
],
"secQuotaYangtzeQinghai": {
"fishProtectSum": 40,
"waterProtectSum": 50,
"groundProtectSum": 60,
"bigAnimalProtectSum": 70,
"keyPointProtectSum": 80,
"natureProtectSum": 90
}
}
}