6
jinlin
2023-12-01 68981c58ea61ff4edc0479facfb8b76181d2a582
web/src/views/modules/project/Environ-AddOrUpdate.vue
@@ -1,6 +1,7 @@
<template>
  <zt-dialog ref="dialog" column="2" @confirm="formSubmit" append-to-body title="测试环境建立确认表">
      <el-form :model="dataForm" style="padding-top: 0" :inline="true"  ref="dataForm" :disabled="dataForm.disabled" label-width="130px" class="confirmFormAuto">
    <el-form :model="dataForm" style="padding-top: 0" :inline="true" ref="dataForm" :disabled="dataForm.disabled"
             label-width="130px" class="confirmFormAuto">
        <div class="DConfirmForm">
          <el-form-item label-width="60px" label="编号:" style="width:100%;margin-bottom: 0">
            <span>{{dataForm.environ.code}}</span>
@@ -26,7 +27,8 @@
            <div class="el-wt-border-left" style="padding-left:5px;width: calc(100% - 130px)">
              <div style="padding: 5px">软件资源:</div>
              <div class="table-container">
              <el-table ref="tableSoftwareList" class="el-software el-margin-top-bot" border :data="dataForm.softwareResourcesList"
              <el-table ref="tableSoftwareList" class="el-software el-margin-top-bot" border
                        :data="dataForm.softwareResourcesList"
                        stripe>
                <el-table-column prop="no" align="center" width="80" label="序号">
                  <template slot-scope="scope">
@@ -61,7 +63,8 @@
              </div>
              <div style="padding: 5px">硬件资源:</div>
              <div class="table-container">
              <el-table ref="tableHardwareList" class="el-software el-margin-top-bot" border :data="dataForm.hardwareResourcesList"
              <el-table ref="tableHardwareList" class="el-software el-margin-top-bot" border
                        :data="dataForm.hardwareResourcesList"
                        stripe>
                <el-table-column prop="no" align="center" width="80" label="序号">
                  <template slot-scope="scope">
@@ -123,7 +126,8 @@
            </div>
            <div class="el-wt-border-left" style="padding-left:5px;width: calc(100% - 130px)">
              <div class="table-container">
              <el-table ref="tableEnvironeList" class="el-software el-margin-top-bot" border :data="dataForm.environAnalysisList"
              <el-table ref="tableEnvironeList" class="el-software el-margin-top-bot" border
                        :data="dataForm.environAnalysisList"
                        stripe>
                <el-table-column prop="no" align="center" width="80" label="序号">
                  <template slot-scope="scope">
@@ -251,6 +255,7 @@
        this.dataForm.projectId = row.projectId
        // this.dataForm.disabled
        this.getInfo()
        this.getImageUrl()
        console.log(this.dataForm.id,this.dataForm.projectId,'params params')
      },
      // 获取信息
@@ -290,9 +295,27 @@
          tableBody.scrollTop = tableBody.scrollHeight;
        })
      },
      getImageUrl(url){
        this.dataForm.url  = url
      getImageUrl() {
        let pictureId = this.getFirstImageId(this.dataForm.files, 'test_environt_diagram')
        this.dataForm.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${pictureId}`
        console.log(this.dataForm.url,' this.dataForm.url')
      },
      getFirstImageId(oss) {
        console.log(oss, ' getFirstImageId(oss)')
        let fileId = 0
        if (oss != null) {
          if (oss.groups.length > 0) {
            let group = oss.groups[0]
            if (group.fields.length > 0) {
              let field = group.fields[0]
              if (field.files.length > 0) {
                let file = field.files[0]
                fileId = file.id
              }
            }
          }
        }
        return fileId
      },
      // 表单提交
      async formSubmit() {
@@ -311,6 +334,7 @@
  width: 70%;
  margin: 0 auto;
}
.confirmDAuto{
  border: 1px solid rgba(0,0,0,.2);
}
@@ -323,6 +347,7 @@
.DFormWidth {
  width: 120px;
}
.DConfirmForm {
  /*border-left: 1px solid;*/
  width: 100%;
@@ -331,23 +356,29 @@
.DConfirmForm > .el-form-item > .el-form-item__content {
  width: calc(100% - 130px);
}
.DConfirmForm > .el-form-item.isKill > .el-form-item__content {
  width: calc(100% - 180px);
}
.el-form-border{
  border-top: 1px solid rgba(0,0,0,.2);
  border-bottom: 1px solid rgba(0,0,0,.2);
}
.el-B-border{
  border-bottom: 1px solid rgba(0,0,0,.2);
}
.el-margin-top-bot{
  margin-top:5px;
  margin-bottom:5px;
}
.el-wt-border-left{
  border-left:1px solid rgba(0,0,0,.2);
}
.zt .el-table.el-software th {
  background: transparent;
}
@@ -355,12 +386,15 @@
.zt .el-table.el-software th > .cell {
  font-weight: 500;
}
.DHold{
  font-weight: 600;
}
.zt .el-table.el-software{
  font-size: 14px;
}
.confirmFormAuto .marginTopAndMarginBottom {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
@@ -370,6 +404,7 @@
  margin-top: -10px !important;
  margin-bottom: 10px !important;
}
.confirmFormAuto .marginTopAndMarginBottom3 {
  margin-top: 0 !important;
  margin-bottom: 10px !important;