| | |
| | | </el-scrollbar> |
| | | </div> |
| | | </CloseButton> |
| | | <ClueTaskEdit |
| | | v-model="clueTaskDialog" |
| | | :clue-task="clueTask" |
| | | :clue-data="clueData" |
| | | :create="isCreateMode" |
| | | @on-submit="handelClueTaskEdit" |
| | | ></ClueTaskEdit> |
| | | </template> |
| | | |
| | | <script> |
| | | import ClueReportClue from './components/ClueReportClue.vue'; |
| | | import ClueReportConclusion from './components/ClueReportConclusion.vue'; |
| | | import ClueReportQuestion from './components/ClueReportQuestion.vue'; |
| | | import ClueTaskEdit from '@/views/overlay-clue/task/ClueTaskEdit.vue'; |
| | | |
| | | import { useMessageBoxTip } from '@/composables/messageBox'; |
| | | import clueApi from '@/api/clue/clueApi'; |
| | | import clueTaskApi from '@/api/clue/clueTaskApi'; |
| | | |
| | | export default { |
| | | components: { |
| | | ClueReportClue, |
| | | ClueReportConclusion, |
| | | ClueReportQuestion |
| | | ClueReportQuestion, |
| | | ClueTaskEdit |
| | | }, |
| | | props: { |
| | | clueData: { |
| | |
| | | }, |
| | | show: Boolean |
| | | }, |
| | | emits: ['update:show', 'pushed'], |
| | | emits: ['update:show', 'pushed', 'onClueTaskChange'], |
| | | data() { |
| | | return { |
| | | clueTask: undefined |
| | | clueTask: undefined, |
| | | clueTaskDialog: false, |
| | | isCreateMode: true |
| | | }; |
| | | }, |
| | | watch: { |
| | | clueData(nV, oV) { |
| | | if (nV && nV != oV) { |
| | | this.getClueTask(); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | closeEdit() { |
| | |
| | | this.$emit('pushed', res); |
| | | }); |
| | | }, |
| | | publishTask() { |
| | | |
| | | getClueTask() { |
| | | clueTaskApi |
| | | .fetchClueTask({ clueId: this.clueData.cid }) |
| | | .then((res) => { |
| | | this.isCreateMode = res.data.length == 0; |
| | | if (res.data.length > 0) { |
| | | this.clueTask = res.data[0]; |
| | | } else { |
| | | this.clueTask = undefined; |
| | | } |
| | | }); |
| | | }, |
| | | publishTask() { |
| | | this.clueTaskDialog = true; |
| | | }, |
| | | handelClueTaskEdit() { |
| | | this.getClueTask(); |
| | | this.$emit('onClueTaskChange'); |
| | | } |
| | | } |
| | | }; |