Ver código fonte

风险报告等级图例调整

hm 1 semana atrás
pai
commit
919ea979fb

+ 15 - 0
src/store/common.js

@@ -140,6 +140,21 @@ export const useCommonStore = defineStore('common', {
           timeType: '日',
           eventType: '风险信息',
         },
+        {
+          name: '发热门诊就诊量',
+          riskLevel: 'C级',
+          tableType: 'risk',
+          reportUnit: '静安区疾病预防控制中心',
+          reportTime: '2024-09-25 16:40',
+          address: 'xxxxxxx',
+          disposalUnit: '长宁区疾控',
+          numberOfCases: '3例',
+          keyLocations: 1,
+          keyGroups: 0,
+          newstatus: '处置中',
+          timeType: '年',
+          eventType: '风险信息',
+        },
       ], //首屏列表
 
       eventTableData: [

+ 1 - 2
src/views/index.vue

@@ -11,7 +11,7 @@
         <div class="home_container_header-left_tab">
           <div class="button-container">
             <div v-for="(item, index) in buttons" :key="index" class="parallelogram-button" :class="{ highlight: commonStore.activeIndex === index }" @click="setActive(index, item)">
-              <div class="text-container" :class="{ 'text-container-highlight': activeIndex === index }">
+              <div class="text-container" :class="{ 'text-container-highlight': commonStore.activeIndex === index }">
                 {{ item.title }}
               </div>
             </div>
@@ -75,7 +75,6 @@ console.log(userStore, 'useUserStore')
 let { name, age } = storeToRefs(userStore)
 const currentTime = ref('')
 // 更新当前时间的函数
-// 更新当前时间的函数
 const updateTime = () => {
   const now = new Date()
 

+ 6 - 0
src/views/left/modules/PublicHealthEmergency.vue

@@ -242,6 +242,12 @@ function setActiveModule(module, name) {
     }
   })
 
+  if (commonStore.activeModule === '应急处置资源') {
+    commonStore.alertKey = Date.now()
+    commonStore.alertMessage = '敬请期待'
+    commonStore.showAlert = true
+  }
+
   switch (module) {
     case '检测设备':
       commonStore.alertMessage = '暂未检测到设备信号'

+ 26 - 19
src/views/left/modules/ReportDisposal.vue

@@ -228,6 +228,12 @@ function setActiveModule(module, name) {
     }
   })
 
+  if (commonStore.activeModule === '应急处置资源') {
+    commonStore.alertKey = Date.now()
+    commonStore.alertMessage = '敬请期待'
+    commonStore.showAlert = true
+  }
+
   switch (module) {
     case '检测设备':
       commonStore.alertMessage = '暂未检测到设备信号'
@@ -254,23 +260,25 @@ function setActiveModule(module, name) {
 // 模块 年 月 日
 function btnClick(item, module) {
   console.log(item, 'item=btnClick')
-  switch (module) {
-    case '风险总览':
-      handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
-      break
-    case '风险处置':
-      handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
-      break
-    case '重大活动保障':
-      handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
-      break
-    case '已结案风险':
-      handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
-      break
-
-    default:
-      break
-  }
+  nextTick(() => {
+    switch (module) {
+      case '风险总览':
+        handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
+        break
+      case '风险处置':
+        handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
+        break
+      case '重大活动保障':
+        handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
+        break
+      case '已结案风险':
+        handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], item.name)
+        break
+
+      default:
+        break
+    }
+  })
 }
 
 // 1.=====================================
@@ -403,9 +411,8 @@ onMounted(() => {
   }
 
   nextTick(() => {
-     handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], '年')
+    handleRiskStatistic(true, ['A级', 'B级', 'C级', 'D级'], '年')
   })
- 
 })
 </script>
 <style lang="scss" scoped>

+ 27 - 19
src/views/left/modules/common/PublicHealthEmergencyTable.vue

@@ -9,7 +9,13 @@
         <div class="open_icon" @click="openRiskBigTable"><img src="@/assets/img/展开箭头.png" alt="" /></div>
       </div>
     </div>
-    <dv-scroll-board :config="riskTableconfig" class="scroll_table" ref="scrollBoard" @click="handleRowClick" />
+
+    <template v-if="tableData.length">
+      <dv-scroll-board :config="riskTableconfig" class="scroll_table" ref="scrollBoard" @click="handleRowClick" />
+    </template>
+    <template v-else>
+      <div class="no-data">暂无数据</div>
+    </template>
   </div>
 </template>
 <script setup>
@@ -52,14 +58,6 @@ const scrollBoard = ref(null)
 
 const tableData = ref([])
 
