| | |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | width="600" |
| | | title="一键创建总任务" |
| | | title="巡查任务编辑" |
| | | destroy-on-close |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | |
| | | import { ref, computed, watch, onMounted, onUnmounted } from 'vue'; |
| | | import { ElMessageBox, ElNotification, ElMessage } from 'element-plus'; |
| | | import CompSubTaskEdit from './CompSubTaskEdit.vue'; |
| | | import subtaskApi from '@/api/fysp/subtaskApi'; |
| | | |
| | | const props = defineProps({ |
| | | modelValue: Array, |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const index = data.value.indexOf(item); |
| | | data.value.splice(index, 1); |
| | | return subtaskApi.deleteSubtask(item.stguid).then(res=>{ |
| | | if (res == 1) { |
| | | const index = data.value.indexOf(item); |
| | | data.value.splice(index, 1); |
| | | |
| | | emit('update:modelValue', data.value); |
| | | emit('remove', item); |
| | | emit('update:modelValue', data.value); |
| | | emit('remove', item); |
| | | } else { |
| | | Promise.reject('删除巡查任务失败') |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } |