jinlin
2024-07-17 3c15e684416e06a7351eeb2d756e5be778a893fd
修改
13个文件已修改
83 ■■■■ 已修改文件
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/taskReliability/controller/TaskBinoParamController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/baseReliability/ParamDataBasic.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ParamData.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ProductModelTree.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/XhProductModel.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/ModelRbd.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/OperatConditModel.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/RBD-edit-img.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/TaskBinoParam.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -123,7 +123,7 @@
        ValidatorUtils.validateEntity(xhProductModel, AddGroup.class, DefaultGroup.class);
        Integer no = xhProductModelService.getNo(xhProductModel.getPid(),xhProductModel.getProductType());
        if (xhProductModel.getSort() < no) {
        if (xhProductModel.getSort() == null || xhProductModel.getSort() < no) {
            xhProductModel.setSort(no + 1);
        }
        xhProductModelService.insert(xhProductModel);
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/TaskBinoParamController.java
@@ -43,15 +43,13 @@
    @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 = "taskId", value = "任务Id", dataType = Constant.QT.STRING),
    })
    public PageResult<TaskBinoParam> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
    public Result<List<TaskBinoParam>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
        return PageResult.ok(taskBinoParamService.page(queryFilter));
        return Result.ok(taskBinoParamService.page(queryFilter));
    }
    @GetMapping("{id}")
modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
@@ -20,7 +20,7 @@
                          AND is_delete = 0
                    )
            )
        and ((node_type = 1) or (node_type &lt;&gt; 1 and id not in (select src_id from product_model where pid =
        and ((node_type &gt; ${nodeType}) or ( id not in (select src_id from product_model where pid =
        ${pid} and is_delete=0)))
        ORDER BY
            node_type,sort
modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml
@@ -39,6 +39,7 @@
        )
          and a.product_type in (4, 3, 2, 10)
          AND a.is_delete = 0
        ORDER BY a.product_type, a.sort
    </select>
    <select id="getModelList" resultType="com.zt.life.modules.mainPart.taskReliability.model.ModelRbd">
        select *
web/src/views/modules/baseReliability/ParamDataBasic.vue
@@ -4,7 +4,7 @@
      <el-col :span="5">
        <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
          <product-model-tree ref="modelTree" @on-selected="onProductSelected" @on-default="onDefault" showXdy="false"
                              basic="3"/>
                              basic="3" :isShow="false"/>
        </div>
      </el-col>
      <el-col :span="19">
@@ -99,7 +99,6 @@
        })
      },
      setDefultKey() {
        console.log(this.$refs.tableObj.dataList[0].id,'this.$refs.tableObj.dataList[0].id')
        this.defultKey.push(this.dataForm.shipId + "")
      },
      onDefault(defaultId) {
web/src/views/modules/basicInfo/ParamData.vue
@@ -3,7 +3,7 @@
    <el-row :gutter="5">
      <el-col :span="5">
        <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
          <product-model-tree @on-selected="onProductSelected" showXdy="false"/>
          <product-model-tree @on-selected="onProductSelected" showXdy="false" :isShow="false"/>
        </div>
      </el-col>
      <el-col :span="19">
web/src/views/modules/basicInfo/ProductModelTree.vue
@@ -7,7 +7,7 @@
      size="small"
      clearable
    ></el-input>
    <el-button type="primary" @click="add()" style="margin: 10px 0 0 10px;padding: 9px 18px !important;">新增型号</el-button>
    <el-button v-if="isShow" type="primary" @click="add()" style="margin: 10px 0 0 10px;padding: 9px 18px !important;">新增型号</el-button>
    <el-divider></el-divider>
    <el-tree
      style="height: 90%;overflow: auto"
@@ -37,6 +37,10 @@
        type: Boolean,
        default: true
      },
      isShow: {
        type: Boolean,
        default: true
      },
      basic: {
        type: Number,
        default: 1
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -11,7 +11,7 @@
        <zt-dict v-model="dataForm.productType" dict="product" @input="getDefaultImg"
                 :disabled="disabled"></zt-dict>
      </zt-form-item>
      <zt-form-item label="运行状态图" prop="operatImg" v-if="isShow">
      <zt-form-item label="运行状态图" prop="operatImg">
        <el-input v-model="dataForm.operatImgName" @focus="selectPicture()"></el-input>
        <el-image v-if="dataForm.operatImg" :src="url+dataForm.operatImg" style="height: 50px;width: 50px"></el-image>
      </zt-form-item>
@@ -57,15 +57,18 @@
          this.isShow = false
          this.dataForm.pid = null
          this.dataForm.productType = 1
          this.getDefaultImg(this.dataForm.productType)
        } else if (params.type === 'zt') {
          this.dataForm.pid = params.pid
          this.dataForm.productType = 2
          this.getProductList()
          this.getDefaultImg(this.dataForm.productType)
        } else {
          this.dataForm.pid = params.pid
          this.dataForm.productType = params.type
        }
        if (this.dataForm.productType === 10 && id == null) {
          this.isShow = false
          this.getDefaultImg(this.dataForm.productType)
        }
      },
