main
黄海 2 years ago
parent 5dc443e376
commit 555daedda5

@ -18,9 +18,9 @@
<body onload="IFrameResize()">
<iframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src='05.html' frameBorder=0 noResize scrolling='no' width='100%' height='0px' vspale='0' id='childFrame1'></iframe>
<iframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src='06.html' frameBorder=0 noResize scrolling='no' width='100%' height='0px' vspale='0' id='childFrame2'></iframe>
<iframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src='07.html' frameBorder=0 noResize scrolling='no' width='100%' height='0px' vspale='0' id='childFrame3'></iframe>
<iframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src='01.html' frameBorder=0 noResize scrolling='no' width='100%' height='0px' vspale='0' id='childFrame1'></iframe>
<iframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src='02.html' frameBorder=0 noResize scrolling='no' width='100%' height='0px' vspale='0' id='childFrame2'></iframe>
<iframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src='03.html' frameBorder=0 noResize scrolling='no' width='100%' height='0px' vspale='0' id='childFrame3'></iframe>
<iframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src='index.html' frameBorder=0 noResize scrolling='no' width='100%' height='0px' vspale='0' id='childFrame4'></iframe>
</body>

@ -19,5 +19,5 @@ bar.add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "
bar.add_yaxis("商家A", [114, 55, 27, 101, 125, 27, 105])
bar.add_yaxis("商家B", [57, 134, 137, 129, 145, 60, 49])
bar.set_global_opts(title_opts=opts.TitleOpts(title="某商场销售情况"))
print(bar.dump_options())
bar.render()
bar.dump_options()

@ -7,11 +7,11 @@
</head>
<body >
<div id="76cc09604c6a4c108423d477990a1550" class="chart-container" style="width:900px; height:500px; "></div>
<div id="9b34766defea4c198caa8664040b6db7" class="chart-container" style="width:900px; height:500px; "></div>
<script>
var chart_76cc09604c6a4c108423d477990a1550 = echarts.init(
document.getElementById('76cc09604c6a4c108423d477990a1550'), 'white', {renderer: 'canvas'});
var option_76cc09604c6a4c108423d477990a1550 = {
var chart_9b34766defea4c198caa8664040b6db7 = echarts.init(
document.getElementById('9b34766defea4c198caa8664040b6db7'), 'white', {renderer: 'canvas'});
var option_9b34766defea4c198caa8664040b6db7 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
@ -223,7 +223,7 @@
}
]
};
chart_76cc09604c6a4c108423d477990a1550.setOption(option_76cc09604c6a4c108423d477990a1550);
chart_9b34766defea4c198caa8664040b6db7.setOption(option_9b34766defea4c198caa8664040b6db7);
</script>
</body>
</html>

@ -0,0 +1,74 @@
package Tools;
import cn.hutool.core.io.file.FileReader;
import cn.hutool.core.io.file.FileWriter;
import com.jfinal.kit.Kv;
import com.jfinal.kit.PropKit;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.druid.DruidPlugin;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class XT_LoadExcel {
public static void main(String[] args) throws IOException {
//1、配置数据库
PropKit.use("application.properties");
String jdbcUrl = "jdbc:mysql://10.10.14.199:22066/xt_db?rewriteBatchedStatements=true&useUnicode=true&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai";
DruidPlugin druid = new DruidPlugin(jdbcUrl, "root", "DsideaL147258369", "com.mysql.cj.jdbc.Driver");
druid.start();
// 配置ActiveRecord插件
ActiveRecordPlugin arp = new ActiveRecordPlugin(druid);
arp.start();
//读取模板内容
String level_1_template = "xt_template_level1.txt";
String level_2_template = "xt_template_level2.txt";
FileReader f1 = new FileReader(level_1_template);
String t1 = f1.readString();
FileReader f2 = new FileReader(level_2_template);
String t2 = f2.readString();
//开始读表
Set<String> _set = new HashSet<>();
String sql = "select * from t1 ";
List<Record> list = Db.find(sql);
for (Record record : list) {
_set.add(record.getStr("level_1_name"));
}
String result = "";
for (String level_1_name : _set) {
String rt1 = "";
String rt2 = "";
for (Record record : list) {
String l1 = record.getStr("level_1_name");
String l2 = record.getStr("level_2_name");
String directory = record.getStr("directory");
//二级名称
if (l1.equals(level_1_name)) {
rt2 = rt2 + t2.replace("{{level_2_name}}", l2).replace("{{level_2_url}}", "./new/" + directory + "/index.html");
}
}
//一级名称
rt1 = t1.replace("{{level_1_name}}", level_1_name).replace("{{level_2_content}}", rt2);
result = result + "\n" + rt1;
}
//保存
FileWriter writer = new FileWriter("c:\\菜单.html");
writer.write(result);
System.out.println("恭喜,菜单成功生成!");
}
}

@ -0,0 +1,8 @@
<li class="treeview">
<a href="#">
<i class="fa fa-bar-chart-o"></i> <span>{{level_1_name}}</span> <i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
{{level_2_content}}
</ul>
</li>

@ -0,0 +1 @@
<li><a href="{{level_2_url}}" target="_blank"><i class="fa ${pageIndex[2] === "preEdurunningConditions" ? "fa-circle" : "fa-circle-o"}"></i>{{level_2_name}}</a></li>

@ -0,0 +1,8 @@
<li class="treeview">
<a href="#">
<i class="fa fa-bar-chart-o"></i> <span>{{level_1_name}}</span> <i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
{{level_2_content}}
</ul>
</li>

@ -0,0 +1 @@
<li><a href="{{level_2_url}}" target="_blank"><i class="fa ${pageIndex[2] === "preEdurunningConditions" ? "fa-circle" : "fa-circle-o"}"></i>{{level_2_name}}</a></li>
Loading…
Cancel
Save