|
@@ -0,0 +1,154 @@
|
|
|
+<template>
|
|
|
+ <div class="container">
|
|
|
+ <div class="info-title">{{ infoDetail.title }}</div>
|
|
|
+ <div class="info-box">
|
|
|
+ <div>来源:<span class="text1">{{ infoDetail.source }}</span></div>
|
|
|
+ <div>{{ infoDetail.publicTime }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="info-content">
|
|
|
+ {{ infoDetail.content }}
|
|
|
+ </div>
|
|
|
+ <div class="file-box">
|
|
|
+ <div class="text2">附件:</div>
|
|
|
+ <div class="file-list">
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in infoDetail.files"
|
|
|
+ :key="index"
|
|
|
+ class="file-item"
|
|
|
+ @click="handleDownload(item)"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="infoDetail.status1 === '1'" class="box1">
|
|
|
+ <div v-show="infoDetail.status2 === '0'" class="confirm-btn" @click="handleReceive">确认收到</div>
|
|
|
+ <div v-show="infoDetail.status2 === '1'" class="tip">
|
|
|
+ <van-icon name="success" />
|
|
|
+ 已确认收到此通知
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="infoDetail.status1 === '2'" class="box1">
|
|
|
+ <div v-show="infoDetail.status2 === '0'" class="confirm-btn" @click="handleShowSignature">签名确认</div>
|
|
|
+ <van-image v-show="infoDetail.status2 === '1' && infoDetail.signature" :src="infoDetail.signature" height="60" />
|
|
|
+ </div>
|
|
|
+ <van-dialog v-model:show="showSignature" :show-confirm-button="false">
|
|
|
+ <van-signature @submit="onSubmit" />
|
|
|
+ </van-dialog>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup name="infoDetails">
|
|
|
+import {onMounted, ref} from "vue";
|
|
|
+import {useRoute} from "vue-router";
|
|
|
+import {download2} from "@/utils/request";
|
|
|
+
|
|
|
+const route = useRoute();
|
|
|
+const infoDetail = ref({
|
|
|
+ // 0阅读 1点击确认 2签字确认
|
|
|
+ status1: '',
|
|
|
+ // 签收状态 0 未确认 1已确认
|
|
|
+ status2: '',
|
|
|
+ title: '',
|
|
|
+ source: '',
|
|
|
+ publicTime: '',
|
|
|
+ content: '',
|
|
|
+ signature: '',
|
|
|
+ files: []
|
|
|
+})
|
|
|
+let infoId = ref();
|
|
|
+let showSignature = ref(false);
|
|
|
+const baseUrl = import.meta.env.VITE_BASE_API;
|
|
|
+
|
|
|
+const handleReceive = () => {
|
|
|
+ infoDetail.value.status2 = '1'
|
|
|
+}
|
|
|
+
|
|
|
+const handleShowSignature = () => {
|
|
|
+ showSignature.value = true;
|
|
|
+}
|
|
|
+// 确定签名
|
|
|
+const onSubmit = (data) => {
|
|
|
+ infoDetail.value.status2 = '1'
|
|
|
+ showSignature.value = false;
|
|
|
+ infoDetail.value.signature = data.image;
|
|
|
+};
|
|
|
+// 下载方法
|
|
|
+const handleDownload = (file: any) => {
|
|
|
+ download2(baseUrl + '/file/download/' + file.url, file.name);
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ infoId.value = route.query.id;
|
|
|
+ infoDetail.value = {
|
|
|
+ status1: '2',
|
|
|
+ status2: '0',
|
|
|
+ title: 'xxxxxxxxxx',
|
|
|
+ source: '茂名市应急管理局、市气象局',
|
|
|
+ publicTime: '2023-04-29 12:11:00',
|
|
|
+ content: '了多少会计分录可是大家流口水监考老师就考虑解放立刻时间的法律就是的空间是多了艰苦拉萨大家看来是积分考虑时间断开连接速度看来是就断开连接算了九分零四就看了金克拉就',
|
|
|
+ signature: '',
|
|
|
+ files: [{name: '测试.pdf', url: '2d3eebfe-9131-11ef-ae0f-fa163e4bf12e.pdf'}]
|
|
|
+ }
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.container {
|
|
|
+ background-color: #fafafa;
|
|
|
+
|
|
|
+ .info-title {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #323233;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-box {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #989898;
|
|
|
+ margin: 12px 0;
|
|
|
+ .text1 {
|
|
|
+ color: #323233;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-content {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 26px;
|
|
|
+ color: #445267;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .file-box {
|
|
|
+ display: flex;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+ .file-item {
|
|
|
+ color: #2C81FF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.box1 {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ .tip {
|
|
|
+ color: #40C75F;
|
|
|
+ }
|
|
|
+}
|
|
|
+.confirm-btn {
|
|
|
+ background-color: #3577ed;
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ border-radius: 2px;
|
|
|
+ width: 140px;
|
|
|
+ height: 35px;
|
|
|
+ line-height: 35px;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+</style>
|