This commit is contained in:
2019-04-15 17:36:06 +08:00
parent fe3ea393ba
commit 9a7953aa47
23 changed files with 325 additions and 536 deletions

View File

@@ -3,8 +3,8 @@ const db = {
console.log(dbAccount)
return red.postX('/_db/catalog_list', {dbAccount: JSON.stringify(dbAccount), dbPlatId})
},
tableList({dbPlatId, catalogs}) { // 数据库表列表
return red.postX('/_db/table_list', {dbPlatId, catalogs: JSON.stringify(catalogs)})
tableList({dbPlatId, catalog}) { // 数据库表列表
return red.postX('/_db/table_list', {dbPlatId, catalog})
},
tableInfo({dbPlatId, catalog, tableName}) {
return red.postX('/_db/table_info', {dbPlatId, catalog, tableName})

View File

@@ -47,5 +47,11 @@ const meta = {
red.getJSON("/data/list",{fBean: JSON.stringify(fbean)}, (json = {rows:[], total:0}) => {
callback(json)
})
},
linkList() {
return red.postX('/meta/link_list')
},
linkSave({link}) {
return red.postX('/meta/link_save', {link: JSON.stringify(link)})
}
}

View File

@@ -1,12 +1,12 @@
const table = {
_sheets({cate, filePath, dbAccount, dbPlatId, catalogs}) {
return red.postX('/_table/sheets',{cate, filePath, dbAccount, dbPlatId, catalogs})
_sheets({cate, filePath, dbAccount, dbPlatId, catalog}) {
return red.postX('/_table/sheets',{cate, filePath, dbAccount, dbPlatId, catalog})
},
sheetsExcel({filePath}) {
return table._sheets({cate: "excel", filePath})
},
sheetMySql({dbPlatId, catalogs}) {
return table._sheets({cate: "mysql", dbPlatId, catalogs: JSON.stringify(catalogs)})
sheetMySql({dbPlatId, catalog}) {
return table._sheets({cate: "mysql", dbPlatId, catalog})
},
saveTable({dbPlatId, catalog, tableArr}) {

View File

@@ -7,25 +7,6 @@
<link rel="stylesheet" href="./res/zui/css/zui.min.css">
<link rel="stylesheet" href="./res/css/zui-theme.css">
<link rel="stylesheet" href="./res/css/red-kit.css">
<style>
.logo h1{
float: left;
color: #ccc;
margin-top: 10px;
width: 150px;
font-size: 22px;
}
.footer{
position: fixed;
bottom: 0;
left: 162px;
width: 100%;
height: 35px;
background-color: #eee;
padding: 8px;
color: #808080;
}
</style>
</head>
<body id="home">
<div class="container-fluid">
@@ -75,28 +56,26 @@
<!--<div style="height: 40px;background-color: #fff;"></div>-->
<!-- load main body to here -->
<div id="main"></div>
<div class="footer">
Meta-Kit Developer v0.2
</div>
</div>
</div>
<div class="footer">
Meta-Kit Developer v0.2
</div>
</row>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue" async></script>
<script src="./res/zui/lib/jquery/jquery.js" defer></script>
<script src="./res/libs/axios.min.js" defer></script>
<script src="./res/zui/js/zui.js" defer></script>
<script src="./res/js/red.js" defer></script>
<script src="./api/meta.js" defer></script>
<script src="./api/plat.js" defer></script>
<script src="./api/qtask.js" defer></script>
<script src="./api/db.js" defer></script>
<script src="./api/table.js" defer></script>
<script src="./res/zui/lib/sortable/zui.sortable.js" defer></script>
<script src="./res/zui/lib/uploader/zui.uploader.min.js" defer></script>
<!--<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>-->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="./res/zui/lib/jquery/jquery.js"></script>
<script src="./res/libs/axios.min.js"></script>
<script src="./res/zui/js/zui.js"></script>
<script src="./res/js/red.js"></script>
<script src="./api/meta.js"></script>
<script src="./api/plat.js"></script>
<script src="./api/qtask.js"></script>
<script src="./api/db.js"></script>
<script src="./api/table.js"></script>
<script src="./res/zui/lib/sortable/zui.sortable.js"></script>
<script src="./res/zui/lib/uploader/zui.uploader.min.js"></script>
<script type="module">
import { logout } from './api/user.js'
let { platList } = plat

View File

@@ -56,9 +56,9 @@
</div>
<ul class="nav nav-tabs">
<li @click="cate = excel"><a href="###" data-target="#tab2Content1" data-toggle="tab">从本地上传</a></li>
<li @click="cate = mysql" class="active"><a href="###" data-target="#tab2Content2" data-toggle="tab">从数据源导入</a></li>
<li @click="cate = oth"><a href="###" data-target="#tab2Content3" data-toggle="tab">其他</a></li>
<li @click="cate = 'excel'"><a href="###" data-target="#tab2Content1" data-toggle="tab">从本地上传</a></li>
<li @click="cate = 'mysql'" class="active"><a href="###" data-target="#tab2Content2" data-toggle="tab">从数据源导入</a></li>
<li @click="cate = 'oth'"><a href="###" data-target="#tab2Content3" data-toggle="tab">其他</a></li>
</ul>
<div class="tab-content">
<!-- 本地excel导入 -->
@@ -384,7 +384,8 @@
},
//------从mysql导入使用的相关方法-------
loadTables() { // 查询table列表
sheetMySql({dbPlatId: this.dbPlatId, catalogs: [this.catalog]}).then(res => { // 数据转换
let [dbPlatId, catalog] = [this.dbPlatId, this.catalog]
sheetMySql({dbPlatId, catalog}).then(res => { // 数据转换
this.tableData = res
let tableArr = []
let ckTable = []

View File

@@ -87,6 +87,23 @@ body {
border-left: 2px solid #77cb99;
color: #fff;
}
.logo h1{
float: left;
color: #ccc;
margin-top: 10px;
width: 150px;
font-size: 22px;
}
.footer{
position: fixed;
bottom: 0;
margin-left: -10px;
width: 100%;
height: 35px;
background-color: #eee;
padding: 8px;
color: #808080;
}
.list-head {
padding-bottom: 10px;

BIN
root/res/img/teach.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB