Kaynağa Gözat

判故逻辑hmc码参数检验、LTable删除控制台打印代码

Rmengdi 3 ay önce
ebeveyn
işleme
f93a9b9e18

+ 1 - 1
src/components/LTable/index.vue

@@ -313,7 +313,7 @@ export default {
           .toLowerCase() // 转为小写
       }
 
-      console.log('当前表格ID:', this.currentTableId)
+      // console.log('当前表格ID:', this.currentTableId)
     },
     hasChildren(row, showType) {
       //父级显示

+ 2 - 4
src/views/als/falseAlarm/index.vue

@@ -39,9 +39,9 @@
           <el-form-item label="架次" prop="sortieNo">
             <el-input v-model="form.sortieNo" />
           </el-form-item>
-          <el-form-item label="飞行时间" prop="flightDate">
+          <!-- <el-form-item label="飞行时间" prop="flightDate">
             <el-input v-model="form.flightDate" />
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
         <LTable ref="warningTable" @selection-change="selection" :defaultFetch="false" :showColumnSetting="false" :columns="warningColumns" :dataSource="warningTableData" :options="warningOptions" :pagination="warningTableRequset"></LTable>
       </el-dialog>
@@ -190,7 +190,6 @@ export default {
           //   return h('span', { class: 'warning-state' }, params.row.attribute1)
           // },
           onClick: (row, index, scope) => {
-            console.log(4444)
             this.$router.push({ name: 'JudgeFaultLogic' })
           }
         },
@@ -431,7 +430,6 @@ export default {
       this.form = deepClone(row)
       try {
         const { code, data } = await getCurveData(row.code, row.sortieNo)
-        console.log('resultData', code, data)
         if (code === 200) {
           if (data) {
             this.getResultData(data)

+ 21 - 11
src/views/als/judgeFaultLogic/index.vue

@@ -68,7 +68,7 @@
             <el-input v-model="form.hmcCode" placeholder="请输入HMC码" />
           </el-form-item>
           <el-form-item label="HMC码参数" label-width="100px" prop="attribute1">
-            <el-input v-model="form.attribute1" type="textarea" :rows="2" placeholder="请输入HMC码参数,如:发动机排气温度,燃油流量,机匣频率" />
+            <el-input v-model="form.attribute1" type="textarea" :rows="2" placeholder="请输入HMC码参数,必须带上“时间”参数,如:时间,发动机排气温度,燃油流量,机匣频率" />
           </el-form-item>
           <el-form-item label="判据名称" prop="name">
             <el-input v-model="form.name" placeholder="请输入判据名称" />
@@ -359,16 +359,26 @@ export default {
     submit() {
       this.$refs['formRef'].validate((valid) => {
         if (valid) {
-          let c = this.form.remarks.slice(2, this.form.remarks.length - 2).split(' ')
-          let newFormula = c.map((item) => (item === '\\&\\&' ? '&&' : item))
-          this.form.remarks = newFormula.join(' ')
-          switch (this.dialogTitle) {
-            case '编辑':
-              this.updateJudgeFaultLogicAPI()
-              break
-            case '新增':
-              this.addJudgeFaultLogicAPI()
-              break
+          const str = this.form.attribute1.replace(/,/g, ',')
+          const content = str.split(',')
+          if (content.includes('时间')) {
+            this.form.attribute1 = str
+            let c = this.form.remarks.slice(2, this.form.remarks.length - 2).split(' ')
+            let newFormula = c.map((item) => (item === '\\&\\&' ? '&&' : item))
+            this.form.remarks = newFormula.join(' ')
+            switch (this.dialogTitle) {
+              case '编辑':
+                this.updateJudgeFaultLogicAPI()
+                break
+              case '新增':
+                this.addJudgeFaultLogicAPI()
+                break
+            }
+          } else {
+            this.$message({
+              type: 'warning',
+              message: 'HMC码参数需要包含“时间”参数'
+            })
           }
         }
       })