WangRuiLin 1 éve
szülő
commit
3761745440
29 módosított fájl, 225 hozzáadás és 102 törlés
  1. 1 1
      cirs-biz/src/main/java/com/cirs/biz/controller/TElecCompRecordController.java
  2. 5 1
      cirs-biz/src/main/java/com/cirs/biz/controller/TElectronComponentController.java
  3. 9 0
      cirs-biz/src/main/java/com/cirs/biz/controller/TEvaluationController.java
  4. 3 10
      cirs-biz/src/main/java/com/cirs/biz/controller/TVerificationTaskDetailController.java
  5. 33 15
      cirs-biz/src/main/java/com/cirs/biz/domain/TElectronComponent.java
  6. 3 3
      cirs-biz/src/main/java/com/cirs/biz/domain/TVerificationTaskDetail.java
  7. 3 0
      cirs-biz/src/main/java/com/cirs/biz/mapper/TEvaluationMapper.java
  8. 3 0
      cirs-biz/src/main/java/com/cirs/biz/mapper/TVerificationTaskDetailMapper.java
  9. 2 0
      cirs-biz/src/main/java/com/cirs/biz/service/ITEvaluationService.java
  10. 2 0
      cirs-biz/src/main/java/com/cirs/biz/service/ITVerificationTaskDetailService.java
  11. 5 0
      cirs-biz/src/main/java/com/cirs/biz/service/impl/TEvaluationServiceImpl.java
  12. 6 0
      cirs-biz/src/main/java/com/cirs/biz/service/impl/TVerificationTaskDetailServiceImpl.java
  13. 4 1
      cirs-biz/src/main/resources/mapper/biz/TEvaluationMapper.xml
  14. 13 9
      cirs-biz/src/main/resources/mapper/biz/TVerificationTaskDetailMapper.xml
  15. 2 2
      cirs-common/src/main/java/com/cirs/common/utils/poi/ExcelUtil.java
  16. 1 1
      cirs-ui/public/index.html
  17. BIN
      cirs-ui/public/newlogo.ico
  18. 8 0
      cirs-ui/src/api/biz/recommend.js
  19. BIN
      cirs-ui/src/assets/logo/newlogo.png
  20. 2 1
      cirs-ui/src/layout/components/Sidebar/Logo.vue
  21. 1 0
      cirs-ui/src/utils/request.js
  22. 32 23
      cirs-ui/src/views/biz/component/index.vue
  23. 4 4
      cirs-ui/src/views/biz/detail/index.vue
  24. 2 4
      cirs-ui/src/views/biz/evaluation/index.vue
  25. 12 4
      cirs-ui/src/views/biz/recommend/index.vue
  26. 24 14
      cirs-ui/src/views/biz/record/index.vue
  27. 43 7
      cirs-ui/src/views/biz/task/index.vue
  28. 1 1
      cirs-ui/src/views/biz/time/index.vue
  29. 1 1
      cirs-ui/src/views/tool/build/index.vue

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

@@ -117,7 +117,7 @@ public class TElecCompRecordController extends BaseController
         return toAjax(tElecCompRecordService.deleteTElecCompRecordByIds(ids));
     }
 
-    @PreAuthorize("@ss.hasPermi('biz:task:import')")
+    @PreAuthorize("@ss.hasPermi('biz:record:import')")
     @PostMapping("/importData")
     public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
     {

+ 5 - 1
cirs-biz/src/main/java/com/cirs/biz/controller/TElectronComponentController.java

@@ -5,6 +5,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
 import com.cirs.biz.domain.RecommendInfo;
+import com.cirs.biz.domain.TElecCompRecord;
 import com.cirs.biz.domain.TVerificationTask;
 import com.cirs.biz.mapper.RecommendInfoMapper;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -136,6 +137,7 @@ public class TElectronComponentController extends BaseController
     {
         ExcelUtil<TElectronComponent> util = new ExcelUtil<TElectronComponent>(TElectronComponent.class);
         List<TElectronComponent> componentList = util.importExcel(file.getInputStream());
+
         String operName = getUsername();
         String message = tElectronComponentService.importComponent(componentList, updateSupport, operName);
         return success(message);
@@ -145,6 +147,8 @@ public class TElectronComponentController extends BaseController
     public void importTemplate(HttpServletResponse response)
     {
         ExcelUtil<TElectronComponent> util = new ExcelUtil<TElectronComponent>(TElectronComponent.class);
-        util.importTemplateExcel(response, "任务数据");
+        util.importTemplateExcel(response, "元器件数据");
     }
+
+
 }

+ 9 - 0
cirs-biz/src/main/java/com/cirs/biz/controller/TEvaluationController.java

@@ -101,4 +101,13 @@ public class TEvaluationController extends BaseController
     {
         return toAjax(tEvaluationService.deleteTEvaluationByIds(ids));
     }
+    //拿到对元器件的平均评价
+    @PreAuthorize("@ss.hasPermi('biz:evaluation:getmark')")
+
+    @GetMapping("/componentid/{componentid}")
+    public AjaxResult remove(@PathVariable String componentid)
+    {
+        return success(tEvaluationService.getscore(componentid));
+    }
+
 }

+ 3 - 10
cirs-biz/src/main/java/com/cirs/biz/controller/TVerificationTaskDetailController.java

@@ -6,14 +6,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.cirs.biz.domain.TVerificationTask;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.cirs.common.annotation.Log;
 import com.cirs.common.core.controller.BaseController;
 import com.cirs.common.core.domain.AjaxResult;
@@ -55,9 +48,9 @@ public class TVerificationTaskDetailController extends BaseController
     @PreAuthorize("@ss.hasPermi('biz:detail:export')")
     @Log(title = "验证任务详情", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, TVerificationTaskDetail tVerificationTaskDetail)
+    public void export(HttpServletResponse response, @RequestBody List<Long> taskids)
     {
-        List<TVerificationTaskDetail> list = tVerificationTaskDetailService.selectTVerificationTaskDetailList(tVerificationTaskDetail);
+        List<TVerificationTaskDetail> list = tVerificationTaskDetailService.selectTVerificationTaskDetailByTaskIds(taskids);
         ExcelUtil<TVerificationTaskDetail> util = new ExcelUtil<TVerificationTaskDetail>(TVerificationTaskDetail.class);
         util.exportExcel(response, list, "验证任务详情数据");
     }

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

@@ -38,11 +38,13 @@ public class TElectronComponent extends BaseEntity
     private String replaceDomesticModel;
 
     /** 质量等级(质量由优到劣为JYJCTJTJP) */
-    @Excel(name = "质量等级", readConverterExp = "质=量由优到劣为JYJCTJTJP")//质量最优
+//    @Excel(name = "质量等级", readConverterExp = "质=量由优到劣为JYJCTJTJP")//质量最优
+    @Excel(name = "质量等级")
     private String qualityGrade;
 
     /** 供货周期(周) */
-    @Excel(name = "供货周期", readConverterExp = "周=")//供货周期最优
+//    @Excel(name = "供货周期", readConverterExp = "周=")//供货周期最优
+    @Excel(name = "供货周期")//供货周期最优
     private BigDecimal deliveryCycle;
 
     /** 供货量(个/年) */
@@ -50,7 +52,8 @@ public class TElectronComponent extends BaseEntity
     private BigDecimal supplyQuantity;
 
     /** 价格(元) */
-    @Excel(name = "价格", readConverterExp = "元=")//成本最优
+//    @Excel(name = "价格", readConverterExp = "元=")//成本最优
+    @Excel(name = "价格")
     private BigDecimal unitPrice;
 
     /** ZZKK等级 */
@@ -71,53 +74,68 @@ public class TElectronComponent extends BaseEntity
     private String encapsulationMode;
 
     /** 最大正向电流IFM(mA) */
-    @Excel(name = "最大正向电流IFM", readConverterExp = "m=A")
+//    @Excel(name = "最大正向电流IFM", readConverterExp = "m=A")
+    @Excel(name = "最大正向电流IFM")
     private BigDecimal paramIfm;
 
+
     /** 最大反向工作电压VRRM(V) */
-    @Excel(name = "最大反向工作电压VRRM", readConverterExp = "V=")
+//    @Excel(name = "最大反向工作电压VRRM", readConverterExp = "V=")
+    @Excel(name = "最大反向工作电压VRRM")
     private BigDecimal paramVrrm;
 
     /** 最大浪涌电流IFSM(A) */
-    @Excel(name = "最大浪涌电流IFSM", readConverterExp = "A=")
+//    @Excel(name = "最大浪涌电流IFSM", readConverterExp = "A=")
+    @Excel(name = "最大浪涌电流IFSM")
     private BigDecimal paramIfsm;
 
     /** 稳压状态下的动态电阻ZZ(Ω) */
-    @Excel(name = "稳压状态下的动态电阻ZZ", readConverterExp = "Ω=")
+//    @Excel(name = "稳压状态下的动态电阻ZZ", readConverterExp = "Ω=")
+    @Excel(name = "稳压状态下的动态电阻ZZ")
     private BigDecimal paramZz;
 
     /** 最大额定功率PCM(mW) */
-    @Excel(name = "最大额定功率PCM", readConverterExp = "m=W")
+//    @Excel(name = "最大额定功率PCM", readConverterExp = "m=W")
+    @Excel(name = "最大额定功率PCM")
     private BigDecimal paramPcm;
 
     /** 最大集电极电流ICM(mA) */
-    @Excel(name = "最大集电极电流ICM", readConverterExp = "m=A")
+//    @Excel(name = "最大集电极电流ICM", readConverterExp = "m=A")
+    @Excel(name = "最大集电极电流ICM")
     private BigDecimal paramIcm;
 
     /** 最大集电极-基极电压VCBO(V) */
-    @Excel(name = "最大集电极-基极电压VCBO", readConverterExp = "V=")
+//    @Excel(name = "最大集电极-基极电压VCBO", readConverterExp = "V=")
+    @Excel(name = "最大集电极-基极电压VCBO")
     private BigDecimal paramVcbo;
 
+
     /** 集电极-发射极电压VCEO(V) */
-    @Excel(name = "集电极-发射极电压VCEO", readConverterExp = "V=")
+//    @Excel(name = "集电极-发射极电压VCEO", readConverterExp = "V=")
+    @Excel(name = "集电极-发射极电压VCEO")
     private BigDecimal paramVceo;
 
     /** 发射极-基极电压VEBO(V) */
-    @Excel(name = "发射极-基极电压VEBO", readConverterExp = "V=")
+//    @Excel(name = "发射极-基极电压VEBO", readConverterExp = "V=")
+    @Excel(name = "发射极-基极电压VEBO")
     private BigDecimal paramVebo;
 
     /** 漏源电压VDSS(V) */
-    @Excel(name = "漏源电压VDSS", readConverterExp = "V=")
+//    @Excel(name = "漏源电压VDSS", readConverterExp = "V=")
+    @Excel(name = "漏源电压VDSS")
     private BigDecimal paramVdss;
 
     /** 漏极直流电流ID(A) */
-    @Excel(name = "漏极直流电流ID", readConverterExp = "A=")
+//    @Excel(name = "漏极直流电流ID", readConverterExp = "A=")
+    @Excel(name = "漏极直流电流ID")
     private BigDecimal paramId;
 
     /** 漏-源通态电阻RDS(on)(mΩ) */
-    @Excel(name = "漏-源通态电阻RDS(on)", readConverterExp = "m=Ω")
+//    @Excel(name = "漏-源通态电阻RDS(on)", readConverterExp = "m=Ω")
+    @Excel(name = "漏-源通态电阻RDS(on)")
     private BigDecimal paramRdsOn;
 
+
     /** 抗静电能力 */
     @Excel(name = "抗静电能力")
     private String antistaticCapacity;

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

@@ -20,7 +20,7 @@ public class TVerificationTaskDetail extends BaseEntity
 
     /** 任务id */
     @Excel(name = "任务id")
-    private String taskId;
+    private Long taskId;
 
     @Excel(name = "使用场景")
     private String useScene;
@@ -82,12 +82,12 @@ public class TVerificationTaskDetail extends BaseEntity
     {
         return useScene;
     }
-    public void setTaskId(String taskId) 
+    public void setTaskId(Long taskId)
     {
         this.taskId = taskId;
     }
 
-    public String getTaskId() 
+    public Long getTaskId()
     {
         return taskId;
     }

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

@@ -2,6 +2,7 @@ package com.cirs.biz.mapper;
 
 import java.util.List;
 import com.cirs.biz.domain.TEvaluation;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 评价Mapper接口
@@ -58,4 +59,6 @@ public interface TEvaluationMapper
      * @return 结果
      */
     public int deleteTEvaluationByIds(Long[] ids);
+
+    public float getscore(@Param("componentid") String componentid);
 }

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

@@ -2,6 +2,7 @@ package com.cirs.biz.mapper;
 
 import java.util.List;
 import com.cirs.biz.domain.TVerificationTaskDetail;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 验证任务详情Mapper接口
@@ -58,4 +59,6 @@ public interface TVerificationTaskDetailMapper
      * @return 结果
      */
     public int deleteTVerificationTaskDetailByIds(Long[] ids);
+
+    public List<TVerificationTaskDetail> selectTVerificationTaskDetailByTaskIds(@Param("taskids") List<Long> taskids);
 }

+ 2 - 0
cirs-biz/src/main/java/com/cirs/biz/service/ITEvaluationService.java

@@ -58,4 +58,6 @@ public interface ITEvaluationService
      * @return 结果
      */
     public int deleteTEvaluationById(Long id);
+
+    public float getscore(String componentid);
 }

+ 2 - 0
cirs-biz/src/main/java/com/cirs/biz/service/ITVerificationTaskDetailService.java

@@ -60,4 +60,6 @@ public interface ITVerificationTaskDetailService
     public int deleteTVerificationTaskDetailById(Long id);
 
     public String importTaskDetail(List<TVerificationTaskDetail> taskDetailList, boolean updateSupport, String operName);
+
+    public List<TVerificationTaskDetail> selectTVerificationTaskDetailByTaskIds(List<Long> taskids);
 }

+ 5 - 0
cirs-biz/src/main/java/com/cirs/biz/service/impl/TEvaluationServiceImpl.java

@@ -93,4 +93,9 @@ public class TEvaluationServiceImpl implements ITEvaluationService
     {
         return tEvaluationMapper.deleteTEvaluationById(id);
     }
+
+    @Override
+    public float getscore(String componentid) {
+        return tEvaluationMapper.getscore(componentid);
+    }
 }

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

@@ -150,4 +150,10 @@ public class TVerificationTaskDetailServiceImpl implements ITVerificationTaskDet
         }
         return successMsg.toString();
     }
+
+    @Override
+    public List<TVerificationTaskDetail> selectTVerificationTaskDetailByTaskIds(List<Long> taskids) {
+        return tVerificationTaskDetailMapper.selectTVerificationTaskDetailByTaskIds(taskids);
+
+    }
 }

+ 4 - 1
cirs-biz/src/main/resources/mapper/biz/TEvaluationMapper.xml

@@ -35,7 +35,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTEvaluationVo"/>
         where id = #{id}
     </select>
-        
+    <select id="getscore" resultType="java.lang.Float">
+        select mark from t_evaluation where component_id=#{componentid} order by id desc limit 1
+    </select>
+
     <insert id="insertTEvaluation" parameterType="TEvaluation" useGeneratedKeys="true" keyProperty="id">
         insert into t_evaluation
         <trim prefix="(" suffix=")" suffixOverrides=",">

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

@@ -17,7 +17,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="calculate1"    column="calculate1"    />
         <result property="calculate2"    column="calculate2"    />
         <result property="calculate3"    column="calculate3"    />
-<!--        <result property="accuracy"    column="accuracy"    />-->
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -43,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="calculate1 != null  and calculate1 != ''"> and calculate1 = #{calculate1}</if>
             <if test="calculate2 != null  and calculate2 != ''"> and calculate2 = #{calculate2}</if>
             <if test="calculate3 != null  and calculate3 != ''"> and calculate3 = #{calculate3}</if>
-<!--            <if test="accuracy != null  and accuracy != ''"> and accuracy = #{accuracy}</if>-->
+
         </where>
     </select>
     
@@ -51,12 +50,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTVerificationTaskDetailVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectTVerificationTaskDetailByTaskIds"
+            resultType="com.cirs.biz.domain.TVerificationTaskDetail" resultMap="TVerificationTaskDetailResult">
+        select task_id, use_scene,search_condition, result1, result2, result3, result4, result5, calculate1, calculate2, calculate3, create_by, create_time, update_by, update_time, remark from t_verification_task_detail
+            where task_id in
+        <foreach item="item" collection="taskids" index="index" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
+
     <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="useScene != null">use_scene,</if>
             <if test="searchCondition != null">search_condition,</if>
             <if test="result1 != null">result1,</if>
             <if test="result2 != null">result2,</if>
@@ -66,7 +73,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="calculate1 != null">calculate1,</if>
             <if test="calculate2 != null">calculate2,</if>
             <if test="calculate3 != null">calculate3,</if>
---             <if test="accuracy != null">accuracy,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -75,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskId != null">#{taskId},</if>
-            <if test="useScene != null">#{useScene}</if>
+            <if test="useScene != null">#{useScene},</if>
             <if test="searchCondition != null">#{searchCondition},</if>
             <if test="result1 != null">#{result1},</if>
             <if test="result2 != null">#{result2},</if>
@@ -85,7 +91,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="calculate1 != null">#{calculate1},</if>
             <if test="calculate2 != null">#{calculate2},</if>
             <if test="calculate3 != null">#{calculate3},</if>
---             <if test="accuracy != null">#{accuracy},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -98,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update t_verification_task_detail
         <trim prefix="SET" suffixOverrides=",">
             <if test="taskId != null">task_id = #{taskId},</if>
-            <if test="useScene != null">use_scene = #{useScene}</if>
+            <if test="useScene != null">use_scene = #{useScene},</if>
             <if test="searchCondition != null">search_condition = #{searchCondition},</if>
             <if test="result1 != null">result1 = #{result1},</if>
             <if test="result2 != null">result2 = #{result2},</if>
@@ -108,7 +113,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="calculate1 != null">calculate1 = #{calculate1},</if>
             <if test="calculate2 != null">calculate2 = #{calculate2},</if>
             <if test="calculate3 != null">calculate3 = #{calculate3},</if>
---             <if test="accuracy != null">accuracy = #{accuracy},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>

+ 2 - 2
cirs-common/src/main/java/com/cirs/common/utils/poi/ExcelUtil.java

@@ -1214,7 +1214,7 @@ public class ExcelUtil<T>
             {
                 for (String value : propertyValue.split(separator))
                 {
-                    if (itemArray[1].equals(value))
+                    if (itemArray.length >= 2 &&itemArray[1].equals(value))
                     {
                         propertyString.append(itemArray[0] + separator);
                         break;
@@ -1223,7 +1223,7 @@ public class ExcelUtil<T>
             }
             else
             {
-                if (itemArray[1].equals(propertyValue))
+                if (itemArray.length >= 2 &&itemArray[1].equals(propertyValue))
                 {
                     return itemArray[0];
                 }

+ 1 - 1
cirs-ui/public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <link rel="icon" href="<%= BASE_URL %>newlogo.ico">
     <title><%= webpackConfig.name %></title>
     <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
 	  <style>

BIN
cirs-ui/public/newlogo.ico


+ 8 - 0
cirs-ui/src/api/biz/recommend.js

@@ -43,3 +43,11 @@ export function addTime(data) {
     data: data
   })
 }
+//得到元器件的评分
+export function getscore(componentid) {
+  return request({
+    url: '/biz/evaluation/componentid/'+componentid,
+    method: 'get',
+
+  })
+}

BIN
cirs-ui/src/assets/logo/newlogo.png


+ 2 - 1
cirs-ui/src/layout/components/Sidebar/Logo.vue

@@ -14,7 +14,8 @@
 </template>
 
 <script>
-import logoImg from '@/assets/logo/logo.png'
+// import logoImg from '@/assets/logo/logo.png'
+import logoImg from '@/assets/logo/newlogo.png'
 import variables from '@/assets/styles/variables.scss'
 
 export default {

+ 1 - 0
cirs-ui/src/utils/request.js

@@ -118,6 +118,7 @@ service.interceptors.response.use(res => {
 
 // 通用下载方法
 export function download(url, params, filename, config) {
+
   downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
   return service.post(url, params, {
     transformRequest: [(params) => { return tansParams(params) }],

+ 32 - 23
cirs-ui/src/views/biz/component/index.vue

@@ -296,6 +296,15 @@
 <!--          v-hasPermi="['biz:component: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:component:import']"
+        >导入</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -310,43 +319,43 @@
     </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" />
+      <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" />
+      <el-table-column label="国产替代型号" align="center" prop="replaceDomesticModel" width="110"/>
       <el-table-column label="质量等级" align="center" prop="qualityGrade" />
       <el-table-column label="供货周期" align="center" prop="deliveryCycle" />
-      <el-table-column label="供货量(个/年)" align="center" prop="supplyQuantity" />
+      <el-table-column label="供货量(个/年)" align="center" prop="supplyQuantity" width="120"/>
       <el-table-column label="价格" align="center" prop="unitPrice" />
-      <el-table-column label="ZZKK等级" align="center" prop="zzkkLevel" />
-      <el-table-column label="是否在优选目录内" align="center" prop="inPreference" />
+      <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="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" />
-      <el-table-column label="最大反向工作电压VRRM" align="center" prop="paramVrrm" />
-      <el-table-column label="最大浪涌电流IFSM" align="center" prop="paramIfsm" />
-      <el-table-column label="稳压状态下的动态电阻ZZ" align="center" prop="paramZz" />
-      <el-table-column label="最大额定功率PCM" align="center" prop="paramPcm" />
-      <el-table-column label="最大集电极电流ICM" align="center" prop="paramIcm" />
-      <el-table-column label="最大集电极-基极电压VCBO" align="center" prop="paramVcbo" />
-      <el-table-column label="集电极-发射极电压VCEO" align="center" prop="paramVceo" />
-      <el-table-column label="发射极-基极电压VEBO" align="center" prop="paramVebo" />
-      <el-table-column label="漏源电压VDSS" align="center" prop="paramVdss" />
-      <el-table-column label="漏极直流电流ID" align="center" prop="paramId" />
-      <el-table-column label="漏-源通态电阻RDS(on)" align="center" prop="paramRdsOn" />
-      <el-table-column label="抗静电能力" align="center" prop="antistaticCapacity" />
-      <el-table-column label="抗辐照能力" align="center" prop="radiationResistance" />
+      <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">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -405,8 +414,8 @@
       </div>
     </el-dialog>
     <!-- 添加或修改元器件对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <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-item label="元器件名称" prop="componentName">
           <el-input v-model="form.componentName" placeholder="请输入元器件名称" />
         </el-form-item>

+ 4 - 4
cirs-ui/src/views/biz/detail/index.vue

@@ -143,8 +143,8 @@
     </el-row>
 
     <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="编号" align="center" prop="id" />
+<!--      <el-table-column type="selection" width="55" align="center" />-->
+<!--      <el-table-column label="编号" align="center" prop="id" />-->
       <el-table-column label="任务id" align="center" prop="taskId" />
       <el-table-column label="查询条件" align="center" prop="searchCondition" />
       <el-table-column label="标准结果1" align="center" prop="result1" />
@@ -216,8 +216,8 @@
       </div>
     </el-dialog>
     <!-- 添加或修改验证任务详情对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form  style="border:1px solid #C0C0C0;padding: 5px;margin: auto" ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="任务id" prop="taskId">
           <el-input v-model="form.taskId" placeholder="请输入任务id" />
         </el-form-item>

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

@@ -84,8 +84,8 @@
     </el-row>
 
     <el-table v-loading="loading" :data="evaluationList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="编号" align="center" prop="id" />
+<!--      <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" >
@@ -215,8 +215,6 @@ export default {
     try {
       this.componentInfo = await getall();
       // console.log(this.componentInfo);
-
-
     } catch (error) {
       console.error("Error fetching component info:", error);
     }

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

@@ -186,7 +186,7 @@
 </template>
 
 <script>
-import { RecommendlistComponent,getComponent,getBycomponentId,addEvaluation,addTime } from "@/api/biz/recommend";
+import { RecommendlistComponent,getComponent,getBycomponentId,addEvaluation,addTime,getscore } from "@/api/biz/recommend";
 
 export default {
   name: "recommend",
@@ -267,10 +267,17 @@ export default {
   methods: {
     // 得到evaluation
     getevaluationdata(row){
-      this.showevalatedialog=true
-      this.evaluation.componentId = row.id
 
-      this.evaluation.usedBy = row.applications.toString()
+      getscore(row.id.toString()).then(score=>{
+        console.log(score)
+        this.escore = score.data
+        this.showevalatedialog=true
+        this.evaluation.componentId = row.id
+
+        this.evaluation.usedBy = row.applications.toString()
+      })
+
+
 
     },
 
@@ -282,6 +289,7 @@ export default {
         this.componentList = response.rows;
         let clist = response.rows;
         for(let i=0; i< clist.length;i++){
+
           getBycomponentId(clist[i].id).then(res=>{
             // console.log(res.data)
             let apps = []

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

@@ -69,6 +69,15 @@
 <!--          @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
@@ -79,13 +88,14 @@
           @click="handleExport"
           v-hasPermi="['biz:record:export']"
         >导出</el-button>
+
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="编号" align="center" prop="id" />
+    <el-table v-loading="loading" :data="recordList" @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="componentId" />
       <el-table-column label="使用场景" align="center" prop="usedBy" />
       <el-table-column label="使用日期" align="center" prop="usedDate" width="180">
@@ -94,7 +104,7 @@
         </template>
       </el-table-column>
       <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -154,13 +164,13 @@
     </el-dialog>
     <!-- 添加或修改元器件使用经历对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form  style="border:1px solid #C0C0C0;padding: 5px;margin: auto" ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="元器件编号" prop="componentId">
 <!--          <el-input v-model="form.componentId" placeholder="请输入元器件编号" />-->
-          <el-select v-model="queryParams.componentId" filterable placeholder="请输入元器件编号">
+          <el-select v-model="form.componentId" filterable placeholder="请输入元器件编号">
             <el-option
-              v-for="item in componentIds"
-              :value="item">
+              v-for="item in componentInfo"
+              :value="item.id">
             </el-option>
           </el-select>
         </el-form-item>
@@ -256,12 +266,12 @@ export default {
     /** 查询元器件使用经历列表 */
     getList() {
       this.loading = true;
-      getall().then(res=>{
-        for(let one of res){
-          this.componentIds.push(one.id)
-
-        }
-      })
+      // getall().then(res=>{
+      //   for(let one of res){
+      //     this.componentInfo.push(one.id)
+      //
+      //   }
+      // })
       listRecord(this.queryParams).then(response => {
         this.recordList = response.rows;
         this.total = response.total;

+ 43 - 7
cirs-ui/src/views/biz/task/index.vue

@@ -114,7 +114,7 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['biz:detail:export']"
-        >导出</el-button>
+        >选择任务导出任务详情</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -139,7 +139,7 @@
       <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" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -199,7 +199,7 @@
 
     <!-- 添加或修改验证任务对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form  style="border:1px solid #C0C0C0;padding: 5px;margin: auto" ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="任务名称" prop="taskName">
           <el-input v-model="form.taskName" placeholder="请输入任务名称" />
         </el-form-item>
@@ -246,6 +246,9 @@
 <script>
 import { listTask, getTask, delTask, addTask, updateTask } from "@/api/biz/task";
 import { getToken } from "@/utils/auth";
+import {Loading, Message} from "element-ui";
+import service from "../../../utils/request";
+import errorCode from "../../../utils/errorCode";
 export default {
   name: "Task",
   data() {
@@ -402,16 +405,49 @@ export default {
         this.getList();
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
+
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('biz/detail/export', {
-        ...this.queryParams
-      }, `taskdetail_${new Date().getTime()}.xlsx`)
+
+      if(this.ids.length===0) {
+        this.importTemplate()
+      }else {
+        // this.download('biz/detail/export', this.ids, `taskdetail_${new Date().getTime()}.xlsx`)
+        let downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
+
+        let taskids = this.ids;
+        return service.post('biz/detail/export', taskids, {
+          headers: { 'Content-Type': 'application/json' },
+          responseType: 'blob',
+
+        }).then(async (data) => {
+          // Debug: 输出实际的响应 Content-Type
+          // console.log(data)
+          // console.log("Response Content-Type:", data.type);
+
+          const isBlob = (data.type !== 'application/json');
+          if (isBlob) {
+            const blob = new Blob([data])
+            saveAs(blob, `taskdetail_${new Date().getTime()}.xlsx`)
+          } else {
+            const resText = await data.text();
+            const rspObj = JSON.parse(resText);
+            const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
+            Message.error(errMsg);
+          }
+          downloadLoadingInstance.close();
+        }).catch((error) => {
+          console.error(error)
+          Message.error('下载文件出现错误,请联系管理员!')
+          downloadLoadingInstance.close();
+        })
+      }
+
     },
     /** 导入按钮操作 */
     handleImport() {
-      this.upload.title = "任务导入";
+      this.upload.title = "任务详情导入";
       this.upload.open = true;
     },
     /** 下载模板操作 */

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

@@ -114,7 +114,7 @@
 
     <!-- 添加或修改页面浏览时长对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form  style="border:1px solid #C0C0C0;padding: 5px;margin: auto" ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="元器件名称" prop="componentId">
           <el-input v-model="form.componentId" placeholder="请输入元器件名称" />
         </el-form-item>

+ 1 - 1
cirs-ui/src/views/tool/build/index.vue

@@ -147,7 +147,7 @@ import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/
 import { makeUpJs } from '@/utils/generator/js'
 import { makeUpCss } from '@/utils/generator/css'
 import drawingDefault from '@/utils/generator/drawingDefault'
-import logo from '@/assets/logo/logo.png'
+import logo from '@/assets/logo/newlogo.png'
 import CodeTypeDialog from './CodeTypeDialog'
 import DraggableItem from './DraggableItem'