wente
2023-11-17 26d0a43927f2777e69ef236fa4a48145842c7c63
web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue
@@ -1,9 +1,9 @@
<template>
  <zt-dialog ref="dialog" column="2" @confirm="formSubmit">
    <el-form ref="form" :inline="true" :model="dataForm" :disabled="dataForm.disabled" label-width="120px"
             class="weiTuoDanAuto">
             class="weiTuoDanAuto" style="padding-top: 0">
      <div class="DManageForm">
        <el-form-item readonly label-width="60px" label="编号:" style="width: 99% ;margin-bottom:-5px">
        <el-form-item readonly label-width="50px" label="编号:" style="width: 99% ;margin-bottom:-5px">
          <span>{{ dataForm.softwareTestOrder.code}}</span>
        </el-form-item>
      </div>
@@ -157,7 +157,7 @@
                  <div class="DWidth DAlign DHold">
                    测试类型
                  </div>
                  <div class="el-border-left" style="width: 98%">
                  <div class="el-border-left test-type-line-height" style="width: 98%">
                    <el-form-item  style="width: 40%;padding-left:5%;margin-bottom: 0">
                      <zt-dict-checkbox v-model="dataForm.softwareTestOrder.testType1" column="2" dict="test_type1"
                                        clearable></zt-dict-checkbox>
@@ -361,7 +361,7 @@
            </div>
          </div>
        </div>
        <div class="el-flex">
        <div class="el-flex el-border-bottom">
          <div class="DPadding3 DAlign DHold">
            说明
          </div>
@@ -377,6 +377,15 @@
              </span>
            </div>
          </div>
        </div>
        <div class="el-flex order-sc" style="height: 150px">
<!--          <div class="DPadding3 DAlign DHold">-->
<!--            委托单上传-->
<!--          </div>-->
            <el-form-item class="marginTopAndMarginBottom" style="width: 100%">
              <config-uploader busi-type="test_order" model-name="dataForm" :dataForm="dataForm"
                               v-model="dataForm.files"/>
            </el-form-item>
        </div>
      </div>
@@ -487,9 +496,14 @@
          ...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.softwareTestOrder.testType1){
            this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',')
            console.log(this.dataForm.softwareTestOrder.testType1)
          }
          if(this.dataForm.softwareTestOrder.testType2){
            this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',')
            console.log(this.dataForm.softwareTestOrder.testType2)
          }
        }
        if(this.dataForm.project === null){
          this.dataForm.project={}
@@ -514,8 +528,12 @@
    // 表单提交
    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(',')
      if(this.dataForm.softwareTestOrder.testType1){
        this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.join(',')
      }
      if(this.dataForm.softwareTestOrder.testType2){
        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) {
@@ -523,8 +541,12 @@
        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(',')
        if(this.dataForm.softwareTestOrder.testType1){
          this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',')
        }
        if(this.dataForm.softwareTestOrder.testType2){
          this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',')
        }
      }
    }
  }
@@ -627,4 +649,10 @@
.csjgxx > .el-form-item > .el-form-item__content {
  width: calc(100% - 130px);
}
.order-sc > .el-form-item > .el-form-item__content {
  width:100%;
}
.test-type-line-height>.el-form-item>.el-form-item__content{
  line-height: 30px;
}
</style>