From d22ce1ad1c4656f5c2212bbabb35ba498300aced Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 20 七月 2023 17:12:20 +0800 Subject: [PATCH] 线索下发及提交结论和问题模块基本完成 --- src/views/overlay-clue/components/ClueReportQuestion.vue | 139 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 139 insertions(+), 0 deletions(-) diff --git a/src/views/overlay-clue/components/ClueReportQuestion.vue b/src/views/overlay-clue/components/ClueReportQuestion.vue new file mode 100644 index 0000000..cc68613 --- /dev/null +++ b/src/views/overlay-clue/components/ClueReportQuestion.vue @@ -0,0 +1,139 @@ +<template> + <div class="fy-h2">绾跨储闂</div> + <template v-if="questionList.length > 0"> + <el-descriptions + v-for="(item, index) in questionList" + :title="'闂 ' + item.cqUid" + :key="index" + :column="2" + size="small" + border + > + <template #extra> + <el-button-group> + <el-button + type="warning" + size="small" + plain + icon="Upload" + @click="pushQuestion(item)" + :disabled="item.pushing ? true : item.cqUploaded" + >{{ + item.cqUploaded + ? '宸叉帹閫�' + : item.pushing + ? '鎺ㄩ�佷腑' + : '鎺ㄩ�侀棶棰�' + }}</el-button + > + <el-button + type="primary" + size="small" + @click="checkQuestion(item)" + >闂璇︽儏</el-button + > + </el-button-group> + </template> + <el-descriptions-item + width="1px" + min-width="70px" + label="闂缂栧彿" + > + {{ item.cqUid }} + </el-descriptions-item> + <el-descriptions-item label="鎵�鍦ㄨ闀�"> + {{ item.cqStreet }} + </el-descriptions-item> + <el-descriptions-item label="闂鎻忚堪"> + {{ item.cqDescription }} + </el-descriptions-item> + <!-- <el-descriptions-item label="璇︾粏鍦板潃"> + {{ item.cqAddress }} + </el-descriptions-item> + <el-descriptions-item label="缁忓害"> + {{ item.cqLongitude }} + </el-descriptions-item> + <el-descriptions-item label="绾害"> + {{ item.cqLatitude }} + </el-descriptions-item> + <el-descriptions-item label="鍒涘缓鏃堕棿"> + {{ item.cqCreateTime }} + </el-descriptions-item> --> + </el-descriptions> + <div class="btn-wrap"> + <el-button type="primary" @click="openDialog" + >娣诲姞闂</el-button + > + </div> + </template> + <div v-else class="fy-dashed-border"> + <el-empty :image-size="50" description="鏃犵嚎绱㈤棶棰�"> + <el-button type="primary" @click="openDialog" + >鍙嶉涓婃姤</el-button + > + </el-empty> + </div> + <QuestionDetail + :clueId="clueId" + v-model:show="dialogShow" + :question="selectedQuestion" + @on-submit="getQuestion" + ></QuestionDetail> +</template> + +<script setup> +import { ref, watch, computed } from 'vue'; +import clueQuestionApi from '@/api/clue/clueQuestionApi'; +import QuestionDetail from './QuestionDetail.vue'; + +const props = defineProps({ + clueId: Number +}); + +// 绾跨储缁撹 +const questionList = ref([]); +// 涓婃姤寮瑰嚭妗� +const dialogShow = ref(false); +const selectedQuestion = ref(); + +watch( + () => props.clueId, + () => { + getQuestion(); + } +); + +// 鎵撳紑涓婃姤鍙嶉瀵硅瘽妗� +function openDialog() { + selectedQuestion.value = undefined; + dialogShow.value = true; +} + +// 鏌ョ湅闂璇︽儏 +function checkQuestion(item) { + selectedQuestion.value = item; + dialogShow.value = true; +} +/** + * 鑾峰彇绾跨储缁撹 + */ +function getQuestion() { + clueQuestionApi.getQuestion(props.clueId).then((res) => { + questionList.value = res; + }); +} + +function pushQuestion(item) { + clueQuestionApi.pushQuestion([item.cqId]).then(() => { + item.pushing = true; + }); +} + +</script> +<style scoped> +.btn-wrap { + display: flex; + justify-content: center; + padding: 16px; +} +</style> -- Gitblit v1.9.3