xyc
2024-03-04 72b04d283d96482aada792938b62abb35e895f3a
Merge remote-tracking branch 'origin/master'
7个文件已修改
24个文件已添加
7个文件已删除
2143 ■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/TyProductModel.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/model/SysPictureBase.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/components/zt-table-wraper/src/zt-table-wraper.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/i18n/zh-CN.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/views/modules/sys/dict-data-add-or-update.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/views/modules/sys/dict-data.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ProductModelTree.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/SelectPicture.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/SelectTyModel.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/TyProductModel.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/XhProductModel.vue 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/sys/codeRule/SysCodeRule-AddOrUpdate.vue 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/sys/codeRule/SysCodeRule.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/sys/user-add-or-update.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/sysPictureBase/SysPictureBase.vue 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zt/core/src/main/java/com/zt/modules/coderule/controller/SysCodeRuleController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zt/core/src/main/java/com/zt/modules/coderule/dao/SysCodeRuleDao.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zt/core/src/main/java/com/zt/modules/coderule/model/SysCodeRule.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zt/core/src/main/java/com/zt/modules/coderule/service/SysCodeRuleService.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zt/core/src/main/java/com/zt/modules/sys/model/SysDictData.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zt/core/src/main/resources/mapper/coderule/SysCodeRuleDao.xml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java
New file
@@ -0,0 +1,142 @@
package com.zt.life.modules.mainPart.basicInfo.controller;
import com.zt.common.annotation.LogOperation;
import com.zt.common.constant.Constant;
import com.zt.common.annotation.QueryParam;
import com.zt.common.db.query.QueryFilter;
import com.zt.common.servlet.Result;
import com.zt.common.servlet.PageResult;
import com.zt.common.validator.AssertUtils;
import com.zt.common.validator.ValidatorUtils;
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.basicInfo.model.TyProductModel;
import com.zt.life.modules.mainPart.basicInfo.service.TyProductModelService;
import com.zt.life.modules.sysPictureBase.service.SysPictureBaseService;
import com.zt.modules.oss.service.SysOssService;
import com.zt.modules.sys.model.SysMenu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Objects;
/**
 * ty_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-28
 */
@RestController
@RequestMapping("/basicInfo/TyProductModel/")
@Api(tags="ty_product_model")
public class TyProductModelController {
    @Autowired
    private TyProductModelService tyProductModelService;
    @Autowired
    private SysOssService sysOssService;
    @Autowired
    private SysPictureBaseService sysPictureBaseService;
    @GetMapping("page")
    @ApiOperation("分页")
    @ApiImplicitParams({
        @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
        @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
        @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = "nodeType", value = "节点类型", dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = "reliabDistrib", value = "可靠性分布", dataType = Constant.QT.STRING, format = "reliab_distrib^EQ"),
        @ApiImplicitParam(name = "repairDistrib", value = "维修分布", dataType = Constant.QT.STRING, format = "repair_distrib^EQ")    })
    public PageResult<TyProductModel> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
        return PageResult.ok(tyProductModelService.page(queryFilter));
    }
    @GetMapping("tree")
    public Result<List<TyProductModel>> getTreeList() {
        List<TyProductModel> list = tyProductModelService.getAllTree();
        return Result.ok(list);
    }
    @GetMapping("{id}")
    @ApiOperation("信息")
    public Result<TyProductModel> get(@PathVariable("id") Long id){
        TyProductModel data = tyProductModelService.get(id);
        Long busid = null;
        String fileName = "";
        if (StringUtils.isNotBlank(data.getOperationalStatus())&&sysOssService.get(Long.parseLong(data.getOperationalStatus()))!=null){
            busid =sysOssService.get(Long.parseLong(data.getOperationalStatus())).getBusiId();
            fileName =sysPictureBaseService.get(busid).getName();
            data.setOperationalStatus(fileName);
        }
        if (StringUtils.isNotBlank(data.getStandbyState())&&sysOssService.get(Long.parseLong(data.getStandbyState()))!=null){
            busid =sysOssService.get(Long.parseLong(data.getStandbyState())).getBusiId();
            fileName =sysPictureBaseService.get(busid).getName();
            data.setStandbyState(fileName);
        }
        if (StringUtils.isNotBlank(data.getFaultState())&&sysOssService.get(Long.parseLong(data.getFaultState()))!=null){
            busid =sysOssService.get(Long.parseLong(data.getFaultState())).getBusiId();
            fileName =sysPictureBaseService.get(busid).getName();
            data.setFaultState(fileName);
        }
        return Result.ok(data);
    }
    @GetMapping("getProductList")
    public Result<List<TyProductModel>> getProductList() {
        List<TyProductModel> list = tyProductModelService.getProductList();
        return Result.ok(list);
    }
    @PostMapping
    @ApiOperation("新增")
    @LogOperation("新增")
    public Result insert(@RequestBody TyProductModel tyProductModel){
        //效验数据
        ValidatorUtils.validateEntity(tyProductModel, AddGroup.class, DefaultGroup.class);
        Integer no = tyProductModelService.getNo(tyProductModel.getPid());
        tyProductModel.setSort(no + 1);
        tyProductModelService.insert(tyProductModel);
        return Result.ok();
    }
    @PutMapping
    @ApiOperation("修改")
    @LogOperation("修改")
    public Result update(@RequestBody TyProductModel tyProductModel){
        //效验数据
        ValidatorUtils.validateEntity(tyProductModel, UpdateGroup.class, DefaultGroup.class);
        tyProductModelService.update(tyProductModel);
        return Result.ok();
    }
    @DeleteMapping
    @ApiOperation("删除")
    @LogOperation("删除")
    public Result delete(@RequestBody Long[] ids){
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        tyProductModelService.delete(ids);
        return Result.ok();
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
New file
@@ -0,0 +1,140 @@
package com.zt.life.modules.mainPart.basicInfo.controller;
import com.zt.common.annotation.LogOperation;
import com.zt.common.constant.Constant;
import com.zt.common.annotation.QueryParam;
import com.zt.common.db.query.QueryFilter;
import com.zt.common.servlet.Result;
import com.zt.common.servlet.PageResult;
import com.zt.common.validator.AssertUtils;
import com.zt.common.validator.ValidatorUtils;
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.basicInfo.model.TyProductModel;
import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
import com.zt.life.modules.mainPart.basicInfo.service.XhProductModelService;
import com.zt.life.modules.sysPictureBase.service.SysPictureBaseService;
import com.zt.modules.oss.service.SysOssService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * xh_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-29
 */
@RestController
@RequestMapping("/basicInfo/XhProductModel/")
@Api(tags="xh_product_model")
public class XhProductModelController {
    @Autowired
    private XhProductModelService xhProductModelService;
    @Autowired
    private SysOssService sysOssService;
    @Autowired
    private SysPictureBaseService sysPictureBaseService;
    @GetMapping("page")
    @ApiOperation("分页")
    @ApiImplicitParams({
        @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
        @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
        @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = "name", value = "名称", dataType = Constant.QT.STRING, format = "NAME^LK"),
        @ApiImplicitParam(name = "nodeType", value = "节点类型", dataType = Constant.QT.STRING, format = "node_type^EQ"),
        @ApiImplicitParam(name = "id", value = "上级ID", dataType = Constant.QT.STRING)
    })
    public PageResult<XhProductModel> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
        return PageResult.ok(xhProductModelService.page(queryFilter));
    }
    @GetMapping("tree")
    public Result<List<XhProductModel>> getTreeList() {
        List<XhProductModel> list = xhProductModelService.getAllTree();
        return Result.ok(list);
    }
    @GetMapping("{id}")
    @ApiOperation("信息")
    public Result<XhProductModel> get(@PathVariable("id") Long id){
        XhProductModel data = xhProductModelService.get(id);
        Long busid = null;
        String fileName = "";
        if (StringUtils.isNotBlank(data.getOperationalStatus())&&sysOssService.get(Long.parseLong(data.getOperationalStatus()))!=null){
            busid =sysOssService.get(Long.parseLong(data.getOperationalStatus())).getBusiId();
            fileName =sysPictureBaseService.get(busid).getName();
            data.setOperationalStatus(fileName);
        }
        if (StringUtils.isNotBlank(data.getStandbyState())&&sysOssService.get(Long.parseLong(data.getStandbyState()))!=null){
            busid =sysOssService.get(Long.parseLong(data.getStandbyState())).getBusiId();
            fileName =sysPictureBaseService.get(busid).getName();
            data.setStandbyState(fileName);
        }
        if (StringUtils.isNotBlank(data.getFaultState())&&sysOssService.get(Long.parseLong(data.getFaultState()))!=null){
            busid =sysOssService.get(Long.parseLong(data.getFaultState())).getBusiId();
            fileName =sysPictureBaseService.get(busid).getName();
            data.setFaultState(fileName);
        }
        return Result.ok(data);
    }
    @GetMapping("getProductList")
    public Result<List<XhProductModel>> getProductList() {
        List<XhProductModel> list = xhProductModelService.getProductList();
        return Result.ok(list);
    }
    @PostMapping
    @ApiOperation("新增")
    @LogOperation("新增")
    public Result insert(@RequestBody XhProductModel xhProductModel){
        //效验数据
        ValidatorUtils.validateEntity(xhProductModel, AddGroup.class, DefaultGroup.class);
        Integer no = xhProductModelService.getNo(xhProductModel.getPid());
        xhProductModel.setSort(no + 1);
        xhProductModelService.insert(xhProductModel);
        return Result.ok();
    }
    @PutMapping
    @ApiOperation("修改")
    @LogOperation("修改")
    public Result update(@RequestBody XhProductModel xhProductModel){
        //效验数据
        ValidatorUtils.validateEntity(xhProductModel, UpdateGroup.class, DefaultGroup.class);
        xhProductModelService.update(xhProductModel);
        return Result.ok();
    }
    @DeleteMapping
    @ApiOperation("删除")
    @LogOperation("删除")
    public Result delete(@RequestBody Long[] ids){
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        xhProductModelService.delete(ids);
        return Result.ok();
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java
New file
@@ -0,0 +1,25 @@
package com.zt.life.modules.mainPart.basicInfo.dao;
import com.zt.common.dao.BaseDao;
import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
 * ty_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-28
 */
@Mapper
public interface TyProductModelDao extends BaseDao<TyProductModel> {
    List<TyProductModel> getList(Map<String, Object> params);
    List<TyProductModel> getProductList();
    Integer getNo(Long pid);
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
New file
@@ -0,0 +1,27 @@
package com.zt.life.modules.mainPart.basicInfo.dao;
import com.zt.common.dao.BaseDao;
import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
 * xh_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-29
 */
@Mapper
public interface XhProductModelDao extends BaseDao<XhProductModel> {
    List<XhProductModel> getList(Map<String, Object> params);
    Integer getNo(Long pid);
    List<XhProductModel> getProductList();
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/TyProductModel.java
New file
@@ -0,0 +1,62 @@
package com.zt.life.modules.mainPart.basicInfo.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.entity.BusiEntity;
import com.zt.common.entity.TreeNode;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.List;
/**
 * ty_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-28
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ty_product_model")
public class TyProductModel extends BusiEntity implements TreeNode<TyProductModel> {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "上级ID")
    private Long pid;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "节点类型")
    private String nodeType;
    @ApiModelProperty(value = "基本计算")
    private Integer baseCompute;
    @ApiModelProperty(value = "任务计算")
    private Integer taskCompute;
    @ApiModelProperty(value = "可靠性分布")
    private Integer reliabDistrib;
    @ApiModelProperty(value = "维修分布")
    private Integer repairDistrib;
    @ApiModelProperty(value = "运行状态图片ID")
    private String operationalStatus;
    @ApiModelProperty(value = "待机状态图片ID")
    private String standbyState;
    @ApiModelProperty(value = "故障状态图片ID")
    private String faultState;
    @ApiModelProperty(value = "排序")
    private Integer sort;
    @ApiModelProperty(value = "子节点")
    @TableField(exist = false)
    private List<TyProductModel> children = new ArrayList<>();
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java
New file
@@ -0,0 +1,52 @@
package com.zt.life.modules.mainPart.basicInfo.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.entity.BusiEntity;
import com.zt.common.entity.TreeNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * xh_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-29
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("xh_product_model")
public class XhProductModel extends BusiEntity implements TreeNode<XhProductModel> {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "上级ID")
    private Long pid;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "节点类型")
    private String nodeType;
    @ApiModelProperty(value = "运行状态图片")
    private String operationalStatus;
    @ApiModelProperty(value = "待机状态图片")
    private String standbyState;
    @ApiModelProperty(value = "故障状态图片")
    private String faultState;
    @ApiModelProperty(value = "排序")
    private Integer sort;
    @ApiModelProperty(value = "子节点")
    @TableField(exist = false)
    private List<XhProductModel> children = new ArrayList<>();
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java
New file
@@ -0,0 +1,60 @@
package com.zt.life.modules.mainPart.basicInfo.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zt.common.constant.Constant;
import com.zt.common.service.BaseService;
import com.zt.common.utils.TreeUtils;
import com.zt.life.modules.mainPart.basicInfo.dao.TyProductModelDao;
import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
import org.springframework.stereotype.Service;
import com.zt.common.db.query.QueryFilter;
import java.util.List;
/**
 * ty_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-28
 */
@Service
public class TyProductModelService  extends BaseService<TyProductModelDao, TyProductModel> {
    /**
     * 分页查询
     *
     * @param queryFilter
     * @return
     */
    public List<TyProductModel> page(QueryFilter queryFilter) {
        return baseDao.getList(queryFilter.getQueryParams());
    }
    /**
     * 删除
     *
     * @param ids
     */
    public void delete(Long[] ids) {
        super.deleteLogic(ids);
    }
    public List<TyProductModel> getProductList() {
        List<TyProductModel> ProductList = baseDao.getProductList();
        return ProductList;
    }
    public List<TyProductModel> getAllTree() {
            List<TyProductModel> productList = baseDao.selectList(new QueryWrapper<TyProductModel>().eq(Constant.TableColumn.IS_DELETE,
                    Constant.Bool.NO).orderByAsc(Constant.TableColumn.SORT));
            return TreeUtils.build(productList);
    }
    public Integer getNo(Long pid) {
        if (baseDao.getNo(pid) == null){
            return 0;
        }
        return baseDao.getNo(pid);
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
New file
@@ -0,0 +1,61 @@
package com.zt.life.modules.mainPart.basicInfo.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zt.common.constant.Constant;
import com.zt.common.service.BaseService;
import com.zt.common.utils.TreeUtils;
import com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao;
import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
import com.zt.modules.sys.model.SysMenu;
import org.springframework.stereotype.Service;
import com.zt.common.db.query.QueryFilter;
import javax.annotation.Resource;
import java.util.List;
/**
 * xh_product_model
 *
 * @author zt generator
 * @since 1.0.0 2024-02-29
 */
@Service
public class XhProductModelService  extends BaseService<XhProductModelDao, XhProductModel> {
    /**
     * 分页查询
     *
     * @param queryFilter
     * @return
     */
    public List<XhProductModel> page(QueryFilter queryFilter) {
        return baseDao.getList(queryFilter.getQueryParams());
    }
    /**
     * 删除
     *
     * @param ids
     */
    public void delete(Long[] ids) {
        super.deleteLogic(ids);
    }
    public List<XhProductModel> getAllTree() {
            List<XhProductModel> productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE,
                    Constant.Bool.NO) .gt("node_type", 1).orderByAsc(Constant.TableColumn.SORT));
            return TreeUtils.build(productList);
    }
    public Integer getNo(Long pid) {
        if (baseDao.getNo(pid) == null){
            return 0;
        }
        return baseDao.getNo(pid);
    }
    public List<XhProductModel> getProductList() {
        List<XhProductModel> ProductList = baseDao.getProductList();
        return TreeUtils.build(ProductList);
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java
New file
@@ -0,0 +1,106 @@
package com.zt.life.modules.sysPictureBase.controller;
import com.zt.common.annotation.LogOperation;
import com.zt.common.constant.Constant;
import com.zt.common.annotation.QueryParam;
import com.zt.common.db.query.QueryFilter;
import com.zt.common.servlet.Result;
import com.zt.common.servlet.PageResult;
import com.zt.common.validator.AssertUtils;
import com.zt.common.validator.ValidatorUtils;
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.sysPictureBase.model.SysPictureBase;
import com.zt.life.modules.sysPictureBase.service.SysPictureBaseService;
import com.zt.life.sys.dto.OssDto;
import com.zt.life.sys.service.SysOssConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
/**
 * sys_picture_base
 *
 * @author zt generator
 * @since 1.0.0 2024-02-27
 */
@RestController
@RequestMapping("/sysPictureBase/SysPictureBase/")
@Api(tags = "sys_picture_base")
public class SysPictureBaseController {
    @Autowired
    private SysPictureBaseService sysPictureBaseService;
    @Autowired
    private SysOssConfigService sysOssConfigService;
    @GetMapping("page")
    @ApiOperation("分页")
    @ApiImplicitParams({
            @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
            @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
            @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
            @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
            @ApiImplicitParam(name = "contentType", value = "检索关键字", dataType = Constant.QT.STRING, format = "CONTENT_TYPE^LK"), @ApiImplicitParam(name = "systemMark", value = "系统标识", dataType = Constant.QT.STRING, format = "SYSTEM_MARK^LK")})
    public PageResult<SysPictureBase> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
        return PageResult.ok(sysPictureBaseService.page(queryFilter));
    }
    @GetMapping("{id}")
    @ApiOperation("信息")
    public Result<SysPictureBase> get(@PathVariable("id") Long id) {
        SysPictureBase data = sysPictureBaseService.get(id);
        if (id != null) {
            OssDto ossDto = sysOssConfigService.getOssByBusiType(id, "sys_picture");
            if (ossDto != null) {
                data.setFiles(ossDto);
            }
        }
        return Result.ok(data);
    }
    @PostMapping
    @ApiOperation("新增")
    @LogOperation("新增")
    public Result insert(@RequestBody SysPictureBase sysPictureBase) {
        //效验数据
        ValidatorUtils.validateEntity(sysPictureBase, AddGroup.class, DefaultGroup.class);
        Integer no = sysPictureBaseService.getNo();
        sysPictureBase.setSortNo(no + 1);
        sysPictureBaseService.insert(sysPictureBase);
        sysOssConfigService.updateOss(sysPictureBase.getId(), sysPictureBase.getFiles());// 保存附件
        return Result.ok();
    }
    @PutMapping
    @ApiOperation("修改")
    @LogOperation("修改")
    public Result update(@RequestBody SysPictureBase sysPictureBase) {
        //效验数据
        ValidatorUtils.validateEntity(sysPictureBase, UpdateGroup.class, DefaultGroup.class);
        sysPictureBaseService.update(sysPictureBase);
        sysOssConfigService.updateOss(sysPictureBase.getId(), sysPictureBase.getFiles());// 保存附件
        return Result.ok();
    }
    @DeleteMapping
    @ApiOperation("删除")
    @LogOperation("删除")
    public Result delete(@RequestBody Long[] ids) {
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        sysPictureBaseService.delete(ids);
        return Result.ok();
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java
New file
@@ -0,0 +1,24 @@
package com.zt.life.modules.sysPictureBase.dao;
import com.zt.common.dao.BaseDao;
import com.zt.life.modules.sysPictureBase.model.SysPictureBase;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
 * sys_picture_base
 *
 * @author zt generator
 * @since 1.0.0 2024-02-27
 */
@Mapper
public interface SysPictureBaseDao extends BaseDao<SysPictureBase> {
    List<SysPictureBase> getList(Map<String, Object> params);
    Integer getNo();
}
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/model/SysPictureBase.java
New file
@@ -0,0 +1,51 @@
package com.zt.life.modules.sysPictureBase.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.entity.BusiEntity;
import com.zt.life.sys.dto.OssDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
 * sys_picture_base
 *
 * @author zt generator
 * @since 1.0.0 2024-02-27
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_picture_base")
public class SysPictureBase extends BusiEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "类型")
    private String type;
    @ApiModelProperty(value = "子类型")
    private String subType;
    @ApiModelProperty(value = "图片名称")
    private String name;
    @ApiModelProperty(value = "检索关键字")
    private String contentType;
    @ApiModelProperty(value = "系统标识")
    private String systemMark;
    @ApiModelProperty(value = "排序")
    private Integer sortNo;
    @ApiModelProperty(value = "")
    private String remark;
    @TableField(exist = false)
    @ApiModelProperty(value = "附件")
    private OssDto files;
}
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java
New file
@@ -0,0 +1,54 @@
package com.zt.life.modules.sysPictureBase.service;
import com.zt.common.service.BaseService;
import com.zt.life.modules.sysPictureBase.dao.SysPictureBaseDao;
import com.zt.life.modules.sysPictureBase.model.SysPictureBase;
import com.zt.modules.oss.service.SysOssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zt.common.db.query.QueryFilter;
import java.util.List;
/**
 * sys_picture_base
 *
 * @author zt generator
 * @since 1.0.0 2024-02-27
 */
@Service
public class SysPictureBaseService  extends BaseService<SysPictureBaseDao, SysPictureBase> {
    @Autowired
    private SysOssService sysOssService;
    /**
     * 分页查询
     *
     * @param queryFilter
     * @return
     */
    public List<SysPictureBase> page(QueryFilter queryFilter) {
        List<SysPictureBase> list = baseDao.getList(queryFilter.getQueryParams());
        if (list != null && list.size() > 0) {
            sysOssService.setListOsses(list, "sys_picture");
        }
        return list;
    }
    /**
     * 删除
     *
     * @param ids
     */
    public void delete(Long[] ids) {
        super.deleteLogic(ids);
    }
    public Integer getNo() {
        if (baseDao.getNo() == null){
            return 0;
        }
        return baseDao.getNo();
    }
}
modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
New file
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.TyProductModelDao">
    <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel">
        select a.*
        from ty_product_model a
        <where>
            a.is_delete = 0
            <if test="nodeType!=null and nodeType!=''">
                and a.node_type = ${nodeType}
            </if>
        </where>
        <if test="orderBySql!=null">
            ORDER BY ${orderBySql}
        </if>
    </select>
    <select id="getProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel">
        select a.name,a.id
        from ty_product_model a
        where a.is_delete =0 and a.node_type != 1
    </select>
    <select id="getNo" resultType="java.lang.Integer">
        SELECT COUNT(*)
        FROM ty_product_model
        <where>
            is_delete = 0
            <if test="pid!=null">
                and pid = ${pid}
            </if>
            <if test="pid==null">
                and pid is null
            </if>
        </where>
        Group by node_type
    </select>
</mapper>
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
New file
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao">
    <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel">
        select a.*
        from xh_product_model a
        <where>
            a.is_delete = 0
            <if test="id!=null">
                and pid =${id}
            </if>
            <if test="id==null">
                and pid is null
            </if>
            <if test="whereSql!=null">
                and ${whereSql}
            </if>
        </where>
        <if test="orderBySql!=null">
            ORDER BY ${orderBySql}
        </if>
    </select>
    <select id="getNo" resultType="java.lang.Integer">
        SELECT COUNT(*)
        FROM xh_product_model
        <where>
            is_delete = 0
            <if test="pid!=null">
                and pid = ${pid}
            </if>
            <if test="pid==null">
                and pid is null
            </if>
        </where>
        Group by node_type
    </select>
    <select id="getProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel">
        select a.name,a.id
        from xh_product_model a
        where a.is_delete =0 and a.node_type = 5
    </select>
</mapper>
modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml
New file
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zt.life.modules.sysPictureBase.dao.SysPictureBaseDao">
    <select id="getList" resultType="com.zt.life.modules.sysPictureBase.model.SysPictureBase">
        select a.*
        from sys_picture_base a
        <where>
            a.is_delete = 0
            <if test="whereSql!=null">
                and ${whereSql}
            </if>
        </where>
        <if test="orderBySql!=null">
            ORDER BY ${orderBySql}
        </if>
    </select>
    <select id="getNo" resultType="java.lang.Integer">
        SELECT COUNT(*)
        FROM sys_picture_base
        WHERE is_delete = 0;
    </select>
</mapper>
web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
@@ -220,7 +220,7 @@
          this.editLimit = ''
          this.editPage = ''
        }
        console.log(this.dataList,'this.dataList')
        this.$emit('dataLoaded', this.dataList)
        this.$emit('fatherMethod')
      }
web/packages/i18n/zh-CN.js
@@ -224,6 +224,7 @@
t.dict.dictName = '字典名称'
t.dict.dictType = '字典类型'
t.dict.dictLabel = '字典标签'
t.dict.dictCode = '字典编码'
t.dict.dictValue = '字典值'
t.dict.canView = '租户可见'
t.dict.canOverload = '允许重载'
web/packages/views/modules/sys/dict-data-add-or-update.vue
@@ -7,6 +7,9 @@
      <zt-form-item prop="dictLabel" :label="$t('dict.dictLabel')" rules="required">
        <el-input v-model="dataForm.dictLabel" :placeholder="$t('dict.dictLabel')"></el-input>
      </zt-form-item>
      <zt-form-item prop="dictCode" :label="$t('dict.dictCode')" rules="required">
        <el-input v-model="dataForm.dictCode" :placeholder="$t('dict.dictCode')"></el-input>
      </zt-form-item>
      <zt-form-item prop="dictValue" label="字典值" rules="required">
        <el-input v-model="dataForm.dictValue" placeholder="字典值"></el-input>
      </zt-form-item>
@@ -41,6 +44,7 @@
          dictLabel: '',
          dictValue: '',
          sort: 0,
          dictCode:'',
          remark: ''
        }
      }
