mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
加入databus
This commit is contained in:
parent
5960861530
commit
65f5d49909
8
app.js
8
app.js
@ -36,11 +36,11 @@ let opts = {
|
||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
|
||||
|
||||
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
|
||||
//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts));
|
||||
//app.use('/app',proxy('http://127.0.0.1:8012',opts));
|
||||
//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts));
|
||||
//app.use('/app',proxy('http://127.0.0.1:8012',opts));
|
||||
|
||||
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
|
||||
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
<div id="addBusinessDatabusModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b ">添加</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addBusinessDatabusInfo.databusName" type="text"
|
||||
placeholder="必填,请填写名称" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">业务类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addBusinessDatabusInfo.businessTypeCd" type="text"
|
||||
placeholder="必填,请填写业务类型" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">适配器</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addBusinessDatabusInfo.beanName" type="text" placeholder="必填,请填写适配器"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">顺序</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addBusinessDatabusInfo.seq" type="text" placeholder="必填,请填写顺序"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">状态</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addBusinessDatabusInfo.state">
|
||||
<option selected disabled value="">必填,请选择状态</option>
|
||||
<option value="1001">在用</option>
|
||||
<option value="2002">停用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="saveBusinessDatabusInfo()"><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
147
public/components/dev/addBusinessDatabus/addBusinessDatabus.js
Normal file
147
public/components/dev/addBusinessDatabus/addBusinessDatabus.js
Normal file
@ -0,0 +1,147 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data: {
|
||||
addBusinessDatabusInfo: {
|
||||
databusId: '',
|
||||
businessTypeCd: '',
|
||||
beanName: '',
|
||||
seq: '',
|
||||
databusName: '',
|
||||
state: '',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addBusinessDatabus', 'openAddBusinessDatabusModal', function () {
|
||||
$('#addBusinessDatabusModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
addBusinessDatabusValidate() {
|
||||
return vc.validate.validate({
|
||||
addBusinessDatabusInfo: vc.component.addBusinessDatabusInfo
|
||||
}, {
|
||||
'addBusinessDatabusInfo.businessTypeCd': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "业务类型不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "业务类型格式错误"
|
||||
},
|
||||
],
|
||||
'addBusinessDatabusInfo.beanName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "适配器不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "256",
|
||||
errInfo: "适配器名称太长"
|
||||
},
|
||||
],
|
||||
'addBusinessDatabusInfo.databusName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "128",
|
||||
errInfo: "名称太长"
|
||||
},
|
||||
],
|
||||
'addBusinessDatabusInfo.seq': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "顺序不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "顺序格式错误"
|
||||
},
|
||||
],
|
||||
|
||||
'addBusinessDatabusInfo.state': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "状态不能为空"
|
||||
}]
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
saveBusinessDatabusInfo: function () {
|
||||
if (!vc.component.addBusinessDatabusValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
vc.component.addBusinessDatabusInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if (vc.notNull($props.callBackListener)) {
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addBusinessDatabusInfo);
|
||||
$('#addBusinessDatabusModel').modal('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/businessDatabus/saveBusinessDatabus',
|
||||
JSON.stringify(vc.component.addBusinessDatabusInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addBusinessDatabusModel').modal('hide');
|
||||
vc.component.clearAddBusinessDatabusInfo();
|
||||
vc.emit('businessDatabusManage', 'listBusinessDatabus', {});
|
||||
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearAddBusinessDatabusInfo: function () {
|
||||
vc.component.addBusinessDatabusInfo = {
|
||||
businessTypeCd: '',
|
||||
beanName: '',
|
||||
seq: '',
|
||||
databusName: '',
|
||||
state: '',
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -0,0 +1,60 @@
|
||||
<div id = "chooseBusinessDatabusModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseBusinessDatabusModelLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" id="chooseBusinessDatabusModelLabel">选择databus</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class=" row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-7 m-b-xs">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input placeholder="输入databus名称" type="text" v-model="chooseBusinessDatabusInfo._currentBusinessDatabusName" class="form-control form-control-sm">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-sm btn-primary" v-on:click="queryBusinessDatabuss()">查询</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive" style="margin-top:15px">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Databus ID</th>
|
||||
<th class="text-center">业务类型</th>
|
||||
<th class="text-center">适配器</th>
|
||||
<th class="text-center">顺序</th>
|
||||
<th class="text-center">操作</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="businessDatabus in chooseBusinessDatabusInfo.businessDatabuss">
|
||||
<td class="text-center">{{businessDatabus.databusId}}</td>
|
||||
<td class="text-center">{{businessDatabus.businessTypeCd}}</td>
|
||||
<td class="text-center">{{businessDatabus.beanName}}</td>
|
||||
<td class="text-center">{{businessDatabus.seq}}</td>
|
||||
|
||||
<td>
|
||||
<button class="btn btn-primary btn-xs" v-on:click="chooseBusinessDatabus(businessDatabus)">选择</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,63 @@
|
||||
(function(vc){
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
emitChooseBusinessDatabus:vc.propTypes.string,
|
||||
emitLoadData:vc.propTypes.string
|
||||
},
|
||||
data:{
|
||||
chooseBusinessDatabusInfo:{
|
||||
businessDatabuss:[],
|
||||
_currentBusinessDatabusName:'',
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('chooseBusinessDatabus','openChooseBusinessDatabusModel',function(_param){
|
||||
$('#chooseBusinessDatabusModel').modal('show');
|
||||
vc.component._refreshChooseBusinessDatabusInfo();
|
||||
vc.component._loadAllBusinessDatabusInfo(1,10,'');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
_loadAllBusinessDatabusInfo:function(_page,_row,_name){
|
||||
var param = {
|
||||
params:{
|
||||
page:_page,
|
||||
row:_row,
|
||||
communityId:vc.getCurrentCommunity().communityId,
|
||||
name:_name
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('businessDatabus.listBusinessDatabuss',
|
||||
param,
|
||||
function(json){
|
||||
var _businessDatabusInfo = JSON.parse(json);
|
||||
vc.component.chooseBusinessDatabusInfo.businessDatabuss = _businessDatabusInfo.businessDatabuss;
|
||||
},function(){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
chooseBusinessDatabus:function(_businessDatabus){
|
||||
if(_businessDatabus.hasOwnProperty('name')){
|
||||
_businessDatabus.businessDatabusName = _businessDatabus.name;
|
||||
}
|
||||
vc.emit($props.emitChooseBusinessDatabus,'chooseBusinessDatabus',_businessDatabus);
|
||||
vc.emit($props.emitLoadData,'listBusinessDatabusData',{
|
||||
businessDatabusId:_businessDatabus.businessDatabusId
|
||||
});
|
||||
$('#chooseBusinessDatabusModel').modal('hide');
|
||||
},
|
||||
queryBusinessDatabuss:function(){
|
||||
vc.component._loadAllBusinessDatabusInfo(1,10,vc.component.chooseBusinessDatabusInfo._currentBusinessDatabusName);
|
||||
},
|
||||
_refreshChooseBusinessDatabusInfo:function(){
|
||||
vc.component.chooseBusinessDatabusInfo._currentBusinessDatabusName = "";
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
})(window.vc);
|
||||
@ -0,0 +1,23 @@
|
||||
<div class="modal fade" id="deleteBusinessDatabusModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<tr align="center">
|
||||
<th>确定删除</th>
|
||||
</tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"
|
||||
v-on:click="closeDeleteBusinessDatabusModel()">点错了</button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteBusinessDatabus()">确认删除</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,52 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
deleteBusinessDatabusInfo: {
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('deleteBusinessDatabus', 'openDeleteBusinessDatabusModal', function (_params) {
|
||||
|
||||
vc.component.deleteBusinessDatabusInfo = _params;
|
||||
$('#deleteBusinessDatabusModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deleteBusinessDatabus: function () {
|
||||
vc.component.deleteBusinessDatabusInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/businessDatabus/deleteBusinessDatabus',
|
||||
JSON.stringify(vc.component.deleteBusinessDatabusInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteBusinessDatabusModel').modal('hide');
|
||||
vc.emit('businessDatabusManage', 'listBusinessDatabus', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.message(json);
|
||||
|
||||
});
|
||||
},
|
||||
closeDeleteBusinessDatabusModel: function () {
|
||||
$('#deleteBusinessDatabusModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -0,0 +1,61 @@
|
||||
<div id="editBusinessDatabusModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b ">修改</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editBusinessDatabusInfo.databusName" type="text"
|
||||
placeholder="必填,请填写名称" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">业务类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editBusinessDatabusInfo.businessTypeCd" type="text"
|
||||
placeholder="必填,请填写业务类型" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">适配器</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editBusinessDatabusInfo.beanName" type="text"
|
||||
placeholder="必填,请填写适配器" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">顺序</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editBusinessDatabusInfo.seq" type="text" placeholder="必填,请填写顺序"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">状态</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editBusinessDatabusInfo.state">
|
||||
<option selected disabled value="">必填,请选择状态</option>
|
||||
<option value="1001">在用</option>
|
||||
<option value="2002">停用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="editBusinessDatabus()"><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
137
public/components/dev/editBusinessDatabus/editBusinessDatabus.js
Normal file
137
public/components/dev/editBusinessDatabus/editBusinessDatabus.js
Normal file
@ -0,0 +1,137 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
editBusinessDatabusInfo: {
|
||||
databusId: '',
|
||||
businessTypeCd: '',
|
||||
beanName: '',
|
||||
seq: '',
|
||||
databusName: '',
|
||||
state: '',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editBusinessDatabus', 'openEditBusinessDatabusModal', function (_params) {
|
||||
vc.component.refreshEditBusinessDatabusInfo();
|
||||
$('#editBusinessDatabusModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editBusinessDatabusInfo);
|
||||
vc.component.editBusinessDatabusInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
editBusinessDatabusValidate: function () {
|
||||
return vc.validate.validate({
|
||||
editBusinessDatabusInfo: vc.component.editBusinessDatabusInfo
|
||||
}, {
|
||||
'editBusinessDatabusInfo.businessTypeCd': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "业务类型不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "业务类型格式错误"
|
||||
},
|
||||
],
|
||||
'editBusinessDatabusInfo.beanName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "适配器不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "256",
|
||||
errInfo: "适配器名称太长"
|
||||
},
|
||||
],
|
||||
'editBusinessDatabusInfo.databusName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "128",
|
||||
errInfo: "名称太长"
|
||||
},
|
||||
],
|
||||
'editBusinessDatabusInfo.seq': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "顺序不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "顺序格式错误"
|
||||
},
|
||||
],
|
||||
'editBusinessDatabusInfo.databusId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "Databus ID不能为空"
|
||||
}],
|
||||
'editBusinessDatabusInfo.state': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "状态不能为空"
|
||||
}]
|
||||
|
||||
});
|
||||
},
|
||||
editBusinessDatabus: function () {
|
||||
if (!vc.component.editBusinessDatabusValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/businessDatabus/updateBusinessDatabus',
|
||||
JSON.stringify(vc.component.editBusinessDatabusInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#editBusinessDatabusModel').modal('hide');
|
||||
vc.emit('businessDatabusManage', 'listBusinessDatabus', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
});
|
||||
},
|
||||
refreshEditBusinessDatabusInfo: function () {
|
||||
vc.component.editBusinessDatabusInfo = {
|
||||
databusId: '',
|
||||
businessTypeCd: '',
|
||||
beanName: '',
|
||||
seq: '',
|
||||
databusName: '',
|
||||
state: '',
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -0,0 +1,50 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>databus信息</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" v-if="viewBusinessDatabusInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectBusinessDatabusInfoModel()">
|
||||
<i class="glyphicon glyphicon-search"></i> 选择databus</button>
|
||||
|
||||
<button type="button" v-if="viewBusinessDatabusInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddBusinessDatabusInfoModel()">
|
||||
<i class="glyphicon glyphicon-plus"></i> 添加databus</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" >业务类型:</label>
|
||||
<label class="">{{viewBusinessDatabusInfo.businessTypeCd}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" >适配器:</label>
|
||||
<label class="">{{viewBusinessDatabusInfo.beanName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" >顺序:</label>
|
||||
<label class="">{{viewBusinessDatabusInfo.seq}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="dev/addBusinessDatabus"
|
||||
callBackListener="viewBusinessDatabusInfo"
|
||||
callBackFunction="chooseBusinessDatabus"
|
||||
></vc:create>
|
||||
|
||||
|
||||
<vc:create path="dev/chooseBusinessDatabus"
|
||||
emitChooseBusinessDatabus="viewBusinessDatabusInfo"
|
||||
emitLoadData="viewBusinessDatabusInfo"
|
||||
></vc:create>
|
||||
</div>
|
||||
@ -0,0 +1,50 @@
|
||||
/**
|
||||
databus 组件
|
||||
**/
|
||||
(function(vc){
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener:vc.propTypes.string, //父组件名称
|
||||
callBackFunction:vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data:{
|
||||
viewBusinessDatabusInfo:{
|
||||
index:0,
|
||||
flowComponent:'viewBusinessDatabusInfo',
|
||||
businessTypeCd:'',
|
||||
beanName:'',
|
||||
seq:'',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
//根据请求参数查询 查询 业主信息
|
||||
vc.component._loadBusinessDatabusInfoData();
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('viewBusinessDatabusInfo','chooseBusinessDatabus',function(_app){
|
||||
vc.copyObject(_app, vc.component.viewBusinessDatabusInfo);
|
||||
vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewBusinessDatabusInfo);
|
||||
});
|
||||
|
||||
vc.on('viewBusinessDatabusInfo', 'onIndex', function(_index){
|
||||
vc.component.viewBusinessDatabusInfo.index = _index;
|
||||
});
|
||||
|
||||
},
|
||||
methods:{
|
||||
|
||||
_openSelectBusinessDatabusInfoModel(){
|
||||
vc.emit('chooseBusinessDatabus','openChooseBusinessDatabusModel',{});
|
||||
},
|
||||
_openAddBusinessDatabusInfoModel(){
|
||||
vc.emit('addBusinessDatabus','openAddBusinessDatabusModal',{});
|
||||
},
|
||||
_loadBusinessDatabusInfoData:function(){
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -0,0 +1,115 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入业务类型"
|
||||
v-model="businessDatabusManageInfo.conditions.businessTypeCd" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入适配器"
|
||||
v-model="businessDatabusManageInfo.conditions.beanName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入ID"
|
||||
v-model="businessDatabusManageInfo.conditions.databusId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryBusinessDatabusMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>Databus</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_openAddBusinessDatabusModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
添加
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">ID</th>
|
||||
<th class="text-center">名称</th>
|
||||
<th class="text-center">业务类型</th>
|
||||
<th class="text-center">适配器</th>
|
||||
<th class="text-center">顺序</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">操作</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="businessDatabus in businessDatabusManageInfo.businessDatabuss">
|
||||
<td class="text-center">{{businessDatabus.databusId}}</td>
|
||||
<td class="text-center">{{businessDatabus.databusName}}</td>
|
||||
<td class="text-center">{{businessDatabus.businessTypeCd}}</td>
|
||||
<td class="text-center">{{businessDatabus.beanName}}</td>
|
||||
<td class="text-center">{{businessDatabus.seq}}</td>
|
||||
<td class="text-center">{{businessDatabus.state=='1001'?'在用':'停用'}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditBusinessDatabusModel(businessDatabus)">修改</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteBusinessDatabusModel(businessDatabus)">删除</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<vc:create path="dev/addBusinessDatabus" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="dev/editBusinessDatabus"></vc:create>
|
||||
<vc:create path="dev/deleteBusinessDatabus"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -0,0 +1,84 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
businessDatabusManageInfo: {
|
||||
businessDatabuss: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
databusId: '',
|
||||
conditions: {
|
||||
businessTypeCd: '',
|
||||
beanName: '',
|
||||
databusId: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listBusinessDatabuss(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('businessDatabusManage', 'listBusinessDatabus', function (_param) {
|
||||
vc.component._listBusinessDatabuss(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listBusinessDatabuss(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listBusinessDatabuss: function (_page, _rows) {
|
||||
|
||||
vc.component.businessDatabusManageInfo.conditions.page = _page;
|
||||
vc.component.businessDatabusManageInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params: vc.component.businessDatabusManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/businessDatabus/queryBusinessDatabus',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _businessDatabusManageInfo = JSON.parse(json);
|
||||
vc.component.businessDatabusManageInfo.total = _businessDatabusManageInfo.total;
|
||||
vc.component.businessDatabusManageInfo.records = _businessDatabusManageInfo.records;
|
||||
vc.component.businessDatabusManageInfo.businessDatabuss = _businessDatabusManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.businessDatabusManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddBusinessDatabusModal: function () {
|
||||
vc.emit('addBusinessDatabus', 'openAddBusinessDatabusModal', {});
|
||||
},
|
||||
_openEditBusinessDatabusModel: function (_businessDatabus) {
|
||||
vc.emit('editBusinessDatabus', 'openEditBusinessDatabusModal', _businessDatabus);
|
||||
},
|
||||
_openDeleteBusinessDatabusModel: function (_businessDatabus) {
|
||||
vc.emit('deleteBusinessDatabus', 'openDeleteBusinessDatabusModal', _businessDatabus);
|
||||
},
|
||||
_queryBusinessDatabusMethod: function () {
|
||||
vc.component._listBusinessDatabuss(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.businessDatabusManageInfo.moreCondition) {
|
||||
vc.component.businessDatabusManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.businessDatabusManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user