Prechádzať zdrojové kódy

fix: 删除冗余debugger; 机务算法添加说明字段;故障统计添加默认查询时间;调整菜单

Gaokun Wang 2 mesiacov pred
rodič
commit
a16e4c18a6

+ 0 - 1
src/components/FittingsModal/index.vue

@@ -104,7 +104,6 @@ export default {
       this.getAircraftsByCode()
     },
     select(row) {
-      // debugger
       // if (row.healthStatus == '故障') {
       //   this.$message({
       //     type: 'error',

+ 25 - 0
src/router/modules/flightData.js

@@ -0,0 +1,25 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * FalseAlarm               虚警抑制
+ * FaultDiagnosis           智能故障诊断
+ */
+
+export default [
+  {
+    name: 'Layout',
+    path: '/dataManage',
+    redirect: '/dataManage/flightData',
+    component: Layout,
+    children: [
+      {
+        name: 'FlightData',
+        path: '/dataManage/flightData',
+        component: () => import('@/views/als/flightData/index.vue'),
+        meta: {
+          title: '飞参数据'
+        }
+      }
+    ]
+  }
+]

+ 0 - 9
src/router/modules/system.js

@@ -227,15 +227,6 @@ export default [
           title: '数据预处理'
         }
       },
-      {
-        name: 'FlightData',
-        path: '/dataManage/flightData',
-        component: () => import('@/views/als/flightData/index.vue'),
-        meta: {
-          parent: 'BasicData',
-          title: '飞参数据'
-        }
-      },
       {
         name: 'JudgeFaultLogic',
         path: '/dataManage/judgeFaultLogic',

+ 4 - 1
src/router/private-routes.js

@@ -2,6 +2,8 @@ import Layout from '@/layout/index.vue'
 
 //故障诊断
 import faultDiagnosis from './modules/faultDiagnosis'
+//飞参
+import flightData from './modules/flightData'
 //寿命预测
 import lifePrediction from './modules/lifePrediction'
 //维修决策
@@ -23,9 +25,10 @@ export const privateRoutes = [
       icon: 'el-icon-s-home'
     }
   },
+  ...flightData,
   ...faultDiagnosis,
-  ...lifePrediction,
   ...maintenanceDecision,
+  ...lifePrediction,
   ...faultStatistics,
   ...carrierStandard,
   ...system

+ 20 - 4
src/views/als/faultStatistics/echarts.vue

@@ -4,7 +4,7 @@
       <div class="view-carrierFlightMission-FlightMission-btn-right">
         <div class="input-with-select">
           <span>日期</span>
-          <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="statisticsDate" placeholder="选择日期" placement="bottom-start"> </el-date-picker>
+          <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="statisticsDate"> </el-date-picker>
         </div>
         <div class="input-with-select">
           <span>地区</span>
