xyc
2024-07-17 e21c05d2c0d67629c81e5cc54238e6678a055055
修改模型提交功能
3个文件已修改
15 ■■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/ModelLineController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/OperatConditModel.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/RBD-edit-img.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/ModelLineController.java
@@ -140,7 +140,7 @@
    @ApiOperation("解析")
    @LogOperation("解析")
    public Result analyze(@RequestBody ModelRbd modelRbd) {
        modelLineService.update(modelRbd);
        update(modelRbd);
        boolean result = modelLineService.analyze(modelRbd);
        return result ? Result.ok() : Result.error("解析失败");
    }
web/src/views/modules/taskReliability/OperatConditModel.vue
@@ -106,12 +106,17 @@
        let modelNodes = this.mapModelNodes[modelId]
        console.log(modelId, 'modelChanged modelId')
        console.log(modelNodes, 'modelChanged modelNodes')
        console.log(row.children, 'row.children')
        for (let subRow of row.children) {
          if (modelNodes.indexOf(subRow.productId)) {
          console.log(subRow,'subRow')
          console.log(subRow.productId,'subRow.productId')
          if (modelNodes.indexOf(subRow.productId) != -1) {
            subRow.isDisabled = 0
            if (subRow.modelList.length == 1) {
              subRow.modelId = subRow.modelList[0].id
              console.log(subRow.modelId, 'subRow.modelId 111')
              console.log(this.mapModelNodes[subRow.modelId], 'this.mapModelNodes[subRow.modelId] 111')
            } else {
              //subRow.modelId = null
            }
web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -16,7 +16,7 @@
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="saveDiagram()">暂存</el-button>
              <el-button type="primary" @click="analyzeDiagram()">保存</el-button>
              <el-button type="primary" @click="analyzeDiagram()">提交</el-button>
              <el-button type="primary" @click="clearDiagram()">清空图形</el-button>
              <el-button @click="leftAlign()">
                <i style="font-size: 1rem;" class="wt-iconfont icon-zuoduiqi"></i>
@@ -1451,7 +1451,7 @@
        // 检查除当前节点之外的所有节点的包围框是否相交
        for (const node of nodes) {
          console.log(node, 'saveDiagram node')
          if (node.getData().nodeType == 'node' && node.getData().productType != 'product_xdy' && node.getData().dataId) {
          if (node.getData().nodeType == 'node'  && node.getData().dataId) {
            nodeArr2.push(node.getData().dataId)
          }
        }
@@ -1485,7 +1485,7 @@
              return false; // 取消添加节点操作
            }
          }
          if (node.getData().nodeType === 'node' && node.getData().productType !== 'product_xdy' && node.getData().dataId) {
          if (node.getData().nodeType === 'node' && node.getData().dataId) {
            nodeArr2.push(node.getData().dataId)
          }
        }