| | |
| | | <template> |
| | | <div class="fy-h2">线索结论</div> |
| | | <DescriptionsList v-if="conclusion"> |
| | | <!-- <template #extra> |
| | | <!-- <div class="fy-h2">线索结论</div> --> |
| | | <DescriptionsList v-if="conclusion" title="线索结论"> |
| | | <template #extra> |
| | | <el-button |
| | | v-if="conclusion" |
| | | type="warning" |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | icon="Upload" |
| | | @click="pushConclusion" |
| | | :disabled="pushing ? true : conclusion.ccUploaded" |
| | | >{{ pushing ? '推送中' : pushText }}</el-button |
| | | :disabled="conclusion.ccUploaded" |
| | | @click="openDialog" |
| | | >修改结论</el-button |
| | | > |
| | | </template> --> |
| | | </template> |
| | | <DescriptionsListItem |
| | | label="问题类型" |
| | | :content="conclusion.ccQuestionType" |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { reactive, ref, watch, computed } from 'vue'; |
| | | import { reactive, ref, watch, computed, inject } from 'vue'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | import clueConclusionApi from '@/api/clue/clueConclusionApi'; |
| | | |
| | | // 决定当前是否是内部线索相关操作 |
| | | const isInternal = inject('isInternal', false); |
| | | |
| | | const props = defineProps({ |
| | | clueId: Number |
| | |
| | | getConclusion(); |
| | | } |
| | | ); |
| | | |
| | | // 推送状态 |
| | | const pushing = ref(false); |
| | | |
| | | // 线索结论 |
| | | const conclusion = ref({}); |
| | |
| | | |
| | | function submit() { |
| | | formObj.value.cid = props.clueId; |
| | | formObj.value.ccInternal = isInternal; |
| | | return uploadConclusion(); |
| | | } |
| | | function cancel() { |
| | |
| | | * 获取线索结论 |
| | | */ |
| | | function getConclusion() { |
| | | clueConclusionApi.getConclusion(props.clueId).then((res) => { |
| | | conclusion.value = res; |
| | | }); |
| | | } |
| | | |
| | | function pushConclusion() { |
| | | clueConclusionApi |
| | | .pushConclusion([conclusion.value.ccId]) |
| | | .then(() => { |
| | | pushing.value = true; |
| | | .getConclusion(props.clueId, isInternal) |
| | | .then((res) => { |
| | | conclusion.value = res; |
| | | formObj.value = res == null ? {} : res; |
| | | // formObj.value = useCloned(res, { manual: true }); |
| | | }); |
| | | } |
| | | |
| | | const pushText = computed(() => { |
| | | return conclusion.value.ccUploaded ? '已推送' : '推送问题'; |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |