jcdm-main/src/main/java/com/jcdm/main/em/equipmentStatus/controller/EmEquipmentStatusController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@ package com.jcdm.main.em.equipmentStatus.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.equipmentStatus.domain.EmEquipmentStatus; import com.jcdm.main.em.equipmentStatus.service.IEmEquipmentStatusService; import com.jcdm.common.utils.poi.ExcelUtil; import com.jcdm.common.core.page.TableDataInfo; /** * 设å¤ç¶æController * * @author ruimin * @date 2023-12-27 */ @RestController @RequestMapping("/em/equipmentStatus") public class EmEquipmentStatusController extends BaseController { @Autowired private IEmEquipmentStatusService emEquipmentStatusService; /** * æ¥è¯¢è®¾å¤ç¶æå表 */ @PreAuthorize("@ss.hasPermi('em:equipmentStatus:list')") @GetMapping("/list") public TableDataInfo list(EmEquipmentStatus emEquipmentStatus) { startPage(); List<EmEquipmentStatus> list = emEquipmentStatusService.selectEmEquipmentStatusList(emEquipmentStatus); return getDataTable(list); } /** * 导åºè®¾å¤ç¶æå表 */ @PreAuthorize("@ss.hasPermi('em:equipmentStatus:export')") @Log(title = "设å¤ç¶æ", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, EmEquipmentStatus emEquipmentStatus) { List<EmEquipmentStatus> list = emEquipmentStatusService.selectEmEquipmentStatusList(emEquipmentStatus); ExcelUtil<EmEquipmentStatus> util = new ExcelUtil<EmEquipmentStatus>(EmEquipmentStatus.class); util.exportExcel(response, list, "设å¤ç¶ææ°æ®"); } /** * è·å设å¤ç¶æ详ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('em:equipmentStatus:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(emEquipmentStatusService.selectEmEquipmentStatusById(id)); } /** * æ°å¢è®¾å¤ç¶æ */ @PreAuthorize("@ss.hasPermi('em:equipmentStatus:add')") @Log(title = "设å¤ç¶æ", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody EmEquipmentStatus emEquipmentStatus) { return toAjax(emEquipmentStatusService.insertEmEquipmentStatus(emEquipmentStatus)); } /** * ä¿®æ¹è®¾å¤ç¶æ */ @PreAuthorize("@ss.hasPermi('em:equipmentStatus:edit')") @Log(title = "设å¤ç¶æ", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody EmEquipmentStatus emEquipmentStatus) { return toAjax(emEquipmentStatusService.updateEmEquipmentStatus(emEquipmentStatus)); } /** * å é¤è®¾å¤ç¶æ */ @PreAuthorize("@ss.hasPermi('em:equipmentStatus:remove')") @Log(title = "设å¤ç¶æ", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(emEquipmentStatusService.deleteEmEquipmentStatusByIds(ids)); } } jcdm-main/src/main/java/com/jcdm/main/em/equipmentStatus/domain/EmEquipmentStatus.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,162 @@ package com.jcdm.main.em.equipmentStatus.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_equipment_status * * @author ruimin * @date 2023-12-27 */ public class EmEquipmentStatus extends BaseEntity { private static final long serialVersionUID = 1L; /** ID */ private Long id; /** 设å¤ç¼å· */ @Excel(name = "设å¤ç¼å·") private String equipmentNo; /** 设å¤å称 */ @Excel(name = "设å¤å称") private String equipmentName; /** 车é´ç¼å· */ @Excel(name = "车é´ç¼å·") private String workshopCode; /** 产线ç¼å· */ @Excel(name = "产线ç¼å·") private String productionLineCode; /** å·¥åºç¼å· */ @Excel(name = "å·¥åºç¼å·") private String processesCode; /** 设å¤ç¶æ(1è¿è½¬2å¾ æº3æ é) */ @Excel(name = "设å¤ç¶æ(1è¿è½¬2å¾ æº3æ é)") private String eqStatus; /** é¢çå段1 */ private String spareField1; /** é¢çå段2 */ private String spareField2; /** å¤æ³¨ */ @Excel(name = "å¤æ³¨") private String remarks; public void setId(Long id) { this.id = id; } public Long getId() { return id; } public void setEquipmentNo(String equipmentNo) { this.equipmentNo = equipmentNo; } public String getEquipmentNo() { return equipmentNo; } public void setEquipmentName(String equipmentName) { this.equipmentName = equipmentName; } public String getEquipmentName() { return equipmentName; } public void setWorkshopCode(String workshopCode) { this.workshopCode = workshopCode; } public String getWorkshopCode() { return workshopCode; } public void setProductionLineCode(String productionLineCode) { this.productionLineCode = productionLineCode; } public String getProductionLineCode() { return productionLineCode; } public void setProcessesCode(String processesCode) { this.processesCode = processesCode; } public String getProcessesCode() { return processesCode; } public void setEqStatus(String eqStatus) { this.eqStatus = eqStatus; } public String getEqStatus() { return eqStatus; } 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 setRemarks(String remarks) { this.remarks = remarks; } public String getRemarks() { return remarks; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("equipmentNo", getEquipmentNo()) .append("equipmentName", getEquipmentName()) .append("workshopCode", getWorkshopCode()) .append("productionLineCode", getProductionLineCode()) .append("processesCode", getProcessesCode()) .append("eqStatus", getEqStatus()) .append("spareField1", getSpareField1()) .append("spareField2", getSpareField2()) .append("remarks", getRemarks()) .append("updateTime", getUpdateTime()) .toString(); } } jcdm-main/src/main/java/com/jcdm/main/em/equipmentStatus/mapper/EmEquipmentStatusMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.em.equipmentStatus.mapper; import java.util.List; import com.jcdm.main.em.equipmentStatus.domain.EmEquipmentStatus; /** * 设å¤ç¶æMapperæ¥å£ * * @author ruimin * @date 2023-12-27 */ public interface EmEquipmentStatusMapper { /** * æ¥è¯¢è®¾å¤ç¶æ * * @param id 设å¤ç¶æä¸»é® * @return 设å¤ç¶æ */ public EmEquipmentStatus selectEmEquipmentStatusById(Long id); /** * æ¥è¯¢è®¾å¤ç¶æå表 * * @param emEquipmentStatus 设å¤ç¶æ * @return 设å¤ç¶æéå */ public List<EmEquipmentStatus> selectEmEquipmentStatusList(EmEquipmentStatus emEquipmentStatus); /** * æ°å¢è®¾å¤ç¶æ * * @param emEquipmentStatus 设å¤ç¶æ * @return ç»æ */ public int insertEmEquipmentStatus(EmEquipmentStatus emEquipmentStatus); /** * ä¿®æ¹è®¾å¤ç¶æ * * @param emEquipmentStatus 设å¤ç¶æ * @return ç»æ */ public int updateEmEquipmentStatus(EmEquipmentStatus emEquipmentStatus); /** * å é¤è®¾å¤ç¶æ * * @param id 设å¤ç¶æä¸»é® * @return ç»æ */ public int deleteEmEquipmentStatusById(Long id); /** * æ¹éå é¤è®¾å¤ç¶æ * * @param ids éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteEmEquipmentStatusByIds(Long[] ids); } jcdm-main/src/main/java/com/jcdm/main/em/equipmentStatus/service/IEmEquipmentStatusService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.em.equipmentStatus.service; import java.util.List; import com.jcdm.main.em.equipmentStatus.domain.EmEquipmentStatus; /** * 设å¤ç¶æServiceæ¥å£ * * @author ruimin * @date 2023-12-27 */ public interface IEmEquipmentStatusService { /** * æ¥è¯¢è®¾å¤ç¶æ * * @param id 设å¤ç¶æä¸»é® * @return 设å¤ç¶æ */ public EmEquipmentStatus selectEmEquipmentStatusById(Long id); /** * æ¥è¯¢è®¾å¤ç¶æå表 * * @param emEquipmentStatus 设å¤ç¶æ * @return 设å¤ç¶æéå */ public List<EmEquipmentStatus> selectEmEquipmentStatusList(EmEquipmentStatus emEquipmentStatus); /** * æ°å¢è®¾å¤ç¶æ * * @param emEquipmentStatus 设å¤ç¶æ * @return ç»æ */ public int insertEmEquipmentStatus(EmEquipmentStatus emEquipmentStatus); /** * ä¿®æ¹è®¾å¤ç¶æ * * @param emEquipmentStatus 设å¤ç¶æ * @return ç»æ */ public int updateEmEquipmentStatus(EmEquipmentStatus emEquipmentStatus); /** * æ¹éå é¤è®¾å¤ç¶æ * * @param ids éè¦å é¤ç设å¤ç¶æ主é®éå * @return ç»æ */ public int deleteEmEquipmentStatusByIds(Long[] ids); /** * å é¤è®¾å¤ç¶æä¿¡æ¯ * * @param id 设å¤ç¶æä¸»é® * @return ç»æ */ public int deleteEmEquipmentStatusById(Long id); } jcdm-main/src/main/java/com/jcdm/main/em/equipmentStatus/service/impl/EmEquipmentStatusServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,95 @@ package com.jcdm.main.em.equipmentStatus.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.equipmentStatus.mapper.EmEquipmentStatusMapper; import com.jcdm.main.em.equipmentStatus.domain.EmEquipmentStatus; import com.jcdm.main.em.equipmentStatus.service.IEmEquipmentStatusService; /** * 设å¤ç¶æServiceä¸å¡å±å¤ç * * @author ruimin * @date 2023-12-27 */ @Service public class EmEquipmentStatusServiceImpl implements IEmEquipmentStatusService { @Autowired private EmEquipmentStatusMapper emEquipmentStatusMapper; /** * æ¥è¯¢è®¾å¤ç¶æ * * @param id 设å¤ç¶æä¸»é® * @return 设å¤ç¶æ */ @Override public EmEquipmentStatus selectEmEquipmentStatusById(Long id) { return emEquipmentStatusMapper.selectEmEquipmentStatusById(id); } /** * æ¥è¯¢è®¾å¤ç¶æå表 * * @param emEquipmentStatus 设å¤ç¶æ * @return 设å¤ç¶æ */ @Override public List<EmEquipmentStatus> selectEmEquipmentStatusList(EmEquipmentStatus emEquipmentStatus) { return emEquipmentStatusMapper.selectEmEquipmentStatusList(emEquipmentStatus); } /** * æ°å¢è®¾å¤ç¶æ * * @param emEquipmentStatus 设å¤ç¶æ * @return ç»æ */ @Override public int insertEmEquipmentStatus(EmEquipmentStatus emEquipmentStatus) { return emEquipmentStatusMapper.insertEmEquipmentStatus(emEquipmentStatus); } /** * ä¿®æ¹è®¾å¤ç¶æ * * @param emEquipmentStatus 设å¤ç¶æ * @return ç»æ */ @Override public int updateEmEquipmentStatus(EmEquipmentStatus emEquipmentStatus) { emEquipmentStatus.setUpdateTime(DateUtils.getNowDate()); return emEquipmentStatusMapper.updateEmEquipmentStatus(emEquipmentStatus); } /** * æ¹éå é¤è®¾å¤ç¶æ * * @param ids éè¦å é¤ç设å¤ç¶æä¸»é® * @return ç»æ */ @Override public int deleteEmEquipmentStatusByIds(Long[] ids) { return emEquipmentStatusMapper.deleteEmEquipmentStatusByIds(ids); } /** * å é¤è®¾å¤ç¶æä¿¡æ¯ * * @param id 设å¤ç¶æä¸»é® * @return ç»æ */ @Override public int deleteEmEquipmentStatusById(Long id) { return emEquipmentStatusMapper.deleteEmEquipmentStatusById(id); } } jcdm-main/src/main/java/com/jcdm/main/em/equipmentType/controller/EmEquipmentTypeController.java
ÎļþÒÑɾ³ý jcdm-main/src/main/java/com/jcdm/main/em/equipmentType/domain/EmEquipmentType.java
ÎļþÒÑɾ³ý jcdm-main/src/main/java/com/jcdm/main/em/equipmentType/mapper/EmEquipmentTypeMapper.java
ÎļþÒÑɾ³ý jcdm-main/src/main/java/com/jcdm/main/em/equipmentType/service/IEmEquipmentTypeService.java
ÎļþÒÑɾ³ý jcdm-main/src/main/java/com/jcdm/main/em/equipmentType/service/impl/EmEquipmentTypeServiceImpl.java
ÎļþÒÑɾ³ý jcdm-main/src/main/resources/mapper/em/equipmentStatus/EmEquipmentStatusMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,99 @@ <?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.equipmentStatus.mapper.EmEquipmentStatusMapper"> <resultMap type="EmEquipmentStatus" id="EmEquipmentStatusResult"> <result property="id" column="id" /> <result property="equipmentNo" column="equipment_no" /> <result property="equipmentName" column="equipment_name" /> <result property="workshopCode" column="workshop_code" /> <result property="productionLineCode" column="production_line_code" /> <result property="processesCode" column="processes_code" /> <result property="eqStatus" column="eq_status" /> <result property="spareField1" column="spare_field_1" /> <result property="spareField2" column="spare_field_2" /> <result property="remarks" column="remarks" /> <result property="updateTime" column="update_time" /> </resultMap> <sql id="selectEmEquipmentStatusVo"> select id, equipment_no, equipment_name, workshop_code, production_line_code, processes_code, eq_status, spare_field_1, spare_field_2, remarks, update_time from em_equipment_status </sql> <select id="selectEmEquipmentStatusList" parameterType="EmEquipmentStatus" resultMap="EmEquipmentStatusResult"> <include refid="selectEmEquipmentStatusVo"/> <where> <if test="equipmentNo != null and equipmentNo != ''"> and equipment_no like concat('%', #{equipmentNo}, '%')</if> <if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="workshopCode != null and workshopCode != ''"> and workshop_code like concat('%', #{workshopCode}, '%')</if> <if test="productionLineCode != null and productionLineCode != ''"> and production_line_code like concat('%', #{productionLineCode}, '%')</if> <if test="processesCode != null and processesCode != ''"> and processes_code like concat('%', #{processesCode}, '%')</if> <if test="eqStatus != null and eqStatus != ''"> and eq_status like concat('%', #{eqStatus}, '%')</if> </where> </select> <select id="selectEmEquipmentStatusById" parameterType="Long" resultMap="EmEquipmentStatusResult"> <include refid="selectEmEquipmentStatusVo"/> where id = #{id} </select> <insert id="insertEmEquipmentStatus" parameterType="EmEquipmentStatus"> insert into em_equipment_status <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id,</if> <if test="equipmentNo != null">equipment_no,</if> <if test="equipmentName != null">equipment_name,</if> <if test="workshopCode != null">workshop_code,</if> <if test="productionLineCode != null">production_line_code,</if> <if test="processesCode != null">processes_code,</if> <if test="eqStatus != null">eq_status,</if> <if test="spareField1 != null">spare_field_1,</if> <if test="spareField2 != null">spare_field_2,</if> <if test="remarks != null">remarks,</if> <if test="updateTime != null">update_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id},</if> <if test="equipmentNo != null">#{equipmentNo},</if> <if test="equipmentName != null">#{equipmentName},</if> <if test="workshopCode != null">#{workshopCode},</if> <if test="productionLineCode != null">#{productionLineCode},</if> <if test="processesCode != null">#{processesCode},</if> <if test="eqStatus != null">#{eqStatus},</if> <if test="spareField1 != null">#{spareField1},</if> <if test="spareField2 != null">#{spareField2},</if> <if test="remarks != null">#{remarks},</if> <if test="updateTime != null">#{updateTime},</if> </trim> </insert> <update id="updateEmEquipmentStatus" parameterType="EmEquipmentStatus"> update em_equipment_status <trim prefix="SET" suffixOverrides=","> <if test="equipmentNo != null">equipment_no = #{equipmentNo},</if> <if test="equipmentName != null">equipment_name = #{equipmentName},</if> <if test="workshopCode != null">workshop_code = #{workshopCode},</if> <if test="productionLineCode != null">production_line_code = #{productionLineCode},</if> <if test="processesCode != null">processes_code = #{processesCode},</if> <if test="eqStatus != null">eq_status = #{eqStatus},</if> <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> <if test="remarks != null">remarks = #{remarks},</if> <if test="updateTime != null">update_time = #{updateTime},</if> </trim> where id = #{id} </update> <delete id="deleteEmEquipmentStatusById" parameterType="Long"> delete from em_equipment_status where id = #{id} </delete> <delete id="deleteEmEquipmentStatusByIds" parameterType="String"> delete from em_equipment_status where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper> jcdm-main/src/main/resources/mapper/em/equipmentType/EmEquipmentTypeMapper.xml
ÎļþÒÑɾ³ý jcdm-ui/src/api/main/em/equipmentStatus/equipmentStatus.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,44 @@ import request from '@/utils/request' // æ¥è¯¢è®¾å¤ç¶æå表 export function listEquipmentStatus(query) { return request({ url: '/em/equipmentStatus/list', method: 'get', params: query }) } // æ¥è¯¢è®¾å¤ç¶æè¯¦ç» export function getEquipmentStatus(id) { return request({ url: '/em/equipmentStatus/' + id, method: 'get' }) } // æ°å¢è®¾å¤ç¶æ export function addEquipmentStatus(data) { return request({ url: '/em/equipmentStatus', method: 'post', data: data }) } // ä¿®æ¹è®¾å¤ç¶æ export function updateEquipmentStatus(data) { return request({ url: '/em/equipmentStatus', method: 'put', data: data }) } // å é¤è®¾å¤ç¶æ export function delEquipmentStatus(id) { return request({ url: '/em/equipmentStatus/' + id, method: 'delete' }) } jcdm-ui/src/api/main/em/equipmentType/equipmentType.js
ÎļþÒÑɾ³ý jcdm-ui/src/views/main/em/equipmentStatus/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,356 @@ <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="equipmentNo"> <el-input v-model="queryParams.equipmentNo" placeholder="请è¾å ¥è®¾å¤ç¼å·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="设å¤å称" prop="equipmentName"> <el-input v-model="queryParams.equipmentName" placeholder="请è¾å ¥è®¾å¤å称" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <!-- <el-form-item label="车é´ç¼å·" prop="workshopCode">--> <!-- <el-input--> <!-- v-model="queryParams.workshopCode"--> <!-- placeholder="请è¾å ¥è½¦é´ç¼å·"--> <!-- clearable--> <!-- @keyup.enter.native="handleQuery"--> <!-- />--> <!-- </el-form-item>--> <!-- <el-form-item label="产线ç¼å·" prop="productionLineCode">--> <!-- <el-input--> <!-- v-model="queryParams.productionLineCode"--> <!-- placeholder="请è¾å ¥äº§çº¿ç¼å·"--> <!-- clearable--> <!-- @keyup.enter.native="handleQuery"--> <!-- />--> <!-- </el-form-item>--> <el-form-item label="å·¥åºç¼å·" prop="processesCode"> <el-input v-model="queryParams.processesCode" placeholder="请è¾å ¥å·¥åºç¼å·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <!-- <el-form-item label="设å¤ç¶æ(1è¿è½¬2å¾ æº3æ é)" prop="eqStatus">--> <!-- <el-select v-model="queryParams.eqStatus" placeholder="请éæ©è®¾å¤ç¶æ(1è¿è½¬2å¾ æº3æ é)" clearable>--> <!-- <el-option--> <!-- v-for="dict in dict.type.${dictType}"--> <!-- :key="dict.value"--> <!-- :label="dict.label"--> <!-- :value="dict.value"--> <!-- />--> <!-- </el-select>--> <!-- </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:equipmentStatus: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:equipmentStatus: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:equipmentStatus: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:equipmentStatus:export']" >导åº</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table border v-loading="loading" :data="equipmentStatusList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="ID" align="center" prop="id" /> <el-table-column label="设å¤ç¼å·" align="center" prop="equipmentNo"> </el-table-column> <el-table-column label="设å¤å称" align="center" prop="equipmentName"> </el-table-column> <el-table-column label="车é´ç¼å·" align="center" prop="workshopCode"> </el-table-column> <el-table-column label="产线ç¼å·" align="center" prop="productionLineCode"> </el-table-column> <el-table-column label="å·¥åºç¼å·" align="center" prop="processesCode"> </el-table-column> <el-table-column label="设å¤ç¶æ(1è¿è½¬2å¾ æº3æ é)" align="center" prop="eqStatus"> </el-table-column> <el-table-column label="å¤æ³¨" align="center" prop="remarks"> </el-table-column> <el-table-column label="æ´æ°æ¶é´" align="center" prop="updateTime"> </el-table-column> <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" type="success" plain style="width: 72px" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['em:equipmentStatus:edit']" >ä¿®æ¹</el-button> <el-button size="mini" type="danger" plain style="width: 72px" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['em:equipmentStatus:remove']" >å é¤</el-button> </template> </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="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} </span> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="设å¤ç¼å·" prop="equipmentNo"> <el-input v-model="form.equipmentNo" placeholder="请è¾å ¥è®¾å¤ç¼å·" /> </el-form-item> <el-form-item label="设å¤å称" prop="equipmentName"> <el-input v-model="form.equipmentName" placeholder="请è¾å ¥è®¾å¤å称" /> </el-form-item> <el-form-item label="车é´ç¼å·" prop="workshopCode"> <el-input v-model="form.workshopCode" placeholder="请è¾å ¥è½¦é´ç¼å·" /> </el-form-item> <el-form-item label="产线ç¼å·" prop="productionLineCode"> <el-input v-model="form.productionLineCode" placeholder="请è¾å ¥äº§çº¿ç¼å·" /> </el-form-item> <el-form-item label="å·¥åºç¼å·" prop="processesCode"> <el-input v-model="form.processesCode" placeholder="请è¾å ¥å·¥åºç¼å·" /> </el-form-item> <!-- <el-form-item label="设å¤ç¶æ(1è¿è½¬2å¾ æº3æ é)" prop="eqStatus">--> <!-- <el-radio-group v-model="form.eqStatus">--> <!-- <el-radio--> <!-- v-for="dict in dict.type.${dictType}"--> <!-- :key="dict.value"--> <!-- :label="dict.value"--> <!-- >{{dict.label}}</el-radio>--> <!-- </el-radio-group>--> <!-- </el-form-item>--> <el-form-item label="å¤æ³¨" prop="remarks"> <el-input v-model="form.remarks" placeholder="请è¾å ¥å¤æ³¨" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">ç¡® å®</el-button> <el-button @click="cancel">å æ¶</el-button> </div> </el-dialog> </div> </template> <script> import { listEquipmentStatus, getEquipmentStatus, delEquipmentStatus, addEquipmentStatus, updateEquipmentStatus } from "@/api/main/em/equipmentStatus/equipmentStatus"; export default { name: "EquipmentStatus", data() { return { // é®ç½©å± loading: true, titleName: "", // éä¸æ°ç» ids: [], // éå个ç¦ç¨ single: true, // éå¤ä¸ªç¦ç¨ multiple: true, // æ¾ç¤ºæç´¢æ¡ä»¶ showSearch: true, // æ»æ¡æ° total: 0, // 设å¤ç¶æè¡¨æ ¼æ°æ® equipmentStatusList: [], // å¼¹åºå±æ é¢ title: "", // æ¯å¦æ¾ç¤ºå¼¹åºå± open: false, // æ¥è¯¢åæ° queryParams: { pageNum: 1, pageSize: 10, equipmentNo: null, equipmentName: null, workshopCode: null, productionLineCode: null, processesCode: null, eqStatus: null, }, // 表ååæ° form: {}, // 表åæ ¡éª rules: { id: [ { required: true, message: "IDä¸è½ä¸ºç©º", trigger: "blur" } ], } }; }, created() { this.getList(); }, methods: { /** æ¥è¯¢è®¾å¤ç¶æå表 */ getList() { this.loading = true; listEquipmentStatus(this.queryParams).then(response => { this.equipmentStatusList = response.rows; this.total = response.total; this.loading = false; }); }, // åæ¶æé® cancel() { this.open = false; this.reset(); }, // 表åéç½® reset() { this.form = { id: null, equipmentNo: null, equipmentName: null, workshopCode: null, productionLineCode: null, processesCode: null, eqStatus: null, spareField1: null, spareField2: null, remarks: null, updateTime: null }; this.resetForm("form"); }, /** æç´¢æé®æä½ */ 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 }, /** æ°å¢æé®æä½ */ handleAdd() { this.reset(); this.open = true; this.titleName = "æ·»å 设å¤ç¶æ"; }, /** ä¿®æ¹æé®æä½ */ handleUpdate(row) { this.reset(); const id = row.id || this.ids getEquipmentStatus(id).then(response => { this.form = response.data; this.open = true; this.titleName = "ä¿®æ¹è®¾å¤ç¶æ"; }); }, /** æ交æé® */ submitForm() { this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { updateEquipmentStatus(this.form).then(response => { this.$modal.msgSuccess("ä¿®æ¹æå"); this.open = false; this.getList(); }); } else { addEquipmentStatus(this.form).then(response => { this.$modal.msgSuccess("æ°å¢æå"); this.open = false; this.getList(); }); } } }); }, /** å é¤æé®æä½ */ handleDelete(row) { const ids = row.id || this.ids; this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤è®¾å¤ç¶æç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { return delEquipmentStatus(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("å é¤æå"); }).catch(() => {}); }, /** 导åºæé®æä½ */ handleExport() { this.download('em/equipmentStatus/export', { ...this.queryParams }, `equipmentStatus_${new Date().getTime()}.xlsx`) } } }; </script> jcdm-ui/src/views/main/em/equipmentType/index.vue
ÎļþÒÑɾ³ý