mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
设备保养功能开发中
This commit is contained in:
parent
bb265b554f
commit
fec703dc6e
@ -0,0 +1,21 @@
|
||||
<div class="modal fade" id="deleteMaintainanceTaskModel" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel"><span><vc:i18n name="请确认您的操作" namespace="deleteMaintainanceTask"></vc:i18n></span>!</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<tr align="center">
|
||||
<th><span><vc:i18n name="确定删除保养任务" namespace="deleteMaintainanceTask"></vc:i18n></span></th>
|
||||
</tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteMaintainanceTaskModel()"><span><vc:i18n name="点错了" namespace="deleteMaintainanceTask"></vc:i18n></span></button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteMaintainanceTask()"><span><vc:i18n name="确认删除" namespace="deleteMaintainanceTask"></vc:i18n></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,41 @@
|
||||
(function(vc, vm) {
|
||||
vc.extends({
|
||||
data: {
|
||||
deleteMaintainanceTaskInfo: {}
|
||||
},
|
||||
_initMethod: function() {},
|
||||
_initEvent: function() {
|
||||
vc.on('deleteMaintainanceTask', 'openDeleteMaintainanceTaskModal', function(_params) {
|
||||
vc.component.deleteMaintainanceTaskInfo = _params;
|
||||
$('#deleteMaintainanceTaskModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deleteMaintainanceTask: function() {
|
||||
vc.component.deleteMaintainanceTaskInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/maintainanceTask.deleteMaintainanceTask',
|
||||
JSON.stringify(vc.component.deleteMaintainanceTaskInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
$('#deleteMaintainanceTaskModel').modal('hide');
|
||||
vc.emit('maintainanceTaskManage', 'listMaintainanceTask', {});
|
||||
return;
|
||||
}
|
||||
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
closeDeleteMaintainanceTaskModel: function() {
|
||||
$('#deleteMaintainanceTaskModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc, window.vc.component);
|
||||
@ -0,0 +1,248 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="查询条件" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
|
||||
v-on:click="_moreCondition()">
|
||||
{{maintainanceTaskDetailManageInfo.moreCondition == true?'隐藏':'更多'}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入保养人','maintainanceTaskDetails')"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.planUserName"
|
||||
class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入实际保养开始时间','maintainanceTaskDetails')"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.maintainanceStartTime"
|
||||
class=" form-control startTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入实际保养结束时间','maintainanceTaskDetails')"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.maintainanceEndTime"
|
||||
class=" form-control endTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryMaintainanceTaskMethod()">
|
||||
<i class="fa fa-search"></i>
|
||||
<span><vc:i18n name="查询" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_resetMaintainanceTaskMethod()">
|
||||
<i class="fa fa-repeat"></i>
|
||||
<span><vc:i18n name="重置" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-show="maintainanceTaskDetailManageInfo.moreCondition == true">
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.maintainancePlanId">
|
||||
<option selected value="">{{vc.i18n('请选择保养计划','maintainanceTaskDetails')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskDetailManageInfo.maintainancePlanList"
|
||||
:key="index" :value="item.maintainancePlanId">
|
||||
{{item.maintainancePlanName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.maintainanceRouteId">
|
||||
<option selected value="">{{vc.i18n('请选择保养路线','maintainanceTaskDetails')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskDetailManageInfo.maintainanceRouteList"
|
||||
:key="index" :value="item.maintainanceRouteId">
|
||||
{{item.routeName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.maintainanceId">
|
||||
<option selected value="">{{vc.i18n('请选择保养点','maintainanceTaskDetails')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskDetailManageInfo.maintainancePointList"
|
||||
:key="index" :value="item.maintainanceId">
|
||||
{{item.maintainanceName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row margin-top" v-show="maintainanceTaskDetailManageInfo.moreCondition == true">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入任务详情ID','maintainanceTaskDetails')"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.taskDetailId"
|
||||
class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.maintainanceState">
|
||||
<option selected value="">{{vc.i18n('请选择签到状态','maintainanceTaskDetails')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskDetailManageInfo.maintainanceStateTypes"
|
||||
:key="index" :value="item.statusCd">
|
||||
{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="maintainanceTaskDetailManageInfo.conditions.state">
|
||||
<option selected value="">{{vc.i18n('请选择保养点状态','maintainanceTaskDetails')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskDetailManageInfo.stateTypes" :key="index"
|
||||
:value="item.statusCd">
|
||||
{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-show="maintainanceTaskDetailManageInfo.moreCondition == true">
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="maintainanceTaskDetailManageInfo.conditions.taskState">
|
||||
<option selected value="">{{vc.i18n('请选择任务状态','maintainanceTaskDetails')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskDetailManageInfo.taskStates" :key="index"
|
||||
:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select"
|
||||
v-model="maintainanceTaskDetailManageInfo.conditions.patrolType">
|
||||
<option selected value="">{{vc.i18n('请选择保养情况','maintainanceTaskDetails')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskDetailManageInfo.patrolTypes" :key="index"
|
||||
:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="保养明细信息" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm" v-on:click="_exportExcel()">
|
||||
<i class="fa fa-plus"></i>
|
||||
<span><vc:i18n name="导出" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="编号" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="设备名称" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="计划名称" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="保养标准" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="保养人" namespace="maintainanceTaskDetails"></vc:i18n></span><br/>
|
||||
<span><vc:i18n name="开始/结束时间" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="实际保养时间" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="计划保养人" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="实际保养人" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="任务状态" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="保养情况" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="保养照片" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="创建时间" namespace="maintainanceTaskDetails"></vc:i18n></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="maintainanceTask in maintainanceTaskDetailManageInfo.maintainanceTasks">
|
||||
<td class="text-center">{{maintainanceTask.taskDetailId}}</td>
|
||||
<td class="text-center">{{maintainanceTask.machineName}}</td>
|
||||
<td class="text-center">{{maintainanceTask.planName}}</td>
|
||||
<td class="text-center">{{maintainanceTask.standardName}}</td>
|
||||
<td class="text-center">{{maintainanceTask.planInsTime}}<br/>{{maintainanceTask.planEndTime}}
|
||||
</td>
|
||||
<td class="text-center">{{maintainanceTask.maintainanceTime ? maintainanceTask.maintainanceTime :
|
||||
'-'}}
|
||||
</td>
|
||||
<td class="text-center text-primary" v-if="maintainanceTask.maintainanceState == '60000'">
|
||||
{{maintainanceTask.maintainanceStateName ? maintainanceTask.maintainanceStateName : '-'}}
|
||||
</td>
|
||||
<td class="text-center text-danger font-bold" v-else>{{maintainanceTask.maintainanceStateName ?
|
||||
maintainanceTask.maintainanceStateName : '-'}}
|
||||
</td>
|
||||
<td class="text-center">{{maintainanceTask.planUserName}}</td>
|
||||
<td class="text-center">{{maintainanceTask.actUserName ? maintainanceTask.actUserName : '-'}}
|
||||
</td>
|
||||
<td class="text-center">{{maintainanceTask.signTypeName}}</td>
|
||||
<td class="text-center">{{maintainanceTask.taskStateName}}</td>
|
||||
<td class="text-center text-danger font-bold" v-if="maintainanceTask.state == '20200408'">
|
||||
{{maintainanceTask.stateName}}
|
||||
</td>
|
||||
<td class="text-center" v-else>{{maintainanceTask.stateName}}</td>
|
||||
<!-- <td class="text-center text-danger font-bold" v-if="maintainanceTask.patrolType == '20002'">{{maintainanceTask.patrolTypeName ? maintainanceTask.patrolTypeName : '-'}}</td>
|
||||
<td class="text-center text-primary" v-else>{{maintainanceTask.patrolTypeName ? maintainanceTask.patrolTypeName : '-'}}</td> -->
|
||||
<td class="text-center text-primary">
|
||||
{{maintainanceTask.description ? maintainanceTask.description : '-'}}
|
||||
</td>
|
||||
<td class="text-center" style="white-space: nowrap;">
|
||||
<span v-for="_photo in maintainanceTask.photos">
|
||||
<img style="width: 60px; height: 60px;" v-bind:src="_photo.url"
|
||||
v-on:click="openFile(_photo)"/>
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">{{maintainanceTask.createTime}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="17">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="common/viewMap"></vc:create>
|
||||
<vc:create path="common/viewImage"></vc:create>
|
||||
</div>
|
||||
@ -0,0 +1,253 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
var photoUrl = '/callComponent/download/getFile/file';
|
||||
vc.extends({
|
||||
data: {
|
||||
maintainanceTaskDetailManageInfo: {
|
||||
maintainanceTasks: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
taskId: '',
|
||||
stateTypes: [],
|
||||
maintainanceStateTypes: [],
|
||||
taskStates: [],
|
||||
maintainancePointList: [],
|
||||
maintainancePlanList: [],
|
||||
maintainanceRouteList: [],
|
||||
patrolTypes: [],
|
||||
conditions: {
|
||||
planUserName: '',
|
||||
taskDetailId: '',
|
||||
maintainancePlanName: '',
|
||||
actInsTime: '',
|
||||
maintainanceStartTime: '',
|
||||
maintainanceEndTime: '',
|
||||
state: '',
|
||||
maintainanceState: '',
|
||||
maintainanceId: '',
|
||||
maintainancePlanId: '',
|
||||
maintainanceRouteId: '',
|
||||
taskState: '',
|
||||
patrolType: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
//与字典表关联
|
||||
vc.getDict('maintainance_task', "state", function (_data) {
|
||||
vc.component.maintainanceTaskDetailManageInfo.stateTypes = _data;
|
||||
});
|
||||
vc.getDict('maintainance_task_detail', "maintainance_state", function (_data) {
|
||||
vc.component.maintainanceTaskDetailManageInfo.maintainanceStateTypes = _data;
|
||||
});
|
||||
vc.getDict('maintainance_task_detail', "state", function (_data) {
|
||||
vc.component.maintainanceTaskDetailManageInfo.taskStates = _data;
|
||||
});
|
||||
vc.getDict('maintainance_task_detail', "patrol_type", function (_data) {
|
||||
vc.component.maintainanceTaskDetailManageInfo.patrolTypes = _data;
|
||||
});
|
||||
vc.component._initMaintainanceTaskDetailDateInfo();
|
||||
vc.component._listMaintainanceTasksDetailList(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
vc.component._listMaintainancePlanInfo();
|
||||
vc.component._listMaintainanceRouteInfo();
|
||||
vc.component._listMaintainancePointInfo();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('maintainanceTaskManage', 'listMaintainanceTask', function (_param) {
|
||||
vc.component._listMaintainanceTasksDetailList(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listMaintainanceTasksDetailList(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_initMaintainanceTaskDetailDateInfo: function () {
|
||||
$('.startTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
initTime: true,
|
||||
initialDate: new Date(),
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
});
|
||||
$('.startTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".startTime").val();
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainanceStartTime = value;
|
||||
});
|
||||
$('.endTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
initTime: true,
|
||||
initialDate: new Date(),
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
});
|
||||
$('.endTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".endTime").val();
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainanceEndTime = value;
|
||||
});
|
||||
//防止多次点击时间插件失去焦点
|
||||
document.getElementsByClassName(' form-control startTime')[0].addEventListener('click', myfunc)
|
||||
|
||||
function myfunc(e) {
|
||||
e.currentTarget.blur();
|
||||
}
|
||||
|
||||
document.getElementsByClassName(" form-control endTime")[0].addEventListener('click', myfunc)
|
||||
|
||||
function myfunc(e) {
|
||||
e.currentTarget.blur();
|
||||
}
|
||||
},
|
||||
_listMaintainanceTasksDetailList: function (_page, _rows) {
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.page = _page;
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.row = _rows;
|
||||
$that.maintainanceTaskDetailManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
||||
let param = {
|
||||
params: vc.component.maintainanceTaskDetailManageInfo.conditions
|
||||
};
|
||||
param.params.planUserName = param.params.planUserName.trim();
|
||||
param.params.taskDetailId = param.params.taskDetailId.trim();
|
||||
param.params.maintainancePlanName = param.params.maintainancePlanName.trim();
|
||||
//发送get请求
|
||||
vc.http.apiGet('maintainanceTaskDetail.listMaintainanceTaskDetails',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _maintainanceTaskDetailManageInfo = JSON.parse(json);
|
||||
vc.component.maintainanceTaskDetailManageInfo.total = _maintainanceTaskDetailManageInfo.total;
|
||||
vc.component.maintainanceTaskDetailManageInfo.records = _maintainanceTaskDetailManageInfo.records;
|
||||
vc.component.maintainanceTaskDetailManageInfo.maintainanceTasks = _maintainanceTaskDetailManageInfo.data;
|
||||
vc.component.maintainanceTaskDetailManageInfo.maintainanceTasks.forEach((item) => {
|
||||
if(item.photos && item.photos.length>0){
|
||||
item.photos.forEach((photo) => {
|
||||
photo.url = photoUrl + "?fileId=" + photo.url + "&communityId=-1&time=" + new Date()
|
||||
console.log(photo.url);
|
||||
})
|
||||
}
|
||||
})
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.maintainanceTaskDetailManageInfo.records,
|
||||
dataCount: vc.component.maintainanceTaskDetailManageInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
//查询
|
||||
_queryMaintainanceTaskMethod: function () {
|
||||
vc.component._listMaintainanceTasksDetailList(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//重置
|
||||
_resetMaintainanceTaskMethod: function () {
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.planUserName = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.taskDetailId = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainancePlanName = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.actInsTime = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainanceStartTime = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainanceEndTime = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.state = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainanceId = '';
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainancePlanId = '';
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainanceRouteId = '';
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.maintainanceState = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.taskState = "";
|
||||
vc.component.maintainanceTaskDetailManageInfo.conditions.patrolType = "";
|
||||
vc.component._listMaintainanceTasksDetailList(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.maintainanceTaskDetailManageInfo.moreCondition) {
|
||||
vc.component.maintainanceTaskDetailManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.maintainanceTaskDetailManageInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_listMaintainancePlanInfo: function () {
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
page: 1,
|
||||
row: 200
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/maintainancePlan.listMaintainancePlans',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _maintainancePointManageInfo = JSON.parse(json);
|
||||
vc.component.maintainanceTaskDetailManageInfo.maintainancePlanList = _maintainancePointManageInfo.data;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_listMaintainanceRouteInfo: function () {
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
page: 1,
|
||||
row: 200
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/maintainanceRoute.listMaintainanceRoutes',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _maintainancePointManageInfo = JSON.parse(json);
|
||||
vc.component.maintainanceTaskDetailManageInfo.maintainanceRouteList = _maintainancePointManageInfo.data;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_listMaintainancePointInfo: function () {
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
page: 1,
|
||||
row: 200
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/maintainancePoint.listMaintainancePoints',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _maintainancePointManageInfo = JSON.parse(json);
|
||||
vc.component.maintainanceTaskDetailManageInfo.maintainancePointList = _maintainancePointManageInfo.data;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
openFile: function (_photo) {
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: _photo.url
|
||||
});
|
||||
},
|
||||
openMap: function (lat, lng) {
|
||||
if (!lat || !lng) {
|
||||
vc.toast('暂无位置信息');
|
||||
return;
|
||||
}
|
||||
vc.emit('viewMap', 'showMap', {
|
||||
lat: lat,
|
||||
lng: lng
|
||||
});
|
||||
},
|
||||
//导出
|
||||
_exportExcel: function () {
|
||||
vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=maintainanceTaskDetails&' + vc.objToGetParam($that.maintainanceTaskDetailManageInfo.conditions));
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
187
public/pages/property/maintainanceTaskManage/maintainanceTaskManage.html
Executable file
187
public/pages/property/maintainanceTaskManage/maintainanceTaskManage.html
Executable file
@ -0,0 +1,187 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="查询条件" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
|
||||
v-on:click="_moreCondition()">
|
||||
{{maintainanceTaskManageInfo.moreCondition == true?'隐藏':'更多'}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入执行人','maintainanceTaskManage')"
|
||||
v-model="maintainanceTaskManageInfo.conditions.planUserName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入实际保养开始时间','maintainanceTaskManage')"
|
||||
v-model="maintainanceTaskManageInfo.conditions.startTime"
|
||||
class=" form-control startTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入实际保养结束时间','maintainanceTaskManage')"
|
||||
v-model="maintainanceTaskManageInfo.conditions.endTime"
|
||||
class=" form-control endTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryMaintainanceTaskMethod()">
|
||||
<i class="fa fa-search"></i>
|
||||
<span><vc:i18n name="查询" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-white btn-sm"
|
||||
v-on:click="_resetMaintainanceTaskMethod()">
|
||||
<i class="fa fa-repeat"></i>
|
||||
<span><vc:i18n name="重置" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-show="maintainanceTaskManageInfo.moreCondition == true">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入保养计划ID','maintainanceTaskManage')"
|
||||
v-model="maintainanceTaskManageInfo.conditions.planId"
|
||||
class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入保养计划名称','maintainanceTaskManage')"
|
||||
v-model="maintainanceTaskManageInfo.conditions.planName"
|
||||
class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="maintainanceTaskManageInfo.conditions.state">
|
||||
<option selected value="">{{vc.i18n('请选择保养状态','maintainanceTaskManage')}}</option>
|
||||
<option v-for="(item,index) in maintainanceTaskManageInfo.stateTypes" :key="index"
|
||||
:value="item.statusCd">
|
||||
{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="保养任务" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;"></div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="任务编码" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="保养计划" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="保养人" namespace="maintainanceTaskManage"></vc:i18n></span><br/>
|
||||
<span><vc:i18n name="开始/结束时间" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="实际保养时间" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="计划保养人" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="当前保养人" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="转移描述" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="保养状态" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="操作" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="maintainanceTask in maintainanceTaskManageInfo.maintainanceTasks">
|
||||
<td class="text-center">{{maintainanceTask.taskId}}</td>
|
||||
<td class="text-center">{{maintainanceTask.planName}}</td>
|
||||
<td class="text-center">{{maintainanceTask.planInsTime}}<br/>{{maintainanceTask.planEndTime}}
|
||||
</td>
|
||||
<td class="text-center">{{maintainanceTask.actInsTime ? maintainanceTask.actInsTime : '-'}}</td>
|
||||
<td class="text-center">
|
||||
{{maintainanceTask.originalPlanUserName ? maintainanceTask.originalPlanUserName : '-'}}
|
||||
</td>
|
||||
<td class="text-center">{{maintainanceTask.planUserName}}</td>
|
||||
<td class="text-center">
|
||||
{{maintainanceTask.transferDesc ? maintainanceTask.transferDesc : '-'}}
|
||||
</td>
|
||||
<td class="text-center text-danger font-bold" v-if="maintainanceTask.state == '20200408'">
|
||||
{{maintainanceTask.stateName}}
|
||||
</td>
|
||||
<td class="text-center" v-else>{{maintainanceTask.stateName}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openMaintainanceTaskTransfer(maintainanceTask)"
|
||||
v-if="maintainanceTask.state == '20200406' || maintainanceTask.state == '20200405'">
|
||||
<span><vc:i18n name="流转" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</button>
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openMaintainanceTaskDetail(maintainanceTask)">
|
||||
<span><vc:i18n name="详情" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</button>
|
||||
<button class="btn-white btn btn-xs" v-if="vc.hasPrivilege('502022031612550001')"
|
||||
v-on:click="_openDeleteMaintainanceTask(maintainanceTask)">
|
||||
<span><vc:i18n name="删除" namespace="maintainanceTaskManage"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<div class="row margin-top-xs">
|
||||
<div class="col-sm-9">
|
||||
<div>
|
||||
保养任务是根据保养计划,每天晚上2点钟自动生成,如果没有生成 请确认是否开启了定时任务,或者保养计划是否设置正确
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 float-right">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <vc:create path="property/maintainanceTaskDetail"></vc:create>
|
||||
<vc:create path="property/maintainanceTaskTransfer"></vc:create>
|
||||
-->
|
||||
<vc:create path="property/deleteMaintainanceTask"></vc:create>
|
||||
</div>
|
||||
150
public/pages/property/maintainanceTaskManage/maintainanceTaskManage.js
Executable file
150
public/pages/property/maintainanceTaskManage/maintainanceTaskManage.js
Executable file
@ -0,0 +1,150 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
maintainanceTaskManageInfo: {
|
||||
maintainanceTasks: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
taskId: '',
|
||||
stateTypes: [],
|
||||
conditions: {
|
||||
planUserName: '',
|
||||
planId: '',
|
||||
planName: '',
|
||||
actInsTime: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
state: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
//与字典表关联
|
||||
vc.getDict('maintainance_task', "state", function (_data) {
|
||||
vc.component.maintainanceTaskManageInfo.stateTypes = _data;
|
||||
});
|
||||
vc.component._initMaintainanceTaskDateInfo();
|
||||
vc.component._listMaintainanceTasks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('maintainanceTaskManage', 'listMaintainanceTask', function (_param) {
|
||||
vc.component._listMaintainanceTasks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('maintainanceTaskManage', 'pageReload', function (_param) {
|
||||
location.reload();
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listMaintainanceTasks(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_initMaintainanceTaskDateInfo: function () {
|
||||
$('.startTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
initTime: true,
|
||||
initialDate: new Date(),
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
});
|
||||
$('.startTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".startTime").val();
|
||||
vc.component.maintainanceTaskManageInfo.conditions.startTime = value;
|
||||
});
|
||||
$('.endTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
initTime: true,
|
||||
initialDate: new Date(),
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
});
|
||||
$('.endTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".endTime").val();
|
||||
vc.component.maintainanceTaskManageInfo.conditions.endTime = value;
|
||||
});
|
||||
//防止多次点击时间插件失去焦点
|
||||
document.getElementsByClassName(' form-control startTime')[0].addEventListener('click', myfunc)
|
||||
|
||||
function myfunc(e) {
|
||||
e.currentTarget.blur();
|
||||
}
|
||||
|
||||
document.getElementsByClassName(" form-control endTime")[0].addEventListener('click', myfunc)
|
||||
|
||||
function myfunc(e) {
|
||||
e.currentTarget.blur();
|
||||
}
|
||||
},
|
||||
_listMaintainanceTasks: function (_page, _rows) {
|
||||
vc.component.maintainanceTaskManageInfo.conditions.page = _page;
|
||||
vc.component.maintainanceTaskManageInfo.conditions.row = _rows;
|
||||
$that.maintainanceTaskManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
||||
var param = {
|
||||
params: vc.component.maintainanceTaskManageInfo.conditions
|
||||
};
|
||||
param.params.planUserName = param.params.planUserName.trim();
|
||||
param.params.planId = param.params.planId.trim();
|
||||
param.params.planName = param.params.planName.trim();
|
||||
//发送get请求
|
||||
vc.http.apiGet('/maintainanceTask.listMaintainanceTask',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _maintainanceTaskManageInfo = JSON.parse(json);
|
||||
vc.component.maintainanceTaskManageInfo.total = _maintainanceTaskManageInfo.total;
|
||||
vc.component.maintainanceTaskManageInfo.records = _maintainanceTaskManageInfo.records;
|
||||
vc.component.maintainanceTaskManageInfo.maintainanceTasks = _maintainanceTaskManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.maintainanceTaskManageInfo.records,
|
||||
dataCount: vc.component.maintainanceTaskManageInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openMaintainanceTaskDetail: function (_maintainanceTask) {
|
||||
vc.emit('maintainanceTaskDetail', 'openMaintainanceTaskDetail', _maintainanceTask);
|
||||
},
|
||||
_openMaintainanceTaskTransfer: function (_maintainanceTask) {
|
||||
vc.emit('maintainanceTaskTransfer', 'openMaintainanceTaskTransferModal', _maintainanceTask);
|
||||
},
|
||||
_openDeleteMaintainanceTask: function (_maintainanceTask) {
|
||||
vc.emit('deleteMaintainanceTask', 'openDeleteMaintainanceTaskModal', _maintainanceTask);
|
||||
},
|
||||
//查询
|
||||
_queryMaintainanceTaskMethod: function () {
|
||||
vc.component._listMaintainanceTasks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//重置
|
||||
_resetMaintainanceTaskMethod: function () {
|
||||
vc.component.maintainanceTaskManageInfo.conditions.planUserName = "";
|
||||
vc.component.maintainanceTaskManageInfo.conditions.planId = "";
|
||||
vc.component.maintainanceTaskManageInfo.conditions.planName = "";
|
||||
vc.component.maintainanceTaskManageInfo.conditions.startTime = "";
|
||||
vc.component.maintainanceTaskManageInfo.conditions.endTime = "";
|
||||
vc.component.maintainanceTaskManageInfo.conditions.state = "";
|
||||
vc.component._listMaintainanceTasks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.maintainanceTaskManageInfo.moreCondition) {
|
||||
vc.component.maintainanceTaskManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.maintainanceTaskManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user