src/components/mission/MissionManage.vue
@@ -1,13 +1,17 @@
<template>
  <el-button
  <!-- <el-button
    type="primary"
    icon="Memo"
    class="el-button-custom p-events-auto"
    @click="dialogVisible = !dialogVisible"
  >
    任务管理
  </el-button>
  <CardDialog v-model="dialogVisible" title="走航任务管理">
  </el-button> -->
  <CardDialog
    :model-value="modelValue"
    @changed="handleChange"
    title="走航任务管理"
  >
    <el-row class="mission-table">
      <el-col :span="20">
        <el-table
@@ -50,14 +54,14 @@
                @click="deleteMission(row)"
                >删除</el-button
              >
              <el-button
              <!-- <el-button
                :loading="row.downloadLoading"
                type="primary"
                size="small"
                class="el-button-custom"
                @click="downloadReport(row)"
                >报告</el-button
              >
              > -->
            </template>
          </el-table-column>
        </el-table>
@@ -102,7 +106,10 @@
    const { loading, fetchData } = useFetchData();
    return { loading, fetchData };
  },
  props: {},
  props: {
    modelValue: Boolean
  },
  emits: ['update:modelValue'],
  data() {
    return {
      dialogVisible: false,
@@ -114,6 +121,9 @@
    ...mapStores(useMissionStore)
  },
  methods: {
    handleChange(value) {
      this.$emit('update:modelValue', value);
    },
    deleteMission(row) {
      this.onConfirm = () => {
        this.missionStore.deleteMission(row.missionCode);
@@ -126,6 +136,7 @@
        .downloadReport(row.missionCode)
        .finally(() => (row.downloadLoading = false));
    },
    // eslint-disable-next-line no-unused-vars
    timeFormatter(row, col, cellValue, index) {
      return moment(cellValue).format('YYYY-MM-DD HH:mm:ss');
    }
@@ -153,6 +164,6 @@
}
.mission-table {
  height: 60vh;
  /* height: 60vh; */
}
</style>