3 次代碼提交 abc8ec2221 ... d2d3148332

作者 SHA1 備註 提交日期
  fuyanting d2d3148332 飞参前端 1 年之前
  fuyanting 9635280ff3 11 1 年之前
  fuyanting ac9ab32080 飞参 1 年之前

+ 42 - 0
package-lock.json

@@ -4327,6 +4327,15 @@
         "node": ">=8"
       }
     },
+    "node_modules/bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "optional": true,
+      "dependencies": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
     "node_modules/bluebird": {
       "version": "3.7.2",
       "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz",
@@ -8607,6 +8616,12 @@
       "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
       "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
     },
+    "node_modules/file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "optional": true
+    },
     "node_modules/filesize": {
       "version": "3.6.1",
       "resolved": "https://registry.npmmirror.com/filesize/-/filesize-3.6.1.tgz",
@@ -12188,6 +12203,12 @@
       "resolved": "https://registry.npmmirror.com/namespace-emitter/-/namespace-emitter-2.0.1.tgz",
       "integrity": "sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g=="
     },
+    "node_modules/nan": {
+      "version": "2.18.0",
+      "resolved": "https://registry.npmmirror.com/nan/-/nan-2.18.0.tgz",
+      "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
+      "optional": true
+    },
     "node_modules/nanoid": {
       "version": "3.3.6",
       "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
@@ -23370,6 +23391,15 @@
       "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
       "devOptional": true
     },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "optional": true,
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
     "bluebird": {
       "version": "3.7.2",
       "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz",
@@ -26899,6 +26929,12 @@
       "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
       "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
     },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "optional": true
+    },
     "filesize": {
       "version": "3.6.1",
       "resolved": "https://registry.npmmirror.com/filesize/-/filesize-3.6.1.tgz",
@@ -29818,6 +29854,12 @@
       "resolved": "https://registry.npmmirror.com/namespace-emitter/-/namespace-emitter-2.0.1.tgz",
       "integrity": "sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g=="
     },
