1、修改Mysql线程池逻辑
2、新增数据表信息查询接口 3、优化前端代码逻辑 4、新增业面业务功能提示信息窗口
This commit is contained in:
@@ -1,5 +1,30 @@
|
||||
<row class="plat">
|
||||
|
||||
<div class="info">
|
||||
<a @click="showInfo()" href="javascript:;"><i class="icon icon-info"></i></a>
|
||||
</div>
|
||||
|
||||
<!-- info -->
|
||||
<div class="modal fade" id="f-info">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||
<h4 class="modal-title">功能概览</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
数据平台:可以获取数据的平台(除java-method类型的qtask 实列都会对应绑定相应的数据平台)
|
||||
</p>
|
||||
<img src="../res/img/db_plat.png">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- head -->
|
||||
<div class="col-md-11">
|
||||
<h3 v-text="cfg.title"></h3>
|
||||
@@ -54,6 +79,17 @@
|
||||
<input v-model="row.name" class="form-control" id="queryId" placeholder="请输入 平台名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="queryId" class="col-sm-2">平台类型</label>
|
||||
<div class="col-md-2 col-sm-10">
|
||||
<select class="form-control" v-model="row.cate">
|
||||
<option value="mysql">MySql</option>
|
||||
<option value="es">ES</option>
|
||||
<option value="htttp">Htttp</option>
|
||||
<option value="method">Method</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2">连接URL</label>
|
||||
@@ -100,7 +136,8 @@
|
||||
</row>
|
||||
|
||||
<script>
|
||||
let {dbList, dbSave} = plat
|
||||
let {showOk} = red
|
||||
let {dbList, dbSave, catalogList} = plat
|
||||
|
||||
var vm = new Vue({
|
||||
el: ".plat",
|
||||
@@ -150,24 +187,11 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
findList: function () {
|
||||
dbList().then(res => {
|
||||
vm.list = res;
|
||||
})
|
||||
|
||||
/*var para = {
|
||||
doc:"db_plat",
|
||||
shows: JSON.stringify(["_id", "name", "url", "user", "pwd", "catalogs", "remark", "status"])
|
||||
};
|
||||
red.getJSON("/meta/find", para, function (json) {
|
||||
for (var i=0; i<json.rows.length; i++) {
|
||||
json.rows[i]["pulse"] = "";
|
||||
}
|
||||
vm.list = json;
|
||||
})*/
|
||||
findList() {
|
||||
dbList().then(res => vm.list = res)
|
||||
},
|
||||
update: function (kv, row) {
|
||||
red.post("/meta/save", {
|
||||
/*update: function (kv, row) {
|
||||
red.post('/meta/save', {
|
||||
_id: row._id,
|
||||
doc: JSON.stringify(kv)
|
||||
}, function (json) {
|
||||
@@ -175,38 +199,30 @@
|
||||
red.putAll(row, kv);
|
||||
vm.findList();
|
||||
});
|
||||
},
|
||||
},*/
|
||||
edit: function (row) {
|
||||
row["catalogs"] = row["catalogs"] || [];
|
||||
vm.row = row;
|
||||
this.loadCatalogs();
|
||||
$('#myModal').modal({moveable: true});
|
||||
this.row = row
|
||||
this.loadCatalogs()
|
||||
row['catalogs'] = row['catalogs'] || []
|
||||
$('#myModal').modal({moveable: true})
|
||||
},
|
||||
save: function (row) {
|
||||
dbSave({plat: row}).then(() => {
|
||||
red.showMsg({msg: "操作成功"})
|
||||
red.showOk()
|
||||
$('#myModal').modal('hide')
|
||||
vm.findList()
|
||||
this.findList()
|
||||
})
|
||||
|
||||
/* red.post("/meta/save", {
|
||||
_id: row._id || "db_plat",
|
||||
doc: JSON.stringify(row)
|
||||
}, function (json) {
|
||||
red.showMsg();
|
||||
$('#myModal').modal('hide');
|
||||
vm.findList();
|
||||
}); */
|
||||
},
|
||||
loadCatalogs: function () {
|
||||
vm.catalogs = [];
|
||||
red.post("/_db/catalogs", {
|
||||
url: this.row.url,
|
||||
user: this.row.user,
|
||||
pwd: this.row.pwd
|
||||
}, function (json) {
|
||||
vm.catalogs = json;
|
||||
});
|
||||
//let [cate, url, user, pwd] = this.row
|
||||
let dbAccount = {cate:'', url:'', user:'', pwd:''}
|
||||
for (let key in dbAccount) {
|
||||
dbAccount[key] = this.row[key]
|
||||
}
|
||||
catalogList({dbAccount}).then(res => {
|
||||
this.catalogs = res;
|
||||
})
|
||||
},
|
||||
dbPulse: function (row) {
|
||||
/*row["check"] = true;
|
||||
@@ -216,6 +232,9 @@
|
||||
row["pulse"] = json.body;
|
||||
row["check"] = false;
|
||||
});*/
|
||||
},
|
||||
showInfo() {
|
||||
$('#f-info').modal({moveable: true})
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
|
||||
Reference in New Issue
Block a user