jinlin
2024-10-12 2d0b8ecd8f3586326a3786914f94fd9008f773fd
修改
2个文件已修改
31 ■■■■■ 已修改文件
web/src/views/modules/taskReliability/ConfigNode/configNode.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/RBD-edit-img.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/ConfigNode/configNode.vue
@@ -8,11 +8,12 @@
            <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"
            <el-form-item v-show="showNumberInput" :label='nodeType=="vote"?"表决数量":"备份数量"' 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"
@@ -175,7 +176,8 @@
        this.curCel.attr('text/text', this.text)
      },
      onNodeTypeExtChange(e) {
        if (this.globalGridAttr.nodeTypeExt === 'vote') {
        alert(this.globalGridAttr.nodeTypeExt)
        if (this.globalGridAttr.nodeTypeExt === 'vote' || this.globalGridAttr.nodeTypeExt === 'switch') {
          this.showNumberInput = true;
        } else {
          this.showNumberInput = false;
@@ -406,7 +408,7 @@
          this.globalGridAttr.successRate = cell.getData().successRate
          this.globalGridAttr.simulatTimes = cell.getData().simulatTimes
          this.globalGridAttr.successTimes = cell.getData().successTimes
          if (this.nodeType === 'vote' || this.globalGridAttr.nodeTypeExt === 'vote' || (cell.getData().voteNum !== undefined && cell.getData().voteNum !== '')) {
          if (this.nodeType === 'vote' || this.nodeType === 'switch') {
            console.log(cell.getData().voteNum, 'cell.getData().voteNum')
            this.showNumberInput = true
          }
web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -1926,6 +1926,12 @@
      createParallelBrach(x, y, dragNode) {
        dragNode.position(x + 320, y - dragNode.size().height / 2)
        const connectNode = this.createConnectNode(x + 50, y)
        this.createBrach(dragNode,connectNode,x,y-50)
        this.createBrach(dragNode,connectNode,x,y+50)
        return {newStartNode: connectNode, newEndNode: dragNode}
      },
      createBrach(dragNode,connectNode,x,y){
        const dashedBox = this.createDashedBox(x + 150, y)
        dragNode.setData({startNodeId: connectNode.id})
@@ -1935,7 +1941,7 @@
          router: {
            name: 'manhattan',
            args: {
              startDirections: ['right'], // 从下方开始
              startDirections: ['top','bottom'], // 从下方开始
              endDirections: ['left'],      // 向左方结束
            },
          },
@@ -1949,25 +1955,12 @@
            name: 'manhattan',
            args: {
              startDirections: ['right'], // 从下方开始
              endDirections: ['left'],      // 向左方结束
              endDirections: ['top','bottom'],      // 向左方结束
            },
          },
          connector: {name: 'rounded'},
          zIndex: -1
        })
        return {newStartNode: connectNode, newEndNode: dragNode}
        /*        this.graph.addEdge({
                  source: {cell: startNode, port: 'right1'},
                  target: {cell: connectNode, port: 'left1'},
                  router: {name: 'manhattan'},
                  connector: {name: 'rounded'}
                })
                this.graph.addEdge({
                  source: {cell: dragNode, port: 'right1'},
                  target: {cell: endNode, port: 'left1'},
                  router: {name: 'manhattan'},
                  connector: {name: 'rounded'}
                })*/
      },
      createBridgeConnection(x, y, dragNode) {
        console.log(x, y, 'leftX centerY')