Rmengdi 10 сар өмнө
parent
commit
b0fa47cc08
33 өөрчлөгдсөн 501 нэмэгдсэн , 335 устгасан
  1. 1 1
      meas_web/src/components/ImageUpload/index.vue
  2. 1 1
      meas_web/src/components/RightToolbar/index.vue
  3. 1 1
      meas_web/src/utils/generator/html.js
  4. 1 1
      meas_web/src/views/meas/angle/index.vue
  5. 226 35
      meas_web/src/views/meas/components/dialogContent.vue
  6. 17 9
      meas_web/src/views/meas/dataResults/index.vue
  7. 1 1
      meas_web/src/views/meas/engineModel/index.vue
  8. 27 19
      meas_web/src/views/meas/envData/ECharts.vue
  9. 89 210
      meas_web/src/views/meas/envData/index.vue
  10. 1 1
      meas_web/src/views/meas/measBatch/index.vue
  11. 51 12
      meas_web/src/views/meas/radiation/index.vue
  12. 1 1
      meas_web/src/views/meas/status/index.vue
  13. 30 9
      meas_web/src/views/meas/thermalImagerTesDdata/index.vue
  14. 31 10
      meas_web/src/views/meas/transmissionRate/index.vue
  15. 3 3
      meas_web/src/views/monitor/job/index.vue
  16. 1 1
      meas_web/src/views/monitor/job/log.vue
  17. 1 1
      meas_web/src/views/monitor/operlog/index.vue
  18. 1 1
      meas_web/src/views/system/config/index.vue
  19. 1 1
      meas_web/src/views/system/dept/index.vue
  20. 1 1
      meas_web/src/views/system/dict/data.vue
  21. 1 1
      meas_web/src/views/system/dict/index.vue
  22. 1 1
      meas_web/src/views/system/menu/index.vue
  23. 1 1
      meas_web/src/views/system/notice/index.vue
  24. 1 1
      meas_web/src/views/system/post/index.vue
  25. 2 2
      meas_web/src/views/system/role/index.vue
  26. 1 1
      meas_web/src/views/system/role/selectUser.vue
  27. 2 2
      meas_web/src/views/system/user/index.vue
  28. 1 1
      meas_web/src/views/system/user/profile/userAvatar.vue
  29. 1 2
      meas_web/src/views/tool/build/CodeTypeDialog.vue
  30. 1 1
      meas_web/src/views/tool/build/IconsDialog.vue
  31. 1 1
      meas_web/src/views/tool/gen/createTable.vue
  32. 1 1
      meas_web/src/views/tool/gen/importTable.vue
  33. 1 1
      meas_web/src/views/tool/gen/index.vue

+ 1 - 1
meas_web/src/components/ImageUpload/index.vue

@@ -28,7 +28,7 @@
       的文件
     </div>
 
-    <el-dialog
+    <el-dialog :close-on-click-modal="false"
       :visible.sync="dialogVisible"
       title="预览"
       width="800"

+ 1 - 1
meas_web/src/components/RightToolbar/index.vue

@@ -21,7 +21,7 @@
         </el-dropdown>
       </el-tooltip>
     </el-row>
-    <el-dialog :title="title" :visible.sync="open" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" append-to-body>
       <el-transfer
         :titles="['显示', '隐藏']"
         v-model="value"

+ 1 - 1
meas_web/src/utils/generator/html.js

