wente
2023-11-15 9376ca2a22b6e279cac4a7de0d4b62adaac17acf
web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue
@@ -111,7 +111,7 @@
                          <span>{{ (dataForm.project.softwareName||'') + scope.row.name }}</span>
                        </template>
                      </el-table-column>
                      <el-table-column align="center" width="180" label="标识/版本">
                      <el-table-column align="center" prop="identify" width="180" label="标识/版本">
                        <template slot-scope="scope">
                          <span v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
                            <el-input ref="editInput" v-model="scope.row.identify" placeholder="标识/版本"></el-input>
@@ -526,6 +526,11 @@
          ...this.dataForm,
          ...res.data
        }
        if(this.dataForm.softwareTestOrder){
          this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',')
          this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',')
          console.log(this.dataForm.softwareTestOrder.testType1)
        }
        if(this.dataForm.project === null){
          this.dataForm.project={}
        }
@@ -545,11 +550,17 @@
    // 表单提交
    async formSubmit() {
      console.log(this.dataForm, ' this.dataForm')
      this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.join(',')
      this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.join(',')
      console.log(this.dataForm.softwareTestOrder.testType1)
      let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/project/SoftwareTestOrder/', this.dataForm)
      if (res.success) {
        await this.$tip.success()
        this.$refs.dialog.close()
        this.$emit('refreshDataList')
      }else{
        this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',')
        this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',')
      }
    }
  }