Rmengdi 10 månader sedan
förälder
incheckning
961c95828f

+ 250 - 96
meas_web/src/views/meas/components/dialogContent.vue

@@ -2,9 +2,9 @@
   <div>
     <el-form ref="formData" :rules="formRules" :model="formData" size="mini" :disabled="checkShow" label-width="80px">
       <el-row type="flex" justify="space-around">
-        <el-form-item label="发动机型号" prop="model" label-width="95px">
-          <el-select v-model="formData.model" placeholder="请选择发动机型号" @change="changeEngine">
-            <el-option v-for="item in engineModelOption" :key="item.id" :label="item.model" :value="item.id">
+        <el-form-item label="发动机型号" prop="engineModel" label-width="95px">
+          <el-select v-model="formData.engineModel" placeholder="请选择发动机型号" @change="changeEngine">
+            <el-option v-for="item in engineOptions" :key="item.id" :label="item.model" :value="item.id">
             </el-option>
             <el-option :value="undefined" style="cursor: pointer">
               <el-button type="text" @click="onClickBtn('engine')"><i class="el-icon-plus"></i> 增加发动机型号</el-button>
@@ -28,10 +28,8 @@
     </el-form>
     <el-form ref="formData" :disabled="checkShow" :model="formData" :rules="formRules" size="mini" label-width="80px">
       <el-form-item label="测量批次" prop="measurementBatch" style="margin-left: 5%">
-        <el-select v-model="formData.measurementBatchId" placeholder="请选择测量批次">
+        <el-select v-model="formData.measurementBatch" placeholder="请选择测量批次">
           <el-option v-for="item in batchOption" :key="item.id" :label="item.measurementBatch" :value="item.id">
-            <span style="float: left">{{ item.id }}</span>
-            <span style="float: right; color: #8492a6; font-size: 13px">{{ item.measurementBatch }}</span>
           </el-option>
           <el-option :value="undefined" disabled style="cursor: pointer">
             <el-button type="text" @click="onClickBtn('measBatch')"><i class="el-icon-plus"></i> 增加测量批次</el-button>
@@ -41,11 +39,11 @@
     </el-form>
     <div class="box">
       <span class="title">环境参数</span>
-      <el-form :disabled="checkShow" :rules="formRules" ref="formData" :model="formData" size="mini" label-width="80px">
+      <el-form :disabled="checkShow" :rules="formRules" ref="formData" :model="formData" size="mini" label-width="80px" :validate-on-rule-change="false">
         <el-row type="flex" justify="space-around">
           <el-form-item label="发动机状态" label-width="100px" prop="engineStatus">
             <el-select v-model="formData.engineStatus" placeholder="请选择发动机状态">
-              <el-option v-for="item in engineStatusOption" :key="item" :label="item" :value="item">
+              <el-option v-for="item in engineStatusOptions" :key="item" :label="item" :value="item">
               </el-option>
               <el-option :value="undefined" disabled style="cursor: pointer">
                 <el-button type="text" @click="onClickBtn('engineStatus')"><i class="el-icon-plus"></i>
@@ -55,7 +53,7 @@
           </el-form-item>
           <el-form-item label="角度" prop="angle">
             <el-select v-model="formData.angle" placeholder="请输入角度">
-              <el-option v-for="item in angleOption" :key="item" :label="item" :value="item">
+              <el-option v-for="item in angleOptions" :key="item" :label="item" :value="item">
               </el-option>
               <el-option :value="undefined" disabled style="cursor: pointer">
                 <el-button type="text" @click="onClickBtn('engineAngle')"><i class="el-icon-plus"></i>
@@ -258,7 +256,7 @@
       append-to-body>
       <el-form ref="calTempForm" :model="calTempForm" label-width="60px">
         <el-form-item label="温度" prop="temp">
-          <el-input v-model="calTempForm.temp" placeholder="请输入温度" />
+          <el-input type="number" v-model.number="calTempForm.temp" placeholder="请输入温度(只能输入数字)" />
         </el-form-item>
         <el-form-item label="文件" prop="calTempFile">
           <file-upload :fileSize="0" :limit="1" :isCheck="isCheck" :fileType="['txt']"
@@ -270,6 +268,70 @@
         <el-button @click="cancelCalTemp">取 消</el-button>
       </div>
     </el-dialog>
+    <el-dialog :close-on-click-modal="false" title="增加发动机型号" :visible.sync="addDialogVisible" width="400px"
+      append-to-body>
+      <el-form ref="addEngineForm" :model="addEngineForm" :disabled="isCheck" :rules="rules" label-width="100px">
+        <el-form-item label="发动机型号" prop="model">
+          <el-input v-model="addEngineForm.model" placeholder="请输入发动机型号" />
+        </el-form-item>
+        <el-form-item label="几何模型文件" prop="geometryFiles">
+          <file-upload :fileSize="0" :limit="1" :fileType="['x_t', 'str']" v-model="addEngineForm.geometryFiles" />
+        </el-form-item>
+        <el-form-item label="几何模型图片" prop="geometryImage">
+          <image-upload :fileSize="0" :limit="1" :fileType="['jpg']" v-model="addEngineForm.geometryImage" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="addEngine()">确 定</el-button>
+        <el-button @click="addDialogVisible = false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :close-on-click-modal="false" title="增加测量批次" :visible.sync="addMeasVisible" width="400px" append-to-body>
+      <el-form ref="form" :model="addMeasBatchForm" :rules="rules" label-width="110px">
+        <el-form-item label="发动机型号" prop="engineId">
+          <el-select v-model="addMeasBatchForm.engineId" placeholder="请选择发动机型号" @change="engineChange">
+            <el-option v-for="item in engineOptions" :key="item.id" :label="item.model" :value="item.id">
+              <span style="float: left">{{ item.id }}</span>
+              <span style="float: right; color: #8492a6; font-size: 13px">{{ item.model }}</span>
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="测量批次" prop="measurementBatch">
+          <el-input v-model="addMeasBatchForm.measurementBatch" placeholder="请输入测量批次(测量年月日+发动机型号)" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="addMeas()">确 定</el-button>
+        <el-button @click="addMeasVisible = false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :close-on-click-modal="false" title="增加发动机状态" :visible.sync="addStatusVisible" width="400px"
+      append-to-body>
+      <el-form ref="addStatusForm" :model="addStatusForm" :rules="rules" label-width="80px">
+        <el-form-item label="状态" prop="status">
+          <el-input v-model="addStatusForm.status" placeholder="请输入状态" />
+        </el-form-item>
+        <el-form-item label="排序" prop="index">
+          <el-input v-model="addStatusForm.index" placeholder="请输入排序" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="addStatus()">确 定</el-button>
+        <el-button @click="addStatusVisible = false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :close-on-click-modal="false" title="增加发动机角度" :visible.sync="addAngleVisible" width="400px"
+      append-to-body>
+      <el-form ref="addAngleForm" :model="addAngleForm" :rules="rules" label-width="80px">
+        <el-form-item label="角度" prop="angle">
+          <el-input v-model="addAngleForm.angle" placeholder="请输入角度" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="addAngle()">确 定</el-button>
+        <el-button @click="addAngleVisible = false">取 消</el-button>
+      </div>
+    </el-dialog>
     <el-dialog :close-on-click-modal="false" title="数据可视化" :visible.sync="fileVisible" width="70%" append-to-body>
       <ECharts class="chartShow" :chartData="chartData" :width="chartType === 'heatmap' ? '400px' :'100%'" />
     </el-dialog>
