This commit is contained in:
shiyj1101 2021-08-26 00:50:02 +08:00
commit f244d0cfd6
4 changed files with 122 additions and 151 deletions

View File

@ -8,7 +8,7 @@
//发送get请求
let _modelId = vc.getParam('modelId');
let _param = {
'xml': _xml,
'xml': _xml.replaceAll('Process_1',"java110_" + vc.getParam('flowId')),
'svg': svg
};
vc.http.apiPost('/activiti/model/' + _modelId + '/save',
@ -57,8 +57,6 @@
}
//初始化
window.initBpmnjs();
//生成编号
document.getElementById('camunda-id').value = "java110_" + _flowId
}, function (errInfo, error) {
console.log('请求失败处理');
}

View File

@ -34,7 +34,7 @@
$that._listOaWorkFlowPoolForm();
vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS);
})
vc.on('newOaWorkflowPool','paginationPlus', 'page_event', function (_currentPage) {
vc.on('newOaWorkflowPool', 'paginationPlus', 'page_event', function (_currentPage) {
vc.component._listOaWorkflowPools(_currentPage, DEFAULT_ROWS);
});
},
@ -73,7 +73,7 @@
vc.component.newOaWorkflowPoolInfo.total = _newOaWorkflowPoolInfo.total;
vc.component.newOaWorkflowPoolInfo.records = _newOaWorkflowPoolInfo.records;
vc.component.newOaWorkflowPoolInfo.pools = _newOaWorkflowPoolInfo.data;
vc.emit('newOaWorkflowPool','paginationPlus', 'init', {
vc.emit('newOaWorkflowPool', 'paginationPlus', 'init', {
total: vc.component.newOaWorkflowPoolInfo.records,
dataCount: vc.component.newOaWorkflowPoolInfo.total,
currentPage: _page
@ -83,8 +83,8 @@
}
);
},
_openNewOaWorkflowPoolDetail: function (_notice) {
vc.jumpToPage("/admin.html#/pages/common/noticeDetail?noticeId=" + _notice.noticeId);
_openNewOaWorkflowPoolDetail: function (_pool) {
vc.jumpToPage("/admin.html#/pages/property/newOaWorkflowDetail?id=" + _pool.id + "&flowId=" + $that.newOaWorkflowPoolInfo.conditions.flowId);
},
_queryOaWorkflowPoolMethod: function () {
vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS);

View File

@ -11,23 +11,33 @@
<div class="ibox-content">
<div>
<div>
<div class="row" v-if="newOaWorkflowDetailInfo.pools">
<div class="col-sm-4">
<div class="form-group">
<label class="col-form-label">申请人:</label>
<label class="">{{newOaWorkflowDetailInfo.pools.create_user_name}}</label>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label class="col-form-label">申请时间:</label>
<label class="">{{newOaWorkflowDetailInfo.pools.create_time}}</label>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label class="col-form-label">状态:</label>
<label
class="">{{_getNewOaWorkflowDetailState(newOaWorkflowDetailInfo.pools)}}</label>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="col-sm-4" v-for="(item,index) in newOaWorkflowDetailInfo.formJson"
v-if="item.type != 'text' && item.type != 'button' ">
<div class="form-group">
<label class="col-form-label">工单编码:</label>
<label class="">{{newOaWorkflowDetailInfo.repairId}}</label>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label class="col-form-label">报修类型:</label>
<label class="">{{newOaWorkflowDetailInfo.repairTypeName}}</label>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label class="col-form-label">报修人:</label>
<label class="">{{newOaWorkflowDetailInfo.repairName}}</label>
<label class="col-form-label">{{item.label}}</label>
<label class="">{{newOaWorkflowDetailInfo.pools[item.key]}}</label>
</div>
</div>
</div>
@ -48,24 +58,22 @@
<div class="ibox-content">
<table class="table table-stripped">
<thead>
<tr>
<th scope="col" class="text-center">序号</th>
<th scope="col" class="text-center">处理人</th>
<th scope="col" class="text-center">状态</th>
<th scope="col" class="text-center">处理时间</th>
<th scope="col" class="text-center">耗时</th>
<th scope="col" class="text-center">意见</th>
</tr>
<tr>
<th scope="col" class="text-center">序号</th>
<th scope="col" class="text-center">处理人</th>
<th scope="col" class="text-center">状态</th>
<th scope="col" class="text-center">耗时</th>
<th scope="col" class="text-center">意见</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in newOaWorkflowDetailInfo.repairUsers">
<td scope="row" class="text-center">{{index+1}}</td>
<td class="text-center">{{item.staffName}}</td>
<td class="text-center">{{item.stateName}}</td>
<td class="text-center">{{item.endTime}}</td>
<td class="text-center">{{item.duration}}</td>
<td class="text-center">{{item.context}}</td>
</tr>
<tr v-for="(item,index) in newOaWorkflowDetailInfo.comments">
<td scope="row" class="text-center">{{index+1}}</td>
<td class="text-center">{{item.auditName}}</td>
<td class="text-center">{{item.stateName}}</td>
<td class="text-center">{{item.duration}}</td>
<td class="text-center">{{item.message}}</td>
</tr>
</tbody>
</table>
</div>

View File

@ -3,7 +3,10 @@
data: {
newOaWorkflowDetailInfo: {
id: '',
repairUsers: [],
flowId: '',
pools: {},
formJson: [],
comments: [],
}
},
_initMethod: function () {
@ -11,123 +14,73 @@
if (!vc.notNull(id)) {
vc.toast('非法操作');
vc.
return;
return;
}
$that.newOaWorkflowDetailInfo.repairId = repairId;
$that._listRepairPools()
$that.newOaWorkflowDetailInfo.id = id;
$that.newOaWorkflowDetailInfo.flowId = vc.getParam('flowId');
$that._listOaWorkflowDetails();
$that._loadComments();
},
_initEvent: function () {
},
methods: {
_getRoom: function () {
var param = {
params: {
roomId: vc.component.newOaWorkflowDetailInfo.roomId,
communityId: vc.getCurrentCommunity().communityId,
page: 1,
row: 1
}
};
//查询房屋信息 业主信息
vc.http.get('newOaWorkflowManage',
'getRoom',
param,
function (json, res) {
if (res.status == 200) {
var _roomInfos = JSON.parse(json);
if (!_roomInfos.hasOwnProperty("rooms")) {
vc.toast("非法操作,未找到房屋信息");
//vc.jumpToPage('/admin.html#/listOwner');
return;
}
var _roomInfo = _roomInfos.rooms[0];
vc.component.newOaWorkflowDetailInfo.roomName = _roomInfo.floorNum + "号楼 " + _roomInfo.unitNum + "单元 " + _roomInfo.roomNum + "室";
} else {
vc.toast("非法操作,未找到房屋信息");
}
}, function (errInfo, error) {
console.log('请求失败处理');
vc.toast("非法操作,未找到房屋信息");
}
);
},
_listRepairPools: function () {
_listOaWorkFlowDetailForm: function () {
var param = {
params: {
page: 1,
row: 1,
communityId: vc.getCurrentCommunity().communityId,
repairId: $that.newOaWorkflowDetailInfo.repairId
flowId: $that.newOaWorkflowDetailInfo.flowId
}
};
//发送get请求
vc.http.get('newOaWorkflowManage',
'list',
vc.http.apiGet('/oaWorkflow/queryOaWorkflowForm',
param,
function (json, res) {
var _repairPoolManageInfo = JSON.parse(json);
let _repairs = _repairPoolManageInfo.data;
if (_repairs.length < 1) {
vc.toast("数据异常");
vc.jumpToPage('/admin.html#/pages/property/repairPoolManage');
let _newOaWorkflowFormInfo = JSON.parse(json);
$that.newOaWorkflowDetailInfo.formJson = JSON.parse(_newOaWorkflowFormInfo.data[0].formJson).components;
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_listOaWorkflowDetails: function (_page, _rows) {
var param = {
params: {
page: 1,
row: 1,
id: $that.newOaWorkflowDetailInfo.id,
flowId: $that.newOaWorkflowDetailInfo.flowId
}
};
//发送get请求
vc.http.apiGet('/oaWorkflow/queryOaWorkflowFormData',
param,
function (json, res) {
var _newOaWorkflowDetailInfo = JSON.parse(json);
vc.component.newOaWorkflowDetailInfo.pools = _newOaWorkflowDetailInfo.data[0];
$that._listOaWorkFlowDetailForm();
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_loadComments: function () {
var param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
businessKey: $that.newOaWorkflowDetailInfo.id
}
};
//发送get请求
vc.http.apiGet('workflow.listWorkflowAuditInfo',
param,
function (json, res) {
var _workflowManageInfo = JSON.parse(json);
if (_workflowManageInfo.code != '0') {
return;
}
vc.copyObject(_repairs[0], $that.newOaWorkflowDetailInfo);
//查询房屋信息
//vc.component._getRoom();
// 查询物品信息
if ($that.newOaWorkflowDetailInfo.maintenanceType == '1001' || $that.newOaWorkflowDetailInfo.maintenanceType == '1003') {
$that._loadResourceStoreList();
}
//查询处理轨迹
$that._loadRepairUser();
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_loadResourceStoreList: function () {
var param = {
params: {
page: 1,
row: 100,
communityId: vc.getCurrentCommunity().communityId,
repairId: $that.newOaWorkflowDetailInfo.repairId
}
};
//发送get请求
vc.http.apiGet('resourceStore.listResourceStoreUseRecords',
param,
function (json, res) {
var _repairResourceStoreInfo = JSON.parse(json);
let _resource = _repairResourceStoreInfo.data;
$that.newOaWorkflowDetailInfo.resourceStoreInfo = _resource;
vc.component.newOaWorkflowDetailInfo.resourceStoreInfo.forEach((item) => {
if (item.resId == '666666') {
item.rstName = item.specName = '自定义';
}
})
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_loadRepairUser: function () {
var param = {
params: {
page: 1,
row: 100,
communityId: vc.getCurrentCommunity().communityId,
repairId: $that.newOaWorkflowDetailInfo.repairId
}
};
//发送get请求
vc.http.apiGet('newOaWorkflow.listRepairStaffs',
param,
function (json, res) {
var _repairPoolManageInfo = JSON.parse(json);
let _repairs = _repairPoolManageInfo.data;
$that.newOaWorkflowDetailInfo.repairUsers = _repairs;
$that.newOaWorkflowDetailInfo.comments = _workflowManageInfo.data;
}, function (errInfo, error) {
console.log('请求失败处理');
}
@ -136,17 +89,29 @@
_goBack: function () {
vc.goBack()
},
openFile: function (_photo) {
vc.emit('viewImage', 'showImage', {
url: _photo.url
});
},
/**
* 新增打印功能跳转打印页面
*/
_printRepairDetail: function () {
window.open("/print.html#/pages/property/printRepairDetail?repairId=" + $that.newOaWorkflowDetailInfo.repairId + "&repairType=" + $that.newOaWorkflowDetailInfo.repairType)
},
_getNewOaWorkflowDetailState: function (_pool) {
/**
* 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结
*/
if (!_pool.hasOwnProperty('state')) {
return "未知";
}
switch (_pool.state) {
case '1001':
return "申请";
case '1002':
return "待审核";
case '1003':
return "退回";
case '1004':
return "委托";
case '1005':
return "办结";
}
return "未知"
}
}
});
})(window.vc);