web/packages/views/modules/sys/dict-data.vue
@@ -19,6 +19,7 @@
            <el-table-column :label="$t('dict.dictLabel')" prop="dictLabel"/>
            <el-table-column :label="$t('dict.sort')" align="center" prop="sort" width="60"/>
            <el-table-column :label="$t('dict.remark')" prop="remark"/>
            <el-table-column :label="$t('dict.dictCode')" prop="dictCode"/>
            <zt-table-column-handle :has-delete="isCanDelete" :has-edit="isCanUpdate" :table="table"
                                    delete-perm="sys:dict:delete" edit-perm="sys:dict:update"/>
          </el-table>
@@ -40,7 +41,8 @@
        dictTypeId: '',
        dictTypeName: '',
        dictLabel: '',
        dictValue: ''
        dictValue: '',
        dictCode:''
      }
    }
  },
web/src/App.vue
@@ -25,7 +25,7 @@
      document.querySelector('html').setAttribute('lang', val)
      // 可以在这里修改国际化显示名称
      messages[val].brand.lg = '软件测试项目管理工具'
      messages[val].brand.lg = '可靠性仿真建模'
      messages[val].company.name = '单位名称'
      messages[val].company.code = '单位代码'
      messages[val].company.shortName = '单位简称'
web/src/views/modules/basicInfo/ProductModelTree.vue
New file
@@ -0,0 +1,75 @@
<template>
  <div class="product-tree-container " :style="'height:' + tree_Hei +'px'">
    <el-input
      placeholder="输入名称进行过滤"
      style="width: 80%"
      v-model="filterText"
      size="small"
      clearable
    ></el-input>
    <el-button type="primary" @click="add()" style="margin-top: 10px">新增</el-button>
    <el-divider></el-divider>
    <el-tree
      style="height: 90%;overflow: auto"
      class="filter-tree"
      :data="productList"
      :props="defaultProps"
      default-expand-all
      :expand-on-click-node="false"
      :highlight-current="true"
      @node-click="handleNodeClick"
      :filter-node-method="filterNode"
      ref="tree"
    ></el-tree>
    <!-- 弹窗, 新增 / 修改 -->
    <add-or-update @refreshDataList="getProductList()" ref="AddOrUpdate"/>
  </div>
</template>
<script>
  import AddOrUpdate from './XhProductModel-AddOrUpdate'
  export default {
    name: 'ProductModelTree',
    props: {},
    data() {
      return {
        filterText: '',
        productList: [],
        tree_Hei: document.documentElement.clientHeight - 200,
        defaultProps: {
          children: 'children',
          label: 'name'
        }
      }
    },
    watch: {
      filterText(val) {
        this.$refs.tree.filter(val)
      }
    },
    components: {
      AddOrUpdate
    },
    mounted() {
      this.getProductList()
    },
    methods: {
      // 获取系统列表
      async getProductList() {
        let res = await this.$http.get('/basicInfo/XhProductModel/tree')
        this.productList = res.data
      },
      add() {
        this.$refs.AddOrUpdate.$refs.dialog.init(null,{id: null, type: 'tree'})
      },
      filterNode(value, data) {
        if (!value) return true
        return data.name.indexOf(value) !== -1
      },
      handleNodeClick(data) {
        this.$emit('on-selected', data)
      }
    }
  }
</script>
web/src/views/modules/basicInfo/SelectPicture.vue
New file
@@ -0,0 +1,57 @@
<template>
  <zt-dialog ref="dialog" column="2" title="选择图片" append-to-body :editAble="false" :hasConfirm="false">
    <el-card shadow="never" class="aui-card--fill">
      <div class="mod-sysPictureBase-sysPictureBase}">
        <zt-table-wraper query-url="/sysPictureBase/SysPictureBase/page"
                         v-slot="{ table }">
          <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
                    border
                    @row-dblclick="selectedPicture"
                    @selection-change="table.selectionChangeHandle">
            <el-table-column prop="name" label="图片名称"/>
            <el-table-column label="图片" align="center">
              <template v-slot="{ row }">
                <el-image v-if="row.accessoryMap" :src="getPath(row)" style="height: 50px;width: 50px"></el-image>
              </template>
            </el-table-column>
          </el-table>
        </zt-table-wraper>
      </div>
    </el-card>
  </zt-dialog>
</template>
<script>
  export default {
    data() {
      return {
        name: 'SelectPicture',
        type: '',
        dataForm: {
          contentType: '',
          systemMark: '',
          sortNo: ''
        },
      }
    },
    components: {},
    methods: {
      init(type) {
        this.type = type
      },
      getPath(row) {
        if (row.accessoryMap) {
          for (let key in row.accessoryMap) {
            return key
          }
        }
      },
      async selectedPicture(row) {
        await this.$tip.success()
        this.$refs.dialog.close()
        this.$emit('setPicture', row, this.type)
      }
    }
  }
</script>
web/src/views/modules/basicInfo/SelectTyModel.vue
New file
@@ -0,0 +1,56 @@
<template>
  <zt-dialog ref="dialog" column="2" title="选择通用模型" append-to-body :editAble="false" :hasConfirm="true"
             @confirm="formSubmit">
    <el-card shadow="never" class="aui-card--fill">
      <div class="mod-tyProductModel-tyProductModel}">
        <zt-table-wraper query-url="/basicInfo/TyProductModel/page"
                         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" height="100px" v-adaptive="{bottomOffset:70}"
                    border
                    @selection-change="table.selectionChangeHandle"
                    @selected="onSelected">
            <el-table-column type="selection" width="40" align="center"/>
            <el-table-column prop="name" label="名称"/>
          </el-table>
        </zt-table-wraper>
      </div>
    </el-card>
  </zt-dialog>
</template>
<script>
  export default {
    name: 'SelectTyModel',
    data() {
      return {
        dataForm: {
          type:'noTree',
          nodeType: '',
          pid: '',
          name: '',
          operationalStatus: '',
          standbyState: '',
          faultState: '',
        }
      }
    },
    components: {},
    methods: {
      init(type) {
        this.dataForm.nodeType = type
        console.log(this.dataForm.nodeType, 'init()')
      },
      async onSelected() {
        let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm)
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()
          this.$emit('refreshDataList')
          this.map.clear()
        }
      }
    }
  }
</script>
web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue
New file
@@ -0,0 +1,136 @@
<template>
  <zt-dialog ref="dialog"  @confirm="formSubmit" append-to-body>
    <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
      <zt-form-item label="上级系统" prop="pid" >
        <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList"/>
      </zt-form-item>
      <zt-form-item label="名称" prop="name" rules="required">
        <el-input v-model="dataForm.name"></el-input>
      </zt-form-item>
      <zt-form-item label="节点类型" prop="nodeType" rules="required">
        <zt-dict v-model="dataForm.nodeType" dict="product"></zt-dict>
      </zt-form-item>
      <zt-form-item label="基本计算" prop="baseCompute">
        <zt-dict v-model="dataForm.baseCompute" dict="is_or_not" placeholder="基本计算"></zt-dict>
      </zt-form-item>
      <zt-form-item label="任务计算" prop="taskCompute">
        <zt-dict v-model="dataForm.taskCompute" dict="is_or_not" placeholder="任务计算"></zt-dict>
      </zt-form-item>
      <zt-form-item label="可靠性分布" prop="reliabDistrib">
        <zt-dict v-model="dataForm.reliabDistrib" dict="ReliabDistribType" placeholder="请选择可靠性分布类型"></zt-dict>
      </zt-form-item>
      <zt-form-item label="维修分布" prop="repairDistrib">
        <zt-dict v-model="dataForm.repairDistrib" dict="RepairDistribType" placeholder="请选择维修分布类型"></zt-dict>
      </zt-form-item>
      <zt-form-item label="运行状态图" prop="operationalStatus">
        <el-input v-model="dataForm.operationalStatus" @focus="selectPicture('operational')"   :readonly="readonly"></el-input>
      </zt-form-item>
      <zt-form-item label="待机状态图" prop="standbyState">
        <el-input v-model="dataForm.standbyState" @focus="selectPicture('standby')"   :readonly="readonly"></el-input>
      </zt-form-item>
      <zt-form-item label="故障状态图" prop="faultState">
        <el-input v-model="dataForm.faultState" @focus="selectPicture('fault')"   :readonly="readonly"></el-input>
      </zt-form-item>
      <zt-form-item label="排序" prop="sort">
        <el-input v-model="dataForm.sort" :readonly="readonly"></el-input>
      </zt-form-item>
    </el-form>
    <PictureSelect ref="pictureSelect" @setPicture="openAddWin">
    </PictureSelect>
  </zt-dialog>
