Forráskód Böngészése

fix: 增加数据裁剪时间

Gaokun Wang 1 napja
szülő
commit
91fb4c9911
3 módosított fájl, 122 hozzáadás és 104 törlés
  1. 11 5
      src/views/als/judgeFaultLogic/index.vue
  2. 5 3
      src/views/home/index.scss
  3. 106 96
      src/views/home/index.vue

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

@@ -52,8 +52,8 @@
         </el-pagination>
       </div>
       <!-- 添加或修改判故逻辑对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" :before-close="handleClose">
-        <el-form ref="formRef" :model="form" :rules="rules" label-width="80px">
+      <el-dialog :title="dialogTitle" top="30px" :visible.sync="dialogVisible" width="60%" :before-close="handleClose">
+        <el-form ref="formRef" :model="form" label-position="right" :rules="rules" label-width="110px">
           <el-form-item label="机型" prop="model">
             <el-select disabled v-model="form.model" placeholder="请选择机型">
               <el-option v-for="item in aircaftModelAll" :key="item.aircaftModelId" :label="item.aircaftModelName" :value="item.aircaftModelId"> </el-option>
@@ -67,9 +67,12 @@
           <el-form-item label="HMC码" prop="hmcCode">
             <el-input v-model="form.hmcCode" placeholder="请输入HMC码" />
           </el-form-item>
-          <el-form-item label="HMC码参数" label-width="100px" prop="attribute1">
+          <el-form-item label="HMC码参数" prop="attribute1">
             <el-input v-model="form.attribute1" type="textarea" :rows="2" placeholder="请输入HMC码参数,必须带上“时间”参数,如:时间,发动机排气温度,燃油流量,机匣频率" />
           </el-form-item>
+          <el-form-item label="数据裁剪时间" prop="attribute2" :rules="[{ type: 'number', message: '必须为数字值' }]">
+            <el-input v-model="form.attribute2" placeholder="请输入数据裁剪时间,单位分钟" />
+          </el-form-item>
           <el-form-item label="判据名称" prop="name">
             <el-input v-model="form.name" placeholder="请输入判据名称" />
           </el-form-item>
@@ -156,6 +159,7 @@ import { handleTree } from '../utils/common'
 import { getAirConfiguration } from '@/api/als/airConfiguration'
 import { getAirConfigParams } from '@/api/als/airConfigParams'
 import { useMessage } from '@/utils/element-ui'
+import { number } from 'echarts'
 
 export default {
   name: 'JudgeFaultLogic',
@@ -213,7 +217,8 @@ export default {
         sysId: '',
         name: '',
         remarks: '',
-        attribute1: ''
+        attribute1: '',
+        attribute2: ''
       },
       rules: {
         model: [{ required: true, message: '机型不能为空', trigger: 'change' }],
@@ -347,7 +352,8 @@ export default {
         sysId: '',
         name: '',
         remarks: '',
-        attribute1: ''
+        attribute1: '',
+        attribute2: ''
       }
     },
     async handUpdate(row) {

+ 5 - 3
src/views/home/index.scss

@@ -201,7 +201,7 @@
 
 .tabl-box {
   padding-top: 10px;
-  height: calc(100% - 10px);
+  height: calc(100% - 60px);
 }
 
 ::v-deep .air .c-card-content-echars{
@@ -220,7 +220,6 @@
     display: flex;
     justify-content:space-around;
     flex-wrap: wrap;
-    padding: 20px 0px;
   }
 
   .cell{
@@ -234,7 +233,10 @@
       height: 100%;
       float: right;
       text-align: center;
-      cursor: pointer;
+      .in_s {
+        cursor: pointer;
+
+      }
     }
   }
 }

+ 106 - 96
src/views/home/index.vue

@@ -1,103 +1,109 @@
 <template>
   <div class="view-home">
-    <el-row>
-      <el-col :span="24" style="margin-bottom: 15px">
-        <Card title="飞机状态" class="air">
-          <template slot="content">
-            <div class="airStatus">
-              <div class="firstRow">
-                <div v-for="item of airMap" :key="item.aircaftCatalogId" class="cell">
-                  <el-image style="width: 80px; height: 80px; margin-top: 10px" :src="imgUrl"></el-image>
-                  <el-popover popper-class="popper-class" placement="right-start" width="500" trigger="hover">
-                    <el-descriptions title="飞机信息">
-                      <el-descriptions-item label="故障日期">{{ item.statisticsDate }}</el-descriptions-item>
-                      <el-descriptions-item label="中队">{{ item.squadron }}</el-descriptions-item>
-                      <el-descriptions-item label="飞机号">{{ item.aircaftCatalogCode }}</el-descriptions-item>
-                      <el-descriptions-item label="故障件名称">{{ item.faultyPartsName }}</el-descriptions-item>
-                      <el-descriptions-item label="故障件型别">{{ item.faultyPartsModel }}</el-descriptions-item>
-                      <el-descriptions-item label="故障件号码">{{ item.faultyPartsNum }}</el-descriptions-item>
-                    </el-descriptions>
+    <el-tabs v-model="activeName" @tab-click="handleClickTab">
+      <el-tab-pane label="机务面板" name="1">
+        <el-row>
+          <el-col :span="24" style="margin-bottom: 15px">
+            <Card title="飞机状态" class="air">
+              <template slot="content">
+                <div class="airStatus">
+                  <div class="firstRow">
+                    <div v-for="item of airMap" :key="item.aircaftCatalogId" class="cell">
+                      <el-image style="width: 80px; height: 80px; margin-top: 10px" :src="imgUrl"></el-image>
+                      <div slot="reference" class="info">
+                        <p>{{ item.aircaftCatalogCode }}</p>
+                        <el-popover popper-class="popper-class" placement="right-start" width="500" trigger="hover">
+                          <el-descriptions title="飞机信息">
+                            <el-descriptions-item label="故障日期">{{ item.statisticsDate }}</el-descriptions-item>
+                            <el-descriptions-item label="中队">{{ item.squadron }}</el-descriptions-item>
+                            <el-descriptions-item label="飞机号">{{ item.aircaftCatalogCode }}</el-descriptions-item>
+                            <el-descriptions-item label="故障件名称">{{ item.faultyPartsName }}</el-descriptions-item>
+                            <el-descriptions-item label="故障件型别">{{ item.faultyPartsModel }}</el-descriptions-item>
+                            <el-descriptions-item label="故障件号码">{{ item.faultyPartsNum }}</el-descriptions-item>
+                          </el-descriptions>
 
-                    <div slot="reference" class="info">
-                      <p>{{ item.aircaftCatalogCode }}</p>
-                      <span :class="item.healthStatus == '故障' ? 'warning-state' : 'success-state'">{{ item.healthStatus }} </span>
+                          <span slot="reference" :class="item.healthStatus == '故障' ? 'warning-state in_s' : 'success-state in_s'">{{ item.healthStatus }} </span>
+                        </el-popover>
+                      </div>
                     </div>
-                  </el-popover>
+                  </div>
                 </div>
-              </div>
-            </div>
-          </template>
-        </Card>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="24" style="margin-bottom: 65px">
-        <Card title="维修状态">
-          <template slot="content">
-            <LTable
-              ref="maintainTable"
-              :scroll="true"
-              :defaultFetch="true"
-              :columns="maintainColumns"
-              :showColumnSetting="false"
-              :dataSource="maintainTableData"
-              :options="maintainOptions"
-              :fetch="maintainFetchTableData"
-              :pagination="tableRequset"
-              class="tabl-box"
-            />
-          </template>
-        </Card>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="12" style="margin-bottom: 15px">
-        <Card title="历年任务">
-          <template slot="content">
-            <LTable ref="table" :defaultFetch="true" :showColumnSetting="false" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" class="tabl-box" />
-          </template>
-        </Card>
-      </el-col>
-      <el-col :span="12" style="margin-bottom: 15px">
-        <Card title="指标分析">
-          <template slot="content">
-            <div class="baseBar-box" ref="echartTop"></div>
-          </template>
-        </Card>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="8">
-        <Card title="经济指标分析-项">
-          <template slot="content">
-            <el-select v-model="model" style="margin: 10px" placeholder="请选择" @change="handleChange(1)">
-              <el-option v-for="(item, index) in selectOptions" :key="index" :label="item.avmatCatalogName" :value="item.avmatCatalogCode"> </el-option>
-            </el-select>
-            <div class="baseBar-box" ref="echartBottomLeft"></div>
-          </template>
-        </Card>
-      </el-col>
-      <el-col :span="8">
-        <Card title="经济指标分析-件">
-          <template slot="content">
-            <el-select v-model="model2" style="margin: 10px" placeholder="请选择" @change="handleChange(2)">
-              <el-option v-for="(item, index) in selectOptions" :key="index" :label="item.avmatCatalogName" :value="item.avmatCatalogCode"> </el-option>
-            </el-select>
-            <div class="baseBar-box" ref="echartBottomCenter"></div>
-          </template>
-        </Card>
-      </el-col>
-      <el-col :span="8">
-        <Card title="经济指标分析-金额">
-          <template slot="content">
-            <el-select v-model="model3" style="margin: 10px" placeholder="请选择" @change="handleChange(3)">
-              <el-option v-for="(item, index) in selectOptions" :key="index" :label="item.avmatCatalogName" :value="item.avmatCatalogCode"> </el-option>
-            </el-select>
-            <div class="baseBar-box" ref="echartBottomRight"></div>
-          </template>
-        </Card>
-      </el-col>
-    </el-row>
+              </template>
+            </Card>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24" style="margin-bottom: 65px">
+            <Card title="维修状态">
+              <template slot="content">
+                <LTable
+                  ref="maintainTable"
+                  :scroll="true"
+                  :defaultFetch="true"
+                  :columns="maintainColumns"
+                  :showColumnSetting="false"
+                  :dataSource="maintainTableData"
+                  :options="maintainOptions"
+                  :fetch="maintainFetchTableData"
+                  :pagination="tableRequset"
+                  class="tabl-box"
+                />
+              </template>
+            </Card>
+          </el-col>
+        </el-row>
+      </el-tab-pane>
+      <el-tab-pane label="航材面板" lazy="true" name="2">
+        <el-row>
+          <el-col :span="12" style="margin-bottom: 15px">
+            <Card title="历年任务">
+              <template slot="content">
+                <LTable ref="table" :defaultFetch="true" :showColumnSetting="false" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" class="tabl-box" />
+              </template>
+            </Card>
+          </el-col>
+          <el-col :span="12" style="margin-bottom: 15px">
+            <Card title="指标分析">
+              <template slot="content">
+                <div class="baseBar-box" ref="echartTop"></div>
+              </template>
+            </Card>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <Card title="经济指标分析-项">
+              <template slot="content">
+                <el-select v-model="model" style="margin: 10px" placeholder="请选择" @change="handleChange(1)">
+                  <el-option v-for="(item, index) in selectOptions" :key="index" :label="item.avmatCatalogName" :value="item.avmatCatalogCode"> </el-option>
+                </el-select>
+                <div class="baseBar-box" ref="echartBottomLeft"></div>
+              </template>
+            </Card>
+          </el-col>
+          <el-col :span="8">
+            <Card title="经济指标分析-件">
+              <template slot="content">
+                <el-select v-model="model2" style="margin: 10px" placeholder="请选择" @change="handleChange(2)">
+                  <el-option v-for="(item, index) in selectOptions" :key="index" :label="item.avmatCatalogName" :value="item.avmatCatalogCode"> </el-option>
+                </el-select>
+                <div class="baseBar-box" ref="echartBottomCenter"></div>
+              </template>
+            </Card>
+          </el-col>
+          <el-col :span="8">
+            <Card title="经济指标分析-金额">
+              <template slot="content">
+                <el-select v-model="model3" style="margin: 10px" placeholder="请选择" @change="handleChange(3)">
+                  <el-option v-for="(item, index) in selectOptions" :key="index" :label="item.avmatCatalogName" :value="item.avmatCatalogCode"> </el-option>
+                </el-select>
+                <div class="baseBar-box" ref="echartBottomRight"></div>
+              </template>
+            </Card>
+          </el-col>
+        </el-row>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 
@@ -115,6 +121,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      activeName: '1',
       tableData: [],
       maintainTableData: [],
       options,
@@ -145,9 +152,12 @@ export default {
   },
   mounted() {
     this.getTreeList()
-    this.initChart()
+    // this.initChart()
   },
   methods: {
+    handleClickTab() {
+      // this.initChart()
+    },
     initChart() {
       this.fetchTermChart()
       this.fetchPieceChart()