xyc
2024-08-02 ea744c63bf10f14fe5a51addf37083c384093e21
Merge remote-tracking branch 'origin/master'
5个文件已修改
173 ■■■■ 已修改文件
web/src/views/modules/basicInfo/ParamData.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ProductImport.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/XhProductModel.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/TimeDiagram.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/TimeDiagramTemp.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ParamData.vue
@@ -449,9 +449,11 @@
      },
      onDefault(defaultId) {
        this.dataForm.srcId = defaultId
        this.dataForm.productType = 2
        this.dataForm.productType = '1'
        this.activeName = 'first'
        this.$refs.tableObj.query()
        this.$nextTick(() => {
          this.$refs.tableObj.query()
        })
      },
      dataLoaded(data) {
        this.dataList = data
web/src/views/modules/basicInfo/ProductImport.vue
@@ -31,9 +31,6 @@
        <el-table-column prop="lineNumber" label="错误行数"/>
      </el-table>
    </el-form>
    <!--<template slot="footer">-->
    <!--<zt-button type="primary" style="float:left" @click="exportExcelModel()">导出Excel导入模板</zt-button>-->
    <!--</template>-->
  </zt-dialog>
</template>
@@ -157,6 +154,7 @@
            }
          )
        } else {
          clearInterval(this.timer)
        }
      }
    }
