From e64d8b88b4c177360874f5d6ea46d67f8495cdfc Mon Sep 17 00:00:00 2001
From: mrzcc <121184950@qq.com>
Date: 星期一, 17 二月 2020 18:40:24 +0800
Subject: [PATCH] 员工select2
---
WebService/src/main/resources/components/appPackage/edit-app/editApp.js | 154 +++++++++++++++++++++++++-------------------------
1 files changed, 77 insertions(+), 77 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..7a202f0 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;
+ //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()){
- vc.message(vc.validate.errInfo);
- return ;
+ });
+ },
+ editApp: function () {
+ if (!vc.component.editAppValidate()) {
+ vc.toast(vc.validate.errInfo);
+ 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