Browse Source

信息发布详情

Hwf 7 months ago
parent
commit
37dfea493e

+ 32 - 0
src/router/routes.ts

@@ -86,6 +86,38 @@ const routes: Array<RouteRecordRaw> = [
       }
     ]
   },
+  {
+    path: "/disasterRiskMonitor",
+    name: "disasterRiskMonitor",
+    component: Layout,
+    children: [
+      {
+        path: "warningSituation",
+        name: "WarningSituation",
+        component: () => import("@/views/disasterRiskMonitor/warningSituation.vue"),
+        meta: {
+          title: "预警态势",
+          noCache: true
+        }
+      }
+    ]
+  },
+  {
+    path: "/infoReception",
+    name: "InfoReception",
+    component: Layout,
+    children: [
+      {
+        path: "infoDetails",
+        name: "InfoDetails",
+        component: () => import("@/views/InfoReception/infoDetails.vue"),
+        meta: {
+          title: "智慧应急消息通知详情",
+          noCache: true
+        }
+      }
+    ]
+  },
   {
     path: "/onlineRollCall",
     name: "OnlineRollCall",

+ 8 - 7
src/styles/index.less

@@ -38,13 +38,14 @@ html {
   height: 100%;
   font-size: 16px;
   color: #445267;
-  .container {
-    width: 100%;
-    background-color: #f4f8fa;
-    height: 100%;
-    overflow-y: auto;
-    margin: 0 auto;
-  }
+}
+.container {
+  width: 100%;
+  background-color: #f4f8fa;
+  height: 100%;
+  overflow-y: auto;
+  margin: 0 auto;
+  padding: 16px;
 }
 
 a,

+ 11 - 0
src/views/disasterRiskMonitor/warningSituation.vue

@@ -0,0 +1,11 @@
+<template>
+  <div>warningSituation</div>
+</template>
+
+<script lang="ts" setup name="warningSituation">
+
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 154 - 0
src/views/infoReception/infoDetails.vue

@@ -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>

+ 6 - 6
src/views/leader/index.vue

@@ -117,7 +117,7 @@ const menu2 = ref([
   {
     name: '自然灾害风险监测',
     children: [
-      { name: '灾害监测', icon: 'monitor', url: '' },
+      { name: '预警态势', icon: 'monitor', url: 'WarningSituation' },
       { name: '大风灾害', icon: 'wind', url: '' },
       { name: '森林火灾', icon: 'forestFire', url: '' },
       { name: '台风实况', icon: 'typhoon', url: '' },
@@ -272,11 +272,11 @@ const handleHideDialog = () => {
 };
 onMounted(() => {
   initData()
-  // rollCallData.value = {
-  //   id: '11111',
-  //   time1: '2024-10-22 12:00:00'
-  // };
-  // show.value = true;
+  rollCallData.value = {
+    id: '11111',
+    time1: '2024-10-22 12:00:00'
+  };
+  show.value = true;
   if (!timer && !!rollCallData.value.time1) {
     timer = setInterval(updateTime, 1000)
   }