| | |
| | | HttpServletRequest request) { |
| | | logger.debug("请求流程 {},{}", flowCode, new Date()); |
| | | try { |
| | | System.out.println("开始寻找组件数据"); |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | System.out.println("数据获取成功"); |
| | | validateFlowData(flowCode, pd); |
| | | |
| | | } catch (Throwable e) { |
| | | flowCode = "error"; |
| | | } |
| | | |
| | | System.out.println("传入的路径为 "+flowCode); |
| | | |
| | | return flowCode; |
| | | } |
| New file |
| | |
| | | <div id="component"> |
| | | |
| | | <div class="java110_step"> |
| | | <div id="step"></div> |
| | | </div> |
| | | |
| | | <!-- 选择 应用信息 --> |
| | | <div v-if="hireParkingSpaceInfo.index == 0"> |
| | | |
| | | <!-- 选择停车位 --> |
| | | <vc:create name="viewSelectParkingSpace" |
| | | callBackComponent="addVisitSpace" |
| | | callBackFunction="notify" |
| | | ></vc:create> |
| | | </div> |
| | | <div v-if="hireParkingSpaceInfo.index == 1"> |
| | | <vc:create name="viewOwnerInfo" |
| | | callBackListener="addVisitSpace" |
| | | callBackFunction="notify" |
| | | ></vc:create> |
| | | </div> |
| | | <div v-if="hireParkingSpaceInfo.index == 2"> |
| | | <vc:create name="addCar" |
| | | callBackComponent="addVisitSpace" |
| | | callBackFunction="notify" |
| | | > |
| | | |
| | | </vc:create> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-md-10"></div> |
| | | <div class="col-md-2 " style="margin-bottom:10px; text-align:right"> |
| | | <button type="button" class="btn btn-secondary" v-on:click="_prevStep()">上一步</button> |
| | | <button v-if="hireParkingSpaceInfo.index != 3" type="button" class="btn btn-primary" |
| | | style="margin-left:10px;" |
| | | v-on:click="_nextStep()">下一步 |
| | | </button> |
| | | <button v-if="hireParkingSpaceInfo.index == 3" type="button" class="btn btn-primary" |
| | | style="margin-left:10px;" |
| | | v-on:click="_addVisitFinish()">出租 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | vc.extends({ |
| | | data:{ |
| | | newVisitInfo:{ |
| | | $step:{}, |
| | | index:0, |
| | | infos:[], |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | vc.component._initStep(); |
| | | }, |
| | | |
| | | _initEvent:function(){ |
| | | |
| | | vc.on("addVisitSpace", "notify", function(_info){ |
| | | vc.component.newVisitInfo.infos[vc.component.newVisitInfo.index] = _info; |
| | | }); |
| | | |
| | | }, |
| | | methods:{ |
| | | _initStep:function(){ |
| | | vc.component.newVisitInfo.$step = $("#step"); |
| | | vc.component.newVisitInfo.$step.step({ |
| | | index: 0, |
| | | time: 500, |
| | | title: ["新增访客","选择目标业主","填写拜访事由"] |
| | | }); |
| | | vc.component.newVisitInfo.index = vc.component.newVisitInfo.$step.getIndex(); |
| | | }, |
| | | _prevStep:function(){ |
| | | vc.component.newVisitInfo.$step.prevStep(); |
| | | vc.component.newVisitInfo.index = vc.component.newVisitInfo.$step.getIndex(); |
| | | |
| | | vc.emit('viewSelectParkingSpace', 'onIndex', vc.component.newVisitInfo.index); |
| | | vc.emit('viewOwnerInfo', 'onIndex', vc.component.newVisitInfo.index); |
| | | vc.emit('addCar', 'onIndex', vc.component.newVisitInfo.index); |
| | | |
| | | if(vc.component.newVisitInfo.index == 1){ |
| | | vc.emit('viewOwnerInfo','callBackOwnerInfo',{}); |
| | | } |
| | | |
| | | }, |
| | | _nextStep:function(){ |
| | | var _currentData = vc.component.newVisitInfo.infos[vc.component.newVisitInfo.index]; |
| | | if( _currentData == null || _currentData == undefined){ |
| | | vc.message("请选择或填写必选信息"); |
| | | return ; |
| | | } |
| | | vc.component.newVisitInfo.$step.nextStep(); |
| | | vc.component.newVisitInfo.index = vc.component.newVisitInfo.$step.getIndex(); |
| | | |
| | | vc.emit('viewSelectParkingSpace', 'onIndex', vc.component.newVisitInfo.index); |
| | | vc.emit('viewOwnerInfo', 'onIndex', vc.component.newVisitInfo.index); |
| | | vc.emit('addCar', 'onIndex', vc.component.newVisitInfo.index); |
| | | if(vc.component.newVisitInfo.index == 1){ |
| | | vc.emit('viewOwnerInfo','callBackOwnerInfo',{}); |
| | | } |
| | | |
| | | }, |
| | | _addVisitFinish:function(){ |
| | | |
| | | |
| | | var _currentData = vc.component.newVisitInfo.infos[vc.component.newVisitInfo.index]; |
| | | if( _currentData == null || _currentData == undefined){ |
| | | vc.message("请选择或填写必选信息"); |
| | | return ; |
| | | } |
| | | |
| | | var param = { |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | data:vc.component.newVisitInfo.infos |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'hireParkingSpace', |
| | | 'sell', |
| | | JSON.stringify(param), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | vc.jumpToPage("/flow/ownerFlow?" + vc.objToGetParam(JSON.parse(json))); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | |
| | | <div class="col-lg-12"> |
| | | <div class="ibox"> |
| | | <div class="ibox-title"> |
| | | <h5>应用信息</h5> |
| | | <h5>访客信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddAppModal()"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddVisitModal()"> |
| | | <i class="glyphicon glyphicon-plus"></i> |
| | | 添加访客 |
| | | </button> |
| | |
| | | <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="_openEditVisitModel(visit)">修改</button>--> |
| | | <!-- </div>--> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openDeleteAppModel(visit)">删除 |
| | | </button> |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | 入驻小区 |
| | | **/ |
| | | (function (vc) { |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | appManageInfo:{ |
| | | apps:[], |
| | | total:0, |
| | | records:1 |
| | | data: { |
| | | appManageInfo: { |
| | | apps: [], |
| | | total: 0, |
| | | records: 1 |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | _initMethod: function () { |
| | | vc.component._listApps(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('appManage','listApp',function(_param){ |
| | | 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); |
| | | vc.on('pagination', 'page_event', function (_currentPage) { |
| | | vc.component._listApps(_currentPage, DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listApps:function(_page, _rows){ |
| | | methods: { |
| | | _listApps: function (_page, _rows) { |
| | | var param = { |
| | | params:{ |
| | | page:_page, |
| | | row:_rows |
| | | 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('请求失败处理'); |
| | | } |
| | | ); |
| | | //发送get请求 |
| | | vc.http.get('visitManage', |
| | | 'list', |
| | | param, |
| | | function (json, res) { |
| | | var _visitManageInfo = JSON.parse(json); |
| | | for (var k in _visitManageInfo.visits){ |
| | | _visitManageInfo.visits[k].visitTime=new Date(_visitManageInfo.visits[k].visitTime).format('yyyy-MM-dd'); |
| | | _visitManageInfo.visits[k].departureTime=new Date(_visitManageInfo.visits[k].departureTime).format('yyyy-MM-dd'); |
| | | } |
| | | 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") |
| | | _openAddVisitModal: function () { |
| | | vc.jumpToPage("/flow/viewVisitInfo") |
| | | // vc.emit('addApp','openAddAppModal',{}); |
| | | }, |
| | | _openEditVisitModel:function(_app){ |
| | | vc.emit('editVisit','openEditVisitModel',_app); |
| | | _openEditVisitModel: function (_app) { |
| | | vc.emit('editVisit', 'openEditVisitModel', _app); |
| | | // vc.emit('deleteApp','openDeleteAppModal',_app); |
| | | |
| | | }, |
| | | _openDeleteAppModel:function(_app){ |
| | | vc.emit('deleteApp','openDeleteAppModal',_app); |
| | | _openDeleteAppModel: function (_app) { |
| | | vc.emit('deleteApp', 'openDeleteAppModal', _app); |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | | |
| | | Date.prototype.format =function(format){ |
| | | var o = { |
| | | "M+" : this.getMonth()+1, //month |
| | | "d+" : this.getDate(), //day |
| | | "h+" : this.getHours(), //hour |
| | | "m+" : this.getMinutes(), //minute |
| | | "s+" : this.getSeconds(), //second |
| | | "q+" : Math.floor((this.getMonth()+3)/3), //quarter |
| | | "S" : this.getMilliseconds() //millisecond |
| | | } |
| | | if(/(y+)/.test(format)) format=format.replace(RegExp.$1, |
| | | (this.getFullYear()+"").substr(4- RegExp.$1.length)); |
| | | for(var k in o)if(new RegExp("("+ k +")").test(format)) |
| | | format = format.replace(RegExp.$1, |
| | | RegExp.$1.length==1? o[k] : |
| | | ("00"+ o[k]).substr((""+ o[k]).length)); |
| | | return format; |
| | | } |