Merge branch 'master' into zjw
This commit is contained in:
commit
05e0581b64
@ -62,7 +62,7 @@ public class AlarmDataController {
|
||||
@Operation(summary = "更新机床参数报警记录")
|
||||
@PreAuthorize("@ss.hasPermission('imt:alarm-data:update')")
|
||||
public CommonResult<Integer> closeAllAlarmData(String equipAlarmId) {
|
||||
return success(alarmDataService.closeAllAlarmDataByEquipAlarmId(equipAlarmId));
|
||||
return success(alarmDataService.closeAllAlarmDataByEquipAlarmId(equipAlarmId,true));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.inspur.module.system.controller.inspection;
|
||||
|
||||
import com.inspur.framework.common.pojo.CommonResult;
|
||||
import com.inspur.framework.common.pojo.PageResult;
|
||||
import com.inspur.framework.common.util.object.BeanUtils;
|
||||
import com.inspur.module.system.controller.inspection.vo.InspectionInfoPageReqVO;
|
||||
import com.inspur.module.system.controller.inspection.vo.InspectionInfoRespVO;
|
||||
import com.inspur.module.system.dal.dataobject.inspection.InspectionInfoDO;
|
||||
import com.inspur.module.system.service.inspection.InspectionInfoService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static com.inspur.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 2024/11/1 13:49
|
||||
**/
|
||||
@Tag(name = "管理后台 - 点检工单记录")
|
||||
@RestController
|
||||
@RequestMapping("/admin-api/imt/inspection-info-record")
|
||||
@Validated
|
||||
public class InspectionInfoRecordController {
|
||||
|
||||
@Resource
|
||||
private InspectionInfoService inspectionInfoService;
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得点检工单分页")
|
||||
@PreAuthorize("@ss.hasPermission('imt:inspection-info-record:query')")
|
||||
public CommonResult<PageResult<InspectionInfoRespVO>> getInspectionInfoRecordPage(@Valid InspectionInfoPageReqVO pageReqVO) {
|
||||
PageResult<InspectionInfoDO> pageResult = inspectionInfoService.getInspectionInfoRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, InspectionInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得点检工单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('imt:inspection-info-record:query')")
|
||||
public CommonResult<InspectionInfoRespVO> getInspectionInfo(@RequestParam("id") String id) {
|
||||
InspectionInfoDO inspectionInfo = inspectionInfoService.getInspectionInfo(id);
|
||||
return success(BeanUtils.toBean(inspectionInfo, InspectionInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -26,4 +26,15 @@ public interface InspectionInfoMapper extends BaseMapperX<InspectionInfoDO> {
|
||||
.orderByDesc(InspectionInfoDO::getInspectionId));
|
||||
}
|
||||
|
||||
default PageResult<InspectionInfoDO> selectRecordPage(InspectionInfoPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<InspectionInfoDO>()
|
||||
.likeIfPresent(InspectionInfoDO::getInspectionNo, reqVO.getInspectionNo())
|
||||
.eqIfPresent(InspectionInfoDO::getEquipId, reqVO.getEquipId())
|
||||
.eqIfPresent(InspectionInfoDO::getCustomerId, reqVO.getCustomerId())
|
||||
.eqIfPresent(InspectionInfoDO::getInspectionPlanId, reqVO.getInspectionPlanId())
|
||||
.eqIfPresent(InspectionInfoDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(InspectionInfoDO::getStatus,3)
|
||||
.orderByDesc(InspectionInfoDO::getInspectionId));
|
||||
}
|
||||
|
||||
}
|
@ -24,6 +24,7 @@ public interface MaintenanceOrderMapper extends BaseMapperX<MaintenanceOrderDO>
|
||||
.eqIfPresent(MaintenanceOrderDO::getComponentId, reqVO.getComponentId())
|
||||
.eqIfPresent(MaintenanceOrderDO::getCustomerId, reqVO.getCustomerId())
|
||||
.eqIfPresent(MaintenanceOrderDO::getStatus, reqVO.getStatus())
|
||||
.neIfPresent(MaintenanceOrderDO::getStatus, 5)
|
||||
.eqIfPresent(MaintenanceOrderDO::getApproveStatus, reqVO.getApproveStatus())
|
||||
.orderByDesc(MaintenanceOrderDO::getCreateTime));
|
||||
}
|
||||
|
@ -15,14 +15,14 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface MaintenanceOrderRecordMapper extends BaseMapperX<MaintenanceOrderDO> {
|
||||
|
||||
default PageResult<MaintenanceOrderDO> selectPage(MaintenanceOrderRecordsPageReqVO reqVO) {
|
||||
default PageResult<MaintenanceOrderDO> selectRecordPage(MaintenanceOrderRecordsPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MaintenanceOrderDO>()
|
||||
.likeIfPresent(MaintenanceOrderDO::getMaintenanceOrderNo, reqVO.getMaintenanceOrderNo())
|
||||
.eqIfPresent(MaintenanceOrderDO::getEquipId, reqVO.getEquipId())
|
||||
.eqIfPresent(MaintenanceOrderDO::getComponentId, reqVO.getComponentId())
|
||||
.eqIfPresent(MaintenanceOrderDO::getCustomerId, reqVO.getCustomerId())
|
||||
.betweenIfPresent(MaintenanceOrderDO::getCompleteTime, reqVO.getCompleteTime())
|
||||
.eqIfPresent(MaintenanceOrderDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(MaintenanceOrderDO::getStatus, 5)
|
||||
.betweenIfPresent(MaintenanceOrderDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(MaintenanceOrderDO::getCreateTime));
|
||||
}
|
||||
|
@ -62,8 +62,9 @@ public interface AlarmDataService {
|
||||
|
||||
/**
|
||||
* 关闭制定设备报警id下的所有参数报警记录
|
||||
* @param flag 是否为页面手动点击关闭
|
||||
*/
|
||||
int closeAllAlarmDataByEquipAlarmId(String equipAlarmId);
|
||||
int closeAllAlarmDataByEquipAlarmId(String equipAlarmId,boolean flag);
|
||||
|
||||
/**
|
||||
* 根据规则id获取参数报警记录
|
||||
|
@ -115,15 +115,17 @@ public class AlarmDataServiceImpl implements AlarmDataService {
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int closeAllAlarmDataByEquipAlarmId(String equipAlarmId){
|
||||
public int closeAllAlarmDataByEquipAlarmId(String equipAlarmId,boolean flag){
|
||||
List<AlarmDataDO> alarmDataList = alarmDataMapper.selectAlarmDatas(new AlarmDataPageReqVO().setEquipAlarmId(equipAlarmId));
|
||||
EquipAlarmDataSaveReqVO equipAlarmDataSaveReqVO = new EquipAlarmDataSaveReqVO();
|
||||
equipAlarmDataSaveReqVO.setEquipAlarmId(equipAlarmId);
|
||||
equipAlarmDataSaveReqVO.setStatus(1);//关闭
|
||||
equipAlarmDataService.updateEquipAlarmData(equipAlarmDataSaveReqVO);
|
||||
//关闭点检工单
|
||||
InspectionInfoServiceImpl inspectionInfoService = SpringUtils.getBean(InspectionInfoServiceImpl.class);
|
||||
inspectionInfoService.closeInspectionInfoByAlarmId(equipAlarmId);
|
||||
if (flag){
|
||||
InspectionInfoServiceImpl inspectionInfoService = SpringUtils.getBean(InspectionInfoServiceImpl.class);
|
||||
inspectionInfoService.closeInspectionInfoByAlarmId(equipAlarmId);
|
||||
}
|
||||
if (CollUtil.isEmpty(alarmDataList)){
|
||||
return 0;
|
||||
}
|
||||
|
@ -89,4 +89,13 @@ public interface InspectionInfoService {
|
||||
* @param alarmId 报警id
|
||||
*/
|
||||
void closeInspectionInfoByAlarmId(String alarmId);
|
||||
|
||||
|
||||
/**
|
||||
* 获得点检工单记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 点检工单分页
|
||||
*/
|
||||
PageResult<InspectionInfoDO> getInspectionInfoRecordPage(InspectionInfoPageReqVO pageReqVO);
|
||||
}
|
@ -138,7 +138,20 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
|
||||
@Override
|
||||
@TenantIgnore
|
||||
public InspectionInfoDO getInspectionInfo(String id) {
|
||||
return inspectionInfoMapper.selectById(id);
|
||||
InspectionInfoDO inspectionInfoDO = inspectionInfoMapper.selectById(id);
|
||||
if (Objects.nonNull(inspectionInfoDO)){
|
||||
if (StrUtil.isNotBlank(inspectionInfoDO.getCustomerId())){
|
||||
List<CustomerInfoSelectionVO> customerList = customerInfoService.selection(true);
|
||||
Map<String, String> customerListMap = customerList.stream().collect(Collectors.toMap(CustomerInfoSelectionVO::getCustomerId, CustomerInfoSelectionVO::getCustomerName));
|
||||
inspectionInfoDO.setCustomerName(customerListMap.get(inspectionInfoDO.getCustomerId()));
|
||||
}
|
||||
if (StrUtil.isNotBlank(inspectionInfoDO.getEquipId())){
|
||||
List<EquipSelectionVO> equipList = equipInfoService.selection();
|
||||
Map<String, String> equipMap = equipList.stream().collect(Collectors.toMap(EquipSelectionVO::getEquipId, EquipSelectionVO::getEquipName));
|
||||
inspectionInfoDO.setEquipName(equipMap.get(inspectionInfoDO.getEquipId()));
|
||||
}
|
||||
}
|
||||
return inspectionInfoDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -174,10 +187,10 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean inspectionFeedback(InspectionInfoFeedbackVO vo) {
|
||||
InspectionInfoDO inspectionInfoDO = BeanUtils.toBean(vo, InspectionInfoDO.class);
|
||||
int i = inspectionInfoMapper.updateById(inspectionInfoDO);
|
||||
if (vo.getCloseAlarm()) {
|
||||
alarmDataService.closeAllAlarmDataByEquipAlarmId(vo.getAlarmId());
|
||||
alarmDataService.closeAllAlarmDataByEquipAlarmId(vo.getAlarmId(),false);
|
||||
}
|
||||
int i = inspectionInfoMapper.updateById(inspectionInfoDO);
|
||||
//点检树新增
|
||||
if (CollUtil.isNotEmpty(vo.getFeedbackList())){
|
||||
List<InspectionFeedbackDO> feedbackList = vo.getFeedbackList();
|
||||
@ -191,7 +204,7 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
|
||||
public Boolean exclusiveInspectionFeedback(ExclusiveInspectionInfoFeedbackVO vo) {
|
||||
InspectionInfoDO inspectionInfoDO = BeanUtils.toBean(vo, InspectionInfoDO.class);
|
||||
if (vo.getCloseAlarm()) {
|
||||
alarmDataService.closeAllAlarmDataByEquipAlarmId(vo.getAlarmId());
|
||||
alarmDataService.closeAllAlarmDataByEquipAlarmId(vo.getAlarmId(),false);
|
||||
}
|
||||
return inspectionInfoMapper.updateById(inspectionInfoDO) > 0;
|
||||
}
|
||||
@ -239,4 +252,33 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
|
||||
updateWrapper.set(InspectionInfoDO::getRemark, "手动关闭报警");
|
||||
inspectionInfoMapper.update(updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InspectionInfoDO> getInspectionInfoRecordPage(InspectionInfoPageReqVO pageReqVO) {
|
||||
PageResult<InspectionInfoDO> page = inspectionInfoMapper.selectRecordPage(pageReqVO);
|
||||
List<InspectionInfoDO> list = page.getList();
|
||||
if (CollUtil.isNotEmpty(list)){
|
||||
List<CustomerInfoSelectionVO> customerList = customerInfoService.selection(true);
|
||||
Map<String, String> customerListMap = customerList.stream().collect(Collectors.toMap(CustomerInfoSelectionVO::getCustomerId, CustomerInfoSelectionVO::getCustomerName));
|
||||
List<EquipSelectionVO> equipList = equipInfoService.selection();
|
||||
Map<String, String> equipMap = equipList.stream().collect(Collectors.toMap(EquipSelectionVO::getEquipId, EquipSelectionVO::getEquipName));
|
||||
List<InspectionPlanDO> inspectionPlanList = inspectionPlanService.getInspectionPlanList(new InspectionPlanListReqVO());
|
||||
Map<Long, String> inspectionPlanMap = inspectionPlanList.stream().collect(Collectors.toMap(InspectionPlanDO::getInspectionPlanId, InspectionPlanDO::getInspectionName));
|
||||
list.forEach(item->{
|
||||
item.setCustomerName(customerListMap.get(item.getCustomerId()));
|
||||
item.setEquipName(equipMap.get(item.getEquipId()));
|
||||
if (StrUtil.isNotBlank(item.getInspectionPlanId())){
|
||||
String[] split = item.getInspectionPlanId().split(",");
|
||||
List<String> inspectionPlanNameList = new ArrayList<>();
|
||||
for (String s : split) {
|
||||
inspectionPlanNameList.add(inspectionPlanMap.get(Long.parseLong(s)));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(inspectionPlanNameList)){
|
||||
item.setInspectionPlanName(CollUtil.join(inspectionPlanNameList,","));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return page;
|
||||
}
|
||||
}
|
@ -128,7 +128,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
|
||||
}
|
||||
maintenanceOrderMapper.insert(remoteMaintenanceOrder);
|
||||
if ("0".equals(createReqVO.getSubmitFlag()) && StrUtil.isNotBlank(createReqVO.getAlarmId())) {
|
||||
alarmDataService.closeAllAlarmDataByEquipAlarmId(createReqVO.getAlarmId());
|
||||
alarmDataService.closeAllAlarmDataByEquipAlarmId(createReqVO.getAlarmId(),false);
|
||||
}
|
||||
//设置点检工单状态
|
||||
if (StrUtil.isNotBlank(createReqVO.getInspectionId())){
|
||||
@ -260,8 +260,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
|
||||
|
||||
@Override
|
||||
public PageResult<MaintenanceOrderDO> getRemoteMaintenanceOrderReportPage(MaintenanceOrderRecordsPageReqVO pageReqVO) {
|
||||
pageReqVO.setStatus(5);
|
||||
PageResult<MaintenanceOrderDO> page = maintenanceOrderRecordMapper.selectPage(pageReqVO);
|
||||
PageResult<MaintenanceOrderDO> page = maintenanceOrderRecordMapper.selectRecordPage(pageReqVO);
|
||||
List<MaintenanceOrderDO> list = page.getList();
|
||||
if (CollUtil.isNotEmpty(list)){
|
||||
List<EquipSelectionVO> equipList = equipInfoService.selection();
|
||||
|
18
imt-ui/src/api/system/inspection/inspectionInfoRecord.js
Normal file
18
imt-ui/src/api/system/inspection/inspectionInfoRecord.js
Normal file
@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获得点检工单
|
||||
export function getInspectionRecordInfo(id) {
|
||||
return request({
|
||||
url: '/imt/inspection-info-record/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得点检工单分页
|
||||
export function getInspectionInfoRecordPage(params) {
|
||||
return request({
|
||||
url: '/imt/inspection-info-record/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
@ -32,10 +32,10 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="点检方案" prop="inspectionPlanId">
|
||||
<el-input v-model="queryParams.inspectionPlanId" placeholder="请输入点检方案id" clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="点检方案" prop="inspectionPlanId">-->
|
||||
<!-- <el-input v-model="queryParams.inspectionPlanId" placeholder="请输入点检方案id" clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
|
||||
<el-option v-for="dict in inspectionStatusList"
|
||||
@ -103,7 +103,7 @@
|
||||
|
||||
<!-- 点检树点检反馈 -->
|
||||
<el-dialog :title="inspectionFeedbackTitle" :visible.sync="inspectionFeedbackVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form ref="inspectionFeedbackRef" :model="inspectionFeedbackData" :rules="inspectionFeedbackRules" v-loading="inspectionFeedbackLoading" label-width="100px">
|
||||
<el-form ref="inspectionFeedbackRef" :model="inspectionFeedbackData" :rules="inspectionFeedbackRules" v-loading="inspectionFeedbackLoading" label-width="140px">
|
||||
<el-form-item label="点检方案:" prop="inspectionPlanId">
|
||||
<div
|
||||
v-for="(tree,index) in treeData"
|
||||
|
@ -0,0 +1,269 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="点检单号" prop="inspectionNo">
|
||||
<el-input v-model="queryParams.inspectionNo" placeholder="请输入点检单号" clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="机床设备" prop="equipId">
|
||||
<el-cascader
|
||||
v-model="cascaderValue"
|
||||
:options="equipCascader"
|
||||
:props="{ value: 'id',label: 'name',children: 'children'}"
|
||||
clearable
|
||||
@change="cascaderChange"></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="客户信息"
|
||||
prop="customerId"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.customerId"
|
||||
placeholder="请选择客户信息"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in customerSelection"
|
||||
:key="item.customerId"
|
||||
:label="item.customerName"
|
||||
:value="item.customerId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="点检方案" prop="inspectionPlanId">-->
|
||||
<!-- <el-input v-model="queryParams.inspectionPlanId" placeholder="请输入点检方案id" clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"-->
|
||||
<!-- v-hasPermi="['imt:inspection-info:create']">新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"-->
|
||||
<!-- v-hasPermi="['imt:inspection-info:export']">导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="点检单号" align="center" prop="inspectionNo"/>
|
||||
<el-table-column label="设备" align="center" prop="equipName"/>
|
||||
<el-table-column label="客户" align="center" prop="customerName"/>
|
||||
<el-table-column label="点检方案" align="center" prop="inspectionPlanName"/>
|
||||
<el-table-column label="定制化点检方案" align="center" prop="exclusiveInspection"/>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.INSPECTION_STATUS" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="details(scope.row.inspectionId)"
|
||||
v-hasPermi="['imt:inspection-info-record:query']">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form :model="formData" v-loading="formLoading" label-width="140px">
|
||||
<el-card class="box-card">
|
||||
<div slot="header"><span>基本信息</span></div>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="点检单号:" prop="inspectionNo">
|
||||
{{formData.inspectionNo}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户:" prop="customerName">
|
||||
{{formData.customerName}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备:" prop="equipName">
|
||||
{{formData.equipName}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注:" prop="remark">
|
||||
{{formData.remark}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-card>
|
||||
<el-card class="box-card" style="margin-top: 20px">
|
||||
<div slot="header"><span>点检反馈信息</span></div>
|
||||
<el-form-item label="点检方案:" prop="inspectionPlanId">
|
||||
<inspection-plan-feedback-tree ref="inspectionPlanFeedbackTree" :inspection-id="inspectionId" :inspection-plan-ids="inspectionPlanIds"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点检方案补充:" prop="inspectionPlanSupplement">
|
||||
{{ formData.inspectionPlanSupplement }}
|
||||
</el-form-item>
|
||||
<el-form-item label="定制化点检方案:" prop="exclusiveInspection">
|
||||
{{ formData.exclusiveInspection }}
|
||||
</el-form-item>
|
||||
<el-form-item label="定制化点检反馈:" prop="exclusiveInspectionFeedback">
|
||||
{{ formData.exclusiveInspectionFeedback }}
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as InspectionInfoRecordApi from '@/api/system/inspection/inspectionInfoRecord';
|
||||
import {getEquipCascader} from "@/api/system/equip/equipInfo";
|
||||
import {getCustomerSelection} from "@/api/system/baseData/customerInfo";
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import {VueOkrTree} from "@/components/VueOkrTree";
|
||||
import Vue from "vue";
|
||||
import inspectionPlanFeedbackTree from "@/views/system/inspectionPlan/inspectionPlanFeedbackTree.vue"
|
||||
|
||||
export default {
|
||||
name: "InspectionInfo",
|
||||
components: {
|
||||
VueOkrTree,
|
||||
inspectionPlanFeedbackTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData:{},
|
||||
formLoading:false,
|
||||
dialogTitle:null,
|
||||
dialogVisible:false,
|
||||
inspectionPlanIds:null,
|
||||
inspectionId:null,
|
||||
feedbackList:[],
|
||||
eventBus: new Vue(),
|
||||
treeData:[],
|
||||
props: {
|
||||
label: "inspectionName",
|
||||
},
|
||||
inspectionStatusList:[],
|
||||
customerSelection: [],
|
||||
cascaderValue:[],
|
||||
equipCascader: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 点检工单列表
|
||||
list: [],
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 选中行
|
||||
currentRow: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
inspectionNo: null,
|
||||
equipId: null,
|
||||
customerId: null,
|
||||
inspectionPlanId: null,
|
||||
status: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
eventBus: this.eventBus,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.initSelection();
|
||||
},
|
||||
methods: {
|
||||
objToList(obj) {
|
||||
return [obj];
|
||||
},
|
||||
initSelection(){
|
||||
getCustomerSelection().then((res) => {
|
||||
this.customerSelection = res;
|
||||
});
|
||||
getEquipCascader().then(res=>{
|
||||
res.forEach(item=>{
|
||||
if (item.children == null){
|
||||
item.disabled = true;
|
||||
}
|
||||
})
|
||||
this.equipCascader = res;
|
||||
})
|
||||
this.inspectionStatusList = getDictDatas(DICT_TYPE.INSPECTION_STATUS).filter(item => item.value !== "3");
|
||||
},
|
||||
cascaderChange(value){
|
||||
if (value.length > 0){
|
||||
this.queryParams.equipId = value[1];
|
||||
}else {
|
||||
this.queryParams.equipId = null;
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await InspectionInfoRecordApi.getInspectionInfoRecordPage(this.queryParams);
|
||||
this.list = res.data.list;
|
||||
this.total = res.data.total;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.cascaderValue = [];
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.equipId = null;
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 详情 */
|
||||
async details(id) {
|
||||
this.formLoading = true;
|
||||
this.dialogTitle = "工单详情";
|
||||
this.formData = {};
|
||||
this.dialogVisible = true;
|
||||
await InspectionInfoRecordApi.getInspectionRecordInfo(id).then(res=>{
|
||||
this.formData = res.data;
|
||||
this.inspectionId = res.data.inspectionId;
|
||||
this.inspectionPlanIds = res.data.inspectionPlanId.split(',')
|
||||
});
|
||||
await this.$refs.inspectionPlanFeedbackTree.initTree();
|
||||
this.formLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -69,7 +69,7 @@
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.MAINTENANCE_STATUS)"
|
||||
v-for="dict in maintenanceStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@ -465,7 +465,7 @@ import { getEquipCascader } from "@/api/system/equip/equipInfo";
|
||||
import { getComponentSelection } from "@/api/system/equip/componentInfo";
|
||||
import { getCustomerSelection } from "@/api/system/baseData/customerInfo";
|
||||
import RemoteMaintenanceOrderForm from "./RemoteMaintenanceOrderForm.vue";
|
||||
import { DICT_TYPE } from "@/utils/dict";
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import ApproveRecord from "@/views/bpm/processInstance/approveRecord.vue";
|
||||
import { getProcessDefinitionBpmnXML } from "@/api/bpm/definition";
|
||||
import { listSimpleUsers } from "@/api/system/user";
|
||||
@ -483,6 +483,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
maintenanceStatusList:[],
|
||||
submitApproveForm: {},
|
||||
startUserSelectAssignees: {},
|
||||
startUserSelectAssigneesFormRules: {},
|
||||
@ -626,6 +627,7 @@ export default {
|
||||
getCustomerSelection().then((res) => {
|
||||
this.customerSelection = res;
|
||||
});
|
||||
this.maintenanceStatusList = getDictDatas(DICT_TYPE.MAINTENANCE_STATUS).filter(item => item.value !== "5");
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
|
Loading…
Reference in New Issue
Block a user