2 文件已重命名
10个文件已添加
4个文件已修改
10个文件已删除
| | |
| | | (function(vc){ |
| | | (function (vc) { |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string //父组件监听方法 |
| | | callBackListener: vc.propTypes.string, //父组件名称 |
| | | callBackFunction: vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data:{ |
| | | addAppInfo:{ |
| | | appId:'', |
| | | name:'', |
| | | securityCode:'', |
| | | whileListIp:'', |
| | | blackListIp:'', |
| | | remark:'', |
| | | data: { |
| | | addAppInfo: { |
| | | appId: '', |
| | | name: '', |
| | | securityCode: '', |
| | | whileListIp: '', |
| | | blackListIp: '', |
| | | remark: '', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | _initMethod: function () { |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('addApp','openAddAppModal',function(){ |
| | | }, |
| | | _initEvent: function () { |
| | | vc.on('addApp', 'openAddAppModal', function () { |
| | | $('#addAppModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | addAppValidate(){ |
| | | methods: { |
| | | addAppValidate() { |
| | | return vc.validate.validate({ |
| | | addAppInfo:vc.component.addAppInfo |
| | | },{ |
| | | 'addAppInfo.name':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"应用名称不能为空" |
| | | addAppInfo: vc.component.addAppInfo |
| | | }, { |
| | | 'addAppInfo.name': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "应用名称不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,50", |
| | | errInfo:"应用名称必须在2至50字符之间" |
| | | { |
| | | limit: "maxin", |
| | | param: "2,50", |
| | | errInfo: "应用名称必须在2至50字符之间" |
| | | }, |
| | | ], |
| | | 'addAppInfo.securityCode':[ |
| | | { |
| | | limit:"maxLength", |
| | | param:"64", |
| | | errInfo:"秘钥太长超过64位" |
| | | 'addAppInfo.securityCode': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "64", |
| | | errInfo: "秘钥太长超过64位" |
| | | }, |
| | | ], |
| | | 'addAppInfo.whileListIp':[ |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"白名单内容不能超过200" |
| | | 'addAppInfo.whileListIp': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "200", |
| | | errInfo: "白名单内容不能超过200" |
| | | }, |
| | | ], |
| | | 'addAppInfo.blackListIp':[ |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"黑名单内容不能超过200" |
| | | 'addAppInfo.blackListIp': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "200", |
| | | errInfo: "黑名单内容不能超过200" |
| | | }, |
| | | ], |
| | | 'addAppInfo.remark':[ |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"备注内容不能超过200" |
| | | 'addAppInfo.remark': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "200", |
| | | errInfo: "备注内容不能超过200" |
| | | }, |
| | | ], |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | | }, |
| | | saveAppInfo:function(){ |
| | | if(!vc.component.addAppValidate()){ |
| | | saveAppInfo: function () { |
| | | if (!vc.component.addAppValidate()) { |
| | | vc.message(vc.validate.errInfo); |
| | | |
| | | return ; |
| | | return; |
| | | } |
| | | |
| | | vc.component.addAppInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | |
| | | //不提交数据将数据 回调给侦听处理 |
| | | if(vc.notNull($props.callBackListener)){ |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addAppInfo); |
| | | if (vc.notNull($props.callBackListener)) { |
| | | vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addAppInfo); |
| | | $('#addAppModel').modal('hide'); |
| | | return ; |
| | | return; |
| | | } |
| | | |
| | | vc.http.post( |
| | |
| | | 'save', |
| | | JSON.stringify(vc.component.addAppInfo), |
| | | { |
| | | 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 |
| | | $('#addAppModel').modal('hide'); |
| | | vc.component.clearAddAppInfo(); |
| | | vc.emit('appManage','listApp',{}); |
| | | vc.emit('appManage', 'listApp', {}); |
| | | |
| | | return ; |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | |
| | | }, |
| | | function(errInfo,error){ |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | |
| | | }); |
| | | }); |
| | | }, |
| | | clearAddAppInfo:function(){ |
| | | clearAddAppInfo: function () { |
| | | vc.component.addAppInfo = { |
| | | name:'', |
| | | securityCode:'', |
| | | whileListIp:'', |
| | | blackListIp:'', |
| | | remark:'', |
| | | name: '', |
| | | securityCode: '', |
| | | whileListIp: '', |
| | | blackListIp: '', |
| | | remark: '', |
| | | |
| | | }; |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | |
| | | (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( |
| | |
| | | '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); |
| | |
| | | (function(vc,vm){ |
| | | (function (vc, vm) { |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | editServiceRegisterInfo:{ |
| | | id:'', |
| | | appId:'', |
| | | serviceId:'', |
| | | orderTypeCd:'', |
| | | invokeLimitTimes:'1000', |
| | | invokeModel:'', |
| | | data: { |
| | | editServiceRegisterInfo: { |
| | | id: '', |
| | | appId: '', |
| | | serviceId: '', |
| | | orderTypeCd: '', |
| | | invokeLimitTimes: '1000', |
| | | invokeModel: '', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | _initMethod: function () { |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('editServiceRegister','openEditServiceRegisterModal',function(_params){ |
| | | }, |
| | | _initEvent: function () { |
| | | vc.on('editServiceRegister', 'openEditServiceRegisterModal', function (_params) { |
| | | vc.component.refreshEditServiceRegisterInfo(); |
| | | $('#editServiceRegisterModel').modal('show'); |
| | | vc.copyObject(_params, vc.component.editServiceRegisterInfo ); |
| | | vc.copyObject(_params, vc.component.editServiceRegisterInfo); |
| | | vc.component.editServiceRegisterInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | }); |
| | | }, |
| | | methods:{ |
| | | editServiceRegisterValidate:function(){ |
| | | return vc.validate.validate({ |
| | | editServiceRegisterInfo:vc.component.editServiceRegisterInfo |
| | | },{ |
| | | 'editServiceRegisterInfo.appId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"应用ID不能为空" |
| | | methods: { |
| | | editServiceRegisterValidate: function () { |
| | | return vc.validate.validate({ |
| | | editServiceRegisterInfo: vc.component.editServiceRegisterInfo |
| | | }, { |
| | | 'editServiceRegisterInfo.appId': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "应用ID不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"50", |
| | | errInfo:"应用ID不能超过50位" |
| | | { |
| | | limit: "maxLength", |
| | | param: "50", |
| | | errInfo: "应用ID不能超过50位" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.serviceId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"服务ID不能为空" |
| | | 'editServiceRegisterInfo.serviceId': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "服务ID不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"50", |
| | | errInfo:"服务ID不能超过50位" |
| | | { |
| | | limit: "maxLength", |
| | | param: "50", |
| | | errInfo: "服务ID不能超过50位" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.orderTypeCd':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"订单类型不能为空" |
| | | 'editServiceRegisterInfo.orderTypeCd': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "订单类型不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"1,4", |
| | | errInfo:"订单类型错误" |
| | | { |
| | | limit: "maxin", |
| | | param: "1,4", |
| | | errInfo: "订单类型错误" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.invokeLimitTimes':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"调用次数不能为空" |
| | | 'editServiceRegisterInfo.invokeLimitTimes': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "调用次数不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"调用次数错误" |
| | | { |
| | | limit: "num", |
| | | param: "", |
| | | errInfo: "调用次数错误" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.invokeModel':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"调用方式不能为空" |
| | | 'editServiceRegisterInfo.invokeModel': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "调用方式不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"50", |
| | | errInfo:"消息队列不能超过50" |
| | | { |
| | | limit: "maxLength", |
| | | param: "50", |
| | | errInfo: "消息队列不能超过50" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.id':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"绑定ID不能为空" |
| | | 'editServiceRegisterInfo.id': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "绑定ID不能为空" |
| | | }] |
| | | |
| | | }); |
| | | }, |
| | | editServiceRegister:function(){ |
| | | if(!vc.component.editServiceRegisterValidate()){ |
| | | }); |
| | | }, |
| | | editServiceRegister: function () { |
| | | if (!vc.component.editServiceRegisterValidate()) { |
| | | vc.message(vc.validate.errInfo); |
| | | return ; |
| | | return; |
| | | } |
| | | |
| | | vc.http.post( |
| | |
| | | 'update', |
| | | JSON.stringify(vc.component.editServiceRegisterInfo), |
| | | { |
| | | 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 |
| | | $('#editServiceRegisterModel').modal('hide'); |
| | | vc.emit('serviceRegisterManage','listServiceRegister',{}); |
| | | return ; |
| | | vc.emit('serviceRegisterManage', 'listServiceRegister', {}); |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | }); |
| | | }, |
| | | refreshEditServiceRegisterInfo:function(){ |
| | | vc.component.editServiceRegisterInfo= { |
| | | id:'', |
| | | appId:'', |
| | | serviceId:'', |
| | | orderTypeCd:'', |
| | | invokeLimitTimes:'1000', |
| | | invokeModel:'', |
| | | refreshEditServiceRegisterInfo: function () { |
| | | vc.component.editServiceRegisterInfo = { |
| | | id: '', |
| | | appId: '', |
| | | serviceId: '', |
| | | orderTypeCd: '', |
| | | invokeLimitTimes: '1000', |
| | | invokeModel: '', |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| | | })(window.vc, window.vc.component); |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | 入驻小区 |
| | | **/ |
| | | (function (vc) { |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | serviceRegisterManageInfo:{ |
| | | serviceRegisters:[], |
| | | total:0, |
| | | records:1, |
| | | moreCondition:false, |
| | | name:'', |
| | | conditions:{ |
| | | appName:'', |
| | | appId:'', |
| | | serviceName:'', |
| | | serviceCode:'', |
| | | serviceUrl:'', |
| | | data: { |
| | | serviceRegisterManageInfo: { |
| | | serviceRegisters: [], |
| | | total: 0, |
| | | records: 1, |
| | | moreCondition: false, |
| | | name: '', |
| | | conditions: { |
| | | appName: '', |
| | | appId: '', |
| | | serviceName: '', |
| | | serviceCode: '', |
| | | serviceUrl: '', |
| | | |
| | | } |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | _initMethod: function () { |
| | | //vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | vc.component._loadDataByParam(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('serviceRegisterManage','chooseApp',function(_param){ |
| | | vc.copyObject(_param,vc.component.serviceRegisterManageInfo.conditions); |
| | | _initEvent: function () { |
| | | vc.on('serviceRegisterManage', 'chooseApp', function (_param) { |
| | | vc.copyObject(_param, vc.component.serviceRegisterManageInfo.conditions); |
| | | }); |
| | | |
| | | vc.on('serviceRegisterManage','listServiceRegister',function(_param){ |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | vc.on('serviceRegisterManage', 'listServiceRegister', function (_param) { |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | vc.on('pagination','page_event',function(_currentPage){ |
| | | vc.component._listServiceRegisters(_currentPage,DEFAULT_ROWS); |
| | | vc.on('pagination', 'page_event', function (_currentPage) { |
| | | vc.component._listServiceRegisters(_currentPage, DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listServiceRegisters:function(_page, _rows){ |
| | | methods: { |
| | | _listServiceRegisters: function (_page, _rows) { |
| | | |
| | | vc.component.serviceRegisterManageInfo.conditions.page = _page; |
| | | vc.component.serviceRegisterManageInfo.conditions.row = _rows; |
| | | var param = { |
| | | params:vc.component.serviceRegisterManageInfo.conditions |
| | | }; |
| | | params: vc.component.serviceRegisterManageInfo.conditions |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('serviceRegisterManage', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | | var _serviceRegisterManageInfo=JSON.parse(json); |
| | | vc.component.serviceRegisterManageInfo.total = _serviceRegisterManageInfo.total; |
| | | vc.component.serviceRegisterManageInfo.records = _serviceRegisterManageInfo.records; |
| | | vc.component.serviceRegisterManageInfo.serviceRegisters = _serviceRegisterManageInfo.serviceRegisters; |
| | | vc.emit('pagination','init',{ |
| | | total:vc.component.serviceRegisterManageInfo.records, |
| | | currentPage:_page |
| | | }); |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | //发送get请求 |
| | | vc.http.get('serviceRegisterManage', |
| | | 'list', |
| | | param, |
| | | function (json, res) { |
| | | var _serviceRegisterManageInfo = JSON.parse(json); |
| | | vc.component.serviceRegisterManageInfo.total = _serviceRegisterManageInfo.total; |
| | | vc.component.serviceRegisterManageInfo.records = _serviceRegisterManageInfo.records; |
| | | vc.component.serviceRegisterManageInfo.serviceRegisters = _serviceRegisterManageInfo.serviceRegisters; |
| | | vc.emit('pagination', 'init', { |
| | | total: vc.component.serviceRegisterManageInfo.records, |
| | | currentPage: _page |
| | | }); |
| | | }, function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | _openAddServiceRegisterModal:function(){ |
| | | _openAddServiceRegisterModal: function () { |
| | | //vc.emit('addServiceRegister','openAddServiceRegisterModal',{}); |
| | | vc.jumpToPage("/flow/serviceBindingFlow"); |
| | | }, |
| | | _openEditServiceRegisterModel:function(_serviceRegister){ |
| | | vc.emit('editServiceRegister','openEditServiceRegisterModal',_serviceRegister); |
| | | _openEditServiceRegisterModel: function (_serviceRegister) { |
| | | vc.emit('editServiceRegister', 'openEditServiceRegisterModal', _serviceRegister); |
| | | }, |
| | | _openDeleteServiceRegisterModel:function(_serviceRegister){ |
| | | vc.emit('deleteServiceRegister','openDeleteServiceRegisterModal',_serviceRegister); |
| | | _openDeleteServiceRegisterModel: function (_serviceRegister) { |
| | | vc.emit('deleteServiceRegister', 'openDeleteServiceRegisterModal', _serviceRegister); |
| | | }, |
| | | _queryServiceRegisterMethod:function(){ |
| | | _queryServiceRegisterMethod: function () { |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | |
| | | }, |
| | | _moreCondition:function(){ |
| | | if(vc.component.serviceRegisterManageInfo.moreCondition){ |
| | | _moreCondition: function () { |
| | | if (vc.component.serviceRegisterManageInfo.moreCondition) { |
| | | vc.component.serviceRegisterManageInfo.moreCondition = false; |
| | | }else{ |
| | | } else { |
| | | vc.component.serviceRegisterManageInfo.moreCondition = true; |
| | | } |
| | | } |
| | | |
| | | , |
| | | _openChooseAppMethod:function(){ |
| | | vc.emit('chooseApp','openChooseAppModel',{}); |
| | | , |
| | | _openChooseAppMethod: function () { |
| | | vc.emit('chooseApp', 'openChooseAppModel', {}); |
| | | |
| | | }, |
| | | _loadDataByParam: function(){ |
| | | vc.component.serviceRegisterManageInfo.conditions.appId = vc.getParam("appId"); |
| | | //如果 floodId 没有传 则,直接结束 |
| | | if(vc.component.serviceRegisterManageInfo.conditions.appId == null |
| | | || vc.component.serviceRegisterManageInfo.conditions.appId == undefined |
| | | || vc.component.serviceRegisterManageInfo.conditions.appId == ''){ |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | return ; |
| | | } |
| | | |
| | | var param = { |
| | | params:{ |
| | | page:DEFAULT_PAGE, |
| | | row:DEFAULT_ROWS, |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | appId:vc.component.serviceRegisterManageInfo.conditions.appId |
| | | } |
| | | } |
| | | |
| | | vc.http.get( |
| | | 'serviceRegisterManage', |
| | | 'loadApp', |
| | | param, |
| | | function(json,res){ |
| | | if(res.status == 200){ |
| | | var _appInfo = JSON.parse(json); |
| | | var _tmpApp = _appInfo.apps[0]; |
| | | vc.component.serviceRegisterManageInfo.conditions.appName = _tmpApp.name; |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | |
| | | _loadDataByParam: function () { |
| | | vc.component.serviceRegisterManageInfo.conditions.appId = vc.getParam("appId"); |
| | | //如果 floodId 没有传 则,直接结束 |
| | | if (vc.component.serviceRegisterManageInfo.conditions.appId == null |
| | | || vc.component.serviceRegisterManageInfo.conditions.appId == undefined |
| | | || vc.component.serviceRegisterManageInfo.conditions.appId == '') { |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | return; |
| | | } |
| | | |
| | | var param = { |
| | | params: { |
| | | page: DEFAULT_PAGE, |
| | | row: DEFAULT_ROWS, |
| | | communityId: vc.getCurrentCommunity().communityId, |
| | | appId: vc.component.serviceRegisterManageInfo.conditions.appId |
| | | } |
| | | } |
| | | |
| | | vc.http.get( |
| | | 'serviceRegisterManage', |
| | | 'loadApp', |
| | | param, |
| | | function (json, res) { |
| | | if (res.status == 200) { |
| | | var _appInfo = JSON.parse(json); |
| | | var _tmpApp = _appInfo.apps[0]; |
| | | vc.component.serviceRegisterManageInfo.conditions.appName = _tmpApp.name; |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | } |
| | | } |
| | | }); |
| New file |
| | |
| | | <div id = "addAppModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-body"> |
| | | <h3 class="m-t-none m-b ">添加应用</h3> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <div> |
| | | <!--<div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">楼名称</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.name" type="text" placeholder="必填,请填写名称" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">楼编号</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.floorNum" type="email" placeholder="必填,请填写编号" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">备注</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.remark" type="tel" placeholder="可填,请填写备注" class="form-control"></div> |
| | | </div>--> |
| | | |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">应用名称</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addAppInfo.name" type="text" placeholder="必填,请填写应用名称" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">秘钥</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addAppInfo.securityCode" type="text" placeholder="选填,请填写秘钥" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">白名单</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addAppInfo.whileListIp" type="text" placeholder="选填,请填写白名单" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">黑名单</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addAppInfo.blackListIp" type="text" placeholder="选填,请填写黑名单" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">备注</label> |
| | | <div class="col-sm-10"> |
| | | <textarea placeholder="选填,请填写备注" class="form-control" v-model="addAppInfo.remark"></textarea> </div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="saveAppInfo()" ><i class="fa fa-check"></i> 保存</button> |
| | | <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function (vc) { |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener: vc.propTypes.string, //父组件名称 |
| | | callBackFunction: vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data: { |
| | | addAppInfo: { |
| | | appId: '', |
| | | name: '', |
| | | securityCode: '', |
| | | whileListIp: '', |
| | | blackListIp: '', |
| | | remark: '', |
| | | |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | | |
| | | }, |
| | | _initEvent: function () { |
| | | vc.on('addApp', 'openAddAppModal', function () { |
| | | $('#addAppModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods: { |
| | | addAppValidate() { |
| | | return vc.validate.validate({ |
| | | addAppInfo: vc.component.addAppInfo |
| | | }, { |
| | | 'addAppInfo.name': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "应用名称不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "2,50", |
| | | errInfo: "应用名称必须在2至50字符之间" |
| | | }, |
| | | ], |
| | | 'addAppInfo.securityCode': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "64", |
| | | errInfo: "秘钥太长超过64位" |
| | | }, |
| | | ], |
| | | 'addAppInfo.whileListIp': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "200", |
| | | errInfo: "白名单内容不能超过200" |
| | | }, |
| | | ], |
| | | 'addAppInfo.blackListIp': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "200", |
| | | errInfo: "黑名单内容不能超过200" |
| | | }, |
| | | ], |
| | | 'addAppInfo.remark': [ |
| | | { |
| | | limit: "maxLength", |
| | | param: "200", |
| | | errInfo: "备注内容不能超过200" |
| | | }, |
| | | ], |
| | | |
| | | |
| | | }); |
| | | }, |
| | | saveAppInfo: function () { |
| | | if (!vc.component.addAppValidate()) { |
| | | vc.message(vc.validate.errInfo); |
| | | |
| | | return; |
| | | } |
| | | |
| | | vc.component.addAppInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | |
| | | //不提交数据将数据 回调给侦听处理 |
| | | if (vc.notNull($props.callBackListener)) { |
| | | vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addAppInfo); |
| | | $('#addAppModel').modal('hide'); |
| | | return; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'addApp', |
| | | 'save', |
| | | JSON.stringify(vc.component.addAppInfo), |
| | | { |
| | | emulateJSON: true |
| | | }, |
| | | function (json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if (res.status == 200) { |
| | | //关闭model |
| | | $('#addAppModel').modal('hide'); |
| | | vc.component.clearAddAppInfo(); |
| | | vc.emit('appManage', 'listApp', {}); |
| | | |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | |
| | | }); |
| | | }, |
| | | clearAddAppInfo: function () { |
| | | vc.component.addAppInfo = { |
| | | name: '', |
| | | securityCode: '', |
| | | whileListIp: '', |
| | | blackListIp: '', |
| | | remark: '', |
| | | |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| New file |
| | |
| | | <div id = "chooseAppModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseAppModelLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h3 class="modal-title" id="chooseAppModelLabel">选择应用</h3> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class=" row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-7 m-b-xs"> |
| | | </div> |
| | | <div class="col-sm-5"> |
| | | <div class="input-group"> |
| | | <input placeholder="输入应用名称" type="text" v-model="chooseAppInfo._currentAppName" class="form-control form-control-sm"> |
| | | <span class="input-group-append"> |
| | | <button type="button" class="btn btn-sm btn-primary" v-on:click="queryApps()">查询</button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table-responsive" style="margin-top:15px"> |
| | | <table class="table table-striped"> |
| | | <thead> |
| | | <tr> |
| | | <th>应用Id</th> |
| | | <th>应用名称</th> |
| | | <th>操作</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="app in chooseAppInfo.apps"> |
| | | <td>{{app.appId}}</td> |
| | | <td>{{app.name}}</td> |
| | | <td> |
| | | <button class="btn btn-primary btn-xs" v-on:click="chooseApp(app)">选择</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc){ |
| | | vc.extends({ |
| | | propTypes: { |
| | | emitChooseApp:vc.propTypes.string, |
| | | emitLoadData:vc.propTypes.string |
| | | }, |
| | | data:{ |
| | | chooseAppInfo:{ |
| | | apps:[], |
| | | _currentAppName:'', |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('chooseApp','openChooseAppModel',function(_param){ |
| | | console.log("打开业主成员界面") |
| | | $('#chooseAppModel').modal('show'); |
| | | vc.component._refreshChooseAppInfo(); |
| | | vc.component._loadAllAppInfo(1,10,''); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _loadAllAppInfo:function(_page,_row,_name){ |
| | | var param = { |
| | | params:{ |
| | | page:_page, |
| | | row:_row, |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | name:_name |
| | | } |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('chooseApp', |
| | | 'list', |
| | | param, |
| | | function(json){ |
| | | var _appInfo = JSON.parse(json); |
| | | vc.component.chooseAppInfo.apps = _appInfo.apps; |
| | | },function(){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | chooseApp:function(_app){ |
| | | _app.appName = _app.name; |
| | | vc.emit($props.emitChooseApp,'chooseApp',_app); |
| | | vc.emit($props.emitLoadData,'listAppData',{ |
| | | appId:_app.appId |
| | | }); |
| | | $('#chooseAppModel').modal('hide'); |
| | | }, |
| | | queryApps:function(){ |
| | | vc.component._loadAllAppInfo(1,10,vc.component.chooseAppInfo._currentAppName); |
| | | }, |
| | | _refreshChooseAppInfo:function(){ |
| | | vc.component.chooseAppInfo._currentAppName = ""; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | })(window.vc); |
| File was renamed from WebService/src/main/resources/components/visitPackage/delete-visit/deleteVisit.html |
| | |
| | | <div class="modal fade" id="deleteVisitModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal fade" id="deleteAppModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog" role="document"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <tr align="center"><th>确定删除访客登记</th></tr> |
| | | <tr align="center"><th>确定删除应用</th></tr> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteVisitModel()">点错了</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="deleteVisit()">确认删除</button> |
| | | <button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteAppModel()">点错了</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="deleteApp()">确认删除</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc,vm){ |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | deleteAppInfo:{ |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | // vc.on('deleteApp','openDeleteAppModal',function(_params){ |
| | | // alert("监听成功"); |
| | | // console.log(_params); |
| | | // vc.component.deleteAppInfo = _params; |
| | | // $('#deleteAppModel').modal('show'); |
| | | // |
| | | // }); |
| | | }, |
| | | methods:{ |
| | | deleteApp:function(){ |
| | | vc.component.deleteAppInfo.communityId=vc.getCurrentCommunity().communityId; |
| | | vc.http.post( |
| | | 'deleteApp', |
| | | 'delete', |
| | | JSON.stringify(vc.component.deleteAppInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#deleteAppModel').modal('hide'); |
| | | vc.emit('appManage','listApp',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | vc.message(json); |
| | | |
| | | }); |
| | | }, |
| | | closeDeleteAppModel:function(){ |
| | | $('#deleteAppModel').modal('hide'); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| File was renamed from WebService/src/main/resources/components/visitPackage/edit-visit/editVisit.html |
| | |
| | | <div id="editVisitModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" |
| | | <div id="editAppModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" |
| | | aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-body"> |
| | | <h3 class="m-t-none m-b ">访客修改</h3> |
| | | <h3 class="m-t-none m-b ">修改访客</h3> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <div> |
| | |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">访客性别</label> |
| | | <div class="col-sm-10"> |
| | | <select class="form-control-sm form-control input-s-sm inline" |
| | | v-model="editVisitInfo.visitGender"> |
| | | <option selected value="">请选择访客性别</option> |
| | | <!-- <input v-model="editAppInfo.securityCode" type="text" placeholder="选填,请填访客性别"--> |
| | | <!-- class="form-control">--> |
| | | <select v-model="editVisitInfo.visitGender" class="form-control" :value="editVisitInfo.visitGender"> |
| | | <option value="1">男</option> |
| | | <option value="0">女</option> |
| | | </select> |
| | |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">访客联系方式</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editVisitInfo.phoneNumber" type="tel" placeholder="必填,请填写访客联系方式" |
| | | <input v-model="editVisitInfo.phoneNumber" type="text" placeholder="选填,请填写联系方式" |
| | | class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">访客拜访时间</label> |
| | | <label class="col-sm-2 col-form-label">访客来访时间</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editVisitInfo.visitTime" type="datetime-local" placeholder="必填,请填写访客拜访时间" |
| | | <input v-model="editVisitInfo.visitTime" type="date" placeholder="选填,请填写来访时间" |
| | | class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">访客离开时间</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editVisitInfo.departureTime" type="datetime-local" placeholder="选填,请填写访客离开时间" |
| | | <input v-model="editVisitInfo.departureTime" type="date" placeholder="选填,请填写离开时间" |
| | | class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">描述</label> |
| | | <label class="col-sm-2 col-form-label">访客来访事由</label> |
| | | <div class="col-sm-10"> |
| | | <textarea cols="5" placeholder="选填,请填写描述" class="form-control" |
| | | <textarea placeholder="选填,请填写访客来访事由" class="form-control" |
| | | v-model="editVisitInfo.visitCase"></textarea></div> |
| | | </div> |
| | | |
| New file |
| | |
| | | (function (vc, vm) { |
| | | |
| | | vc.extends({ |
| | | data: { |
| | | editVisitInfo: { |
| | | |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | | }, |
| | | _initEvent: function () { |
| | | vc.on('editVisit', 'openEditVisitModel', function (_params) { |
| | | vc.component.refreshEditAppInfo(); |
| | | $('#editAppModel').modal('show'); |
| | | console.log(_params); |
| | | vc.component.editVisitInfo = _params; |
| | | |
| | | }); |
| | | }, |
| | | methods: { |
| | | editAppValidate: function () { |
| | | return vc.validate.validate({ |
| | | editVisitInfo: vc.component.editVisitInfo |
| | | }, { |
| | | 'editVisitInfo.name': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "访客姓名不能为空" |
| | | } |
| | | ], |
| | | 'editVisitInfo.visitGender': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "访客性别不能为空" |
| | | }, |
| | | ], |
| | | 'editVisitInfo.phoneNumber': [ |
| | | { |
| | | limit: "phone", |
| | | param: "", |
| | | errInfo: "访客联系方式不能为空" |
| | | }, |
| | | { |
| | | limit: "num", |
| | | param: "", |
| | | errInfo: "访客联系方式必须是数字" |
| | | } |
| | | ], |
| | | 'editVisitInfo.visitTime': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "访客到访时间不能为空" |
| | | }, |
| | | ], |
| | | 'editVisitInfo.departureTime': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "访客到访时间不能为空" |
| | | }, |
| | | ], |
| | | 'editVisitInfo.visitCase': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "访客到访原因不能为空" |
| | | }, |
| | | ] |
| | | |
| | | |
| | | }); |
| | | }, |
| | | editVisit: function () { |
| | | if (!vc.component.editAppValidate()) { |
| | | vc.message(vc.validate.errInfo); |
| | | return; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'editVisit', |
| | | 'update', |
| | | JSON.stringify(vc.component.editVisitInfo), |
| | | { |
| | | emulateJSON: true |
| | | }, |
| | | function (json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if (res.status == 200) { |
| | | //关闭model |
| | | $('#editAppModel').modal('hide'); |
| | | vc.emit('appManage', 'listApp', {}); |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | }, |
| | | refreshEditAppInfo: function () { |
| | | vc.component.editAppInfo = { |
| | | name: '', |
| | | visitGender: '', |
| | | phoneNumber: '', |
| | | visitTime: '', |
| | | departureTime: '', |
| | | visitCase: '', |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc, window.vc.component); |
| New file |
| | |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="ibox-title"> |
| | | <h5>应用信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" v-if="viewAppInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectAppInfoModel()"> |
| | | <i class="glyphicon glyphicon-search"></i> 选择访客</button> |
| | | |
| | | <button type="button" v-if="viewAppInfo.index != 2 && viewAppInfo.needShowAddAppButton== 'true'" class="btn btn-primary btn-sm" v-on:click="_openAddAppInfoModel()"> |
| | | <i class="glyphicon glyphicon-plus"></i> 添加访客</button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >访客ID:</label> |
| | | <label class="">{{viewAppInfo.appId}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label">访客姓名:</label> |
| | | <label class="">{{viewAppInfo.name}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >访客联系方式:</label> |
| | | <label class="">{{viewAppInfo.securityCode}}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >访客性别:</label> |
| | | <label class="">{{viewAppInfo.whileListIp}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >访客到访事由:</label> |
| | | <label class="">{{viewAppInfo.blackListIp}}</label> |
| | | </div> |
| | | </div> |
| | | <!-- viewVisitInfo--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="addApp" |
| | | callBackListener="viewAppInfo" |
| | | callBackFunction="chooseApp" |
| | | ></vc:create> |
| | | |
| | | |
| | | <vc:create name="chooseApp" |
| | | emitChooseApp="viewAppInfo" |
| | | emitLoadData="viewAppInfo" |
| | | ></vc:create> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 权限组 |
| | | **/ |
| | | (function(vc){ |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string, //父组件监听方法 |
| | | needShowAddAppButton:vc.propTypes.string = 'true' // 是否显示添加应用button |
| | | }, |
| | | data:{ |
| | | viewAppInfo:{ |
| | | index:0, |
| | | flowComponent:'visit', |
| | | appId:"", |
| | | name:"", |
| | | securityCode:"", |
| | | whileListIp:"", |
| | | blackListIp:"", |
| | | remark:"", |
| | | needShowAddAppButton:$props.needShowAddAppButton |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | //根据请求参数查询 查询 业主信息 |
| | | vc.component._loadAppInfoData(); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('viewAppInfo','chooseApp',function(_app){ |
| | | vc.copyObject(_app, vc.component.viewAppInfo); |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewAppInfo); |
| | | }); |
| | | |
| | | vc.on('viewAppInfo', 'onIndex', function(_index){ |
| | | vc.component.viewAppInfo.index = _index; |
| | | }); |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | _openSelectAppInfoModel(){ |
| | | alert("打开查询访客模态框"); |
| | | // vc.emit('chooseApp','openChooseAppModel',{}); |
| | | }, |
| | | _openAddAppInfoModel(){ |
| | | // vc.emit('addApp','openAddAppModal',{}); |
| | | }, |
| | | _loadAppInfoData:function(){ |
| | | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| New file |
| | |
| | | <div id="component"> |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox"> |
| | | <div class="ibox-title"> |
| | | <h5>应用信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddAppModal()"> |
| | | <i class="glyphicon glyphicon-plus"></i> |
| | | 添加访客 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | |
| | | <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15"> |
| | | <thead> |
| | | <tr> |
| | | <th>访客ID</th> |
| | | <th>访客姓名</th> |
| | | <th>访客联系方式</th> |
| | | <th>访客性别</th> |
| | | <th>来访事由</th> |
| | | <th>来访时间</th> |
| | | <th>离开时间</th> |
| | | <th class="text-right">操作</th> |
| | | |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="visit in appManageInfo.visits"> |
| | | <td>{{visit.vId}}</td> |
| | | <td>{{visit.name}}</td> |
| | | <td>{{visit.phoneNumber}}</td> |
| | | <td>{{visit.visitGenderName}}</td> |
| | | <td>{{visit.visitCase}}</td> |
| | | <td>{{visit.visitTime}}</td> |
| | | <td>{{visit.departureTime}}</td> |
| | | <td> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openEditVisitModel(visit)">修改</button> |
| | | </div> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openDeleteAppModel(visit)">删除 |
| | | </button> |
| | | </div> |
| | | </td> |
| | | |
| | | </tr> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td colspan="7"> |
| | | <ul class="pagination float-right"></ul> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | <!-- 分页 --> |
| | | <vc:create name="pagination"></vc:create> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="editVisit"></vc:create> |
| | | <vc:create name="deleteApp"></vc:create> |
| | | |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | appManageInfo:{ |
| | | apps:[], |
| | | total:0, |
| | | records:1 |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | vc.component._listApps(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('appManage','listApp',function(_param){ |
| | | vc.component._listApps(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | vc.on('pagination','page_event',function(_currentPage){ |
| | | vc.component._listApps(_currentPage,DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listApps:function(_page, _rows){ |
| | | var param = { |
| | | params:{ |
| | | page:_page, |
| | | row:_rows |
| | | } |
| | | |
| | | } |
| | | //发送get请求 |
| | | vc.http.get('visitManage', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | | var _visitManageInfo=JSON.parse(json); |
| | | console.log(_visitManageInfo); |
| | | vc.component.appManageInfo.total = _visitManageInfo.total; |
| | | vc.component.appManageInfo.records = _visitManageInfo.records; |
| | | vc.component.appManageInfo.visits = _visitManageInfo.visits; |
| | | vc.emit('pagination','init',{ |
| | | total:vc.component.appManageInfo.records, |
| | | currentPage:_page |
| | | }); |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | _openAddAppModal:function(){ |
| | | vc.jumpToPage("/flow/visitAddFlow") |
| | | // vc.emit('addApp','openAddAppModal',{}); |
| | | }, |
| | | _openEditVisitModel:function(_app){ |
| | | vc.emit('editVisit','openEditVisitModel',_app); |
| | | // vc.emit('deleteApp','openDeleteAppModal',_app); |
| | | |
| | | }, |
| | | _openDeleteAppModel:function(_app){ |
| | | vc.emit('deleteApp','openDeleteAppModal',_app); |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |