jinlin
2024-06-06 8c834663344b1cc9c2ca569e6911900edd407f73
修改
28个文件已修改
1 文件已重命名
5个文件已添加
1620 ■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ProductImg.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/sysPictureBase/controller/SysPictureBaseController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/ModelLineController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/OperatConditModelController.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/dao/ModelRbdNodeDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/dao/OperatConditModelDao.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelNodes.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelRbd.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelRbdNode.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/OperatConditModel.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelLineService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelRbdNodeService.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/OperatConditModelService.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/taskReliability/ModelRbdDao.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/components/zt-dict-tag/src/zt-dict-tag.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/components/zt-dict/src/zt-dict.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/components/zt-table-column-dict/src/zt-table-column-dict.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/sysPictureBase/SysPictureBase.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/ConfigEdge/configEdge.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/ConfigNode/configNode.vue 359 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/OperatConditModel.vue 154 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/RBD-edit-img.vue 535 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/SimulatAssess.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/SimulatCurve.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/SimulatData.vue 135 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/TaskPhase.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -68,9 +68,7 @@
    @GetMapping("getProduct")
    public Result<List<ProductImg>> getProduct(Long productId) {
        List<ProductImg> list = xhProductModelService.getProduct(productId);
        return Result.ok(list);
    }
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
@@ -26,7 +26,7 @@
    List<XhProductModel> getProductList();
    List<ProductImg> getProduct(Long productId);
    List<ProductImg> getProduct(Long productId, Long parentId);
    List<XhProductModel> getTaskProductList();
    XhProductModel getById(Long id);
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ProductImg.java
@@ -43,7 +43,7 @@
    private String productType;
    @TableField(exist = false)
    private Integer reliabDistribType;
    private int reliabDistribType;
    @TableField(exist = false)
    private String taskMtbcf;
    @TableField(exist = false)
@@ -55,7 +55,7 @@
    @TableField(exist = false)
    private Integer isRepair;
    @TableField(exist = false)
    private Integer repairDistribType;
    private int repairDistribType;
    @TableField(exist = false)
    private String RepairMttcr;
    @TableField(exist = false)
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
@@ -68,7 +68,9 @@
    }
    public List<ProductImg> getProduct(Long productId) {
        return baseDao.getProduct(productId);
        XhProductModel model =this.get(productId);
        Long parentId = model.getPid();
        return baseDao.getProduct(productId,parentId);
    }
    public List<XhProductModel> getTaskProductList() {
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/sysPictureBase/controller/SysPictureBaseController.java
@@ -73,16 +73,9 @@
        } else {
            sysPictureBaseService.insert(sysPictureBase);
        }
        if (sysPictureBase.getIsDefault()==1){
            if (sysPictureBase.getId()==null){
                sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType());
                sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType(),null);
            }else{
                if (!sysPictureBase.getId().equals(sysPictureBase.getId())){
                    sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType());
                    sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType(),sysPictureBase.getId());
                }
            }
        if (sysPictureBase.getIsDefault() == 1) {
            sysPictureBaseService.updateByDefault(sysPictureBase.getId(), sysPictureBase.getProductType());
            sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(), sysPictureBase.getProductType(), null);
        }
        return Result.ok();
    }
@@ -111,7 +104,7 @@
            //关流
            outputStream.close();
            in.close();
        }  catch (IOException e) {
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
@@ -126,7 +119,7 @@
            response.getWriter().flush();
            response.getWriter().close();
        }  catch (IOException e) {
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
@@ -136,6 +129,7 @@
        SysPictureBase data = sysPictureBaseService.getDefaultImg(productType);
        return Result.ok(data);
    }
    @DeleteMapping
    @ApiOperation("删除")
    @LogOperation("删除")
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/ModelLineController.java
@@ -16,6 +16,7 @@
import com.zt.life.modules.mainPart.taskReliability.model.ModelLine;
import com.zt.life.modules.mainPart.taskReliability.model.ModelRbd;
import com.zt.life.modules.mainPart.taskReliability.service.ModelLineService;
import com.zt.life.modules.mainPart.taskReliability.service.ModelRbdNodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -42,6 +43,9 @@
    @Autowired
    private ModelLineService modelLineService;
    @Autowired
    private ModelRbdNodeService modelRbdNodeService;
    @Autowired
    private PythonLib pythonLib;
@@ -102,8 +106,8 @@
        ValidatorUtils.validateEntity(modelRbd, AddGroup.class, DefaultGroup.class);
        modelRbd.setContent(modelRbd.getContent().replace(modelRbd.getUrlPref(), URL_REPLACE_STR));
        modelRbd.setContent(modelRbd.getContent().replaceAll(TOKEN_REPLACE_REGEX, TOKEN_REPLACE_STR));
        modelRbdNodeService.saveNodeArr(modelRbd);
        modelLineService.insert(modelRbd);
        return Result.ok();
    }
@@ -115,6 +119,7 @@
        ValidatorUtils.validateEntity(modelRbd, UpdateGroup.class, DefaultGroup.class);
        modelRbd.setContent(modelRbd.getContent().replace(modelRbd.getUrlPref(), URL_REPLACE_STR));
        modelRbd.setContent(modelRbd.getContent().replaceAll(TOKEN_REPLACE_REGEX, TOKEN_REPLACE_STR));
        modelRbdNodeService.saveNodeArr(modelRbd);
        modelLineService.update(modelRbd);
        return Result.ok();
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/OperatConditModelController.java
@@ -12,6 +12,7 @@
import com.zt.common.validator.group.AddGroup;
import com.zt.common.validator.group.DefaultGroup;
import com.zt.common.validator.group.UpdateGroup;
import com.zt.life.modules.mainPart.taskReliability.model.ModelNodes;
import com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel;
import com.zt.life.modules.mainPart.taskReliability.service.OperatConditModelService;
import io.swagger.annotations.Api;
@@ -24,6 +25,7 @@
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
@@ -52,11 +54,17 @@
        return Result.ok(operatConditModelService.page(queryFilter));
    }
    @GetMapping("getModelNodes")
    @ApiOperation("模型")
    public Result<Map> getModelNodes(Long shipId) {
        Map data = operatConditModelService.getModelNodes(shipId);
        return Result.ok(data);
    }
    @GetMapping("{id}")
    @ApiOperation("信息")
    public Result<OperatConditModel> get(@PathVariable("id") Long id){
        OperatConditModel data = operatConditModelService.get(id);
        return Result.ok(data);
    }
@@ -65,9 +73,8 @@
    @LogOperation("新增")
    public Result insert(@RequestBody OperatConditModel operatConditModel){
        //效验数据
        ValidatorUtils.validateEntity(operatConditModel, AddGroup.class, DefaultGroup.class);
        operatConditModelService.insert(operatConditModel);
        //ValidatorUtils.validateEntity(operatConditModel, AddGroup.class, DefaultGroup.class);
        operatConditModelService.save(operatConditModel);
        return Result.ok();
    }
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/dao/ModelRbdNodeDao.java
New file
@@ -0,0 +1,16 @@
package com.zt.life.modules.mainPart.taskReliability.dao;
import com.zt.common.dao.BaseDao;
import com.zt.life.modules.mainPart.taskReliability.model.ModelRbdNode;
import org.apache.ibatis.annotations.Mapper;
/**
 * model_line
 *
 * @author zt generator
 * @since 1.0.0 2024-02-28
 */
@Mapper
public interface ModelRbdNodeDao extends BaseDao<ModelRbdNode> {
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/dao/OperatConditModelDao.java
@@ -1,7 +1,10 @@
package com.zt.life.modules.mainPart.taskReliability.dao;
import com.zt.common.dao.BaseDao;
import com.zt.life.modules.mainPart.taskReliability.model.ModelNodes;
import com.zt.life.modules.mainPart.taskReliability.model.ModelRbd;
import com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
@@ -20,4 +23,9 @@
    List<OperatConditModel> getList(Map<String, Object> params);
    List<ModelRbd> getModelList(Long productId);
    List<ModelNodes> getModelNodes(Long shipId);
    void deleteByOperatConditId(Long operatConditId);
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelNodes.java
New file
@@ -0,0 +1,22 @@
package com.zt.life.modules.mainPart.taskReliability.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.entity.BusiEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * model_rbd
 *
 * @author zt generator
 * @since 1.0.0 2024-03-10
 */
@Data
public class ModelNodes extends BusiEntity {
    @ApiModelProperty(value = "")
    private Long modelId;
    private String nodeIds;
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelRbd.java
@@ -34,6 +34,10 @@
    @ApiModelProperty(value = "")
    private Long productId;
    @TableField(exist = false)
    @ApiModelProperty(value = "")
    private Long[] nodeArr;
    @ApiModelProperty(value = "")
    private String content;
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelRbdNode.java
New file
@@ -0,0 +1,37 @@
package com.zt.life.modules.mainPart.taskReliability.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.entity.BusiEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * model_rbd
 *
 * @author zt generator
 * @since 1.0.0 2024-03-10
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("model_rbd_node")
public class ModelRbdNode extends BusiEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "")
    private Long pid;
    @ApiModelProperty(value = "")
    private Long productId;
    @ApiModelProperty(value = "")
    private Long modelId;
    @ApiModelProperty(value = "")
    private Long nodeId;
    @ApiModelProperty(value = "备注")
    private String remark;
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/OperatConditModel.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.constant.Constant;
import com.zt.common.entity.BusiEntity;
import com.zt.common.entity.TreeNode;
import io.swagger.annotations.ApiModel;
@@ -50,6 +51,12 @@
    @TableField(exist = false)
    private List<OperatConditModel> children = new ArrayList<>();
    @ApiModelProperty(value = "对应模型列表")
    @TableField(exist = false)
    private List<ModelRbd> modelList = new ArrayList<>();
    private Integer isDisabled;
    @TableField(exist = false)
    private Long pid;
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelLineService.java
@@ -89,6 +89,7 @@
        modelRbdDao.insert(modelRbd);
    }
    @Transactional(rollbackFor = Exception.class)
    public void update(ModelRbd modelRbd) {
        if (modelRbd==null) return;
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelRbdNodeService.java
New file
@@ -0,0 +1,52 @@
package com.zt.life.modules.mainPart.taskReliability.service;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.zt.common.db.query.QueryFilter;
import com.zt.common.service.BaseService;
import com.zt.common.utils.JsonUtils2;
import com.zt.common.utils.UUIDUtil;
import com.zt.life.modules.mainPart.basicInfo.dao.ParamDataDao;
import com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao;
import com.zt.life.modules.mainPart.basicInfo.model.ParamData;
import com.zt.life.modules.mainPart.basicInfo.model.ProductImg;
import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
import com.zt.life.modules.mainPart.taskReliability.dao.*;
import com.zt.life.modules.mainPart.taskReliability.dto.ModelLinePair;
import com.zt.life.modules.mainPart.taskReliability.model.*;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.StringWriter;
import java.util.*;
import java.util.stream.Collectors;
/**
 * model_line
 *
 * @author zt generator
 * @since 1.0.0 2024-02-28
 */
@Service
public class ModelRbdNodeService extends BaseService<ModelRbdNodeDao, ModelRbdNode> {
    public void saveNodeArr(ModelRbd modelRbd) {
//
        ModelRbdNode node = new ModelRbdNode();
        node.setProductId(modelRbd.getProductId());
        node.setModelId(modelRbd.getId());
        Long[] nodeArr = modelRbd.getNodeArr();
        for(Long nodeId :nodeArr){
            node.setId(UUIDUtil.generateId());
            node.setNodeId(nodeId);
            baseDao.insert(node);
        }
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/OperatConditModelService.java
@@ -1,23 +1,29 @@
package com.zt.life.modules.mainPart.taskReliability.service;
import com.alibaba.fastjson.JSON;
import com.zt.common.service.BaseService;
import com.zt.common.utils.TreeUtils;
import com.zt.life.modules.mainPart.taskReliability.dao.OperatConditModelDao;
import com.zt.life.modules.mainPart.taskReliability.model.ModelNodes;
import com.zt.life.modules.mainPart.taskReliability.model.ModelRbd;
import com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel;
import org.springframework.stereotype.Service;
import com.zt.common.db.query.QueryFilter;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * operat_condit_model
 *
 * @author zt generator
 * @author zt generator
 * @since 1.0.0 2024-03-29
 */
@Service
public class OperatConditModelService  extends BaseService<OperatConditModelDao, OperatConditModel> {
public class OperatConditModelService extends BaseService<OperatConditModelDao, OperatConditModel> {
    /**
     * 分页查询
@@ -27,7 +33,22 @@
     */
    public List<OperatConditModel> page(QueryFilter queryFilter) {
        List<OperatConditModel> list = baseDao.getList(queryFilter.getQueryParams());
        for (OperatConditModel conditModel : list) {
            List<ModelRbd> modelList = baseDao.getModelList(conditModel.getId());
            conditModel.setModelList(modelList);
        }
        return TreeUtils.build(list);
    }
    public Map getModelNodes(Long shipId) {
        List<ModelNodes> list = baseDao.getModelNodes(shipId);
        Map<String, String> map = new HashMap<>();
        for (ModelNodes node : list) {
            map.put(node.getModelId().toString(), node.getNodeIds());
        }
        //String json= JSON.toJSONString(map);
        return map;
    }
    /**
@@ -39,4 +60,15 @@
        super.deleteLogic(ids);
    }
    public void save(OperatConditModel parent) {
        Long operatConditId = parent.getOperatConditId();
        baseDao.deleteByOperatConditId(operatConditId);
        this.saveIteration(parent);
    }
    public void saveIteration(OperatConditModel parent) {
        baseDao.insert(parent);
        for (OperatConditModel sub : parent.getChildren()) {
            this.saveIteration(sub);
        }
    }
}
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
@@ -32,7 +32,7 @@
            <if test="pid==null">
                and pid is null
            </if>
        and product_type =${productType}
            and product_type =${productType}
        </where>
        Group by product_type
    </select>
@@ -68,6 +68,32 @@
          AND ((a.PID = ${productId})
            or (a.PID in (select pid from product_model where id = ${productId} and product_type = 10) and
                a.product_type &lt;&gt; 10))
          and a.id not in (
            select node_id
            from model_rbd_node
            where product_id in (
                select pid
                from product_model
                where id = ${productId}
                  and is_delete = 0
                union
                select id
                from product_model
                where is_delete = 0
                  and pid = ${parentId}
                  and id &lt;&gt; ${productId}
            )
            union
            select node_id
            from model_rbd_node
            where product_id in (
                select id
                from product_model
                where is_delete = 0 and pid = ${productId}
            )
        )
    </select>
    <select id="getTaskProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel">
modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml
@@ -5,7 +5,7 @@
    <update id="updateByDefault">
        update sys_picture_base
        set is_default=2
        where id != ${id}
        where id &lt;&gt; ${id}
          and product_type = ${productType}
          and is_delete = 0
    </update>
@@ -39,9 +39,7 @@
                and ${whereSql}
            </if>
        </where>
        <if test="orderBySql!=null">
            ORDER BY ${orderBySql}
        </if>
            ORDER BY is_default,product_type,id
    </select>
    <select id="getDefaultImg" resultType="com.zt.life.modules.mainPart.sysPictureBase.model.SysPictureBase">
        select a.name, a.id
modules/mainPart/src/main/resources/mapper/taskReliability/ModelRbdDao.xml
@@ -13,7 +13,7 @@
        from model_rbd a
        left join (select model_id,1 as end from algorithm where model_type = 'end' and is_delete=0 ) b on b.model_id =
        a.id
        left join (select model_id, count(1) as num from algorithm where is_delete=0 group by model_id ) c on c.model_id
        left join (select id, count(1) as num from model_rbd where is_delete=0 group by id ) c on c.id
        = a.id
        left join (select model_id,count(1) as num from operat_condit_model where is_delete=0 group by model_id ) d on
        d.model_id = a.id
modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml
@@ -2,14 +2,21 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.OperatConditModelDao">
    <delete id="deleteByOperatConditId">
        delete
        from operat_condit_model
        where operat_condit_id = ${operatConditId}
    </delete>
    <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel">
        SELECT a.id ,
               a.pid ,
               a.`NAME` as product,
        SELECT a.id,
               a.pid,
               a.`NAME`                                                               as product,
               c.model_name,
               a.id                                                                   as product_id,
               b.model_id,
               b.id as operatConditModelId
               case when b.is_disabled is null or b.is_disabled = 1 then 1 else 0 end as is_disabled,
               ${operatConditId}                                                      as operatConditId
        FROM product_model a
                 LEFT JOIN operat_condit_model b
                           ON b.product_id = a.id
@@ -32,5 +39,16 @@
          and a.product_type in (4, 3, 2, 10)
          AND a.is_delete = 0
    </select>
    <select id="getModelList" resultType="com.zt.life.modules.mainPart.taskReliability.model.ModelRbd">
        select *
        from model_rbd
        where product_id = ${productId}
          and is_delete = 0
    </select>
    <select id="getModelNodes" resultType="com.zt.life.modules.mainPart.taskReliability.model.ModelNodes">
        SELECT model_id, GROUP_CONCAT(node_id) as nodeIds
        FROM `model_rbd_node`
        group by model_id
    </select>
</mapper>
web/packages/components/zt-dict-tag/src/zt-dict-tag.vue
@@ -1,5 +1,5 @@
<template>
  <el-tag :color="tagColor"  v-if="$store.getters.getDictLabel(dict, value)!=null" :type="tagType" :size="size" :effect="effect" :hit="hit">{{$store.getters.getDictLabel(dict, value)}}
  <el-tag :color="tagColor" :type="tagType" :size="size" :effect="effect" :hit="hit">{{dictLabel}}
  </el-tag>
</template>
<script>
@@ -9,6 +9,12 @@
      dict: { // 字典类型
        type: String,
        required: true
      },
      additional: {// 添加的
        type: Array,
        default: function () {
          return []
        }
      },
      value: [String, Number, Boolean],
      typeS: String,
@@ -33,11 +39,24 @@
      return {
        tagType: 'primary',
        tagColor: '',
        colorArr:['primary','success','info','warning','danger']
        colorArr: ['primary', 'success', 'info', 'warning', 'danger']
      }
    },
    mounted() {
      this.init()
    },
    computed: {
      dictLabel() {
        let result = this.$store.getters.getDictLabel(this.dict, this.value)
        if ("" + result == "" + this.value) {
          for (let item of this.additional) {
            if (item.dictValue == "" + this.value) {
              result = item.dictLabel
            }
          }
        }
        return result
      }
    },
    methods: {
      async init() {
@@ -61,8 +80,8 @@
        if (!this.typeS && !this.typeI && !this.typeW && !this.typeD && !this.typeColor) { // 没有指定颜色
          if (this.value === false || this.value === 0 || this.value === '0' || this.value === 'false') {
            this.tagType = 'primary'
          }else{
            this.tagType = this.colorArr[this.value%5]
          } else {
            this.tagType = this.colorArr[this.value % 5]
          }
        }
      }
web/packages/components/zt-dict/src/zt-dict.vue
@@ -1,6 +1,6 @@
<template>
    <div>
      <el-select :value="dictValue" @change="changeProjectMajor" @input="$emit('input', $event)" :placeholder="placeholder" clearable style="width: 100%;" v-if="showType === 'select'" :disabled="disabled">
      <el-select v-if="showType === 'select'" :value="dictValue" @change="changeProjectMajor" @input="$emit('input', $event)" :placeholder="placeholder" clearable style="width: 100%;"  :disabled="disabled">
          <el-option :label="data.dictLabel" v-for="data in dicts" :key="data.dictValue" :value ="data.dictValue">{{data.dictLabel}}</el-option>
      </el-select>
      <div v-if="showType === 'radio'">
@@ -9,7 +9,7 @@
          <el-input class="radio-input" v-if="isOtherOptionSelected" v-model="inputName"></el-input>
        </el-radio-group>
      </div>
      <zt-combo-tree v-model="dictValue" :datas="dictTrees" :disabled-filter="disabledFilter" @input="$emit('input', $event)" v-if="showType === 'tree'" :placeholder="placeholder"/>
      <zt-combo-tree  v-if="showType === 'tree'" v-model="dictValue" :datas="dictTrees" :disabled-filter="disabledFilter" @input="$emit('input', $event)" :placeholder="placeholder"/>
    </div>
</template>
<script>
@@ -26,6 +26,12 @@
        required: true
      },
      excluded: {// 排除的
        type: Array,
        default: function () {
          return []
        }
      },
      additional: {// 添加的
        type: Array,
        default: function () {
          return []
@@ -73,10 +79,9 @@
        if (this.excluded.length > 0) {
          let excludedArray = []
          this.excluded.forEach(value => excludedArray.push(value + ''))
          return dicts.filter(option => excludedArray.indexOf(option.dictValue + '') < 0)
        } else {
          return dicts
          dicts =  dicts.filter(option => excludedArray.indexOf(option.dictValue + '') < 0)
        }
        return dicts.concat(this.additional);
      }
    },
    watch: {
web/packages/components/zt-table-column-dict/src/zt-table-column-dict.vue
@@ -1,6 +1,6 @@
<template>
  <el-table-column :label="label" :key="keys" header-align="center" align="center" :width="width" v-slot="{ row }">
    <zt-dict-tag :dict="dict" :value="row[prop]" :typeS="typeS" :typeI="typeI" :typeW="typeW" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
    <zt-dict-tag :dict="dict" :additional=additional :value="row[prop]" :typeS="typeS" :typeI="typeI" :typeW="typeW" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
  </el-table-column>
</template>
<script>
@@ -10,6 +10,12 @@
      keys:{
        type:String
      },
      additional: {// 添加的
        type: Array,
        default: function () {
          return []
        }
      },
      label: String,
      width: {
        type: String,
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
@@ -5,7 +5,7 @@
        <el-input v-model="dataForm.name"></el-input>
      </zt-form-item>
      <zt-form-item label="产品类型" prop="productType" rules="required">
        <zt-dict v-model="dataForm.productType" dict="product"></zt-dict>
        <zt-dict v-model="dataForm.productType" dict="product" :additional=additional></zt-dict>
      </zt-form-item>
      <zt-form-item label="是否默认" prop="isDefault" rules="required">
        <zt-dict v-model="dataForm.isDefault" dict="is_or_not"></zt-dict>
@@ -14,14 +14,14 @@
        <el-input v-model="dataForm.contentType"></el-input>
      </zt-form-item>
      <input type="hidden" id="svgContentId" :value="dataForm.svgContent"/>
              <zt-form-item>
<!--                <el-upload action="*" :on-change="uploadSvgContent">-->
<!--                  <el-button slot="trigger" size="small" type="primary">选取文件</el-button>-->
<!--                </el-upload>-->
                <label class="custom-file-upload">
                <input type="file" @change="uploadSvgContent" />
                </label>
              </zt-form-item>
      <zt-form-item>
        <!--                <el-upload action="*" :on-change="uploadSvgContent">-->
        <!--                  <el-button slot="trigger" size="small" type="primary">选取文件</el-button>-->
        <!--                </el-upload>-->
        <label class="custom-file-upload">
          <input type="file" @change="uploadSvgContent"/>
        </label>
      </zt-form-item>
    </el-form>
    <iframe :src='SVGEditorUrl' ref="myIframe" width="100%" id="iframe"
            style="height:calc(100vh - 300px)">
@@ -36,6 +36,7 @@
  export default {
    data() {
      return {
        additional: [{dictValue: '20', dictLabel: '运算图元', remark: ''}],
        SVGEditorUrl: `/SVGOrigin/Method-Draw-master/editor/index.html`,
        url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`,
        fileList: [],
@@ -62,7 +63,7 @@
            ...this.dataForm,
            ...res.data
          }
          console.log(this.dataForm,'this.dataForm this.dataForm')
          console.log(this.dataForm, 'this.dataForm this.dataForm')
        }
      },
      httpRequest(option) {
@@ -100,10 +101,10 @@
      async formSubmit() {
        const iframeWindow = this.$refs.myIframe.contentWindow;
        this.dataForm.svgContent = iframeWindow.getSVGContentTest()
        console.log(this.dataForm.svgContent+'this.dataForm.svgContent')
        console.log(this.dataForm.svgContent + 'this.dataForm.svgContent')
        this.$http.post('/sysPictureBase/save', this.dataForm).then(res => {
          if (res.success) {
            console.log(this.dataForm,'this.dataForm')
            console.log(this.dataForm, 'this.dataForm')
            this.$tip.success()
            this.$refs.dialog.close()
            this.$emit('refreshDataList')
@@ -114,9 +115,9 @@
      async uploadSvgContent(event) {
        const iframeWindow = this.$refs.myIframe.contentWindow
        const file = event.target.files[0];
        console.log(file,'file file')
        console.log(file, 'file file')
        // 可以在这里进行进一步的文件处理,比如读取文件内容等操作
        if (file && file.type==='image/svg+xml') {
        if (file && file.type === 'image/svg+xml') {
          const reader = new FileReader();
          reader.onload = (e) => {
            const fileContent = e.target.result;
@@ -124,7 +125,7 @@
            iframeWindow.setSvgContent(fileContent)
          }
          reader.readAsText(file); // 以文本形式读取文件内容
        }else {
        } else {
          this.$message({message: '请选择SVG图片', type: 'warning'})
          return false; // 取消操作
        }
@@ -148,6 +149,7 @@
    cursor: pointer;
    background-color: #f9f9f9;
  }
  .img-sc > .el-form-item > .el-form-item__content {
    width: 100%;
  }
web/src/views/modules/sysPictureBase/SysPictureBase.vue
@@ -9,7 +9,7 @@
          </el-form-item>
          <el-form-item>
            <zt-dict v-model="dataForm.productType" dict="product" placeholder="请选择产品类型" clearable></zt-dict>
            <zt-dict v-model="dataForm.productType" dict="product" :additional=additional placeholder="请选择产品类型" clearable></zt-dict>
          </el-form-item>
          <el-form-item>
            <zt-button type="query" @click="table.query()"/>
@@ -29,7 +29,7 @@
            </template>
          </el-table-column>
          <el-table-column prop="contentType" label="检索关键字"/>
          <zt-table-column-dict prop="productType" label="产品类型" dict="product"/>
          <zt-table-column-dict prop="productType" label="产品类型" dict="product" :additional=additional />
          <zt-table-column-handle :table="table"
                                  delete-perm="sysPictureBase::delete"/>
        </el-table>
@@ -46,6 +46,7 @@
  export default {
    data() {
      return {
        additional: [{dictValue: '20', dictLabel: '运算图元', remark: ''}],
        url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`,
        dataForm: {
          contentType: '',
web/src/views/modules/taskReliability/ConfigEdge/configEdge.vue
File was renamed from web/src/views/modules/taskReliability/ConfigEdge/index.vue
@@ -60,7 +60,7 @@
<script>
import { Edge} from '@antv/x6';
export default {
  name: "index",
  name: "configEdit",
  data(){
    return{
      left_p:document.documentElement.clientHeight*0.9,
web/src/views/modules/taskReliability/ConfigNode/configNode.vue
New file
@@ -0,0 +1,359 @@
<template>
  <div ref="" style="position: absolute;top:0;right:0;background:#cccccc;width: 400px;"
       :style="'height:'+ left_p + 'px'">
    <el-card style="height: 100%">
      <el-tabs v-model="activeName" id="tabPane">
        <el-tab-pane label="属性" name="first">
          <el-form :model="globalGridAttr">
            <el-form-item v-show="shape!=='custom-circle1'" label="节点名称" prop="nodeText" label-width="80px">
              <el-input v-model="globalGridAttr.nodeText" style="width:100%" @change="onTextChange"></el-input>
            </el-form-item>
            <el-form-item v-show="nodeType=='vote' || (nodeType=='node' && showNumberInput)" label="表决数量" prop="voteNum"
                          label-width="80px">
              <el-input type="number" v-model="globalGridAttr.voteNum" @change="onNumberInputValue"
                        placeholder="请输入数字"></el-input>
            </el-form-item>
            <div v-show="globalGridAttr.productType!=='product_xdy'">
              <el-form-item v-show="nodeType=='node'" label="可靠性分布类型" prop="reliabDistribType" label-width="125px">
                <zt-dict style="width: 100%" v-model="globalGridAttr.reliabDistribType" @input="onReliabDistribType"
                         dict="ReliabDistribType" placeholder="可靠性分布类型" clearable/>
              </el-form-item>
              <el-form-item v-show="nodeType=='node'" label="MTBCF" prop="taskMtbcf" label-width="80px">
                <el-input v-model="globalGridAttr.taskMtbcf" @change="onTaskMtbcfChange"></el-input>
              </el-form-item>
              <el-form-item v-show="nodeType=='node'" label="参数2" prop="taskMtbcfOther" label-width="80px">
                <el-input v-model="globalGridAttr.taskMtbcfOther" @change="onTaskMtbcfOtherChange"></el-input>
              </el-form-item>
              <el-form-item v-show="nodeType=='node'" label="是否可维修" prop="isRepair" label-width="100px">
                <el-select style="width: 100%" v-model="globalGridAttr.isRepair" @change="onIsRepairChange">
                  <el-option
                    v-for="item in isRepair"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
              <div v-show="nodeType=='node' && showRepairInput">
                <el-form-item label="可维修性分布类型" prop="repairDistribType" label-width="140px">
                  <zt-dict v-model="globalGridAttr.repairDistribType" dict="RepairDistribType"
                           @input="onRepairDistribTypeChange" placeholder="维修性分布类型" clearable/>
                </el-form-item>
                <el-form-item label="MTTCR" prop="repairMttcr" label-width="80px">
                  <el-input v-model="globalGridAttr.repairMttcr" @change="onRepairMttcrChange"></el-input>
                </el-form-item>
                <el-form-item label="参数2" prop="repairMttcrOther" label-width="80px">
                  <el-input v-model="globalGridAttr.repairMttcrOther" @change="onRepairMttcrOtherChange"></el-input>
                </el-form-item>
              </div>
            </div>
          </el-form>
        </el-tab-pane>
        <el-tab-pane label="样式" name="second">
          <el-row :gutter="5" align="middle" style="margin-top:20px">
            <el-col :span=8 style="font-size: 16px;line-height: 38px">文本大小</el-col>
            <el-col :span=16>
              <el-slider :min=8 :max=20 :step=1 v-model="globalGridAttr.nodeFontSize"
                         @change="onFontSizeChange"></el-slider>
            </el-col>
          </el-row>
          <el-row :gutter="5" align="middle" style="margin-top:20px">
            <el-col :span=8 style="font-size: 16px;line-height: 40px">字体颜色</el-col>
            <el-col :span=16>
              <el-color-picker v-model="globalGridAttr.nodeColor" style="width: 100%"
                               @change="onColorChange"></el-color-picker>
            </el-col>
          </el-row>
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>
<script>
  export default {
    name: "configNode",
    data() {
      return {
        globalGridAttr: {
          nodeText: '',
          nodeStroke: '',
          nodeStrokeWidth: '',
          nodeFill: '',
          nodeFontSize: '',
          nodeColor: '',
          nodeUsers: '',
          nodeDate: '',
          dataId: '',
          inspectName: '',
          nodeTypeExt: '',
          statusImg: '',
          reliabDistribType: '',
          repairDistribType: '',
          repairMttcr: '',
          repairMttcrOther: '',
          taskMtbcf: '',
          taskMtbcfOther: '',
          isRepair: '',
          voteNum: 0,
          productType: ''
        },
        data: {
          dataId: '',
          finishDate: '',
          inspectName: ''
        },
        showNumberInput: false,
        showRepairInput: false,
        isRepair: [
          {
            value: 0,
            label: '否'
          }, {
            value: 1,
            label: '是'
          }
        ],
        text: '',
        dialogVisible: false,
        activeName: 'first',
        curCel: null,
        left_p: document.documentElement.clientHeight * 0.75,
      }
    },
    components: {},
    props: {
    },
    watch: {
    },
    mounted() {
    },
    methods: {
      // 改变字体大小
      onFontSizeChange(e) {
        let val = e
        this.globalGridAttr.nodeFontSize = val
        this.curCel.attr('text/fontSize', val)
        this.curCel.attr('title/fontSize', val)
      },
      // 改变字体颜色
      onColorChange(e) {
        let val = e
        this.globalGridAttr.nodeColor = val
        this.curCel.attr('text/fill', val)
        this.curCel.attr('title/fill', val)
        this.curCel.attr('text/style/color', val)
        this.curCel.attr('title/style/color', val)
      },
      // 改变文本
      onTextChange(e) {
        this.text = e
        this.curCel.attr('text/text', this.text)
      },
      onNodeTypeExtChange(e) {
        if (this.globalGridAttr.nodeTypeExt === 'vote') {
          this.showNumberInput = true;
        } else {
          this.showNumberInput = false;
          this.globalGridAttr.numberInputValue = '';
        }
        this.globalGridAttr.nodeTypeExt = e
        let nodeTypeExt = {
          nodeTypeExt: this.globalGridAttr.nodeTypeExt
        }
        this.curCel.setData(nodeTypeExt)
      },
      // 表决数量
      onNumberInputValue(e) {
        this.globalGridAttr.voteNum = e
        let voteNum = {
          voteNum: this.globalGridAttr.voteNum
        }
        this.curCel.setData(voteNum)
      },
      // 可靠性分布类型
      onReliabDistribType(e) {
        this.globalGridAttr.reliabDistribType = e
        let reliabDistribType = {
          reliabDistribType: this.globalGridAttr.reliabDistribType
        }
        this.curCel.setData(reliabDistribType)
      },
      // mtbf
      onTaskMtbcfChange(e) {
        const numberRegex = /^-?\d+(\.\d+)?$/
        if (numberRegex.test(e)) {
          this.globalGridAttr.taskMtbcf = e
          let taskMtbcf = {
            taskMtbcf: this.globalGridAttr.taskMtbcf
          }
          this.curCel.setData(taskMtbcf)
        } else {
          this.$message.error('输入格式有误,请输入实数')
        }
      },
      // 参数2
      onTaskMtbcfOtherChange(e) {
        const numberRegex = /^-?\d+(\.\d+)?$/
        console.log(e, 'eeeee')
        if (numberRegex.test(e)) {
          this.globalGridAttr.taskMtbcfOther = e
          let taskMtbcfOther = {
            taskMtbcfOther: this.globalGridAttr.taskMtbcfOther
          }
          this.curCel.setData(taskMtbcfOther)
        } else {
          this.$message.error('输入格式有误,请输入实数')
        }
      },
      // 是否可维修
      onIsRepairChange(e) {
        this.showRepairInput = this.globalGridAttr.isRepair === 1;
        this.globalGridAttr.isRepair = e
        let isRepair = {
          isRepair: this.globalGridAttr.isRepair
        }
        this.curCel.setData(isRepair)
      },
      // 可维修性分布类型
      onRepairDistribTypeChange(e) {
        this.globalGridAttr.repairDistribType = e
        let repairDistribType = {
          repairDistribType: this.globalGridAttr.repairDistribType
        }
        this.curCel.setData(repairDistribType)
      },
      // Mttcr
      onRepairMttcrChange(e) {
        const numberRegex = /^-?\d+(\.\d+)?$/
        if (numberRegex.test(e)) {
          this.globalGridAttr.repairMttcr = e
          let repairMttcr = {
            repairMttcr: this.globalGridAttr.repairMttcr
          }
          this.curCel.setData(repairMttcr)
        } else {
          this.$message.error('输入格式有误,请输入实数')
        }
      },
      // 可维修性分布类型 参数2
      onRepairMttcrOtherChange(e) {
        const numberRegex = /^-?\d+(\.\d+)?$/
        if (numberRegex.test(e)) {
          this.globalGridAttr.repairMttcrOther = e
          let repairMttcrOther = {
            repairMttcrOther: this.globalGridAttr.repairMttcrOther
          }
          this.curCel.setData(repairMttcrOther)
        } else {
          this.$message.error('输入格式有误,请输入实数')
        }
      },
      onStatusImgChange(e) {
        this.globalGridAttr.statusImg = e
        let statusImg = {
          statusImg: this.globalGridAttr.statusImg
        }
        this.curCel.setData(statusImg)
        console.log(this.globalGridAttr.statusImg, 'this.globalGridAttr.statusImg')
        console.log(this.curCel, 'this.curCel')
        console.log(this.curCel.attr, 'this.curCel.attr')
        this.curCel.removeTools()
        this.curCel.addTools([
          {
            name: 'button',
            args: {
              markup: [
                {
                  tagName: 'image',
                  selector: 'icon',
                  attrs: {
                    // 'xlink:href': 'https://gw.alipayobjects.com/mdn/rms_43231b/afts/img/A*evDjT5vjkX0AAAAAAAAAAAAAARQnAQ',
                    'xlink:href': statusImg.statusImg,
                    width: 30,
                    height: 30,
                    x: 0,
                    y: 0
                  }
                }
              ]
            }
          }
        ])
      },
      loadData(cell) {
        this.curCel = cell
        if (cell.id) {
          this.nodeType = cell.getData().nodeType
          this.showNumberInput = false
          this.globalGridAttr.nodeStroke = cell.attr('body/stroke')
          this.globalGridAttr.nodeStrokeWidth = cell.attr('body/strokeWidth')
          this.globalGridAttr.nodeFill = cell.attr('body/fill')
          // globalGridAttr.nodeFontSize = cell.attr('text/fontSize')
          // globalGridAttr.nodeFontSize = cell.attr('title/fontSize')
          this.globalGridAttr.nodeFontSize = cell.attr('text/fontSize') ? cell.attr('text/fontSize') : cell.attr('title/fontSize')
          this.globalGridAttr.nodeColor = cell.attr('text/fill') ? cell.attr('text/fill') : cell.attr('title/fill') ? cell.attr('title/fill') : cell.attr('label/text/fill')
          // globalGridAttr.nodeColor = cell.attr('text/fill')
          // globalGridAttr.nodeColor = cell.attr('title/fill')
          // globalGridAttr.nodeColor = cell.attr('text/style/color')
          // globalGridAttr.nodeColor =  cell.attr('title/style/color')
          this.globalGridAttr.nodeUsers = cell.attr('approve/users')
          this.globalGridAttr.nodeText = cell.attr('text/text')
          this.globalGridAttr.nodeDate = cell.attr('title/text')
          this.globalGridAttr.dataId = cell.getData().dataId
          this.globalGridAttr.inspectName = cell.getData().inspectName
          this.globalGridAttr.nodeTypeExt = cell.getData().nodeTypeExt
          this.globalGridAttr.statusImg = cell.getData().statusImg
          this.globalGridAttr.reliabDistribType = cell.getData().reliabDistribType
          this.globalGridAttr.repairDistribType = cell.getData().repairDistribType
          this.globalGridAttr.repairMttcr = cell.getData().repairMttcr
          this.globalGridAttr.repairMttcrOther = cell.getData().repairMttcrOther
          this.globalGridAttr.taskMtbcf = cell.getData().taskMtbcf
          this.globalGridAttr.taskMtbcfOther = cell.getData().taskMtbcfOther
          this.globalGridAttr.isRepair = cell.getData().isRepair
          this.globalGridAttr.voteNum = cell.getData().voteNum
          this.globalGridAttr.productType = cell.getData().productType
          if (this.nodeType === 'vote' || this.globalGridAttr.nodeTypeExt === 'vote' || (cell.getData().voteNum !== undefined && cell.getData().voteNum !== '')) {
            console.log(cell.getData().voteNum, 'cell.getData().voteNum')
            this.showNumberInput = true
          }
          this.showRepairInput = cell.getData().isRepair
          cell.removeTools()
          cell.addTools([
            {
              name: 'button',
              args: {
                markup: [
                  {
                    tagName: 'image',
                    selector: 'icon',
                    attrs: {
                      // 'xlink:href': 'https://gw.alipayobjects.com/mdn/rms_43231b/afts/img/A*evDjT5vjkX0AAAAAAAAAAAAAARQnAQ',
                      'xlink:href': this.globalGridAttr.statusImg,
                      width: 30,
                      height: 30,
                      x: 0,
                      y: 0
                    }
                  }
                ]
              }
            }
          ])
        }
      }
    }
  }
</script>
<style>
  #tabPane .el-tabs__header.is-top .el-tabs__nav-scroll {
    width: 100% !important;
  }
  #tabPane .el-color-picker__trigger {
    width: 100%;
  }
</style>
web/src/views/modules/taskReliability/OperatConditModel.vue
@@ -1,56 +1,142 @@
<template>
    <div class="mod-taskReliability-operatConditModel}">
      <zt-table-wraper ref="tableObj" :paging='false' defaultNotQuery="true" query-url="/taskReliability/OperatConditModel/page" delete-url="/taskReliability/OperatConditModel/" v-slot="{ table }">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
          <el-form-item>
          </el-form-item>
        </el-form>
        <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
                  v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"
                  row-key="id"
                  :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
                  :default-expand-all="true">
          <el-table-column prop="product" label="产品节点" width="160"/>
          <el-table-column prop="modelName" label="产品模型"/>
          <zt-table-column-handle :table="table" edit-perm="taskReliability:update"
                                  delete-perm="taskReliability::delete" :has-view="false">
            <template v-slot="{ row }">
              <zt-table-button @click="openSelectModel(row)">选择模型</zt-table-button>
            </template>
          </zt-table-column-handle>
        </el-table>
        <select-model-rbd ref="SelectModelRbd" ></select-model-rbd>
      </zt-table-wraper>
    </div>
  <div class="mod-taskReliability-operatConditModel}">
    <zt-table-wraper @dataLoaded="dataLoaded" ref="tableObj" :paging='false' defaultNotQuery="true"
                     query-url="/taskReliability/OperatConditModel/page"
                     delete-url="/taskReliability/OperatConditModel/" v-slot="{ table }">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
        <el-form-item>
          <el-button v-if="dataForm.productId" type="primary" @click="save()">保存</el-button>
        </el-form-item>
      </el-form>
      <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
                v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"
                row-key="id"
                :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
                :default-expand-all="true">
        <el-table-column prop="product" label="产品节点"/>
        <el-table-column prop="modelId" label="产品模型">
          <template slot-scope="scope">
            <el-select v-model="scope.row.modelId" :disabled="scope.row.isDisabled == 1" placeholder="请选择"
                       style="width:100%" @change="modelChanged(scope.row)">
              <el-option on
                         v-for="item in scope.row.modelList"
                         :key="item.id"
                         :label="item.modelName"
                         :value="item.id"
              />
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="操作" width="100px">
          <template v-slot="{ row }">
            <el-button v-if="row.modelId" type="primary" size="small" @click="drawRBD(row)">查看模型</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-dialog v-dialogDrag title="模型设计" top="1vh" width='95%' :visible.sync="dialogVisible2" v-if="dialogVisible2">
        <RBDEditImg ref="rbdEditImg"></RBDEditImg>
      </el-dialog>
    </zt-table-wraper>
  </div>
</template>
<script>
  import SelectModelRbd from "./SelectModelRbd";
  import RBDEditImg from './RBD-edit-img'
  export default {
    name: 'OperaConditModel',
    data() {
      return {
        dataForm: {
          operatConditId:'',
          productId:'',
        }
          operatConditId: '',
          productId: '',
        },
        mapModelNodes: {},
        dialogVisible2: false,
      }
    },
    components: {
      SelectModelRbd
      RBDEditImg
    },
    methods:{
    mounted() {
      this.getModelNodes()
    },
    methods: {
      init(param) {
        console.log(param, '')
        this.dataForm.operatConditId = param.row.id
        this.dataForm.productId = param.productId
        this.$refs.tableObj.query()
      },
      openSelectModel(row) {
        console.log(row, 'selectModel');
        if (!row.operatConditId)
          row.operatConditId = this.dataForm.operatConditId
        this.$refs.SelectModelRbd.$refs.dialog.init(row)
      dataLoaded(dataList) {
        dataList[0].isDisabled = 0
        if (!dataList[0].modelId && dataList[0].modelList.length == 1) {
          console.log(dataList[0].modelList[0].id, ' dataList[0].modelList[0].modelId')
          dataList[0].modelId = dataList[0].modelList[0].id
          console.log(dataList[0], 'dataLoaded(dataList)')
          this.modelChanged(dataList[0])
        }
      },
      async save() {
        let res = await this.$http.post('/taskReliability/OperatConditModel/', this.$refs.tableObj.dataList[0])
        if (res.success) {
          this.$refs.tableObj.query()
        }
      },
      async getModelNodes() {
        let res = await this.$http.get(`/taskReliability/OperatConditModel/getModelNodes?shipId=0`)
        console.log(res, 'res taskReliability')
        console.log(res.data, 'res.data taskReliability')
        if (res.data) {
          this.mapModelNodes = res.data
        }
      },
      modelChanged(row) {
        let modelId = row.modelId
        let modelNodes = this.mapModelNodes[modelId]
        console.log(modelId, 'modelChanged modelId')
        console.log(modelNodes, 'modelChanged modelNodes')
        for (let subRow of row.children) {
          if (modelNodes.indexOf(subRow.productId)) {
            subRow.isDisabled = 0
            if (subRow.modelList.length == 1) {
              subRow.modelId = subRow.modelList[0].id
            } else {
              //subRow.modelId = null
            }
          } else {
            subRow.isDisabled = 1
            subRow.modelId = null
          }
          this.nodeIteration(subRow)
        }
      },
      nodeIteration(parentRow) {
        for (let subRow of parentRow.children) {
          if (parentRow.modelId) {
            subRow.isDisabled = 0
            if (subRow.modelList.length == 1) {
              subRow.modelId = subRow.modelList[0].id
            }
          } else {
            subRow.isDisabled = 1
            subRow.modelId = null
          }
          this.nodeIteration(subRow)
        }
      },
      drawRBD(row) {
        this.dialogVisible2 = true
        let param = {
          id: row.modelId,
          model: row.modelName,
          productId: row.productId
        }
        this.$nextTick(() => {
          this.$refs.rbdEditImg.init(param)
        })
      }
    }
  }
web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -48,12 +48,8 @@
          <div id="containerImg" style="border: 1px solid #EAEBEE;border-radius: 6px;
        box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);height: 100%">
          </div>
          <config-node v-show="type === 'node'" :id="id" :diagramId="diagramId" :globalGridAttr="globalGridAttr"
                       :graph="graph"
                       :nodeType="nodeType"
                       :projectId="projectId"
                       :shape="shape"/>
          <config-edge v-show="type === 'edge'" :id="id" :globalGridAttr="globalGridAttr" :graph="graph"/>
          <config-node ref="configNode" v-show="type === 'node'"/>
          <config-edge ref="configEdge" v-show="type === 'edge'"/>
        </div>
      </el-col>
    </el-row>
@@ -62,19 +58,15 @@
<script>
  import {Graph, Shape, Addon, Cell} from '@antv/x6'
  import ConfigNode from './ConfigNode/index.vue'
  import ConfigEdge from './ConfigEdge/index.vue'
  import {removeCurrentTabHandle} from '@/commonJS/common'
  import ConfigNode from './ConfigNode/configNode.vue'
  import ConfigEdge from './ConfigEdge/configEdge.vue'
  import {setHartBeat} from '@/commonJS/common';
  import Cookies from 'js-cookie'
  import {getUUID} from '../../../../packages/utils'
  import RBDDefault from './RBD-default.json'
  // import RBDDefault from './RBD-default.json'
  export default {
    name: 'RBD-edit-img',
    /*props: {
    },*/
    props: {
      projectId: {
        type: String
@@ -94,6 +86,425 @@
      ConfigNode,
      ConfigEdge
    },
    computed: {
      RBDDefault() {
        let url = `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getSvgImage?token=${Cookies.get('token')}&id=`
        let result = `
        {
          "cells":
          [
            {
              "position": {
                "x": -600,
                "y": 0
              },
              "size": {
                "width": 60,
                "height": 60
              },
              "attrs": {
                "text": {
                  "refY": "100%",
                  "textVerticalAnchor": "top",
                  "text": "start",
                  "refY2": 4
                },
                "image": {
                  "xlink:href": "${url}10011"
                }
              },
              "visible": true,
              "shape": "image",
              "id": "10000",
              "data": {
                "type": "imageNodes",
                "endNodeId": "20000",
                "dataId": "",
                "nodeType": "start",
                "nodeTypeExt": "",
                "voteNum": ""
              },
              "ports": {
                "groups": {
                  "top": {
                    "position": {
                      "name": "top"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "right": {
                    "position": {
                      "name": "right"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "bottom": {
                    "position": {
                      "name": "bottom"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "left": {
                    "position": {
                      "name": "left"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  }
                },
                "items": [
                  {
                    "id": "top1",
                    "group": "top"
                  },
                  {
                    "id": "right1",
                    "group": "right"
                  },
                  {
                    "id": "bottom1",
                    "group": "bottom"
                  },
                  {
                    "id": "left1",
                    "group": "left"
                  }
                ]
              },
              "zIndex": 1
            },
            {
              "position": {
                "x": 0,
                "y": 0
              },
              "size": {
                "width": 100,
                "height": 60
              },
              "attrs": {
                "text": {
                  "refY": "100%",
                  "textVerticalAnchor": "top",
                  "text": "dashedBox",
                  "refY2": 4
                },
                "image": {
                  "xlink:href": "${url}10015"
                }
              },
              "visible": true,
              "shape": "image",
              "id": 15000,
              "data": {
                "type": "imageNodes",
                "dataId": "",
                "nodeType": "dashedBox",
                "nodeTypeExt": "",
                "voteNum": ""
              },
              "ports": {
                "groups": {
                  "top": {
                    "position": {
                      "name": "top"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "right": {
                    "position": {
                      "name": "right"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "bottom": {
                    "position": {
                      "name": "bottom"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "left": {
                    "position": {
                      "name": "left"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  }
                },
                "items": [
                  {
                    "id": "top1",
                    "group": "top"
                  },
                  {
                    "id": "right1",
                    "group": "right"
                  },
                  {
                    "id": "bottom1",
                    "group": "bottom"
                  },
                  {
                    "id": "left1",
                    "group": "left"
                  }
                ]
              },
              "zIndex": 2
            },
            {
              "position": {
                "x": 600,
                "y": 0
              },
              "size": {
                "width": 60,
                "height": 60
              },
              "attrs": {
                "text": {
                  "refY": "100%",
                  "textVerticalAnchor": "top",
                  "text": "end",
                  "refY2": 4
                },
                "image": {
                  "xlink:href": "${url}10012"
                }
              },
              "visible": true,
              "shape": "image",
              "id": "20000",
              "data": {
                "type": "imageNodes",
                "startNodeId": "10000",
                "dataId": "",
                "nodeType": "end",
                "nodeTypeExt": "",
                "voteNum": ""
              },
              "ports": {
                "groups": {
                  "top": {
                    "position": {
                      "name": "top"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "right": {
                    "position": {
                      "name": "right"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "bottom": {
                    "position": {
                      "name": "bottom"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  },
                  "left": {
                    "position": {
                      "name": "left"
                    },
                    "attrs": {
                      "circle": {
                        "r": 4,
                        "magnet": true,
                        "stroke": "#5F95FF",
                        "strokeWidth": 1,
                        "fill": "#fff",
                        "style": {
                          "visibility": "hidden"
                        }
                      }
                    }
                  }
                },
                "items": [
                  {
                    "id": "top1",
                    "group": "top"
                  },
                  {
                    "id": "right1",
                    "group": "right"
                  },
                  {
                    "id": "bottom1",
                    "group": "bottom"
                  },
                  {
                    "id": "left1",
                    "group": "left"
                  }
                ]
              },
              "zIndex": 3
            },
            {
              "shape": "edge",
              "id": "66c81c68-0827-4a3c-8343-e2c453d3e9e7",
              "router": {
                "name": "manhattan"
              },
              "connector": {
                "name": "rounded"
              },
              "source": {
                "cell": "10000",
                "port": "right1"
              },
              "target": {
                "cell": 15000,
                "port": "left1"
              },
              "zIndex": 4
            },
            {
              "shape": "edge",
              "id": "a0f3cf90-6d37-4ee0-a254-90b4ec2b6a7f",
              "router": {
                "name": "manhattan"
              },
              "connector": {
                "name": "rounded"
              },
              "source": {
                "cell": 15000,
                "port": "right1"
              },
              "target": {
                "cell": "20000",
                "port": "left1"
              },
              "zIndex": 5
            }
          ]
        }
        `
        return JSON.parse(result)
      }
    },
    data() {
      return {
        isFirstLoad: true,
@@ -106,26 +517,6 @@
        modelType: '',
        timer: null,
        imagesList: [
          // {imgPath: 'start', imgName: 'start', nodeType: 'start', imgWidth: 60, imgHeight: 60, imgId: '1', data: {}},
          // {imgPath: 'end', imgName: 'end', nodeType: 'end', imgWidth: 60, imgHeight: 60, imgId: '2', data: {}},
          // {
          //   imgPath: 'connect',
          //   imgName: 'connect',
          //   nodeType: 'connect',
          //   imgWidth: 30,
          //   imgHeight: 30,
          //   imgId: '3',
          //   data: {}
          // },
          // {
          //   imgPath: 'connect',
          //   imgName: 'bridge',
          //   nodeType: 'bridge',
          //   imgWidth: 50,
          //   imgHeight: 50,
          //   imgId: '12',
          //   data: {}
          // },
          {
            imgPath: 'parallel',
            imgName: 'parallel',
@@ -176,10 +567,15 @@
        diagramIdDisabled: false,
        dataForm: {
          id: null,
          pid: null,
          model_tag: '',
          model_name: '',
          product_id: null,
          content: null,
          publishContent: null,
          hasPublish: 0,
          urlPref: '',
          nodeArr: []
        },
        type: '',
        id: '',
@@ -758,8 +1154,10 @@
          token: Cookies.get('token'),
        }
        let res = await this.$http.get(`/taskReliability/ModelLine/getDiagram`, {params: params})
        if (res.data !== null && (res.data.content != null)) {
          this.dataForm = res.data
        this.dataForm = res.data
        if (res.data.content != null) {
          console.log(this.dataForm, 'getDiagram datafrom')
          console.log(res.data, 'getDiagram res.data')
          this.diagramJson = JSON.parse(this.dataForm.content)
          this.graph.fromJSON(this.diagramJson)
          this.isFirstLoad = false;
@@ -769,14 +1167,14 @@
          // this.graph.centerContent()
          // this.graph.zoomToFit()
        } else {
          this.graph.fromJSON(RBDDefault)
          this.graph.fromJSON(this.RBDDefault)
          this.isFirstLoad = false
        }
      },
      async clearDiagram() {
        this.dataForm.id = null
        // this.graph.fromJSON(this.emptyJson)
        this.graph.fromJSON(RBDDefault)
        console.log(this.RBDDefault, 'clearDiagram')
        this.graph.fromJSON(this.RBDDefault)
        this.graph.positionContent('left')
        this.isFirstLoad = false;
        // this.graph.centerContent()
@@ -805,9 +1203,6 @@
              }
            },
          },
          // panning: {
          //   enabled: true,
          // },
          scroller: {
            enabled: true,
            pageVisible: true,
@@ -828,9 +1223,6 @@
          connecting: {
            router: {
              name: 'manhattan',
              // args: {
              //   padding: 1,
              // },
            },
            connector: {
              name: 'rounded',
@@ -997,9 +1389,10 @@
        }
        let res = await this.$http.get(`/basicInfo/XhProductModel/getProduct`, {params: params})
        this.imagesList2 = res.data
        console.log(this.imagesList2, 'getProduct(productId)234567890')
        let urlObject = window.URL || window.webkitURL || window;
        /*for(let i =0;i<this.imagesList2.length;i++){
        }*/
        console.log(this.imagesList2, 'getProduct(productId)234567890')
        const imageNodes2 = this.imagesList2.map((item) =>
          this.graph.createNode({
            shape: 'image',
@@ -1009,18 +1402,21 @@
            id: item.dataId, // 手动设置节点的 ID
            data: {
              type: 'imageNodes2',
              isRepair: item.isRepair,
              dataId: item.dataId,
              nodeType: item.nodeType,
              nodeTypeExt: item.nodeTypeExt,
              productType: item.productType,
              statusImg: item.statusImg,
              reliabDistribType: item.reliabDistribType,
              repairDistribType: item.repairDistribType,
              repairMttcr: item.repairMttcr,
              repairMttcrOther: item.repairMttcrOther,
              reliabDistribType: item.reliabDistribType ? item.reliabDistribType : 1,
              taskMtbcf: item.taskMtbcf,
              taskMtbcfOther: item.taskMtbcfOther,
              isRepair: item.isRepair,
              repairDistribType: item.repairDistribType ? item.repairDistribType : 1,
              repairMttcr: item.repairMttcr,
              repairMttcrOther: item.repairMttcrOther,
              imgHeight: item.imgHeight,
              imgWidth: item.imgWidth,
              voteNum: '',
@@ -1157,24 +1553,18 @@
            }
          }
          node.remove()
          /*//如果节点与节点相交
          console.log(node.position().x, node.position().x, 'node.position().x')
          if (nodeType === 'bridgeConnection') {
            this.getBridgeConnection()
          }*/
        });
        this.graph.on('cell:contextmenu', ({cell}) => {
          // this.type.value = cell.isNode() ? "node" : "edge"
          this.type = cell.isNode() ? 'node' : 'edge'
          this.shape = cell.shape
          this.id = cell.id
          /*          this.shape = cell.shape
                    this.id = cell.id*/
          if (this.type === 'node') {
            this.nodeType = cell.getData().nodeType
            // console.log(this.nodeType, cell.id, 'this.nodeType')
            //this.nodeType = cell.getData().nodeType
            this.$refs.configNode.loadData(cell)
          } else {
            this.$refs.configNode.loadData(cell)
          }
          // console.log(this.shape, 'this.shape')
          // this.nodeOpt(this.id, this.globalGridAttr)
        })
        //单击边节点
        this.graph.on('edge:click', ({edge}) => {
@@ -1422,6 +1812,16 @@
      },
      async saveDiagram() {
        console.log(JSON.stringify(this.graph.toJSON()), 'graph.toJSON()')
        const nodes = this.graph.getNodes()
        let nodeArr2 = []
        // 检查除当前节点之外的所有节点的包围框是否相交
        for (const node of nodes) {
          console.log(node, 'saveDiagram node')
          if (node.getData().nodeType == 'node' && node.getData().productType != 'product_xdy' && node.getData().dataId) {
            nodeArr2.push(node.getData().dataId)
          }
        }
        this.dataForm.nodeArr = nodeArr2
        this.dataForm.content = JSON.stringify(this.graph.toJSON())
        this.dataForm.urlPref = window.SITE_CONFIG['apiURL']
        console.log(this.dataForm, 'dataFrom')
@@ -1435,6 +1835,15 @@
      },
      async analyzeDiagram() {
        console.log(JSON.stringify(this.graph.toJSON()), 'graph.toJSON()')
        const nodes = this.graph.getNodes()
        let nodeArr2 = []
        // 检查除当前节点之外的所有节点的包围框是否相交
        for (const node of nodes) {
          if (node.getData().nodeType === 'node' && node.getData().productType !== 'product_xdy' && node.getData().dataId) {
            nodeArr2.push(node.getData().dataId)
          }
        }
        this.dataForm.nodeArr = nodeArr2
        this.dataForm.content = JSON.stringify(this.graph.toJSON())
        this.dataForm.urlPref = window.SITE_CONFIG['apiURL']
        await this.$http['post'](`/taskReliability/ModelLine/analyze`, this.dataForm).then(async res => {
web/src/views/modules/taskReliability/SimulatAssess.vue
@@ -11,6 +11,11 @@
              <zt-form-item label="总体任务" prop="task">
                <zt-select v-model="dataForm.task" :datas="taskList" @change="onTaskSelected"/>
              </zt-form-item>
              <zt-form-item label="任务时长" prop="simulatTime">
                <el-input type="number" :min="1" v-model="dataForm.simulatTime">
                  <template slot="append">小时</template>
                </el-input>
              </zt-form-item>
              <zt-form-item label="数据类型" prop="dataType">
                <zt-dict v-model="dataForm.dataType" dict="dataType"></zt-dict>
              </zt-form-item>
@@ -22,11 +27,6 @@
                  <template slot="append">分钟</template>
                </el-input>
              </zt-form-item>
              <zt-form-item label="仿真时长" prop="simulatTime">
                <el-input type="number" :min="1" v-model="dataForm.simulatTime">
                  <template slot="append">分钟</template>
                </el-input>
              </zt-form-item>
              <zt-form-item label="仿真次数" prop="simulatFrequency">
                <el-input type="number" :min="1" v-model="dataForm.simulatFrequency">
                  <template slot="append">次数</template>
@@ -34,7 +34,7 @@
              </zt-form-item>
              <zt-form-item>
                <zt-button @click="analyze()">仿真分析</zt-button>
                <zt-button>分析结果</zt-button>
                <zt-button @click="getresult()">分析结果</zt-button>
              </zt-form-item>
            </el-form>
          </div>
@@ -43,7 +43,7 @@
      <el-col :span="18">
        <div class="fa-card-a">
          <SimulatCurve ref="SimulatCurve"></SimulatCurve>
          <SimulatData></SimulatData>
          <SimulatData ref="SimulatData"></SimulatData>
        </div>
      </el-col>
    </el-row>
@@ -104,24 +104,25 @@
        console.log(res.data)
        this.taskList = res.data
      },
      getresult(){
        this.$refs.SimulatData.init();
      },
      async analyze() {
        let res = await this.$http.post('/taskReliability/SimulatAssess/analyze', this.dataForm)
       /* let res = await this.$http.post('/taskReliability/SimulatAssess/analyze', this.dataForm)
        if (res.success) {
          console.log(res.data, 'analyze')
          let stopPolling = false
          if (!stopPolling) {
            let timer = setInterval(async () => {
              let res2 = await this.$http.get(`/taskReliability/SimulatAssess/${res.data}`)
              console.log(res2.data, 'setInterval')
              if (res2.data) {
                if (res2.data.code === '0' || res2.data.errorMsg === '0') {
                  stopPolling = true
                  // 中止轮询
                  clearInterval(timer)
                  alert('已获取')
                  this.$refs.SimulatCurve.initEcharts(res2.data.curveData);
                  alert('已获取')*/
                  this.$refs.SimulatCurve.initEcharts();
                  // 清除定时器
                } else {
        /*        } else {
                  stopPolling = true
                  // 中止轮询
                  clearInterval(timer)
@@ -131,7 +132,7 @@
            }, 400)
          }
        }
        }*/
      }
    }
  }
web/src/views/modules/taskReliability/SimulatCurve.vue
@@ -20,13 +20,23 @@
      initEcharts(CurveData) {
        console.log(eval(CurveData), 'initEcharts(CurveData)')
        const option = {
          title:{
            text:'仿真可靠度收敛曲线图',
            textStyle: { // 主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
              fontFamily: 'Arial',
              fontSize: 20,
              fontStyle: 'normal',
              fontWeight: 'normal',
            }
          },
          xAxis: {
            data: eval(CurveData)[0]
            data: [10, 30, 50, 70, 90, 110, 130,150,170],
            name:'仿真次数'
          },
          yAxis: {},
          series: [
            {
              data: eval(CurveData)[1],
              data: [15, 85, 75, 25, 65,35,55,45,50],
              type: 'line',
              smooth: true
            }
web/src/views/modules/taskReliability/SimulatData.vue
@@ -1,21 +1,21 @@
<template>
    <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url=""
                     :paging='false'
                     delete-url="" v-slot="{ table }">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
      </el-form>
      <el-table v-loading="table.dataLoading" :data="table.dataList"
                 @selection-change="table.selectionChangeHandle"
                height="100px" v-adaptive="{bottomOffset:30}">
        <el-table-column prop="name" label="名称" />
        <el-table-column prop="totalTime" label="总时间"/>
        <el-table-column prop="faultNum" label="故障次数"/>
        <el-table-column prop="repairTime" label="修理时间"/>
        <el-table-column prop="availability" label="可用度"/>
        <el-table-column prop="mtbcf" label="MTBCF"/>
        <el-table-column prop="mttcr" label="MTTCR"/>
      </el-table>
    </zt-table-wraper>
  <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url=""
                   :paging='false'
                   delete-url="" v-slot="{ table }">
    <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
    </el-form>
    <el-table v-loading="table.dataLoading" :data="dataList"
              @selection-change="table.selectionChangeHandle"
              height="100px" v-adaptive="{bottomOffset:30}">
      <el-table-column prop="name" label="名称"/>
      <el-table-column prop="totalTime" label="总时间(小时)" align="center"/>
      <el-table-column prop="faultNum" label="故障次数" align="center"/>
      <el-table-column prop="repairTime" label="修理时间(分钟)" align="center"/>
      <el-table-column prop="availability" label="可用度(百分比)" align="center"/>
      <el-table-column prop="mtbcf" label="MTBCF" align="center"/>
      <el-table-column prop="mttcr" label="MTTCR" align="center"/>
    </el-table>
  </zt-table-wraper>
</template>
<script>
@@ -28,35 +28,92 @@
        productList: [],
        dataForm: {
          productId: ''
        }
        },
        dataList:[],
        fzdataList: [
          {
            name: '总体',
            totalTime:'15000',
            faultNum:'2',
            repairTime:'20',
            availability:'99.96',
            mtbcf:'5000',
            mttcr:'20'
          },{
            name: ' 系统1',
            totalTime:'15000',
            faultNum:'0',
            repairTime:'0',
            availability:'100',
            mtbcf:'15000',
            mttcr:'0'
          },{
            name: '  设备1-1',
            totalTime:'9000',
            faultNum:'2',
            repairTime:'30',
            availability:'99.98',
            mtbcf:'3000',
            mttcr:'15'
          },{
            name: '  设备1-2',
            totalTime:'15000',
            faultNum:'4',
            repairTime:'120',
            availability:'98.79',
            mtbcf:'5000',
            mttcr:'30'
          },{
            name: '  设备1-3',
            totalTime:'12000',
            faultNum:'3',
            repairTime:'100',
            availability:'98.88',
            mtbcf:'3000',
            mttcr:'33'
          },
          {
            name: ' 系统2',
            totalTime:'10000',
            faultNum:'2',
            repairTime:'30',
            availability:'99.75',
            mtbcf:'5000',
            mttcr:'15'
          },{
            name: '  设备2-1',
            totalTime:'7000',
            faultNum:'5',
            repairTime:'200',
            availability:'88.84',
            mtbcf:'1167',
            mttcr:'40'
          },{
            name: '  设备2-2',
            totalTime:'5000',
            faultNum:'3',
            repairTime:'60',
            availability:'98.78',
            mtbcf:'1250',
            mttcr:'30'
          },{
            name: '  设备2-3',
            totalTime:'10000',
            faultNum:'1',
            repairTime:'20',
            availability:'99.97',
            mtbcf:'5000',
            mttcr:'20'
          },]
      }
    },
    components: {
    },
    components: {},
    mounted() {
      this.getTaskProductList()
    },
    methods: {
      init() {
       this.dataList =this.fzdataList
      },
      add() {
        this.$refs.AddOrUpdate.$refs.dialog.init(null,{productId: this.dataForm.productId})
      },
      selectTask(row){
        this.$emit('onTaskSelected',row)
      },
      async getTaskProductList() {
        let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList')
        this.productList = res.data
        console.log(this.productList, ' async getTaskProductList()')
      },
      onProductSelected(data){
        console.log(data, ' onProductSelected(data)')
        this.dataForm.productId = data.id
        this.$refs.tableObj.query()
      }
    }
  }
</script>
web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue
@@ -7,9 +7,9 @@
      <zt-form-item label="阶段时长比" prop="phaseDuration">
        <el-input v-model="dataForm.phaseDurationRate" @change="check"></el-input>
      </zt-form-item>
      <zt-form-item label="阶段时速" prop="phaseSpeed">
<!--      <zt-form-item label="阶段时速" prop="phaseSpeed">
        <el-input v-model="dataForm.phaseSpeed"></el-input>
      </zt-form-item>
      </zt-form-item>-->
      <!--      <zt-form-item label="阶段顺序" prop="phaseSort">
              <el-input v-model="dataForm.phaseSort"></el-input>
            </zt-form-item>-->
web/src/views/modules/taskReliability/TaskPhase.vue
@@ -24,9 +24,9 @@
              <el-table-column type="selection" width="40" align="center"/>
              <el-table-column prop="phaseName" label="阶段名称" align="center"/>
              <el-table-column prop="phaseDurationRate" label="阶段时长比" align="right"/>
              <el-table-column prop="phaseSpeed" label="阶段时速" align="right"/>
            <!--  <el-table-column prop="phaseSpeed" label="阶段时速" align="right"/>-->
              <!--<el-table-column prop="phaseSort" label="阶段顺序" align="center"/>-->
              <el-table-column prop="operatConditDuration" label="工况时长分配" align="center"/>
              <!--<el-table-column prop="operatConditDuration" label="工况时长分配" align="center"/>-->
              <zt-table-column-handle :table="table" edit-perm="testReviewComment:update"
                                      delete-perm="taskReliability::delete">
                <template v-slot="{row}">