-// 核心筛选逻辑
-const filteredTableData = computed(() => {
-  return commonStore.eventTableData.filter(item => {
-    const statusMatch = buttons.value[activeIndex1.value].name ? item.newstatus === buttons.value[activeIndex1.value].name : true
-    return statusMatch
-  })
-})
-
 
 
 const riskTableconfig = computed(() => ({
@@ -91,10 +89,23 @@ const riskTableconfig = computed(() => ({
   itemRender: (row, colIndex) => row[colIndex]
 }))
 
+// 核心筛选逻辑
+const filteredTableData = computed(() => {
+  return commonStore.eventTableData.filter(item => {
+    const statusMatch = buttons.value[activeIndex1.value].name ? item.newstatus === buttons.value[activeIndex1.value].name : true
+    return statusMatch
+  })
+})
+
 watch(
-  () => activeIndex1.value,
+  () => filteredTableData.value,
   (newObj, oldObj) => {
-    tableData.value = filteredTableData.value
+    tableData.value = newObj
+    if (newObj.length % 2 === 1) {
+      tableData.value = [...newObj, newObj[0]]
+    } else {
+      tableData.value = newObj
+    }
   },
   {
     deep: true,
@@ -335,12 +346,9 @@ onMounted(() => {})
   font-style: normal;
   text-transform: none;
 }
-// .modules_bg_color_active {
-//   // border: 2px solid #00ffff; /* 高亮边框颜色可自定义 */
-//   // box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
-//   box-sizing: border-box;
-//   box-shadow: 0 0 20px 6px rgba(0, 255, 255, 0.5) !important; /* 柔和背光效果 */
-//   z-index: 1;
-//   transition: box-shadow 0.3s ease;
-// }
+
+.no-data{
+  color: #49ffff;
+  text-align: center;
+}
 </style>

+ 19 - 11
src/views/left/modules/common/RiskTableContent.vue

@@ -9,7 +9,12 @@
         <div class="open_icon" @click="openRiskBigTable"><img src="@/assets/img/展开箭头.png" alt="" /></div>
       </div>
     </div>
-    <dv-scroll-board :config="riskTableconfig" class="scroll_table" ref="scrollBoard" @click="handleRowClick" />
+    <template v-if="filteredTableData.length">
+      <dv-scroll-board :config="riskTableconfig" class="scroll_table" ref="scrollBoard" @click="handleRowClick" />
+    </template>
+    <template v-else>
+      <div class="no-data">暂无数据</div>
+    </template>
   </div>
 </template>
 <script setup>
@@ -19,6 +24,7 @@ let riskTableStore = useRiskTableStore()
 import { useCommonStore } from '@/store/common.js'
 import { handleRiskStatistic } from '@/utils/map/baseMethod.js'
 let commonStore = useCommonStore()
+const emit = defineEmits(['btnClick'])
 
 const props = defineProps({})
 
@@ -62,7 +68,12 @@ const filteredTableData = computed(() => {
 watch(
   () => filteredTableData.value,
   (newObj, oldObj) => {
-    tableData.value = newObj
+    if (newObj.length%2===1) {
+      tableData.value = [...newObj,newObj[0]]
+    } else {
+      tableData.value = newObj
+    }
+    
   },
   {
     deep: true,
@@ -102,7 +113,7 @@ const riskTableconfig = computed(() => ({
 }))
 
 
-const emit = defineEmits(['btnClick'])
+
 
 function btnClick(item, index) {
   activeIndex1.value = index
@@ -335,12 +346,9 @@ onMounted(() => {})
   font-style: normal;
   text-transform: none;
 }
-// .modules_bg_color_active {
-//   // border: 2px solid #00ffff; /* 高亮边框颜色可自定义 */
-//   // box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
-//   box-sizing: border-box;
-//   box-shadow: 0 0 20px 6px rgba(0, 255, 255, 0.5) !important; /* 柔和背光效果 */
-//   z-index: 1;
-//   transition: box-shadow 0.3s ease;
-// }
+
+.no-data{
+  color: #49ffff;
+  text-align: center;
+}
 </style>

+ 10 - 1
src/views/right/components/common/RightLegend.vue

@@ -258,7 +258,16 @@ const handleRiskLevel = item => {
     if (commonStore.activeModule === '风险研判') {
       rightPanelStore.riskTypeSelect= levels.map(type => type.charAt(0))
     }
-    handleRiskStatistic(true, levels, commonStore.activeModuleTime)
+
+    if (commonStore.activeModule === '风险报告') {
+      handleRiskStatistic(true, levels,'日')
+    }else if (commonStore.activeModule === '事件报告') {
+      handleRiskStatistic(true, levels,'日')
+     } else {
+      handleRiskStatistic(true, levels, commonStore.activeModuleTime)
+    }
+
+    // handleRiskStatistic(true, levels, commonStore.activeModuleTime)
   }
 }