package com.datav.bigscreen.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PathVariable;
import java.io.*;
/**
* 返回json格式
* @author user
*
*/
@RestController
@RequestMapping("/json")
public class Process {
@RequestMapping("/{filename}")
public String json(@PathVariable("filename") String filename) throws Exception {
System.out.println(filename);
ChangeJSON(filename);
String jsonStr = readJSON(filename);
System.out.println(jsonStr);
return jsonStr;
}
public void ChangeJSON(String filename) throws Exception {
System.out.println("正在访问:" + filename);
if (filename.equals("bar_ROA.json"))
{
int max=100, min=1;
String objectStr = String.format("{\"xAxis\": {\"data\": [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\"]}, \"series\": [{\"data\": [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d]}]}",
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min),
(int) (Math.random()*(max-min)+min));
System.out.println(objectStr);
StringWrite(filename, objectStr);
}else if (filename.equals("geo_map_world.json"))
{
int max=1000, min=1;
String objectStr = String.format("[{\"name\": \"Afghanistan\", \"value\": %d}, {\"name\": \"Angola\", \"value\": %d}, {\"name\": \"Albania\", \"value\": %d}, {\"name\": \"United Arab Emirates\", \"value\": %d}, {\"name\": \"Argentina\", \"value\": %d}, {\"name\": \"Armenia\", \"value\": %d}, {\"name\": \"French Southern and Antarctic Lands\", \"value\": %d}, {\"name\": \"Australia\", \"value\": %d}, {\"name\": \"Austria\", \"value\": %d}, {\"name\": \"Azerbaijan\", \"value\": %d}, {\"name\": \"Burundi\", \"value\": 156}, {\"name\": \"Belgium\", \"value\": 197}, {\"name\": \"Benin\", \"value\": 456}, {\"name\": \"Burkina Faso\", \"value\": 311}, {\"name\": \"Bangladesh\", \"value\": 81}, {\"name\": \"Bulgaria\", \"value\": 542}, {\"name\": \"The Bahamas\", \"value\": 523}, {\"name\": \"Bosnia and Herzegovina\", \"value\": 569}, {\"name\": \"Belarus\", \"value\": 809}, {\"name\": \"Belize\", \"value\": 661}, {\"name\": \"Bermuda\", \"value\": 698}, {\"name\": \"Bolivia\", \"value\": 633}, {\"name\": \"Brazil\", \"value\": 416}, {\"name\": \"Brunei\", \"value\": 834}, {\"name\": \"Bhutan\", \"value\": 178}, {\"name\": \"Botswana\", \"value\": 180}, {\"name\": \"Central African Republic\", \"value\": 109}, {\"name\": \"Canada\", \"value\": 212}, {\"name\": \"Switzerland\", \"value\": 314}, {\"name\": \"Chile\", \"value\": 597}, {\"name\": \"China\", \"value\": 758}, {\"name\": \"Ivory Coast\", \"value\": 673}, {\"name\": \"Cameroon\", \"value\": 90}, {\"name\": \"Democratic Republic of the Congo\", \"value\": 822}, {\"name\": \"Republic of the Congo\", \"value\": 434}, {\"name\": \"Colombia\", \"value\": 399}, {\"name\": \"Costa Rica\", \"value\": 208}, {\"name\": \"Cuba\", \"value\": 720}, {\"name\": \"Northern Cyprus\", \"value\": 943}, {\"name\": \"Cyprus\", \"value\": 569}, {\"name\": \"Czech Republic\", \"value\": 95}, {\"name\": \"Germany\", \"value\": 98}, {\"name\": \"Djibouti\", \"value\": 577}, {\"name\": \"Denmark\", \"value\": 872}, {\"name\": \"Dominican Republic\", \"value\": 497}, {\"name\": \"Algeria\", \"value\": 165}, {\"name\": \"Ecuador\", \"value\": 794}, {\"name\": \"Egypt\", \"value\": 102}, {\"name\": \"Eritrea\", \"value\": 110}, {\"name\": \"Spain\", \"value\": 369}, {\"name\": \"Estonia\", \"value\": 190}, {\"name\": \"Ethiopia\", \"value\": 265}, {\"name\": \"Finland\", \"value\": 850}, {\"name\": \"Fiji\", \"value\": 812}, {\"name\": \"Falkland Islands\", \"value\": 699}, {\"name\": \"France\", \"value\": 330}, {\"name\": \"Gabon\", \"value\": 887}, {\"name\": \"United Kingdom\", \"value\": 772}, {\"name\": \"Georgia\", \"value\": 436}, {\"name\": \"Ghana\", \"value\": 574}, {\"name\": \"Guinea\", \"value\": 998}, {\"name\": \"Gambia\", \"value\": 225}, {\"name\": \"Guinea Bissau\", \"value\": 972}, {\"name\": \"Equatorial Guinea\", \"value\": 806}, {\"name\": \"Greece\", \"value\": 522}, {\"name\": \"Greenland\", \"value\": 876}, {\"name\": \"Guatemala\", \"value\": 217}, {\"name\": \"French Guiana\", \"value\": 830}, {\"name\": \"Guyana\", \"value\": 173}, {\"name\": \"Honduras\", \"value\": 245}, {\"name\": \"Croatia\", \"value\": 591}, {\"name\": \"Haiti\", \"value\": 57}, {\"name\": \"Hungary\", \"value\": 530}, {\"name\": \"Indonesia\", \"value\": 566}, {\"name\": \"India\", \"value\": 850}, {\"name\": \"Ireland\", \"value\": 445}, {\"name\": \"Iran\", \"value\": 179}, {\"name\": \"Iraq\", \"value\": 720}, {\"name\": \"Iceland\", \"value\": 530}, {\"name\": \"Israel\", \"value\": 396}, {\"name\": \"Italy\", \"value\": 702}, {\"name\": \"Jamaica\", \"value\": 641}, {\"name\": \"Jordan\", \"value\": 405}, {\"name\": \"Japan\", \"value\": 570}, {\"name\": \"Kazakhstan\", \"value\": 864}, {\"name\": \"Kenya\", \"value\": 466}, {\"name\": \"Kyrgyzstan\", \"value\": 346}, {\"name\": \"Cambodia\", \"value\": 277}, {\"name\": \"South Korea\", \"value\": 218}, {\"name\": \"Kosovo\", \"value\": 425}, {\"name\": \"Kuwait\", \"value\": 945}, {\"name\": \"Laos\", \"value\": 870}, {\"name\": \"Lebanon\", \"value\": 467}, {\"name\": \"Liberia\", \"value\": 625}, {\"name\": \"Libya\", \"value\": 489}, {\"name\": \"Sri Lanka\", \"value\": 495}, {\"name\": \"Lesotho\", \"value\": 487}, {\"name\": \"Lithuania\", \"value\": 424}, {\"name\": \"Luxembourg\", \"value\": 363}, {\"name\": \"Latvia\", \"value\": 802}, {\"name\": \"Morocco\", \"value\": 641}, {\"name\": \"Moldova\", \"value\": 776}, {\"name\": \"Madagascar\", \"value\": 879}, {\"name\": \"Mexico\", \"value\": 211}, {\"name\": \"Macedonia\", \"value\": 370}, {\"name\": \"Mali\", \"value\": 877}, {\"name\": \"Myanmar\", \"value\": 419}, {\"name\": \"Montenegro\", \"value\": 705}, {\"name\": \"Mongolia\", \"value\": 596}, {\"name\": \"Mozambique\", \"value\": 760}, {\"name\": \"Mauritania\", \"value\": 115}, {\"name\": \"Malawi\", \"value\": 967}, {\"name\": \"Malaysia\", \"value\": 232}, {\"name\": \"Namibia\", \"value\": 913}, {\"name\": \"New Caledonia\", \"value\": 269}, {\"name\": \"Niger\", \"value\": 398}, {\"name\": \"Nigeria\", \"value\": 239}, {\"name\": \"Nicaragua\", \"value\": 644}, {\"name\": \"Netherlands\", \"value\": 122}, {\"name\": \"Norway\", \"value\": 825}, {\"name\": \"Nepal\", \"value\": 588}, {\"name\": \"New Zealand\", \"value\": 746}, {\"name\": \"Oman\", \"value\": 677}, {\"name\": \"Pakistan\", \"value\": 772}, {\"name\": \"Panama\", \"value\": 922}, {\"name\": \"Peru\", \"value\": 622}, {\"name\": \"Philippines\", \"value\": 666}, {\"name\": \"Papua New Guinea\", \"value\": 627}, {\"name\": \"Poland\", \"value\": 949}, {\"name\": \"Puerto Rico\", \"value\": 83}, {\"name\": \"North Korea\", \"value\": 125}, {\"name\": \"Portugal\", \"value\": 138}, {\"name\": \"Paraguay\", \"value\": 537}, {\"name\": \"Qatar\", \"value\": 561}, {\"name\": \"Romania\", \"value\": 645}, {\"name\": \"Russia\", \"value\": 763}, {\"name\": \"Rwanda\", \"value\": 600}, {\"name\": \"Western Sahara\", \"value\": 460}, {\"name\": \"Saudi Arabia\", \"value\": 903}, {\"name\": \"Sudan\", \"value\": 161}, {\"name\": \"South Sudan\", \"value\": 652}, {\"name\": \"Senegal\", \"value\": 161}, {\"name\": \"Solo
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
1. 前后端分离:前端 Echarts JavaScript BootStrap; 后端Python Flask; 2. 数据动态更新:服务端触发数据源的变化,前端AJAX自动获取最新数据并渲染到Echarts图表上; 3. 数据格式:JSON; 更多Python&Echarts版的数据可视化大屏源码: https://yydatav.blog.csdn.net/article/details/120705616 更多Java SpringBoot&Echarts版的数据可视化大屏源码: https://yydatav.blog.csdn.net/article/details/123652970 更多《工厂订单出入库信息管理系统》案例源码: https://yydatav.blog.csdn.net/article/details/117841646 更多【工厂扫码打印&扫码装箱&错误追溯系统】完整案例 https://yydatav.blog.csdn.net/article/details/123096879
资源推荐
资源详情
资源评论
收起资源包目录
12源码数据可视化:基于 Echarts + Java SpringBoot 实现的动态实时大屏范例-供应商大屏.zip (440个子文件)
Process.class 11KB
BigscreenApplication.class 754B
BigscreenApplicationTests.class 552B
mvnw.cmd 7KB
web20201030.css 217KB
web20201030.css 217KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
main.css 55KB
main.css 55KB
all.min.css 54KB
all.min.css 54KB
base.css 16KB
base.css 16KB
entry20200609.css 14KB
entry20200609.css 14KB
normalize20200609.css 11KB
normalize20200609.css 11KB
style20201030.css 11KB
style20201030.css 11KB
dialog.css 10KB
dialog.css 10KB
input.css 3KB
input.css 3KB
guide.css 2KB
guide.css 2KB
editor.css 2KB
editor.css 2KB
fun.css 1KB
fun.css 1KB
dom.css 803B
dom.css 803B
switch_theme.css 316B
switch_theme.css 316B
iconfont.eot 27KB
iconfont.eot 27KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regular.eot 20KB
.gitignore 395B
.gitignore 50B
ds_editor.html 8KB
ds_editor.html 8KB
divlist_editor.html 7KB
divlist_editor.html 7KB
editor_min.html 7KB
editor_min.html 7KB
ds_editor_iframe.html 7KB
ds_editor_iframe.html 7KB
index.html 6KB
index.html 6KB
div_editor.html 5KB
div_editor.html 5KB
option_editor.html 5KB
option_editor.html 5KB
index.html 5KB
index.html 5KB
base.html 3KB
base.html 3KB
403.html 2KB
403.html 2KB
updashboard.html 2KB
updashboard.html 2KB
common2.html 695B
common2.html 695B
common.html 398B
common.html 398B
dataset.html 384B
dataset.html 384B
common3.html 276B
common3.html 276B
favicon.ico 4KB
favicon.ico 4KB
maven-wrapper.jar 57KB
Process.java 12KB
BigscreenApplication.java 318B
BigscreenApplicationTests.java 214B
starfield.jpg 901KB
starfield.jpg 901KB
echarts.min.js 949KB
echarts.min.js 949KB
ace.js 707KB
ace.js 707KB
echarts-gl.min.js 626KB
echarts-gl.min.js 626KB
worker-javascript.js 337KB
worker-javascript.js 337KB
worker-html.js 330KB
worker-html.js 330KB
worker-css.js 290KB
worker-css.js 290KB
dv.js 274KB
dv.js 274KB
world.js 144KB
world.js 144KB
mode-html.js 99KB
mode-html.js 99KB
vue.js 91KB
vue.js 91KB
jquery-2.2.3.min.js 84KB
jquery-2.2.3.min.js 84KB
共 440 条
- 1
- 2
- 3
- 4
- 5
资源评论
- qq_394628802022-04-21用户下载后在一定时间内未进行评价,系统默认好评。
- m0_649410082023-06-12资源中能够借鉴的内容很多,值得学习的地方也很多,大家一起进步!
YYDataV软件开发
- 粉丝: 4w+
- 资源: 126
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功