¶Ô±ÈÐÂÎļþ |
| | |
| | | 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)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanInfo.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlanInfo.domain.EmInspectionPlanInfo; |
| | | |
| | | /** |
| | | * 设å¤ç¹æ£ä¿å
»è®¡åMapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-19 |
| | | */ |
| | | public interface EmInspectionPlanInfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanInfo.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlanInfo.domain.EmInspectionPlanInfo; |
| | | |
| | | /** |
| | | * 设å¤ç¹æ£ä¿å
»è®¡åServiceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-19 |
| | | */ |
| | | public interface IEmInspectionPlanInfoService |
| | | { |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanInfo.service.impl; |
| | | |
| | | import java.util.List; |
| | | 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 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢è®¾å¤ç¹æ£ä¿å
»è®¡åå表 |
| | | export function listInspectionPlanInfo(query) { |
| | | return request({ |
| | | url: '/em/inspectionPlanInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢è®¾å¤ç¹æ£ä¿å
»è®¡åè¯¦ç» |
| | | export function getInspectionPlanInfo(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlanInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤ç¹æ£ä¿å
»è®¡å |
| | | export function addInspectionPlanInfo(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlanInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹è®¾å¤ç¹æ£ä¿å
»è®¡å |
| | | export function updateInspectionPlanInfo(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlanInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤è®¾å¤ç¹æ£ä¿å
»è®¡å |
| | | export function delInspectionPlanInfo(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlanInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |