Merge remote-tracking branch 'origin/master'
| | |
| | | <artifactId>gson</artifactId> |
| | | <version>2.10.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.mybatis</groupId> |
| | | <artifactId>mybatis</artifactId> |
| | | <version>3.5.13</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>easyexcel</artifactId> |
| | | <version>3.1.3</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.jcdm</groupId> |
| | | <artifactId>jcdm-system</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.orderScheduling.common; |
| | | |
| | | public class Constants { |
| | | |
| | | public static final String DATA1 = "æ§ç´§æ°æ®"; |
| | | public static final String DATA2 = "ç¸æºæ£æµ"; |
| | | public static final String DATA3 = "å¤æ¼æ£æµ"; |
| | | public static final String DATA4 = "æºæ²¹å 注æ°æ®"; |
| | | public static final String DATA5 = "å·¥ä½ç»æ"; |
| | | } |
| | |
| | | package com.jcdm.main.bs.orderScheduling.controller; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.R; |
| | | import com.jcdm.common.core.domain.entity.SysDictData; |
| | | import com.jcdm.common.utils.DictUtils; |
| | | import com.jcdm.common.utils.StringUtils; |
| | | import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO; |
| | | import com.jcdm.main.bs.orderScheduling.vo.LineChartVO; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.system.service.ISysDictDataService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | @Autowired |
| | | private IBsOrderSchedulingService bsOrderSchedulingService; |
| | | |
| | | |
| | | @Resource |
| | | private ISysDictDataService iSysDictDataService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åæ产å表 |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åæ产å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')") |
| | | @GetMapping("/getFollowReportList") |
| | | public R getFollowReportList(BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | FollowReportVO followReportList = bsOrderSchedulingService.getFollowReportList(bsOrderScheduling); |
| | | return R.ok(followReportList); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('bs:orderScheduling:export')") |
| | | @Log(title = "追溯æ¥è¡¨å¯¼åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportFollow") |
| | | public void exportFollow(HttpServletResponse response, BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | FollowReportVO followReportList = bsOrderSchedulingService.getFollowReportList(bsOrderScheduling); |
| | | List<SysDictData> allDict = iSysDictDataService.selectDictDataList(null); |
| | | if (CollUtil.isNotEmpty(followReportList.getMainList())){ |
| | | List<SysDictData> dict1 = allDict.stream().filter(x -> "material_type".equals(x.getDictType())).collect(Collectors.toList()); |
| | | List<SysDictData> dict2 = allDict.stream().filter(x -> "order_scheduling_produce_status".equals(x.getDictType())).collect(Collectors.toList()); |
| | | for (BsOrderScheduling orderScheduling : followReportList.getMainList()) { |
| | | if (CollUtil.isNotEmpty(dict1)){ |
| | | List<SysDictData> collect = dict1.stream().filter(x -> x.getDictValue().equals(orderScheduling.getProductType())).collect(Collectors.toList()); |
| | | if (CollUtil.isNotEmpty(collect)){ |
| | | SysDictData sysDictData1 = collect.get(0); |
| | | orderScheduling.setProductTypeString(sysDictData1.getDictLabel()); |
| | | } |
| | | } |
| | | if (CollUtil.isNotEmpty(dict2)){ |
| | | List<SysDictData> collect = dict2.stream().filter(x -> x.getDictValue().equals(orderScheduling.getProductionStatus())).collect(Collectors.toList()); |
| | | if (CollUtil.isNotEmpty(collect)){ |
| | | SysDictData sysDictData1 = collect.get(0); |
| | | orderScheduling.setProductionStatusString(sysDictData1.getDictLabel()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | String fileName = "追溯æ¥è¡¨"; |
| | | try { |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build(); |
| | | WriteSheet mainSheet = EasyExcel.writerSheet(0, "订åæ产") |
| | | .head(BsOrderScheduling.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .build(); |
| | | WriteSheet sheet1 = EasyExcel.writerSheet(1, "æ§ç´§æ°æ®") |
| | | .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .build(); |
| | | WriteSheet sheet2 = EasyExcel.writerSheet(2, "ç¸æºæ£æµ") |
| | | .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .build(); |
| | | WriteSheet sheet3 = EasyExcel.writerSheet(3, "å¤æ¼æ£æµ") |
| | | .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .build(); |
| | | WriteSheet sheet4 = EasyExcel.writerSheet(4, "æºæ²¹å 注") |
| | | .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .build(); |
| | | WriteSheet sheet5 = EasyExcel.writerSheet(5, "å·¥ä½ç»æ") |
| | | .head(DaPassingStationCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .build(); |
| | | excelWriter.write(followReportList.getMainList(),mainSheet); |
| | | excelWriter.write(followReportList.getList1(),sheet1); |
| | | excelWriter.write(followReportList.getList2(),sheet2); |
| | | excelWriter.write(followReportList.getList3(),sheet3); |
| | | excelWriter.write(followReportList.getList4(),sheet4); |
| | | excelWriter.write(followReportList.getList5(),sheet5); |
| | | response.setContentType("application/vnd.ms-excel;charset=utf-8"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("Content-Disposition","attachment;filename="+fileName+".xlsx"); |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸çº¿æ°é |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')") |
| | |
| | | package com.jcdm.main.bs.orderScheduling.domain; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.HeadFontStyle; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | |
| | | * @date 2024-01-13 |
| | | */ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | @ColumnWidth(16) |
| | | @HeadRowHeight(14) |
| | | @HeadFontStyle(fontHeightInPoints = 11) |
| | | public class BsOrderScheduling extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | |
| | | /** 订åç¼å· */ |
| | | @Excel(name = "订åç¼å·") |
| | | @ExcelProperty(value = "订åç¼å·", index = 0) |
| | | private String orderNo; |
| | | |
| | | /** åå¨æºå· */ |
| | | @Excel(name = "åå¨æºå·") |
| | | @Excel(name = "ç®±ä½ç¼ç ") |
| | | @ExcelProperty(value = "ç®±ä½ç¼ç ", index = 1) |
| | | private String engineNo; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelIgnore |
| | | private List<String> engineNoList; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelIgnore |
| | | private List<String> engineNoListExcel; |
| | | |
| | | |
| | | /** 产åç±»å */ |
| | | @Excel(name = "产åç±»å") |
| | | private String productType; |
| | | |
| | | @ExcelProperty(value = "产åç±»å", index = 2) |
| | | private String productTypeString; |
| | | |
| | | /** æºå */ |
| | | @Excel(name = "æºå") |
| | | @ExcelProperty(value = "æºå", index = 3) |
| | | private String model; |
| | | |
| | | /** ç产ç¶æ */ |
| | | @Excel(name = "ç产ç¶æ") |
| | | private String productionStatus; |
| | | |
| | | @ExcelProperty(value = "ç产ç¶æ", index = 4) |
| | | private String productionStatusString; |
| | | |
| | | /** å·¥æ¶ */ |
| | | @Excel(name = "å·¥æ¶") |
| | | @ExcelProperty(value = "å·¥æ¶", index = 5) |
| | | private String workingHours; |
| | | |
| | | /** å½åå·¥ä½ */ |
| | | @Excel(name = "å½åå·¥ä½") |
| | | @ExcelProperty(value = "å½åå·¥ä½", index = 6) |
| | | private String currentWorkstation; |
| | | |
| | | /** è´¨éç¶æ */ |
| | | @Excel(name = "è´¨éç¶æ") |
| | | @ExcelProperty(value = "è´¨éç¶æ", index = 7) |
| | | private String qualityStatus; |
| | | |
| | | /** æ¯å¦æå° */ |
| | |
| | | |
| | | /** 10æ¥å·¥ */ |
| | | @Excel(name = "10æ¥å·¥") |
| | | @ExcelIgnore |
| | | private String report10; |
| | | |
| | | /** 20æ¥å·¥ */ |
| | | @Excel(name = "20æ¥å·¥") |
| | | @ExcelIgnore |
| | | private String report20; |
| | | |
| | | /** åç®±ä¸çº¿ */ |
| | | @Excel(name = "åç®±ä¸çº¿") |
| | | @ExcelIgnore |
| | | private String combinedBoxTime; |
| | | |
| | | /** æ»è£
ä¸çº¿ */ |
| | | @Excel(name = "æ»è£
ä¸çº¿") |
| | | @ExcelIgnore |
| | | private String finalAssemblyTime; |
| | | |
| | | /** æä½äºº */ |
| | | @Excel(name = "æä½äºº") |
| | | @ExcelProperty(value = "æä½äºº", index = 14) |
| | | private String operator; |
| | | |
| | | /** æä½æ¶é´ */ |
| | | @Excel(name = "æä½æ¶é´") |
| | | @ExcelProperty(value = "æä½æ¶é´", index = 15) |
| | | private String operateTime; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ") |
| | | @ExcelIgnore |
| | | private String status; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | @ExcelIgnore |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | @ExcelIgnore |
| | | private String spareField2; |
| | | |
| | | /** é¢çå段3 */ |
| | | @Excel(name = "é¢çå段3") |
| | | @ExcelIgnore |
| | | private String spareField3; |
| | | |
| | | /** é¢çå段4 */ |
| | | @Excel(name = "é¢çå段4") |
| | | @ExcelIgnore |
| | | private String spareField4; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | @ExcelIgnore |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | @ExcelIgnore |
| | | private String updateUser; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | @ExcelIgnore |
| | | private String remarks; |
| | | |
| | | /** CVTæ¥å·¥ */ |
| | | @Excel(name = "CVTæ¥å·¥") |
| | | @ExcelIgnore |
| | | private String report30; |
| | | |
| | | @ExcelIgnore |
| | | private String[] dateConditions; |
| | | |
| | | @ExcelIgnore |
| | | private String startTime; |
| | | |
| | | @ExcelIgnore |
| | | private String endTime; |
| | | |
| | | /** åç®±ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "åç®±ä¸çº¿æ¶é´") |
| | | @ExcelProperty(value = "åç®±ä¸çº¿æ¶é´", index = 8) |
| | | @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date boxClosingOnlineTime; |
| | | |
| | | /** åç®±ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "åç®±ä¸çº¿æ¶é´") |
| | | @ExcelProperty(value = "åç®±ä¸çº¿æ¶é´", index = 9) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date closingBoxOfflineTime; |
| | | |
| | | /** æ»è£
ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "æ»è£
ä¸çº¿æ¶é´") |
| | | @ExcelProperty(value = "æ»è£
ä¸çº¿æ¶é´", index =10) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date finalAssemblyLaunchTime; |
| | | |
| | | /** æ»è£
ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "æ»è£
ä¸çº¿æ¶é´") |
| | | @ExcelProperty(value = "æ»è£
ä¸çº¿æ¶é´", index = 11) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date finalAssemblyOfflineTime; |
| | | |
| | | /** CVTä¸çº¿æ¶é´ */ |
| | | @Excel(name = "CVTä¸çº¿æ¶é´") |
| | | @ExcelProperty(value = "CVTä¸çº¿æ¶é´", index = 12) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cvtLaunchTime; |
| | | |
| | | /** CVTä¸çº¿æ¶é´ */ |
| | | @Excel(name = "CVTä¸çº¿æ¶é´") |
| | | @ExcelProperty(value = "CVTä¸çº¿æ¶é´", index = 13) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cvtOfflineTime; |
| | | |
| | | @TableField(exist = false) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelIgnore |
| | | private LocalDateTime startQuery; |
| | | |
| | | @TableField(exist = false) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelIgnore |
| | | private LocalDateTime endQuery; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelIgnore |
| | | private String queryField; |
| | | |
| | | public Date getBoxClosingOnlineTime() { |
| | |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO; |
| | | import com.jcdm.main.bs.orderScheduling.vo.LineChartVO; |
| | | |
| | | /** |
| | |
| | | * @return 订åæ产éå |
| | | */ |
| | | public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling); |
| | | public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling); |
| | | public List<LineChartVO> getOffLineNum(); |
| | | |
| | | /** |
| | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.common.utils.StringUtils; |
| | | import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery; |
| | | import com.jcdm.main.bs.orderScheduling.common.Constants; |
| | | import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper; |
| | | import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; |
| | | import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO; |
| | | import com.jcdm.main.bs.orderScheduling.vo.LineChartVO; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper; |
| | | import com.jcdm.main.da.paramCollection.service.impl.DaParamCollectionServiceImpl; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | |
| | | { |
| | | @Autowired |
| | | private BsOrderSchedulingMapper bsOrderSchedulingMapper; |
| | | |
| | | @Resource |
| | | private DaParamCollectionMapper daParamCollectionMapper; |
| | | |
| | | @Resource |
| | | private DaPassingStationCollectionMapper daPassingStationCollectionMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åæ产 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | FollowReportVO vo = new FollowReportVO(); |
| | | if(bsOrderScheduling.getDateConditions()!=null){ |
| | | String[] conditions = bsOrderScheduling.getDateConditions(); |
| | | bsOrderScheduling.setStartTime(conditions[0]); |
| | | bsOrderScheduling.setEndTime(conditions[1]); |
| | | } |
| | | //主表æ°æ® |
| | | List<BsOrderScheduling> mainList = bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling); |
| | | vo.setMainList(mainList); |
| | | List<String> engineNoList = mainList.stream().map(BsOrderScheduling::getEngineNo).distinct().collect(Collectors.toList()); |
| | | List<DaParamCollection> allChildList = new ArrayList<>(); |
| | | List<DaPassingStationCollection> collect5 = new ArrayList<>(); |
| | | if (CollUtil.isNotEmpty(engineNoList)){ |
| | | allChildList = daParamCollectionMapper.getListBySfcCode(engineNoList); |
| | | collect5 = daPassingStationCollectionMapper.getListBySfcCode(engineNoList); |
| | | } |
| | | if (CollUtil.isNotEmpty(allChildList)){ |
| | | //æ¿å°ææåæ°æ® |
| | | List<DaParamCollection> collect1 = allChildList.stream().filter(x -> Constants.DATA1.equals(x.getType())).collect(Collectors.toList()); |
| | | List<DaParamCollection> collect2 = allChildList.stream().filter(x -> Constants.DATA2.equals(x.getType())).collect(Collectors.toList()); |
| | | List<DaParamCollection> collect3 = allChildList.stream().filter(x -> Constants.DATA3.equals(x.getType())).collect(Collectors.toList()); |
| | | List<DaParamCollection> collect4 = allChildList.stream().filter(x -> Constants.DATA4.equals(x.getType())).collect(Collectors.toList()); |
| | | vo.setList1(collect1); |
| | | vo.setList2(collect2); |
| | | vo.setList3(collect3); |
| | | vo.setList4(collect4); |
| | | } |
| | | vo.setList5(collect5); |
| | | return vo; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<LineChartVO> getOffLineNum() |
| | | { |
| | | List<LineChartVO> result = new ArrayList<>(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.orderScheduling.vo; |
| | | |
| | | import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FollowReportVO { |
| | | |
| | | List<BsOrderScheduling> mainList; |
| | | private List<DaParamCollection> list1; |
| | | private List<DaParamCollection> list2; |
| | | private List<DaParamCollection> list3; |
| | | private List<DaParamCollection> list4; |
| | | private List<DaPassingStationCollection> list5; |
| | | } |
| | |
| | | package com.jcdm.main.da.paramCollection.domain; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.HeadFontStyle; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | 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; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°éé对象 da_param_collection |
| | |
| | | * @author yyt |
| | | * @date 2023-12-13 |
| | | */ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | @ColumnWidth(16) |
| | | @HeadRowHeight(14) |
| | | @HeadFontStyle(fontHeightInPoints = 11) |
| | | public class DaParamCollection extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | private String workOrderNo; |
| | | |
| | | /** æ»æåºåå· */ |
| | | @Excel(name = "æ»æåºåå·") |
| | | @Excel(name = "ç®±ä½ç¼ç ") |
| | | @ExcelProperty(value = "ç®±ä½ç¼ç ", index = 0) |
| | | private String sfcCode; |
| | | |
| | | /** 产åç¼å· */ |
| | |
| | | |
| | | /** å·¥ä½ç¼å· */ |
| | | @Excel(name = "å·¥ä½ç¼å·") |
| | | @ExcelProperty(value = "å·¥ä½", index = 1) |
| | | private String locationCode; |
| | | |
| | | /** 设å¤ç¼å· */ |
| | |
| | | |
| | | /** åæ°å¼ */ |
| | | @Excel(name = "åæ°å¼") |
| | | @ExcelProperty(value = "åæ°å¼", index = 3) |
| | | private String paramValue; |
| | | |
| | | /** åæ°ä¸é */ |
| | |
| | | |
| | | /** ééæ¶é´ */ |
| | | @Excel(name = "ééæ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelProperty(value = "ééæ¶é´", index = 5) |
| | | private Date collectionTime; |
| | | |
| | | /** é¢çå段1 */ |
| | |
| | | |
| | | /** åæ°å称 */ |
| | | @Excel(name = "åæ°å称") |
| | | @ExcelProperty(value = "åæ°å称", index = 2) |
| | | private String paramName; |
| | | |
| | | /** åä½ */ |
| | | @Excel(name = "åä½") |
| | | @ExcelProperty(value = "åä½", index = 4) |
| | | private String unit; |
| | | |
| | | /** ç±»å */ |
| | |
| | | package com.jcdm.main.da.paramCollection.mapper; |
| | | |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection); |
| | | |
| | | public List<DaParamCollection> getListBySfcCode(@Param("engineNoList") List<String> engineNoList); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.HeadFontStyle; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 产åè¿ç«éé对象 da_passing_station_collection |
| | |
| | | * @date 2023-12-12 |
| | | */ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | @ColumnWidth(16) |
| | | @HeadRowHeight(14) |
| | | @HeadFontStyle(fontHeightInPoints = 11) |
| | | public class DaPassingStationCollection extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | |
| | | /** å·¥åç¼å· */ |
| | | @Excel(name = "å·¥åç¼å·") |
| | | @ExcelProperty(value = "å·¥åç¼å·", index = 0) |
| | | private String workOrderNo; |
| | | |
| | | /** æ»æåºåå· */ |
| | | @Excel(name = "æ»æåºåå·") |
| | | @Excel(name = "ç®±ä½ç¼ç ") |
| | | @ExcelProperty(value = "ç®±ä½ç¼ç ", index = 1) |
| | | private String sfcCode; |
| | | |
| | | /** 产åç¼å· */ |
| | | @Excel(name = "产åç¼å·") |
| | | @ExcelProperty(value = "产åç¼å·", index = 2) |
| | | private String productCode; |
| | | |
| | | /** 产线ç¼å· */ |
| | | @Excel(name = "产线ç¼å·") |
| | | @ExcelProperty(value = "产线ç¼å·", index = 3) |
| | | private String productionLine; |
| | | |
| | | /** å·¥ä½ç¼å· */ |
| | | @Excel(name = "å·¥ä½ç¼å·") |
| | | @ExcelProperty(value = "å·¥ä½ç¼å·", index = 4) |
| | | private String locationCode; |
| | | |
| | | /** 设å¤ç¼å· */ |
| | |
| | | /** å
¥ç«æ¶é´ */ |
| | | // @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å
¥ç«æ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelProperty(value = "å
¥ç«æ¶é´", index = 5) |
| | | private Date inboundTime; |
| | | |
| | | /** åºç«æ¶é´ */ |
| | | // @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "åºç«æ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelProperty(value = "åºç«æ¶é´", index = 6) |
| | | private Date outboundTime; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | |
| | | /** åºç«æ¯å¦åæ ¼ */ |
| | | @Excel(name = "åºç«æ¯å¦åæ ¼") |
| | | @ExcelProperty(value = "æ¯å¦åæ ¼", index = 7) |
| | | private String outRsSign; |
| | | |
| | | /** åºç«NGåå */ |
| | | @Excel(name = "åºç«NGåå ") |
| | | @ExcelProperty(value = "NGåå ", index = 8) |
| | | private String outMsgSign; |
| | | |
| | | /** ééæ¶é´ */ |
| | | // @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "ééæ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelProperty(value = "ééæ¶é´", index = 9) |
| | | private Date collectionTime; |
| | | |
| | | /** é¢çå段1 */ |
| | |
| | | |
| | | /** èææ¶é´ */ |
| | | @Excel(name = "èææ¶é´") |
| | | @ExcelProperty(value = "èææ¶é´", index = 10) |
| | | private String beatTime; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | package com.jcdm.main.da.passingStationCollection.mapper; |
| | | |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public List<DaPassingStationCollection> selectDaPassingStationCollectionList(DaPassingStationCollection daPassingStationCollection); |
| | | |
| | | public List<DaPassingStationCollection> getListBySfcCode(@Param("engineNoList") List<String> engineNoList); |
| | | |
| | | /** |
| | | * æ°å¢äº§åè¿ç«éé |
| | | * |
| | |
| | | <if test="cvtLaunchTime != null and cvtLaunchTime != ''"> and cvt_launch_time = #{cvtLaunchTime}</if> |
| | | <if test="cvtOfflineTime != null and cvtOfflineTime != ''"> and cvt_offline_time = #{cvtOfflineTime}</if> |
| | | <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> and cvt_offline_time between #{startTime} and #{endTime}</if> |
| | | |
| | | <if test="engineNoList != null and engineNoList.size() > 0"> |
| | | and engine_no in |
| | | <foreach collection="engineNoList" open="(" close=")" separator="," item="engine"> |
| | | #{engine} |
| | | </foreach> |
| | | </if> |
| | | <if test="engineNoListExcel != null and engineNoListExcel.size() > 0"> |
| | | and engine_no in |
| | | <foreach collection="engineNoListExcel" open="(" close=")" separator="," item="engine"> |
| | | #{engine} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <include refid="selectDaParamCollectionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="getListBySfcCode" resultMap="DaParamCollectionResult"> |
| | | <include refid="selectDaParamCollectionVo"/> |
| | | where sfc_code in |
| | | <foreach collection="engineNoList" open="(" close=")" item="code" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertDaParamCollection" parameterType="DaParamCollection"> |
| | | insert into da_param_collection |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <include refid="selectDaPassingStationCollectionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="getListBySfcCode" |
| | | resultMap="DaPassingStationCollectionResult"> |
| | | <include refid="selectDaPassingStationCollectionVo"/> |
| | | where sfc_code in |
| | | <foreach collection="engineNoList" open="(" close=")" item="code" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertDaPassingStationCollection" parameterType="DaPassingStationCollection"> |
| | | insert into da_passing_station_collection |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | params: query |
| | | }) |
| | | } |
| | | //æ¥è¯¢è¿½æº¯æ¥è¡¨ |
| | | export function getFollowReport(query) { |
| | | return request({ |
| | | url: '/bs/orderScheduling/getFollowReportList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | //æ¥è¯¢å½å¤©ç产æ°æ® |
| | | export function getOffLineNum() { |
| | | return request({ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card"> |
| | | <div class="headClass"> |
| | | <div style="display: flex;height: 20px"> |
| | | <div> |
| | | <span style="font-size: large; font-weight: bold; text-decoration: underline; margin-bottom: 10px">追溯æ¥è¡¨</span> |
| | | </div> |
| | | <div style="margin-left: 30%"> |
| | | <el-form :inline="true" :model="queryParams" class="myFrom" size="mini"> |
| | | <el-form-item label="订åç¼å·"> |
| | | <el-input v-model="queryParams.orderNo" placeholder="订åç¼å·"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç®±ä½ç¼ç "> |
| | | <el-input v-model="queryParams.engineNo" placeholder="ç®±ä½ç¼ç "> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" @click="getList">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-download" style="background-color: #6dbf6d" @click="exportReport">导åºæ¥è¡¨</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | <div style="margin-top: 10px"> |
| | | <el-table |
| | | style="width: 100%;" |
| | | border height="190" |
| | | v-loading="loading" |
| | | highlight-current-row |
| | | :data="orderSchedulingList" |
| | | @selection-change="handleSelectionChange" |
| | | @current-change="handleCurrentChange"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"></el-table-column> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="订åç¼å·" align="center" prop="orderNo" width="130"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="ç®±ä½ç¼ç " align="center" prop="engineNo" width="150"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="产åç±»å" align="center" prop="productType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.material_type" :value="scope.row.productType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æºå" align="center" prop="model"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="ç产ç¶æ" align="center" prop="productionStatus"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥æ¶" align="center" prop="workingHours"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="å½åå·¥ä½" align="center" prop="currentWorkstation"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="è´¨éç¶æ" align="center" prop="qualityStatus"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åç®±ä¸çº¿æ¶é´" align="center" prop="boxClosingOnlineTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="åç®±ä¸çº¿æ¶é´" align="center" prop="closingBoxOfflineTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»è£
ä¸çº¿æ¶é´" align="center" prop="finalAssemblyLaunchTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»è£
ä¸çº¿æ¶é´" align="center" prop="finalAssemblyOfflineTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="CVTä¸çº¿æ¶é´" align="center" prop="cvtLaunchTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="CVTä¸çº¿æ¶é´" align="center" prop="cvtOfflineTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½äºº" align="center" prop="operator"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="æä½æ¶é´" align="center" prop="operateTime" width="160"> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getMainList" |
| | | /> |
| | | </el-card> |
| | | |
| | | <div> |
| | | <el-tabs type="border-card"> |
| | | <el-tab-pane> |
| | | <span slot="label"><i class="el-icon-date"></i>æ§ç´§æ°æ®</span> |
| | | <report1 :list1 = this.list1></report1> |
| | | </el-tab-pane> |
| | | <el-tab-pane> |
| | | <span slot="label"><i class="el-icon-date"></i>ç¸æºæ£æµ</span> |
| | | <report2 :list2 = this.list2></report2> |
| | | </el-tab-pane> |
| | | <el-tab-pane> |
| | | <span slot="label"><i class="el-icon-date"></i>å¤æ¼æ£æµ</span> |
| | | <report3 :list3 = this.list3></report3> |
| | | </el-tab-pane> |
| | | <el-tab-pane> |
| | | <span slot="label"><i class="el-icon-date"></i>æºæ²¹å 注</span> |
| | | <report4 :list4 = this.list4></report4> |
| | | </el-tab-pane> |
| | | <el-tab-pane> |
| | | <span slot="label"><i class="el-icon-date"></i>å·¥ä½ç»æ</span> |
| | | <report5 :list5 = this.list5></report5> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import report1 from "./report1"; |
| | | import {listOrderScheduling, getFollowReport} from "../../../../api/main/bs/orderScheduling/orderScheduling"; |
| | | import report2 from "./report2"; |
| | | import report3 from "./report3"; |
| | | import report4 from "./report4"; |
| | | import report5 from "./report5"; |
| | | export default { |
| | | name: "index", |
| | | components: { report1, report2, report3, report4, report5,}, |
| | | dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'], |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | total: 0, |
| | | orderSchedulingList: [], |
| | | list1: [], |
| | | list2: [], |
| | | list3: [], |
| | | list4: [], |
| | | list5: [], |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | orderNo: null, |
| | | engineNo: null, |
| | | productType: null, |
| | | model: null, |
| | | productionStatus: null, |
| | | workingHours: null, |
| | | currentWorkstation: null, |
| | | qualityStatus: null, |
| | | whetherOrPrint: null, |
| | | report10: null, |
| | | report20: null, |
| | | combinedBoxTime: null, |
| | | finalAssemblyTime: null, |
| | | operator: null, |
| | | operateTime: null, |
| | | status: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | remarks: null, |
| | | dateConditions: [], |
| | | engineNoList: [], |
| | | engineNoListExcel: [] |
| | | }, |
| | | multipleSelection: [], |
| | | multipleSelectionExcel: [], |
| | | currentRow: null |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | let workOrderNo = this.$route.query.workOrderNo; |
| | | this.queryParams.orderNo = workOrderNo |
| | | this.getMainList(); |
| | | this.getChildList(); |
| | | }, |
| | | methods: { |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelectionExcel = val; |
| | | console.log('MMMMM--',this.multipleSelectionExcel) |
| | | if (this.multipleSelectionExcel !== null && this.multipleSelectionExcel.length > 0){ |
| | | this.queryParams.engineNoListExcel = [] |
| | | this.multipleSelectionExcel.forEach(x => { |
| | | this.queryParams.engineNoListExcel.push(x.engineNo) |
| | | |
| | | }) |
| | | }else { |
| | | this.queryParams.engineNoListExcel = [] |
| | | } |
| | | console.log('this.handleSelectionChange ',this.queryParams.engineNoListExcel ) |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.currentRow = val; |
| | | //æ¥è¯¢éä¸è¡æ°æ® |
| | | this.queryParams.engineNoList = [] |
| | | this.queryParams.engineNoList.push(this.currentRow.engineNo) |
| | | this.getChildList() |
| | | console.log('handleCurrentChange',this.queryParams.engineNoList) |
| | | console.log('handleCurrentChange222',this.queryParams.engineNoListExcel) |
| | | }, |
| | | //å¯¼åº |
| | | exportReport(){ |
| | | if (this.queryParams.engineNoListExcel.length === 0){ |
| | | this.$message.error("请å¾ééè¦å¯¼åºçæ°æ®") |
| | | }else { |
| | | this.queryParams.engineNoList = [] |
| | | this.download('bs/orderScheduling/exportFollow', { |
| | | ...this.queryParams |
| | | }, `追溯æ¥è¡¨_${new Date().getTime()}.xlsx`) |
| | | } |
| | | |
| | | }, |
| | | /** æ¥è¯¢è®¢åæ产å表 */ |
| | | getMainList() { |
| | | this.loading = true; |
| | | console.log(this.queryParams) |
| | | listOrderScheduling(this.queryParams).then(response => { |
| | | this.orderSchedulingList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | getChildList(){ |
| | | getFollowReport(this.queryParams).then(response => { |
| | | this.list1 = response.data.list1; |
| | | console.log('list111111',this.list1) |
| | | this.list2 = response.data.list2; |
| | | this.list3 = response.data.list3; |
| | | this.list4 = response.data.list4; |
| | | this.list5 = response.data.list5; |
| | | |
| | | }); |
| | | }, |
| | | getList(){ |
| | | this.getMainList() |
| | | this.getChildList() |
| | | } |
| | | // handleCurrentChange(val) { |
| | | // this.multipleSelection = val; |
| | | // console.log('this.multipleSelection ',this.multipleSelection ) |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .headClass { |
| | | height: 200px; |
| | | } |
| | | ::v-deep .el-table--scrollable-x .el-table__body-wrapper { |
| | | z-index: 3; |
| | | } |
| | | ::v-deep .el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 6px; |
| | | } |
| | | ::v-deep .el-form .myFrom .el-form--inline{ |
| | | height: 20px; |
| | | } |
| | | ::v-deep .el-card__body { |
| | | padding: 10px 15px 10px 15px; |
| | | } |
| | | .app-container{ |
| | | height: 625px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="list1" |
| | | height="259" |
| | | border |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | type="selection" |
| | | align="center" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="ç®±ä½ç¼ç " |
| | | align="center" |
| | | width="160"> |
| | | <template slot-scope="scope">{{ scope.row.sfcCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="å·¥ä½" |
| | | align="center" |
| | | width="120"> |
| | | <template slot-scope="scope">{{ scope.row.locationCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="åæ°å" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramName }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="ééç»æ" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramValue }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="åä½" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.unit }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="æ¶é´" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.createTime }}</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "report1", |
| | | props:['list1'], |
| | | data() { |
| | | return { |
| | | total: '', |
| | | queryParams: { |
| | | pageNum: 5, |
| | | pageSize: 5 |
| | | }, |
| | | tableData: [{ |
| | | date: '2016-05-03', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-02', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-08', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-06', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-07', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }], |
| | | multipleSelection: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | getList(){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="list2" |
| | | height="259" |
| | | border |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | type="selection" |
| | | align="center" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="ç®±ä½ç¼ç " |
| | | align="center" |
| | | width="160"> |
| | | <template slot-scope="scope">{{ scope.row.sfcCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="å·¥ä½" |
| | | align="center" |
| | | width="120"> |
| | | <template slot-scope="scope">{{ scope.row.locationCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="åæ°å" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramName }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="ééç»æ" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramValue }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="åä½" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.unit }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="æ¶é´" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.createTime }}</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "report2", |
| | | props:['list2'], |
| | | data() { |
| | | return { |
| | | total: '', |
| | | queryParams: { |
| | | pageNum: 5, |
| | | pageSize: 5 |
| | | }, |
| | | tableData: [{ |
| | | date: '2016-05-03', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-02', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-08', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-06', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-07', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }], |
| | | multipleSelection: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | getList(){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="list3" |
| | | height="259" |
| | | border |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | type="selection" |
| | | align="center" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="ç®±ä½ç¼ç " |
| | | align="center" |
| | | width="160"> |
| | | <template slot-scope="scope">{{ scope.row.sfcCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="å·¥ä½" |
| | | align="center" |
| | | width="120"> |
| | | <template slot-scope="scope">{{ scope.row.locationCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="åæ°å" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramName }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="ééç»æ" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramValue }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="åä½" |
| | | align="center" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.unit }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | align="center" |
| | | label="æ¶é´" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.createTime }}</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "report3", |
| | | props:['list3'], |
| | | data() { |
| | | return { |
| | | total: '', |
| | | queryParams: { |
| | | pageNum: 5, |
| | | pageSize: 5 |
| | | }, |
| | | tableData: [{ |
| | | date: '2016-05-03', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-02', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-08', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-06', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-07', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }], |
| | | multipleSelection: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | getList(){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="list4" |
| | | height="259" |
| | | border |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | type="selection" |
| | | align="center" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="ç®±ä½ç¼ç " |
| | | align="center" |
| | | width="160"> |
| | | <template slot-scope="scope">{{ scope.row.sfcCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="å·¥ä½" |
| | | align="center" |
| | | width="120"> |
| | | <template slot-scope="scope">{{ scope.row.locationCode }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="åæ°å" |
| | | align="center" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramName }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="ééç»æ" |
| | | align="center" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.paramValue }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="åä½" |
| | | align="center" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.unit }}</template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="æ¶é´" |
| | | align="center" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.createTime }}</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "report4", |
| | | props:['list4'], |
| | | data() { |
| | | return { |
| | | total: '', |
| | | queryParams: { |
| | | pageNum: 5, |
| | | pageSize: 5 |
| | | }, |
| | | tableData: [{ |
| | | date: '2016-05-03', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-02', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-08', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-06', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-07', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }], |
| | | multipleSelection: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | getList(){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="list5" |
| | | height="259" |
| | | border |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="å·¥åç¼å·" align="center" prop="workOrderNo" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»æåºåå·" align="center" prop="sfcCode" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="产åç¼å·" align="center" prop="productCode" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="产线ç¼å·" align="center" prop="productionLine" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½ç¼å·" align="center" prop="locationCode" width="100"> |
| | | </el-table-column> |
| | | <el-table-column label="å
¥ç«æ¶é´" align="center" prop="inboundTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.inboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åºç«æ¶é´" align="center" prop="outboundTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æ¯å¦åæ ¼" align="center" prop="outRsSign"> |
| | | </el-table-column> |
| | | <el-table-column label="NGåå " align="center" prop="outMsgSign"> |
| | | </el-table-column> |
| | | <el-table-column label="ééæ¶é´" align="center" prop="collectionTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="èææ¶é´" align="center" prop="beatTime"> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- type="index"--> |
| | | <!-- width="50">--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- align="center"--> |
| | | <!-- width="55">--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="ç®±ä½ç¼ç "--> |
| | | <!-- align="center"--> |
| | | <!-- width="160">--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.sfcCode }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="name"--> |
| | | <!-- align="center"--> |
| | | <!-- label="å·¥ä½"--> |
| | | <!-- width="120">--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.locationCode }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- align="center"--> |
| | | <!-- label="åæ°å"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.paramName }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- label="ééç»æ"--> |
| | | <!-- align="center"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.paramValue }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- label="åä½"--> |
| | | <!-- align="center"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.unit }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- label="æ¶é´"--> |
| | | <!-- align="center"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.createTime }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "report5", |
| | | props:['list5'], |
| | | data() { |
| | | return { |
| | | total: '', |
| | | queryParams: { |
| | | pageNum: 5, |
| | | pageSize: 5 |
| | | }, |
| | | tableData: [{ |
| | | date: '2016-05-03', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-02', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-08', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-06', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-07', |
| | | name: 'çå°è', |
| | | address: 'ä¸æµ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }], |
| | | multipleSelection: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | getList(){ |
| | | |
| | | }, |
| | | // æ¥ææ ¼å¼å |
| | | parseTime(time, pattern) { |
| | | if (arguments.length === 0 || !time) { |
| | | return null |
| | | } |
| | | const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' |
| | | let date |
| | | if (typeof time === 'object') { |
| | | date = time |
| | | } else { |
| | | if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { |
| | | time = parseInt(time) |
| | | } else if (typeof time === 'string') { |
| | | time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), ''); |
| | | } |
| | | if ((typeof time === 'number') && (time.toString().length === 10)) { |
| | | time = time * 1000 |
| | | } |
| | | date = new Date(time) |
| | | } |
| | | const formatObj = { |
| | | y: date.getFullYear(), |
| | | m: date.getMonth() + 1, |
| | | d: date.getDate(), |
| | | h: date.getHours(), |
| | | i: date.getMinutes(), |
| | | s: date.getSeconds(), |
| | | a: date.getDay() |
| | | } |
| | | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { |
| | | let value = formatObj[key] |
| | | // Note: getDay() returns 0 on Sunday |
| | | if (key === 'a') { return ['æ¥', 'ä¸', 'äº', 'ä¸', 'å', 'äº', 'å
'][value] } |
| | | if (result.length > 0 && value < 10) { |
| | | value = '0' + value |
| | | } |
| | | return value || 0 |
| | | }) |
| | | return time_str |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |