From 59ce81c19b75e3e6cdc6a3a65d49ec11e27b0a06 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 21 十一月 2019 11:03:45 +0800
Subject: [PATCH] 开发组件热更新问题处理

---
 WebService/src/main/resources/components/auditPackage/audit/audit.js |   94 ++++++++++++++++++++++++-----------------------
 1 files changed, 48 insertions(+), 46 deletions(-)

diff --git a/WebService/src/main/resources/components/auditPackage/audit/audit.js b/WebService/src/main/resources/components/auditPackage/audit/audit.js
index dad90f2..bf2c303 100644
--- a/WebService/src/main/resources/components/auditPackage/audit/audit.js
+++ b/WebService/src/main/resources/components/auditPackage/audit/audit.js
@@ -1,86 +1,88 @@
-(function(vc){
+(function (vc) {
 
     vc.extends({
         propTypes: {
-               callBackListener:vc.propTypes.string, //鐖剁粍浠跺悕绉�
-               callBackFunction:vc.propTypes.string //鐖剁粍浠剁洃鍚柟娉�
+            callBackListener: vc.propTypes.string, //鐖剁粍浠跺悕绉�
+            callBackFunction: vc.propTypes.string //鐖剁粍浠剁洃鍚柟娉�
         },
-        data:{
-            auditInfo:{
-                state:'',
-                remark:''
+        data: {
+            auditInfo: {
+                state: '',
+                remark: ''
             }
         },
-        watch:{
-            "auditInfo.state":{//娣卞害鐩戝惉锛屽彲鐩戝惉鍒板璞°�佹暟缁勭殑鍙樺寲
-                handler(val, oldVal){
-                    if(vc.notNull(val) && vc.component.auditInfo.state == '1200'){
+        watch: {
+            "auditInfo.state": {//娣卞害鐩戝惉锛屽彲鐩戝惉鍒板璞°�佹暟缁勭殑鍙樺寲
+                handler(val, oldVal) {
+                    if (vc.notNull(val) && vc.component.auditInfo.state == '1100') {
                         vc.component.auditInfo.remark = "鍚屾剰";
-                    }else{
+                    } else {
                         vc.component.auditInfo.remark = "";
                     }
 
                 },
-                deep:true
+                deep: true
             }
-         },
-         _initMethod:function(){
+        },
+        _initMethod: function () {
 
-         },
-         _initEvent:function(){
-            vc.on('audit','openAuditModal',function(){
+        },
+        _initEvent: function () {
+            vc.on('audit', 'openAuditModal', function () {
                 $('#auditModel').modal('show');
             });
         },
-        methods:{
-            auditValidate(){
+        methods: {
+            auditValidate() {
                 return vc.validate.validate({
-                    auditInfo:vc.component.auditInfo
-                },{
-                    'auditInfo.state':[
+                    auditInfo: vc.component.auditInfo
+                }, {
+                    'auditInfo.state': [
                         {
-                            limit:"required",
-                            param:"",
-                            errInfo:"瀹℃牳鐘舵�佷笉鑳戒负绌�"
+                            limit: "required",
+                            param: "",
+                            errInfo: "瀹℃牳鐘舵�佷笉鑳戒负绌�"
                         },
                         {
-                            limit:"num",
-                            param:"",
-                            errInfo:"瀹℃牳鐘舵�侀敊璇�"
+                            limit: "num",
+                            param: "",
+                            errInfo: "瀹℃牳鐘舵�侀敊璇�"
                         },
                     ],
-                    'auditInfo.remark':[
+                    'auditInfo.remark': [
                         {
-                            limit:"required",
-                            param:"",
-                            errInfo:"鍘熷洜鍐呭涓嶈兘涓虹┖"
+                            limit: "required",
+                            param: "",
+                            errInfo: "鍘熷洜鍐呭涓嶈兘涓虹┖"
                         },
                         {
-                            limit:"maxLength",
-                            param:"200",
-                            errInfo:"鍘熷洜鍐呭涓嶈兘瓒呰繃200"
+                            limit: "maxLength",
+                            param: "200",
+                            errInfo: "鍘熷洜鍐呭涓嶈兘瓒呰繃200"
                         },
                     ]
                 });
             },
-            _auditSubmit:function(){
-                if(!vc.component.auditValidate()){
+            _auditSubmit: function () {
+                if (!vc.component.auditValidate()) {
                     vc.message(vc.validate.errInfo);
-                    return ;
+                    return;
                 }
                 //涓嶆彁浜ゆ暟鎹皢鏁版嵁 鍥炶皟缁欎睛鍚鐞�
-                if(vc.notNull($props.callBackListener)){
-                    vc.emit($props.callBackListener,$props.callBackFunction,vc.component.auditInfo);
+                if (vc.notNull($props.callBackListener)) {
+                    vc.emit($props.callBackListener, $props.callBackFunction, vc.component.auditInfo);
                     $('#auditModel').modal('hide');
-                    return ;
+
+                    vc.component.clearAddBasePrivilegeInfo();
+                    return;
                 }
 
 
             },
-            clearAddBasePrivilegeInfo:function(){
-                vc.component.auditInfo={
-                             state:'',
-                             remark:''
+            clearAddBasePrivilegeInfo: function () {
+                vc.component.auditInfo = {
+                    state: '',
+                    remark: ''
                 }
             }
         }

--
Gitblit v1.8.0