web/src/views/modules/basicInfo/XhProductModel.vue
@@ -72,6 +72,7 @@
        url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getSvgImage?token=${Cookies.get('token')}&id=`,
        productType: '',
        shipId: '',
        namePath:'',
        dataForm: {
          name: '',
          type: '',
@@ -97,7 +98,8 @@
          this.$refs.SelectTyModel.$refs.dialog.init(null, {
            type: this.dataForm.type,
            id: this.dataForm.pid,
            shipId: this.shipId
            shipId: this.shipId,
            namePath: this.namePath
          })
        } else {
          this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'zt', pid: this.dataForm.pid})
@@ -129,6 +131,7 @@
        this.dataForm.pid = data.id
        this.dataForm.type = data.productType
        this.productType = data.productType
        this.namePath = data.namePath
        if (data.productType !== '10') {
          this.$refs.tableObj.query()
        }
@@ -143,8 +146,8 @@
      },
      onDefault(defaultId) {
        this.dataForm.pid = defaultId
        this.dataForm.type = 2
        this.productType = 2
        this.dataForm.type = 1
        this.productType = 1
        this.$refs.tableObj.query()
      },
    }
web/src/views/modules/taskReliability/TimeDiagram.vue
@@ -118,6 +118,7 @@
    },
    mounted() {
      this.getProductList()
    },
    components: {
      ProductModelTree,
@@ -159,6 +160,9 @@
          },
          autoResize: true,
          history: true,
          // panning: {
          //   enabled: true,
          // },
          scroller: {
            enabled: true,
            pageVisible: true,
@@ -187,7 +191,6 @@
            },
            // anchor: 'center',
            connectionPoint: 'anchor',
            allowBlank: false,
            snap: {
              radius: 20,
            },
@@ -217,6 +220,9 @@
                zIndex: 0,
              })
            },
            // validateConnection({targetMagnet}) {
            //   return !!targetMagnet
            // },
          },
          highlighting: {
            magnetAdsorbed: {
@@ -264,6 +270,7 @@
            rowHeight: 100,
          },
        })
        document.getElementById('stencil').appendChild(stencil.container)
        Graph.registerNode(
          'custom-rect',
          {
@@ -324,7 +331,101 @@
            },
            ports: {
              ...this.ports
              // items: [
              //   {
              //     group: 'top',
              //   },
              //   {
              //     group: 'bottom',
              //   },
              // ],
            },
          },
          true,
        )
        //
        Graph.registerNode(
          'custom-circle',
          {
            inherit: 'ellipse',
            width: 120,
            height: 120,
            data: {
              dataId: '',
              finishDate: ''
            },
            attrs: {
              body: {
                strokeWidth: 1,
                stroke: '#5F95FF',
                fill: '#EFF4FF',
              },
              //日期
              title: {
                text: '',
                fontSize: 12,
                fill: '#262626',
                refX: 0.5,
                refY: '100%',
                refY2: -10,
                textAnchor: 'middle',
                textVerticalAnchor: 'bottom',
              },
              // 名称
              text: {
                // fontFamily: '仿宋',
                fontSize: 20,
                fill: '#262626',
                textWrap: {
                  width: 80,      // 宽度为 80px换行
                  ellipsis: false,  // 文本超出显示范围时,自动添加省略号
                  breakWord: true, // 是否截断单词
                }
              },
            },
            markup: [
              {
                tagName: 'ellipse',
                selector: 'body',
              },
              {
                tagName: 'text',
                selector: 'title',
              },
              {
                tagName: 'text',
                selector: 'text',
              },
            ],
            ports: {...this.ports},
          },
          true,
        )
        Graph.registerNode(
          'custom-circle1',
          {
            inherit: 'ellipse',
            width: 65,
            height: 65,
            data: {
              dataId: '',
              finishDate: ''
            },
            attrs: {
              body: {
                strokeWidth: 1,
                stroke: '#5F95FF',
                fill: '#EFF4FF',
              },
              //日期
              text: {
                // fontFamily: '仿宋',
                fontSize: 12,
                text: '日期节点',
                fill: '#262626',
              },
            },
            ports: {...this.ports},
          },
          true,
        )
@@ -539,7 +640,10 @@
        })
        this.graph.on('blank:click', ({cell}) => {
          // this.reset()
          // this.type.value = "grid"
          this.type = 'grid'
          // this.id = cell.id
        })
        this.graph.on('cell:click', ({cell}) => {
@@ -566,16 +670,14 @@
        // 单击node节点
        this.graph.on('node:click', ({node}) => {
          // this.reset()
          if (node.getData().dataId) {
            this.dialogVisible2 = true
            let param = {
              id: node.getData().dataId,
              modelName: node.attr('label/textWrap/text'),
            }
            this.$nextTick(() => {
              this.$refs.rbdEditImg.init(param)
            })
          }
          node.attr('line/stroke', '#5F95FF')
          node.prop('labels/0', {
            attrs: {
              body: {
                stroke: '#5F95FF',
              },
            },
          })
        })
        // 控制连接桩显示/隐藏
        this.graph.on('node:delete', ({view, e}) => {
web/src/views/modules/taskReliability/TimeDiagramTemp.vue
@@ -372,20 +372,11 @@
        if (res.data !== null && res.data.content != null) {
          this.dataForm = res.data
          this.diagramJson = JSON.parse(this.dataForm.content)
          // console.log(this.dataForm.content,'this.Diagram content')
          console.log(this.diagramJson, 'this.Diagram json')
          this.graph.fromJSON(this.diagramJson)
          // this.graph.centerContent()
          // this.graph.zoomToFit()
        } else {
          this.dataForm.id = null
          // await this.$alert('该项目还未编制网络图', '提示', {
          //   confirmButtonText: '确定'
          // })
          this.graph.fromJSON(this.emptyJson)
          // this.graph.centerContent()
          // this.graph.zoomToFit()
          // this.graph.freeze()
        }
      },
      init() {
@@ -414,19 +405,6 @@
              })
            }
          },
          // translating: {
          //   restrict(view) {
          //     const cell = view.cell
          //     if (cell.isNode()) {
          //       const parent = cell.getParent()
          //       if (parent) {
          //         return parent.getBBox()
          //       }
          //     }
          //
          //     return null
          //   },
          // },
          onToolItemCreated({tool}) {
            const handle = tool
            const options = handle.options
@@ -492,14 +470,6 @@
                      text: ''
                    }
                  },
                  // position: {
                  //   distance: 0.5,
                  //   angle: 180,
                  //   options: {
                  //     keepGradient: true,
                  //     ensureLegibility: true
                  //   }
                  // }
                }],
                zIndex: 0,
              })