From 5d09d7360dc19afeba2c117774bcfea20e917d55 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期日, 22 十二月 2019 12:53:49 +0800
Subject: [PATCH] 优化其他小区添加

---
 WebService/src/main/resources/components/appPackage/edit-app/editApp.js |  150 +++++++++++++++++++++++++-------------------------
 1 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/WebService/src/main/resources/components/appPackage/edit-app/editApp.js b/WebService/src/main/resources/components/appPackage/edit-app/editApp.js
index 0fd3616..299cf1e 100644
--- a/WebService/src/main/resources/components/appPackage/edit-app/editApp.js
+++ b/WebService/src/main/resources/components/appPackage/edit-app/editApp.js
@@ -1,86 +1,86 @@
-(function(vc,vm){
+(function (vc, vm) {
 
     vc.extends({
-        data:{
-            editAppInfo:{
-                appId:'',
-name:'',
-securityCode:'',
-whileListIp:'',
-blackListIp:'',
-remark:'',
+        data: {
+            editAppInfo: {
+                appId: '',
+                name: '',
+                securityCode: '',
+                whileListIp: '',
+                blackListIp: '',
+                remark: '',
 
             }
         },
-         _initMethod:function(){
+        _initMethod: function () {
 
-         },
-         _initEvent:function(){
-             vc.on('editApp','openEditAppModal',function(_params){
+        },
+        _initEvent: function () {
+            vc.on('editApp', 'openEditAppModal', function (_params) {
                 vc.component.refreshEditAppInfo();
                 $('#editAppModel').modal('show');
                 vc.component.editAppInfo = _params;
                 vc.component.editAppInfo.communityId = vc.getCurrentCommunity().communityId;
             });
         },
-        methods:{
-            editAppValidate:function(){
-                        return vc.validate.validate({
-                            editAppInfo:vc.component.editAppInfo
-                        },{
-                            'editAppInfo.name':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"搴旂敤鍚嶇О涓嶈兘涓虹┖"
+        methods: {
+            editAppValidate: function () {
+                return vc.validate.validate({
+                    editAppInfo: vc.component.editAppInfo
+                }, {
+                    'editAppInfo.name': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "搴旂敤鍚嶇О涓嶈兘涓虹┖"
                         },
- {
-                            limit:"maxin",
-                            param:"2,50",
-                            errInfo:"搴旂敤鍚嶇О蹇呴』鍦�2鑷�50瀛楃涔嬮棿"
+                        {
+                            limit: "maxin",
+                            param: "2,50",
+                            errInfo: "搴旂敤鍚嶇О蹇呴』鍦�2鑷�50瀛楃涔嬮棿"
                         },
                     ],
-'editAppInfo.securityCode':[
- {
-                            limit:"maxLength",
-                            param:"64",
-                            errInfo:"绉橀挜澶暱瓒呰繃64浣�"
+                    'editAppInfo.securityCode': [
+                        {
+                            limit: "maxLength",
+                            param: "64",
+                            errInfo: "绉橀挜澶暱瓒呰繃64浣�"
                         },
                     ],
-'editAppInfo.whileListIp':[
- {
-                            limit:"maxLength",
-                            param:"200",
-                            errInfo:"鐧藉悕鍗曞唴瀹逛笉鑳借秴杩�200"
+                    'editAppInfo.whileListIp': [
+                        {
+                            limit: "maxLength",
+                            param: "200",
+                            errInfo: "鐧藉悕鍗曞唴瀹逛笉鑳借秴杩�200"
                         },
                     ],
-'editAppInfo.blackListIp':[
- {
-                            limit:"maxLength",
-                            param:"200",
-                            errInfo:"榛戝悕鍗曞唴瀹逛笉鑳借秴杩�200"
+                    'editAppInfo.blackListIp': [
+                        {
+                            limit: "maxLength",
+                            param: "200",
+                            errInfo: "榛戝悕鍗曞唴瀹逛笉鑳借秴杩�200"
                         },
                     ],
-'editAppInfo.remark':[
- {
-                            limit:"maxLength",
-                            param:"200",
-                            errInfo:"澶囨敞鍐呭涓嶈兘瓒呰繃200"
+                    'editAppInfo.remark': [
+                        {
+                            limit: "maxLength",
+                            param: "200",
+                            errInfo: "澶囨敞鍐呭涓嶈兘瓒呰繃200"
                         },
                     ],
-'editAppInfo.appId':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"搴旂敤Id涓嶈兘涓虹┖"
+                    'editAppInfo.appId': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "搴旂敤Id涓嶈兘涓虹┖"
                         }]
 
-                        });
-             },
-            editApp:function(){
-                if(!vc.component.editAppValidate()){
+                });
+            },
+            editApp: function () {
+                if (!vc.component.editAppValidate()) {
                     vc.message(vc.validate.errInfo);
-                    return ;
+                    return;
                 }
 
                 vc.http.post(
@@ -88,36 +88,36 @@
                     'update',
                     JSON.stringify(vc.component.editAppInfo),
                     {
-                        emulateJSON:true
-                     },
-                     function(json,res){
+                        emulateJSON: true
+                    },
+                    function (json, res) {
                         //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
-                        if(res.status == 200){
+                        if (res.status == 200) {
                             //鍏抽棴model
                             $('#editAppModel').modal('hide');
-                             vc.emit('appManage','listApp',{});
-                            return ;
+                            vc.emit('appManage', 'listApp', {});
+                            return;
                         }
                         vc.message(json);
-                     },
-                     function(errInfo,error){
+                    },
+                    function (errInfo, error) {
                         console.log('璇锋眰澶辫触澶勭悊');
 
                         vc.message(errInfo);
-                     });
+                    });
             },
-            refreshEditAppInfo:function(){
-                vc.component.editAppInfo= {
-                  appId:'',
-name:'',
-securityCode:'',
-whileListIp:'',
-blackListIp:'',
-remark:'',
+            refreshEditAppInfo: function () {
+                vc.component.editAppInfo = {
+                    appId: '',
+                    name: '',
+                    securityCode: '',
+                    whileListIp: '',
+                    blackListIp: '',
+                    remark: '',
 
                 }
             }
         }
     });
 
-})(window.vc,window.vc.component);
+})(window.vc, window.vc.component);

--
Gitblit v1.8.0