Browse Source

导入任务详情插入任务并导入了元器件相关数据

WangRuiLin 1 year ago
parent
commit
aa1a63b96d

+ 4 - 0
cirs-biz/src/main/java/com/cirs/biz/controller/TElecCompRecordController.java

@@ -3,6 +3,7 @@ package com.cirs.biz.controller;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.cirs.biz.domain.TElectronComponent;
 import com.cirs.biz.domain.TVerificationTask;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -134,4 +135,7 @@ public class TElecCompRecordController extends BaseController
         ExcelUtil<TElecCompRecord> util = new ExcelUtil<TElecCompRecord>(TElecCompRecord.class);
         util.importTemplateExcel(response, "元器件使用记录数据");
     }
+
+
+
 }

+ 2 - 2
cirs-biz/src/main/java/com/cirs/biz/domain/TElecCompRecord.java

@@ -21,11 +21,11 @@ public class TElecCompRecord extends BaseEntity
     private Long id;
 
     /** 元器件名称 */
-    @Excel(name = "元器件名称")
+    @Excel(name = "元器件编号")
     private String componentId;
 
     /** 使用场景 */
-    @Excel(name = "使用场景")
+    @Excel(name = "应用设备")
     private String usedBy;
 
     /** 使用日期 */

+ 16 - 15
cirs-biz/src/main/java/com/cirs/biz/domain/TElectronComponent.java

@@ -19,6 +19,7 @@ public class TElectronComponent extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 编号 */
+//    @Excel(name = "元器件id")
     private Long id;
 
     /** 元器件名称 */
@@ -44,16 +45,16 @@ public class TElectronComponent extends BaseEntity
 
     /** 供货周期(周) */
 //    @Excel(name = "供货周期", readConverterExp = "周=")//供货周期最优
-    @Excel(name = "供货周期")//供货周期最优
+    @Excel(name = "供货周期(周)")//供货周期最优
     private BigDecimal deliveryCycle;
 
     /** 供货量(个/年) */
-    @Excel(name = "供货量(个/年)")//供货量最优
+    @Excel(name = "供货量个/年)")//供货量最优
     private BigDecimal supplyQuantity;
 
     /** 价格(元) */
 //    @Excel(name = "价格", readConverterExp = "元=")//成本最优
-    @Excel(name = "价格")
+    @Excel(name = "价格(元)")
     private BigDecimal unitPrice;
 
     /** ZZKK等级 */
@@ -75,64 +76,64 @@ public class TElectronComponent extends BaseEntity
 
     /** 最大正向电流IFM(mA) */
 //    @Excel(name = "最大正向电流IFM", readConverterExp = "m=A")
-    @Excel(name = "最大正向电流IFM")
+    @Excel(name = "最大正向电流IFM(mA)")
     private BigDecimal paramIfm;
 
 
     /** 最大反向工作电压VRRM(V) */
 //    @Excel(name = "最大反向工作电压VRRM", readConverterExp = "V=")
-    @Excel(name = "最大反向工作电压VRRM")
+    @Excel(name = "最大反向工作电压VRRM(V)")
     private BigDecimal paramVrrm;
 
     /** 最大浪涌电流IFSM(A) */
 //    @Excel(name = "最大浪涌电流IFSM", readConverterExp = "A=")
-    @Excel(name = "最大浪涌电流IFSM")
+    @Excel(name = "最大浪涌电流IFSM(A)")
     private BigDecimal paramIfsm;
 
     /** 稳压状态下的动态电阻ZZ(Ω) */
 //    @Excel(name = "稳压状态下的动态电阻ZZ", readConverterExp = "Ω=")
-    @Excel(name = "稳压状态下的动态电阻ZZ")
+    @Excel(name = "稳压状态下的动态电阻ZZ(Ω)")
     private BigDecimal paramZz;
 
     /** 最大额定功率PCM(mW) */
 //    @Excel(name = "最大额定功率PCM", readConverterExp = "m=W")
-    @Excel(name = "最大额定功率PCM")
+    @Excel(name = "最大额定功率PCM(mW)")
     private BigDecimal paramPcm;
 
     /** 最大集电极电流ICM(mA) */
 //    @Excel(name = "最大集电极电流ICM", readConverterExp = "m=A")