@@ -95,9 +95,6 @@ export default {
       select: {
         startStatisticsDate: '',
         endStatisticsDate: '',
-        // major: '',
-        // aircraftModel: '',
-        // groups: ''
         major: '',
         groups: '',
         aircraftModel: ''
@@ -196,7 +193,26 @@ export default {
       this.debounceFn()
     }
   },
+  created() {
+    let now = new Date()
+    let year = now.getFullYear()
+    let month = ('0' + (now.getMonth() + 1)).slice(-2)
+    let day = ('0' + now.getDate()).slice(-2)
+    const formattedTimeEnd = year + '-' + month + '-' + day
+    now = now.setMonth(now.getMonth() - 6)
+    now = new Date(now)
+    year = now.getFullYear()
+    month = ('0' + (now.getMonth() + 1)).slice(-2)
+    day = ('0' + now.getDate()).slice(-2)
+    const formattedTimeStart = year + '-' + month + '-' + day
+
+    this.statisticsDate = [formattedTimeStart, formattedTimeEnd]
+  },
   mounted() {
+    if (this.statisticsDate != null) {
+      this.select.startStatisticsDate = this.statisticsDate[0]
+      this.select.endStatisticsDate = this.statisticsDate[1]
+    }
     this.getFaultStatisticsAPI(this.select)
   },
   methods: {

+ 1 - 13
src/views/als/faultStatistics/index.vue

@@ -19,19 +19,7 @@
           <div class="view-carrierFlightMission-FlightMission-btn-right" style="width: 70%; overflow-x: auto">
             <div class="input-with-select">
               <span>日期</span>
-              <el-date-picker
-                style="width: 270px"
-                type="daterange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-                v-model="statisticsDate"
-                placement="bottom-start"
-                placeholder="选择日期"
-              >
-              </el-date-picker>
+              <el-date-picker style="width: 270px" v-model="statisticsDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"> </el-date-picker>
             </div>
             <div class="input-with-select">
               <span>地区</span>

+ 0 - 1
src/views/basicData/dataAircraftCataloging/importDialog/index.vue

@@ -43,7 +43,6 @@ export default {
 
     // 上传完成后
     onSuccess(result) {
-      debugger
       this.$refs.upload.clearFiles()
       this.fileList = []
       const { msg, code } = result

+ 1 - 1
src/views/basicData/dataAircraftCataloging/index.js

@@ -48,7 +48,7 @@ export const columns = (_this) => [
     prop: 'status',
     label: '状态',
     render: (h, params) => {
-      if (params.row.status == 0) {
+      if (params.row.status == 1) {
         return h('span', { class: 'success-state' }, '服役')
       } else {
         return h('span', { class: 'warning-state' }, '退役')

+ 2 - 2
src/views/basicData/dataAircraftCataloging/index.vue

@@ -57,8 +57,8 @@
           </el-form-item>
           <el-form-item label="状态">
             <el-radio-group v-model="form.status">
-              <el-radio label="0">役</el-radio>
-              <el-radio label="1">退役</el-radio>
+              <el-radio label="0">退役</el-radio>
+              <el-radio label="1">役</el-radio>
             </el-radio-group>
           </el-form-item>
         </el-form>

+ 0 - 1
src/views/basicData/dataSailingMaterialMaterialCodingAviation/importDialog/index.vue

@@ -44,7 +44,6 @@ export default {
 
     // 上传完成后
     onSuccess(result) {
-      debugger
       this.$refs.upload.clearFiles()
       this.fileList = []
       const { msg, code } = result

+ 0 - 1
src/views/basicData/dataSailingMaterialPrice/importDialog/index.vue

@@ -43,7 +43,6 @@ export default {
 
     // 上传完成后
     onSuccess(result) {
-      debugger
       this.$refs.upload.clearFiles()
       this.fileList = []
       const { msg, code } = result

+ 0 - 1
src/views/carrierStandard/carrierAllAudit/index.vue

@@ -110,7 +110,6 @@ export default {
     },
     //导出全部
     allExport() {
-      debugger
       var status = this.statusValue
       if (status == null) {
         status = ''

+ 15 - 1
src/views/carrierStandard/carrierComputationalModel/index.vue

@@ -23,6 +23,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="versionNumber" width="150" label="版本号"> </el-table-column>
+        <el-table-column prop="remark" width="180" label="说明"> </el-table-column>
         <el-table-column prop="state" label="状态" align="center" width="100">
           <template slot-scope="scope">
             <span v-if="scope.row.status == 1" class="success-state">启用</span>
@@ -75,6 +76,11 @@
               <el-button @click="add(item)" type="primary" v-for="item in operationalOperation" :key="item.dictCode">{{ item.dictLabel }}</el-button>
             </el-form-item>
           </el-col>
+          <el-col :span="24">
+            <el-form-item label="说明">
+              <el-input v-model="activeRow.remark" type="textarea"></el-input>
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -138,6 +144,7 @@ export default {
       dialogTile: '新增公式',
       activeRow: {
         formulaName: '',
+        remark: '',
         formulaUse: ''
       },
       drawer: false,
@@ -187,6 +194,7 @@ export default {
         let postData = {
           formulaName: this.activeRow.formulaName,
           formulaUse: this.activeRow.formulaUse,
+          remark: this.activeRow.remark,
           calculationModelId: this.calculationModelId
         }
         const { code, data } = await editCalculationModel(postData)
@@ -196,11 +204,13 @@ export default {
           this.dialogVisible = false
           this.activeRow.formulaName = ''
           this.activeRow.formulaUse = ''
+          this.activeRow.remark = ''
         }
       } else {
         let postData = {
           formulaName: this.activeRow.formulaName,
-          formulaUse: this.activeRow.formulaUse
+          formulaUse: this.activeRow.formulaUse,
+          remark: this.activeRow.remark
         }
         const { code, data } = await addCalculationModel(postData)
         if (code == 200) {
@@ -209,6 +219,7 @@ export default {
           this.dialogVisible = false
           this.activeRow.formulaName = ''
           this.activeRow.formulaUse = ''
+          this.activeRow.remark = ''
         }
       }
 
@@ -296,6 +307,7 @@ export default {
     edit(row) {
       this.activeRow.formulaName = row.formulaName
       this.activeRow.formulaUse = row.formulaUse
+      this.activeRow.remark = row.remark
       this.calculationModelId = row.calculationModelId
       this.dialogTile = '编辑公式'
       this.getdict()
@@ -400,12 +412,14 @@ export default {
       this.dialogVisible = false
       this.activeRow.formulaName = ''
       this.activeRow.formulaUse = ''
+      this.activeRow.remark = ''
       this.calculationModelId = null
     },
     async addDialog() {
       this.dialogTile = '新增公式'
       this.activeRow.formulaName = ''
       this.activeRow.formulaUse = ''
+      this.activeRow.remark = ''
       this.getdict()
     },
     async getdict() {

+ 0 - 1
src/views/system/systemDataDictionary/data.vue

@@ -295,7 +295,6 @@ export default {
       })
         .then(() => {
           this.exportLoading = true
-          debugger
           return exportData(queryParams)
         })
         .then((response) => {

+ 0 - 1
src/views/system/user/index.vue

@@ -195,7 +195,6 @@ export default {
       })
         .then(async () => {
           const { code } = await resetBtn({ userId: selectRow })
-          debugger
           if (code == 200) {
             this.getUserList()
             this.$refs.Ltable.clearSelection()

+ 4 - 2
vue.config.js

@@ -2,10 +2,12 @@ const { defineConfig } = require('@vue/cli-service')
 
 module.exports = defineConfig({
   transpileDependencies: true,
+  configureWebpack: {
+    devtool: 'source-map'
+  },
   devServer: {
-    host: '0.0.0.0', //可以忽略不写
     port: 8101, //它是用来修改你打开后的端口号的
-    open: true, //值为 true的话,项目启动时自动打开到浏览器里边, false不会打开
+    open: false, //值为 true的话,项目启动时自动打开到浏览器里边, false不会打开
     proxy: {
       ['/api/als']: {
         target: 'http://localhost:9090',