@@ -5,7 +5,7 @@ let confGlobal
 let someSpanIsNot24
 
 export function dialogWrapper(str) {
-  return `<el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="Dialog Title">
+  return `<el-dialog  v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="Dialog Title">
     ${str}
     <div slot="footer">
       <el-button @click="close">取消</el-button>

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

@@ -126,7 +126,7 @@
     />
 
     <!-- 添加或修改角度对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="角度" prop="angle">
           <el-input v-model="form.angle" placeholder="请输入角度" />

+ 226 - 35
meas_web/src/views/meas/components/dialogContent.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-form ref="formData" :model="formData" :rules="rules" size="mini" label-width="80px">
+    <el-form ref="formData" :model="formData" :disabled="checkShow"   size="mini" label-width="80px">
       <el-row type="flex" justify="space-around">
         <el-form-item label="发动机型号" prop="model" label-width="90px">
           <el-select v-model="formData.model" placeholder="请选择发动机型号" @change="changeEngine">
@@ -19,7 +19,7 @@
         </el-form-item>
       </el-row>
     </el-form>
-    <el-form ref="form" :disabled="checkShow" :model="form" :rules="rules" size="mini" label-width="80px">
+    <el-form ref="form" :disabled="checkShow" :model="form"   size="mini" label-width="80px">
       <el-form-item label="测量批次" prop="measurementBatch" style="margin-left: 5%">
         <el-select v-model="formData.measurementBatchId" placeholder="请选择测量批次">
           <el-option v-for="item in batchOption" :key="item.id" :label="item.measurementBatch" :value="item.id">
@@ -34,7 +34,7 @@
     </el-form>
     <div class="box">
       <span class="title">环境参数</span>
-      <el-form :disabled="checkShow" ref="form" :model="form" size="mini" :rules="rules" label-width="80px">
+      <el-form :disabled="checkShow" ref="form" :model="form" size="mini"   label-width="80px">
         <el-row type="flex" justify="space-around">
           <el-form-item label="发动机状态" label-width="100px" prop="engineStatus">
             <el-select v-model="formData.engineStatus" placeholder="请选择发动机状态">
@@ -99,8 +99,8 @@
       </el-form>
     </div>
     <div class="box" v-if="radiationData && Object.keys(radiationData).length > 0">
-      <span class="title">光谱辐射测量数据</span>
-      <el-form :disabled="checkShow || addBtn" ref="radiationData" size="mini" :model="radiationData" :rules="rules"
+      <span class="title">光谱辐射测量数据</span>
+      <el-form :disabled="checkShow || addBtn" ref="radiationData" size="mini" :model="radiationData"  
         label-width="80px">
         <el-row type="flex" justify="space-around">
           <el-form-item label="型号" prop="model">
@@ -124,28 +124,27 @@
           <el-col :span="7"></el-col>
         </el-row>
         <el-row style="margin-left: 2%;" type="flex">
-          <span>{{ calTempData }}</span>
           <el-form-item label="标定温度" prop="calTemp">
-            <el-table :data="calTempData" size="mini" border style="width: 500px">
-              <el-table-column prop="temp" label="温度" align="center">
+            <el-table :data="calTempData" size="mini" border style="width: 600px">
+              <el-table-column prop="temp" label="温度" width="100px" align="center">
               </el-table-column>
               <el-table-column prop="calTempFile" label="文件" align="center">
               </el-table-column>
-              <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+              <el-table-column label="操作" width="100px" align="center" class-name="small-padding fixed-width">
                 <template slot-scope="scope">
-                  <el-button size="mini" type="text" icon="el-icon-delete">删除</el-button>
+                  <el-button size="mini" type="text" icon="el-icon-delete" @click="delCalTemp(scope.row)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
           </el-form-item>
           <el-form-item label="" label-width="10px">
-            <i style="font-size: 1.5rem;margin-top: 10px;" class="el-icon-circle-plus-outline" @click="addCalTemp"></i>
+            <i style="font-size: 1.5rem;margin-top: 10px;" class="el-icon-circle-plus-outline" @click="addCalTemp" v-if="!(checkShow|| addBtn)" ></i>
           </el-form-item>
         </el-row>
       </el-form>
       <div class="box" style="margin-bottom: 15px">
         <span class="title">目标数据</span>
-        <el-form ref="radiationData" :disabled="checkShow || addBtn" size="mini" :model="radiationData" :rules="rules"
+        <el-form ref="radiationData" :disabled="checkShow || addBtn" size="mini" :model="radiationData"  
           label-width="80px">
           <el-row type="flex" justify="space-around">
             <el-form-item label="原始数据" prop="rawData">
@@ -164,7 +163,7 @@
     </div>
     <div class="box" v-if="TIData && Object.keys(TIData).length > 0">
       <span class="title">热像仪测量数据</span>
-      <el-form ref="TIData" :disabled="checkShow || addBtn" :model="TIData" size="mini" :rules="rules"
+      <el-form ref="TIData" :disabled="checkShow || addBtn" :model="TIData" size="mini"  
         label-width="80px">
         <el-row type="flex" justify="space-around">
           <el-form-item label="型号" prop="model">
@@ -223,7 +222,7 @@
     </div>
     <div class="box" v-if="TransmittanceData">
       <span class="title">透过率数据</span>
-      <el-form :disabled="checkShow || addBtn" ref="TransmittanceData" :model="TransmittanceData" :rules="rules"
+      <el-form :disabled="checkShow || addBtn" ref="TransmittanceData" :model="TransmittanceData"  
         label-width="80px">
         <el-row type="flex" justify="space-around">
           <el-form-item label="原始数据" prop="rawData">
@@ -242,15 +241,15 @@
     </div>
     <div v-if="!isCheck" slot="footer" class="dialog-footer">
       <el-button type="primary" @click="submitForm">确 定</el-button>
-      <el-button @click="cancel">取 消</el-button>
+      <el-button @click="cancel" style="margin-left: 40px;">取 消</el-button>
     </div>
-    <el-dialog title="增加标定温度" :visible.sync="addCalTempVisible" width="500px" append-to-body>
-      <el-form ref="calTempForm" :model="calTempForm" :rules="rules" label-width="60px">
+    <el-dialog :close-on-click-modal="false" title="增加标定温度" :visible.sync="addCalTempVisible" width="500px" append-to-body>
+      <el-form ref="calTempForm" :model="calTempForm"   label-width="60px">
         <el-form-item label="温度" prop="temp">
-          <el-input v-model="calTempData.temp" placeholder="请输入温度" />
+          <el-input v-model="calTempForm.temp" placeholder="请输入温度" />
         </el-form-item>
         <el-form-item label="文件" prop="calTempFile">
-          <file-upload :fileSize="0" :limit="1" :fileType="['txt']" v-model="calTempData.calTempFile" />
+          <file-upload :fileSize="0" :limit="1" :fileType="['txt']" v-model="calTempForm.calTempFile" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -258,6 +257,9 @@
         <el-button @click="cancelCalTemp">取 消</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>
   </div>
 </template>
 
@@ -266,8 +268,10 @@ 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 ECharts from "@/views/meas/envData/ECharts.vue";
 export default {
   name: "dialogContent",
+  components: { ECharts },
   props: {
     form: {
       type: Object,
@@ -405,32 +409,40 @@ export default {
         temp: null,
         calTempFile: null,
       },
+      changeFlag:[],
+      chartType: "",
+      fileVisible: false,
+      chartData: {},
     };
   },
   created() {
   },
   watch: {
-    radiationForm: {
+    form: {
       handler(newVal) {
-        this.radiationData = newVal;
+        this.formData = newVal;
+        this.changeFlag.push(1)
       },
       immediate: true
     },
-    form: {
+    radiationForm: {
       handler(newVal) {
-        this.formData = newVal;
+        this.radiationData = newVal;
+        this.changeFlag.push(2)
       },
       immediate: true
     },
     TIForm: {
       handler(newVal) {
         this.TIData = newVal;
+        this.changeFlag.push(3)
       },
       immediate: true
     },
     TransmittanceForm: {
       handler(newVal) {
         this.TransmittanceData = newVal;
+        this.changeFlag.push(4)
       },
       immediate: true
     },
@@ -463,6 +475,11 @@ export default {
       handler(newVal) {
         this.engineStatusOption = newVal;
       },
+    },
+    calTempData: {
+      handler(newVal) {
+        this.radiationForm.calTemp = JSON.stringify(newVal);
+      },
     }
   },
   methods: {
@@ -479,6 +496,17 @@ export default {
         return "";
       }
     },
+    validate(formName,callback){
+      this.$refs[formName].validate((valid) => {
+        callback(valid)
+      })
+    },
+    // 清除验证表单
+    clearcheck(formName){
+      if(this.$refs[formName]){
+        this.$refs[formName].clearValidate()
+      } 
+    },
     // 点击增加按钮
     onClickBtn(type) {
       this.$emit('on-click-btn', type)
@@ -497,9 +525,7 @@ export default {
       this.addCalTempVisible = true
     },
     submitCalTemp() {
-      console.log("this.calTempForm",this.calTempForm);
       this.calTempData.push(this.calTempForm)
-      console.log("this.calTempData",this.calTempData);
       this.addCalTempVisible = false
       this.resetCalTempForm()
     },
@@ -513,26 +539,185 @@ export default {
         calTempFile: null,
       }
     },
+    delCalTemp(row){
+      this.calTempData = this.calTempData.filter(item=> {
+        return item !== row
+      });
+    },
     // 环境参数保存
     envDataSave() {
-      console.log("this.$refs", this.$refs["form"]);
       this.$emit('env-data-save', this.$refs["form"])
     },
     submitForm() {
-      this.$emit('submit-form', this.$refs)
+      this.$emit('submit-form', this.$refs,this.changeFlag)
     },
     cancel() {
       this.$emit('cancel')
     },
-    fileView() {
-      this.$emit('fileView')
+    // 查看文件可视化
+    fileView(url1) {
+      const url = `${process.env.VUE_APP_BASE_API}${url1}`;
+      this.fetchLogFile(url)
+        .then((text) => {
+          this.fileShowData = text.split("\r\n");
+          this.handleLineChart(this.fileShowData);
+          this.fileVisible = true;
+        })
+        .catch((error) => {
+          console.error("Failed to fetch the log file:", error);
+          this.$modal.msgSuccess("文件读取错误");
+        });
     },
-    fileView2() {
-      this.$emit('fileView2')
+    fileView2(url1) {
+      const url = `${process.env.VUE_APP_BASE_API}${url1}`;
+      this.fetchLogFile(url)
+        .then((text) => {
+          this.fileShowData = text.split("\r\n");
+          this.handleHeatmapChart(this.fileShowData);
+          this.fileVisible = true;
+        })
+        .catch((error) => {
+          console.error("Failed to fetch the log file:", error);
+          this.$modal.msgSuccess("文件读取错误");
+        });
+    },
+    // 读取文件内容
+    async fetchLogFile(url) {
+      try {
+        const response = await fetch(url, { method: "GET" });
+        if (!response.ok) {
+          throw new Error(`HTTP error! status: ${response.status}`);
+        }
+        return await response.text();
+      } catch (error) {
+        throw error;
+      }
+    },
+    // echarts数据
+    handleLineChart(data) {
+      this.chartType = "line";
+      const data1 = data[0].replace(/\s+/g, " ").split(" ");
+      const customName= data1.map(label => ({ [label + 'Data']: [] }))
+      let yAxis=[],series=[]
+      for (let i = 1; i < data.length; i++) {
+        let row = data[i].split("\t");
+        customName.forEach((item,index)=>{
+          for (let key in item){
+            item[key].push(parseFloat(row[index]))
+          }
+        })
+      }
+      console.log("customName",customName);
+      // delete data1[Object.keys(data1)[0]]
+      customName.forEach((item,index)=>{
+        if(index===0) return
+        else{
+          yAxis.push({
+            type: "value",
+            name: data1[index],
+            position: index===1?'left':'right',
+            alignTicks: true,
+            axisLine: {
+              show: true,
+            },
+          })
+          series.push({
+              name: data1[index],
+              type: "line",
+              data: item[Object.keys(item)[0]],
+            },)
+          }
+      })
+      console.log("11",Object.values(customName[0]));
+      const chartData = {
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "cross",
+          },
+        },
+        xAxis: [
+          {
+            type: "category",
+            name:data1[0],
+            axisTick: {
+              alignWithLabel: true,
+            },
+            axisLine: {
+              show: true,
+            },
+            
+            data: Object.values(customName[0])[0] ,
+          },
+        ],
+        yAxis: yAxis,
+        series: series,
+      };
+      this.chartData=JSON.parse(JSON.stringify(chartData))
+    },
+    handleHeatmapChart(data) {
+      this.chartType = "heatmap";
+      // console.log("data",data);
+      let dataSet = [],
+        xData = [],
+        yData = [];
+      let min = Infinity; // 初始化最小值为无穷大
+      let max = -Infinity; // 初始化最大值为负无穷大
+      const num = Math.ceil(Math.sqrt(data.length));
+      for (let i = 0; i < num; i++) {
+        xData.push(i);
+      }
+      let x = 0,
+        y = 0;
+      for (let i = 15; i < data.length; i++) {
+        let row = parseFloat(data[i].split(","));
+        dataSet.push([y++, x, parseFloat(row)]);
+        if (row > max) max = row;
+        if (row < min) min = row;
+        if (y === num) {
+          yData.push(x);
+          x++;
+          y = 0;
+        }
+      }
+      console.log("dataSet", dataSet);
+      const chartData = {
+        tooltip: {},
+        xAxis: {
+          type: "category",
+          data: xData,
+        },
+        yAxis: {
+          type: "category",
+          data: yData,
+        },
+        visualMap: {
+          min: min,
+          max: max,
+          calculable: true,
+          precision: 4,
+          inRange: {
+            color: ["#FFFFFF", "#000000"],
+          },
+        },
+        series: [
+          {
+            name: "辐射亮度",
+            type: "heatmap",
+            data: dataSet,
+            emphasis: {
+              itemStyle: {
+                borderColor: "#333",
+                borderWidth: 1,
+              },
+            },
+            progressive: 1000,
+            animation: false,
+          },
+        ],
+      };
+      this.chartData=JSON.parse(JSON.stringify(chartData))
     },
-    checkFile(url) {
-
-    }
   },
 };
 </script>
@@ -553,7 +738,6 @@ export default {
     font-size: 1rem;
   }
 }
-
 ::v-deep .el-upload--picture-card {
   width: 80px;
   height: 80px;
@@ -564,4 +748,11 @@ export default {
   width: 80px;
   height: 80px;
 }
+.chartShow{
+  margin: 0 auto;
+}
+.dialog-footer{
+  transform:translateX(40%);
+  margin-top: 20px;
+}
 </style>

+ 17 - 9
meas_web/src/views/meas/dataResults/index.vue

@@ -38,12 +38,15 @@
           v-hasPermi="['meas:dataResults:export']">导出</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-view" size="mini" :disabled="single"
-          v-hasPermi="['meas:dataResults:edit']">光谱可视化</el-button>
+        <el-tooltip style="margin: 4px;" effect="dark" content="正在开发中..." placement="bottom">
+          <el-button type="primary" plain icon="el-icon-view" size="mini" :disabled="single" v-hasPermi="['meas:dataResults:edit']">光谱可视化</el-button>
+        </el-tooltip>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="danger" plain icon="el-icon-view" size="mini" :disabled="single"
-          v-hasPermi="['meas:dataResults:edit']">波段可视化</el-button>
+        <el-tooltip style="margin: 4px;" effect="dark" content="正在开发中..." placement="bottom">
+          <el-button type="danger" plain icon="el-icon-view" size="mini" :disabled="single" v-hasPermi="['meas:dataResults:edit']">波段可视化</el-button>
+        </el-tooltip>
+        
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -59,7 +62,7 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-view" v-hasPermi="['meas:envData:edit']"
-            @click="handleUpdate(scope.row)">查看</el-button>
+            @click="checkView(scope.row)">查看</el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
             v-hasPermi="['meas:dataResults:edit']">修改</el-button>
           <el-button size="mini" type="text" icon="el-icon-document">计算</el-button>
@@ -71,12 +74,12 @@
       @pagination="getList" />
 
     <!-- 添加或修改数据结果对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
-      <dialogContent :form="form" />
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
+      <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>
-      
+
       <div class="box">
         <span class="title">计算结果</span>
         <el-form ref="resultForm" :model="resultForm" size="mini" :rules="rules" label-width="150px">
@@ -154,7 +157,7 @@ export default {
       },
       // 表单参数
       form: {},
-      resultForm:{},
+      resultForm: {},
       // 表单校验
       rules: {
         measurementBatchId: [
@@ -180,6 +183,7 @@ export default {
       engineStatusOptions: [],
       // 发动机角度
       angleOptions: [],
+      isCheck: true,
     };
   },
   created() {
@@ -257,6 +261,10 @@ export default {
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
+    checkView(row) {
+      this.handleUpdate(row)
+      this.isCheck = true
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();

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

@@ -105,7 +105,7 @@
     />
 
     <!-- 添加或修改发动机型号对话框 -->
-    <el-dialog :title="title" :visible.sync="open"  width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open"  width="500px" append-to-body>
       <el-form ref="form" :model="form" :disabled="isCheck" :rules="rules" label-width="100px">
         <el-form-item label="发动机型号" prop="model">
           <el-input v-model="form.model" placeholder="请输入发动机型号" />

+ 27 - 19
meas_web/src/views/meas/envData/ECharts.vue

@@ -6,7 +6,8 @@
   import * as echarts from 'echarts'
   require('echarts/theme/macarons') // echarts theme
   import resize from '../../dashboard/mixins/resize'
-  
+  var chart
+
   export default {
     name: "ECharts",
     mixins: [resize],
@@ -29,46 +30,53 @@
       },
       chartData: {
         type: Object,
-        required: true
+        required: true,
+        default: null
       }
     },
     data() {
       return {
-        chart: null
+        // chart: null
       }
     },
+    mounted() {
+      this.$nextTick(() => {
+        this.initChart()
+      })
+    },
     watch: {
       chartData: {
-        deep: true,
         handler(val) {
-          this.chart.dispose()
-          this.chart = null
+          if (chart) { 
+            chart.dispose();
+            chart = null;
+          }
           this.$nextTick(() => {
             this.initChart()
+            console.log("width",this.width);
+            // this.setOptions(val)
           })
-          this.setOptions(val)
-        }
+        },
+        deep: true,
+        immediate: true
       }
     },
-    mounted() {
-      this.$nextTick(() => {
-        this.initChart()
-      })
-    },
     beforeDestroy() {
-      if (!this.chart) {
-        return
+      if (chart) {
+        chart.dispose()
+        chart = null
       }
-      this.chart.dispose()
-      this.chart = null
     },
     methods: {
       initChart() {
-        this.chart = echarts.init(this.$el, 'macarons')
+        if(chart != null && chart != "" && chart != undefined){
+        	chart.dispose();//解决echarts dom已经加载的报错
+        }
+        chart = echarts.init(this.$el, 'macarons')
         this.setOptions(this.chartData)
       },
       setOptions(chartData) {
-        this.chart.setOption(chartData)
+        chart.setOption(chartData)
       }
     }
   }

+ 89 - 210
meas_web/src/views/meas/envData/index.vue

@@ -66,17 +66,10 @@
       @pagination="getList" />
 
     <!-- 添加或修改测量环境数据对话框 -->
-    <el-dialog  :title="title" :visible.sync="open" width="70%" append-to-body>
+    <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" @submit-form="submitForm" @cancel="cancel"/>
-      <!-- <div v-if="!isCheck" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div> -->
     </el-dialog>
-    <el-dialog title="增加发动机型号" :visible.sync="addDialogVisible" width="400px" append-to-body>
-      <!-- <el-input v-model="engineModel" placeholder="请输入发动机型号">
-        <template slot="prepend">发动机型号</template>
-      </el-input> -->
+    <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="请输入发动机型号" />
@@ -93,7 +86,7 @@
         <el-button @click="addDialogVisible = false">取 消</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="增加测量批次" :visible.sync="addMeasVisible" width="400px" append-to-body>
+    <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">
@@ -112,7 +105,7 @@
         <el-button @click="addMeasVisible = false">取 消</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="增加发动机状态" :visible.sync="addStatusVisible" width="400px" append-to-body>
+    <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="请输入状态" />
@@ -126,7 +119,7 @@
         <el-button @click="addStatusVisible = false">取 消</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="增加发动机角度" :visible.sync="addAngleVisible" width="400px" append-to-body>
+    <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="请输入角度" />
@@ -137,9 +130,7 @@
         <el-button @click="addAngleVisible = false">取 消</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="数据可视化" :visible.sync="fileVisible" width="70%" append-to-body>
-      <ECharts :class="chartType === 'heatmap'?'heatmapChart':''" :chartData="chartData" :width="chartType === 'heatmap'?'400px':'100%'" />
-    </el-dialog>
+    
   </div>
 </template>
 
@@ -180,12 +171,12 @@ import {
 } from "@/api/meas/transmissionRate";
 import { angleOption,addAngle } from "@/api/meas/angle";
 import { statusOption,addStatus } from "@/api/meas/status";
-import ECharts from "./ECharts.vue";
+
 import dialogContent from "@/views/meas/components/dialogContent";
 
 export default {
   name: "EnvData",
-  components: { ECharts,dialogContent},
+  components: { dialogContent},
   data() {
     return {
       // 遮罩层
@@ -210,7 +201,6 @@ export default {
       addMeasVisible: false,
       addStatusVisible: false,
       addAngleVisible: false,
-      fileVisible: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -265,9 +255,8 @@ export default {
       },
       fileShowData: [],
       disabled: false,
-      chartData: {},
-      chartType: "",
-      addFlag:false
+      addFlag:false,
+      formIsChange:false
     };
   },
   created() {
@@ -330,7 +319,6 @@ export default {
     envDataSave(val) {
       // 保存环境参数,返回一个环境数据ID
       val.validate((valid) => {
-        console.log("11", valid, this.form);
         if (valid) {
           if (this.form.id != null) {
             updateEnvData(this.form).then((response) => {
@@ -512,15 +500,12 @@ export default {
       const id = row.measurementBatchId;
       getRadiationByEnvData(id).then((response) => {
         this.radiationForm = response.data;
-        console.log("this.radiationForm",this.radiationForm);
       });
       getTIDataByEnvData(id).then((response) => {
         this.TIForm = response.data;
-        console.log("this.TIForm",this.TIForm);
       });
       getTRateByEnvData(id).then((response) => {
         this.TransmittanceForm = response.data;
-        console.log("this.TransmittanceForm",this.TransmittanceForm);
       });
       getEnvData(row.id).then((response) => {
         this.form = response.data;
@@ -529,27 +514,71 @@ export default {
       });
     },
     /** 提交按钮 */
-    submitForm(value) {
-      console.log(value);
+    submitForm(value,changeFlag) {
+      console.log("changeFlag",changeFlag);
       value['formData'].validate((valid) => {
-        if (valid) {
-          if (value['formData']['_props']['model']['id'] != null) {
-            updateRadiation(value['radiationData']['_props']['model']).then((response) => { });
-            updateThermalImagerTesDdata(value['TIData']['_props']['model']).then((response) => { });
-            updateTransmissionRate(value['TransmittanceData']['_props']['model']).then(
-              (response) => { }
-            );
-            updateEnvData(value['formData']['_props']['model']).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+        if (valid && changeFlag.includes(1)) {
+          if (this.form.id!= null) {
+            updateEnvData(this.form).then((response) => {
+              this.$modal.msgSuccess("修改测量环境数据成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addRadiation(value['radiationData']['_props']['model']).then((response) => { });
-            addThermalImagerTesDdata(value['TIData']['_props']['model']).then((response) => { });
-            addTransmissionRate(value['TransmittanceData']['_props']['model']).then((response) => { });
-            addEnvData(value['formData']['_props']['model']).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+            addEnvData(this.form).then((response) => {
+              this.$modal.msgSuccess("新增测量环境数据成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+      value["radiationData"].validate(valid => {
+        console.log("22",this.radiationForm);
+        if (valid && changeFlag.includes(2)) {
+          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();
+            });
+          }
+        }
+      });
+      value["TIData"].validate(valid => {
+        if (valid && changeFlag.includes(3)) {
+          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();
+            });
+          }
+        }
+      });
+      value["TransmittanceData"].validate(valid => {
+        if (valid && changeFlag.includes(4)) {
+          if (this.TransmittanceForm.id != null) {
+            updateTransmissionRate(this.TransmittanceForm).then(response => {
+              this.$modal.msgSuccess("修改透过率数据成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTransmissionRate(this.TransmittanceForm).then(response => {
+              this.$modal.msgSuccess("新增透过率数据成功");
               this.open = false;
               this.getList();
             });
@@ -557,6 +586,19 @@ export default {
         }
       });
     },
+    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;
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
@@ -581,170 +623,7 @@ export default {
         `envData_${new Date().getTime()}.xlsx`
       );
     },
-    // 查看文件可视化
-    fileView(url1) {
-      const url = `${process.env.VUE_APP_BASE_API}${url1}`;
-      this.fetchLogFile(url)
-        .then((text) => {
-          this.fileShowData = text.split("\r\n");
-          this.handleLineChart(this.fileShowData);
-          this.fileVisible = true;
-        })
-        .catch((error) => {
-          console.error("Failed to fetch the log file:", error);
-          this.$modal.msgSuccess("文件读取错误");
-        });
-    },
-    fileView2(url1) {
-      const url = `${process.env.VUE_APP_BASE_API}${url1}`;
-      this.fetchLogFile(url)
-        .then((text) => {
-          this.fileShowData = text.split("\r\n");
-          this.handleHeatmapChart(this.fileShowData);
-          this.fileVisible = true;
-        })
-        .catch((error) => {
-          console.error("Failed to fetch the log file:", error);
-          this.$modal.msgSuccess("文件读取错误");
-        });
-    },
-    // 读取文件内容
-    async fetchLogFile(url) {
-      try {
-        const response = await fetch(url, { method: "GET" });
-        if (!response.ok) {
-          throw new Error(`HTTP error! status: ${response.status}`);
-        }
-        return await response.text();
-      } catch (error) {
-        throw error;
-      }
-    },
-    // echarts数据
-    handleLineChart(data) {
-      this.chartType = "line";
-      const data1 = data[0].replace(/\s+/g, " ").split(" ");
-      const customName= data1.map(label => ({ [label + 'Data']: [] }))
-      let yAxis=[],series=[]
-      for (let i = 1; i < data.length; i++) {
-        let row = data[i].split("\t");
-        customName.forEach((item,index)=>{
-          for (let key in item){
-            item[key].push(parseFloat(row[index]))
-          }
-        })
-      }
-      console.log("customName",customName);
-      // delete data1[Object.keys(data1)[0]]
-      customName.forEach((item,index)=>{
-        if(index===0) return
-        else{
-          yAxis.push({
-            type: "value",
-            name: data1[index],
-            position: index===1?'left':'right',
-            alignTicks: true,
-            axisLine: {
-              show: true,
-            },
-          })
-          series.push({
-              name: data1[index],
-              type: "line",
-              data: item[Object.keys(item)[0]],
-            },)
-          }
-      })
-      console.log("11",Object.values(customName[0])[0]);
-      const chartData = {
-        tooltip: {
-          trigger: "axis",
-          axisPointer: {
-            type: "cross",
-          },
-        },
-        xAxis: [
-          {
-            type: "category",
-            name:data1[0],
-            axisTick: {
-              alignWithLabel: true,
-            },
-            axisLine: {
-              show: true,
-            },
-            
-            data: Object.values(customName[0])[0] ,
-          },
-        ],
-        yAxis: yAxis,
-        series: series,
-      };
-      this.chartData=JSON.parse(JSON.stringify(chartData))
-    },
-    handleHeatmapChart(data) {
-      this.chartType = "heatmap";
-      // console.log("data",data);
-      let dataSet = [],
-        xData = [],
-        yData = [];
-      let min = Infinity; // 初始化最小值为无穷大
-      let max = -Infinity; // 初始化最大值为负无穷大
-      const num = Math.ceil(Math.sqrt(data.length));
-      for (let i = 0; i < num; i++) {
-        xData.push(i);
-      }
-      let x = 0,
-        y = 0;
-      for (let i = 15; i < data.length; i++) {
-        let row = parseFloat(data[i].split(","));
-        dataSet.push([y++, x, parseFloat(row)]);
-        if (row > max) max = row;
-        if (row < min) min = row;
-        if (y === num) {
-          yData.push(x);
-          x++;
-          y = 0;
-        }
-      }
-      console.log("dataSet", dataSet);
-      const chartData = {
-        tooltip: {},
-        xAxis: {
-          type: "category",
-          data: xData,
-        },
-        yAxis: {
-          type: "category",
-          data: yData,
-        },
-        visualMap: {
-          min: min,
-          max: max,
-          calculable: true,
-          precision: 4,
-          inRange: {
-            color: ["#FFFFFF", "#000000"],
-          },
-        },
-        series: [
-          {
-            name: "辐射亮度",
-            type: "heatmap",
-            data: dataSet,
-            emphasis: {
-              itemStyle: {
-                borderColor: "#333",
-                borderWidth: 1,
-              },
-            },
-            progressive: 1000,
-            animation: false,
-          },
-        ],
-      };
-      this.chartData=JSON.parse(JSON.stringify(chartData))
-    },
+    
   },
 };
 </script>
@@ -765,11 +644,6 @@ export default {
     font-size: 1rem;
   }
 }
-
-.heatmapChart {
-  transform: translateX(80%);
-}
-
 ::v-deep .el-form-item .el-select {
   width: 200px;
 }
@@ -781,4 +655,9 @@ export default {
 ::v-deep .el-form-item .upload-file {
   width: 200px;
 }
+// ::v-deep .el-form-item__label {
+//   position: relative; /* 设置相对定位作为星号的定位基准 */
+//   text-align: justify;
+//   text-align-last: justify; /* 确保最后一行也两端对齐 */
+// }
 </style>

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

@@ -112,7 +112,7 @@
     />
 
     <!-- 添加或修改测量批次对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="发动机型号" label-width="110px" prop="engineId">
           <!-- <el-input v-model.number="form.engineId" placeholder="请输入发动机型号ID" /> -->

+ 51 - 12
meas_web/src/views/meas/radiation/index.vue

@@ -52,7 +52,7 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-view" v-hasPermi="['meas:envData:edit']"
-            @click="handleUpdate(scope.row)">查看</el-button>
+            @click="checkView(scope.row)">查看</el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
             v-hasPermi="['meas:radiation:edit']">修改</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
@@ -65,22 +65,18 @@
       @pagination="getList" />
 
     <!-- 添加或修改光谱辐射对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
-      <dialogContent :radiationForm="radiationForm" @submit-form="submitForm" :form="form" />
-      <!-- <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div> -->
+    <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>
   </div>
 </template>
 
 <script>
-import { listRadiation, getRadiation, delRadiation,updateRadiation,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";
-import { getEnvData } from "@/api/meas/envData";
+import { getEnvData, updateEnvData } from "@/api/meas/envData";
 
 export default {
   name: "Radiation",
@@ -146,6 +142,7 @@ export default {
       engineStatusOptions: [],
       // 发动机角度
       angleOptions: [],
+      isCheck:false,
     };
   },
   created() {
@@ -203,6 +200,10 @@ export default {
       };
       this.resetForm("radiationForm");
     },
+    checkView(row){
+      this.handleUpdate(row)
+      this.isCheck=true
+    },
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
@@ -222,6 +223,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.isCheck = false
       const id = row.measurementBatchId || this.measurementBatchIds
       getEnvData(id).then((response) => {
         this.form = response.data;
@@ -233,16 +235,40 @@ export default {
       });
     },
     /** 提交按钮 */
-    submitForm(value) {
-      console.log(value);
+    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();
+            });
+          }
+        }
+      });
       value["radiationData"].validate(valid => {
         if (valid) {
-            updateRadiation(value["radiationData"]['_props']['model']).then(response => {
+          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();
+            });
           }
+        }
       });
     },
     /** 删除按钮操作 */
@@ -264,3 +290,16 @@ export default {
   }
 };
 </script>
+<style scoped lang="scss">
+::v-deep .el-form-item .el-select {
+  width: 200px;
+}
+
+::v-deep .el-form-item .el-input {
+  width: 200px;
+}
+
+::v-deep .el-form-item .upload-file {
+  width: 200px;
+}
+</style>

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

@@ -132,7 +132,7 @@
     />
 
     <!-- 添加或修改状态对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="状态" prop="status">
           <el-input v-model="form.status" placeholder="请输入状态" />

+ 30 - 9
meas_web/src/views/meas/thermalImagerTesDdata/index.vue

@@ -74,7 +74,7 @@
       <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" >
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-view" v-hasPermi="['meas:envData:edit']"
-            @click="handleUpdate(scope.row)">查看</el-button>
+            @click="checkView(scope.row)">查看</el-button>
           <el-button
             size="mini"
             type="text"
@@ -102,12 +102,8 @@
     />
 
     <!-- 添加或修改热像仪测试数据对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
-      <dialogContent :TIForm="TIForm" :form="form" />
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
+      <dialogContent :TIForm="TIForm" :form="form" @submit-form="submitForm" :isCheck="isCheck" @cancel="cancel"/>
     </el-dialog>
   </div>
 </template>
@@ -182,6 +178,7 @@ export default {
       engineStatusOptions: [],
       // 发动机角度
       angleOptions: [],
+      isCheck:false,
     };
   },
   created() {
@@ -262,9 +259,14 @@ export default {
       this.open = true;
       this.title = "添加热像仪测试数据";
     },
+    checkView(row){
+      this.handleUpdate(row)
+      this.isCheck=true
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.isCheck = false
       const id = row.measurementBatchId || this.measurementBatchIds
       getEnvData(id).then((response) => {
         this.form = response.data;
@@ -276,8 +278,8 @@ export default {
       });
     },
     /** 提交按钮 */
-    submitForm() {
-      this.$refs["TIForm"].validate(valid => {
+    submitForm(value) {
+      value["TIData"].validate(valid => {
         if (valid) {
           if (this.TIForm.id != null) {
             updateThermalImagerTesDdata(this.TIForm).then(response => {
@@ -285,6 +287,12 @@ export default {
               this.open = false;
               this.getList();
             });
+          }else {
+            addThermalImagerTesDdata(this.TIForm).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
         }
       });
@@ -308,3 +316,16 @@ export default {
   }
 };
 </script>
+<style scoped lang="scss">
+::v-deep .el-form-item .el-select {
+  width: 200px;
+}
+
+::v-deep .el-form-item .el-input {
+  width: 200px;
+}
+
+::v-deep .el-form-item .upload-file {
+  width: 200px;
+}
+</style>

+ 31 - 10
meas_web/src/views/meas/transmissionRate/index.vue

@@ -60,7 +60,7 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-view" v-hasPermi="['meas:envData:edit']"
-            @click="handleUpdate(scope.row)">查看</el-button>
+            @click="checkView(scope.row)">查看</el-button>
           <el-button
             size="mini"
             type="text"
@@ -88,12 +88,8 @@
     />
 
     <!-- 添加或修改透过率对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
-      <dialogContent :TransmittanceForm="TransmittanceForm" :form="form" />
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
+      <dialogContent :TransmittanceForm="TransmittanceForm" :form="form" @submit-form="submitForm" @cancel="cancel" :isCheck="isCheck"/>
     </el-dialog>
   </div>
 </template>
@@ -151,6 +147,7 @@ export default {
       engineStatusOptions: [],
       // 发动机角度
       angleOptions: [],
+      isCheck:false,
     };
   },
   created() {
@@ -218,9 +215,14 @@ export default {
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
+    checkView(row){
+      this.handleUpdate(row)
+      this.isCheck=true
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.isCheck = false
       const id = row.measurementBatchId || this.measurementBatchIds
       getEnvData(id).then((response) => {
         this.form = response.data;
@@ -232,15 +234,21 @@ export default {
       });
     },
     /** 提交按钮 */
-    submitForm() {
-      this.$refs["TransmittanceForm"].validate(valid => {
+    submitForm(value) {
+      value["TransmittanceData"].validate(valid => {
         if (valid) {
-          if (this.TransmittanceForm.measurementBatchId != null) {
+          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();
+            });
           }
         }
       });
@@ -258,3 +266,16 @@ export default {
   }
 };
 </script>
+<style scoped lang="scss">
+::v-deep .el-form-item .el-select {
+  width: 200px;
+}
+
+::v-deep .el-form-item .el-input {
+  width: 200px;
+}
+
+::v-deep .el-form-item .upload-file {
+  width: 200px;
+}
+</style>

+ 3 - 3
meas_web/src/views/monitor/job/index.vue

@@ -152,7 +152,7 @@
     />
 
     <!-- 添加或修改定时任务对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="800px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="12">
@@ -236,12 +236,12 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="Cron表达式生成器" :visible.sync="openCron" append-to-body destroy-on-close class="scrollbar">
+    <el-dialog :close-on-click-modal="false" title="Cron表达式生成器" :visible.sync="openCron" append-to-body destroy-on-close class="scrollbar">
       <crontab @hide="openCron=false" @fill="crontabFill" :expression="expression"></crontab>
     </el-dialog>
 
     <!-- 任务日志详细 -->
-    <el-dialog title="任务详细" :visible.sync="openView" width="700px" append-to-body>
+    <el-dialog :close-on-click-modal="false" title="任务详细" :visible.sync="openView" width="700px" append-to-body>
       <el-form ref="form" :model="form" label-width="120px" size="mini">
         <el-row>
           <el-col :span="12">

+ 1 - 1
meas_web/src/views/monitor/job/log.vue

@@ -144,7 +144,7 @@
     />
 
     <!-- 调度日志详细 -->
-    <el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body>
+    <el-dialog :close-on-click-modal="false" title="调度日志详细" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" label-width="100px" size="mini">
         <el-row>
           <el-col :span="12">

+ 1 - 1
meas_web/src/views/monitor/operlog/index.vue

@@ -160,7 +160,7 @@
     />
 
     <!-- 操作日志详细 -->
-    <el-dialog title="操作日志详细" :visible.sync="open" width="800px" append-to-body>
+    <el-dialog :close-on-click-modal="false" title="操作日志详细" :visible.sync="open" width="800px" append-to-body>
       <el-form ref="form" :model="form" label-width="100px" size="mini">
         <el-row>
           <el-col :span="12">

+ 1 - 1
meas_web/src/views/system/config/index.vue

@@ -148,7 +148,7 @@
     />
 
     <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="参数名称" prop="configName">
           <el-input v-model="form.configName" placeholder="请输入参数名称" />

+ 1 - 1
meas_web/src/views/system/dept/index.vue

@@ -97,7 +97,7 @@
     </el-table>
 
     <!-- 添加或修改部门对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="24" v-if="form.parentId !== 0">

+ 1 - 1
meas_web/src/views/system/dict/data.vue

@@ -141,7 +141,7 @@
     />
 
     <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="字典类型">
           <el-input v-model="form.dictType" :disabled="true" />

+ 1 - 1
meas_web/src/views/system/dict/index.vue

@@ -158,7 +158,7 @@
     />
 
     <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="字典名称" prop="dictName">
           <el-input v-model="form.dictName" placeholder="请输入字典名称" />

+ 1 - 1
meas_web/src/views/system/menu/index.vue

@@ -103,7 +103,7 @@
     </el-table>
 
     <!-- 添加或修改菜单对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="680px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row>
           <el-col :span="24">

+ 1 - 1
meas_web/src/views/system/notice/index.vue

@@ -123,7 +123,7 @@
     />
 
     <!-- 添加或修改公告对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="780px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="12">

+ 1 - 1
meas_web/src/views/system/post/index.vue

@@ -124,7 +124,7 @@
     />
 
     <!-- 添加或修改岗位对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="岗位名称" prop="postName">
           <el-input v-model="form.postName" placeholder="请输入岗位名称" />

+ 2 - 2
meas_web/src/views/system/role/index.vue

@@ -156,7 +156,7 @@
     />
 
     <!-- 添加或修改角色配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="角色名称" prop="roleName">
           <el-input v-model="form.roleName" placeholder="请输入角色名称" />
@@ -208,7 +208,7 @@
     </el-dialog>
 
     <!-- 分配角色数据权限对话框 -->
-    <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
       <el-form :model="form" label-width="80px">
         <el-form-item label="角色名称">
           <el-input v-model="form.roleName" :disabled="true" />

+ 1 - 1
meas_web/src/views/system/role/selectUser.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 授权用户 -->
-  <el-dialog title="选择用户" :visible.sync="visible" width="800px" top="5vh" append-to-body>
+  <el-dialog :close-on-click-modal="false" title="选择用户" :visible.sync="visible" width="800px" top="5vh" append-to-body>
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
       <el-form-item label="用户名称" prop="userName">
         <el-input

+ 2 - 2
meas_web/src/views/system/user/index.vue

@@ -203,7 +203,7 @@
     </el-row>
 
     <!-- 添加或修改用户配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="12">
@@ -309,7 +309,7 @@
     </el-dialog>
 
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"

+ 1 - 1
meas_web/src/views/system/user/profile/userAvatar.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened"  @close="closeDialog">
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened"  @close="closeDialog">
       <el-row>
         <el-col :xs="24" :md="12" :style="{height: '350px'}">
           <vue-cropper

+ 1 - 2
meas_web/src/views/tool/build/CodeTypeDialog.vue

@@ -1,9 +1,8 @@
 <template>
   <div>
-    <el-dialog
+    <el-dialog :close-on-click-modal="false"
       v-bind="$attrs"
       width="500px"
-      :close-on-click-modal="false"
       :modal-append-to-body="false"
       v-on="$listeners"
       @open="onOpen"

+ 1 - 1
meas_web/src/views/tool/build/IconsDialog.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="icon-dialog">
-    <el-dialog
+    <el-dialog :close-on-click-modal="false"
       v-bind="$attrs"
       width="980px"
       :modal-append-to-body="false"

+ 1 - 1
meas_web/src/views/tool/gen/createTable.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 创建表 -->
-  <el-dialog title="创建表" :visible.sync="visible" width="800px" top="5vh" append-to-body>
+  <el-dialog :close-on-click-modal="false" title="创建表" :visible.sync="visible" width="800px" top="5vh" append-to-body>
     <span>创建表语句(支持多个建表语句):</span>
     <el-input type="textarea" :rows="10" placeholder="请输入文本" v-model="content"></el-input>
     <div slot="footer" class="dialog-footer">

+ 1 - 1
meas_web/src/views/tool/gen/importTable.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 导入表 -->
-  <el-dialog title="导入表" :visible.sync="visible" width="800px" top="5vh" append-to-body>
+  <el-dialog :close-on-click-modal="false" title="导入表" :visible.sync="visible" width="800px" top="5vh" append-to-body>
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
       <el-form-item label="表名称" prop="tableName">
         <el-input

+ 1 - 1
meas_web/src/views/tool/gen/index.vue

@@ -169,7 +169,7 @@
       @pagination="getList"
     />
     <!-- 预览界面 -->
-    <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
+    <el-dialog :close-on-click-modal="false" :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
       <el-tabs v-model="preview.activeName">
         <el-tab-pane
           v-for="(value, key) in preview.data"