From 2676f45f33b9dedb80d0417e5af603df41216f0b Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 19 Nov 2024 18:31:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/main'
---
src/views/rs/components/leftContainer.vue | 121 +++++++++++++++++++++++++++-------------
1 files changed, 82 insertions(+), 39 deletions(-)
diff --git a/src/views/rs/components/leftContainer.vue b/src/views/rs/components/leftContainer.vue
index a972fa4..be8189f 100644
--- a/src/views/rs/components/leftContainer.vue
+++ b/src/views/rs/components/leftContainer.vue
@@ -2,58 +2,101 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2023-03-10 15:27:59
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-10-25 18:43:23
- * @FilePath: \bigScreen\src\views\statistics\components\leftContainer.vue
+ * @LastEditTime: 2024-11-19 17:25:37
+ * @FilePath: \bigScreen\src\views\rs\components\leftContainer.vue
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup>
-import dataContent from './box/dataContent.vue'
-import unitContent from './box/unitContent.vue'
-import fireContent from './box/fireContent.vue'
+import EventBus from 'utils/bus'
+
+import { getDictionary } from "@/api/dict/dict"
+import { nextTick, onUnmounted, reactive } from 'vue'
+const resData = reactive({
+ data: [
+ {
+ label: '一般',
+ value: 1
+ },
+ {
+ label: '较大',
+ value: 2
+ }
+ ]
+})
+const curSelect = ref('')
+
+const tabClick = (item) => {
+ console.log(item, 12312)
+ if (curSelect.value) EventBus.emit('restHandleDelChange', `4-${curSelect.value}`)
+ curSelect.value = item.value
+ EventBus.emit('restHandleCheckChange', `4-${item.value}`)
+ EventBus.emit('rsTabChange', item.value)
+}
+
+nextTick(() => {
+ tabClick(resData.data[0])
+})
+
+const showOn = computed(() => (item) => {
+ if (curSelect.value == item.value) {
+ return true
+ }
+
+ return false
+})
+
+onUnmounted(() => {
+ if (curSelect.value) EventBus.emit('restHandleDelChange', `4-${curSelect.value}`)
+})
</script>
<template>
- <div class="left-container">
- <div class="data box">
- <title-box>
- <template #titleName>
- 风险源列表
- </template>
- </title-box>
- <div class="content-box">
- <data-content></data-content>
+ <div class="left-container cur-container">
+ <div class="tablist h100">
+ <div class="cursor-p" :class="{ on: showOn(item) }" v-for="item, index in resData.data" :key="index"
+ @click="tabClick(item)">
+ <div class="label-box">
+ {{ item.label }}
+ </div>
</div>
</div>
-
- <!-- <div class="unit box">
- <title-box>
- <template #titleName>
- 入住单位统计
- </template>
- </title-box>
- <div class="content-box">
- <unit-content></unit-content>
- </div>
- </div> -->
-
- <!-- <div class="fire box">
- <title-box>
- <template #titleName>
- 实时火警事件
- </template>
- </title-box>
- <div class="content-box">
- <fire-content></fire-content>
- </div>
- </div> -->
</div>
</template>
<style lang="scss" scoped>
-.content-box {
- margin-top: 20px;
- position: absolute;
+.cur-container {
+ background: transparent;
+ pointer-events: none;
+
+ .tablist {
+ pointer-events: all;
+
+ &>div {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 16px;
+ padding: 10px;
+ width: 64px;
+ height: 64px;
+
+ border-radius: 50%;
+ box-shadow: inset 0 0 40px #409eff;
+ color: #fff;
+ box-sizing: content-box;
+
+ &.on {
+ position: relative;
+ color: #75b1ff;
+ }
+
+ .label-box {
+ line-height: 24px;
+ text-align: center;
+ }
+ }
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3