| | |
| | | <template> |
| | | <el-row justify="space-between"> |
| | | <el-text>单日计划</el-text> |
| | | <el-text>{{ dateStr }}计划</el-text> |
| | | <div v-show="create && data && data.length > 0"> |
| | | <el-button |
| | | icon="IconPrinter" |
| | |
| | | <el-button type="success" size="small" @click="add" icon="Switch" |
| | | >任务调整</el-button |
| | | > |
| | | <el-button type="primary" size="small" @click="openMap"> |
| | | 进入地图<el-icon class="el-icon--right"><Right /></el-icon> |
| | | </el-button> |
| | | </div> |
| | | </el-row> |
| | | <el-divider /> |
| | |
| | | > |
| | | <ItemSubTask v-for="s in data" :key="s.guid" :item="s"> |
| | | <template #default="{ item }"> |
| | | <el-space direction="vertical"> |
| | | <el-space direction="horizontal"> |
| | | <el-button |
| | | :disabled="item.status != '未执行'" |
| | | plain |
| | |
| | | size="small" |
| | | icon="EditPen" |
| | | @click="edit(item)" |
| | | >修改</el-button |
| | | > |
| | | title="修改" |
| | | ></el-button> |
| | | <el-button |
| | | :disabled="item.status != '未执行'" |
| | | type="danger" |
| | | size="small" |
| | | icon="Delete" |
| | | @click="remove(item)" |
| | | >移除</el-button |
| | | > |
| | | title="移除" |
| | | ></el-button> |
| | | </el-space> |
| | | </template> |
| | | </ItemSubTask> |
| | |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- 编辑巡查子任务 --> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | width="600" |
| | |
| | | @cancel="dialogVisible = false" |
| | | ></CompSubTaskEdit> |
| | | </el-dialog> |
| | | <!-- 巡查单下载 --> |
| | | <SceneInspectFile |
| | | v-model="downloadDialog" |
| | | :value="downloadSceneList" |
| | |
| | | </template> |
| | | <script setup> |
| | | import { ref, computed, watch, onMounted, onUnmounted } from 'vue'; |
| | | import { ElMessageBox, ElNotification, ElMessage } from 'element-plus'; |
| | | import { ElMessageBox, ElNotification, ElMessage, dayjs } from 'element-plus'; |
| | | import CompSubTaskEdit from './CompSubTaskEdit.vue'; |
| | | import SceneInspectFile from '@/views/fysp/scene/SceneInspectFile.vue'; |
| | | import subtaskApi from '@/api/fysp/subtaskApi'; |
| | | |
| | | const props = defineProps({ |
| | | modelValue: Array, |
| | | date: Date, |
| | | height: { |
| | | type: String, |
| | | default: '70vh' |
| | |
| | | const downloadDialog = ref(false); |
| | | const downloadSceneList = ref([]); |
| | | |
| | | const emit = defineEmits(['submit', 'add', 'remove', 'update:modelValue']); |
| | | const emit = defineEmits(['submit', 'add', 'openMap', 'remove', 'update:modelValue']); |
| | | |
| | | const dateStr = computed(() => dayjs(props.date).format('MM月DD日')); |
| | | |
| | | function remove(item) { |
| | | if (item.status == '未执行') { |
| | |
| | | emit('add'); |
| | | } |
| | | |
| | | /** |
| | | * 打开场景地图 |
| | | */ |
| | | function openMap() { |
| | | emit('openMap'); |
| | | } |
| | | |
| | | |
| | | |
| | | onUnmounted(() => { |
| | | dialogVisible.value = false; |
| | | }); |