-    @Excel(name = "最大集电极电流ICM")
+    @Excel(name = "最大集电极电流ICM(mA)")
     private BigDecimal paramIcm;
 
     /** 最大集电极-基极电压VCBO(V) */
 //    @Excel(name = "最大集电极-基极电压VCBO", readConverterExp = "V=")
-    @Excel(name = "最大集电极-基极电压VCBO")
+    @Excel(name = "最大集电极-基极电压VCBO(V)")
     private BigDecimal paramVcbo;
 
 
     /** 集电极-发射极电压VCEO(V) */
 //    @Excel(name = "集电极-发射极电压VCEO", readConverterExp = "V=")
-    @Excel(name = "集电极-发射极电压VCEO")
+    @Excel(name = "集电极-发射极电压VCEO(V)")
     private BigDecimal paramVceo;
 
     /** 发射极-基极电压VEBO(V) */
 //    @Excel(name = "发射极-基极电压VEBO", readConverterExp = "V=")
-    @Excel(name = "发射极-基极电压VEBO")
+    @Excel(name = "发射极-基极电压VEBO(V)")
     private BigDecimal paramVebo;
 
     /** 漏源电压VDSS(V) */
 //    @Excel(name = "漏源电压VDSS", readConverterExp = "V=")
-    @Excel(name = "漏源电压VDSS")
+    @Excel(name = "漏源电压VDSS(V)")
     private BigDecimal paramVdss;
 
     /** 漏极直流电流ID(A) */
 //    @Excel(name = "漏极直流电流ID", readConverterExp = "A=")
-    @Excel(name = "漏极直流电流ID")
+    @Excel(name = "漏极直流电流ID(A)")
     private BigDecimal paramId;
 
     /** 漏-源通态电阻RDS(on)(mΩ) */
 //    @Excel(name = "漏-源通态电阻RDS(on)", readConverterExp = "m=Ω")
-    @Excel(name = "漏-源通态电阻RDS(on)")
+    @Excel(name = "漏-源通态电阻RDS(on)(mΩ)")
     private BigDecimal paramRdsOn;
 
 

+ 9 - 8
cirs-biz/src/main/java/com/cirs/biz/domain/TVerificationTask.java

@@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.cirs.common.annotation.Excel;
 import com.cirs.common.core.domain.BaseEntity;
+import org.springframework.boot.context.properties.bind.DefaultValue;
 
 /**
  * 验证任务对象 t_verification_task
@@ -34,13 +35,13 @@ public class TVerificationTask extends BaseEntity
     private Long subtaskNum;
 
     /** 开始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date startTime;
 
     /** 结束时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date endTime;
 
     /** 完成率 */
@@ -91,21 +92,21 @@ public class TVerificationTask extends BaseEntity
     {
         return subtaskNum;
     }
-    public void setStartTime(Date startTime) 
+    public void setStartTime(Date startTime)
     {
         this.startTime = startTime;
     }
 
-    public Date getStartTime() 
+    public Date getStartTime()
     {
         return startTime;
     }
-    public void setEndTime(Date endTime) 
+    public void setEndTime(Date endTime)
     {
         this.endTime = endTime;
     }
 
-    public Date getEndTime() 
+    public Date getEndTime()
     {
         return endTime;
     }

+ 1 - 1
cirs-biz/src/main/java/com/cirs/biz/domain/TVerificationTaskDetail.java

@@ -19,7 +19,7 @@ public class TVerificationTaskDetail extends BaseEntity
     private Long id;
 
     /** 任务id */
-    @Excel(name = "任务id")
+//    @Excel(name = "任务id")
     private Long taskId;
 
     @Excel(name = "使用场景")

+ 3 - 0
cirs-biz/src/main/java/com/cirs/biz/mapper/TVerificationTaskMapper.java

@@ -2,6 +2,7 @@ package com.cirs.biz.mapper;
 
 import java.util.List;
 import com.cirs.biz.domain.TVerificationTask;
