From a54a28a5a26e86d6b32990bfbb174c350b917b47 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 18 七月 2019 15:03:51 +0800
Subject: [PATCH] 加入服务下一步限制功能
---
WebService/src/main/resources/components/view-app-info/viewAppInfo.js | 7 +++++--
WebService/src/main/resources/components/service-binding/serviceBinding.js | 11 ++++++++++-
WebService/src/main/resources/components/service-binding/serviceBinding.html | 2 ++
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/WebService/src/main/resources/components/service-binding/serviceBinding.html b/WebService/src/main/resources/components/service-binding/serviceBinding.html
index 87bd673..1a24ccc 100644
--- a/WebService/src/main/resources/components/service-binding/serviceBinding.html
+++ b/WebService/src/main/resources/components/service-binding/serviceBinding.html
@@ -7,6 +7,8 @@
<!-- 閫夋嫨 搴旂敤淇℃伅 -->
<div v-if="serviceBindingInfo.index == 0">
<vc:create name="viewAppInfo"
+ callBackListener="serviceBinding"
+ callBackFunction="notify"
></vc:create>
</div>
diff --git a/WebService/src/main/resources/components/service-binding/serviceBinding.js b/WebService/src/main/resources/components/service-binding/serviceBinding.js
index 6cf7865..c803744 100644
--- a/WebService/src/main/resources/components/service-binding/serviceBinding.js
+++ b/WebService/src/main/resources/components/service-binding/serviceBinding.js
@@ -7,14 +7,18 @@
vc.extends({
data:{
serviceBindingInfo:{
- $step:'',
+ $step:{},
index:0,
+ infos:[]
}
},
_initMethod:function(){
vc.component._initStep();
},
_initEvent:function(){
+ vc.on("serviceBinding", "notify", function(_info){
+ vc.component.serviceBindingInfo.infos[vc.component.serviceBindingInfo.index] = _info;
+ });
},
methods:{
@@ -32,6 +36,11 @@
vc.component.serviceBindingInfo.index = vc.component.serviceBindingInfo.$step.getIndex();
},
_nextStep:function(){
+ var _currentData = vc.component.serviceBindingInfo.infos[vc.component.serviceBindingInfo.index];
+ if( _currentData == null || _currentData == undefined){
+ vc.message("璇烽�夋嫨鐩稿叧淇℃伅");
+ return ;
+ }
vc.component.serviceBindingInfo.$step.nextStep();
vc.component.serviceBindingInfo.index = vc.component.serviceBindingInfo.$step.getIndex();
}
diff --git a/WebService/src/main/resources/components/view-app-info/viewAppInfo.js b/WebService/src/main/resources/components/view-app-info/viewAppInfo.js
index d8181d7..3a91e03 100644
--- a/WebService/src/main/resources/components/view-app-info/viewAppInfo.js
+++ b/WebService/src/main/resources/components/view-app-info/viewAppInfo.js
@@ -4,7 +4,10 @@
(function(vc){
vc.extends({
-
+ propTypes: {
+ callBackListener:vc.propTypes.string, //鐖剁粍浠跺悕绉�
+ callBackFunction:vc.propTypes.string //鐖剁粍浠剁洃鍚柟娉�
+ },
data:{
viewAppInfo:{
appId:"",
@@ -22,7 +25,7 @@
_initEvent:function(){
vc.on('viewAppInfo','chooseApp',function(_app){
vc.component.viewAppInfo = _app;
- //vc.emit($props.callBackComponent,'notify',_owner);
+ vc.emit($props.callBackListener,$props.callBackFunction,_app);
});
},
--
Gitblit v1.8.0