@@ -277,10 +339,10 @@
 </template>
 
 <script>
-import { listEngineModel } from "@/api/meas/engineModel";
-import { angleOption } from "@/api/meas/angle";
-import { statusOption } from "@/api/meas/status";
-import { listMeasBatch } from "@/api/meas/measBatch";
+import { listEngineModel,addEngineModel } from "@/api/meas/engineModel";
+import { angleOption,addAngle } from "@/api/meas/angle";
+import { statusOption,addStatus } from "@/api/meas/status";
+import { listMeasBatch,addMeasBatch } from "@/api/meas/measBatch";
 import ECharts from "@/views/meas/envData/ECharts.vue";
 export default {
   name: "dialogContent",
@@ -314,37 +376,16 @@ export default {
       type: Boolean,
       default: false,
     },
-    engineModelList: {
-      type: Array,
-      default: null,
-    },
-    angleList: {
-      type: Array,
-      default: null,
-    },
-    measureBatchList: {
-      type: Array,
-      default: null,
-    },
-    engineStatusList: {
-      type: Array,
-      default: null,
-    }
   },
   data() {
     return {
       baseUrl: process.env.VUE_APP_BASE_API,
-      addDialogVisible: false,
-      addMeasVisible: false,
-      engineModelOption: this.engineModelList,
-      measureBatchOption: this.measureBatchList,
-      angleOption: this.angleList,
-      engineStatusOption: this.engineStatusList,
       // 热像仪测试
       lensFViewOptions: [],
       filterNoOptions: [],
       fpsOptions: [],
       spectralBandOptions: [],
+      rules: {},
       // 表单校验和验证
       formRules: {
         model: [
@@ -460,69 +501,91 @@ export default {
       chartType: "",
       fileVisible: false,
       chartData: {},
+      addMeasBatchForm: {
+        engineId: null,
+        measurementBatch: null,
+      },
+      addEngineForm: {
+        model: null,
+        geometryFiles: null,
+        geometryImage: null
+      },
+      addStatusForm: {
+        status: null,
+        index: null
+      },
+      addAngleForm: {
+        angle: null
+      },
+      engineOptions: [],
+      measureBatchOptions:[],
+      engineStatusOptions:[],
+      angleOptions:[],
+      addDialogVisible: false,
+      addMeasVisible: false,
+      addStatusVisible: false,
+      addAngleVisible: false,
+      
     };
   },
   created() {
+    this.getListEngineModel();
+    this.getListMeasBatch();
+    this.getAngleOption();
+    this.getStatusOption();
   },
   watch: {
     form: {
-      handler(newVal) {
+      handler(newVal,oldVal) {
         this.formData = newVal;
+        if(newVal.engineModel!==oldVal?.engineModel){
+          this.batchOption = this.measureBatchOptions.filter(item => { return item.engineModel === newVal.engineModel })
+        }
       },
-      immediate: true
+      immediate: true,
+      deep: true
     },
     radiationForm: {
       handler(newVal) {
         this.radiationData = newVal;
       },
-      immediate: true
+      immediate: true,
+      deep: true
     },
     TIForm: {
       handler(newVal) {
         this.TIData = newVal;
       },
-      immediate: true
+      immediate: true,
+      deep: true
     },
     TransmittanceForm: {
       handler(newVal) {
         this.TransmittanceData = newVal;
       },
-      immediate: true
+      immediate: true,
+      deep: true
     },
     isCheck: {
       handler(newVal) {
         this.checkShow = newVal;
       },
+      immediate: true
     },
     addFlag: {
       handler(newVal) {
         this.addBtn = newVal;
       },
-    },
-    engineModelList: {
-      handler(newVal) {
-        this.engineModelOption = newVal;
-      },
-    },
-    measureBatchList: {
-      handler(newVal) {
-        this.measureBatchOption = newVal;
-      },
-    },
-    angleList: {
-      handler(newVal) {
-        this.angleOption = newVal;
-      },
-    },
-    engineStatusList: {
-      handler(newVal) {
-        this.engineStatusOption = newVal;
-      },
+      immediate: true
     },
     calTempData: {
       handler(newVal) {
-        this.radiationForm.calTemp = JSON.stringify(newVal);
+        if (this.radiationForm) {
+          this.radiationForm.calTemp = this.calTempData.length>0?JSON.stringify(newVal):null;
+        } 
       },
+      immediate: true,
+      deep: true
     }
   },
   methods: {
@@ -539,24 +602,128 @@ export default {
         return "";
       }
     },
-    // 清除验证表单
-    // clearcheck(formName){
-    //   if(this.$refs[formName]){
-    //     this.$refs[formName].clearValidate()
-    //   } 
-    // },
-    // 点击增加按钮
+    addEngine() {
+      this.loading = true;
+      addEngineModel(this.addEngineForm).then((response) => {
+        this.$modal.msgSuccess("新增成功");
+        this.addDialogVisible = false;
+        this.getListEngineModel();
+        this.addEngineForm = {
+          model: null,
+          geometryFiles: null,
+          geometryImage: null
+        };
+      });
+    },
+    // 增加测量批次
+    addMeas() {
+      addMeasBatch(this.addMeasBatchForm).then((response) => {
+        this.$modal.msgSuccess("新增成功");
+        this.addMeasVisible = false;
+        this.getListMeasBatch();
+        this.addMeasBatchForm = {
+          engineId: null,
+          measurementBatch: null,
+        };
+      });
+    },
+    // 增加状态
+    addStatus() {
+      addStatus(this.addStatusForm).then((response) => {
+        this.$modal.msgSuccess("新增成功");
+        this.addStatusVisible = false;
+        this.getStatusOption();
+        this.addStatusForm = {
+          status: null,
+          index: null
+        }
+      });
+    },
+    // 增加角度
+    addAngle() {
+      addAngle(this.addAngleForm).then((response) => {
+        this.$modal.msgSuccess("新增成功");
+        this.getAngleOption();
+        this.addAngleVisible = false;
+        this.addAngleForm = {
+          angle: null
+        }
+      });
+    },
+    // 获取发电机List
+    getListEngineModel() {
+      this.loading = true;
+      const data = {};
+      listEngineModel(data).then((response) => {
+        this.engineOptions = response.rows;
+        this.loading = false;
+      });
+    },
+    // 获取测量批次List
+    getListMeasBatch() {
+      const data = {};
+      this.loading = true;
+      listMeasBatch(data).then((response) => {
+        this.measureBatchOptions = response.rows;
+        this.batchOption = this.measureBatchOptions.filter(item => { return item.engineModel === this.form.engineModel });
+        this.loading = false;
+      });
+    },
+    // 获取角度Option
+    getAngleOption() {
+      this.loading = true;
+      angleOption().then((response) => {
+        this.angleOptions = response.data;
+        this.loading = false;
+      });
+    },
+    // 获取状态Option
+    getStatusOption() {
+      this.loading = true;
+      statusOption().then((response) => {
+        this.engineStatusOptions = response.data;
+        this.loading = false;
+      });
+    },
     onClickBtn(type) {
-      this.$emit('on-click-btn', type)
+      if (type === "engine") this.addDialogVisible = true;
+      else if (type === "measBatch")
+      {
+        if (this.form.engineModel) {
+          this.addMeasBatchForm.engineId = this.form.engineModel
+          this.engineChange(this.form.engineModel)
+        }
+        this.addMeasVisible = true;
+      }
+      else if (type === "engineStatus") this.addStatusVisible = true;
+      else if (type === "engineAngle") this.addAngleVisible = true;
+    },
+    engineChange(val) {
+      let obj = {};
+      obj = this.engineOptions.find((item) => {
+        return item.model === val;
+      });
+      this.addMeasBatchForm.measurementBatch = this.getTime() + '-' + obj?.model
+    },
+    getTime() {
+      const now = new Date();
+      const year = now.getFullYear();
+      const month = ('0' + (now.getMonth() + 1)).slice(-2);
+      const day = ('0' + now.getDate()).slice(-2);
+      const hour = ('0' + now.getHours()).slice(-2);
+      const minute = ('0' + now.getMinutes()).slice(-2);
+      const second = ('0' + now.getSeconds()).slice(-2);
+      const time = year + month + day + hour + minute + second;
+      return time;
     },
     changeEngine(val) {
       let obj = {};
-      obj = this.engineModelOption.find((item) => {
+      obj = this.engineOptions.find((item) => {
         return item.id === val;
       });
-      this.form.geometryFiles = obj.geometryFiles
-      this.form.geometryImage = obj.geometryImage
-      this.batchOption = this.measureBatchOption.filter(item => { return item.engineId === val })
+      this.form.geometryFiles = obj?.geometryFiles
+      this.form.geometryImage = obj?.geometryImage
+      this.batchOption = this.measureBatchOptions.filter(item => { return item.engineModel === val })
     },
     addCalTemp() {
       this.resetCalTempForm()
@@ -584,9 +751,13 @@ export default {
     },
     // 环境参数保存
     envDataSave() {
-      if (this.$refs.formData.validate()) {
-        this.$emit('env-data-save', this.$refs["form"])
-      }
+      this.$refs.formData.validate()
+        .then(()=>{
+          this.$emit('env-data-save', this.$refs["form"])
+        })
+        .catch((err) => {
+          this.$message.error(`检验错误!`);
+        });
 
     },
     validateAll() {
@@ -600,23 +771,10 @@ export default {
     submitForm() {
       this.validateAll()
         .then(() => {
-          // console.log("11", this.TransmittanceForm, this.TransmittanceFlag);
-          if (!this.isObjectEqual(this.formFlag, this.form)) {
-            this.changeFlag.push(1)
-          }
-          if (!this.isObjectEqual(this.radiationFlag, this.radiationForm)) {
-            this.changeFlag.push(2)
-          }
-          if (!this.isObjectEqual(this.TIFlag, this.TIForm)) {
-            this.changeFlag.push(3)
-          }
-          if (!this.isObjectEqual(this.TransmittanceFlag, this.TransmittanceForm)) {
-            this.changeFlag.push(4)
-          }
-          this.$emit('submit-form', this.$refs, this.changeFlag);
+          this.$emit('submit-form');
         })
         .catch((err) => {
-          console.log('出现错误', err);
+          this.$message.error(`检验错误!`);
         });
     },
     isObjectEqual(obj1, obj2) {
@@ -696,7 +854,6 @@ export default {
           }
         })
       }
-      console.log("customName", customName);
       // delete data1[Object.keys(data1)[0]]
       customName.forEach((item, index) => {
         if (index === 0) return
@@ -717,7 +874,6 @@ export default {
           },)
         }
       })
-      console.log("11", Object.values(customName[0]));
       const chartData = {
         tooltip: {
           trigger: "axis",
@@ -746,7 +902,6 @@ export default {
     },
     handleHeatmapChart(data) {
       this.chartType = "heatmap";
-      // console.log("data",data);
       let dataSet = [],
         xData = [],
         yData = [];
@@ -769,7 +924,6 @@ export default {
           y = 0;
         }
       }
-      console.log("dataSet", dataSet);
       const chartData = {
         tooltip: {},
         xAxis: {

+ 7 - 8
meas_web/src/views/meas/dataResults/index.vue

@@ -6,7 +6,7 @@
           @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="发动机型号" prop="model">
-        <el-input v-model="queryParams.model" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
+        <el-input v-model="queryParams.engineModel" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="发动机状态" prop="engineStatus">
         <el-select v-model="queryParams.engineStatus" placeholder="请选择发动机状态" clearable>
@@ -54,7 +54,7 @@
     <el-table v-loading="loading" :data="dataResultsList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="测量批次" align="center" prop="measurementBatch" />
-      <el-table-column label="发动机型号" align="center" prop="model" />
+      <el-table-column label="发动机型号" align="center" prop="engineModel" />
       <el-table-column label="发动机状态" align="center" prop="engineStatus">
       </el-table-column>
       <el-table-column label="发动机角度" align="center" prop="angle">
@@ -75,7 +75,7 @@
 
     <!-- 添加或修改数据结果对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
-      <dialogContent :form="form" :isCheck="isCheck" />
+      <dialogContent :form="form" :isCheck="isCheck"/>
       <el-row type="flex" justify="space-around">
         <el-button size="mini" type="success" style="margin-top: 20px">计算数据</el-button>
       </el-row>
@@ -149,11 +149,10 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        measurementBatchId: null,
-        specIrr1: null,
-        specIrr2: null,
-        specBandIrr1: null,
-        specBandIrr2: null,
+        measurementBatch: null,
+        engineModel: null,
+        engineStatus: null,
+        angle: null,
       },
       // 表单参数
       form: {},

+ 1 - 3
meas_web/src/views/meas/engineModel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px" @submit.native.prevent>
       <el-form-item label="发动机型号" prop="model">
         <el-input
           v-model="queryParams.model"
@@ -155,8 +155,6 @@ export default {
         pageNum: 1,
         pageSize: 10,
         model: null,
-        geometryFiles: null,
-        geometryImage: null,
       },
       // 表单参数
       form: {},

+ 133 - 292
meas_web/src/views/meas/envData/index.vue

@@ -5,8 +5,9 @@
         <el-input v-model="queryParams.measurementBatch" placeholder="请输入测量批次" clearable
           @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="发动机型号" prop="model" label-width="90px">
-        <el-input v-model="queryParams.model" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
+      <el-form-item label="发动机型号" prop="engineModel" label-width="90px">
+        <el-input v-model="queryParams.engineModel" placeholder="请输入发动机型号" clearable
+          @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="发动机状态" prop="engineStatus" label-width="90px">
         <el-select v-model="queryParams.engineStatus" placeholder="请选择发动机状态" clearable>
@@ -47,7 +48,7 @@
     <el-table v-loading="loading" :data="envDataList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="测量批次" align="center" prop="measurementBatch" />
-      <el-table-column label="发动机型号" align="center" prop="model" />
+      <el-table-column label="发动机型号" align="center" prop="engineModel" />
       <el-table-column label="发动机状态" align="center" prop="engineStatus" />
       <el-table-column label="发动机角度" align="center" prop="angle" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -68,75 +69,9 @@
     <!-- 添加或修改测量环境数据对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
       <dialogContent ref="dialogContent" :form="form" :TIForm="TIForm" :TransmittanceForm="TransmittanceForm"
-        :envSaveBtn="true" :radiationForm="radiationForm" :isCheck="isCheck" :addFlag="addFlag"
-        :engineModelList="engineOptions" :measureBatchList="measureBatchOptions" :angleList="angleOptions"
-        :engineStatusList="engineStatusOptions" @env-data-save="envDataSave" @on-click-btn="onClickBtn"
+        :envSaveBtn="true" :radiationForm="radiationForm" :isCheck="isCheck" :addFlag="addFlag" @env-data-save="envDataSave"
         @submit-form="submitForm" @cancel="cancel" />
     </el-dialog>
-    <el-dialog :close-on-click-modal="false" title="增加发动机型号" :visible.sync="addDialogVisible" width="400px"
-      append-to-body>
-      <el-form ref="addEngineForm" :model="addEngineForm" :disabled="isCheck" :rules="rules" label-width="100px">
-        <el-form-item label="发动机型号" prop="model">
-          <el-input v-model="addEngineForm.model" placeholder="请输入发动机型号" />
-        </el-form-item>
-        <el-form-item label="几何模型文件" prop="geometryFiles">
-          <file-upload :fileSize="0" :limit="1" :fileType="['x_t', 'str']" v-model="addEngineForm.geometryFiles" />
-        </el-form-item>
-        <el-form-item label="几何模型图片" prop="geometryImage">
-          <image-upload :fileSize="0" :limit="1" :fileType="['jpg']" v-model="addEngineForm.geometryImage" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addEngine()">确 定</el-button>
-        <el-button @click="addDialogVisible = false">取 消</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog :close-on-click-modal="false" title="增加测量批次" :visible.sync="addMeasVisible" width="400px" append-to-body>
-      <el-form ref="form" :model="addMeasBatchForm" :rules="rules" label-width="110px">
-        <el-form-item label="发动机型号" prop="engineId">
-          <el-select v-model="addMeasBatchForm.engineId" placeholder="请选择发动机型号" @change="engineChange">
-            <el-option v-for="item in engineOptions" :key="item.id" :label="item.model" :value="item.id">
-              <span style="float: left">{{ item.id }}</span>
-              <span style="float: right; color: #8492a6; font-size: 13px">{{ item.model }}</span>
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="测量批次" prop="measurementBatch">
-          <el-input v-model="addMeasBatchForm.measurementBatch" placeholder="请输入测量批次(测量年月日+发动机型号)" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addMeas()">确 定</el-button>
-        <el-button @click="addMeasVisible = false">取 消</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog :close-on-click-modal="false" title="增加发动机状态" :visible.sync="addStatusVisible" width="400px"
-      append-to-body>
-      <el-form ref="addStatusForm" :model="addStatusForm" :rules="rules" label-width="80px">
-        <el-form-item label="状态" prop="status">
-          <el-input v-model="addStatusForm.status" placeholder="请输入状态" />
-        </el-form-item>
-        <el-form-item label="排序" prop="index">
-          <el-input v-model="addStatusForm.index" placeholder="请输入排序" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addStatus()">确 定</el-button>
-        <el-button @click="addStatusVisible = false">取 消</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog :close-on-click-modal="false" title="增加发动机角度" :visible.sync="addAngleVisible" width="400px"
-      append-to-body>
-      <el-form ref="addAngleForm" :model="addAngleForm" :rules="rules" label-width="80px">
-        <el-form-item label="角度" prop="angle">
-          <el-input v-model="addAngleForm.angle" placeholder="请输入角度" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addAngle()">确 定</el-button>
-        <el-button @click="addAngleVisible = false">取 消</el-button>
-      </div>
-    </el-dialog>
 
   </div>
 </template>
@@ -204,26 +139,14 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
-      addDialogVisible: false,
-      addMeasVisible: false,
-      addStatusVisible: false,
-      addAngleVisible: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        measurementBatchId: null,
+        measurementBatch: null,
+        engineModel: null,
         engineStatus: null,
         angle: null,
-        turbinePostTemp: null,
-        testDistance: null,
-        time: null,
-        location: null,
-        atmosPress: null,
-        temperature: null,
-        windSpeed: null,
-        humidity: null,
-        concentration: null,
       },
       isCheck: false,
       // 表单参数
@@ -244,22 +167,6 @@ export default {
       measureBatchOptions: [],
       engineOptions: [],
       engineModel: "",
-      addMeasBatchForm: {
-        engineId: null,
-        measurementBatch: null,
-      },
-      addEngineForm: {
-        model: null,
-        geometryFiles: null,
-        geometryImage: null
-      },
-      addStatusForm: {
-        status: null,
-        index: null
-      },
-      addAngleForm: {
-        angle: null
-      },
       fileShowData: [],
       disabled: false,
       addFlag: false,
@@ -268,8 +175,6 @@ export default {
   },
   created() {
     this.getList();
-    this.getListEngineModel();
-    this.getListMeasBatch();
     this.getAngleOption();
     this.getStatusOption();
   },
@@ -283,24 +188,6 @@ export default {
         this.loading = false;
       });
     },
-    // 获取发电机List
-    getListEngineModel() {
-      this.loading = true;
-      const data = {};
-      listEngineModel(data).then((response) => {
-        this.engineOptions = response.rows;
-        this.loading = false;
-      });
-    },
-    // 获取测量批次List
-    getListMeasBatch() {
-      const data = {};
-      this.loading = true;
-      listMeasBatch(data).then((response) => {
-        this.measureBatchOptions = response.rows;
-        this.loading = false;
-      });
-    },
     // 获取角度Option
     getAngleOption() {
       this.loading = true;
@@ -333,92 +220,42 @@ export default {
         addEnvData(this.form).then((response) => {
           this.$modal.msgSuccess("新增成功");
           this.addFlag = false
+          // this.handleUpdate(response.data)
+          this.radiationReset();
+          this.TIFormReset();
+          this.transmittanceReset()
+          this.radiationForm.measurementBatchId = response.data.id
+          this.TIForm.measurementBatchId = response.data.id
+          this.TransmittanceForm.measurementBatchId = response.data.id
           this.getList();
-          getEnvData(response.data.measurementBatchId).then((response) => {
-            this.form = response.data;
-          });
+          // getEnvData(response.data.measurementBatchId).then((response) => {
+          //   this.form = response.data;
+          // });
         });
       }
     },
-    // 点击增加按钮
-    onClickBtn(type) {
-      if (type === "engine") this.addDialogVisible = true;
-      else if (type === "measBatch") this.addMeasVisible = true;
-      else if (type === "engineStatus") this.addStatusVisible = true;
-      else if (type === "engineAngle") this.addAngleVisible = true;
-    },
-    engineChange(val) {
-      let obj = {};
-      obj = this.engineOptions.find((item) => {
-        return item.id === val;
-      });
-      this.addMeasBatchForm.measurementBatch = this.getTime() + '-' + obj.model
-    },
-    getTime() {
-      const now = new Date();
-      const year = now.getFullYear();
-      const month = ('0' + (now.getMonth() + 1)).slice(-2);
-      const day = ('0' + now.getDate()).slice(-2);
-      const hour = ('0' + now.getHours()).slice(-2);
-      const minute = ('0' + now.getMinutes()).slice(-2);
-      const second = ('0' + now.getSeconds()).slice(-2);
-      const time = year + month + day + hour + minute + second;
-      return time;
-    },
-    // 增加发动机型号
-    addEngine() {
-      this.loading = true;
-      addEngineModel(this.addEngineForm).then((response) => {
-        this.$modal.msgSuccess("新增成功");
-        this.addDialogVisible = false;
-        this.getListEngineModel();
-        this.addEngineForm = {
-          model: null,
-          geometryFiles: null,
-          geometryImage: null
-        };
-      });
-    },
-    // 增加测量批次
-    addMeas() {
-      addMeasBatch(this.addMeasBatchForm).then((response) => {
-        this.$modal.msgSuccess("新增成功");
-        this.addMeasVisible = false;
-        this.getListMeasBatch();
-        this.addMeasBatchForm = {
-          engineId: null,
-          measurementBatch: null,
-        };
-      });
-    },
-    // 增加状态
-    addStatus() {
-      addStatus(this.addStatusForm).then((response) => {
-        this.$modal.msgSuccess("新增成功");
-        this.addStatusVisible = false;
-        this.getStatusOption();
-        this.addStatusForm = {
-          status: null,
-          index: null
-        }
-      });
-    },
-    // 增加角度
-    addAngle() {
-      addAngle(this.addAngleForm).then((response) => {
-        this.$modal.msgSuccess("新增成功");
-        this.getAngleOption();
-        this.addAngleVisible = false;
-        this.addAngleForm = {
-          angle: null
-        }
-      });
-    },
     // 表单重置
     reset() {
-      this.form = {
+      this.formReset();
+      this.radiationReset();
+      this.TIFormReset();
+      this.transmittanceReset();
+    },
+    // form表单重置
+    formReset() {
+      this.form =
+      {
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
         id: null,
         measurementBatchId: null,
+        measurementBatch: null,
+        engineModel: null,
+        geometryFiles: null,
+        geometryImage: null,
         engineStatus: null,
         angle: null,
         turbinePostTemp: null,
@@ -429,13 +266,14 @@ export default {
         temperature: null,
         windSpeed: null,
         humidity: null,
-        concentration: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-      };
+        concentration: null
+      }
+      this.resetForm("form");
+    },
+    // radiation表单重置
+    radiationReset() {
       this.radiationForm = {
+        measurementBatchId: null,
         model: null,
         lensFView: null,
         gain: null,
@@ -445,8 +283,12 @@ export default {
         rawData: null,
         radiance1: null,
         radiance2: null,
-      };
+      }
+      this.resetForm("radiationReset");
+    },
+    TIFormReset() {
       this.TIForm = {
+        measurementBatchId: null,
         model: null,
         lensFView: null,
         filterNo: null,
@@ -458,14 +300,15 @@ export default {
         radIllumination: null,
         radTemp: null,
       };
+      this.resetForm("TIForm");
+    },
+    transmittanceReset() {
       this.TransmittanceForm = {
+        measurementBatchId: null,
         rawData: null,
         curve1: null,
-        curve2: null,
+        curve2: null
       };
-      this.resetForm("form");
-      this.resetForm("radiationForm");
-      this.resetForm("TIForm");
       this.resetForm("TransmittanceForm");
     },
     /** 搜索按钮操作 */
@@ -491,6 +334,9 @@ export default {
       this.addFlag = true
       this.open = true;
       this.title = "添加测量环境数据";
+      this.radiationForm = null
+      this.TIForm = null
+      this.TransmittanceForm = null
     },
     checkView(row) {
       this.handleUpdate(row)
@@ -502,99 +348,94 @@ export default {
       this.reset();
       this.isCheck = false
       this.addFlag = false
-      const id = row.measurementBatchId;
+      const id = row.id;
       getRadiationByEnvData(id).then((response) => {
-        this.radiationForm = response.data;
-      });
-      getTIDataByEnvData(id).then((response) => {
-        this.TIForm = response.data;
-      });
-      getTRateByEnvData(id).then((response) => {
-        this.TransmittanceForm = response.data;
-      });
-      getEnvData(row.id).then((response) => {
-        this.form = response.data;
-        this.open = true;
-        this.title = this.isCheck ? '查看测量环境数据' : "修改测量环境数据";
-      });
-    },
-    /** 提交按钮 */
-    submitForm(value, changeFlag) {
-      console.log("changeFlag", changeFlag);
-      if (changeFlag.includes(1)) {
-        if (this.form.id != null) {
-          updateEnvData(this.form).then((response) => {
-            this.$modal.msgSuccess("修改测量环境数据成功");
-            this.open = false;
-            this.getList();
-          });
+        if (response.data) {
+          this.radiationForm = response.data;
         } else {
-          addEnvData(this.form).then((response) => {
-            this.$modal.msgSuccess("新增测量环境数据成功");
-            this.open = false;
-            this.getList();
-          });
+          this.radiationReset()
+          this.radiationForm.measurementBatchId = id
         }
-      }
-      if (changeFlag.includes(2)) {
-        if (this.radiationForm.id != null) {
-          updateRadiation(this.radiationForm).then(response => {
-            this.$modal.msgSuccess("修改光谱辐射数据成功");
-            this.open = false;
-            this.getList();
-          });
+      });
+      getTIDataByEnvData(id).then((response) => {
+        if (response.data) {
+          this.TIForm = response.data;
         } else {
-          addRadiation(this.radiationForm).then(response => {
-            this.$modal.msgSuccess("新增光谱辐射数据成功");
-            this.open = false;
-            this.getList();
-          });
+          this.TIFormReset()
+          this.TIForm.measurementBatchId = id
         }
-      }
-      if (changeFlag.includes(3)) {
-        if (this.TIForm.id != null) {
-          updateThermalImagerTesDdata(this.TIForm).then(response => {
-            this.$modal.msgSuccess("修改热像仪数据成功");
-            this.open = false;
-            this.getList();
-          });
+      });
+      getTRateByEnvData(id).then((response) => {
+        if (response.data) {
+          this.TransmittanceForm = response.data;
         } else {
-          addThermalImagerTesDdata(this.TIForm).then(response => {
-            this.$modal.msgSuccess("新增热像仪数据成功");
-            this.open = false;
-            this.getList();
-          });
+          this.transmittanceReset()
+          this.TransmittanceForm.measurementBatchId = id
         }
-      }
-      if (changeFlag.includes(4)) {
-        if (this.TransmittanceForm.id != null) {
-          updateTransmissionRate(this.TransmittanceForm).then(response => {
-            this.$modal.msgSuccess("修改透过率数据成功");
-            this.open = false;
-            this.getList();
-          });
+      });
+      getEnvData(row.id).then((response) => {
+        if (response.data) {
+          this.form = response.data;
+          this.open = true;
+          this.title = this.isCheck ? '查看测量环境数据' : "修改测量环境数据";
         } else {
-          addTransmissionRate(this.TransmittanceForm).then(response => {
-            this.$modal.msgSuccess("新增透过率数据成功");
-            this.open = false;
-            this.getList();
-          });
+          this.formReset()
         }
-      }
-
+      });
     },
-    objectsAreEqual(obj1, obj2) {
-      const obj1Keys = Object.keys(obj1);
-      const obj2Keys = Object.keys(obj2);
-      if (obj1Keys.length !== obj2Keys.length) {
-        return false;
-      }
-      for (let key of obj1Keys) {
-        if (obj1[key] !== obj2[key]) {
-          return false;
-        }
-      }
-      return true;
+    /** 提交按钮 */
+    submitForm() {
+      const promises = [];
+      let successMessages = [];
+      let failureMessages = [];
+      promises.push(
+        (this.form.id ? updateEnvData(this.form) : addEnvData(this.form))
+          .then(() => {
+            successMessages.push(`测量环境数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`测量环境数据`);
+          }),
+        (this.radiationForm.id ? updateRadiation(this.radiationForm) : addRadiation(this.radiationForm))
+          .then(() => {
+            successMessages.push(`光谱辐射数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`光谱辐射数据`);
+          }),
+        (this.TIForm.id ? updateThermalImagerTesDdata(this.TIForm) : addThermalImagerTesDdata(this.TIForm))
+          .then(() => {
+            successMessages.push(`热像仪数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`热像仪数据`);
+          }),
+        (this.TransmittanceForm.id ? updateTransmissionRate(this.TransmittanceForm) : addTransmissionRate(this.TransmittanceForm))
+          .then(() => {
+            successMessages.push(`透过率数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`透过率数据`);
+          })
+      );
+      Promise.all(promises)
+        .then(() => {
+          let message = ''
+          if (successMessages.length > 0) {
+            message += `${successMessages.join('、')}操作成功; `
+            this.$modal.msgSuccess(message);
+          }
+          if (failureMessages.length > 0) {
+            message += `${failureMessages.join('、')}操作失败`
+            this.$modal.msgWarning(message);
+          }
+          this.open = false;
+          this.getList();
+        })
+        .catch(() => {
+          this.$modal.msgError("操作过程中发生了错误");
+          this.open = false;
+        });
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 1 - 1
meas_web/src/views/meas/measBatch/index.vue

@@ -166,7 +166,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        engineId: null,
+        engineModel: null,
         measurementBatch: null,
       },
       // 表单参数

+ 66 - 61
meas_web/src/views/meas/radiation/index.vue

@@ -5,8 +5,8 @@
         <el-input v-model="queryParams.measurementBatch" placeholder="请输入测量批次" clearable
           @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="发动机型号" prop="model">
-        <el-input v-model="queryParams.model" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
+      <el-form-item label="发动机型号" prop="engineModel">
+        <el-input v-model="queryParams.engineModel" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="发动机状态" prop="engineStatus">
         <el-select v-model="queryParams.engineStatus" placeholder="请选择发动机状态" clearable>
@@ -44,9 +44,9 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="测量批次" align="center" prop="measurementBatch" />
       <el-table-column label="发动机型号" align="center" prop="engineModel" />
-      <el-table-column label="发动机状态" align="center" prop="engineStatus"/>
-      <el-table-column label="发动机角度" align="center" prop="angle"/>
-      <el-table-column label="型号" align="center" prop="model" />
+      <el-table-column label="发动机状态" align="center" prop="engineStatus" />
+      <el-table-column label="发动机角度" align="center" prop="angle" />
+      <el-table-column label="型号" align="center" prop="engineModel" />
       <el-table-column label="镜头视场角" align="center" prop="lensFView" />
       <el-table-column label="增益" align="center" prop="gain" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -65,14 +65,15 @@
       @pagination="getList" />
 
     <!-- 添加或修改光谱辐射对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body >
-      <dialogContent :radiationForm="radiationForm" @submit-form="submitForm" :form="form" @cancel="cancel" :isCheck="isCheck"/>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
+      <dialogContent ref="radiationContent" :radiationForm="radiationForm" @submit-form="submitForm" :form="form" @cancel="cancel"
+        :isCheck="isCheck" />
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { listRadiation, getRadiation, delRadiation,updateRadiation,addRadiation,getRadiationByEnvData } from "@/api/meas/radiation";
+import { listRadiation, getRadiation, delRadiation, updateRadiation, addRadiation, getRadiationByEnvData } from "@/api/meas/radiation";
 import { angleOption } from "@/api/meas/angle";
 import { statusOption } from "@/api/meas/status";
 import dialogContent from "@/views/meas/components/dialogContent";
@@ -105,25 +106,19 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        measurementBatchId: null,
-        model: null,
-        lensFView: null,
-        gain: null,
-        backgroundData: null,
-        calTemp: null,
-        calCurve: null,
-        rawData: null,
-        radiance1: null,
-        radiance2: null,
+        measurementBatch: null,
+        engineModel: null,
+        engineStatus: null,
+        angle: null,
       },
       // 表单参数
-      form:{},
+      form: {},
       radiationForm: {},
       // 发动机状态
       engineStatusOptions: [],
       // 发动机角度
       angleOptions: [],
-      isCheck:false,
+      isCheck: false,
     };
   },
   created() {
@@ -163,8 +158,19 @@ export default {
     // 表单重置
     reset() {
       this.radiationForm = {
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
         id: null,
         measurementBatchId: null,
+        engineModel: null,
+        geometryFiles: null,
+        geometryImage: null,
+        measurementBatch: null,
+        engineStatus: null,
+        angle: null,
         model: null,
         lensFView: null,
         gain: null,
@@ -173,17 +179,13 @@ export default {
         calCurve: null,
         rawData: null,
         radiance1: null,
-        radiance2: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null
+        radiance2: null
       };
       this.resetForm("radiationForm");
     },
-    checkView(row){
+    checkView(row) {
       this.handleUpdate(row)
-      this.isCheck=true
+      this.isCheck = true
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -212,45 +214,48 @@ export default {
       getRadiationByEnvData(id).then(response => {
         this.radiationForm = response.data;
         this.open = true;
-        this.title = this.isCheck?'查看光谱辐射数据':"修改光谱辐射数据";
+        this.title = this.isCheck ? '查看光谱辐射数据' : "修改光谱辐射数据";
       });
     },
     /** 提交按钮 */
-    submitForm(value,changeFlag) {
-      value['formData'].validate((valid) => {
-        if (valid && changeFlag.includes(1)) {
-          if (this.form.id!= null) {
-            updateEnvData(this.form).then((response) => {
-              this.$modal.msgSuccess("修改测量环境数据成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addEnvData(this.form).then((response) => {
-              this.$modal.msgSuccess("新增测量环境数据成功");
-              this.open = false;
-              this.getList();
-            });
+    submitForm() {
+      const promises = [];
+      let successMessages = [];
+      let failureMessages = [];
+      promises.push(
+        (this.form.id ? updateEnvData(this.form) : addEnvData(this.form))
+          .then(() => {
+            successMessages.push(`测量环境数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`测量环境数据`);
+          }),
+        (this.radiationForm.id ? updateRadiation(this.radiationForm) : addRadiation(this.radiationForm))
+          .then(() => {
+            successMessages.push(`光谱辐射数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`光谱辐射数据`);
+          })
+      );
+      Promise.all(promises)
+        .then(() => {
+          let message = ''
+          if (successMessages.length > 0) {
+            message += `${successMessages.join('、')}操作成功; `
+            this.$modal.msgSuccess(message);
           }
-        }
-      });
-      value["radiationData"].validate(valid => {
-        if (valid) {
-          if (this.radiationForm.id != null) {
-            updateRadiation(this.radiationForm).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addRadiation(this.radiationForm).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+          if (failureMessages.length > 0) {
+            message += `${failureMessages.join('、')}操作失败`
+            this.$modal.msgWarning(message);
           }
-        }
-      });
+          this.open = false;
+          this.getList();
+        })
+        .catch(() => {
+          this.$modal.msgError("操作过程中发生了错误");
+          this.open = false;
+        });
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 56 - 36
meas_web/src/views/meas/thermalImagerTesDdata/index.vue

@@ -5,8 +5,8 @@
         <el-input v-model="queryParams.measurementBatch" placeholder="请输入测量批次" clearable
           @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="发动机型号" prop="model">
-        <el-input v-model="queryParams.model" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
+      <el-form-item label="发动机型号" prop="engineModel">
+        <el-input v-model="queryParams.engineModel" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="发动机状态" prop="engineStatus">
         <el-select v-model="queryParams.engineStatus" placeholder="请选择发动机状态" clearable>
@@ -66,7 +66,7 @@
       <el-table-column label="发动机型号" align="center" prop="engineModel" />
       <el-table-column label="发动机状态" align="center" prop="engineStatus"/>
       <el-table-column label="发动机角度" align="center" prop="angle"/>
-      <el-table-column label="型号" align="center" prop="model" />
+      <el-table-column label="型号" align="center" prop="engineModel" />
       <el-table-column label="镜头视场角" align="center" prop="lensFView" />
       <el-table-column label="滤镜编号" align="center" prop="filterNo" />
       <el-table-column label="帧率" align="center" prop="fps" />
@@ -142,17 +142,10 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        measurementBatchId: null,
-        model: null,
-        lensFView: null,
-        filterNo: null,
-        fps: null,
-        spectralBand: null,
-        integrationTime: null,
-        tempCal: null,
-        radiance: null,
-        radIllumination: null,
-        radTemp: null,
+        measurementBatch: null,
+        engineModel: null,
+        engineStatus: null,
+        angle: null,
       },
       // 表单参数
       form: {},
@@ -201,8 +194,19 @@ export default {
     // 表单重置
     reset() {
       this.TIForm = {
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
         id: null,
         measurementBatchId: null,
+        engineModel: null,
+        geometryFiles: null,
+        geometryImage: null,
+        measurementBatch: null,
+        engineStatus: null,
+        angle: null,
         model: null,
         lensFView: null,
         filterNo: null,
@@ -212,11 +216,7 @@ export default {
         tempCal: null,
         radiance: null,
         radIllumination: null,
-        radTemp: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null
+        radTemp: null
       };
       this.resetForm("TIForm");
     },
@@ -261,24 +261,44 @@ export default {
       });
     },
     /** 提交按钮 */
-    submitForm(value) {
-      value["TIData"].validate(valid => {
-        if (valid) {
-          if (this.TIForm.id != null) {
-            updateThermalImagerTesDdata(this.TIForm).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          }else {
-            addThermalImagerTesDdata(this.TIForm).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+    submitForm() {
+      const promises = [];
+      let successMessages = [];
+      let failureMessages = [];
+      promises.push(
+        (this.form.id ? updateEnvData(this.form) : addEnvData(this.form))
+          .then(() => {
+            successMessages.push(`测量环境数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`测量环境数据`);
+          }),
+        (this.TIForm.id ? updateThermalImagerTesDdata(this.TIForm) : addThermalImagerTesDdata(this.TIForm))
+          .then(() => {
+            successMessages.push(`热像仪数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`热像仪数据`);
+          })
+      );
+      Promise.all(promises)
+        .then(() => {
+          let message = ''
+          if (successMessages.length > 0) {
+            message += `${successMessages.join('、')}操作成功; `
+            this.$modal.msgSuccess(message);
           }
-        }
-      });
+          if (failureMessages.length > 0) {
+            message += `${failureMessages.join('、')}操作失败`
+            this.$modal.msgWarning(message);
+          }
+          this.open = false;
+          this.getList();
+        })
+        .catch(() => {
+          this.$modal.msgError("操作过程中发生了错误");
+          this.open = false;
+        });
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 55 - 28
meas_web/src/views/meas/transmissionRate/index.vue

@@ -5,8 +5,8 @@
         <el-input v-model="queryParams.measurementBatch" placeholder="请输入测量批次" clearable
           @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="发动机型号" prop="model">
-        <el-input v-model="queryParams.model" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
+      <el-form-item label="发动机型号" prop="engineModel">
+        <el-input v-model="queryParams.engineModel" placeholder="请输入发动机型号" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="发动机状态" prop="engineStatus">
         <el-select v-model="queryParams.engineStatus" placeholder="请选择发动机状态" clearable>
@@ -128,10 +128,10 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        measurementBatchId: null,
-        rawData: null,
-        curve1: null,
-        curve2: null,
+        measurementBatch: null,
+        engineModel: null,
+        engineStatus: null,
+        angle: null,
       },
       // 表单参数
       form: {},
@@ -180,15 +180,22 @@ export default {
     // 表单重置
     reset() {
       this.TransmittanceForm = {
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
         id: null,
         measurementBatchId: null,
+        engineModel: null,
+        geometryFiles: null,
+        geometryImage: null,
+        measurementBatch: null,
+        engineStatus: null,
+        angle: null,
         rawData: null,
         curve1: null,
-        curve2: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null
+        curve2: null
       };
       this.resetForm("TransmittanceForm");
     },
@@ -227,24 +234,44 @@ export default {
       });
     },
     /** 提交按钮 */
-    submitForm(value) {
-      value["TransmittanceData"].validate(valid => {
-        if (valid) {
-          if (this.TransmittanceForm.id != null) {
-            updateTransmissionRate(this.TransmittanceForm).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addRadiation(this.TransmittanceForm).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+    submitForm() {
+      const promises = [];
+      let successMessages = [];
+      let failureMessages = [];
+      promises.push(
+        (this.form.id ? updateEnvData(this.form) : addEnvData(this.form))
+          .then(() => {
+            successMessages.push(`测量环境数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`测量环境数据`);
+          }),
+        (this.TransmittanceForm.id ? updateTransmissionRate(this.TransmittanceForm) : addTransmissionRate(this.TransmittanceForm))
+          .then(() => {
+            successMessages.push(`透过率数据`);
+          })
+          .catch(() => {
+            failureMessages.push(`透过率数据`);
+          })
+      );
+      Promise.all(promises)
+        .then(() => {
+          let message = ''
+          if (successMessages.length > 0) {
+            message += `${successMessages.join('、')}操作成功; `
+            this.$modal.msgSuccess(message);
           }
-        }
-      });
+          if (failureMessages.length > 0) {
+            message += `${failureMessages.join('、')}操作失败`
+            this.$modal.msgWarning(message);
+          }
+          this.open = false;
+          this.getList();
+        })
+        .catch(() => {
+          this.$modal.msgError("操作过程中发生了错误");
+          this.open = false;
+        });
     },
     /** 删除按钮操作 */
     handleDelete(row) {