+    "nan": {
+      "version": "2.18.0",
+      "resolved": "https://registry.npmmirror.com/nan/-/nan-2.18.0.tgz",
+      "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
+      "optional": true
+    },
     "nanoid": {
       "version": "3.3.6",
       "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",

+ 63 - 0
src/api/aircraft/management.js

@@ -0,0 +1,63 @@
+import request from '@/utils/request'
+
+// 查询飞参数据管理列表
+export function listManagement(query) {
+  return request({
+    url: '/aircraft/management/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询飞参数据管理详细
+export function getManagement(id) {
+  return request({
+    url: '/aircraft/management/' + id,
+    method: 'get'
+  })
+}
+
+// 新增飞参数据管理
+export function addManagement(data) {
+  return request({
+    url: '/aircraft/management',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改飞参数据管理
+export function updateManagement(data) {
+  return request({
+    url: '/aircraft/management',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除飞参数据管理
+export function delManagement(id) {
+  return request({
+    url: '/aircraft/management/' + id,
+    method: 'delete'
+  })
+}
+
+export function runairtopre(data) {
+  return request({
+    url: '/aircraft/management/runairtopre',
+    method: 'put',
+    data: data
+  })
+}
+
+export function getfilecontent(filepath) {
+  return request({
+    url: '/aircraft/management/getfilecontent',
+    method: 'get',
+    params: {
+      filepath: filepath // 将filepath作为查询参数传递给后端
+    }
+  })
+}
+

+ 44 - 0
src/api/system/management.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询飞参数据列表
+export function listManagement(query) {
+  return request({
+    url: '/system/management/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询飞参数据详细
+export function getManagement(id) {
+  return request({
+    url: '/system/management/' + id,
+    method: 'get'
+  })
+}
+
+// 新增飞参数据
+export function addManagement(data) {
+  return request({
+    url: '/system/management',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改飞参数据
+export function updateManagement(data) {
+  return request({
+    url: '/system/management',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除飞参数据
+export function delManagement(id) {
+  return request({
+    url: '/system/management/' + id,
+    method: 'delete'
+  })
+}

+ 1 - 0
src/assets/icons/svg/aircraft (1).svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1705744832668" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4420" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.7952 891.5968c-20.1728-56.1152-92.416-244.48-122.368-322.4064-56.4736 37.7344-119.5008 73.472-179.8144 98.7136-18.7392 65.536-56.0128 189.9008-74.0352 206.4896-30.9248 28.5184-42.5984 24.832-47.36-14.2848-4.7616-39.1168-24.832-165.6832-24.832-165.6832s-110.6944-62.4128-145.408-80.2816-34.1504-30.2592 2.9184-49.8688c21.6064-11.4176 149.8624-4.352 217.1904 0.256 44.0832-48.6912 98.8672-96.3584 153.2416-137.1648-62.208-55.0912-212.48-188.16-257.7408-226.5088-39.7312-33.6896 4.0448-40.8064 4.0448-40.8064 19.968-3.584 62.5664-6.7584 83.3536-0.4608 129.2288 39.0656 329.8304 105.8816 376.9856 121.6512l59.4944-42.0352c240.7424-170.496 301.4144-132.7616 312.8832-116.224s25.7536 87.0912-214.9888 257.6384l-59.392 42.1376c-1.4848 50.176-8.0384 263.7312-15.9232 399.9232-1.28 21.9136-18.7904 61.3376-28.928 79.0528-0.0512 0-21.6576 39.168-39.3216-10.1376z" fill="#ffffff" p-id="4421"></path></svg>

File diff suppressed because it is too large
+ 0 - 0
src/assets/icons/svg/aircraft.svg


+ 1 - 0
src/assets/icons/svg/飞机.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1705744256124" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M839.21 184.785c-30.392-30.378-79.84-30.383-110.223 0.005l-96.801 96.796-341.126-85.374-97.803 97.803 284.742 141.759-61.763 61.763-175.058-32.429L162 544.286l226.046 91.664L479.713 862l79.178-79.188-32.429-175.048 61.763-61.763 141.759 284.732 97.803-97.793-85.374-341.126 96.801-96.801c30.383-30.388 30.383-79.836-0.004-110.228z m-41.059 69.168L678.093 374.006l85.374 341.126-17.472 17.468-141.758-284.737-140.44 140.44 27.254 147.127-58.417-144.065-144.065-58.417 147.127 27.254 140.44-140.44-284.741-141.758 17.472-17.472 341.127 85.374 120.053-120.053c7.746-7.746 20.355-7.751 28.1-0.005 7.745 7.751 7.745 20.355 0.004 28.105z" fill="#7F8080" p-id="4473"></path></svg>

+ 22 - 0
src/components/FileUpload/index.vue

@@ -78,6 +78,9 @@ export default {
         Authorization: "Bearer " + getToken(),
       },
       fileList: [],
+     uploadStartTime: null, // 记录上传开始时间
+     uploadEndTime: null, // 记录上传结束时间
+     filestate:null,//记录是否上传失败,成功返回1,失败返回-1
     };
   },
   watch: {
@@ -128,6 +131,7 @@ export default {
           this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
           return false;
         }
+        this.uploadStartTime = this.formatDate(new Date()); // 记录上传开始时间并格式化
       }
       // 校检文件大小
       if (this.fileSize) {
@@ -147,15 +151,24 @@ export default {
     },
     // 上传失败
     handleUploadError(err) {
+      this.uploadEndTime=null;
+      this.uploadStartTime=null;
+      this.filestate="-1";
+      this.$emit('upload-error', this.uploadStartTime, this.uploadEndTime,this.filestate);
       this.$modal.msgError("上传文件失败,请重试");
       this.$modal.closeLoading()
     },
     // 上传成功回调
     handleUploadSuccess(res, file) {
       if (res.code === 200) {
+        this.uploadEndTime = this.formatDate(new Date()); // 记录上传结束时间并格式化
+        this.filestate="1";
+        this.$emit('success', this.uploadStartTime, this.uploadEndTime,this.filestate);
         this.uploadList.push({ name: res.fileName, url: res.fileName, originalFilename: res.originalFilename});
         this.uploadedSuccessfully();
       } else {
+        this.uploadEndTime=null;
+        this.uploadStartTime=null;
         this.number--;
         this.$modal.closeLoading();
         this.$modal.msgError(res.msg);
@@ -163,6 +176,15 @@ export default {
         this.uploadedSuccessfully();
       }
     },
+     formatDate(date) {
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, '0');
+      const day = String(date.getDate()).padStart(2, '0');
+      const hours = String(date.getHours()).padStart(2, '0');
+      const minutes = String(date.getMinutes()).padStart(2, '0');
+      const seconds = String(date.getSeconds()).padStart(2, '0');
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+   },
     // 删除文件
     handleDelete(index) {
       this.fileList.splice(index, 1);

+ 417 - 0
src/views/aircraft/management/index.vue

@@ -0,0 +1,417 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="型号" prop="typeId">
+        <el-input
+          v-model="queryParams.typeId"
+          placeholder="请输入型号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="机号" prop="aircraftId">
+        <el-input
+          v-model="queryParams.aircraftId"
+          placeholder="请输入机号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="架次" prop="sortie">
+        <el-input
+          v-model="queryParams.sortie"
+          placeholder="请输入架次"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['aircraft:management:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['aircraft:management:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['aircraft:management:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['aircraft:management:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" align="center" prop="id" />
+      <el-table-column label="型号" align="center" prop="typeId" />
+      <el-table-column label="机号" align="center" prop="aircraftId" />
+      <el-table-column label="架次" align="center" prop="sortie" />
+      <el-table-column label="飞行日期" align="center" prop="flyDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.flyDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark" />
+      <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-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['aircraft:management:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['aircraft:management:remove']"
+          >删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleView(scope.row)"
+            v-hasPermi="['aircraft:management:query']"
+          >详情</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改飞参数据管理对话框 -->
+    <el-dialog :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="typeId">
+          <el-input v-model="form.typeId" placeholder="请输入型号" />
+        </el-form-item>
+        <el-form-item label="机号" prop="aircraftId">
+          <el-input v-model="form.aircraftId" placeholder="请输入机号" />
+        </el-form-item>
+        <el-form-item label="架次" prop="sortie">
+          <el-input v-model="form.sortie" placeholder="请输入架次" />
+        </el-form-item>
+        <el-form-item label="飞行日期" prop="flyDate">
+          <el-date-picker clearable
+            v-model="form.flyDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择飞行日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="飞参数据文件">
+          <file-upload v-model="form.airparaPath" :fileType="uploadFileType" :limit='1' @success="handleUploadSuccess" @upload-error="handleUploadError"/>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div 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="aircraftdetailOpenTitle" v-if="aircraftdetailOpen" :visible.sync="aircraftdetailOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false" @close="closedaircraftdetailDialog">
+       <aircraftdetail :aircraft="aircraft" :aircraftdetailOpen.sync="aircraftdetailOpen"></aircraftdetail>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listManagement, getManagement, delManagement, addManagement, updateManagement } from "@/api/aircraft/management";
+import aircraftdetail from "@/views/aircraftdetail"
+export default {
+  name: "Management",
+  dicts: ['preprocessdata', 'system_health_data', 'health_factors', 'aircraftparameter_upload'],
+  components: { aircraftdetail},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 飞参数据管理表格数据
+      managementList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      uploadFileType: ["csv"],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        typeId: null,
+        aircraftId: null,
+        sortie: null,
+      },
+      // 表单参数
+      form: {
+        id: null,
+        typeId: null,
+        aircraftId: null,
+        sortie: null,
+        flyDate: null,
+        airparaPath: null,
+        airparaState: "0",
+        airparaStarttime: null,
+        airparaEndtime: null,
+        uploadStartTime: null, 
+        uploadEndTime: null, // 用于显示文件上传成功的时间
+        filestate:null,//文件上传是否成功
+        airparaTime: null,
+        pretreatmentPath: null,
+        pretreatmentState: "0",
+        pretreatmentStarttime: null,
+        pretreatmentEndtime: null,
+        pretreatmentTime: null,
+        healthfactorsPath: null,
+        healthfactorsState: "0",
+        healthfactorsStarttime: null,
+        healthfactorsEndtime: null,
+        healthfactorsTime: null,
+        systemhealthPath: null,
+        systemhealthState: "0",
+        systemhealthStarttime: null,
+        systemhealthEndtime: null,
+        systemhealthTime: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
+        state:"-1",
+      },
+      // 表单校验
+      rules: {
+        airparaPath: [
+          { required: true, message: '飞参数据文件不能为空', trigger: 'blur'}
+        ],
+      },
+      aircraftdetailOpenTitle:"",
+      aircraftdetailOpen: false,
+      aircraft: {},
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询飞参数据管理列表 */
+    handleUploadSuccess(uploadStartTime, uploadEndTime,filestate) {
+      this.form.airparaStarttime = uploadStartTime;
+      this.form.airparaEndtime = uploadEndTime;
+      this.form.filestate=filestate;
+    },
+    handleUploadError(uploadStartTime,uploadEndTime,filestate) {
+      this.form.airparaStarttime = uploadStartTime;
+      this.form.airparaEndtime = uploadEndTime;
+      this.form.filestate=filestate;
+    },
+    getList() {
+      this.loading = true;
+      listManagement(this.queryParams).then(response => {
+        this.managementList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        typeId: null,
+        aircraftId: null,
+        sortie: null,
+        flyDate: null,
+        airparaPath: null,
+        airparaState: "0",
+        airparaStarttime: null,
+        airparaEndtime: null,
+        airparaTime: null,
+        pretreatmentPath: null,
+        pretreatmentState: "0",
+        pretreatmentStarttime: null,
+        pretreatmentEndtime: null,
+        pretreatmentTime: null,
+        healthfactorsPath: null,
+        healthfactorsState: "0",
+        healthfactorsStarttime: null,
+        healthfactorsEndtime: null,
+        healthfactorsTime: null,
+        systemhealthPath: null,
+        systemhealthState: "0",
+        systemhealthStarttime: null,
+        systemhealthEndtime: null,
+        systemhealthTime: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
+        state:"-1",
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加飞参数据";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getManagement(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改飞参数据";
+      });
+    },
+    handleView(row){
+      //todo view
+      this.aircraftdetailOpen = true;
+      this.aircraft = row;
+      this.aircraftdetailOpenTitle = row.id;
+      // alert("开发ing")
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if(this.form.filestate == "1"){
+           const startTime = new Date(this.form.airparaStarttime);
+          const endTime = new Date(this.form.airparaEndtime);
+          const timeDiff = Math.abs(endTime - startTime);
+          const airparaTime = Math.ceil(timeDiff / (1000 * 60)); // 计算耗费时间(分钟)
+        this.form.airparaTime=airparaTime;
+        if(this.form.airparaStarttime !=null && this.form.airparaEndtime != null){
+          this.form.state = '0';
+          this.form.airparaState = '2';
+        }else if(this.form.airparaStarttime !=null && this.form.airparaEndtime == null){
+          this.form.state = '0';
+          this.form.airparaState = '1';
+        }else if(this.form.airparaStarttime ==null && this.form.airparaEndtime == null){
+          this.form.state = '-1';
+          this.form.airparaState = '0';
+        }
+        }else if(this.form.filestate == "-1"){
+          this.form.state = '-1';
+          this.form.airparaState = '3';
+        }else if(this.form.filestate == null){
+          this.form.state = '0';
+          this.form.airparaState = '0';
+        }      
+        if (valid) {
+          if (this.form.id != null) {
+            updateManagement(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addManagement(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除飞参数据管理编号为"' + ids + '"的数据项?').then(function() {
+        return delManagement(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('aircraft/management/export', {
+        ...this.queryParams
+      }, `management_${new Date().getTime()}.xlsx`)
+    },
+    closedaircraftdetailDialog(){
+      // 暂时不处理任何事件
+    },
+  }
+};
+</script>

+ 437 - 0
src/views/aircraftdetail/index.vue

@@ -0,0 +1,437 @@
+<template>
+  <div>
+    <el-container>
+      <el-header>
+        <el-steps :active="parseInt(aircraft.state)" simple direction finish-status="wait" process-status="finish">
+          <el-step title="飞参数据"></el-step>
+          <el-step title="预处理"></el-step>
+          <el-step title="健康参数表征"></el-step>
+          <el-step title="综合健康状态"></el-step>
+        </el-steps>
+      </el-header>
+      <el-main>
+       <el-table v-loading="loading" :data="groupedData">
+  <el-table-column  prop="label" label="数据" align="center">
+    <template slot-scope="scope">{{ scope.row.label }}</template>
+  </el-table-column>
+  <el-table-column  prop="state" label="状态" align="center">
+    <template slot-scope="scope">
+      <dict-tag :options="getDictType(scope.row.label)" :value="scope.row.state"/> 
+    </template>
+  </el-table-column>
+  <el-table-column prop="starttime" label="开始时间" align="center" width="180">
+    <template slot-scope="scope">{{ scope.row.starttime }}</template>
+  </el-table-column>
+  <el-table-column prop="endtime" label="结束时间" align="center" width="180">
+    <template slot-scope="scope">{{ scope.row.endtime }}</template>
+  </el-table-column>
+  <el-table-column prop="time" label="花费时间(s)" align="center" width="180">
+    <template slot-scope="scope">{{ scope.row.time }}</template>
+  </el-table-column>
+  <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+    <template slot-scope="scope">
+     <!-- 可视化按钮 -->
+    <!-- <el-button v-if="scope.row.label === '飞参数据' && scope.row.state === '2'" type="primary" size="mini">可视化</el-button> -->
+     <el-button
+        v-show="scope.row.label === '飞参数据' && scope.row.state === '2'"
+        size="medium"
+        type="text"
+        icon="el-icon-monitor"
+        @click="viewResult(aircraftdetail.airparaPath)"
+     >可视化</el-button>
+     <el-button 
+        v-show="scope.$index > 0 && scope.row.state != '2' && scope.row.state != '1'&& scope.row.label === '预处理数据' && groupedData[scope.$index - 1].state === '2' && groupedData[scope.$index - 1].label === '飞参数据'"
+        size="medium"
+        type="text"
+        icon="el-icon-video-play"
+        @click="handlerun"
+    >开始运行</el-button>
+    </template>
+  </el-table-column>
+</el-table>
+      </el-main>
+    </el-container>
+<el-dialog :title="DatavisTitle" :visible.sync="openDatavis" width="1200px">
+  <template #title>
+    <div class="dialog-title">
+      <div class="title-text">{{ DatavisTitle }}</div>
+      <div class="button-container">
+        <el-button
+        size="medium"
+        type="text"
+        icon="el-icon-view"
+        @click="selectcolumn"
+     >数据可视化选择</el-button>
+      </div>
+    </div>
+  </template>
+  <Datavis :filepath="filepath" :dataOption="dataOption" v-if="openDatavis"></Datavis>
+</el-dialog>
+
+
+
+<el-dialog :title="datacolumntitle" :visible.sync="opendatacolumn" width="600px" @open="onOpen" @close="onClose">
+      <el-row :gutter="15">
+        <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
+          <el-col :span="12">
+            <el-row type="flex" justify="start" align="top">
+              <el-col :span="12">
+                <el-form-item label="数据项" prop="">
+                   <el-checkbox v-for="item in allOption" v-show="!item.checked" :key="item.id" :label="item.id"  v-model="item.checked" @change="checkedBoxChange">
+                    <span >{{ item.label }}</span>
+                   </el-checkbox>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-col>
+          <el-col :span="12">
+            <el-row type="flex" justify="start" align="top">
+              <el-col :span="12">
+                <el-form-item label="展示数据项" prop="">
+                  <div>
+                    <el-checkbox v-for="item in allOption"  v-show="item.checked" :key="item.id" :label="item.id"   v-model="item.checked" @change="checkedBoxChange">
+                      <span>{{ item.label }}</span>
+                    </el-checkbox>
+
+                  </div>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-col>
+        </el-form>
+      </el-row>
+      <div slot="footer">
+        <el-button type="primary" @click="close">取消</el-button>
+        <el-button type="primary" @click="confirm">确定</el-button>
+      </div>
+    </el-dialog>
+</div>
+</template>
+
+<script>
+import { listManagement, getManagement, delManagement, addManagement, updateManagement,runairtopre } from "@/api/aircraft/management";
+
+import Datavis from "@/views/maintenance/offLineDataAnalysis/Datavis"
+import axios from "axios";
+export default {
+  name: "aircraftdetail",
+  dicts: ['preprocessdata', 'system_health_data', 'health_factors', 'aircraftparameter_upload'],
+  components: { Datavis },
+  props: {
+    aircraft: {
+      type: Object,
+    },
+    aircraftdetailOpen: {
+      type: Boolean,
+    },
+  },
+
+  data() {
+    return {
+      data: [], // 初始化为空数组
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 知识抽取子任务表格数据
+      aircraftdetailList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 步骤
+      setp: 1,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        aircraftId: this.aircraft.id,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+      checked:true,
+      aircraftdetail: {},
+      openDatavis: false,
+      DatavisTitle: "",
+      aircraftdataview:{},
+      filepath:null,
+      opendatacolumn:false,
+      datacolumntitle:"",
+      chartData:[],
+      dataOption: [],
+      tempallOption:[],
+      allOption:[],
+      filterOption:[],
+      selectedItems: [],
+      isViewResultClicked: false,
+      checkedOptions: [],
+      noOptions:[],
+      noOption:[],     
+      checkOption:[]
+    };
+  },
+  created() {
+     this.getListByaircraftId();
+      
+  },
+
+  computed: {
+  groupedData() {
+    const data1 = {
+      label: "飞参数据",
+      state: this.aircraftdetail.airparaState,
+      starttime: this.aircraftdetail.airparaStarttime,
+      endtime: this.aircraftdetail.airparaEndtime,
+      time: this.aircraftdetail.airparaTime,
+    };
+
+    const data2 = {
+      label: "预处理数据",
+      state: this.aircraftdetail.pretreatmentState,
+      starttime: this.aircraftdetail.pretreatmentStarttime,
+      endtime: this.aircraftdetail.pretreatmentEndtime,
+      time: this.aircraftdetail.pretreatmentTime,
+    };
+
+    const data3 = {
+      label: "健康因子",
+      state: this.aircraftdetail.healthfactorsState,
+      starttime: this.aircraftdetail.healthfactorsStarttime,
+      endtime: this.aircraftdetail.healthfactorsEndtime,
+      time: this.aircraftdetail.healthfactorsTime,
+    };
+
+    const data4 = {
+      label: "系统级健康数据",
+      state: this.aircraftdetail.systemhealthState,
+      starttime: this.aircraftdetail.systemhealthStarttime,
+      endtime: this.aircraftdetail.systemhealthEndtime,
+      time: this.aircraftdetail.systemhealthTime,
+    };
+
+    return [data1, data2, data3, data4];
+  },
+  filterOption() { // 未选中的数据项
+      return this.dataOption.filter(item => !item.checked)
+  }
+
+},
+  methods: {
+    getDictType(label) {
+    if (label === '飞参数据') {
+      return this.dict.type.aircraftparameter_upload;
+    } else if (label === '预处理数据') {
+      return this.dict.type.preprocessdata;
+    } else if(label =='健康因子'){
+      return this.dict.type.health_factors;
+    }else if(label =='系统级健康数据'){
+      return this.dict.type.system_health_data;
+    }else{
+      return [];
+    }
+  },
+
+  
+    /** 查询指定id的飞机参数 */
+    getListByaircraftId() {
+      this.loading = true;
+     getManagement(this.queryParams.aircraftId).then(response => {
+        this.aircraftdetail = response.data;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    handlerun(){
+      const startTime = this.formatDate(new Date());
+      this.aircraftdetail.pretreatmentStarttime = startTime;
+      this.aircraftdetail.state ='1';
+      this.aircraftdetail.pretreatmentState = '1';
+      runairtopre(this.aircraftdetail).then(response => {
+        this.getListByaircraftId()
+      });
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        taskId: null,
+        type: null,
+        status: "0",
+        log: null,
+        completedDate: null,
+        costTime: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    // handleSelectionChange(selection) {
+    //   this.ids = selection.map(item => item.id)
+    //   this.single = selection.length!==1
+    //   this.multiple = !selection.length
+    // },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加知识抽取子任务";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getSubTask(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改知识抽取子任务";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateSubTask(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addSubTask(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    closeaircraftdetail() {
+      this.aircraftdetailOpen = false;
+    },
+    async getresponse(filepath){
+      const response = await axios.get(process.env.VUE_APP_BASE_API + filepath, { responseType: 'text' });
+      const csvData = response.data;
+      const rows = csvData.split('\n');
+      this.chartData = rows.map(row => row.split(','));
+      const firstRow = this.chartData[0]; // 获取第一行数据
+      this.allOption = firstRow.map((label, id) => ({ id, label })); // 将第一行数据转换为allOption格式
+      this.allOption = this.allOption.map(option => ({ ...option, checked: true }));
+      this.dataOption = this.allOption
+     this.tempallOption = JSON.parse(JSON.stringify(this.allOption)); // 保存allOption到tempallOption
+      // 设置默认选中状态
+  },
+    viewResult(filepath){
+      this.DatavisTitle = this.aircraftdetail.id + "---飞参数据可视化"
+      this.filepath = filepath
+      this.getresponse(filepath)
+      
+      this.openDatavis = true
+    },
+    selectcolumn(){
+      this.datacolumntitle = "数据可视化选择"
+      this.opendatacolumn = true;
+    },
+    cancel() {
+      this.opendatacolumn = false;
+    },
+     formatDate(date) {
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, '0');
+      const day = String(date.getDate()).padStart(2, '0');
+      const hours = String(date.getHours()).padStart(2, '0');
+      const minutes = String(date.getMinutes()).padStart(2, '0');
+      const seconds = String(date.getSeconds()).padStart(2, '0');
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+   },
+
+    onOpen() {
+      this.allOption = JSON.parse(JSON.stringify(this.tempallOption)); // 使用副本初始化allOption
+      
+      this.opendatacolumn = true;
+    },
+    onClose() {
+      
+      this.allOption = JSON.parse(JSON.stringify(this.tempallOption)); // 使用副本初始化allOption
+      this.opendatacolumn = false;
+
+    },
+    close() {
+      this.allOption = JSON.parse(JSON.stringify(this.tempallOption)); // 使用副本初始化allOption
+      this.opendatacolumn = false;
+    },
+ confirm() {
+  this.dataOption = this.allOption.filter(item => item.checked);
+  this.tempallOption = JSON.parse(JSON.stringify(this.allOption)); // 保存allOption到tempallOption
+  this.opendatacolumn = false;
+},
+   checkedBoxChange(){
+     this.$forceUpdate();  //强制渲染多选框样式,否则值变了样式没有选中
+},
+
+  }
+};
+</script>
+<style scoped>
+.el-dialog__body {
+  padding: 0px
+}
+.custom-icon-button ::v-deep .el-icon-caret-left {
+  font-size: 2em; /* 将图标字体大小增加一倍 */
+}
+.dialog-title {
+  display: flex;
+  align-items: center;
+}
+
+.title-text {
+  flex: 1;
+}
+
+.button-container {
+  margin-right: 28px; /* 调整按钮与标题之间的间距 */
+}
+
+.dialog-content {
+  display: flex;
+  flex-direction: column;
+}
+
+.top-block {
+  display: flex;
+  justify-content: space-between;
+  padding: 10px;
+}
+
+.border-block {
+  border: 1px solid #ccc;
+  flex-grow: 1;
+
+  margin: 5px;
+}
+
+</style>

+ 131 - 0
src/views/maintenance/offLineDataAnalysis/Datavis.vue

@@ -0,0 +1,131 @@
+<template>
+    <div ref="Datavis" :style="{ width: '100%', height: '360px' }"></div>
+</template>
+
+<script>
+import * as echarts from 'echarts';
+import Papa from 'papaparse';
+import { listManagement, getManagement, delManagement, addManagement, updateManagement,runairtopre ,getfilecontent} from "@/api/aircraft/management";
+import axios from "axios";
+export default {
+ props: {
+    aircraftdataview: {
+      type: Object,
+    },
+    filepath:null,
+    dataOption:[],
+    openDatavis: {
+      type: Boolean,
+    },
+  },
+  data() {
+    return {
+      display: false,
+      Datavis: null,
+      chartData: [], // 定义空数组用于保存CSV数据
+    };
+  },
+  computed: {
+    selectedIds() {
+      return this.dataOption.map((item) => item.id);
+    },
+  },
+ 
+  methods: {
+createDatavis() {
+      const xAxisData = Array.from({ length: this.chartData.length - 1 }, (_, i) => i + 1); // 生成从1到chartData行数-1的数组作为横坐标数据
+      const option = {
+        animationDuration: 3000,
+        legend: {
+          textStyle: {
+            color: 'white',
+          },
+        },
+        yAxis: {
+          axisLabel: {
+            color: 'white',
+          },
+          nameTextStyle: {
+            color: 'white',
+          },
+        },
+        series: [],
+        xAxis: {
+          data: xAxisData,
+        },
+      };
+
+      const usedColors = []; // 用于存储已使用的颜色
+      // 将每一列数据都添加到折线图中
+
+      if(this.chartData.length >0 ){
+        for (let i = 0; i < this.chartData[0].length; i++) {
+                const columnId = i; // 列id就是i
+                if (!this.selectedIds.includes(columnId)) { // 如果当前列的id不在selectedIds中,则跳过该列
+                  continue;
+                }
+
+                const seriesData = this.chartData.slice(1).map((row) => parseFloat(row[columnId])); // 获取y轴数据,从第二行开始的第i列的数据
+                let color;
+                do {
+                  color = this.getRandomColor(); // 随机生成颜色
+                } while (usedColors.includes(color)); // 如果生成的颜色已经被使用过,则重新生成
+                usedColors.push(color); // 将颜色添加到已使用的颜色数组中
+                
+                option.series.push({
+                  name: this.dataOption.find((item) => item.id === columnId).label, // 使用对应列的名称作为折线的名称
+                  data: seriesData,
+                  type: 'line',
+                  itemStyle: {
+                    color: color, // 随机生成折线的颜色
+                  },
+                  animationEasing: 'linear',
+                  animationDelay: (idx) => idx * 8,
+                });
+              }
+      }
+  
+
+     
+
+      this.Datavis.setOption(option);
+    },
+getRandomColor() {
+  const letters = '0123456789ABCDEF';
+  let color = '#';
+  for (let i = 0; i < 6; i++) {
+    color += letters[Math.floor(Math.random() * 16)];
+  }
+  return color;
+},
+  async getresponse(){
+    const response = await axios.get(process.env.VUE_APP_BASE_API + this.filepath, { responseType: 'text' });
+    const csvData = response.data;
+
+    const rows = csvData.split('\n');
+    this.chartData = rows.map(row => row.split(','));
+
+     this.createDatavis()
+  },
+},
+  mounted() {
+    
+    this.Datavis = echarts.init(this.$refs.Datavis);
+    this.getresponse()
+   
+  },
+  watch: {
+  dataOption(newValue) {
+    this.Datavis.dispose();
+    this.Datavis = echarts.init(this.$refs.Datavis);
+    this.createDatavis();
+  }
+},
+  beforeUnmount() {
+    if (this.Datavis) {
+      this.Datavis.dispose();
+      this.Datavis = null;
+    }
+  },
+};
+</script>

Some files were not shown because too many files changed in this diff