.
This commit is contained in:
0
root/api/meta.js
Normal file
0
root/api/meta.js
Normal file
0
root/api/qtask.js
Normal file
0
root/api/qtask.js
Normal file
9
root/api/user.js
Normal file
9
root/api/user.js
Normal file
@@ -0,0 +1,9 @@
|
||||
//import red from '../res/js/red'
|
||||
|
||||
const login = ({username, pwd}) => {
|
||||
return {username};
|
||||
}
|
||||
|
||||
const logout = () => {
|
||||
|
||||
}
|
||||
@@ -100,15 +100,15 @@
|
||||
/*{name: "DDL", url: "/qtask/ddl.html"},*/
|
||||
{name: "MetaData", url: "/meta", nodes: [
|
||||
/*{url:"/metadata/metatable/list.html", name:"TableList"},*/
|
||||
{url:"/metadata/metatable/metaTable.html", name:"MetaTable"},
|
||||
{url:"/metadata/metatable/metaTable.html", name:"MetaTable", icon: "icon-table"},
|
||||
/*{url:"/metadata/metaLink.html", name:"MetaLink"},*/
|
||||
{url:"/metadata/metaService.html", name:"MetaService"},
|
||||
{url:"/metadata/dataList.html", name:"数据查询"},
|
||||
{url:"/metadata/metaService.html", name:"MetaService", icon:"icon-usecase"},
|
||||
{url:"/metadata/dataList.html", name:"数据查询", icon:"icon-bug"},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "QTask", url: "/qtask", nodes: [
|
||||
{url:"/qtask/list.html", name:"QTask", icon:"icon-beaker"},
|
||||
{url:"/qtask/list.html", name:"QTask", icon:"icon-cube-alt"},
|
||||
{url:"/qtask/debug.html", name:"QTask-Debug", icon:"icon-bug"},
|
||||
]
|
||||
},
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<row class="data-list">
|
||||
<h3>高级查询 - [测试用例]</h3>
|
||||
<div class="col-md-6">
|
||||
<select class="form-control" v-model="table" style="width: 300px;">
|
||||
<option v-for="t in tables" :value="t.name">{{t.comment}} [{{t.name}}]</option>
|
||||
<select class="form-control" v-model="service" style="width: 300px;">
|
||||
<option v-for="t in services" :value="t.name">{{t.comment}} [{{t.name}}]</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -99,8 +99,10 @@
|
||||
cols: [],
|
||||
filters: []
|
||||
},
|
||||
tables: [],
|
||||
table: "",
|
||||
services:[],
|
||||
service:"",
|
||||
//tables: [],
|
||||
//table: "",
|
||||
//filters: [],
|
||||
|
||||
addFilter: "recompany",
|
||||
@@ -196,14 +198,14 @@
|
||||
location.href = "/export/data?fBean=" + JSON.stringify(fBean) + "&platToken=" + red.getPlatToken() + "&cate=csv";
|
||||
return;
|
||||
},
|
||||
tableList: function () {
|
||||
red.getJSON("/meta/tablelist",{}, function (json) {
|
||||
vm.tables = json;
|
||||
vm.table = vm.tables[0].name;
|
||||
serviceList: function () {
|
||||
red.getJSON("/meta/service_list",{}, function (json) {
|
||||
vm.services = json;
|
||||
vm.service = vm.services[0].name;
|
||||
});
|
||||
},
|
||||
loadCfg: function () {
|
||||
red.getJSON("/meta/listcfg", {key: vm.table, platToken: red.getPlatToken()}, function (json) {
|
||||
red.getJSON("/meta/cfg", {key: this.service, platToken: red.getPlatToken()}, function (json) {
|
||||
vm.cfg = json;
|
||||
});
|
||||
},
|
||||
@@ -256,7 +258,7 @@
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.tableList();
|
||||
this.serviceList();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,4 +1,7 @@
|
||||
<style>
|
||||
.table td, .table th{
|
||||
padding: 6px;
|
||||
}
|
||||
.panel-body {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -55,8 +58,7 @@
|
||||
<div class="col-xs-6" style="padding-left: 0px;">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="">
|
||||
<table class="table-bordered table-auto" style="width: 100%">
|
||||
<thead>
|
||||
<table :class="[{'table':status!=2},'table-bordered', 'table-auto']" style="width: 100%">
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<td v-show="status==3 || status==4 || status==5 || status==6"><input type="checkbox"></td>
|
||||
<th v-show="status==1"></th>
|
||||
@@ -67,8 +69,6 @@
|
||||
<th>附加属性</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in serviceDetail['tables'][sheet].items">
|
||||
<td v-show="status==3"><input type="checkbox" v-model="serviceInfo.exports" :value="sheet + '$' + item.name" class=""></td>
|
||||
<td v-show="status==4"><input type="checkbox" v-model="serviceInfo.imports" :value="sheet + '$' + item.name" class=""></td>
|
||||
@@ -83,7 +83,6 @@
|
||||
<td v-show="status!=2" v-text="item.inExt"></td>
|
||||
<td v-show="status!=2" v-text="item.remark"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<row class="meta-list">
|
||||
<div class="col-md-12" style="padding-top: 10px;">
|
||||
<div class="input-group list-head">
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">选择Table</button>
|
||||
<button class="btn btn-default" type="button">选择Table{{status}}</button>
|
||||
</span>
|
||||
<select class="form-control" v-model="table" style="width: 180px;">
|
||||
<option v-for="item in tables" :value="item.name"> {{item.name}} [{{item.comment}}]</option>
|
||||
@@ -42,8 +45,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
<table class="table-bordered" style="width: 100%">
|
||||
<thead>
|
||||
<table :class="[{'table':status!=2},'table-bordered']" style="width: 100%">
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<td v-show="status==3 || status==4 || status==5 || status==6"><input type="checkbox"></td>
|
||||
<th v-show="status==1"></th>
|
||||
@@ -54,8 +56,6 @@
|
||||
<th>附加属性</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in meta.items">
|
||||
<td v-show="status==3"><input type="checkbox" v-model="meta.exports" :value="item.name" class="form-control"></td>
|
||||
<td v-show="status==4"><input type="checkbox" v-model="meta.imports" :value="item.name" class="form-control"></td>
|
||||
@@ -86,7 +86,6 @@
|
||||
<td v-show="status==2"><input v-model="item.inExt" class="form-control"></td>
|
||||
<td v-show="status==2"><input v-model="item.remark" class="form-control"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -300,7 +299,7 @@
|
||||
filters: [{name:"", filterType:[""]}]
|
||||
},//完整的元数据数据,
|
||||
move: false,
|
||||
status: 0, //页面默认状态
|
||||
status: 7, //页面默认状态
|
||||
table: "", //页面选择的业务类型
|
||||
itemSort: [], //待保存的业务属性
|
||||
|
||||
|
||||
@@ -138,4 +138,8 @@ th{
|
||||
.data-list .table > thead > tr > th.sort-down:after {
|
||||
color: #145ccd;
|
||||
content: '\e6b8';
|
||||
}
|
||||
|
||||
.table td, .table th{
|
||||
padding: 5px;
|
||||
}
|
||||
@@ -100,8 +100,10 @@
|
||||
<script src="../res/zui/lib/jquery/jquery.js"></script>
|
||||
<script src="../res/zui/js/zui.js"></script>
|
||||
<script src="../res/js/red.js"></script>
|
||||
<!--<script src="../api/user.js"></script>//-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
<script>
|
||||
//import { login } from '../api/user.js'
|
||||
var vm = new Vue({
|
||||
el: ".login",
|
||||
data: {
|
||||
@@ -114,8 +116,11 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
loginCheck: function (row) {
|
||||
$.post("/user/login", row, function (json) {
|
||||
loginCheck: function ({username, pwd}) {
|
||||
/*login({username, pwd}).then(res => {
|
||||
console.log("res", res)
|
||||
});*/
|
||||
$.post("/user/login", {username, pwd}, function (json) {
|
||||
if (json.code == 0) {
|
||||
vm.loadPlats();
|
||||
red.showMsg({msg:"请选择业务平台"})
|
||||
|
||||
Reference in New Issue
Block a user