|
@@ -9,13 +9,15 @@
|
|
|
<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" />
|
|
|
+ <dv-scroll-board :config="riskTableconfig" class="scroll_table" ref="scrollBoard" @click="handleRowClick" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { ref, watch, computed, reactive, toRefs, onBeforeMount, onMounted } from 'vue'
|
|
|
+import { ref, watch, computed, reactive, toRefs, onBeforeMount, onMounted, toRaw } from 'vue'
|
|
|
import { useRiskTableStore } from '@/store/riskTable.js'
|
|
|
let riskTableStore = useRiskTableStore()
|
|
|
+import { useCommonStore } from '@/store/common.js'
|
|
|
+let commonStore = useCommonStore()
|
|
|
|
|
|
const props = defineProps({})
|
|
|
|
|
@@ -34,22 +36,22 @@ const timeButtons = ref([
|
|
|
const tableData = ref([
|
|
|
{
|
|
|
name: '长宁区发生不明原因肺炎',
|
|
|
- riskLevel: 'A',
|
|
|
- reportUnit: '上海市疾控',
|
|
|
- reportTime: '2024/11/20',
|
|
|
- address: '长宁路小区',
|
|
|
+ riskLevel: 'A级',
|
|
|
+ reportUnit: '长宁区疾病预防控制中心',
|
|
|
+ reportTime: '2024-07-15 08:00',
|
|
|
+ address: 'xxxxxxxxxxxx',
|
|
|
disposalUnit: '长宁区疾控',
|
|
|
numberOfCases: '3例',
|
|
|
keyLocations: 1,
|
|
|
keyGroups: 1,
|
|
|
- newstatus: '已核实'
|
|
|
+ newstatus: '处置中'
|
|
|
},
|
|
|
{
|
|
|
- name: '长宁区发生不明原因肺炎',
|
|
|
- riskLevel: 'B',
|
|
|
- reportUnit: '上海市疾控',
|
|
|
- reportTime: '2024/11/20',
|
|
|
- address: '长宁路小区',
|
|
|
+ name: '长宁区发生猴痘事件',
|
|
|
+ riskLevel: 'A级',
|
|
|
+ reportUnit: '长宁区疾病预防控制中心',
|
|
|
+ reportTime: '2024-09-30 09:12',
|
|
|
+ address: 'xx街道xx号',
|
|
|
disposalUnit: '长宁区疾控',
|
|
|
numberOfCases: '3例',
|
|
|
keyLocations: 1,
|
|
@@ -57,47 +59,47 @@ const tableData = ref([
|
|
|
newstatus: '处置中'
|
|
|
},
|
|
|
{
|
|
|
- name: '长宁区发生不明原因肺炎',
|
|
|
- riskLevel: 'C',
|
|
|
- reportUnit: '上海市疾控',
|
|
|
- reportTime: '2024/11/20',
|
|
|
- address: '长宁路小区',
|
|
|
+ name: '普陀区发生疟疾事件',
|
|
|
+ riskLevel: 'B级',
|
|
|
+ reportUnit: '普陀区疾病预防控制中心',
|
|
|
+ reportTime: '2024-09-30 10:23',
|
|
|
+ address: 'xx街道xx号',
|
|
|
disposalUnit: '长宁区疾控',
|
|
|
numberOfCases: '3例',
|
|
|
keyLocations: 1,
|
|
|
keyGroups: 0,
|
|
|
- newstatus: '已结案'
|
|
|
+ newstatus: '处置中'
|
|
|
},
|
|
|
{
|
|
|
- name: '长宁区发生不明原因肺炎',
|
|
|
- riskLevel: 'A',
|
|
|
- reportUnit: '上海市疾控',
|
|
|
- reportTime: '2024/11/20',
|
|
|
- address: '长宁路小区',
|
|
|
+ name: '黄浦区发生猩红热事件',
|
|
|
+ riskLevel: 'B级',
|
|
|
+ reportUnit: '黄浦区疾病预防控制中心',
|
|
|
+ reportTime: '2024-09-26 14:03',
|
|
|
+ address: 'xx街道xx号',
|
|
|
disposalUnit: '长宁区疾控',
|
|
|
numberOfCases: '3例',
|
|
|
keyLocations: 1,
|
|
|
keyGroups: 0,
|
|
|
- newstatus: '已核实'
|
|
|
+ newstatus: '处置中'
|
|
|
},
|
|
|
{
|
|
|
- name: '长宁区发生不明原因肺炎',
|
|
|
- riskLevel: 'A',
|
|
|
- reportUnit: '上海市疾控',
|
|
|
- reportTime: '2024/11/20',
|
|
|
- address: '长宁路小区',
|
|
|
+ name: '徐汇区发生聚集性呕吐腹泻事件',
|
|
|
+ riskLevel: 'D级',
|
|
|
+ reportUnit: '徐汇区疾病预防控制中心',
|
|
|
+ reportTime: '2024-09-26 16:33',
|
|
|
+ address: 'xx街道xx号',
|
|
|
disposalUnit: '长宁区疾控',
|
|
|
numberOfCases: '3例',
|
|
|
keyLocations: 1,
|
|
|
keyGroups: 0,
|
|
|
- newstatus: '已核实'
|
|
|
+ newstatus: '处置中'
|
|
|
},
|
|
|
{
|
|
|
- name: '长宁区发生不明原因肺炎',
|
|
|
- riskLevel: 'A',
|
|
|
- reportUnit: '上海市疾控',
|
|
|
- reportTime: '2024/11/20',
|
|
|
- address: '长宁路小区',
|
|
|
+ name: '发热门诊就诊量',
|
|
|
+ riskLevel: 'C级',
|
|
|
+ reportUnit: '静安区疾病预防控制中心',
|
|
|
+ reportTime: '2024-09-25 16:40',
|
|
|
+ address: 'xx街道xx号',
|
|
|
disposalUnit: '长宁区疾控',
|
|
|
numberOfCases: '3例',
|
|
|
keyLocations: 1,
|
|
@@ -156,6 +158,31 @@ function openRiskBigTable() {
|
|
|
riskTableStore.setBigRiskTableShow(true)
|
|
|
riskTableStore.setComeFrom('风险列表')
|
|
|
}
|
|
|
+
|
|
|
+// 点击行事件,row 是当前行数据,index 是行号
|
|
|
+function handleRowClick(config) {
|
|
|
+ console.log('点击行数据:', config)
|
|
|
+ // 获取当前点击行的数据
|
|
|
+ const rowIndex = config.rowIndex
|
|
|
+ if (rowIndex) {
|
|
|
+ if (rowIndex >= 0 && rowIndex < tableData.value.length) {
|
|
|
+ const rowData = toRaw(tableData.value[config.rowIndex])
|
|
|
+ console.log('当前点击行的数据:', rowData)
|
|
|
+ handleRowAction(rowData) // 执行点击后的逻辑
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 处理点击后的逻辑
|
|
|
+function handleRowAction(row) {
|
|
|
+ console.log(row, 'row')
|
|
|
+ commonStore.setActiveIndex(1)
|
|
|
+ riskTableStore.setInitShow(false)
|
|
|
+ riskTableStore.setBigRiskTableShow(false)
|
|
|
+ riskTableStore.setDisposalShow(true)
|
|
|
+ riskTableStore.setCurrentBackground(1)
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {})
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
@@ -239,7 +266,7 @@ onMounted(() => {})
|
|
|
/* 风险等级背景 */
|
|
|
/* 深度作用到 dv-scroll-board 内部 */
|
|
|
:deep(.risk-badge) {
|
|
|
- width: 80px;
|
|
|
+ width: 80px;
|
|
|
height: 32px;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
@@ -250,7 +277,7 @@ onMounted(() => {})
|
|
|
:deep(.risk-badge::before) {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
- top:10px;
|
|
|
+ top: 10px;
|
|
|
left: 10px;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -259,19 +286,19 @@ onMounted(() => {})
|
|
|
// background-position: center;
|
|
|
}
|
|
|
|
|
|
-:deep(.risk-A::before) {
|
|
|
+:deep(.risk-A级::before) {
|
|
|
background-image: url('@/assets/img/等级A.png');
|
|
|
}
|
|
|
|
|
|
-:deep(.risk-B::before) {
|
|
|
+:deep(.risk-B级::before) {
|
|
|
background-image: url('@/assets/img/等级B.png');
|
|
|
}
|
|
|
|
|
|
-:deep(.risk-C::before) {
|
|
|
+:deep(.risk-C级::before) {
|
|
|
background-image: url('@/assets/img/等级C.png');
|
|
|
}
|
|
|
|
|
|
-:deep(.risk-D::before) {
|
|
|
+:deep(.risk-D级::before) {
|
|
|
background-image: url('@/assets/img/等级D.png');
|
|
|
}
|
|
|
|
|
@@ -314,12 +341,10 @@ onMounted(() => {})
|
|
|
font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
|
|
|
font-weight: normal;
|
|
|
font-size: 16px;
|
|
|
- color: #70EEFF;
|
|
|
+ color: #70eeff;
|
|
|
text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
|
|
text-align: center;
|
|
|
font-style: normal;
|
|
|
text-transform: none;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
</style>
|