From 21508c20a9b80b959d935bdf4ed55002fcff8d16 Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期二, 26 三月 2024 15:17:59 +0800 Subject: [PATCH] 设备计划修改 --- /dev/null | 152 -------------------------------------- jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue | 28 ++---- jcdm-ui/src/views/main/em/inspectionPlan/index.vue | 26 +++++- 3 files changed, 31 insertions(+), 175 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/controller/EmInspectionPlanInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/controller/EmInspectionPlanInfoController.java deleted file mode 100644 index 771c972..0000000 --- a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/controller/EmInspectionPlanInfoController.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.jcdm.main.em.inspectionPlanInfo.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.jcdm.common.annotation.Log; -import com.jcdm.common.core.controller.BaseController; -import com.jcdm.common.core.domain.AjaxResult; -import com.jcdm.common.enums.BusinessType; -import com.jcdm.main.em.inspectionPlanInfo.domain.EmInspectionPlanInfo; -import com.jcdm.main.em.inspectionPlanInfo.service.IEmInspectionPlanInfoService; -import com.jcdm.common.utils.poi.ExcelUtil; -import com.jcdm.common.core.page.TableDataInfo; - -/** - * 璁惧鐐规淇濆吇璁″垝Controller - * - * @author Yi - * @date 2024-03-19 - */ -@RestController -@RequestMapping("/em/inspectionPlanInfo") -public class EmInspectionPlanInfoController extends BaseController -{ - @Autowired - private IEmInspectionPlanInfoService emInspectionPlanInfoService; - - /** - * 鏌ヨ璁惧鐐规淇濆吇璁″垝鍒楄〃 - */ - @PreAuthorize("@ss.hasPermi('em:inspectionPlanInfo:list')") - @GetMapping("/list") - public TableDataInfo list(EmInspectionPlanInfo emInspectionPlanInfo) - { - startPage(); - List<EmInspectionPlanInfo> list = emInspectionPlanInfoService.selectEmInspectionPlanInfoList(emInspectionPlanInfo); - return getDataTable(list); - } - - /** - * 瀵煎嚭璁惧鐐规淇濆吇璁″垝鍒楄〃 - */ - @PreAuthorize("@ss.hasPermi('em:inspectionPlanInfo:export')") - @Log(title = "璁惧鐐规淇濆吇璁″垝", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, EmInspectionPlanInfo emInspectionPlanInfo) - { - List<EmInspectionPlanInfo> list = emInspectionPlanInfoService.selectEmInspectionPlanInfoList(emInspectionPlanInfo); - ExcelUtil<EmInspectionPlanInfo> util = new ExcelUtil<EmInspectionPlanInfo>(EmInspectionPlanInfo.class); - util.exportExcel(response, list, "璁惧鐐规淇濆吇璁″垝鏁版嵁"); - } - - /** - * 鑾峰彇璁惧鐐规淇濆吇璁″垝璇︾粏淇℃伅 - */ - @PreAuthorize("@ss.hasPermi('em:inspectionPlanInfo:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(emInspectionPlanInfoService.selectEmInspectionPlanInfoById(id)); - } - - /** - * 鏂板璁惧鐐规淇濆吇璁″垝 - */ - @PreAuthorize("@ss.hasPermi('em:inspectionPlanInfo:add')") - @Log(title = "璁惧鐐规淇濆吇璁″垝", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody EmInspectionPlanInfo emInspectionPlanInfo) - { - return toAjax(emInspectionPlanInfoService.insertEmInspectionPlanInfo(emInspectionPlanInfo)); - } - - /** - * 淇敼璁惧鐐规淇濆吇璁″垝 - */ - @PreAuthorize("@ss.hasPermi('em:inspectionPlanInfo:edit')") - @Log(title = "璁惧鐐规淇濆吇璁″垝", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody EmInspectionPlanInfo emInspectionPlanInfo) - { - return toAjax(emInspectionPlanInfoService.updateEmInspectionPlanInfo(emInspectionPlanInfo)); - } - - /** - * 鍒犻櫎璁惧鐐规淇濆吇璁″垝 - */ - @PreAuthorize("@ss.hasPermi('em:inspectionPlanInfo:remove')") - @Log(title = "璁惧鐐规淇濆吇璁″垝", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(emInspectionPlanInfoService.deleteEmInspectionPlanInfoByIds(ids)); - } -} diff --git a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/domain/EmInspectionPlanInfo.java b/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/domain/EmInspectionPlanInfo.java deleted file mode 100644 index 75320bb..0000000 --- a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/domain/EmInspectionPlanInfo.java +++ /dev/null @@ -1,417 +0,0 @@ -package com.jcdm.main.em.inspectionPlanInfo.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.jcdm.common.annotation.Excel; -import com.jcdm.common.core.domain.BaseEntity; - -/** - * 璁惧鐐规淇濆吇璁″垝瀵硅薄 em_inspection_plan_info - * - * @author Yi - * @date 2024-03-19 - */ -public class EmInspectionPlanInfo extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** ID */ - private Long id; - - /** 璁″垝缂栧彿 */ - @Excel(name = "璁″垝缂栧彿") - private String planCode; - - /** 璁″垝鍚嶇О */ - @Excel(name = "璁″垝鍚嶇О") - private String planName; - - /** 璁″垝绫诲瀷 */ - @Excel(name = "璁″垝绫诲瀷") - private String planType; - - /** 鐘舵�� */ - @Excel(name = "鐘舵��") - private String state; - - /** 棰戠巼 */ - @Excel(name = "棰戠巼") - private String frequency; - - /** 缁村害 */ - @Excel(name = "缁村害") - private String dimension; - - /** 涓婃鐢熸垚鏃堕棿 */ - @Excel(name = "涓婃鐢熸垚鏃堕棿") - private String lastGenerationTime; - - /** 寮�濮嬫椂闂� */ - @Excel(name = "寮�濮嬫椂闂�") - private String startTime; - - /** 缁撴潫鏃堕棿 */ - @Excel(name = "缁撴潫鏃堕棿") - private String endTime; - - /** 璁惧娓呭崟 */ - @Excel(name = "璁惧娓呭崟") - private String devices; - - /** 鐐规椤圭洰 */ - @Excel(name = "鐐规椤圭洰") - private String inspectionItems; - - /** 澶囨敞 */ - @Excel(name = "澶囨敞") - private String remarks; - - /** 鍒涘缓浜� */ - @Excel(name = "鍒涘缓浜�") - private String createUser; - - /** 淇敼浜� */ - @Excel(name = "淇敼浜�") - private String updateUser; - - /** 棰勭暀瀛楁1 */ - @Excel(name = "棰勭暀瀛楁1") - private String spareField1; - - /** 棰勭暀瀛楁2 */ - @Excel(name = "棰勭暀瀛楁2") - private String spareField2; - - /** 棰勭暀瀛楁3 */ - @Excel(name = "棰勭暀瀛楁3") - private String spareField3; - - /** 棰勭暀瀛楁4 */ - @Excel(name = "棰勭暀瀛楁4") - private String spareField4; - - /** 璁惧缂栫爜 */ - @Excel(name = "璁惧缂栫爜") - private String equipmentCode; - - /** 璁惧鍚嶇О */ - @Excel(name = "璁惧鍚嶇О") - private String equipmentName; - - /** 鍝佺墝 */ - @Excel(name = "鍝佺墝") - private String equipmentBrand; - - /** 瑙勬牸鍨嬪彿 */ - @Excel(name = "瑙勬牸鍨嬪彿") - private String equipmentSpec; - - /** 椤圭洰缂栧彿 */ - @Excel(name = "椤圭洰缂栧彿") - private String itemsCode; - - /** 椤圭洰鍚嶇О */ - @Excel(name = "椤圭洰鍚嶇О") - private String itemsName; - - /** 椤圭洰绫诲瀷 */ - @Excel(name = "椤圭洰绫诲瀷") - private String itemsType; - - /** 鏍囧噯 */ - @Excel(name = "鏍囧噯") - private String standard; - - /** 椤圭洰鍐呭 */ - @Excel(name = "椤圭洰鍐呭") - private String itemsContent; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setPlanCode(String planCode) - { - this.planCode = planCode; - } - - public String getPlanCode() - { - return planCode; - } - public void setPlanName(String planName) - { - this.planName = planName; - } - - public String getPlanName() - { - return planName; - } - public void setPlanType(String planType) - { - this.planType = planType; - } - - public String getPlanType() - { - return planType; - } - public void setState(String state) - { - this.state = state; - } - - public String getState() - { - return state; - } - public void setFrequency(String frequency) - { - this.frequency = frequency; - } - - public String getFrequency() - { - return frequency; - } - public void setDimension(String dimension) - { - this.dimension = dimension; - } - - public String getDimension() - { - return dimension; - } - public void setLastGenerationTime(String lastGenerationTime) - { - this.lastGenerationTime = lastGenerationTime; - } - - public String getLastGenerationTime() - { - return lastGenerationTime; - } - public void setStartTime(String startTime) - { - this.startTime = startTime; - } - - public String getStartTime() - { - return startTime; - } - public void setEndTime(String endTime) - { - this.endTime = endTime; - } - - public String getEndTime() - { - return endTime; - } - public void setDevices(String devices) - { - this.devices = devices; - } - - public String getDevices() - { - return devices; - } - public void setInspectionItems(String inspectionItems) - { - this.inspectionItems = inspectionItems; - } - - public String getInspectionItems() - { - return inspectionItems; - } - public void setRemarks(String remarks) - { - this.remarks = remarks; - } - - public String getRemarks() - { - return remarks; - } - public void setCreateUser(String createUser) - { - this.createUser = createUser; - } - - public String getCreateUser() - { - return createUser; - } - public void setUpdateUser(String updateUser) - { - this.updateUser = updateUser; - } - - public String getUpdateUser() - { - return updateUser; - } - public void setSpareField1(String spareField1) - { - this.spareField1 = spareField1; - } - - public String getSpareField1() - { - return spareField1; - } - public void setSpareField2(String spareField2) - { - this.spareField2 = spareField2; - } - - public String getSpareField2() - { - return spareField2; - } - public void setSpareField3(String spareField3) - { - this.spareField3 = spareField3; - } - - public String getSpareField3() - { - return spareField3; - } - public void setSpareField4(String spareField4) - { - this.spareField4 = spareField4; - } - - public String getSpareField4() - { - return spareField4; - } - public void setEquipmentCode(String equipmentCode) - { - this.equipmentCode = equipmentCode; - } - - public String getEquipmentCode() - { - return equipmentCode; - } - public void setEquipmentName(String equipmentName) - { - this.equipmentName = equipmentName; - } - - public String getEquipmentName() - { - return equipmentName; - } - public void setEquipmentBrand(String equipmentBrand) - { - this.equipmentBrand = equipmentBrand; - } - - public String getEquipmentBrand() - { - return equipmentBrand; - } - public void setEquipmentSpec(String equipmentSpec) - { - this.equipmentSpec = equipmentSpec; - } - - public String getEquipmentSpec() - { - return equipmentSpec; - } - public void setItemsCode(String itemsCode) - { - this.itemsCode = itemsCode; - } - - public String getItemsCode() - { - return itemsCode; - } - public void setItemsName(String itemsName) - { - this.itemsName = itemsName; - } - - public String getItemsName() - { - return itemsName; - } - public void setItemsType(String itemsType) - { - this.itemsType = itemsType; - } - - public String getItemsType() - { - return itemsType; - } - public void setStandard(String standard) - { - this.standard = standard; - } - - public String getStandard() - { - return standard; - } - public void setItemsContent(String itemsContent) - { - this.itemsContent = itemsContent; - } - - public String getItemsContent() - { - return itemsContent; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("planCode", getPlanCode()) - .append("planName", getPlanName()) - .append("planType", getPlanType()) - .append("state", getState()) - .append("frequency", getFrequency()) - .append("dimension", getDimension()) - .append("lastGenerationTime", getLastGenerationTime()) - .append("startTime", getStartTime()) - .append("endTime", getEndTime()) - .append("devices", getDevices()) - .append("inspectionItems", getInspectionItems()) - .append("remarks", getRemarks()) - .append("createTime", getCreateTime()) - .append("createUser", getCreateUser()) - .append("updateTime", getUpdateTime()) - .append("updateUser", getUpdateUser()) - .append("spareField1", getSpareField1()) - .append("spareField2", getSpareField2()) - .append("spareField3", getSpareField3()) - .append("spareField4", getSpareField4()) - .append("equipmentCode", getEquipmentCode()) - .append("equipmentName", getEquipmentName()) - .append("equipmentBrand", getEquipmentBrand()) - .append("equipmentSpec", getEquipmentSpec()) - .append("itemsCode", getItemsCode()) - .append("itemsName", getItemsName()) - .append("itemsType", getItemsType()) - .append("standard", getStandard()) - .append("itemsContent", getItemsContent()) - .toString(); - } -} diff --git a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/mapper/EmInspectionPlanInfoMapper.java b/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/mapper/EmInspectionPlanInfoMapper.java deleted file mode 100644 index b835950..0000000 --- a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/mapper/EmInspectionPlanInfoMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.jcdm.main.em.inspectionPlanInfo.mapper; - -import java.util.List; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.jcdm.main.em.inspectionPlanInfo.domain.EmInspectionPlanInfo; - -/** - * 璁惧鐐规淇濆吇璁″垝Mapper鎺ュ彛 - * - * @author Yi - * @date 2024-03-19 - */ -public interface EmInspectionPlanInfoMapper extends BaseMapper<EmInspectionPlanInfo> -{ - /** - * 鏌ヨ璁惧鐐规淇濆吇璁″垝 - * - * @param id 璁惧鐐规淇濆吇璁″垝涓婚敭 - * @return 璁惧鐐规淇濆吇璁″垝 - */ - public EmInspectionPlanInfo selectEmInspectionPlanInfoById(Long id); - - /** - * 鏌ヨ璁惧鐐规淇濆吇璁″垝鍒楄〃 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 璁惧鐐规淇濆吇璁″垝闆嗗悎 - */ - public List<EmInspectionPlanInfo> selectEmInspectionPlanInfoList(EmInspectionPlanInfo emInspectionPlanInfo); - - /** - * 鏂板璁惧鐐规淇濆吇璁″垝 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 缁撴灉 - */ - public int insertEmInspectionPlanInfo(EmInspectionPlanInfo emInspectionPlanInfo); - - /** - * 淇敼璁惧鐐规淇濆吇璁″垝 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 缁撴灉 - */ - public int updateEmInspectionPlanInfo(EmInspectionPlanInfo emInspectionPlanInfo); - - /** - * 鍒犻櫎璁惧鐐规淇濆吇璁″垝 - * - * @param id 璁惧鐐规淇濆吇璁″垝涓婚敭 - * @return 缁撴灉 - */ - public int deleteEmInspectionPlanInfoById(Long id); - - /** - * 鎵归噺鍒犻櫎璁惧鐐规淇濆吇璁″垝 - * - * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 - * @return 缁撴灉 - */ - public int deleteEmInspectionPlanInfoByIds(Long[] ids); -} diff --git a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/service/IEmInspectionPlanInfoService.java b/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/service/IEmInspectionPlanInfoService.java deleted file mode 100644 index c6bf474..0000000 --- a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/service/IEmInspectionPlanInfoService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.jcdm.main.em.inspectionPlanInfo.service; - -import java.util.List; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.jcdm.main.em.inspectionPlanInfo.domain.EmInspectionPlanInfo; - -/** - * 璁惧鐐规淇濆吇璁″垝Service鎺ュ彛 - * - * @author Yi - * @date 2024-03-19 - */ -public interface IEmInspectionPlanInfoService extends IService<EmInspectionPlanInfo> -{ - /** - * 鏌ヨ璁惧鐐规淇濆吇璁″垝 - * - * @param id 璁惧鐐规淇濆吇璁″垝涓婚敭 - * @return 璁惧鐐规淇濆吇璁″垝 - */ - public EmInspectionPlanInfo selectEmInspectionPlanInfoById(Long id); - - /** - * 鏌ヨ璁惧鐐规淇濆吇璁″垝鍒楄〃 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 璁惧鐐规淇濆吇璁″垝闆嗗悎 - */ - public List<EmInspectionPlanInfo> selectEmInspectionPlanInfoList(EmInspectionPlanInfo emInspectionPlanInfo); - - /** - * 鏂板璁惧鐐规淇濆吇璁″垝 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 缁撴灉 - */ - public int insertEmInspectionPlanInfo(EmInspectionPlanInfo emInspectionPlanInfo); - - /** - * 淇敼璁惧鐐规淇濆吇璁″垝 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 缁撴灉 - */ - public int updateEmInspectionPlanInfo(EmInspectionPlanInfo emInspectionPlanInfo); - - /** - * 鎵归噺鍒犻櫎璁惧鐐规淇濆吇璁″垝 - * - * @param ids 闇�瑕佸垹闄ょ殑璁惧鐐规淇濆吇璁″垝涓婚敭闆嗗悎 - * @return 缁撴灉 - */ - public int deleteEmInspectionPlanInfoByIds(Long[] ids); - - /** - * 鍒犻櫎璁惧鐐规淇濆吇璁″垝淇℃伅 - * - * @param id 璁惧鐐规淇濆吇璁″垝涓婚敭 - * @return 缁撴灉 - */ - public int deleteEmInspectionPlanInfoById(Long id); -} diff --git a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/service/impl/EmInspectionPlanInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/service/impl/EmInspectionPlanInfoServiceImpl.java deleted file mode 100644 index 66a06fe..0000000 --- a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanInfo/service/impl/EmInspectionPlanInfoServiceImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.jcdm.main.em.inspectionPlanInfo.service.impl; - -import java.util.List; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.jcdm.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.jcdm.main.em.inspectionPlanInfo.mapper.EmInspectionPlanInfoMapper; -import com.jcdm.main.em.inspectionPlanInfo.domain.EmInspectionPlanInfo; -import com.jcdm.main.em.inspectionPlanInfo.service.IEmInspectionPlanInfoService; - -/** - * 璁惧鐐规淇濆吇璁″垝Service涓氬姟灞傚鐞� - * - * @author Yi - * @date 2024-03-19 - */ -@Service -public class EmInspectionPlanInfoServiceImpl extends ServiceImpl<EmInspectionPlanInfoMapper,EmInspectionPlanInfo> implements IEmInspectionPlanInfoService -{ - @Autowired - private EmInspectionPlanInfoMapper emInspectionPlanInfoMapper; - - /** - * 鏌ヨ璁惧鐐规淇濆吇璁″垝 - * - * @param id 璁惧鐐规淇濆吇璁″垝涓婚敭 - * @return 璁惧鐐规淇濆吇璁″垝 - */ - @Override - public EmInspectionPlanInfo selectEmInspectionPlanInfoById(Long id) - { - return emInspectionPlanInfoMapper.selectEmInspectionPlanInfoById(id); - } - - /** - * 鏌ヨ璁惧鐐规淇濆吇璁″垝鍒楄〃 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 璁惧鐐规淇濆吇璁″垝 - */ - @Override - public List<EmInspectionPlanInfo> selectEmInspectionPlanInfoList(EmInspectionPlanInfo emInspectionPlanInfo) - { - return emInspectionPlanInfoMapper.selectEmInspectionPlanInfoList(emInspectionPlanInfo); - } - - /** - * 鏂板璁惧鐐规淇濆吇璁″垝 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 缁撴灉 - */ - @Override - public int insertEmInspectionPlanInfo(EmInspectionPlanInfo emInspectionPlanInfo) - { - emInspectionPlanInfo.setCreateTime(DateUtils.getNowDate()); - return emInspectionPlanInfoMapper.insertEmInspectionPlanInfo(emInspectionPlanInfo); - } - - /** - * 淇敼璁惧鐐规淇濆吇璁″垝 - * - * @param emInspectionPlanInfo 璁惧鐐规淇濆吇璁″垝 - * @return 缁撴灉 - */ - @Override - public int updateEmInspectionPlanInfo(EmInspectionPlanInfo emInspectionPlanInfo) - { - emInspectionPlanInfo.setUpdateTime(DateUtils.getNowDate()); - return emInspectionPlanInfoMapper.updateEmInspectionPlanInfo(emInspectionPlanInfo); - } - - /** - * 鎵归噺鍒犻櫎璁惧鐐规淇濆吇璁″垝 - * - * @param ids 闇�瑕佸垹闄ょ殑璁惧鐐规淇濆吇璁″垝涓婚敭 - * @return 缁撴灉 - */ - @Override - public int deleteEmInspectionPlanInfoByIds(Long[] ids) - { - return emInspectionPlanInfoMapper.deleteEmInspectionPlanInfoByIds(ids); - } - - /** - * 鍒犻櫎璁惧鐐规淇濆吇璁″垝淇℃伅 - * - * @param id 璁惧鐐规淇濆吇璁″垝涓婚敭 - * @return 缁撴灉 - */ - @Override - public int deleteEmInspectionPlanInfoById(Long id) - { - return emInspectionPlanInfoMapper.deleteEmInspectionPlanInfoById(id); - } -} diff --git a/jcdm-main/src/main/resources/mapper/em/inspectionPlanInfo/EmInspectionPlanInfoMapper.xml b/jcdm-main/src/main/resources/mapper/em/inspectionPlanInfo/EmInspectionPlanInfoMapper.xml deleted file mode 100644 index c781d5f..0000000 --- a/jcdm-main/src/main/resources/mapper/em/inspectionPlanInfo/EmInspectionPlanInfoMapper.xml +++ /dev/null @@ -1,194 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.jcdm.main.em.inspectionPlanInfo.mapper.EmInspectionPlanInfoMapper"> - - <resultMap type="EmInspectionPlanInfo" id="EmInspectionPlanInfoResult"> - <result property="id" column="id" /> - <result property="planCode" column="plan_code" /> - <result property="planName" column="plan_name" /> - <result property="planType" column="plan_type" /> - <result property="state" column="state" /> - <result property="frequency" column="frequency" /> - <result property="dimension" column="dimension" /> - <result property="lastGenerationTime" column="last_generation_time" /> - <result property="startTime" column="start_time" /> - <result property="endTime" column="end_time" /> - <result property="devices" column="devices" /> - <result property="inspectionItems" column="Inspection_items" /> - <result property="remarks" column="remarks" /> - <result property="createTime" column="create_time" /> - <result property="createUser" column="create_user" /> - <result property="updateTime" column="update_time" /> - <result property="updateUser" column="update_user" /> - <result property="spareField1" column="spare_field_1" /> - <result property="spareField2" column="spare_field_2" /> - <result property="spareField3" column="spare_field_3" /> - <result property="spareField4" column="spare_field_4" /> - <result property="equipmentCode" column="equipment_code" /> - <result property="equipmentName" column="equipment_name" /> - <result property="equipmentBrand" column="equipment_brand" /> - <result property="equipmentSpec" column="equipment_spec" /> - <result property="itemsCode" column="items_code" /> - <result property="itemsName" column="items_name" /> - <result property="itemsType" column="items_type" /> - <result property="standard" column="standard" /> - <result property="itemsContent" column="items_content" /> - </resultMap> - - <sql id="selectEmInspectionPlanInfoVo"> - select id, plan_code, plan_name, plan_type, state, frequency, dimension, last_generation_time, start_time, end_time, devices, Inspection_items, remarks, create_time, create_user, update_time, update_user, spare_field_1, spare_field_2, spare_field_3, spare_field_4, equipment_code, equipment_name, equipment_brand, equipment_spec, items_code, items_name, items_type, standard, items_content from em_inspection_plan_info - </sql> - - <select id="selectEmInspectionPlanInfoList" parameterType="EmInspectionPlanInfo" resultMap="EmInspectionPlanInfoResult"> - <include refid="selectEmInspectionPlanInfoVo"/> - <where> - <if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if> - <if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if> - <if test="planType != null and planType != ''"> and plan_type = #{planType}</if> - <if test="state != null and state != ''"> and state = #{state}</if> - <if test="frequency != null and frequency != ''"> and frequency = #{frequency}</if> - <if test="dimension != null and dimension != ''"> and dimension = #{dimension}</if> - <if test="lastGenerationTime != null and lastGenerationTime != ''"> and last_generation_time = #{lastGenerationTime}</if> - <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if> - <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if> - <if test="devices != null and devices != ''"> and devices = #{devices}</if> - <if test="inspectionItems != null and inspectionItems != ''"> and Inspection_items = #{inspectionItems}</if> - <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> - <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> - <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> - <if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if> - <if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if> - <if test="spareField3 != null and spareField3 != ''"> and spare_field_3 = #{spareField3}</if> - <if test="spareField4 != null and spareField4 != ''"> and spare_field_4 = #{spareField4}</if> - <if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if> - <if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if> - <if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if> - <if test="equipmentSpec != null and equipmentSpec != ''"> and equipment_spec = #{equipmentSpec}</if> - <if test="itemsCode != null and itemsCode != ''"> and items_code = #{itemsCode}</if> - <if test="itemsName != null and itemsName != ''"> and items_name like concat('%', #{itemsName}, '%')</if> - <if test="itemsType != null and itemsType != ''"> and items_type = #{itemsType}</if> - <if test="standard != null and standard != ''"> and standard = #{standard}</if> - <if test="itemsContent != null and itemsContent != ''"> and items_content = #{itemsContent}</if> - </where> - </select> - - <select id="selectEmInspectionPlanInfoById" parameterType="Long" resultMap="EmInspectionPlanInfoResult"> - <include refid="selectEmInspectionPlanInfoVo"/> - where id = #{id} - </select> - - <insert id="insertEmInspectionPlanInfo" parameterType="EmInspectionPlanInfo" useGeneratedKeys="true" keyProperty="id"> - insert into em_inspection_plan_info - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="planCode != null">plan_code,</if> - <if test="planName != null">plan_name,</if> - <if test="planType != null">plan_type,</if> - <if test="state != null">state,</if> - <if test="frequency != null">frequency,</if> - <if test="dimension != null">dimension,</if> - <if test="lastGenerationTime != null">last_generation_time,</if> - <if test="startTime != null">start_time,</if> - <if test="endTime != null">end_time,</if> - <if test="devices != null">devices,</if> - <if test="inspectionItems != null">Inspection_items,</if> - <if test="remarks != null">remarks,</if> - <if test="createTime != null">create_time,</if> - <if test="createUser != null">create_user,</if> - <if test="updateTime != null">update_time,</if> - <if test="updateUser != null">update_user,</if> - <if test="spareField1 != null">spare_field_1,</if> - <if test="spareField2 != null">spare_field_2,</if> - <if test="spareField3 != null">spare_field_3,</if> - <if test="spareField4 != null">spare_field_4,</if> - <if test="equipmentCode != null">equipment_code,</if> - <if test="equipmentName != null">equipment_name,</if> - <if test="equipmentBrand != null">equipment_brand,</if> - <if test="equipmentSpec != null">equipment_spec,</if> - <if test="itemsCode != null">items_code,</if> - <if test="itemsName != null">items_name,</if> - <if test="itemsType != null">items_type,</if> - <if test="standard != null">standard,</if> - <if test="itemsContent != null">items_content,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="planCode != null">#{planCode},</if> - <if test="planName != null">#{planName},</if> - <if test="planType != null">#{planType},</if> - <if test="state != null">#{state},</if> - <if test="frequency != null">#{frequency},</if> - <if test="dimension != null">#{dimension},</if> - <if test="lastGenerationTime != null">#{lastGenerationTime},</if> - <if test="startTime != null">#{startTime},</if> - <if test="endTime != null">#{endTime},</if> - <if test="devices != null">#{devices},</if> - <if test="inspectionItems != null">#{inspectionItems},</if> - <if test="remarks != null">#{remarks},</if> - <if test="createTime != null">#{createTime},</if> - <if test="createUser != null">#{createUser},</if> - <if test="updateTime != null">#{updateTime},</if> - <if test="updateUser != null">#{updateUser},</if> - <if test="spareField1 != null">#{spareField1},</if> - <if test="spareField2 != null">#{spareField2},</if> - <if test="spareField3 != null">#{spareField3},</if> - <if test="spareField4 != null">#{spareField4},</if> - <if test="equipmentCode != null">#{equipmentCode},</if> - <if test="equipmentName != null">#{equipmentName},</if> - <if test="equipmentBrand != null">#{equipmentBrand},</if> - <if test="equipmentSpec != null">#{equipmentSpec},</if> - <if test="itemsCode != null">#{itemsCode},</if> - <if test="itemsName != null">#{itemsName},</if> - <if test="itemsType != null">#{itemsType},</if> - <if test="standard != null">#{standard},</if> - <if test="itemsContent != null">#{itemsContent},</if> - </trim> - </insert> - - <update id="updateEmInspectionPlanInfo" parameterType="EmInspectionPlanInfo"> - update em_inspection_plan_info - <trim prefix="SET" suffixOverrides=","> - <if test="planCode != null">plan_code = #{planCode},</if> - <if test="planName != null">plan_name = #{planName},</if> - <if test="planType != null">plan_type = #{planType},</if> - <if test="state != null">state = #{state},</if> - <if test="frequency != null">frequency = #{frequency},</if> - <if test="dimension != null">dimension = #{dimension},</if> - <if test="lastGenerationTime != null">last_generation_time = #{lastGenerationTime},</if> - <if test="startTime != null">start_time = #{startTime},</if> - <if test="endTime != null">end_time = #{endTime},</if> - <if test="devices != null">devices = #{devices},</if> - <if test="inspectionItems != null">Inspection_items = #{inspectionItems},</if> - <if test="remarks != null">remarks = #{remarks},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="createUser != null">create_user = #{createUser},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - <if test="updateUser != null">update_user = #{updateUser},</if> - <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> - <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> - <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> - <if test="spareField4 != null">spare_field_4 = #{spareField4},</if> - <if test="equipmentCode != null">equipment_code = #{equipmentCode},</if> - <if test="equipmentName != null">equipment_name = #{equipmentName},</if> - <if test="equipmentBrand != null">equipment_brand = #{equipmentBrand},</if> - <if test="equipmentSpec != null">equipment_spec = #{equipmentSpec},</if> - <if test="itemsCode != null">items_code = #{itemsCode},</if> - <if test="itemsName != null">items_name = #{itemsName},</if> - <if test="itemsType != null">items_type = #{itemsType},</if> - <if test="standard != null">standard = #{standard},</if> - <if test="itemsContent != null">items_content = #{itemsContent},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteEmInspectionPlanInfoById" parameterType="Long"> - delete from em_inspection_plan_info where id = #{id} - </delete> - - <delete id="deleteEmInspectionPlanInfoByIds" parameterType="String"> - delete from em_inspection_plan_info where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> -</mapper> \ No newline at end of file diff --git a/jcdm-ui/src/views/main/em/inspectionPlan/index.vue b/jcdm-ui/src/views/main/em/inspectionPlan/index.vue index e601391..47d0e5f 100644 --- a/jcdm-ui/src/views/main/em/inspectionPlan/index.vue +++ b/jcdm-ui/src/views/main/em/inspectionPlan/index.vue @@ -214,10 +214,10 @@ </el-form> <el-tabs type="border-card" > <el-tab-pane label="璁惧娓呭崟" > - <Checkmachinery ref="machinerylist" @inSelected="onMachineryAdd"></Checkmachinery> + <Checkmachinery ref="machinerylist" :id="form.id" :planCode="form.planCode" @inSelected="onMachineryAdd" ></Checkmachinery> </el-tab-pane> <el-tab-pane label="鐐规椤圭洰"> - <Checksubject ref="subjectlist" @subSelected="subMachineryAdd"></Checksubject> + <Checksubject ref="subjectlist" :id="form.id" @subSelected="subMachineryAdd"></Checksubject> </el-tab-pane> </el-tabs> <el-divider></el-divider> @@ -238,6 +238,7 @@ name: "InspectionPlan", dicts: ['plan_status','plan_type','dimension'], components:{Checkmachinery,Checksubject}, + data() { return { // 閬僵灞� @@ -246,6 +247,7 @@ optType: null, // 閫変腑鏁扮粍 ids: [], + planCodes: [], // 闈炲崟涓鐢� single: true, // 闈炲涓鐢� @@ -345,7 +347,16 @@ this.getList(); }, methods: { - /** 鏌ヨ鐐规淇濆吇璁″垝鍒楄〃 */ + clearCheckmachineryList(){ + this.$refs.machinerylist.clearCheckmachineryList() + }, + clearSubjectList() { + this.subjectList = []; + }, + clearMachineryList(){ + this.machineryList =[]; + }, + /** 鏌ヨ鐐规淇濆吇璁″垝鍒楄〃 */ getList() { this.loading = true; listInspectionPlan(this.queryParams).then(response => { @@ -358,6 +369,7 @@ cancel() { this.open = false; this.reset(); + this.clearCheckmachineryList() }, // 琛ㄥ崟閲嶇疆 reset() { @@ -406,18 +418,22 @@ resetQuery() { this.resetForm("queryForm"); this.handleQuery(); + }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) + this.planCode =selection.map(item => item.planCode) this.single = selection.length!==1 this.multiple = !selection.length + console.log(this.planCode) }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { this.reset(); this.open = true; this.titleName = "娣诲姞鐐规淇濆吇璁″垝"; + console.log(this.machineryList) }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { @@ -464,7 +480,9 @@ } } }); - + this.clearSubjectList(); + this.clearMachineryList(); + this.clearCheckmachineryList() }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { diff --git a/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue b/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue index ca066eb..9a006b4 100644 --- a/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue +++ b/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue @@ -47,10 +47,10 @@ export default { name: "Checkmachinery", components:{MachinerySelect}, - props:{ - planId: null, - optType: null - }, + props:{ id: null, + optType: null, + planCode: null, + }, data() { return { // 閬僵灞� @@ -91,7 +91,9 @@ this.getList(); }, methods: { - + clearCheckmachineryList() { + this.checkmachineryList = []; + }, deleteSelectedColumns(row) { const index = this.checkmachineryList.findIndex(item => item.id === row.id); if (index !== -1) { @@ -108,29 +110,17 @@ /** 鏌ヨ鐐规璁惧鍒楄〃 */ getList() { this.loading = true; + this.checkmachineryList =this.machineryList; listInspectionPlanArchives(this.queryParams).then(response => { // this.checkmachineryList = response.rows; this.total = response.total; this.loading = false; }); }, - - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { + handleAdd(){ this.$refs.machinerySelect.showFlag = true; }, - //璁惧璧勬簮閫夋嫨鍥炶皟 - // onMachineryAdd(rows){ - // if(rows !=null && rows.length >0){ - // rows.forEach(row => { - // row.planId = this.planId; - // addInspectionPlanArchives(row).then(response =>{ - // this.getList(); - // }); - // }); - // } - // }, onMachineryAdd(selectedRows){ if(selectedRows !=null && selectedRows.length >0){ this.checkmachineryList = selectedRows diff --git a/jcdm-ui/src/views/main/em/inspectionPlanInfo/index.vue b/jcdm-ui/src/views/main/em/inspectionPlanInfo/index.vue deleted file mode 100644 index ee39005..0000000 --- a/jcdm-ui/src/views/main/em/inspectionPlanInfo/index.vue +++ /dev/null @@ -1,519 +0,0 @@ -<template> - <div class="app-container"> - <el-card class="box-card"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="璁″垝缂栧彿" prop="planCode"> - <el-input - v-model="queryParams.planCode" - placeholder="璇疯緭鍏ヨ鍒掔紪鍙�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="璁″垝鍚嶇О" prop="planName"> - <el-input - v-model="queryParams.planName" - placeholder="璇疯緭鍏ヨ鍒掑悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨鐘舵��" clearable> - <el-option - v-for="dict in dict.type.plan_status" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> - <el-form-item label-width="130" label="寮�濮嬫椂闂�" prop="startTime"> - <el-date-picker - v-model="queryParams.startTime" - type="datetimerange" - value-format="yyyy-MM-dd HH:mm:ss" - range-separator="鑷�" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - align="right"> - </el-date-picker> - </el-form-item> - <el-form-item style="float: right"> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - </el-card> - - <el-card style="margin-top: 10px" class="box-card"> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['em:inspectionPlan:add']" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['em:inspectionPlan:edit']" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - v-hasPermi="['em:inspectionPlan:remove']" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['em:inspectionPlan:export']" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table border v-loading="loading" :data="inspectionPlanInfoList" @selection-change="handleSelectionChange" > - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="璁″垝鍚嶇О" align="center" prop="planName"> - </el-table-column> - <el-table-column label="璁″垝缂栧彿" align="center" prop="planCode"> - </el-table-column> - <el-table-column label="璁″垝绫诲瀷" align="center" prop="planType"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.plan_type" :value="scope.row.planType"/> - </template> - </el-table-column> - <el-table-column label="棰戠巼" align="center" prop="frequency"> - </el-table-column> - <el-table-column label="缁村害" align="center" prop="dimension"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.dimension" :value="scope.row.dimension"/> - </template> - </el-table-column> - <el-table-column label="寮�濮嬫椂闂�" align="center" prop="startTime"> - </el-table-column> - <el-table-column label="缁撴潫鏃堕棿" align="center" prop="endTime"> - </el-table-column> - <el-table-column label="鐘舵��" align="center" prop="state"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.plan_status" :value="scope.row.state"/> - </template> - </el-table-column> - <el-table-column label="涓婃鐢熸垚鏃堕棿" align="center" prop="lastGenerationTime"> - </el-table-column> - <el-table-column label="澶囨敞" align="center" prop="remarks"> - </el-table-column> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime"> - </el-table-column> - <el-table-column label="鍒涘缓浜�" align="center" prop="createUser"> - </el-table-column> - <el-table-column label="淇敼鏃堕棿" align="center" prop="updateTime"> - </el-table-column> - <el-table-column label="淇敼浜�" align="center" prop="updateUser"> - </el-table-column> - </el-table> - </el-card> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - - <!-- 娣诲姞鎴栦慨鏀圭偣妫�淇濆吇璁″垝瀵硅瘽妗� --> - <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="1200px" append-to-body> - <span slot="title"> - <i class="el-icon-s-order"></i> - {{titleName}} - </span> - <el-form ref="form" inline :model="form" :rules="rules" label-width="80px" > - <el-form-item label="璁″垝鍚嶇О" prop="planName" > - <el-input style="width: 450px" v-model="form.planName" placeholder="璇疯緭鍏ヨ鍒掑悕绉�" /> - </el-form-item> - <el-form-item label="璁″垝缂栧彿" prop="planCode"> - <el-input style="width: 450px" v-model="form.planCode" placeholder="璇疯緭鍏ヨ鍒掔紪鍙�" /> - </el-form-item> - <el-form-item label="鐘舵��" prop="state"> - <el-radio-group style="width: 450px" v-model="form.status"> - <el-radio - v-for="dict in dict.type.plan_status" - :key="dict.value" - :label="dict.value" - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> - <el-form-item label="璁″垝绫诲瀷" prop="state"> - <el-radio-group style="width: 450px" v-model="form.planType"> - <el-radio - v-for="dict in dict.type.plan_type" - :key="dict.value" - :label="dict.value" - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> - <el-form-item label="棰戠巼" prop="frequency"> - <el-input style="width: 450px" v-model="form.frequency" placeholder="璇疯緭鍏ラ鐜�" /> - </el-form-item> - <el-form-item label="缁村害" prop="dimension"> - <el-select v-model="form.dimension" placeholder="璇烽�夋嫨缁村害" style="width: 450px"> - <el-option - v-for="dict in dict.type.dimension" - :key="dict.value" - :label="dict.label" - :value="dict.value"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="寮�濮嬫椂闂�" prop="startTime"> - <el-date-picker - style="width: 450px" - clearable - v-model="form.startTime" - type="date" - value-format="yyyy-MM-dd" - placeholder="璇烽�夋嫨鍑虹珯鏃堕棿"> - </el-date-picker> - </el-form-item> - <el-form-item label="缁撴潫鏃堕棿" prop="endTime"> - <el-date-picker - style="width: 450px" - clearable - v-model="form.endTime" - type="date" - value-format="yyyy-MM-dd" - placeholder="璇烽�夋嫨鍑虹珯鏃堕棿"> - </el-date-picker> - </el-form-item> - <el-form-item label="澶囨敞" prop="remarks"> - <el-input style="width: 1000px" v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" /> - </el-form-item> - </el-form> - <el-tabs type="border-card" > - <el-tab-pane label="璁惧娓呭崟" > - <Checkmachinery ref="machinerylist" :optType="optType" :id="form.id" @inSelected="onMachineryAdd"></Checkmachinery> - </el-tab-pane> - <el-tab-pane label="鐐规椤圭洰"> - <Checksubject ref="subjectlist" :optType="optType" :id="form.id" @subSelected="subMachineryAdd"></Checksubject> - </el-tab-pane> - </el-tabs> - <el-divider></el-divider> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </el-dialog> - </div> -</template> - -<script> -import { listInspectionPlanInfo, getInspectionPlanInfo, delInspectionPlanInfo, addInspectionPlanInfo, updateInspectionPlanInfo } from "@/api/main/em/inspectionPlanInfo/inspectionPlanInfo"; -import Checksubject from "@/views/main/em/inspectionPlanInfo/subject.vue"; -import Checkmachinery from "@/views/main/em/inspectionPlanInfo/machinery.vue"; - -export default { - name: "InspectionPlanInfo", - dicts: ['plan_status','plan_type','dimension'], - components:{Checkmachinery,Checksubject}, - data() { - return { - // 閬僵灞� - loading: true, - optType: null, - titleName: "", - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 璁惧鐐规淇濆吇璁″垝琛ㄦ牸鏁版嵁 - inspectionPlanInfoList: [], - machineryList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - planCode: null, - planName: null, - planType: null, - state: null, - frequency: null, - dimension: null, - lastGenerationTime: null, - startTime: null, - endTime: null, - devices: null, - inspectionItems: null, - remarks: null, - createUser: null, - updateUser: null, - spareField1: null, - spareField2: null, - spareField3: null, - spareField4: null, - equipmentCode: null, - equipmentName: null, - equipmentBrand: null, - equipmentSpec: null, - itemsCode: null, - itemsName: null, - itemsType: null, - standard: null, - itemsContent: null - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - id: [ - { required: true, message: "id涓嶈兘涓虹┖", trigger: "blur" } - ], - planName: [ - { required: true, message: "璁″垝鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } - ], - planCode: [ - { required: true, message: "璁″垝缂栧彿涓嶈兘涓虹┖", trigger: "blur" } - ], - planType: [ - { required: true, message: "璁″垝绫诲瀷涓嶈兘涓虹┖", trigger: "blur" } - ], - dimension: [ - { required: true, message: "缁村害涓嶈兘涓虹┖", trigger: "blur" } - ], - frequency: [ - { required: true, message: '棰戠巼涓嶈兘涓虹┖', trigger: 'blur' }, - { - validator: (rule, value, callback) => { - if (value === '' || value === undefined || value === null) { - callback(new Error('棰戠巼涓嶈兘涓虹┖')); - } else if (!Number.isInteger(Number(value))) { - callback(new Error('棰戠巼蹇呴』鏄暣鏁�')); - } else { - callback(); - } - }, - trigger: 'blur' - } - ], - }, - pickerOptions: { - shortcuts: [{ - text: '鏈�杩戜竴鍛�', - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); - picker.$emit('pick', [start, end]); - }, - class: 'custom-shortcut' // 娣诲姞class灞炴�� - }, { - text: '鏈�杩戜竴涓湀', - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); - picker.$emit('pick', [start, end]); - }, - class: 'custom-shortcut' // 娣诲姞class灞炴�� - }, { - text: '鏈�杩戜笁涓湀', - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); - picker.$emit('pick', [start, end]); - }, - }] - }, - }; - }, - created() { - this.getList(); - }, - methods: { - /** 鏌ヨ璁惧鐐规淇濆吇璁″垝鍒楄〃 */ - getList() { - this.loading = true; - this.queryParams.spareField1 = 1; - listInspectionPlanInfo(this.queryParams).then(response => { - this.inspectionPlanInfoList = response.rows; - this.total = response.total; - this.loading = false; - }); - console.log(this.queryParams.spareField1) - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - planCode: null, - planName: null, - planType: null, - state: null, - frequency: null, - dimension: null, - lastGenerationTime: null, - startTime: null, - endTime: null, - devices: null, - inspectionItems: null, - remarks: null, - createTime: null, - createUser: null, - updateTime: null, - updateUser: null, - spareField1: null, - spareField2: null, - spareField3: null, - spareField4: null, - equipmentCode: null, - equipmentName: null, - equipmentBrand: null, - equipmentSpec: null, - itemsCode: null, - itemsName: null, - itemsType: null, - standard: null, - itemsContent: null - }; - this.resetForm("form"); - }, - /** 瀛愯〃鏁版嵁鍥炰紶*/ - onMachineryAdd(checkmachineryList){ - if(checkmachineryList !=null && checkmachineryList.length >0){ - this.machineryList = checkmachineryList - console.log(this.machineryList) - } - }, - subMachineryAdd(checksubjectList){ - if(checksubjectList !=null && checksubjectList.length >0){ - this.subjectList = checksubjectList - } - }, - /** 瀛愯〃娓呭崟鏂板 */ - checkAdd(){ - for (let i = 0; i < this.machineryList.length; i++) { - this.machineryList[i].spareField2 = this.form.id - this.machineryList[i].spareField1 = '璁惧娓呭崟' - addInspectionPlanInfo(this.machineryList[i]).then(response =>{ - }); - } - for (let i = 0; i < this.subjectList.length; i++) { - this.subjectList[i].spareField2 = this.form.id - this.subjectList[i].spareField1 = '椤圭洰娓呭崟' - addInspectionPlanInfo(this.subjectList[i]).then(response =>{ - }); - } - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - console.log(this.ids) - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.optType = "add"; - this.titleName = "娣诲姞璁惧鐐规淇濆吇璁″垝"; - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getInspectionPlanInfo(id).then(response => { - this.form = response.data; - this.open = true; - this.optType = "edit"; - this.titleName = "淇敼璁惧鐐规淇濆吇璁″垝"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - this.form.spareField1 =1; - updateInspectionPlanInfo(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - this.checkAdd() - } else { - this.form.spareField1 =1; - addInspectionPlanInfo(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - this.checkAdd() - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎璁惧鐐规淇濆吇璁″垝缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delInspectionPlanInfo(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('em/inspectionPlanInfo/export', { - ...this.queryParams - }, `inspectionPlanInfo_${new Date().getTime()}.xlsx`) - } - } -}; -</script> diff --git a/jcdm-ui/src/views/main/em/inspectionPlanInfo/machinery.vue b/jcdm-ui/src/views/main/em/inspectionPlanInfo/machinery.vue deleted file mode 100644 index 5bb09e3..0000000 --- a/jcdm-ui/src/views/main/em/inspectionPlanInfo/machinery.vue +++ /dev/null @@ -1,159 +0,0 @@ -<template> - <div class="app-container"> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['mes:dv:checkplan:add']" - >鏂板</el-button> - </el-col> - </el-row> - <MachinerySelect ref="machinerySelect" @onSelected="onMachineryAdd" ></MachinerySelect> - <el-table v-loading="loading" :data="checkmachineryList" > - <el-table-column label="璁惧缂栫爜" align="center" prop="equipmentCode" /> - <el-table-column label="璁惧鍚嶇О" align="center" prop="equipmentName" /> - <el-table-column label="鍝佺墝" align="center" prop="equipmentBrand" /> - <el-table-column label="瑙勬牸鍨嬪彿" align="center" prop="equipmentSpec" /> - <el-table-column label="澶囨敞" align="center" prop="remark" /> - <el-table-column label="鎿嶄綔" align="center" > - <template slot-scope="scope"> - <el-button - size="mini" - type="danger" - icon="el-icon-delete" - @click="deleteSelectedColumns(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - </div> -</template> - -<script> -import { listInspectionPlanInfo, getInspectionPlanInfo, delInspectionPlanInfo, addInspectionPlanInfo, updateInspectionPlanInfo } from "@/api/main/em/inspectionPlanInfo/inspectionPlanInfo"; -import MachinerySelect from "@/components/inspectionPlanArchives/index.vue"; -export default { - name: "Checkmachinery", - components:{MachinerySelect}, - props:{ - id: null, - optType: null - }, - data() { - return { - // 閬僵灞� - loading: true, - - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 鐐规璁惧琛ㄦ牸鏁版嵁 - checkmachineryList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - equipmentId: null, - equipmentCode: null, - equipmentName: null, - equipmentBrand: null, - equipmentSpec: null, - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - }; - }, - created() { - if(this.optType === 'add'){ - this.getList(); - } - if(this.optType === 'edit'){ - this.getListedit(); - } - console.log(this.planCode) - }, - methods: { - - deleteSelectedColumns(row) { - const index = this.checkmachineryList.findIndex(item => item.id === row.id); - if (index !== -1) { - this.checkmachineryList.splice(index, 1); - } else { - this.$message({ - message: '鏈壘鍒板叿鏈夎ID鐨勯」鐩�', - type: 'warning' - }); - } - this.$emit('inSelected',this.checkmachineryList); - - }, - /** 鏌ヨ鐐规璁惧鍒楄〃 */ - getList() { - this.loading = true; - this.queryParams.spareField1 = '璁惧娓呭崟' - listInspectionPlanInfo(this.queryParams).then(response => { - // this.checkmachineryList = response.rows; - this.total = response.total; - this.loading = false; - }); - }, - getListedit() { - this.loading = true; - this.queryParams.spareField1 = '璁惧娓呭崟' - this.queryParams.spareField2 = this.id; - listInspectionPlanInfo(this.queryParams).then(response => { - this.checkmachineryList = response.rows; - this.total = response.total; - this.loading = false; - }); - }, - - - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.$refs.machinerySelect.showFlag = true; - }, - //璁惧璧勬簮閫夋嫨鍥炶皟 - // onMachineryAdd(rows){ - // if(rows !=null && rows.length >0){ - // rows.forEach(row => { - // row.planId = this.planId; - // addInspectionPlanArchives(row).then(response =>{ - // this.getList(); - // }); - // }); - // } - // }, - onMachineryAdd(selectedRows){ - if(selectedRows !=null && selectedRows.length >0){ - this.checkmachineryList = selectedRows - } - this.$emit('inSelected',this.checkmachineryList); - }, - - } -}; -</script> diff --git a/jcdm-ui/src/views/main/em/inspectionPlanInfo/subject.vue b/jcdm-ui/src/views/main/em/inspectionPlanInfo/subject.vue deleted file mode 100644 index 315811b..0000000 --- a/jcdm-ui/src/views/main/em/inspectionPlanInfo/subject.vue +++ /dev/null @@ -1,152 +0,0 @@ -<template> - <div class="app-container"> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['mes:dv:checkplan:add']" - >鏂板</el-button> - </el-col> - </el-row> - <DvsubjectSelect ref="subjectSelect" @onSelected="onSubjectSelected"></DvsubjectSelect> - <el-table v-loading="loading" :data="checksubjectList" > - <el-table-column label="椤圭洰缂栫爜" align="center" prop="itemsCode" /> - <el-table-column label="椤圭洰鍚嶇О" align="center" prop="itemsName" /> - <el-table-column label="椤圭洰绫诲瀷" align="center" prop="itemsType"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.spotmaintenance" :value="scope.row.itemsType"/> - </template> - </el-table-column> - <el-table-column label="椤圭洰鍐呭" align="center" width="300px" prop="itemsContent" /> - <el-table-column label="鏍囧噯" align="center" width="300px" prop="standard" /> - <el-table-column label="鎿嶄綔" align="center" > - <template slot-scope="scope"> - <el-button - size="mini" - type="danger" - icon="el-icon-delete" - @click="deleteSelectedColumns(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - </div> -</template> - -<script> -import { listInspectionPlanInfo, getInspectionPlanInfo, delInspectionPlanInfo, addInspectionPlanInfo, updateInspectionPlanInfo } from "@/api/main/em/inspectionPlanInfo/inspectionPlanInfo"; -import DvsubjectSelect from "@/components/inspectionPlanItems/index.vue" -export default { - name: "Checksubject", - components:{DvsubjectSelect}, - dicts: ['spotmaintenance'], - props:{ - id: null, - optType: null - }, - - - data() { - return { - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - selectedRows: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 鐐规椤圭洰琛ㄦ牸鏁版嵁 - checksubjectList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - planId: this.planId, - itemsCode: null, - itemsName: null, - itemsType: null, - standard: null, - itemsContent: null, - }, - // 琛ㄥ崟鍙傛暟 - form: {} - }; - }, - created() { - if(this.optType === 'add'){ - this.getList(); - } - if(this.optType === 'edit'){ - this.getListedit(); - } - }, - methods: { - deleteSelectedColumns(row) { - const index = this.checksubjectList.findIndex(item => item.id === row.id); - if (index !== -1) { - this.checksubjectList.splice(index, 1); - } else { - this.$message({ - message: '鏈壘鍒板叿鏈夎ID鐨勯」鐩�', - type: 'warning' - }); - } - this.$emit('subSelected',this.checksubjectList); - - }, - /** 鏌ヨ鐐规椤圭洰鍒楄〃 */ - getList() { - this.loading = true; - listInspectionPlanInfo(this.queryParams).then(response => { - // this.checksubjectList = response.rows; - this.total = response.total; - this.loading = false; - // console.log(response.rows) - }); - }, - getListedit() { - this.loading = true; - this.queryParams.spareField1 = '椤圭洰娓呭崟' - this.queryParams.spareField2 = this.id; - listInspectionPlanInfo(this.queryParams).then(response => { - this.checksubjectList = response.rows; - this.total = response.total; - this.loading = false; - }); - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.$refs.subjectSelect.showFlag = true; - }, - onSubjectSelected(selectedRows){ - if(selectedRows !=null && selectedRows.length >0){ - this.checksubjectList = selectedRows - } - this.$emit('subSelected',this.checksubjectList); - }, - - } -}; -</script> -- Gitblit v1.9.3