功能优化
This commit is contained in:
@@ -37,6 +37,10 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mybatis</groupId>
|
<groupId>org.mybatis</groupId>
|
||||||
<artifactId>mybatis</artifactId>
|
<artifactId>mybatis</artifactId>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ import cn.hutool.core.util.ZipUtil;
|
|||||||
@RequestMapping("/zyplayer-doc-db/doc-db")
|
@RequestMapping("/zyplayer-doc-db/doc-db")
|
||||||
public class DatabaseDocController {
|
public class DatabaseDocController {
|
||||||
|
|
||||||
@Autowired(required = false)
|
@Autowired
|
||||||
DatabaseRegistrationBean databaseRegistrationBean;
|
DatabaseRegistrationBean databaseRegistrationBean;
|
||||||
|
|
||||||
@PostMapping(value = "/getDataSourceList")
|
@PostMapping(value = "/getDataSourceList")
|
||||||
|
|||||||
@@ -3,13 +3,18 @@ package com.zyplayer.doc.db.framework.configuration;
|
|||||||
import java.sql.DatabaseMetaData;
|
import java.sql.DatabaseMetaData;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import com.zyplayer.doc.db.framework.db.bean.DbConfigBean;
|
||||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||||
import org.mybatis.spring.SqlSessionTemplate;
|
import org.mybatis.spring.SqlSessionTemplate;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.jta.atomikos.AtomikosDataSourceBean;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
|
import org.springframework.boot.jta.atomikos.AtomikosDataSourceBean;
|
||||||
import org.springframework.context.event.ContextRefreshedEvent;
|
import org.springframework.context.event.ContextRefreshedEvent;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||||
@@ -22,7 +27,7 @@ import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean;
|
|||||||
@Component
|
@Component
|
||||||
public class ApplicationListenerBean implements ApplicationListener<ContextRefreshedEvent> {
|
public class ApplicationListenerBean implements ApplicationListener<ContextRefreshedEvent> {
|
||||||
|
|
||||||
@Autowired(required = false)
|
@Autowired
|
||||||
DatabaseRegistrationBean databaseRegistrationBean;
|
DatabaseRegistrationBean databaseRegistrationBean;
|
||||||
|
|
||||||
private volatile static boolean IS_INIT = false;
|
private volatile static boolean IS_INIT = false;
|
||||||
@@ -34,9 +39,29 @@ public class ApplicationListenerBean implements ApplicationListener<ContextRefre
|
|||||||
}
|
}
|
||||||
// 会被调用两次
|
// 会被调用两次
|
||||||
IS_INIT = true;
|
IS_INIT = true;
|
||||||
|
Integer dataSourceIndex = 0;
|
||||||
List<DatabaseFactoryBean> databaseFactoryBeanList = new LinkedList<>();
|
List<DatabaseFactoryBean> databaseFactoryBeanList = new LinkedList<>();
|
||||||
for (DataSource dataSource : databaseRegistrationBean.getDataSourceList()) {
|
for (DbConfigBean dbConfigBean : databaseRegistrationBean.getDbConfigList()) {
|
||||||
try {
|
try {
|
||||||
|
// 数据源配置
|
||||||
|
Properties xaProperties = new Properties();
|
||||||
|
xaProperties.setProperty("driverClassName", dbConfigBean.getDriverClassName());
|
||||||
|
xaProperties.setProperty("url", dbConfigBean.getUrl());
|
||||||
|
xaProperties.setProperty("username", dbConfigBean.getUsername());
|
||||||
|
xaProperties.setProperty("password", dbConfigBean.getPassword());
|
||||||
|
xaProperties.setProperty("maxActive", "500");
|
||||||
|
xaProperties.setProperty("testOnBorrow", "true");
|
||||||
|
xaProperties.setProperty("testWhileIdle", "true");
|
||||||
|
xaProperties.setProperty("validationQuery", "select 'x'");
|
||||||
|
// 数据源
|
||||||
|
AtomikosDataSourceBean dataSource = new AtomikosDataSourceBean();
|
||||||
|
dataSource.setXaProperties(xaProperties);
|
||||||
|
dataSource.setXaDataSourceClassName("com.alibaba.druid.pool.xa.DruidXADataSource");
|
||||||
|
dataSource.setUniqueResourceName("zyplayer-doc-db" + (dataSourceIndex++));
|
||||||
|
dataSource.setMaxPoolSize(500);
|
||||||
|
dataSource.setMinPoolSize(1);
|
||||||
|
dataSource.setMaxLifetime(60);
|
||||||
|
// 描述连接信息的对象
|
||||||
DatabaseFactoryBean databaseFactoryBean = new DatabaseFactoryBean();
|
DatabaseFactoryBean databaseFactoryBean = new DatabaseFactoryBean();
|
||||||
DatabaseMetaData metaData = dataSource.getConnection().getMetaData();
|
DatabaseMetaData metaData = dataSource.getConnection().getMetaData();
|
||||||
String productName = metaData.getDatabaseProductName().toLowerCase();
|
String productName = metaData.getDatabaseProductName().toLowerCase();
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
package com.zyplayer.doc.db.framework.db.bean;
|
package com.zyplayer.doc.db.framework.db.bean;
|
||||||
|
|
||||||
|
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean.DatabaseProduct;
|
||||||
|
import com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.mybatis.spring.SqlSessionTemplate;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.mybatis.spring.SqlSessionTemplate;
|
|
||||||
|
|
||||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
|
||||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean.DatabaseProduct;
|
|
||||||
import com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需要声明注入的对象,只需要设置dataSourceList即可
|
* 需要声明注入的对象,只需要设置dbConfigList即可
|
||||||
* databaseFactoryBeanList是后面生成的
|
* databaseFactoryBeanList是后面生成的
|
||||||
*
|
*
|
||||||
* @author 暮光:城中城
|
* @author 暮光:城中城
|
||||||
@@ -21,18 +17,12 @@ import com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public class DatabaseRegistrationBean {
|
public class DatabaseRegistrationBean {
|
||||||
|
|
||||||
private List<DataSource> dataSourceList = new LinkedList<>();
|
// 注入此对象必须配置的参数
|
||||||
|
// 配置的数据源连接、账号密码等信息,通过注入得到
|
||||||
|
private List<DbConfigBean> dbConfigList = new LinkedList<>();
|
||||||
|
// 描述连接信息的对象列表
|
||||||
private List<DatabaseFactoryBean> databaseFactoryBeanList = new LinkedList<>();
|
private List<DatabaseFactoryBean> databaseFactoryBeanList = new LinkedList<>();
|
||||||
|
|
||||||
public List<DataSource> getDataSourceList() {
|
|
||||||
return dataSourceList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDataSourceList(List<DataSource> dataSourceList) {
|
|
||||||
this.dataSourceList = dataSourceList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<DatabaseFactoryBean> getDatabaseFactoryBeanList() {
|
public List<DatabaseFactoryBean> getDatabaseFactoryBeanList() {
|
||||||
return databaseFactoryBeanList;
|
return databaseFactoryBeanList;
|
||||||
}
|
}
|
||||||
@@ -89,4 +79,11 @@ public class DatabaseRegistrationBean {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<DbConfigBean> getDbConfigList() {
|
||||||
|
return dbConfigList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDbConfigList(List<DbConfigBean> dbConfigList) {
|
||||||
|
this.dbConfigList = dbConfigList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.zyplayer.doc.db.framework.db.bean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author
|
||||||
|
* @Date 2018/11/11
|
||||||
|
**/
|
||||||
|
public class DbConfigBean {
|
||||||
|
private String driverClassName;
|
||||||
|
private String url;
|
||||||
|
private String username;
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
public String getDriverClassName() {
|
||||||
|
return driverClassName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDriverClassName(String driverClassName) {
|
||||||
|
this.driverClassName = driverClassName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
<title>zyplayer-doc-db</title>
|
<title>数据库文档</title>
|
||||||
<link rel="shortcut icon" href="webjars/doc-db/img/api.ico"/>
|
<link rel="shortcut icon" href="webjars/doc-db/img/api.ico"/>
|
||||||
<link rel="stylesheet" href="webjars/zui/css/zui.min.css" />
|
<link rel="stylesheet" href="webjars/zui/css/zui.min.css" />
|
||||||
<link rel="stylesheet" href="webjars/zui/css/zui-theme.min.css">
|
<link rel="stylesheet" href="webjars/zui/css/zui-theme.min.css">
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
1、T:表,例:XXX(字段注释),T:user_info<br/>
|
1、T:表,例:XXX(字段注释),T:user_info<br/>
|
||||||
2、T:表.关联ID,例:XXX(字段注释),T:user_info.id<br/>
|
2、T:表.关联ID,例:XXX(字段注释),T:user_info.id<br/>
|
||||||
3、T:库.表.关联ID,例:XXX(字段注释),T:order_db.user_info.id<br/>
|
3、T:库.表.关联ID,例:XXX(字段注释),T:order_db.user_info.id<br/>
|
||||||
实验功能,有更好的建议或展示方式欢迎<a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc-db">提交建议</a>!
|
实验功能,有更好的建议或展示方式欢迎<a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc">提交建议</a>!
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="tableRelationCharts" style="width: 100%;height:100%;margin-bottom: 50px;"></div>
|
<div id="tableRelationCharts" style="width: 100%;height:100%;margin-bottom: 50px;"></div>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
<swagger.bootstrap.ui.version>1.8.7</swagger.bootstrap.ui.version>
|
<swagger.bootstrap.ui.version>1.8.7</swagger.bootstrap.ui.version>
|
||||||
<springfox.swagger.ui.version>2.9.2</springfox.swagger.ui.version>
|
<springfox.swagger.ui.version>2.9.2</springfox.swagger.ui.version>
|
||||||
<springfox.swagger.version>2.9.2</springfox.swagger.version>
|
<springfox.swagger.version>2.9.2</springfox.swagger.version>
|
||||||
|
<zyplayer.doc.db.version>1.0.1</zyplayer.doc.db.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -117,6 +118,12 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-security</artifactId>
|
<artifactId>spring-boot-starter-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zyplayer</groupId>
|
||||||
|
<artifactId>zyplayer-doc-db</artifactId>
|
||||||
|
<version>${zyplayer.doc.db.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ public class Application extends SpringBootServletInitializer {
|
|||||||
"zyplayer-doc-swagger:http://{}document.html\n\t" +
|
"zyplayer-doc-swagger:http://{}document.html\n\t" +
|
||||||
"swagger-bootstrap-ui:http://{}doc.html\n\t" +
|
"swagger-bootstrap-ui:http://{}doc.html\n\t" +
|
||||||
"springfox-swagger-ui:http://{}swagger-ui.html\n\t" +
|
"springfox-swagger-ui:http://{}swagger-ui.html\n\t" +
|
||||||
//"数据库地址:http://{}document.html\n " +
|
"数据库文档管理地址:http://{}doc-db.html\n\t" +
|
||||||
"管理地址:http://{}statics/manage/home.html\n" +
|
"管理地址:http://{}statics/manage/home.html\n" +
|
||||||
"----------------------------------------------------------",
|
"----------------------------------------------------------",
|
||||||
urlCtx, urlCtx, urlCtx, urlCtx
|
urlCtx, urlCtx, urlCtx, urlCtx, urlCtx
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.zyplayer.doc.manage.framework.config;
|
||||||
|
|
||||||
|
import com.zyplayer.doc.db.framework.configuration.EnableDocDb;
|
||||||
|
import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author
|
||||||
|
* @Date 2018/11/11
|
||||||
|
**/
|
||||||
|
@EnableDocDb
|
||||||
|
@Configuration
|
||||||
|
public class DocDatabaseRegistrationConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConfigurationProperties(prefix = "zyplayer.doc.db")
|
||||||
|
public DatabaseRegistrationBean databaseRegistrationBean(){
|
||||||
|
return new DatabaseRegistrationBean();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -81,13 +81,13 @@ public class MybatisPlusConfig {
|
|||||||
@MapperScan(value = "com.zyplayer.doc.manage.repository.manage.mapper", sqlSessionFactoryRef = "manageSqlSessionFactory")
|
@MapperScan(value = "com.zyplayer.doc.manage.repository.manage.mapper", sqlSessionFactoryRef = "manageSqlSessionFactory")
|
||||||
static class ManageMybatisDbConfig {
|
static class ManageMybatisDbConfig {
|
||||||
|
|
||||||
@Value("${zyplayer.datasource.manage.driverClassName}")
|
@Value("${zyplayer.doc.manage.datasource.driverClassName}")
|
||||||
private String driverClassName;
|
private String driverClassName;
|
||||||
@Value("${zyplayer.datasource.manage.url}")
|
@Value("${zyplayer.doc.manage.datasource.url}")
|
||||||
private String url;
|
private String url;
|
||||||
@Value("${zyplayer.datasource.manage.username}")
|
@Value("${zyplayer.doc.manage.datasource.username}")
|
||||||
private String username;
|
private String username;
|
||||||
@Value("${zyplayer.datasource.manage.password}")
|
@Value("${zyplayer.doc.manage.datasource.password}")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Bean(name = "manageDatasource")
|
@Bean(name = "manageDatasource")
|
||||||
|
|||||||
@@ -18,11 +18,6 @@ spring:
|
|||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
output:
|
output:
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
# datasource:
|
|
||||||
# driver-class-name: com.mysql.jdbc.Driver
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
|
|
||||||
# username: root
|
|
||||||
# password: root
|
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 8082
|
port: 8082
|
||||||
@@ -30,14 +25,28 @@ server:
|
|||||||
context-path: /zyplayer-doc-manage
|
context-path: /zyplayer-doc-manage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
zyplayer:
|
zyplayer:
|
||||||
datasource:
|
doc:
|
||||||
|
# zyplayer-doc-manage管理端的数据库配置
|
||||||
manage:
|
manage:
|
||||||
|
datasource:
|
||||||
driverClassName: com.mysql.jdbc.Driver
|
driverClassName: com.mysql.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
# 数据库文档相关
|
||||||
|
# 打开/zyplayer-doc-manage/doc-db.html即可看到这里配置的数据库的文档
|
||||||
|
db:
|
||||||
|
dbConfigList:
|
||||||
|
- driverClassName: com.mysql.jdbc.Driver
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
# 多个数据源直接这样累加
|
||||||
|
# - driverClassName: com.mysql.jdbc.Driver
|
||||||
|
# url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath:/mapper/**/*Mapper.xml
|
mapper-locations: classpath:/mapper/**/*Mapper.xml
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
|||||||
a:focus{outline:none;}
|
a:focus{outline:none;}
|
||||||
ul{list-style: none;list-style-type: none;}
|
ul{list-style: none;list-style-type: none;}
|
||||||
.tree li a{white-space: nowrap;}
|
.tree li a{white-space: nowrap;}
|
||||||
.tree-menu li > ul{background-color: #f1f1f1;}
|
.tree-menu li > ul{background-color: #555980;}
|
||||||
.tree-menu li li li li a{padding-left: 68px;}
|
.tree-menu li li li li a{padding-left: 68px;}
|
||||||
.tree-menu li li li li li a{padding-left: 88px;}
|
.tree-menu li li li li li a{padding-left: 88px;}
|
||||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
.tree-menu li li li li li li a{padding-left: 108px;}
|
||||||
@@ -11,6 +11,11 @@ ul{list-style: none;list-style-type: none;}
|
|||||||
.tree-menu li li li li li li li li li a{padding-left: 168px;}
|
.tree-menu li li li li li li li li li a{padding-left: 168px;}
|
||||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||||
.table td, .table th {vertical-align: middle;}
|
.table td, .table th {vertical-align: middle;}
|
||||||
|
.tree-menu li > a:active, .tree-menu li > a:focus, .tree-menu li > a:hover{color: #fff;}
|
||||||
|
.tree-menu li > a{color: #fff;}
|
||||||
|
.tree-menu > li > a{border-bottom-color: #555980;}
|
||||||
|
.tree-menu > li.open + li > a{border-bottom-color: #555980;border-top-color: #555980;}
|
||||||
|
.tree-lines ul > li::after{border-top:0;}
|
||||||
|
|
||||||
/**lable的覆盖样式*/
|
/**lable的覆盖样式*/
|
||||||
.label{font-size: 100%;}
|
.label{font-size: 100%;}
|
||||||
@@ -32,7 +37,7 @@ label{font-weight: normal;}
|
|||||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||||
}
|
}
|
||||||
.left-header{
|
.left-header{
|
||||||
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
background: #464a6e;width: 100%; height:60px;line-height:60px;
|
||||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||||
}
|
}
|
||||||
.left-header .logo{
|
.left-header .logo{
|
||||||
@@ -42,7 +47,7 @@ label{font-weight: normal;}
|
|||||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||||
}
|
}
|
||||||
.left-container{
|
.left-container{
|
||||||
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
width: 100%;position: absolute;background: #555980;color: #fff;
|
||||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||||
}
|
}
|
||||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||||
@@ -59,7 +64,14 @@ label{font-weight: normal;}
|
|||||||
|
|
||||||
#rightContentMask{background-color: rgba(0, 0, 0, 0);padding: 0;z-index:9999; height: 100%;display: none;position: absolute;top: 0;bottom: 0;left:0;right: 0;}
|
#rightContentMask{background-color: rgba(0, 0, 0, 0);padding: 0;z-index:9999; height: 100%;display: none;position: absolute;top: 0;bottom: 0;left:0;right: 0;}
|
||||||
#rightZpages{height: 100%;position: relative;top: 0;bottom: 0;left:0;right: 0;}
|
#rightZpages{height: 100%;position: relative;top: 0;bottom: 0;left:0;right: 0;}
|
||||||
#rightZpages .tabs-container .tab-pane{padding: 10px;}
|
/*#rightZpages .tabs-container .tab-pane{padding: 10px;}*/
|
||||||
|
|
||||||
|
#showLeftContent{
|
||||||
|
position: fixed;top: 250px; left: 0px;padding-top: 10px;
|
||||||
|
width: 15px;height: 35px;z-index: 9999;cursor: pointer;
|
||||||
|
background-color: #ccc;border-radius: 0 5px 5px 0;display: none;
|
||||||
|
}
|
||||||
|
#showLeftContent:hover{color: #fff;}
|
||||||
|
|
||||||
/* S-JSON展示的样式 */
|
/* S-JSON展示的样式 */
|
||||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
pre.json{margin-top:0px;margin-bottom:0px;}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
这是一个关于页面
|
这是一个关于页面,更多内容敬请关注:<a href="https://gitee.com/zyplayer/zyplayer-doc" target="_blank"> zyplayer-doc-manage</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
body{padding: 10px;}
|
||||||
</style>
|
</style>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
body{padding: 10px;}
|
||||||
</style>
|
</style>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
<title>文档管理系统 - zyplayer</title>
|
<title>文档管理系统</title>
|
||||||
<link rel="shortcut icon" href="../lib/mg/img/api.ico"/>
|
<link rel="shortcut icon" href="../lib/mg/img/api.ico"/>
|
||||||
<link rel="stylesheet" href="../lib/zui/css/zui.min.css" />
|
<link rel="stylesheet" href="../lib/zui/css/zui.min.css" />
|
||||||
<link rel="stylesheet" href="../lib/zui/lib/dashboard/zui.dashboard.min.css" />
|
<link rel="stylesheet" href="../lib/zui/lib/dashboard/zui.dashboard.min.css" />
|
||||||
@@ -11,6 +11,9 @@
|
|||||||
<link rel="stylesheet" href="../lib/mg/css/mg-ui.css" />
|
<link rel="stylesheet" href="../lib/mg/css/mg-ui.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="showLeftContent">
|
||||||
|
<i class="icon icon-chevron-right"></i>
|
||||||
|
</div>
|
||||||
<div class="left-body" id="leftContent">
|
<div class="left-body" id="leftContent">
|
||||||
<div class="left-header">
|
<div class="left-header">
|
||||||
<span class="logo" id="logoText">zyplayer-doc-manage</span>
|
<span class="logo" id="logoText">zyplayer-doc-manage</span>
|
||||||
@@ -18,12 +21,30 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="scrollbar-hover left-container">
|
<div class="scrollbar-hover left-container">
|
||||||
<!-- 样式类可选:tree-menu tree-folders tree-chevrons tree-angles -->
|
<!-- 样式类可选:tree-menu tree-folders tree-chevrons tree-angles -->
|
||||||
<ul class="tree tree-lines tree-menu projects" data-ride="tree">
|
<ul class="tree tree-lines tree-menu projects" data-ride="tree" id="tabZpagesNavigationUl">
|
||||||
<li id="tabZpagesNavigationLi">
|
<li>
|
||||||
<a href="#"><i class="icon icon-group"></i> 系统管理</a>
|
<a href="#"><i class="icon icon-group"></i> 系统管理</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" class="page-nav" data-id="userManage" data-href="./user/manage.html" data-icon="icon-user" data-reload="0"><i class="icon-user"></i> 人员管理</a></li>
|
<li><a href="#" class="page-nav" data-id="user-manage" data-href="./user/manage.html" data-icon="icon-user" data-reload="0"><i class="icon-user"></i> 人员管理</a></li>
|
||||||
<li><a href="#" class="page-nav" data-id="authManage" data-href="./auth/manage.html" data-icon="icon-lock" data-reload="1"><i class="icon-lock"></i> 权限列表</a></li>
|
<li><a href="#" class="page-nav" data-id="auth-manage" data-href="./auth/manage.html" data-icon="icon-lock" data-reload="1"><i class="icon-lock"></i> 权限列表</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon icon-window-alt"></i> 文档查看页面</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#" class="page-nav" data-id="zyplayer-doc-db" data-href="../../doc-db.html" data-icon="icon-database" data-reload="1"><i class="icon-database"></i> 数据库文档</a></li>
|
||||||
|
<li><a href="#" class="page-nav" data-id="zyplayer-doc-swagger" data-href="../../document.html" data-icon="icon-file-code" data-reload="1"><i class="icon-file-code"></i> zyplayer-doc-swagger</a></li>
|
||||||
|
<li><a href="#" class="page-nav" data-id="swagger-bootstrap-ui" data-href="../../doc.html" data-icon="icon-file-code" data-reload="1"><i class="icon-file-code"></i> swagger-bootstrap-ui</a></li>
|
||||||
|
<li><a href="#" class="page-nav" data-id="springfox-swagger-ui" data-href="../../swagger-ui.html" data-icon="icon-file-code" data-reload="1"><i class="icon-file-code"></i> springfox-swagger-ui</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon icon-window-alt"></i> 独立文档页面</a>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="../../doc-db.html"><i class="icon-window"></i> 数据库文档</a></li>
|
||||||
|
<li><a target="_blank" href="../../document.html"><i class="icon-window"></i> zyplayer-doc-swagger</a></li>
|
||||||
|
<li><a target="_blank" href="../../doc.html"><i class="icon-window"></i> swagger-bootstrap-ui</a></li>
|
||||||
|
<li><a target="_blank" href="../../swagger-ui.html"><i class="icon-window"></i> springfox-swagger-ui</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -78,11 +99,26 @@
|
|||||||
$("#rightContentMask").hide();
|
$("#rightContentMask").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
/**
|
||||||
|
* 切换导航栏的隐藏或显示
|
||||||
|
*/
|
||||||
|
$("#changeContentWidth").click(function(){
|
||||||
|
$("#leftContent").hide();
|
||||||
|
$("#showLeftContent").show();
|
||||||
|
changeContentWidth(0);
|
||||||
|
});
|
||||||
|
/**
|
||||||
|
* 切换导航栏的隐藏或显示
|
||||||
|
*/
|
||||||
|
$("#showLeftContent").click(function(){
|
||||||
|
$("#leftContent").show();
|
||||||
|
$("#showLeftContent").hide();
|
||||||
|
changeContentWidth(360);
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* 页面导航切换
|
* 页面导航切换
|
||||||
*/
|
*/
|
||||||
$("#tabZpagesNavigationLi").on("click", ".page-nav", function(){
|
$("#tabZpagesNavigationUl").on("click", ".page-nav", function(){
|
||||||
var id = $(this).data("id");
|
var id = $(this).data("id");
|
||||||
var href = $(this).data("href");
|
var href = $(this).data("href");
|
||||||
var icon = $(this).data("icon");
|
var icon = $(this).data("icon");
|
||||||
|
|||||||
@@ -221,6 +221,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
body{padding: 10px;}
|
||||||
.modal-table-box{height: 200px;overflow-y: auto;}
|
.modal-table-box{height: 200px;overflow-y: auto;}
|
||||||
.modal-table-box ul{padding-left: 10px;list-style: none;}
|
.modal-table-box ul{padding-left: 10px;list-style: none;}
|
||||||
.modal-table-box li{float: left; border: 1px solid #ccc;padding: 10px 15px; margin: 0 10px 10px 0; background-color: #ccc;cursor: pointer;}
|
.modal-table-box li{float: left; border: 1px solid #ccc;padding: 10px 15px; margin: 0 10px 10px 0; background-color: #ccc;cursor: pointer;}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
<title>接口文档管理系统 - zyplayer</title>
|
<title>接口文档管理系统</title>
|
||||||
<link rel="shortcut icon" href="webjars/mg-ui/img/api.ico"/>
|
<link rel="shortcut icon" href="webjars/mg-ui/img/api.ico"/>
|
||||||
<link rel="stylesheet" href="webjars/zui/css/zui.min.css" />
|
<link rel="stylesheet" href="webjars/zui/css/zui.min.css" />
|
||||||
<link rel="stylesheet" href="webjars/zui/lib/dashboard/zui.dashboard.min.css" />
|
<link rel="stylesheet" href="webjars/zui/lib/dashboard/zui.dashboard.min.css" />
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
|
<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
|
||||||
<li id="tabZpagesNavigationLi">
|
<li id="tabZpagesNavigationUl">
|
||||||
<a href="#"><i class="icon icon-cogs"></i> 文档管理</a>
|
<a href="#"><i class="icon icon-cogs"></i> 文档管理</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li id="onlineDebugLi1" class="local-storage"><a href="javascript:void(0)" path=""><i class="icon-bug"></i> 在线调试管理</a></li>
|
<li id="onlineDebugLi1" class="local-storage"><a href="javascript:void(0)" path=""><i class="icon-bug"></i> 在线调试管理</a></li>
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ $(".choise").on("click", "li", function(){
|
|||||||
/**
|
/**
|
||||||
* 页面导航切换
|
* 页面导航切换
|
||||||
*/
|
*/
|
||||||
$("#tabZpagesNavigationLi").on("click", ".page-nav", function(){
|
$("#tabZpagesNavigationUl").on("click", ".page-nav", function(){
|
||||||
var id = $(this).data("id");
|
var id = $(this).data("id");
|
||||||
var href = $(this).data("href");
|
var href = $(this).data("href");
|
||||||
var icon = $(this).data("icon");
|
var icon = $(this).data("icon");
|
||||||
|
|||||||
Reference in New Issue
Block a user