¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.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.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.main.bs.domain.BsRouteChildInfo; |
| | | import com.billion.main.bs.service.IBsRouteChildInfoService; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿åä¿¡æ¯Controller |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/routeChildInfo") |
| | | public class BsRouteChildInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsRouteChildInfoService bsRouteChildInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsRouteChildInfo bsRouteChildInfo) |
| | | { |
| | | startPage(); |
| | | List<BsRouteChildInfo> list = bsRouteChildInfoService.selectBsRouteChildInfoList(bsRouteChildInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå·¥èºè·¯çº¿åä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:export')") |
| | | @Log(title = "å·¥èºè·¯çº¿åä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsRouteChildInfo bsRouteChildInfo) |
| | | { |
| | | List<BsRouteChildInfo> list = bsRouteChildInfoService.selectBsRouteChildInfoList(bsRouteChildInfo); |
| | | ExcelUtil<BsRouteChildInfo> util = new ExcelUtil<BsRouteChildInfo>(BsRouteChildInfo.class); |
| | | util.exportExcel(response, list, "å·¥èºè·¯çº¿åä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åå·¥èºè·¯çº¿åä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsRouteChildInfoService.selectBsRouteChildInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:add')") |
| | | @Log(title = "å·¥èºè·¯çº¿åä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsRouteChildInfo bsRouteChildInfo) |
| | | { |
| | | return toAjax(bsRouteChildInfoService.insertBsRouteChildInfo(bsRouteChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:edit')") |
| | | @Log(title = "å·¥èºè·¯çº¿åä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsRouteChildInfo bsRouteChildInfo) |
| | | { |
| | | return toAjax(bsRouteChildInfoService.updateBsRouteChildInfo(bsRouteChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:remove')") |
| | | @Log(title = "å·¥èºè·¯çº¿åä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsRouteChildInfoService.deleteBsRouteChildInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.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.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.main.bs.domain.BsRouteInfo; |
| | | import com.billion.main.bs.service.IBsRouteInfoService; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿Controller |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/routeInfo") |
| | | public class BsRouteInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsRouteInfoService bsRouteInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeInfo:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsRouteInfo bsRouteInfo) |
| | | { |
| | | startPage(); |
| | | List<BsRouteInfo> list = bsRouteInfoService.selectBsRouteInfoList(bsRouteInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå·¥èºè·¯çº¿å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeInfo:export')") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsRouteInfo bsRouteInfo) |
| | | { |
| | | List<BsRouteInfo> list = bsRouteInfoService.selectBsRouteInfoList(bsRouteInfo); |
| | | ExcelUtil<BsRouteInfo> util = new ExcelUtil<BsRouteInfo>(BsRouteInfo.class); |
| | | util.exportExcel(response, list, "å·¥èºè·¯çº¿æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åå·¥èºè·¯çº¿è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeInfo:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsRouteInfoService.selectBsRouteInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeInfo:add')") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsRouteInfo bsRouteInfo) |
| | | { |
| | | return toAjax(bsRouteInfoService.insertBsRouteInfo(bsRouteInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeInfo:edit')") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsRouteInfo bsRouteInfo) |
| | | { |
| | | return toAjax(bsRouteInfoService.updateBsRouteInfo(bsRouteInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:routeInfo:remove')") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsRouteInfoService.deleteBsRouteInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿åä¿¡æ¯å¯¹è±¡ bs_route_child_info |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | @Data |
| | | public class BsRouteChildInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** 产åç¼ç */ |
| | | @Excel(name = "产åç¼ç ") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** å·¥ä½ç¼ç */ |
| | | @Excel(name = "å·¥ä½ç¼ç ") |
| | | private String locationCode; |
| | | |
| | | /** å·¥ä½å称 */ |
| | | @Excel(name = "å·¥ä½å称") |
| | | private String locationName; |
| | | |
| | | /** å å·¥é¡ºåº */ |
| | | @Excel(name = "å 工顺åº") |
| | | private Long stepNo; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String delFlag; |
| | | |
| | | /** æµç¨ç¼ç */ |
| | | @Excel(name = "æµç¨ç¼ç ") |
| | | private String routeCode; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿å¯¹è±¡ bs_route_info |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | @Data |
| | | public class BsRouteInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** æµç¨ç¼ç */ |
| | | @Excel(name = "æµç¨ç¼ç ") |
| | | private String routeCode; |
| | | |
| | | /** æµç¨å称 */ |
| | | @Excel(name = "æµç¨å称") |
| | | private String routeName; |
| | | |
| | | /** 产åç¼ç */ |
| | | @Excel(name = "产åç¼ç ") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** çæ¬ */ |
| | | @Excel(name = "çæ¬") |
| | | private String version; |
| | | |
| | | /** ç¶æ(åå
¸) */ |
| | | @Excel(name = "ç¶æ(åå
¸)") |
| | | private String status; |
| | | |
| | | /** æ°æ®æ¥æº */ |
| | | @Excel(name = "æ°æ®æ¥æº") |
| | | private String dataSource; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String delFlag; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remark; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsRouteChildInfo; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿åä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | public interface BsRouteChildInfoMapper extends BaseMapper<BsRouteChildInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿åä¿¡æ¯ä¸»é® |
| | | * @return å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | */ |
| | | public BsRouteChildInfo selectBsRouteChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯å表 |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return å·¥èºè·¯çº¿åä¿¡æ¯éå |
| | | */ |
| | | public List<BsRouteChildInfo> selectBsRouteChildInfoList(BsRouteChildInfo bsRouteChildInfo); |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo); |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteChildInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsRouteInfo; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿Mapperæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | public interface BsRouteInfoMapper extends BaseMapper<BsRouteInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿ä¸»é® |
| | | * @return å·¥èºè·¯çº¿ |
| | | */ |
| | | public BsRouteInfo selectBsRouteInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿å表 |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return å·¥èºè·¯çº¿éå |
| | | */ |
| | | public List<BsRouteInfo> selectBsRouteInfoList(BsRouteInfo bsRouteInfo); |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿ |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsRouteInfo(BsRouteInfo bsRouteInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿ |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsRouteInfo(BsRouteInfo bsRouteInfo); |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsRouteChildInfo; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿åä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | public interface IBsRouteChildInfoService extends IService<BsRouteChildInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿åä¿¡æ¯ä¸»é® |
| | | * @return å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | */ |
| | | public BsRouteChildInfo selectBsRouteChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯å表 |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return å·¥èºè·¯çº¿åä¿¡æ¯éå |
| | | */ |
| | | public List<BsRouteChildInfo> selectBsRouteChildInfoList(BsRouteChildInfo bsRouteChildInfo); |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çå·¥èºè·¯çº¿åä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteChildInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿åä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteChildInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsRouteInfo; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿Serviceæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | public interface IBsRouteInfoService extends IService<BsRouteInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿ä¸»é® |
| | | * @return å·¥èºè·¯çº¿ |
| | | */ |
| | | public BsRouteInfo selectBsRouteInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿å表 |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return å·¥èºè·¯çº¿éå |
| | | */ |
| | | public List<BsRouteInfo> selectBsRouteInfoList(BsRouteInfo bsRouteInfo); |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿ |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsRouteInfo(BsRouteInfo bsRouteInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿ |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsRouteInfo(BsRouteInfo bsRouteInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿ |
| | | * |
| | | * @param ids éè¦å é¤çå·¥èºè·¯çº¿ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsRouteInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.utils.DateUtils; |
| | | import com.billion.common.utils.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.billion.main.bs.mapper.BsRouteChildInfoMapper; |
| | | import com.billion.main.bs.domain.BsRouteChildInfo; |
| | | import com.billion.main.bs.service.IBsRouteChildInfoService; |
| | | |
| | | import static org.apache.commons.lang3.SystemUtils.getUserName; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿åä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | @Service |
| | | public class BsRouteChildInfoServiceImpl extends ServiceImpl<BsRouteChildInfoMapper, BsRouteChildInfo> implements IBsRouteChildInfoService |
| | | { |
| | | @Autowired |
| | | private BsRouteChildInfoMapper bsRouteChildInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿åä¿¡æ¯ä¸»é® |
| | | * @return å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public BsRouteChildInfo selectBsRouteChildInfoById(Long id) |
| | | { |
| | | return bsRouteChildInfoMapper.selectBsRouteChildInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯å表 |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<BsRouteChildInfo> selectBsRouteChildInfoList(BsRouteChildInfo bsRouteChildInfo) |
| | | { |
| | | return bsRouteChildInfoMapper.selectBsRouteChildInfoList(bsRouteChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo) |
| | | { |
| | | bsRouteChildInfo.setCreateTime(DateUtils.getNowDate()); |
| | | bsRouteChildInfo.setCreateBy(getUserName()); |
| | | return bsRouteChildInfoMapper.insertBsRouteChildInfo(bsRouteChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param bsRouteChildInfo å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo) |
| | | { |
| | | bsRouteChildInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | bsRouteChildInfo.setUpdateBy(getUserName()); |
| | | return bsRouteChildInfoMapper.updateBsRouteChildInfo(bsRouteChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çå·¥èºè·¯çº¿åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsRouteChildInfoByIds(Long[] ids) |
| | | { |
| | | return bsRouteChildInfoMapper.deleteBsRouteChildInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿åä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsRouteChildInfoById(Long id) |
| | | { |
| | | return bsRouteChildInfoMapper.deleteBsRouteChildInfoById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.utils.DateUtils; |
| | | import com.billion.common.utils.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.billion.main.bs.mapper.BsRouteInfoMapper; |
| | | import com.billion.main.bs.domain.BsRouteInfo; |
| | | import com.billion.main.bs.service.IBsRouteInfoService; |
| | | |
| | | import static org.apache.commons.lang3.SystemUtils.getUserName; |
| | | |
| | | /** |
| | | * å·¥èºè·¯çº¿Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-23 |
| | | */ |
| | | @Service |
| | | public class BsRouteInfoServiceImpl extends ServiceImpl<BsRouteInfoMapper, BsRouteInfo> implements IBsRouteInfoService |
| | | { |
| | | @Autowired |
| | | private BsRouteInfoMapper bsRouteInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿ä¸»é® |
| | | * @return å·¥èºè·¯çº¿ |
| | | */ |
| | | @Override |
| | | public BsRouteInfo selectBsRouteInfoById(Long id) |
| | | { |
| | | return bsRouteInfoMapper.selectBsRouteInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥èºè·¯çº¿å表 |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return å·¥èºè·¯çº¿ |
| | | */ |
| | | @Override |
| | | public List<BsRouteInfo> selectBsRouteInfoList(BsRouteInfo bsRouteInfo) |
| | | { |
| | | return bsRouteInfoMapper.selectBsRouteInfoList(bsRouteInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿ |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsRouteInfo(BsRouteInfo bsRouteInfo) |
| | | { |
| | | bsRouteInfo.setCreateTime(DateUtils.getNowDate()); |
| | | bsRouteInfo.setCreateBy(getUserName()); |
| | | bsRouteInfo.setDataSource("MES"); |
| | | return bsRouteInfoMapper.insertBsRouteInfo(bsRouteInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿ |
| | | * |
| | | * @param bsRouteInfo å·¥èºè·¯çº¿ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsRouteInfo(BsRouteInfo bsRouteInfo) |
| | | { |
| | | bsRouteInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | bsRouteInfo.setUpdateBy(getUserName()); |
| | | return bsRouteInfoMapper.updateBsRouteInfo(bsRouteInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿ |
| | | * |
| | | * @param ids éè¦å é¤çå·¥èºè·¯çº¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsRouteInfoByIds(Long[] ids) |
| | | { |
| | | return bsRouteInfoMapper.deleteBsRouteInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥èºè·¯çº¿ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥èºè·¯çº¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsRouteInfoById(Long id) |
| | | { |
| | | return bsRouteInfoMapper.deleteBsRouteInfoById(id); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.utils.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.billion.main.da.mapper.DaParamCollectionMapper; |
| | | import com.billion.main.da.domain.DaParamCollection; |
| | | import com.billion.main.da.service.IDaParamCollectionService; |
| | | |
| | | import static org.apache.commons.lang3.SystemUtils.getUserName; |
| | | |
| | | /** |
| | | * åæ°ééServiceä¸å¡å±å¤ç |
| | |
| | | public int insertDaParamCollection(DaParamCollection daParamCollection) |
| | | { |
| | | daParamCollection.setCollectTime(new Date()); |
| | | daParamCollection.setCreateBy(getUserName()); |
| | | return daParamCollectionMapper.insertDaParamCollection(daParamCollection); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.billion.main.bs.mapper.BsRouteChildInfoMapper"> |
| | | |
| | | <resultMap type="BsRouteChildInfo" id="BsRouteChildInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="locationCode" column="location_code" /> |
| | | <result property="locationName" column="location_name" /> |
| | | <result property="stepNo" column="step_no" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="routeCode" column="route_code" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsRouteChildInfoVo"> |
| | | select id, product_code, product_name, location_code, location_name, step_no, create_by, create_time, update_by, update_time, del_flag, route_code from bs_route_child_info |
| | | </sql> |
| | | |
| | | <select id="selectBsRouteChildInfoList" parameterType="BsRouteChildInfo" resultMap="BsRouteChildInfoResult"> |
| | | <include refid="selectBsRouteChildInfoVo"/> |
| | | <where> |
| | | <if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> |
| | | <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
| | | <if test="locationCode != null and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if> |
| | | <if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if> |
| | | <if test="routeCode != null and routeCode != ''"> and route_code = #{routeCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsRouteChildInfoById" parameterType="Long" resultMap="BsRouteChildInfoResult"> |
| | | <include refid="selectBsRouteChildInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsRouteChildInfo" parameterType="BsRouteChildInfo"> |
| | | insert into bs_route_child_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="productCode != null and productCode != ''">product_code,</if> |
| | | <if test="productName != null">product_name,</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code,</if> |
| | | <if test="locationName != null">location_name,</if> |
| | | <if test="stepNo != null">step_no,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="routeCode != null">route_code,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="productCode != null and productCode != ''">#{productCode},</if> |
| | | <if test="productName != null">#{productName},</if> |
| | | <if test="locationCode != null and locationCode != ''">#{locationCode},</if> |
| | | <if test="locationName != null">#{locationName},</if> |
| | | <if test="stepNo != null">#{stepNo},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="routeCode != null">#{routeCode},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsRouteChildInfo" parameterType="BsRouteChildInfo"> |
| | | update bs_route_child_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
| | | <if test="productName != null">product_name = #{productName},</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if> |
| | | <if test="locationName != null">location_name = #{locationName},</if> |
| | | <if test="stepNo != null">step_no = #{stepNo},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="routeCode != null">route_code = #{routeCode},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsRouteChildInfoById" parameterType="Long"> |
| | | delete from bs_route_child_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsRouteChildInfoByIds" parameterType="String"> |
| | | delete from bs_route_child_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.billion.main.bs.mapper.BsRouteInfoMapper"> |
| | | |
| | | <resultMap type="BsRouteInfo" id="BsRouteInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="routeCode" column="route_code" /> |
| | | <result property="routeName" column="route_name" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="version" column="version" /> |
| | | <result property="status" column="status" /> |
| | | <result property="dataSource" column="data_source" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsRouteInfoVo"> |
| | | select id, route_code, route_name, product_code, product_name, version, status, data_source, remark, create_by, create_time, update_by, update_time, del_flag from bs_route_info |
| | | </sql> |
| | | |
| | | <select id="selectBsRouteInfoList" parameterType="BsRouteInfo" resultMap="BsRouteInfoResult"> |
| | | <include refid="selectBsRouteInfoVo"/> |
| | | <where> |
| | | <if test="routeCode != null and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if> |
| | | <if test="routeName != null and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if> |
| | | <if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> |
| | | <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
| | | <if test="version != null and version != ''"> and version like concat('%', #{version}, '%')</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsRouteInfoById" parameterType="Long" resultMap="BsRouteInfoResult"> |
| | | <include refid="selectBsRouteInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsRouteInfo" parameterType="BsRouteInfo"> |
| | | insert into bs_route_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="routeCode != null and routeCode != ''">route_code,</if> |
| | | <if test="routeName != null">route_name,</if> |
| | | <if test="productCode != null and productCode != ''">product_code,</if> |
| | | <if test="productName != null">product_name,</if> |
| | | <if test="version != null">version,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="dataSource != null">data_source,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="routeCode != null and routeCode != ''">#{routeCode},</if> |
| | | <if test="routeName != null">#{routeName},</if> |
| | | <if test="productCode != null and productCode != ''">#{productCode},</if> |
| | | <if test="productName != null">#{productName},</if> |
| | | <if test="version != null">#{version},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="dataSource != null">#{dataSource},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsRouteInfo" parameterType="BsRouteInfo"> |
| | | update bs_route_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="routeCode != null and routeCode != ''">route_code = #{routeCode},</if> |
| | | <if test="routeName != null">route_name = #{routeName},</if> |
| | | <if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
| | | <if test="productName != null">product_name = #{productName},</if> |
| | | <if test="version != null">version = #{version},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="dataSource != null">data_source = #{dataSource},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsRouteInfoById" parameterType="Long"> |
| | | delete from bs_route_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsRouteInfoByIds" parameterType="String"> |
| | | delete from bs_route_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯å表 |
| | | export function listRouteChildInfo(query) { |
| | | return request({ |
| | | url: '/bs/routeChildInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯è¯¦ç» |
| | | export function getRouteChildInfo(id) { |
| | | return request({ |
| | | url: '/bs/routeChildInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | export function addRouteChildInfo(data) { |
| | | return request({ |
| | | url: '/bs/routeChildInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | export function updateRouteChildInfo(data) { |
| | | return request({ |
| | | url: '/bs/routeChildInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤å·¥èºè·¯çº¿åä¿¡æ¯ |
| | | export function delRouteChildInfo(id) { |
| | | return request({ |
| | | url: '/bs/routeChildInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢å·¥èºè·¯çº¿å表 |
| | | export function listRouteInfo(query) { |
| | | return request({ |
| | | url: '/bs/routeInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢å·¥èºè·¯çº¿è¯¦ç» |
| | | export function getRouteInfo(id) { |
| | | return request({ |
| | | url: '/bs/routeInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢å·¥èºè·¯çº¿ |
| | | export function addRouteInfo(data) { |
| | | return request({ |
| | | url: '/bs/routeInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹å·¥èºè·¯çº¿ |
| | | export function updateRouteInfo(data) { |
| | | return request({ |
| | | url: '/bs/routeInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤å·¥èºè·¯çº¿ |
| | | export function delRouteInfo(id) { |
| | | return request({ |
| | | url: '/bs/routeInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/main/route-data', |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['bs:routeChildInfo:list'], |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | | component: () => import('@/views/main/bs/routeChildInfo/index'), |
| | | name: 'Data', |
| | | meta: { title: 'å·¥èºè·¯çº¿è¯¦æ
', activeMenu: '/main/bs/routeChildInfo' } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/monitor/job-log', |
| | | component: Layout, |
| | | hidden: true, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="å·¥ä½ç¼ç " prop="locationCode"> |
| | | <el-input |
| | | v-model="queryParams.locationCode" |
| | | placeholder="请è¾å
¥å·¥ä½ç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½å称" prop="locationName"> |
| | | <el-input |
| | | v-model="queryParams.locationName" |
| | | 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-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">é«çº§æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | <transition name="fade"> |
| | | <div v-if="advancedSearchVisible" class="advanced-search"> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input |
| | | v-model="queryParams.productCode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input |
| | | v-model="queryParams.productName" |
| | | placeholder="请è¾å
¥äº§åå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æµç¨ç¼ç " prop="routeCode"> |
| | | <el-input |
| | | v-model="queryParams.routeCode" |
| | | placeholder="请è¾å
¥æµç¨ç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | </transition> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['bs:routeChildInfo: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="['bs:routeChildInfo: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="['bs:routeChildInfo: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="['bs:routeChildInfo:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-close" |
| | | size="mini" |
| | | @click="handleClose" |
| | | >å
³é</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-descriptions class="margin-top" :column="4" label-style="font-weight: bold" content-style="font-weight: bold"> |
| | | <el-descriptions-item label="æµç¨ç¼ç ">{{this.queryParams.routeCode}}</el-descriptions-item> |
| | | <el-descriptions-item label="æµç¨å称">{{this.routeInfo[0].routeName}}</el-descriptions-item> |
| | | <el-descriptions-item label="产åç¼ç ">{{this.routeInfo[0].productCode}}</el-descriptions-item> |
| | | <el-descriptions-item label="产åå称">{{this.routeInfo[0].productName}}</el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="routeChildInfoList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å·¥ä½ç¼ç " align="center" prop="locationCode" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å·¥ä½å称" align="center" prop="locationName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å 工顺åº" align="center" prop="stepNo" /> |
| | | <el-table-column show-overflow-tooltip="true" label="产åç¼ç " align="center" prop="productCode" /> |
| | | <el-table-column show-overflow-tooltip="true" label="产åå称" align="center" prop="productName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å建ç¨æ·" align="center" prop="createBy" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æ´æ¹ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column label="æ´æ¹æ¶é´" align="center" prop="updateTime" width="180"> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æµç¨ç¼ç " align="center" prop="routeCode" /> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹å·¥èºè·¯çº¿åä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <!-- <el-form-item label="主é®id" prop="id">--> |
| | | <!-- <el-input v-model="form.id" placeholder="请è¾å
¥ä¸»é®id" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="æµç¨ç¼ç " prop="routeCode"> |
| | | <el-input :disabled="true" v-model="form.routeCode" placeholder="请è¾å
¥æµç¨ç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input :disabled="true" v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input :disabled="true" v-model="form.productName" placeholder="请è¾å
¥äº§åå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½ç¼ç " prop="locationCode"> |
| | | <el-input v-model="form.locationCode" placeholder="请è¾å
¥å·¥ä½ç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½å称" prop="locationName"> |
| | | <el-input v-model="form.locationName" placeholder="请è¾å
¥å·¥ä½å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="å 工顺åº" prop="stepNo"> |
| | | <el-input v-model="form.stepNo" 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 { listRouteChildInfo, getRouteChildInfo, delRouteChildInfo, addRouteChildInfo, updateRouteChildInfo } from "@/api/main/bs/routeChildInfo"; |
| | | import {listRouteInfo} from "@/api/main/bs/routeInfo"; |
| | | |
| | | export default { |
| | | name: "RouteChildInfo", |
| | | data() { |
| | | return { |
| | | advancedSearchVisible: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // å·¥èºè·¯çº¿åä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | routeChildInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productCode: null, |
| | | productName: null, |
| | | locationCode: null, |
| | | locationName: null, |
| | | routeCode: null |
| | | }, |
| | | // 表ååæ° |
| | | form: { |
| | | routeCode: "12323", |
| | | }, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | locationCode: [ |
| | | { required: true, message: "å·¥ä½ç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | }, |
| | | //ç¶é¡µé¢ä¿¡æ¯ |
| | | routeInfo: { |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | let routeCode = this.$route.query.routeCode; |
| | | this.queryParams.routeCode = routeCode; |
| | | this.headerInformation(); |
| | | this.getList(); |
| | | console.log(this.routeInfo) |
| | | }, |
| | | methods: { |
| | | /** å·¥èºæµç¨è¡¨å¤´ä¿¡æ¯ */ |
| | | headerInformation() { |
| | | listRouteInfo(this.queryParams).then(response => { |
| | | this.routeInfo = response.rows; |
| | | }); |
| | | }, |
| | | toggleAdvancedSearch() { |
| | | this.advancedSearchVisible = !this.advancedSearchVisible; |
| | | }, |
| | | /** è¿åæé®æä½ */ |
| | | handleClose() { |
| | | const obj = { path: "/main/bs/routeInfo" }; |
| | | this.$tab.closeOpenPage(obj); |
| | | }, |
| | | /** æ¥è¯¢å·¥èºè·¯çº¿åä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listRouteChildInfo(this.queryParams).then(response => { |
| | | this.routeChildInfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | productCode: this.routeInfo[0].productCode, |
| | | productName: this.routeInfo[0].productName, |
| | | locationCode: null, |
| | | locationName: null, |
| | | stepNo: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null, |
| | | delFlag: null, |
| | | routeCode: this.queryParams.routeCode |
| | | }; |
| | | 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() { |
| | | console.log(this.routeInfo) |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å å·¥èºè·¯çº¿åä¿¡æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getRouteChildInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹å·¥èºè·¯çº¿åä¿¡æ¯"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateRouteChildInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addRouteChildInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤').then(function() { |
| | | return delRouteChildInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/routeChildInfo/export', { |
| | | ...this.queryParams |
| | | }, `routeChildInfo_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="æµç¨ç¼ç " prop="routeCode"> |
| | | <el-input |
| | | v-model="queryParams.routeCode" |
| | | placeholder="请è¾å
¥æµç¨ç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input |
| | | v-model="queryParams.productCode" |
| | | 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-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">é«çº§æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | <transition name="fade"> |
| | | <div v-if="advancedSearchVisible" class="advanced-search"> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input |
| | | v-model="queryParams.productName" |
| | | placeholder="请è¾å
¥äº§åå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æµç¨å称" prop="routeName"> |
| | | <el-input |
| | | v-model="queryParams.routeName" |
| | | placeholder="请è¾å
¥æµç¨å称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="version"> |
| | | <el-input |
| | | v-model="queryParams.version" |
| | | 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.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | </transition> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['bs:routeInfo: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="['bs:routeInfo: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="['bs:routeInfo: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="['bs:routeInfo:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="routeInfoList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <!-- <el-table-column show-overflow-tooltip="true" label="æµç¨ç¼ç " align="center" prop="routeCode" />--> |
| | | <el-table-column label="æµç¨ç¼ç " align="center" :show-overflow-tooltip="true"> |
| | | <template slot-scope="scope"> |
| | | <router-link :to="{path: '/main/route-data/index/', query: {routeCode: scope.row.routeCode} }" class="link-type"> |
| | | <span>{{ scope.row.routeCode }}</span> |
| | | </router-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æµç¨å称" align="center" prop="routeName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="产åç¼ç " align="center" prop="productCode" /> |
| | | <el-table-column show-overflow-tooltip="true" label="产åå称" align="center" prop="productName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="çæ¬" align="center" prop="version" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æ°æ®æ¥æº" align="center" prop="dataSource" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å¤æ³¨" align="center" prop="remark" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å建ç¨æ·" align="center" prop="createBy" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æ´æ¹ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column label="æ´æ¹æ¶é´" align="center" prop="updateTime" width="180"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹å·¥èºè·¯çº¿å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <!-- <el-form-item label="主é®id" prop="id">--> |
| | | <!-- <el-input v-model="form.id" placeholder="请è¾å
¥ä¸»é®id" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="æµç¨ç¼ç " prop="routeCode"> |
| | | <el-input v-model="form.routeCode" placeholder="请è¾å
¥æµç¨ç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="æµç¨å称" prop="routeName"> |
| | | <el-input v-model="form.routeName" placeholder="请è¾å
¥æµç¨å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input v-model="form.productName" placeholder="请è¾å
¥äº§åå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="version"> |
| | | <el-input v-model="form.version" placeholder="请è¾å
¥çæ¬" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="æ°æ®æ¥æº" prop="dataSource">--> |
| | | <!-- <el-input v-model="form.dataSource" placeholder="请è¾å
¥æ°æ®æ¥æº" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="å¤æ³¨" prop="remark"> |
| | | <el-input v-model="form.remark" 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 { listRouteInfo, getRouteInfo, delRouteInfo, addRouteInfo, updateRouteInfo } from "@/api/main/bs/routeInfo"; |
| | | |
| | | export default { |
| | | name: "RouteInfo", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | advancedSearchVisible: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // å·¥èºè·¯çº¿è¡¨æ ¼æ°æ® |
| | | routeInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | routeCode: null, |
| | | routeName: null, |
| | | productCode: null, |
| | | productName: null, |
| | | version: null, |
| | | status: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | routeCode: [ |
| | | { required: true, message: "æµç¨ç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | productCode: [ |
| | | { required: true, message: "产åç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | toggleAdvancedSearch() { |
| | | this.advancedSearchVisible = !this.advancedSearchVisible; |
| | | }, |
| | | /** æ¥è¯¢å·¥èºè·¯çº¿å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listRouteInfo(this.queryParams).then(response => { |
| | | this.routeInfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | routeCode: null, |
| | | routeName: null, |
| | | productCode: null, |
| | | productName: null, |
| | | version: null, |
| | | status: "0", |
| | | dataSource: null, |
| | | remark: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null, |
| | | delFlag: 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.title = "æ·»å å·¥èºè·¯çº¿"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getRouteInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹å·¥èºè·¯çº¿"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateRouteInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addRouteInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤').then(function() { |
| | | return delRouteInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/routeInfo/export', { |
| | | ...this.queryParams |
| | | }, `routeInfo_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |