From f663617dbb1afab0f68801ceedef3a8eb11c81f3 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期三, 25 十二月 2019 21:22:18 +0800
Subject: [PATCH] 解决communityId 错误问题

---
 WebService/src/main/resources/components/servicePackage/edit-service/editService.js |  299 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 149 insertions(+), 150 deletions(-)

diff --git a/WebService/src/main/resources/components/servicePackage/edit-service/editService.js b/WebService/src/main/resources/components/servicePackage/edit-service/editService.js
index 8a69727..eafd0aa 100644
--- a/WebService/src/main/resources/components/servicePackage/edit-service/editService.js
+++ b/WebService/src/main/resources/components/servicePackage/edit-service/editService.js
@@ -1,174 +1,173 @@
-(function(vc,vm){
+(function (vc, vm) {
 
     vc.extends({
-        data:{
-            editServiceInfo:{
-                serviceId:'',
-name:'',
-serviceCode:'',
-businessTypeCd:'API',
-seq:'1',
-messageQueueName:'',
-isInstance:'Y',
-url:'http://order-service/orderApi/service',
-method:'',
-timeout:'60',
-retryCount:'3',
-provideAppId:'8000418002',
+        data: {
+            editServiceInfo: {
+                serviceId: '',
+                name: '',
+                serviceCode: '',
+                businessTypeCd: 'API',
+                seq: '1',
+                messageQueueName: '',
+                isInstance: 'Y',
+                url: 'http://order-service/orderApi/service',
+                method: '',
+                timeout: '60',
+                retryCount: '3',
+                provideAppId: '8000418002',
 
             }
         },
-         _initMethod:function(){
+        _initMethod: function () {
 
-         },
-         _initEvent:function(){
-             vc.on('editService','openEditServiceModal',function(_params){
+        },
+        _initEvent: function () {
+            vc.on('editService', 'openEditServiceModal', function (_params) {
                 vc.component.refreshEditServiceInfo();
                 $('#editServiceModel').modal('show');
                 vc.copyObject(_params, vc.component.editServiceInfo);
-                vc.component.editServiceInfo.communityId = vc.getCurrentCommunity().communityId;
             });
         },
-        methods:{
-            editServiceValidate:function(){
-                        return vc.validate.validate({
-                            editServiceInfo:vc.component.editServiceInfo
-                        },{
-                            'editServiceInfo.name':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"鏈嶅姟鍚嶇О涓嶈兘涓虹┖"
+        methods: {
+            editServiceValidate: function () {
+                return vc.validate.validate({
+                    editServiceInfo: vc.component.editServiceInfo
+                }, {
+                    'editServiceInfo.name': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "鏈嶅姟鍚嶇О涓嶈兘涓虹┖"
                         },
- {
-                            limit:"maxLength",
-                            param:"50",
-                            errInfo:"鏈嶅姟鍚嶇О涓嶈兘瓒呰繃50"
+                        {
+                            limit: "maxLength",
+                            param: "50",
+                            errInfo: "鏈嶅姟鍚嶇О涓嶈兘瓒呰繃50"
                         },
                     ],
-'editServiceInfo.serviceCode':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"鏈嶅姟缂栫爜涓嶈兘涓虹┖"
+                    'editServiceInfo.serviceCode': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "鏈嶅姟缂栫爜涓嶈兘涓虹┖"
                         },
- {
-                            limit:"maxin",
-                            param:"2,50",
-                            errInfo:"鏈嶅姟缂栫爜蹇呴』鍦�2鑷�50瀛楃涔嬮棿"
+                        {
+                            limit: "maxin",
+                            param: "2,50",
+                            errInfo: "鏈嶅姟缂栫爜蹇呴』鍦�2鑷�50瀛楃涔嬮棿"
                         },
                     ],
-'editServiceInfo.businessTypeCd':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"绉橀挜涓嶈兘涓虹┖"
+                    'editServiceInfo.businessTypeCd': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "绉橀挜涓嶈兘涓虹┖"
                         },
- {
-                            limit:"maxin",
-                            param:"2,4",
-                            errInfo:"涓氬姟绫诲瀷蹇呴』涓篈PI"
+                        {
+                            limit: "maxin",
+                            param: "2,4",
+                            errInfo: "涓氬姟绫诲瀷蹇呴』涓篈PI"
                         },
                     ],
-'editServiceInfo.seq':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"搴忓垪涓嶈兘涓虹┖"
+                    'editServiceInfo.seq': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "搴忓垪涓嶈兘涓虹┖"
                         },
- {
-                            limit:"maxLength",
-                            param:"1",
-                            errInfo:"搴忓垪鏍煎紡閿欒"
+                        {
+                            limit: "maxLength",
+                            param: "1",
+                            errInfo: "搴忓垪鏍煎紡閿欒"
                         },
                     ],
-'editServiceInfo.messageQueueName':[
- {
-                            limit:"maxLength",
-                            param:"50",
-                            errInfo:"娑堟伅闃熷垪涓嶈兘瓒呰繃50"
+                    'editServiceInfo.messageQueueName': [
+                        {
+                            limit: "maxLength",
+                            param: "50",
+                            errInfo: "娑堟伅闃熷垪涓嶈兘瓒呰繃50"
                         },
                     ],
-'editServiceInfo.isInstance':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"鏄惁瀹炰緥涓嶈兘涓虹┖"
+                    'editServiceInfo.isInstance': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "鏄惁瀹炰緥涓嶈兘涓虹┖"
                         },
- {
-                            limit:"maxLength",
-                            param:"50",
-                            errInfo:"瀹炰緥涓嶈兘瓒呰繃50"
+                        {
+                            limit: "maxLength",
+                            param: "50",
+                            errInfo: "瀹炰緥涓嶈兘瓒呰繃50"
                         },
                     ],
-'editServiceInfo.url':[
- {
-                            limit:"maxLength",
-                            param:"200",
-                            errInfo:"璋冪敤鍦板潃涓嶈兘瓒呰繃200"
+                    'editServiceInfo.url': [
+                        {
+                            limit: "maxLength",
+                            param: "200",
+                            errInfo: "璋冪敤鍦板潃涓嶈兘瓒呰繃200"
                         },
                     ],
-'editServiceInfo.method':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"璋冪敤鏂瑰紡涓嶈兘涓虹┖"
+                    'editServiceInfo.method': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "璋冪敤鏂瑰紡涓嶈兘涓虹┖"
                         },
- {
-                            limit:"maxLength",
-                            param:"50",
-                            errInfo:"璋冪敤鏂瑰紡涓嶈兘瓒呰繃50"
+                        {
+                            limit: "maxLength",
+                            param: "50",
+                            errInfo: "璋冪敤鏂瑰紡涓嶈兘瓒呰繃50"
                         },
                     ],
-'editServiceInfo.timeout':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"瓒呮椂鏃堕棿涓嶈兘涓虹┖"
+                    'editServiceInfo.timeout': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "瓒呮椂鏃堕棿涓嶈兘涓虹┖"
                         },
- {
-                            limit:"num",
-                            param:"",
-                            errInfo:"瓒呮椂鏃堕棿蹇呴』涓烘暟瀛�"
+                        {
+                            limit: "num",
+                            param: "",
+                            errInfo: "瓒呮椂鏃堕棿蹇呴』涓烘暟瀛�"
                         },
                     ],
-'editServiceInfo.retryCount':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"閲嶈瘯娆℃暟涓嶈兘涓虹┖"
+                    'editServiceInfo.retryCount': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "閲嶈瘯娆℃暟涓嶈兘涓虹┖"
                         },
- {
-                            limit:"num",
-                            param:"",
-                            errInfo:"閲嶈瘯娆℃暟蹇呴』涓烘暟瀛�"
+                        {
+                            limit: "num",
+                            param: "",
+                            errInfo: "閲嶈瘯娆℃暟蹇呴』涓烘暟瀛�"
                         },
                     ],
-'editServiceInfo.provideAppId':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"鎻愪緵鏈嶅姟涓嶈兘涓虹┖"
+                    'editServiceInfo.provideAppId': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "鎻愪緵鏈嶅姟涓嶈兘涓虹┖"
                         },
- {
-                            limit:"num",
-                            param:"",
-                            errInfo:"閲嶈瘯娆℃暟蹇呴』涓烘暟瀛�"
+                        {
+                            limit: "num",
+                            param: "",
+                            errInfo: "閲嶈瘯娆℃暟蹇呴』涓烘暟瀛�"
                         },
                     ],
-'editServiceInfo.serviceId':[
-{
-                            limit:"required",
-                            param:"",
-                            errInfo:"鏈嶅姟ID涓嶈兘涓虹┖"
+                    'editServiceInfo.serviceId': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "鏈嶅姟ID涓嶈兘涓虹┖"
                         }]
 
-                        });
-             },
-            editService:function(){
-                if(!vc.component.editServiceValidate()){
+                });
+            },
+            editService: function () {
+                if (!vc.component.editServiceValidate()) {
                     vc.message(vc.validate.errInfo);
-                    return ;
+                    return;
                 }
 
                 vc.http.post(
@@ -176,42 +175,42 @@
                     'update',
                     JSON.stringify(vc.component.editServiceInfo),
                     {
-                        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
                             $('#editServiceModel').modal('hide');
-                             vc.emit('serviceManage','listService',{});
-                            return ;
+                            vc.emit('serviceManage', 'listService', {});
+                            return;
                         }
                         vc.message(json);
-                     },
-                     function(errInfo,error){
+                    },
+                    function (errInfo, error) {
                         console.log('璇锋眰澶辫触澶勭悊');
 
                         vc.message(errInfo);
-                     });
+                    });
             },
-            refreshEditServiceInfo:function(){
-                vc.component.editServiceInfo= {
-                  serviceId:'',
-name:'',
-serviceCode:'',
-businessTypeCd:'API',
-seq:'1',
-messageQueueName:'',
-isInstance:'Y',
-url:'http://order-service/orderApi/service',
-method:'',
-timeout:'60',
-retryCount:'3',
-provideAppId:'8000418002',
+            refreshEditServiceInfo: function () {
+                vc.component.editServiceInfo = {
+                    serviceId: '',
+                    name: '',
+                    serviceCode: '',
+                    businessTypeCd: 'API',
+                    seq: '1',
+                    messageQueueName: '',
+                    isInstance: 'Y',
+                    url: 'http://order-service/orderApi/service',
+                    method: '',
+                    timeout: '60',
+                    retryCount: '3',
+                    provideAppId: '8000418002',
 
                 }
             }
         }
     });
 
-})(window.vc,window.vc.component);
+})(window.vc, window.vc.component);

--
Gitblit v1.8.0