web/src/views/modules/basicInfo/XhProductModel.vue
@@ -84,18 +84,8 @@
    },
    methods: {
      add() {
        console.log(this.dataForm.type,'this.dataForm.type')
        this.dataForm.type = this.productType
        if (this.dataForm.type !== '1') {
          if (this.dataForm.type !== '3') {
            this.dataForm.type = this.dataForm.type + 1
          } else if (this.dataForm.type === '3') {
            this.dataForm.type = this.dataForm.type + 2
          } else if (this.dataForm.type === '0') {
            this.$alert("当前节点不可新增子节点,请重新设置")
            return
          }
          console.log(this.dataForm.type,'this.dataForm.type')
          this.$refs.SelectTyModel.$refs.dialog.init(null, {type: this.dataForm.type, id: this.dataForm.pid})
        } else {
          this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'zt', pid: this.dataForm.pid})
web/src/views/modules/taskReliability/ModelRbd.vue
@@ -3,7 +3,7 @@
    <el-row :gutter="5">
      <el-col :span="5">
        <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
          <product-model-tree @on-selected="onProductSelected" showXdy="true"/>
          <product-model-tree @on-selected="onProductSelected" showXdy="true" :isShow="false"/>
        </div>
      </el-col>
      <el-col :span="19">
web/src/views/modules/taskReliability/OperatConditModel.vue
@@ -84,6 +84,7 @@
      async save() {
        let res = await this.$http.post('/taskReliability/OperatConditModel/', this.$refs.tableObj.dataList[0])
        if (res.success) {
          this.$tip.success()
          this.isChange = false
          this.$refs.tableObj.query()
        }
web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -1446,16 +1446,8 @@
      },
      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().dataId) {
            nodeArr2.push(node.getData().dataId)
          }
        }
        this.dataForm.nodeArr = nodeArr2
        //   获取所有子节点
        this.getNodeArr()
        this.dataForm.content = JSON.stringify(this.graph.toJSON())
        this.dataForm.urlPref = window.SITE_CONFIG['apiURL']
        console.log(this.dataForm, 'dataFrom')
@@ -1468,11 +1460,24 @@
          }
        })
      },
      async analyzeDiagram() {
        console.log(JSON.stringify(this.graph.toJSON()), 'graph.toJSON()')
      getNodeArr(){
        const nodes = this.graph.getNodes()
        let nodeArr2 = []
        // 检查除当前节点之外的所有节点的包围框是否相交
        for (const node of nodes) {
          console.log(node, 'saveDiagram node')
          if (node.getData().nodeType == 'node'  && node.getData().dataId) {
            nodeArr2.push(node.getData().dataId)
          }
        }
        this.dataForm.nodeArr = nodeArr2
      },
      async analyzeDiagram() {
        console.log(JSON.stringify(this.graph.toJSON()), 'graph.toJSON()')
        // 检查除当前节点之外的所有节点的包围框是否相交
        //   获取所有子节点
        this.getNodeArr()
        const nodes = this.graph.getNodes()
        for (const node of nodes) {
          if(node.getData().nodeType === 'dashedBox'){
            this.$message({message: '该模型中存在虚框,无法保存', type: 'warning'})
@@ -1485,11 +1490,7 @@
              return false; // 取消添加节点操作
            }
          }
          if (node.getData().nodeType === 'node' && 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/TaskBinoParam.vue
@@ -1,6 +1,6 @@
<template>
  <zt-dialog ref="dialog" column="3" title="二项参数" append-to-body :editAble="false" :hasConfirm="false">
    <zt-table-wraper ref="tableObj" query-url="/taskReliability/TaskBinoParam/page" delete-url="/taskReliability/TaskBinoParam"
    <zt-table-wraper :paging='false' ref="tableObj" query-url="/taskReliability/TaskBinoParam/page" delete-url="/taskReliability/TaskBinoParam"
                     v-slot="{ table }" >
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
        <el-form-item>
@@ -14,10 +14,10 @@
                height="600px"
                border @selection-change="table.selectionChangeHandle" @cell-click="handleCellClick">
        <!--        <el-table-column type="selection" width="40"/>-->
        <el-table-column prop="phaseName" label="阶段" align="center" width="100"/>
        <el-table-column prop="phaseName" label="阶段" align="center" />
        <el-table-column prop="operatConditName" label="工况" align="center"/>
        <el-table-column prop="productName" label="二项分布设备" align="center"/>
        <el-table-column prop="successRate" label="成功率" align="right">
        <el-table-column prop="successRate" label="成功率" align="right" width="100">
          <template slot-scope="scope">
                    <span
                      v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
@@ -28,7 +28,7 @@
            <span v-else>{{scope.row.successRate}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="simulatTimes" label="仿真次数" align="center">
        <el-table-column prop="simulatTimes" label="仿真次数" align="center" width="100">
          <template slot-scope="scope">
                    <span
                      v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
@@ -39,7 +39,7 @@
            <span v-else>{{scope.row.simulatTimes}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="successTimes" label="成功次数" align="center">
        <el-table-column prop="successTimes" label="成功次数" align="center" width="100">
          <template slot-scope="scope">
                    <span
                      v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">