</template>
<script>
  import PictureSelect from "@/views/modules/basicInfo/SelectPicture";
  export default {
    data() {
      return {
        map: new Map(),
        fileId:'',
        productList:[],
        dataForm: {
          id: '',
          pid: '',
          name: '',
          nodeType: '',
          baseCompute: '',
          taskCompute: '',
          reliabDistrib: '',
          repairDistrib: '',
          operationalStatus:'',
          standbyState:'',
          faultState:'',
          sort: '',
        }
      }
    },
    components:{
      PictureSelect
    },
    methods: {
      init() {
        this.getProductList()
      },
      // 获取系统列表
      async getProductList() {
        let res = await this.$http.get('/basicInfo/TyProductModel/getProductList')
        this.productList = res.data
        console.log(this.productList,'getProductList')
      },
      selectPicture(type){
        this.$refs.pictureSelect.$refs.dialog.init(type)
      },
      openAddWin(row,type){
        console.log(type,'openAddWin(row)')
        if (type==='operational'){
          this.dataForm.operationalStatus = row.name
          for (let key in row.accessoryMap) {
            let id = /_zt_oss_id=(\d+)/.exec(key)
            this.fileId = id ? id[1] : ''
          }
          this.map.set(this.dataForm.operationalStatus,this.fileId);
          console.log(this.map,'openAddWin(row)')
        }else if(type==='standby'){
          this.dataForm.standbyState = row.name
          for (let key in row.accessoryMap) {
            let id = /_zt_oss_id=(\d+)/.exec(key)
            this.fileId = id ? id[1] : ''
          }
          this.map.set(this.dataForm.standbyState,this.fileId);
          console.log(this.map,'openAddWin(row)')
        }else if(type==='fault'){
          this.dataForm.faultState = row.name
          for (let key in row.accessoryMap) {
            let id = /_zt_oss_id=(\d+)/.exec(key)
            this.fileId = id ? id[1] : ''
          }
          this.map.set(this.dataForm.faultState,this.fileId);
          console.log(this.map,'openAddWin(row)')
        }
      },
      // 获取信息
      async getInfo() {
        let res = await this.$http.get(`/basicInfo/TyProductModel/${this.dataForm.id}`)
        this.dataForm = {
          ...this.dataForm,
          ...res.data
        }
        console.log(this.map,'getInfo')
      },
      // 表单提交
      async formSubmit() {
        this.dataForm.operationalStatus = this.map.get(this.dataForm.operationalStatus)
        this.dataForm.standbyState = this.map.get(this.dataForm.standbyState)
        this.dataForm.faultState = this.map.get(this.dataForm.faultState)
        let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/TyProductModel/', this.dataForm)
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()
          this.$emit('refreshDataList')
          this.map.clear()
        }
      }
    }
  }
</script>
web/src/views/modules/basicInfo/TyProductModel.vue
New file
@@ -0,0 +1,90 @@
<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-tyProductModel-tyProductModel}">
      <zt-table-wraper query-url="/basicInfo/TyProductModel/tree" delete-url="/basicInfo/TyProductModel/" v-bind:paging='false'
                       v-slot="{ table }">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
          <el-form-item>
            <zt-dict v-model="dataForm.nodeType" dict="product" placeholder="请选择节点类型" clearable></zt-dict>
          </el-form-item>
          <el-form-item>
            <zt-dict v-model="dataForm.reliabDistrib" dict="ReliabDistribType" placeholder="请选择可靠性分布类型" clearable></zt-dict>
          </el-form-item>
          <el-form-item>
            <zt-dict v-model="dataForm.repairDistrib" dict="RepairDistribType"  placeholder="请选择维修分布类型" clearable></zt-dict>
          </el-form-item>
          <el-form-item>
            <zt-button type="query" @click="table.query()"/>
            <zt-button type="add"  @click="table.editHandle()"/>
            <zt-button type="delete"  @click="table.deleteHandle()"/>
          </el-form-item>
        </el-form>
        <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
                  border row-key="id"
                  @selection-change="table.selectionChangeHandle"
                  :cell-style="cellStyle"
                  :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
          <el-table-column prop="name" label="名称"/>
          <zt-table-column-dict prop="nodeType" label="节点类型" dict="product"/>
          <zt-table-column-dict prop="baseCompute" label="基本计算" dict="is_or_not"/>
          <zt-table-column-dict prop="taskCompute" label="任务计算" dict="is_or_not"/>
          <zt-table-column-dict prop="reliabDistrib" label="可靠性分布" dict="ReliabDistribType"/>
          <zt-table-column-dict prop="repairDistrib" label="维修分布" dict="RepairDistribType"/>
          <el-table-column prop="operationalStatus" label="运行状态图" align="center">
            <template v-slot="{ row }">
              <el-image v-if="row.operationalStatus" :src="getPath(row.operationalStatus)" style="height: 50px;width: 50px"></el-image>
            </template >
          </el-table-column>
          <el-table-column prop="standbyState" label="待机状态图" align="center">
            <template v-slot="{ row }">
              <el-image v-if="row.standbyState" :src="getPath(row.standbyState)" style="height: 50px;width: 50px"></el-image>
            </template >
          </el-table-column>
          <el-table-column prop="faultState" label="故障状态图" align="center">
            <template v-slot="{ row }">
              <el-image v-if="row.faultState" :src="getPath(row.faultState)" style="height: 50px;width: 50px"></el-image>
            </template >
          </el-table-column>
          <el-table-column prop="sort" label="排序"/>
          <zt-table-column-handle :table="table"/>
        </el-table>
        <!-- 弹窗, 新增 / 修改 -->
        <add-or-update @refreshDataList="table.query"/>
      </zt-table-wraper>
    </div>
  </el-card>
</template>
<script>
  import AddOrUpdate from './TyProductModel-AddOrUpdate'
  export default {
    data() {
      return {
        dataForm: {
          operationalStatus:'',
          standbyState:'',
          faultState:'',
          nodeType: '',
          reliabDistrib: '',
          repairDistrib: '',
        }
      }
    },
    components: {
      AddOrUpdate
    },
    methods:{
      cellStyle({column}) {
        if (column.label === '名称') {
          return 'text-align: left !important;'
        }
      },
      getPath(id){
        console.log(id,'path')
        return `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${id}`
      }
    }
  }
</script>
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
New file
@@ -0,0 +1,129 @@
<template>
  <zt-dialog ref="dialog" @confirm="formSubmit">
    <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
      <zt-form-item label="上级系统" prop="pid" v-if="isTree">
        <zt-combo-tree v-model="dataForm.pid" :datas="productList"/>
      </zt-form-item>
      <zt-form-item label="名称" prop="name" rules="required">
        <el-input v-model="dataForm.name"></el-input>
      </zt-form-item>
      <zt-form-item label="节点类型" prop="nodeType" rules="required">
        <zt-dict v-model="dataForm.nodeType" dict="product"></zt-dict>
      </zt-form-item>
      <zt-form-item label="运行状态图" prop="operationalStatus" v-if="isShow">
        <el-input v-model="dataForm.operationalStatus" @focus="selectPicture('operational')"
                  :readonly="readonly"></el-input>
      </zt-form-item>
      <zt-form-item label="待机状态图" prop="standbyState" v-if="isShow">
        <el-input v-model="dataForm.standbyState" @focus="selectPicture('standby')" :readonly="readonly"></el-input>
      </zt-form-item>
      <zt-form-item label="故障状态图" prop="faultState" v-if="isShow">
        <el-input v-model="dataForm.faultState" @focus="selectPicture('fault')" :readonly="readonly"></el-input>
      </zt-form-item>
      <zt-form-item label="排序" prop="sort">
        <el-input v-model="dataForm.sort" :readonly="readonly"></el-input>
      </zt-form-item>
    </el-form>
    <PictureSelect ref="pictureSelect" @setPicture="openAddWin">
    </PictureSelect>
  </zt-dialog>
</template>
<script>
  import PictureSelect from "@/views/modules/basicInfo/SelectPicture";
  export default {
    data() {
      return {
        isTree: false,
        isShow: true,
        map: new Map(),
        fileId: '',
        productList: [],
        dataForm: {
          id: '',
          pid: '',
          name: '',
          nodeType: '',
          operationalStatus: '',
          standbyState: '',
          faultState: '',
          sort: '',
          status: ''
        }
      }
    },
    components: {
      PictureSelect
    },
    methods: {
      init(id,params) {
        if (params.type == 'tree') {
          this.isTree = true
          this.isShow = false
          this.getProductList()
        } else {
          this.dataForm.pid = params.pid
        }
      },
      // 获取系统列表
      async getProductList() {
        let res = await this.$http.get('/basicInfo/XhProductModel/getProductList')
        this.productList = res.data
        console.log(this.productList, 'getProductList')
      },
      selectPicture(type) {
        this.$refs.pictureSelect.$refs.dialog.init(type)
      },
      openAddWin(row, type) {
        console.log(type, 'openAddWin(row)')
        if (type === 'operational') {
          this.dataForm.operationalStatus = row.name
          for (let key in row.accessoryMap) {
            let id = /_zt_oss_id=(\d+)/.exec(key)
            this.fileId = id ? id[1] : ''
          }
          this.map.set(this.dataForm.operationalStatus, this.fileId);
          console.log(this.map, 'openAddWin(row)')
        } else if (type === 'standby') {
          this.dataForm.standbyState = row.name
          for (let key in row.accessoryMap) {
            let id = /_zt_oss_id=(\d+)/.exec(key)
            this.fileId = id ? id[1] : ''
          }
          this.map.set(this.dataForm.standbyState, this.fileId);
          console.log(this.map, 'openAddWin(row)')
        } else if (type === 'fault') {
          this.dataForm.faultState = row.name
          for (let key in row.accessoryMap) {
            let id = /_zt_oss_id=(\d+)/.exec(key)
            this.fileId = id ? id[1] : ''
          }
          this.map.set(this.dataForm.faultState, this.fileId);
          console.log(this.map, 'openAddWin(row)')
        }
      },
      // 获取信息
      async getInfo() {
        let res = await this.$http.get(`/basicInfo/XhProductModel/${this.dataForm.id}`)
        this.dataForm = {
          ...this.dataForm,
          ...res.data
        }
      },
      // 表单提交
      async formSubmit() {
        this.dataForm.operationalStatus = this.map.get(this.dataForm.operationalStatus)
        this.dataForm.standbyState = this.map.get(this.dataForm.standbyState)
        this.dataForm.faultState = this.map.get(this.dataForm.faultState)
        let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm)
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()
          this.$emit('refreshDataList')
          this.map.clear()
        }
      }
    }
  }
</script>
web/src/views/modules/basicInfo/XhProductModel.vue
New file
@@ -0,0 +1,118 @@
<template xmlns="">
  <div>
    <el-row :gutter="20">
      <el-col :span="5">
        <div class="fa-card-a">
          <product-model-tree @on-selected="onProductSelected"/>
        </div>
      </el-col>
      <el-col :span="19">
        <div class="mod-basicInfo-xhProductModel}">
          <zt-table-wraper ref="tableObj" query-url="/basicInfo/XhProductModel/page"
                           delete-url="/basicInfo/XhProductModel "
                           v-slot="{ table }">
            <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
              <el-form-item>
                <el-input v-model="dataForm.name" placeholder="请输入名称" clearable></el-input>
              </el-form-item>
              <el-form-item>
                <zt-dict v-model="dataForm.nodeType" dict="product" clearable></zt-dict>
              </el-form-item>
              <el-form-item>
                <zt-button type="query" @click="table.query()"/>
                <zt-button type="add" @click="add()"/>
                <zt-button type="delete" @click="table.deleteHandle()"/>
              </el-form-item>
            </el-form>
            <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
                      border row-key="id"
                      @selection-change="table.selectionChangeHandle"
            >
              <el-table-column prop="name" label="名称"/>
              <zt-table-column-dict prop="nodeType" label="节点类型" dict="product"/>
              <el-table-column prop="operationalStatus" label="运行状态图" align="center">
                <template v-slot="{ row }">
                  <el-image v-if="row.operationalStatus" :src="getPath(row.operationalStatus)"
                            style="height: 50px;width: 50px"></el-image>
                </template>
              </el-table-column>
              <el-table-column prop="standbyState" label="待机状态图" align="center">
                <template v-slot="{ row }">
                  <el-image v-if="row.standbyState" :src="getPath(row.standbyState)"
                            style="height: 50px;width: 50px"></el-image>
                </template>
              </el-table-column>
              <el-table-column prop="faultState" label="故障状态图" align="center">
                <template v-slot="{ row }">
                  <el-image v-if="row.faultState" :src="getPath(row.faultState)"
                            style="height: 50px;width: 50px"></el-image>
                </template>
              </el-table-column>
              <el-table-column prop="sort" label="排序"/>
              <zt-table-column-handle :table="table"/>
            </el-table>
            <!-- 弹窗, 新增 / 修改 -->
            <add-or-update @refreshDataList="table.query"/>
            <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/>
          </zt-table-wraper>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import AddOrUpdate from './XhProductModel-AddOrUpdate'
  import SelectTyModel from './SelectTyModel'
  import ProductModelTree from "./ProductModelTree";
  export default {
    data() {
      return {
        dataForm: {
          name: '',
          nodeType: '',
          type:'',
          id: ''
        }
      }
    },
    components: {
      ProductModelTree,
      AddOrUpdate,
      SelectTyModel
    },
    methods: {
      add() {
        if (this.dataForm.type !== '4') {
          console.log(1111)
          console.log(this.dataForm.type,'add() {')
          this.dataForm.type = this.dataForm.type - 1
        } else if (this.dataForm.type === '4') {
          console.log(2222)
          console.log(this.dataForm.type,'add() {')
          this.dataForm.type = this.dataForm.type - 2
        }else if (this.dataForm.type === '0'){
          console.log(this.dataForm.type,'add() {')
          this.$alert("当前节点不可新增子节点,请重新设置")
          return
        }
        this.$refs.SelectTyModel.$refs.dialog.init(this.dataForm.type )
      },
      cellStyle({column}) {
        if (column.label === '名称') {
          return 'text-align: left !important;'
        }
      },
      getPath(id) {
        console.log(id, 'path')
        return `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${id}`
      },
      onProductSelected(data) {
        this.dataForm.id = data.id
        this.dataForm.type = data.nodeType
        this.$refs.tableObj.query()
      }
    }
  }
