'修改界面样式风格'
This commit is contained in:
@@ -7,26 +7,35 @@
|
|||||||
<link rel="stylesheet" href="../res/css/zui-theme.css">
|
<link rel="stylesheet" href="../res/css/zui-theme.css">
|
||||||
<link rel="stylesheet" href="../res/css/red-kit.css">
|
<link rel="stylesheet" href="../res/css/red-kit.css">
|
||||||
<style>
|
<style>
|
||||||
|
.logo h1{
|
||||||
|
float: left;
|
||||||
|
color: #ccc;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 150px;
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body id="home">
|
<body id="home">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<row>
|
<row>
|
||||||
<div class="col-md-12" id="top">
|
<div class="col-md-12" id="top">
|
||||||
|
<div class="logo">
|
||||||
|
<h1>Meta-Kit</h1>
|
||||||
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<!--item in pages-->
|
<!--item in pages-->
|
||||||
<li v-for="item in pages" @click="loadMain(item)" :class="{active:item.name==pageId}">
|
<li v-for="item in pages" @click="loadMain(item)" :class="{active:item.name==pageId}">
|
||||||
<a data-tab href="#" v-text="item.name"></a>
|
<a data-tab href="#" v-text="item.name"></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="pull-right" style="padding-top: 10px">
|
<li class="pull-right">
|
||||||
<select v-model="sysPlat" class="form-control" style="border: 0;background-color: #404a53;color: #fff;">
|
<select v-model="sysPlat" class="form-control" style="border: 0;background-color: #404a53;color: #fff;">
|
||||||
<option v-for="item in sysPlats" :value="item" v-text="item.name"></option>
|
<option v-for="item in sysPlats" :value="item" v-text="item.name"></option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="pull-right" style="padding-top: 10px">
|
<li class="pull-right">
|
||||||
<a style="padding: 6px 15px;border: 0;background-color: #404a53;color: #fff;">
|
<a style="padding: 6px 15px;border: 0;background-color: #404a53;color: #fff;">
|
||||||
<i class="icon icon-user"></i> root
|
<i class="icon icon-user"></i> root
|
||||||
</a>
|
</a>
|
||||||
@@ -73,7 +82,7 @@
|
|||||||
sysPlat: red.getData("sysPlat"),
|
sysPlat: red.getData("sysPlat"),
|
||||||
sysPlats: red.getData("sysPlats"),
|
sysPlats: red.getData("sysPlats"),
|
||||||
pages: [
|
pages: [
|
||||||
{name: "DDL", url: "/qtask/ddl.html"},
|
/*{name: "DDL", url: "/qtask/ddl.html"},*/
|
||||||
{name: "MetaData", url: "/meta", nodes: [
|
{name: "MetaData", url: "/meta", nodes: [
|
||||||
/*{url:"/metadata/metatable/list.html", name:"TableList"},*/
|
/*{url:"/metadata/metatable/list.html", name:"TableList"},*/
|
||||||
{url:"/metadata/metatable/metaTable.html", name:"MetaTable"},
|
{url:"/metadata/metatable/metaTable.html", name:"MetaTable"},
|
||||||
@@ -99,6 +108,7 @@
|
|||||||
{url:"/plat/db.html", name:"数据中心", icon: "icon-database"},
|
{url:"/plat/db.html", name:"数据中心", icon: "icon-database"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{name: "关于", url: "/single/about.html"}
|
||||||
|
|
||||||
],
|
],
|
||||||
menus: red.getData("menus", [
|
menus: red.getData("menus", [
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ body {
|
|||||||
}
|
}
|
||||||
#top {
|
#top {
|
||||||
background-color: #404a53;
|
background-color: #404a53;
|
||||||
padding: 0 10px;
|
padding: 5px 10px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
height: 45px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
#top a {
|
#top a {
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
@@ -35,7 +35,9 @@ body {
|
|||||||
}
|
}
|
||||||
.nav-tabs>li>a{
|
.nav-tabs>li>a{
|
||||||
border: 0;
|
border: 0;
|
||||||
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover, .nav-tabs>li>a:hover {
|
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover, .nav-tabs>li>a:hover {
|
||||||
background-color: #404a53;
|
background-color: #404a53;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
11
root/single/about.html
Normal file
11
root/single/about.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<div id="about">
|
||||||
|
{{about}}
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var vm = new Vue({
|
||||||
|
el: "#about",
|
||||||
|
data: {
|
||||||
|
about: "AbOUT",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
151
src/main/java/net/tccn/base/FileKit.java
Normal file
151
src/main/java/net/tccn/base/FileKit.java
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
package net.tccn.base;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
|
||||||
|
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
|
||||||
|
import static java.util.Arrays.asList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by liangxianyou at 2018/5/31 10:23.
|
||||||
|
*/
|
||||||
|
public final class FileKit {
|
||||||
|
|
||||||
|
private FileKit() { }
|
||||||
|
|
||||||
|
public static void strToFile(String entityBody, File file) throws IOException {
|
||||||
|
strToFile(entityBody, file, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void strToFile(String entityBody, File file, boolean existDel) throws IOException {
|
||||||
|
if (file.exists()) {
|
||||||
|
if (existDel) {
|
||||||
|
file.delete();
|
||||||
|
}else {
|
||||||
|
throw new RuntimeException(file.getPath() + "已经存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file.getParentFile().exists()){
|
||||||
|
file.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
FileOutputStream out = new FileOutputStream(file);
|
||||||
|
out.write(entityBody.getBytes("UTF-8"));
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拷贝文件/文件目录
|
||||||
|
* @param source
|
||||||
|
* @param target
|
||||||
|
* @param linkPath
|
||||||
|
*/
|
||||||
|
public static void copyFiles(File source, File target, String linkPath) {
|
||||||
|
if (source.isDirectory()){
|
||||||
|
final String _linkPath = linkPath + File.separator+ source.getName();
|
||||||
|
asList(source.listFiles()).forEach(f->{
|
||||||
|
copyFiles(f, target, _linkPath);
|
||||||
|
});
|
||||||
|
}else if (source.isFile()){
|
||||||
|
try {
|
||||||
|
String _linkPath = "";
|
||||||
|
int index = linkPath.indexOf(File.separator, 1);
|
||||||
|
if (index > 0){
|
||||||
|
_linkPath = linkPath.substring(index);
|
||||||
|
}
|
||||||
|
File targetFile = new File(target.toPath() + _linkPath + File.separator + source.getName());
|
||||||
|
if (!targetFile.getParentFile().exists()){
|
||||||
|
targetFile.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
Files.copy(source.toPath(), targetFile.toPath(), REPLACE_EXISTING);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 clazz的路径,如果是jar里面的文件得到jar存放的目录,如:lib
|
||||||
|
* @param clazz
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String rootPath(Class clazz){
|
||||||
|
//return clazz.getClassLoader().getResource("").getPath();
|
||||||
|
URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
|
||||||
|
try {
|
||||||
|
String filePath = URLDecoder.decode(url.getPath(), "utf-8");
|
||||||
|
if (filePath.endsWith(".jar")){
|
||||||
|
return filePath.substring(0, filePath.lastIndexOf("/")+1);
|
||||||
|
}
|
||||||
|
return filePath;
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取流内的所有内容
|
||||||
|
* @param inputStream
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public static String readAll(InputStream inputStream) throws IOException {
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||||
|
StringBuffer buf = new StringBuffer();
|
||||||
|
String str;
|
||||||
|
while ((str = reader.readLine()) != null){
|
||||||
|
buf.append(str+ "\n");
|
||||||
|
}
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渲染模板到文件
|
||||||
|
* @param sourceStr
|
||||||
|
* @param target
|
||||||
|
* @param kv
|
||||||
|
*/
|
||||||
|
/*public static void tplRender(String sourceStr, File target, Kv kv){
|
||||||
|
String str = "";
|
||||||
|
if (sourceStr != null && !sourceStr.isEmpty()){
|
||||||
|
str = Engine.use().getTemplateByString(sourceStr).renderToString(kv);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
strToFile(str, target, true);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过模板创建内容
|
||||||
|
* @param tplFile
|
||||||
|
* @param para
|
||||||
|
*/
|
||||||
|
/*public static void tplRender(File tplFile, File file, Map para) throws IOException {
|
||||||
|
String str = Engine.use().getTemplate(tplFile.getPath()).renderToString(para);
|
||||||
|
strToFile(str, file);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static String tplRender(File tplFile, Map para){
|
||||||
|
return Engine.use().getTemplate(tplFile.getPath()).renderToString(para);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static void objToFile(Object obj, File file) throws FileNotFoundException {
|
||||||
|
if (file.exists()) {
|
||||||
|
throw new RuntimeException(file.getPath() + "已经存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file.getParentFile().exists()){
|
||||||
|
file.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
FileOutputStream out = new FileOutputStream(file);
|
||||||
|
out.write(obj.);
|
||||||
|
out.close();
|
||||||
|
}*/
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user