| | |
| | | > |
| | | 任务管理 |
| | | </el-button> --> |
| | | <CardDialog |
| | | :model-value="modelValue" |
| | | @changed="handleChange" |
| | | title="走航任务管理" |
| | | > |
| | | <CardDialog v-bind="$attrs" title="走航任务管理"> |
| | | <el-row class="mission-table"> |
| | | <el-col :span="20"> |
| | | <el-table |
| | |
| | | /> |
| | | <el-table-column label="管理" width="160" align="center"> |
| | | <template #default="{ row }"> |
| | | <MissionEdit mode="update"></MissionEdit> |
| | | <!-- <MissionEdit mode="update"></MissionEdit> --> |
| | | <!-- <el-button |
| | | type="primary" |
| | | size="small" |
| | | icon="EditPen" |
| | | class="el-button-custom" |
| | | @click="updateMission(row)" |
| | | ></el-button> --> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | |
| | | 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-button type="primary" class="el-button-custom"> |
| | | 新建任务 |
| | | </el-button> --> |
| | | <MissionEdit></MissionEdit> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | @click="createMission" |
| | | > |
| | | 新建任务 |
| | | </el-button> |
| | | <!-- </div> --> |
| | | <!-- <div> |
| | | <el-button type="primary" class="el-button-custom"> |
| | |
| | | msg="确认是否删除该走航任务" |
| | | confirmText="删除" |
| | | ></MessageBox> |
| | | <MissionEdit |
| | | v-model="dialogVisible" |
| | | width="30%" |
| | | :mode="editMode" |
| | | :mission="selectedMission" |
| | | ></MissionEdit> |
| | | </template> |
| | | <script> |
| | | import moment from 'moment'; |
| | |
| | | return { loading, fetchData }; |
| | | }, |
| | | props: { |
| | | modelValue: Boolean |
| | | // modelValue: Boolean |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | // emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | msgBoxVisible: false, |
| | | onConfirm: undefined |
| | | onConfirm: undefined, |
| | | // 任务编辑模式,create:创建新任务,update:编辑已有任务 |
| | | editMode: 'create', |
| | | // 选中的待编辑任务 |
| | | selectedMission: undefined |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapStores(useMissionStore) |
| | | }, |
| | | methods: { |
| | | handleChange(value) { |
| | | this.$emit('update:modelValue', value); |
| | | // handleChange(value) { |
| | | // this.$emit('update:modelValue', value); |
| | | // }, |
| | | createMission() { |
| | | this.editMode = 'create'; |
| | | this.dialogVisible = true; |
| | | }, |
| | | updateMission(row) { |
| | | this.editMode = 'update'; |
| | | this.selectedMission = row; |
| | | this.dialogVisible = true; |
| | | }, |
| | | deleteMission(row) { |
| | | this.onConfirm = () => { |