</script>
web/src/views/modules/sys/codeRule/SysCodeRule-AddOrUpdate.vue
File was deleted
web/src/views/modules/sys/codeRule/SysCodeRule.vue
File was deleted
web/src/views/modules/sys/user-add-or-update.vue
@@ -32,7 +32,7 @@
            <el-input v-model="dataForm.nickName" :placeholder="$t('user.nickName')"></el-input>
          </zt-form-item>
          <zt-form-item prop="secretClass" :label="$t('user.secretClass')" rules="required">
            <zt-dict v-model="dataForm.secretClass" dict="secret_class" :placeholder="$t('user.secretClass') "></zt-dict>
            <zt-dict v-model="dataForm.secretClass" dict="SecretClass" :placeholder="$t('user.secretClass') "></zt-dict>
          </zt-form-item>
          <zt-form-item prop="simpleSpelling" :label="$t('user.simpleSpelling')">
            <el-input v-model="dataForm.simpleSpelling" :placeholder="$t('user.simpleSpelling')"></el-input>
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
New file
@@ -0,0 +1,81 @@
<template>
  <zt-dialog ref="dialog" @confirm="formSubmit">
    <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
      <zt-form-item label="类型" prop="type">
        <el-input v-model="dataForm.type"></el-input>
      </zt-form-item>
      <zt-form-item label="子类型" prop="subType">
        <el-input v-model="dataForm.subType"></el-input>
      </zt-form-item>
      <zt-form-item label="图片名称" prop="name" rules="required">
        <el-input v-model="dataForm.name"></el-input>
      </zt-form-item>
      <zt-form-item label="检索关键字" prop="contentType" >
        <el-input v-model="dataForm.contentType"></el-input>
      </zt-form-item>
      <zt-form-item label="系统标识" prop="systemMark" rules="required">
        <zt-dict v-model="dataForm.systemMark" dict="product"></zt-dict>
      </zt-form-item>
      <zt-form-item label="排序" prop="sortNo">
        <el-input v-model="dataForm.sortNo"  :readonly="readonly" @input=""></el-input>
      </zt-form-item>
      <div class="el-flex img-src" style="height: 20px">
        <el-form-item class="marginTopAndMarginBottom" style="width: 100%">
          <config-uploader :lineHeight="true" busi-type="sys_picture" model-name="dataForm" :dataForm="dataForm"
                           v-model="dataForm.files"/>
        </el-form-item>
      </div>
    </el-form>
  </zt-dialog>
</template>
<script>
  export default {
    data() {
      return {
        dataForm: {
          id: '',
          type: '',
          subType: '',
          name: '',
          contentType: '',
          systemMark: '',
          sortNo: '',
          remark: ''
        },
        readonly:{
          type: Boolean,
          default: false
        },
      }
    },
    methods: {
      // 获取信息
      async getInfo() {
        let res = await this.$http.get(`/sysPictureBase/SysPictureBase/${this.dataForm.id}`)
        this.dataForm = {
          ...this.dataForm,
          ...res.data
        }
      },
      // 表单提交
      async formSubmit() {
        let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/sysPictureBase/SysPictureBase/', this.dataForm)
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()
          this.$emit('refreshDataList')
        }
      }
    }
  }
</script>
<style>
  .img-sc > .el-form-item > .el-form-item__content {
    width: 100%;
  }
   .marginTopAndMarginBottom {
    margin-top: 10px !important;
    margin-bottom: 0 !important;
  }
</style>
web/src/views/modules/sysPictureBase/SysPictureBase.vue
New file
@@ -0,0 +1,71 @@
<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sysPictureBase-sysPictureBase}">
      <zt-table-wraper query-url="/sysPictureBase/SysPictureBase/page" delete-url="/sysPictureBase/SysPictureBase/"
                       v-slot="{ table }">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
          <el-form-item>
            <el-input v-model="dataForm.contentType" placeholder="请输入检索关键字" clearable></el-input>
          </el-form-item>
          <el-form-item>
            <zt-dict v-model="dataForm.systemMark" dict="product" placeholder="请选择系统标识" clearable></zt-dict>
          </el-form-item>
          <el-form-item>
            <zt-button type="query" @click="table.query()"/>
            <zt-button type="add"  @click="table.editHandle()"/>
            <zt-button type="delete"  @click="table.deleteHandle()"/>
          </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">
          <el-table-column type="selection" width="40" align="center"/>
          <el-table-column prop="sortNo" label="排序"/>
          <el-table-column prop="name" label="图片名称"/>
          <el-table-column label="图片" align="center">
            <template v-slot="{ row }">
              <el-image v-if="row.accessoryMap" :src="getPath(row)" style="height: 50px;width: 50px"></el-image>
            </template >
          </el-table-column>
          <el-table-column prop="contentType" label="检索关键字"/>
          <zt-table-column-dict prop="systemMark" label="系统标识" dict="product"/>
          <zt-table-column-handle :table="table"
                                  delete-perm="sysPictureBase::delete"/>
        </el-table>
        <!-- 弹窗, 新增 / 修改 -->
        <add-or-update @refreshDataList="table.query"/>
      </zt-table-wraper>
    </div>
  </el-card>
</template>
<script>
  import AddOrUpdate from './SysPictureBase-AddOrUpdate'
  export default {
    data() {
      return {
        dataForm: {
          contentType: '',
          systemMark: '',
          sortNo:''
        },
      }
    },
    components: {
      AddOrUpdate
    },
    methods: {
      getPath(row) {
          if (row.accessoryMap){
            for (let key in row.accessoryMap) {
              return key
            }
          }
      },
      indexFormat(index) {
        return index += 1
      },
    }
  }
</script>
zt/core/src/main/java/com/zt/modules/coderule/controller/SysCodeRuleController.java
File was deleted
zt/core/src/main/java/com/zt/modules/coderule/dao/SysCodeRuleDao.java
File was deleted
zt/core/src/main/java/com/zt/modules/coderule/model/SysCodeRule.java
File was deleted
zt/core/src/main/java/com/zt/modules/coderule/service/SysCodeRuleService.java
File was deleted
zt/core/src/main/java/com/zt/modules/sys/model/SysDictData.java
@@ -47,6 +47,9 @@
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "字典编码")
    private String dictCode;
    @ApiModelProperty(value = "排序")
    @Min(value = 0, message = "排序值不能小于0", groups = DefaultGroup.class)
    private Integer sort;
zt/core/src/main/resources/mapper/coderule/SysCodeRuleDao.xml
File was deleted