+import com.cirs.biz.domain.TVerificationTaskDetail;
 
 /**
  * 验证任务Mapper接口
@@ -58,4 +59,6 @@ public interface TVerificationTaskMapper
      * @return 结果
      */
     public int deleteTVerificationTaskByIds(Long[] ids);
+
+
 }

+ 15 - 0
cirs-biz/src/main/java/com/cirs/biz/service/impl/TVerificationTaskDetailServiceImpl.java

@@ -3,6 +3,7 @@ package com.cirs.biz.service.impl;
 import java.util.List;
 
 import com.cirs.biz.domain.TVerificationTask;
+import com.cirs.biz.mapper.TVerificationTaskMapper;
 import com.cirs.common.exception.ServiceException;
 import com.cirs.common.utils.DateUtils;
 import com.cirs.common.utils.StringUtils;
@@ -31,6 +32,9 @@ public class TVerificationTaskDetailServiceImpl implements ITVerificationTaskDet
     @Autowired
     private TVerificationTaskDetailMapper tVerificationTaskDetailMapper;
 
+    @Autowired
+    private TVerificationTaskMapper tVerificationTaskMapper;
+
     @Autowired
     protected Validator validator;
 
@@ -126,6 +130,17 @@ public class TVerificationTaskDetailServiceImpl implements ITVerificationTaskDet
 
                 BeanValidators.validateWithException(validator, taskDetail);
                 taskDetail.setCreateBy(operName);
+
+                TVerificationTask task = new TVerificationTask();
+                task.setCreateBy(operName);//setCreateBy(operName)
+//                task.setTaskName("undefined");
+//                System.out.println(task.getId());
+//                System.out.println(taskDetail.getId());
+
+                tVerificationTaskMapper.insertTVerificationTask(task);
+
+                taskDetail.setTaskId(task.getId());
+
                 tVerificationTaskDetailMapper.insertTVerificationTaskDetail(taskDetail);
                 successNum++;
                 successMsg.append("<br/>" + successNum + "、任务 " + taskDetail.getTaskId() + " 详情导入成功");

+ 2 - 2
cirs-biz/src/main/resources/mapper/biz/TVerificationTaskDetailMapper.xml

@@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertTVerificationTaskDetail" parameterType="TVerificationTaskDetail" useGeneratedKeys="true" keyProperty="id">
         insert into t_verification_task_detail
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="taskId != null">task_id,</if>
+
             <if test="useScene != null">use_scene,</if>
             <if test="searchCondition != null">search_condition,</if>
             <if test="result1 != null">result1,</if>
@@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="taskId != null">#{taskId},</if>
+
             <if test="useScene != null">#{useScene},</if>
             <if test="searchCondition != null">#{searchCondition},</if>
             <if test="result1 != null">#{result1},</if>

+ 1 - 0
cirs-biz/src/main/resources/mapper/biz/TVerificationTaskMapper.xml

@@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
+
     <update id="updateTVerificationTask" parameterType="TVerificationTask">
         update t_verification_task
         <trim prefix="SET" suffixOverrides=",">

+ 2 - 0
cirs-common/src/main/java/com/cirs/common/core/domain/model/RegisterBody.java

@@ -1,5 +1,7 @@
 package com.cirs.common.core.domain.model;
 
+import org.springframework.data.annotation.CreatedBy;
+
 /**
  * 用户注册对象
  * 

+ 1 - 0
cirs-ui/package.json

@@ -40,6 +40,7 @@
     "axios": "0.24.0",
     "clipboard": "2.0.8",
     "core-js": "3.25.3",
+    "dayjs": "^1.11.10",
     "echarts": "5.4.0",
     "element-ui": "2.15.13",
     "file-saver": "2.0.5",

+ 59 - 53
cirs-ui/src/views/biz/component/index.vue

@@ -279,18 +279,18 @@
 <!--          @click="handleUpdate"-->
 <!--          v-hasPermi="['biz:component: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="['biz:component:remove']"-->
-<!--        >删除</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="['biz:component:remove']"
+        >删除</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="info"
@@ -314,42 +314,42 @@
     </el-row>
 
     <el-table v-loading="loading" :data="componentList" @selection-change="handleSelectionChange">
-<!--      <el-table-column type="selection" width="55" align="center" />-->
+      <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="id" />
-      <el-table-column label="元器件名称" align="center" prop="componentName" width="100"/>
-      <el-table-column label="生产厂家" align="center" prop="manufacturer" />
-      <el-table-column label="型号规格" align="center" prop="componentModel" />
-      <el-table-column label="国产替代型号" align="center" prop="replaceDomesticModel" width="110"/>
+      <el-table-column label="元器件名称" align="center" prop="componentName" width="100"  :show-overflow-tooltip="true"/>
+      <el-table-column label="生产厂家" align="center" prop="manufacturer"  :show-overflow-tooltip="true"/>
+      <el-table-column label="型号规格" align="center" prop="componentModel"  :show-overflow-tooltip="true"/>
+      <el-table-column label="国产替代型号" align="center" prop="replaceDomesticModel" width="110"  :show-overflow-tooltip="true"/>
       <el-table-column label="质量等级" align="center" prop="qualityGrade" />
-      <el-table-column label="供货周期" align="center" prop="deliveryCycle" />
-      <el-table-column label="供货量(个/年)" align="center" prop="supplyQuantity" width="120"/>
+      <el-table-column label="供货周期(周)" align="center" prop="deliveryCycle" width="120"/>
+      <el-table-column label="供货量(个/年)" align="center" prop="supplyQuantity" width="140"/>
       <el-table-column label="价格" align="center" prop="unitPrice" />
       <el-table-column label="ZZKK等级" align="center" prop="zzkkLevel" width="100"/>
-      <el-table-column label="是否在优选目录内" align="center" prop="inPreference" width="130"/>
+      <el-table-column label="是否在优选目录内" align="center" prop="inPreference" width="130"  :show-overflow-tooltip="true"/>
       <el-table-column label="停产断档日期" align="center" prop="shutdownDate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.shutdownDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="封装形式" align="center" prop="encapsulationMode" />
-      <el-table-column label="最大正向电流IFM" align="center" prop="paramIfm" width="130"/>
-      <el-table-column label="最大反向工作电压VRRM" align="center" prop="paramVrrm" width="170"/>
-      <el-table-column label="最大浪涌电流IFSM" align="center" prop="paramIfsm" width="130"/>
-      <el-table-column label="稳压状态下的动态电阻ZZ" align="center" prop="paramZz" width="170"/>
-      <el-table-column label="最大额定功率PCM" align="center" prop="paramPcm" width="130"/>
-      <el-table-column label="最大集电极电流ICM" align="center" prop="paramIcm" width="170"/>
-      <el-table-column label="最大集电极-基极电压VCBO" align="center" prop="paramVcbo" width="200"/>
-      <el-table-column label="集电极-发射极电压VCEO" align="center" prop="paramVceo" width="180"/>
-      <el-table-column label="发射极-基极电压VEBO" align="center" prop="paramVebo" width="170"/>
-      <el-table-column label="漏源电压VDSS" align="center" prop="paramVdss" width="140"/>
-      <el-table-column label="漏极直流电流ID" align="center" prop="paramId" width="130"/>
-      <el-table-column label="漏-源通态电阻RDS(on)" align="center" prop="paramRdsOn" width="170"/>
-      <el-table-column label="抗静电能力" align="center" prop="antistaticCapacity" width="100"/>
-      <el-table-column label="抗辐照能力" align="center" prop="radiationResistance" width="100"/>
-      <el-table-column label="材料" align="center" prop="materials" />
-      <el-table-column label="工艺" align="center" prop="craft" />
-      <el-table-column label="重量" align="center" prop="weight" />
-      <el-table-column label="备注" align="center" prop="remark" />
+<!--      <el-table-column label="最大正向电流IFM" align="center" prop="paramIfm" width="130"/>-->
+<!--      <el-table-column label="最大反向工作电压VRRM" align="center" prop="paramVrrm" width="170"/>-->
+<!--      <el-table-column label="最大浪涌电流IFSM" align="center" prop="paramIfsm" width="130"/>-->
+<!--      <el-table-column label="稳压状态下的动态电阻ZZ" align="center" prop="paramZz" width="170"/>-->
+<!--      <el-table-column label="最大额定功率PCM" align="center" prop="paramPcm" width="130"/>-->
+<!--      <el-table-column label="最大集电极电流ICM" align="center" prop="paramIcm" width="170"/>-->
+<!--      <el-table-column label="最大集电极-基极电压VCBO" align="center" prop="paramVcbo" width="200"/>-->
+<!--      <el-table-column label="集电极-发射极电压VCEO" align="center" prop="paramVceo" width="180"/>-->
+<!--      <el-table-column label="发射极-基极电压VEBO" align="center" prop="paramVebo" width="170"/>-->
+<!--      <el-table-column label="漏源电压VDSS" align="center" prop="paramVdss" width="140"/>-->
+<!--      <el-table-column label="漏极直流电流ID" align="center" prop="paramId" width="130"/>-->
+<!--      <el-table-column label="漏-源通态电阻RDS(on)" align="center" prop="paramRdsOn" width="170"/>-->
+<!--      <el-table-column label="抗静电能力" align="center" prop="antistaticCapacity" width="100"/>-->
+<!--      <el-table-column label="抗辐照能力" align="center" prop="radiationResistance" width="100"/>-->
+<!--      <el-table-column label="材料" align="center" prop="materials" />-->
+<!--      <el-table-column label="工艺" align="center" prop="craft" />-->
+<!--      <el-table-column label="重量" align="center" prop="weight" />-->
+<!--      <el-table-column label="备注" align="center" prop="remark" />-->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
         <template slot-scope="scope">
           <el-button
@@ -410,7 +410,7 @@
     </el-dialog>
     <!-- 添加或修改元器件对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
-      <el-form  style="border:1px solid #C0C0C0;padding: 5px;margin: auto" ref="form" :model="form" :rules="rules" label-width="200px">
+      <el-form  style="border:1px solid #C0C0C0;padding: 5px;margin: auto" ref="form" :model="form" :rules="rules" label-width="220px">
         <el-form-item label="元器件名称" prop="componentName">
           <el-input v-model="form.componentName" placeholder="请输入元器件名称" />
         </el-form-item>
@@ -426,13 +426,13 @@
         <el-form-item label="质量等级" prop="qualityGrade">
           <el-input v-model="form.qualityGrade" placeholder="请输入质量等级" />
         </el-form-item>
-        <el-form-item label="供货周期" prop="deliveryCycle">
+        <el-form-item label="供货周期(周)" prop="deliveryCycle">
           <el-input v-model="form.deliveryCycle" placeholder="请输入供货周期" />
         </el-form-item>
-        <el-form-item label="供货量(个/年)" prop="supplyQuantity">
+        <el-form-item label="供货量个/年)" prop="supplyQuantity">
           <el-input v-model="form.supplyQuantity" placeholder="请输入供货量(个/年)" />
         </el-form-item>
-        <el-form-item label="价格" prop="unitPrice">
+        <el-form-item label="价格(元)" prop="unitPrice">
           <el-input v-model="form.unitPrice" placeholder="请输入价格" />
         </el-form-item>
         <el-form-item label="ZZKK等级" prop="zzkkLevel">
@@ -452,40 +452,40 @@
         <el-form-item label="封装形式" prop="encapsulationMode">
           <el-input v-model="form.encapsulationMode" placeholder="请输入封装形式" />
         </el-form-item>
-        <el-form-item label="最大正向电流IFM" prop="paramIfm">
+        <el-form-item label="最大正向电流IFM(mA)" prop="paramIfm">
           <el-input v-model="form.paramIfm" placeholder="请输入最大正向电流IFM" />
         </el-form-item>
-        <el-form-item label="最大反向工作电压VRRM" prop="paramVrrm">
+        <el-form-item label="最大反向工作电压VRRM(V)" prop="paramVrrm">
           <el-input v-model="form.paramVrrm" placeholder="请输入最大反向工作电压VRRM" />
         </el-form-item>
-        <el-form-item label="最大浪涌电流IFSM" prop="paramIfsm">
+        <el-form-item label="最大浪涌电流IFSM(A)" prop="paramIfsm">
           <el-input v-model="form.paramIfsm" placeholder="请输入最大浪涌电流IFSM" />
         </el-form-item>
-        <el-form-item label="稳压状态下的动态电阻ZZ" prop="paramZz">
+        <el-form-item label="稳压状态下的动态电阻ZZ(Ω)" prop="paramZz">
           <el-input v-model="form.paramZz" placeholder="请输入稳压状态下的动态电阻ZZ" />
         </el-form-item>
-        <el-form-item label="最大额定功率PCM" prop="paramPcm">
+        <el-form-item label="最大额定功率PCM(mW)" prop="paramPcm">
           <el-input v-model="form.paramPcm" placeholder="请输入最大额定功率PCM" />
         </el-form-item>
-        <el-form-item label="最大集电极电流ICM" prop="paramIcm">
+        <el-form-item label="最大集电极电流ICM(mA)" prop="paramIcm">
           <el-input v-model="form.paramIcm" placeholder="请输入最大集电极电流ICM" />
         </el-form-item>
-        <el-form-item label="最大集电极-基极电压VCBO" prop="paramVcbo">
+        <el-form-item label="最大集电极-基极电压VCBO(V)" prop="paramVcbo">
           <el-input v-model="form.paramVcbo" placeholder="请输入最大集电极-基极电压VCBO" />
         </el-form-item>
-        <el-form-item label="集电极-发射极电压VCEO" prop="paramVceo">
+        <el-form-item label="集电极-发射极电压VCEO(V)" prop="paramVceo">
           <el-input v-model="form.paramVceo" placeholder="请输入集电极-发射极电压VCEO" />
         </el-form-item>
-        <el-form-item label="发射极-基极电压VEBO" prop="paramVebo">
+        <el-form-item label="发射极-基极电压VEBO(V)" prop="paramVebo">
           <el-input v-model="form.paramVebo" placeholder="请输入发射极-基极电压VEBO" />
         </el-form-item>
-        <el-form-item label="漏源电压VDSS" prop="paramVdss">
+        <el-form-item label="漏源电压VDSS(V)" prop="paramVdss">
           <el-input v-model="form.paramVdss" placeholder="请输入漏源电压VDSS" />
         </el-form-item>
-        <el-form-item label="漏极直流电流ID" prop="paramId">
+        <el-form-item label="漏极直流电流ID(A)" prop="paramId">
           <el-input v-model="form.paramId" placeholder="请输入漏极直流电流ID" />
         </el-form-item>
-        <el-form-item label="漏-源通态电阻RDS(on)" prop="paramRdsOn">
+        <el-form-item label="漏-源通态电阻RDS(on)(mΩ)" prop="paramRdsOn">
           <el-input v-model="form.paramRdsOn" placeholder="请输入漏-源通态电阻RDS(on)" />
         </el-form-item>
         <el-form-item label="抗静电能力" prop="antistaticCapacity">
@@ -514,7 +514,13 @@
     </el-dialog>
   </div>
 </template>
+<!--<style>-->
+
+<!--.sele {-->
+<!--  background-color: #48D1CC !important;-->
 
+<!--}-->
+<!--</style>-->
 <script>
 import { listComponent, getComponent, delComponent, addComponent, updateComponent,getall } from "@/api/biz/component";
 import { getToken } from "@/utils/auth";

+ 17 - 17
cirs-ui/src/views/biz/evaluation/index.vue

@@ -59,17 +59,17 @@
 <!--          v-hasPermi="['biz:evaluation: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="['biz:evaluation:remove']"-->
-<!--        >删除</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="['biz:evaluation:remove']"
+        >删除</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -87,26 +87,26 @@
 <!--      <el-table-column type="selection" width="55" align="center" />-->
 <!--      <el-table-column label="编号" align="center" prop="id" />-->
       <el-table-column label="查询条件" align="center" prop="searchCondition" />
-      <el-table-column label="元器件编号" align="center" prop="componentId" />
-      <el-table-column label="元器件名称" align="center" >
+      <el-table-column label="元器件编号" align="center" prop="componentId" :show-overflow-tooltip="true"/>
+      <el-table-column label="元器件名称" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <span>{{ getComponentName(scope.row.componentId) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="元器件型号规格" align="center" >
+      <el-table-column label="元器件型号规格" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <span>{{ getComponentModel(scope.row.componentId) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="元器件质量等级" align="center" >
+      <el-table-column label="元器件质量等级" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <span>{{getComponentQuality(scope.row.componentId)}}</span>
         </template>
       </el-table-column>
       <el-table-column label="评分" align="center" prop="mark" />
-      <el-table-column label="使用场景" align="center" prop="usedBy" />
+      <el-table-column label="使用场景" align="center" prop="usedBy" :show-overflow-tooltip="true"/>
 
-      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button

+ 5 - 5
cirs-ui/src/views/biz/recommend/index.vue

@@ -15,16 +15,16 @@
     </span>
     </div>
     <el-table v-loading="loading" :data="componentList" >
-      <el-table-column label="型号规格" align="center" prop="componentModel" />
-      <el-table-column label="元器件名称" align="center" prop="componentName" />
-      <el-table-column label="国产替代型号" align="center" prop="replaceDomesticModel" />
+      <el-table-column label="型号规格" align="center" prop="componentModel" :show-overflow-tooltip="true"/>
+      <el-table-column label="元器件名称" align="center" prop="componentName" :show-overflow-tooltip="true"/>
+      <el-table-column label="国产替代型号" align="center" prop="replaceDomesticModel" :show-overflow-tooltip="true"/>
 <!--      <el-table-column label="元器件应用" align="center" prop="applications"/>-->
-      <el-table-column label="元器件应用" align="center">
+      <el-table-column label="元器件应用" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           {{ scope.row.applications }}
         </template>
       </el-table-column>
-      <el-table-column label="相关推荐" align="center">
+      <el-table-column label="相关推荐" align="center" :show-overflow-tooltip="true">
         <span>1,2,3...</span>
       </el-table-column>
 

+ 24 - 24
cirs-ui/src/views/biz/record/index.vue

@@ -59,26 +59,26 @@
 <!--          v-hasPermi="['biz:record: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="['biz:record:remove']"-->
-<!--        >删除</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="info"-->
-<!--          icon="el-icon-upload2"-->
-<!--          size="mini"-->
-<!--          @click="handleImport"-->
-<!--          v-hasPermi="['biz:record:import']"-->
-<!--        >导入</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="['biz:record:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['biz:record:import']"
+        >导入</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -94,16 +94,16 @@
     </el-row>
 
     <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange" >
-<!--      <el-table-column type="selection" width="55" align="center" />-->
+      <el-table-column type="selection" width="55" align="center" />
 <!--      <el-table-column label="编号" align="center" prop="id" />-->
       <el-table-column label="元器件编号" align="center" prop="componentId" />
-      <el-table-column label="使用场景" align="center" prop="usedBy" />
+      <el-table-column label="应用设备" align="center" prop="usedBy" :show-overflow-tooltip='true' />
       <el-table-column label="使用日期" align="center" prop="usedDate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.usedDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
         <template slot-scope="scope">
           <el-button
@@ -174,7 +174,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="使用场景" prop="usedBy">
+        <el-form-item label="应用设备" prop="usedBy">
           <el-input v-model="form.usedBy" placeholder="请输入使用场景" />
         </el-form-item>
         <el-form-item label="使用日期" prop="usedDate">

+ 70 - 17
cirs-ui/src/views/biz/task/index.vue

@@ -64,16 +64,16 @@
     </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="['biz:task:add']"
-        >新增</el-button>
-      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="primary"-->
+<!--          plain-->
+<!--          icon="el-icon-plus"-->
+<!--          size="mini"-->
+<!--          @click="handleAdd"-->
+<!--          v-hasPermi="['biz:task:add']"-->
+<!--        >新增</el-button>-->
+<!--      </el-col>-->
 <!--      <el-col :span="1.5">-->
 <!--        <el-button-->
 <!--          type="success"-->
@@ -116,31 +116,55 @@
           v-hasPermi="['biz:detail:export']"
         >选择任务导出任务详情</el-button>
       </el-col>
+      <el-col :span="1.5" >
+        <el-button
+
+          type='success'
+          plain
+          icon="el-icon-video-play"
+          size="mini"
+          @click="handleRun"
+        >运行</el-button>
+
+      </el-col>
+<!--      <el-col :span="1.5" >-->
+<!--        <el-button-->
+
+<!--          type='danger'-->
+<!--          plain-->
+<!--          icon="el-icon-video-pause"-->
+<!--          size="mini"-->
+<!--          @click="handleRun"-->
+<!--        >终止</el-button>-->
+
+<!--      </el-col>-->
+
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="id" />
-      <el-table-column label="任务名称" align="center" prop="taskName" />
-      <el-table-column label="状态" align="center" prop="taskStatus" />
+      <el-table-column label="任务名称" align="center" prop="taskName" :show-overflow-tooltip='true'  />
+      <el-table-column label="状态" align="center" prop="taskStatus" :show-overflow-tooltip='true' />
       <el-table-column label="任务数" align="center" prop="subtaskNum" />
       <el-table-column label="开始时间" align="center" prop="startTime" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.startTime) }}</span>
         </template>
       </el-table-column>
       <el-table-column label="结束时间" align="center" prop="endTime" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.endTime) }}</span>
         </template>
       </el-table-column>
       <el-table-column label="完成率" align="center" prop="progress" />
       <el-table-column label="准确率" align="center" prop="accuracyRate" />
       <el-table-column label="召回率" align="center" prop="recallRate" />
-      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip='true' />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
         <template slot-scope="scope">
+
           <el-button
             size="mini"
             type="text"
@@ -155,6 +179,7 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['biz:task:remove']"
           >删除</el-button>
+
         </template>
       </el-table-column>
     </el-table>
@@ -210,7 +235,7 @@
           <el-date-picker clearable
             v-model="form.startTime"
             type="date"
-            value-format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
             placeholder="请选择开始时间">
           </el-date-picker>
         </el-form-item>
@@ -218,7 +243,7 @@
           <el-date-picker clearable
             v-model="form.endTime"
             type="date"
-            value-format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
             placeholder="请选择结束时间">
           </el-date-picker>
         </el-form-item>
@@ -249,6 +274,7 @@ import { getToken } from "@/utils/auth";
 import {Loading, Message} from "element-ui";
 import service from "../../../utils/request";
 import errorCode from "../../../utils/errorCode";
+import dayjs from "dayjs";
 export default {
   name: "Task",
   data() {
@@ -304,12 +330,39 @@ export default {
         // 上传的地址
         url: process.env.VUE_APP_BASE_API + "/biz/detail/importData"
       },
+
+
     };
   },
   created() {
     this.getList();
   },
   methods: {
+
+    handleRun(){
+      let taskids = this.ids;
+
+      const dayjs = require('dayjs');
+      for(let taskid of taskids){
+        getTask(taskid).then(response => {
+
+          let task = response.data;
+          task.startTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
+          setTimeout(()=>{
+            task.taskStatus = "运行成功"
+            task.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
+            updateTask(task).then(res => {
+              this.$message.success("任务"+taskid+"运行成功!")
+
+              this.getList();
+            });
+          }, 10000);
+
+
+        });
+
+      }
+    },
     /** 查询验证任务列表 */
     getList() {
       this.loading = true;

+ 2 - 2
cirs-ui/src/views/biz/time/index.vue

@@ -88,8 +88,8 @@
 <!--      <el-table-column label="编号" align="center" prop="id" />-->
       <el-table-column label="元器件编号" align="center" prop="componentId" />
       <el-table-column label="浏览时长(毫秒)" align="center" prop="viewTime" />
-      <el-table-column label="使用场景" align="center" prop="usedBy" />
-      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="使用场景" align="center" prop="usedBy" :show-overflow-tooltip='true' />
+      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip='true' />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button