| | |
| | | <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 |
| | |
| | | :show-overflow-tooltip="true" |
| | | border |
| | | height="64vh" |
| | | row-class-name="t-row" |
| | | row-class-name="t-row-normal" |
| | | cell-class-name="t-cell" |
| | | header-row-class-name="t-header-row" |
| | | header-cell-class-name="t-header-cell" |
| | |
| | | label="开始时间" |
| | | align="center" |
| | | :formatter="timeFormatter" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="endTime" |
| | | label="结束时间" |
| | | align="center" |
| | | :formatter="timeFormatter" |
| | | width="150" |
| | | /> |
| | | <el-table-column label="管理" width="140" align="center"> |
| | | <el-table-column label="管理" width="160" align="center"> |
| | | <template #default="{ row }"> |
| | | <MissionEdit mode="update"></MissionEdit> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | icon="Delete" |
| | | class="el-button-custom" |
| | | @click="deleteMission(row)" |
| | | >删除</el-button |
| | | > |
| | | ></el-button> |
| | | <el-button |
| | | :loading="row.downloadLoading" |
| | | type="primary" |
| | | size="small" |
| | | icon="Document" |
| | | class="el-button-custom" |
| | | @click="downloadReport(row)" |
| | | >报告</el-button |
| | | > |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | <el-col :span="4" class="flex-col"> |
| | | <div> |
| | | <!-- <el-button type="primary" class="el-button-custom"> |
| | | <!-- <div> --> |
| | | <!-- <el-button type="primary" class="el-button-custom"> |
| | | 新建任务 |
| | | </el-button> --> |
| | | <MissionCreate></MissionCreate> |
| | | </div> |
| | | <MissionEdit></MissionEdit> |
| | | <!-- </div> --> |
| | | <!-- <div> |
| | | <el-button type="primary" class="el-button-custom"> |
| | | 数据导入 |
| | |
| | | const { loading, fetchData } = useFetchData(); |
| | | return { loading, fetchData }; |
| | | }, |
| | | props: {}, |
| | | props: { |
| | | modelValue: Boolean |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | |
| | | ...mapStores(useMissionStore) |
| | | }, |
| | | methods: { |
| | | handleChange(value) { |
| | | this.$emit('update:modelValue', value); |
| | | }, |
| | | deleteMission(row) { |
| | | this.onConfirm = () => { |
| | | this.missionStore.deleteMission(row.missionCode); |
| | |
| | | .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'); |
| | | } |
| | |
| | | } |
| | | |
| | | .mission-table { |
| | | height: 60vh; |
| | | /* height: 60vh; */ |
| | | } |
| | | |
| | | :deep(.t-row-normal) { |
| | | background-color: transparent !important; |
| | | } |
| | | </style> |