From b2e1069da3667e1b72dee6dd14d736fc70f1b0ca Mon Sep 17 00:00:00 2001
From: mrzcc <121184950@qq.com>
Date: 星期二, 18 二月 2020 11:34:16 +0800
Subject: [PATCH] 优化巡检计划sql查询

---
 java110-code-generator/src/main/resources/web/add/add.js |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/java110-code-generator/src/main/resources/web/add/add.js b/java110-code-generator/src/main/resources/web/add/add.js
index 3ec29c4..a3964da 100644
--- a/java110-code-generator/src/main/resources/web/add/add.js
+++ b/java110-code-generator/src/main/resources/web/add/add.js
@@ -1,8 +1,13 @@
 (function(vc){
 
     vc.extends({
+        propTypes: {
+               callBackListener:vc.propTypes.string, //鐖剁粍浠跺悕绉�
+               callBackFunction:vc.propTypes.string //鐖剁粍浠剁洃鍚柟娉�
+        },
         data:{
             add@@TemplateCode@@Info:{
+                @@templateKey@@:'',
                 @@templateCodeColumns@@
             }
         },
@@ -19,29 +24,26 @@
                 return vc.validate.validate({
                     add@@TemplateCode@@Info:vc.component.add@@TemplateCode@@Info
                 },{
-                    'add@@TemplateCode@@Info.name':[
-                        {
-                            limit:"required",
-                            param:"",
-                            errInfo:"妤煎悕绉颁笉鑳戒负绌�"
-                        },
-                        {
-                            limit:"maxin",
-                            param:"2,10",
-                            errInfo:"妤煎悕绉伴暱搴﹀繀椤诲湪2浣嶈嚦10浣�"
-                        },
-                    ]
+                    @@addTemplateCodeValidate@@
+
+
 
                 });
             },
             save@@TemplateCode@@Info:function(){
                 if(!vc.component.add@@TemplateCode@@Validate()){
-                    vc.message(vc.validate.errInfo);
+                    vc.toast(vc.validate.errInfo);
 
                     return ;
                 }
 
                 vc.component.add@@TemplateCode@@Info.communityId = vc.getCurrentCommunity().communityId;
+                //涓嶆彁浜ゆ暟鎹皢鏁版嵁 鍥炶皟缁欎睛鍚鐞�
+                if(vc.notNull($props.callBackListener)){
+                    vc.emit($props.callBackListener,$props.callBackFunction,vc.component.add@@TemplateCode@@Info);
+                    $('#add@@TemplateCode@@Model').modal('hide');
+                    return ;
+                }
 
                 vc.http.post(
                     'add@@TemplateCode@@',

--
Gitblit v1.8.0