jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/domain/DaTileMatchRules.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/mapper/DaTileMatchRulesMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/service/IDaTileMatchRulesService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/service/impl/DaTileMatchRulesServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/resources/mapper/da/tileMatchRules/DaTileMatchRulesMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/api/main/bs/tileMatchRules/tileMatchRules.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/da/tileMatchRules/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@ package com.jcdm.main.da.tileMatchRules.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.da.tileMatchRules.domain.DaTileMatchRules; import com.jcdm.main.da.tileMatchRules.service.IDaTileMatchRulesService; import com.jcdm.common.utils.poi.ExcelUtil; import com.jcdm.common.core.page.TableDataInfo; /** * é ç¦è§åController * * @author jiang * @date 2024-01-24 */ @RestController @RequestMapping("/da/tileMatchRules") public class DaTileMatchRulesController extends BaseController { @Autowired private IDaTileMatchRulesService daTileMatchRulesService; /** * æ¥è¯¢é ç¦è§åå表 */ @PreAuthorize("@ss.hasPermi('da:tileMatchRules:list')") @GetMapping("/list") public TableDataInfo list(DaTileMatchRules daTileMatchRules) { startPage(); List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); return getDataTable(list); } /** * 导åºé ç¦è§åå表 */ @PreAuthorize("@ss.hasPermi('da:tileMatchRules:export')") @Log(title = "é ç¦è§å", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DaTileMatchRules daTileMatchRules) { List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); ExcelUtil<DaTileMatchRules> util = new ExcelUtil<DaTileMatchRules>(DaTileMatchRules.class); util.exportExcel(response, list, "é ç¦è§åæ°æ®"); } /** * è·åé ç¦è§å详ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('da:tileMatchRules:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(daTileMatchRulesService.selectDaTileMatchRulesById(id)); } /** * æ°å¢é ç¦è§å */ @PreAuthorize("@ss.hasPermi('da:tileMatchRules:add')") @Log(title = "é ç¦è§å", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DaTileMatchRules daTileMatchRules) { return toAjax(daTileMatchRulesService.insertDaTileMatchRules(daTileMatchRules)); } /** * ä¿®æ¹é ç¦è§å */ @PreAuthorize("@ss.hasPermi('da:tileMatchRules:edit')") @Log(title = "é ç¦è§å", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DaTileMatchRules daTileMatchRules) { return toAjax(daTileMatchRulesService.updateDaTileMatchRules(daTileMatchRules)); } /** * å é¤é ç¦è§å */ @PreAuthorize("@ss.hasPermi('da:tileMatchRules:remove')") @Log(title = "é ç¦è§å", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(daTileMatchRulesService.deleteDaTileMatchRulesByIds(ids)); } } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/domain/DaTileMatchRules.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,235 @@ package com.jcdm.main.da.tileMatchRules.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; /** * é ç¦è§å对象 da_tile_match_rules * * @author jiang * @date 2024-01-24 */ public class DaTileMatchRules extends BaseEntity { private static final long serialVersionUID = 1L; /** 主é®id */ private Long id; /** 产åç³»å */ @Excel(name = "产åç³»å") private String productSeries; /** æ«ç 对象1 */ @Excel(name = "æ«ç 对象1") private String scanObject1; /** æ«ç 对象2 */ @Excel(name = "æ«ç 对象2") private String scanObject2; /** è½´å称 */ @Excel(name = "è½´å称") private String axisName; /** é¢å称 */ @Excel(name = "é¢å称") private String neckName; /** ç¦å称 */ @Excel(name = "ç¦å称") private String tileName; /** è½´åæ°æ°ä½ç½® */ @Excel(name = "è½´åæ°æ°ä½ç½®") private Long axisParameterNoPosition; /** é¢åæ°æ°ä½ç½® */ @Excel(name = "é¢åæ°æ°ä½ç½®") private Long neckParameterPosition; /** è½´å¼ */ @Excel(name = "è½´å¼") private String axisValue; /** é¢å¼ */ @Excel(name = "é¢å¼") private String neckValue; /** ç¦é¢è² */ @Excel(name = "ç¦é¢è²") private String tileColor; /** å建ç¨æ· */ @Excel(name = "å建ç¨æ·") private String createUser; /** æ´æ¹ç¨æ· */ @Excel(name = "æ´æ¹ç¨æ·") private String updateUser; /** ç¶æï¼1åæ ¼ã2ä¸åæ ¼ï¼ */ @Excel(name = "ç¶æ", readConverterExp = "1=åæ ¼ã2ä¸åæ ¼") private String state; public void setId(Long id) { this.id = id; } public Long getId() { return id; } public void setProductSeries(String productSeries) { this.productSeries = productSeries; } public String getProductSeries() { return productSeries; } public void setScanObject1(String scanObject1) { this.scanObject1 = scanObject1; } public String getScanObject1() { return scanObject1; } public void setScanObject2(String scanObject2) { this.scanObject2 = scanObject2; } public String getScanObject2() { return scanObject2; } public void setAxisName(String axisName) { this.axisName = axisName; } public String getAxisName() { return axisName; } public void setNeckName(String neckName) { this.neckName = neckName; } public String getNeckName() { return neckName; } public void setTileName(String tileName) { this.tileName = tileName; } public String getTileName() { return tileName; } public void setAxisParameterNoPosition(Long axisParameterNoPosition) { this.axisParameterNoPosition = axisParameterNoPosition; } public Long getAxisParameterNoPosition() { return axisParameterNoPosition; } public void setNeckParameterPosition(Long neckParameterPosition) { this.neckParameterPosition = neckParameterPosition; } public Long getNeckParameterPosition() { return neckParameterPosition; } public void setAxisValue(String axisValue) { this.axisValue = axisValue; } public String getAxisValue() { return axisValue; } public void setNeckValue(String neckValue) { this.neckValue = neckValue; } public String getNeckValue() { return neckValue; } public void setTileColor(String tileColor) { this.tileColor = tileColor; } public String getTileColor() { return tileColor; } 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 setState(String state) { this.state = state; } public String getState() { return state; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("productSeries", getProductSeries()) .append("scanObject1", getScanObject1()) .append("scanObject2", getScanObject2()) .append("axisName", getAxisName()) .append("neckName", getNeckName()) .append("tileName", getTileName()) .append("axisParameterNoPosition", getAxisParameterNoPosition()) .append("neckParameterPosition", getNeckParameterPosition()) .append("axisValue", getAxisValue()) .append("neckValue", getNeckValue()) .append("tileColor", getTileColor()) .append("createUser", getCreateUser()) .append("createTime", getCreateTime()) .append("updateUser", getUpdateUser()) .append("updateTime", getUpdateTime()) .append("state", getState()) .toString(); } } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/mapper/DaTileMatchRulesMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.da.tileMatchRules.mapper; import java.util.List; import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; /** * é ç¦è§åMapperæ¥å£ * * @author jiang * @date 2024-01-24 */ public interface DaTileMatchRulesMapper { /** * æ¥è¯¢é ç¦è§å * * @param id é ç¦è§åä¸»é® * @return é ç¦è§å */ public DaTileMatchRules selectDaTileMatchRulesById(Long id); /** * æ¥è¯¢é ç¦è§åå表 * * @param daTileMatchRules é ç¦è§å * @return é ç¦è§åéå */ public List<DaTileMatchRules> selectDaTileMatchRulesList(DaTileMatchRules daTileMatchRules); /** * æ°å¢é ç¦è§å * * @param daTileMatchRules é ç¦è§å * @return ç»æ */ public int insertDaTileMatchRules(DaTileMatchRules daTileMatchRules); /** * ä¿®æ¹é ç¦è§å * * @param daTileMatchRules é ç¦è§å * @return ç»æ */ public int updateDaTileMatchRules(DaTileMatchRules daTileMatchRules); /** * å é¤é ç¦è§å * * @param id é ç¦è§åä¸»é® * @return ç»æ */ public int deleteDaTileMatchRulesById(Long id); /** * æ¹éå é¤é ç¦è§å * * @param ids éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteDaTileMatchRulesByIds(Long[] ids); } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/service/IDaTileMatchRulesService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.da.tileMatchRules.service; import java.util.List; import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; /** * é ç¦è§åServiceæ¥å£ * * @author jiang * @date 2024-01-24 */ public interface IDaTileMatchRulesService { /** * æ¥è¯¢é ç¦è§å * * @param id é ç¦è§åä¸»é® * @return é ç¦è§å */ public DaTileMatchRules selectDaTileMatchRulesById(Long id); /** * æ¥è¯¢é ç¦è§åå表 * * @param daTileMatchRules é ç¦è§å * @return é ç¦è§åéå */ public List<DaTileMatchRules> selectDaTileMatchRulesList(DaTileMatchRules daTileMatchRules); /** * æ°å¢é ç¦è§å * * @param daTileMatchRules é ç¦è§å * @return ç»æ */ public int insertDaTileMatchRules(DaTileMatchRules daTileMatchRules); /** * ä¿®æ¹é ç¦è§å * * @param daTileMatchRules é ç¦è§å * @return ç»æ */ public int updateDaTileMatchRules(DaTileMatchRules daTileMatchRules); /** * æ¹éå é¤é ç¦è§å * * @param ids éè¦å é¤çé ç¦è§å主é®éå * @return ç»æ */ public int deleteDaTileMatchRulesByIds(Long[] ids); /** * å é¤é ç¦è§åä¿¡æ¯ * * @param id é ç¦è§åä¸»é® * @return ç»æ */ public int deleteDaTileMatchRulesById(Long id); } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/service/impl/DaTileMatchRulesServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,96 @@ package com.jcdm.main.da.tileMatchRules.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.da.tileMatchRules.mapper.DaTileMatchRulesMapper; import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; import com.jcdm.main.da.tileMatchRules.service.IDaTileMatchRulesService; /** * é ç¦è§åServiceä¸å¡å±å¤ç * * @author jiang * @date 2024-01-24 */ @Service public class DaTileMatchRulesServiceImpl implements IDaTileMatchRulesService { @Autowired private DaTileMatchRulesMapper daTileMatchRulesMapper; /** * æ¥è¯¢é ç¦è§å * * @param id é ç¦è§åä¸»é® * @return é ç¦è§å */ @Override public DaTileMatchRules selectDaTileMatchRulesById(Long id) { return daTileMatchRulesMapper.selectDaTileMatchRulesById(id); } /** * æ¥è¯¢é ç¦è§åå表 * * @param daTileMatchRules é ç¦è§å * @return é ç¦è§å */ @Override public List<DaTileMatchRules> selectDaTileMatchRulesList(DaTileMatchRules daTileMatchRules) { return daTileMatchRulesMapper.selectDaTileMatchRulesList(daTileMatchRules); } /** * æ°å¢é ç¦è§å * * @param daTileMatchRules é ç¦è§å * @return ç»æ */ @Override public int insertDaTileMatchRules(DaTileMatchRules daTileMatchRules) { daTileMatchRules.setCreateTime(DateUtils.getNowDate()); return daTileMatchRulesMapper.insertDaTileMatchRules(daTileMatchRules); } /** * ä¿®æ¹é ç¦è§å * * @param daTileMatchRules é ç¦è§å * @return ç»æ */ @Override public int updateDaTileMatchRules(DaTileMatchRules daTileMatchRules) { daTileMatchRules.setUpdateTime(DateUtils.getNowDate()); return daTileMatchRulesMapper.updateDaTileMatchRules(daTileMatchRules); } /** * æ¹éå é¤é ç¦è§å * * @param ids éè¦å é¤çé ç¦è§åä¸»é® * @return ç»æ */ @Override public int deleteDaTileMatchRulesByIds(Long[] ids) { return daTileMatchRulesMapper.deleteDaTileMatchRulesByIds(ids); } /** * å é¤é ç¦è§åä¿¡æ¯ * * @param id é ç¦è§åä¸»é® * @return ç»æ */ @Override public int deleteDaTileMatchRulesById(Long id) { return daTileMatchRulesMapper.deleteDaTileMatchRulesById(id); } } jcdm-main/src/main/resources/mapper/da/tileMatchRules/DaTileMatchRulesMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,129 @@ <?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.da.tileMatchRules.mapper.DaTileMatchRulesMapper"> <resultMap type="DaTileMatchRules" id="DaTileMatchRulesResult"> <result property="id" column="id" /> <result property="productSeries" column="product_series" /> <result property="scanObject1" column="scan_object1" /> <result property="scanObject2" column="scan_object2" /> <result property="axisName" column="axis_name" /> <result property="neckName" column="neck_name" /> <result property="tileName" column="tile_name" /> <result property="axisParameterNoPosition" column="axis_parameter_no_position" /> <result property="neckParameterPosition" column="neck_parameter_position" /> <result property="axisValue" column="axis_value" /> <result property="neckValue" column="neck_value" /> <result property="tileColor" column="tile_color" /> <result property="createUser" column="create_user" /> <result property="createTime" column="create_time" /> <result property="updateUser" column="update_user" /> <result property="updateTime" column="update_time" /> <result property="state" column="state" /> </resultMap> <sql id="selectDaTileMatchRulesVo"> select id, product_series, scan_object1, scan_object2, axis_name, neck_name, tile_name, axis_parameter_no_position, neck_parameter_position, axis_value, neck_value, tile_color, create_user, create_time, update_user, update_time, state from da_tile_match_rules </sql> <select id="selectDaTileMatchRulesList" parameterType="DaTileMatchRules" resultMap="DaTileMatchRulesResult"> <include refid="selectDaTileMatchRulesVo"/> <where> <if test="productSeries != null and productSeries != ''"> and product_series = #{productSeries}</if> <if test="scanObject1 != null and scanObject1 != ''"> and scan_object1 = #{scanObject1}</if> <if test="scanObject2 != null and scanObject2 != ''"> and scan_object2 = #{scanObject2}</if> <if test="axisName != null and axisName != ''"> and axis_name like concat('%', #{axisName}, '%')</if> <if test="neckName != null and neckName != ''"> and neck_name like concat('%', #{neckName}, '%')</if> <if test="tileName != null and tileName != ''"> and tile_name like concat('%', #{tileName}, '%')</if> <if test="axisParameterNoPosition != null "> and axis_parameter_no_position = #{axisParameterNoPosition}</if> <if test="neckParameterPosition != null "> and neck_parameter_position = #{neckParameterPosition}</if> <if test="axisValue != null and axisValue != ''"> and axis_value = #{axisValue}</if> <if test="neckValue != null and neckValue != ''"> and neck_value = #{neckValue}</if> <if test="tileColor != null and tileColor != ''"> and tile_color = #{tileColor}</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="state != null and state != ''"> and state = #{state}</if> </where> </select> <select id="selectDaTileMatchRulesById" parameterType="Long" resultMap="DaTileMatchRulesResult"> <include refid="selectDaTileMatchRulesVo"/> where id = #{id} </select> <insert id="insertDaTileMatchRules" parameterType="DaTileMatchRules" useGeneratedKeys="true" keyProperty="id"> insert into da_tile_match_rules <trim prefix="(" suffix=")" suffixOverrides=","> <if test="productSeries != null">product_series,</if> <if test="scanObject1 != null">scan_object1,</if> <if test="scanObject2 != null">scan_object2,</if> <if test="axisName != null">axis_name,</if> <if test="neckName != null">neck_name,</if> <if test="tileName != null">tile_name,</if> <if test="axisParameterNoPosition != null">axis_parameter_no_position,</if> <if test="neckParameterPosition != null">neck_parameter_position,</if> <if test="axisValue != null">axis_value,</if> <if test="neckValue != null">neck_value,</if> <if test="tileColor != null">tile_color,</if> <if test="createUser != null">create_user,</if> <if test="createTime != null">create_time,</if> <if test="updateUser != null">update_user,</if> <if test="updateTime != null">update_time,</if> <if test="state != null">state,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="productSeries != null">#{productSeries},</if> <if test="scanObject1 != null">#{scanObject1},</if> <if test="scanObject2 != null">#{scanObject2},</if> <if test="axisName != null">#{axisName},</if> <if test="neckName != null">#{neckName},</if> <if test="tileName != null">#{tileName},</if> <if test="axisParameterNoPosition != null">#{axisParameterNoPosition},</if> <if test="neckParameterPosition != null">#{neckParameterPosition},</if> <if test="axisValue != null">#{axisValue},</if> <if test="neckValue != null">#{neckValue},</if> <if test="tileColor != null">#{tileColor},</if> <if test="createUser != null">#{createUser},</if> <if test="createTime != null">#{createTime},</if> <if test="updateUser != null">#{updateUser},</if> <if test="updateTime != null">#{updateTime},</if> <if test="state != null">#{state},</if> </trim> </insert> <update id="updateDaTileMatchRules" parameterType="DaTileMatchRules"> update da_tile_match_rules <trim prefix="SET" suffixOverrides=","> <if test="productSeries != null">product_series = #{productSeries},</if> <if test="scanObject1 != null">scan_object1 = #{scanObject1},</if> <if test="scanObject2 != null">scan_object2 = #{scanObject2},</if> <if test="axisName != null">axis_name = #{axisName},</if> <if test="neckName != null">neck_name = #{neckName},</if> <if test="tileName != null">tile_name = #{tileName},</if> <if test="axisParameterNoPosition != null">axis_parameter_no_position = #{axisParameterNoPosition},</if> <if test="neckParameterPosition != null">neck_parameter_position = #{neckParameterPosition},</if> <if test="axisValue != null">axis_value = #{axisValue},</if> <if test="neckValue != null">neck_value = #{neckValue},</if> <if test="tileColor != null">tile_color = #{tileColor},</if> <if test="createUser != null">create_user = #{createUser},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="updateUser != null">update_user = #{updateUser},</if> <if test="updateTime != null">update_time = #{updateTime},</if> <if test="state != null">state = #{state},</if> </trim> where id = #{id} </update> <delete id="deleteDaTileMatchRulesById" parameterType="Long"> delete from da_tile_match_rules where id = #{id} </delete> <delete id="deleteDaTileMatchRulesByIds" parameterType="String"> delete from da_tile_match_rules where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper> jcdm-ui/src/api/main/bs/tileMatchRules/tileMatchRules.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,44 @@ import request from '@/utils/request' // æ¥è¯¢é ç¦è§åå表 export function listTileMatchRules(query) { return request({ url: '/da/tileMatchRules/list', method: 'get', params: query }) } // æ¥è¯¢é ç¦è§åè¯¦ç» export function getTileMatchRules(id) { return request({ url: '/da/tileMatchRules/' + id, method: 'get' }) } // æ°å¢é ç¦è§å export function addTileMatchRules(data) { return request({ url: '/da/tileMatchRules', method: 'post', data: data }) } // ä¿®æ¹é ç¦è§å export function updateTileMatchRules(data) { return request({ url: '/da/tileMatchRules', method: 'put', data: data }) } // å é¤é ç¦è§å export function delTileMatchRules(id) { return request({ url: '/da/tileMatchRules/' + id, method: 'delete' }) } jcdm-ui/src/views/main/da/tileMatchRules/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,473 @@ <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="productSeries"> <el-input v-model="queryParams.productSeries" placeholder="请è¾å ¥äº§åç³»å" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="æ«ç 对象1" prop="scanObject1"> <el-input v-model="queryParams.scanObject1" placeholder="请è¾å ¥æ«ç 对象1" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="æ«ç 对象2" prop="scanObject2"> <el-input v-model="queryParams.scanObject2" placeholder="请è¾å ¥æ«ç 对象2" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="è½´å称" prop="axisName"> <el-input v-model="queryParams.axisName" placeholder="请è¾å ¥è½´å称" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="é¢å称" prop="neckName"> <el-input v-model="queryParams.neckName" placeholder="请è¾å ¥é¢å称" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="ç¦å称" prop="tileName"> <el-input v-model="queryParams.tileName" placeholder="请è¾å ¥ç¦å称" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="è½´åæ°æ°ä½ç½®" prop="axisParameterNoPosition"> <el-input v-model="queryParams.axisParameterNoPosition" placeholder="请è¾å ¥è½´åæ°æ°ä½ç½®" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="é¢åæ°æ°ä½ç½®" prop="neckParameterPosition"> <el-input v-model="queryParams.neckParameterPosition" placeholder="请è¾å ¥é¢åæ°æ°ä½ç½®" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="è½´å¼" prop="axisValue"> <el-input v-model="queryParams.axisValue" placeholder="请è¾å ¥è½´å¼" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="é¢å¼" prop="neckValue"> <el-input v-model="queryParams.neckValue" placeholder="请è¾å ¥é¢å¼" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="ç¦é¢è²" prop="tileColor"> <el-input v-model="queryParams.tileColor" placeholder="请è¾å ¥ç¦é¢è²" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="å建ç¨æ·" prop="createUser"> <el-input v-model="queryParams.createUser" placeholder="请è¾å ¥å建ç¨æ·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser"> <el-input v-model="queryParams.updateUser" placeholder="请è¾å ¥æ´æ¹ç¨æ·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="ç¶æ" prop="state"> <el-input v-model="queryParams.state" placeholder="请è¾å ¥ç¶æ" clearable @keyup.enter.native="handleQuery" /> </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="['da:tileMatchRules: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="['da:tileMatchRules: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="['da:tileMatchRules: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="['da:tileMatchRules:export']" >导åº</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table border v-loading="loading" :data="tileMatchRulesList" @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="productSeries"> </el-table-column> <el-table-column label="æ«ç 对象1" align="center" prop="scanObject1"> </el-table-column> <el-table-column label="æ«ç 对象2" align="center" prop="scanObject2"> </el-table-column> <el-table-column label="è½´å称" align="center" prop="axisName"> </el-table-column> <el-table-column label="é¢å称" align="center" prop="neckName"> </el-table-column> <el-table-column label="ç¦å称" align="center" prop="tileName"> </el-table-column> <el-table-column label="è½´åæ°æ°ä½ç½®" align="center" prop="axisParameterNoPosition"> </el-table-column> <el-table-column label="é¢åæ°æ°ä½ç½®" align="center" prop="neckParameterPosition"> </el-table-column> <el-table-column label="è½´å¼" align="center" prop="axisValue"> </el-table-column> <el-table-column label="é¢å¼" align="center" prop="neckValue"> </el-table-column> <el-table-column label="ç¦é¢è²" align="center" prop="tileColor"> </el-table-column> <el-table-column label="å建ç¨æ·" align="center" prop="createUser"> </el-table-column> <el-table-column label="æ´æ¹ç¨æ·" align="center" prop="updateUser"> </el-table-column> <el-table-column label="ç¶æ" align="center" prop="state"> </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="['da:tileMatchRules:edit']" >ä¿®æ¹</el-button> <el-button size="mini" type="danger" plain style="width: 72px" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['da:tileMatchRules: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="productSeries"> <el-input v-model="form.productSeries" placeholder="请è¾å ¥äº§åç³»å" /> </el-form-item> <el-form-item label="æ«ç 对象1" prop="scanObject1"> <el-input v-model="form.scanObject1" placeholder="请è¾å ¥æ«ç 对象1" /> </el-form-item> <el-form-item label="æ«ç 对象2" prop="scanObject2"> <el-input v-model="form.scanObject2" placeholder="请è¾å ¥æ«ç 对象2" /> </el-form-item> <el-form-item label="è½´å称" prop="axisName"> <el-input v-model="form.axisName" placeholder="请è¾å ¥è½´å称" /> </el-form-item> <el-form-item label="é¢å称" prop="neckName"> <el-input v-model="form.neckName" placeholder="请è¾å ¥é¢å称" /> </el-form-item> <el-form-item label="ç¦å称" prop="tileName"> <el-input v-model="form.tileName" placeholder="请è¾å ¥ç¦å称" /> </el-form-item> <el-form-item label="è½´åæ°æ°ä½ç½®" prop="axisParameterNoPosition"> <el-input v-model="form.axisParameterNoPosition" placeholder="请è¾å ¥è½´åæ°æ°ä½ç½®" /> </el-form-item> <el-form-item label="é¢åæ°æ°ä½ç½®" prop="neckParameterPosition"> <el-input v-model="form.neckParameterPosition" placeholder="请è¾å ¥é¢åæ°æ°ä½ç½®" /> </el-form-item> <el-form-item label="è½´å¼" prop="axisValue"> <el-input v-model="form.axisValue" placeholder="请è¾å ¥è½´å¼" /> </el-form-item> <el-form-item label="é¢å¼" prop="neckValue"> <el-input v-model="form.neckValue" placeholder="请è¾å ¥é¢å¼" /> </el-form-item> <el-form-item label="ç¦é¢è²" prop="tileColor"> <el-input v-model="form.tileColor" placeholder="请è¾å ¥ç¦é¢è²" /> </el-form-item> <el-form-item label="å建ç¨æ·" prop="createUser"> <el-input v-model="form.createUser" placeholder="请è¾å ¥å建ç¨æ·" /> </el-form-item> <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser"> <el-input v-model="form.updateUser" placeholder="请è¾å ¥æ´æ¹ç¨æ·" /> </el-form-item> <el-form-item label="ç¶æ" prop="state"> <el-input v-model="form.state" 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 { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules"; export default { name: "TileMatchRules", data() { return { // é®ç½©å± loading: true, titleName: "", // éä¸æ°ç» ids: [], // éå个ç¦ç¨ single: true, // éå¤ä¸ªç¦ç¨ multiple: true, // æ¾ç¤ºæç´¢æ¡ä»¶ showSearch: true, // æ»æ¡æ° total: 0, // é ç¦è§åè¡¨æ ¼æ°æ® tileMatchRulesList: [], // å¼¹åºå±æ é¢ title: "", // æ¯å¦æ¾ç¤ºå¼¹åºå± open: false, // æ¥è¯¢åæ° queryParams: { pageNum: 1, pageSize: 10, productSeries: null, scanObject1: null, scanObject2: null, axisName: null, neckName: null, tileName: null, axisParameterNoPosition: null, neckParameterPosition: null, axisValue: null, neckValue: null, tileColor: null, createUser: null, updateUser: null, state: null }, // 表ååæ° form: {}, // 表åæ ¡éª rules: { id: [ { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } ], } }; }, created() { this.getList(); }, methods: { /** æ¥è¯¢é ç¦è§åå表 */ getList() { this.loading = true; listTileMatchRules(this.queryParams).then(response => { this.tileMatchRulesList = response.rows; this.total = response.total; this.loading = false; }); }, // åæ¶æé® cancel() { this.open = false; this.reset(); }, // 表åéç½® reset() { this.form = { id: null, productSeries: null, scanObject1: null, scanObject2: null, axisName: null, neckName: null, tileName: null, axisParameterNoPosition: null, neckParameterPosition: null, axisValue: null, neckValue: null, tileColor: null, createUser: null, createTime: null, updateUser: null, updateTime: null, state: 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 getTileMatchRules(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) { updateTileMatchRules(this.form).then(response => { this.$modal.msgSuccess("ä¿®æ¹æå"); this.open = false; this.getList(); }); } else { addTileMatchRules(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 delTileMatchRules(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("å é¤æå"); }).catch(() => {}); }, /** 导åºæé®æä½ */ handleExport() { this.download('da/tileMatchRules/export', { ...this.queryParams }, `tileMatchRules_${new Date().getTime()}.xlsx`) } } }; </script>