Former-commit-id: ca50abff097756c797980acd54f8de6c46a9d5a0
master
王兵 4 years ago
parent c904100008
commit da890801a9

@ -1,27 +1,30 @@
package xyz.wbsite.dbtool.javafx.po;
import java.io.File;
import java.util.HashSet;
import java.util.Set;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Doc {
private boolean check;
private String type;
//目标请求对象
private String request;
//目标请求响应
private String response;
private String type;
private String module;
private String target;
private String method;
private List<DocReq> reqParams = new ArrayList<>();
private List<DocReq> rspParams = new ArrayList<>();
private Map<String, DocEnt> entParams = new HashMap<>();
private File requestFile;
private File responseFile;
private Set<String> depReq = new HashSet<>();
private Set<String> depEnt = new HashSet<>();
private String error = "";
public boolean isCheck() {
@ -88,22 +91,6 @@ public class Doc {
this.responseFile = responseFile;
}
public Set<String> getDepReq() {
return depReq;
}
public void setDepReq(Set<String> depReq) {
this.depReq = depReq;
}
public Set<String> getDepEnt() {
return depEnt;
}
public void setDepEnt(Set<String> depEnt) {
this.depEnt = depEnt;
}
public String getError() {
return error;
}

@ -0,0 +1,31 @@
package xyz.wbsite.dbtool.javafx.po;
public class DocEnt {
private String name;
private String type;
private String note;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
}

@ -0,0 +1,40 @@
package xyz.wbsite.dbtool.javafx.po;
public class DocReq {
private String name;
private String type;
private String note;
private boolean required;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public boolean isRequired() {
return required;
}
public void setRequired(boolean required) {
this.required = required;
}
}

@ -0,0 +1,31 @@
package xyz.wbsite.dbtool.javafx.po;
public class DocRsp {
private String name;
private String type;
private String note;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
}

@ -0,0 +1,139 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
[v-cloak] {
display: none;
}
html, body, #app {
width: 100%;
height: 100%;
background-color: #f5f5f5;
}
.search {
position: fixed;
top: 0;
left: 0;
width: 240px;
height: 70px;
padding: 10px;
}
.search input {
padding: 5px;
height: 30px;
outline: none;
width: 100%;
border: 1px dashed #cacaca;
}
.search p {
font-size: 12px;
color: #757575;
padding: 5px;
transform: scale(0.8);
text-align: center;
}
.side {
height: calc(100% - 70px);
margin-top: 70px;
width: 240px;
position: fixed;
}
.side ul li a {
display: block;
text-decoration: none;
padding: 8px 15px;
color: #585858;
}
.side ul li a:hover {
opacity: .9;
background: #efefef;
}
.side ul li a.select {
opacity: .9;
background: #efefef;
}
.body {
margin-left: 240px;
width: calc(100% - 240px);
height: 100%;
background: #ffffff;
position: fixed;
}
.api {
width: 700px;
}
.api h3 {
background: #eef0f4;
padding: 10px;
font-size: 18px;
}
.api h5 {
padding: 5px;
color: #3e3e3e;
font-weight: normal;
margin: 10px 0;
}
.api .wrapper {
padding: 16px;
background: #eef0f4;
}
.api .wrapper a {
text-decoration: none;
border-bottom: 1px dashed #f00;
color: #4f4f4f;
}
.api .object {
border-bottom: 1px dashed #f00;
color: #4f4f4f;
}
table {
border-collapse: collapse;
display: table;
width: 100%;
text-align: center;
background-color: transparent;
border-spacing: 0;
}
table tr th, table tr td {
font-size: 14px;
color: #4f4f4f;
line-height: 22px;
border: 1px solid #ddd;
padding: 8px;
word-break: normal !important;
vertical-align: middle;
}
table tr {
border: 0;
border-top: 1px solid #ddd;
background-color: #fff;
}
table tr:nth-child(2n) {
background-color: #f7f7f7;
}
table tr th {
font-weight: 700;
background-color: #eff3f5;
}

@ -0,0 +1,50 @@
{
"result": [
{
"title": "登录",
"type": "ajax",
"module": "system",
"target": "user",
"method": "login",
"id": "ajax.system.user.login",
"reqParams": [
{
"name": "username",
"type": "String",
"required": true,
"note": "用户登录名"
},
{
"name": "password",
"type": "String",
"required": true,
"note": "用户登录密码"
}
],
"rspParams": [
{
"name": "token",
"type": "String",
"note": "登录凭证"
},
{
"name": "User",
"type": "Object",
"note": "用户"
}
],
"entParams": [
{
"name": "username",
"type": "String",
"note": "用户名"
},
{
"name": "aliasName",
"type": "String",
"note": "用户别名"
}
]
}
]
}

@ -3,150 +3,10 @@
<head>
<title>接口文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/vue.min.js" type="text/javascript"></script>
<link href="css/index.css" rel="stylesheet">
</head>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
[v-cloak] {
display: none;
}
html, body, #app {
width: 100%;
height: 100%;
background-color: #f5f5f5;
}
.search {
position: fixed;
top: 0;
left: 0;
width: 240px;
height: 70px;
padding: 10px;
}
.search input {
padding: 5px;
height: 30px;
outline: none;
width: 100%;
border: 1px dashed #cacaca;
}
.search p {
font-size: 12px;
color: #757575;
padding: 5px;
transform: scale(0.8);
text-align: center;
}
.side {
height: calc(100% - 70px);
margin-top: 70px;
width: 240px;
position: fixed;
}
.side ul li a {
display: block;
text-decoration: none;
padding: 8px 15px;
color: #585858;
}
.side ul li a:hover {
opacity: .9;
background: #efefef;
}
.side ul li a.select {
opacity: .9;
background: #efefef;
}
.body {
margin-left: 240px;
width: calc(100% - 240px);
height: 100%;
background: #ffffff;
position: fixed;
}
.api {
width: 700px;
}
.api h3 {
background: #eef0f4;
padding: 10px;
font-size: 18px;
}
.api h5 {
padding: 5px;
color: #3e3e3e;
font-weight: normal;
margin: 10px 0;
}
.api .wrapper {
padding: 16px;
background: #eef0f4;
}
.api .wrapper a {
text-decoration: none;
border-bottom: 1px dashed #f00;
color: #4f4f4f;
}
.api .object {
border-bottom: 1px dashed #f00;
color: #4f4f4f;
}
table {
border-collapse: collapse;
display: table;
width: 100%;
text-align: center;
background-color: transparent;
border-spacing: 0;
}
table tr th, table tr td {
font-size: 14px;
color: #4f4f4f;
line-height: 22px;
border: 1px solid #ddd;
padding: 8px;
word-break: normal !important;
vertical-align: middle;
}
table tr {
border: 0;
border-top: 1px solid #ddd;
background-color: #fff;
}
table tr:nth-child(2n) {
background-color: #f7f7f7;
}
table tr th {
font-weight: 700;
background-color: #eff3f5;
}
</style>
<body>
<div id="app" v-cloak>
<div class="side">
@ -227,123 +87,6 @@
</div>
</div>
</div>
<script>
var app = new Vue({
el: "#app",
data: {
searchKey: '',
select: {},
data: [{
title: "登录",
type: "ajax",
module: "system",
target: "user",
method: "login",
id: "ajax.system.user.login",
reqParams: [
{
name: "username",
type: "String",
required: true,
note: "用户登录名"
},
{
name: "password",
type: "String",
required: true,
note: "用户登录密码"
}
],
rspParams: [
{
name: "token",
type: "String",
note: "登录凭证"
},
{
name: "User",
type: "Object",
note: "用户"
}
],
entParams: [
{
name: "username",
type: "String",
note: "用户名"
},
{
name: "aliasName",
type: "String",
note: "用户别名"
}
],
}, {
title: "登录AA",
type: "api",
module: "system",
target: "user",
method: "login",
id: "api.system.user.login",
reqParams: [
{
name: "username",
type: "String",
required: true,
note: "用户登录名"
},
{
name: "password",
type: "String",
required: true,
note: "用户登录密码"
}
],
rspParams: [
{
name: "token",
type: "String",
note: "登录凭证"
},
{
name: "User",
type: "Object",
note: "用户"
}
],
entParams: [
{
name: "username",
type: "String",
note: "用户名"
},
{
name: "aliasName",
type: "String",
note: "用户别名"
}
],
}],
},
computed: {
list: function () {
var reg = new RegExp(this.searchKey, 'ig');
if (this.searchKey) {
return this.data.filter(function (item) {
return item.title.match(reg);
});
}
return this.data;
}
},
methods: {
onSelect: function (item) {
this.select = item;
}
}
});
</script>
<script src="js/index.js" type="text/javascript"></script>
</body>
</html>

@ -0,0 +1,35 @@
var app = new Vue({
el: "#app",
data: {
searchKey: '',
select: {},
data: [],
},
computed: {
list: function () {
var reg = new RegExp(this.searchKey, 'ig');
if (this.searchKey) {
return this.data.filter(function (item) {
return item.title.match(reg);
});
}
return this.data;
}
},
methods: {
onSelect: function (item) {
this.select = item;
}
},
mounted: function () {
$.ajax({
url: "data.json",
method: "get",
dataType: "json",
success: function (response) {
console.log(response)
this.data = response.result;
}.bind(this)
})
}
});
Loading…
Cancel
Save

Powered by TurnKey Linux.