From 721f6ec69e796fd5c9807eaf68ec25df2bcf4e66 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 29 二月 2024 11:53:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/daoAnOffice/right/analysis/index.vue | 126 +++++++++++
src/views/daoAnOffice/right/danger/dataTable.vue | 177 ++++++++++++++++
src/views/daoAnOffice/right/publicize/index.vue | 4
src/views/daoAnOffice/right/danger/dataView.vue | 62 +++++
src/views/daoAnOffice/right/danger/index.vue | 131 ++---------
src/views/daoAnOffice/right/danger/infoView.vue | 116 ++++++++++
6 files changed, 509 insertions(+), 107 deletions(-)
diff --git a/src/views/daoAnOffice/right/analysis/index.vue b/src/views/daoAnOffice/right/analysis/index.vue
index 1fde5a4..24e8f98 100644
--- a/src/views/daoAnOffice/right/analysis/index.vue
+++ b/src/views/daoAnOffice/right/analysis/index.vue
@@ -11,7 +11,6 @@
<template #content>
<div class="charts-container">
<div id="analysisChart" ref="analysisChart"></div>
-
</div>
</template>
</RightTitle>
@@ -21,7 +20,11 @@
import RightTitle from "@/components/right-title";
import * as echarts from 'echarts';
import { ref, onMounted } from 'vue';
+// dom绀轰緥
const analysisChart = ref(null);
+const echartRef = ref(null);
+
+
const selectItems = ref([
{ itemIndex: 1, name: '鏃堕棿缁熻', isActive: false },
{ itemIndex: 2, name: '琛楅亾缁熻', isActive: true },
@@ -155,11 +158,126 @@
]
}
+const echartsLineConfig = {
+ legend: {
+ right: '0',
+ icon: 'circle',
+ textStyle: {
+ color: 'rgba(77, 118, 176, 1)'
+ },
+ data: [
+ {
+ name: '閱夐┚',
+ itemStyle: {
+ color: 'rgba(0, 168, 217, 1)'
+ }
+ },
+ {
+ name: '閰掗┚',
+ itemStyle: {
+ color: 'rgba(207, 178, 73, 1)'
+ }
+ },
+ {
+ name: '鍏朵粬',
+ itemStyle: {
+ color: 'rgba(43, 176, 109, 1)'
+ }
+ },
+ ]
+
+ },
+ tooltip: {},
+ grid: {
+ left: 0,
+ right: 0,
+ bottom: 0,
+ top: '15%',
+ containLabel: true
+ },
+ dataset: {
+ dimensions: ['name', 'state1', 'state2', 'state3'],
+ source: testData.value
+ },
+ xAxis: { type: 'category', axisTick: false },
+ yAxis: {},
+ // Declare several bar series, each will be mapped
+ // to a column of dataset.source by default.
+ series: [
+ {
+ type: 'bar',
+ name: '閱夐┚',
+ barWidth: 13,
+ barGap: '50%',
+ label: {
+ show: true, // 鏄剧ず鏍囩
+ position: 'top', // 鏍囩浣嶇疆
+ color: 'rgba(0, 168, 217, 1)', // 鏍囩棰滆壊
+ fontSize: 10,
+ },
+ itemStyle: {
+ // 璁剧疆娓愬彉鑹�
+ color: new echarts.graphic.LinearGradient(
+ 0, 1, 0, 0,
+ [
+ { offset: 0, color: 'rgba(14, 32, 54, 1)' }, // 0% 澶勭殑棰滆壊
+ { offset: 1, color: 'rgba(0, 168, 217, 1)' } // 100% 澶勭殑棰滆壊
+ ]
+ )
+ },
+ },
+ {
+ type: 'bar',
+ name: '閰掗┚',
+ barWidth: 13,
+ barGap: '50%',
+ label: {
+ show: true, // 鏄剧ず鏍囩
+ position: 'top', // 鏍囩浣嶇疆
+ color: 'rgba(207, 178, 73, 1)', // 鏍囩棰滆壊
+ fontSize: 10,
+ },
+ itemStyle: {
+ // 璁剧疆娓愬彉鑹�
+ color: new echarts.graphic.LinearGradient(
+ 0, 1, 0, 0,
+ [
+ { offset: 0, color: 'rgba(14, 31, 53, 1)' }, // 0% 澶勭殑棰滆壊
+ { offset: 1, color: 'rgba(207, 178, 73, 1)' } // 100% 澶勭殑棰滆壊
+ ]
+ )
+ },
+ },
+ {
+ type: 'bar',
+ name: '鍏朵粬',
+ barWidth: 13,
+ barGap: '50%',
+ label: {
+ show: true, // 鏄剧ず鏍囩
+ position: 'top', // 鏍囩浣嶇疆
+ color: 'rgba(43, 176, 109, 1)', // 鏍囩棰滆壊
+ fontSize: 10,
+ },
+ itemStyle: {
+ // 璁剧疆娓愬彉鑹�
+ color: new echarts.graphic.LinearGradient(
+ 0, 1, 0, 0,
+ [
+ { offset: 0, color: 'rgba(14, 31, 53, 1)' }, // 0% 澶勭殑棰滆壊
+ { offset: 1, color: 'rgba(43, 176, 109, 1)' } // 100% 澶勭殑棰滆壊
+ ]
+ )
+ },
+ },
+ ]
+}
+
onMounted(() => {
- const myChart = echarts.init(analysisChart.value);
- myChart.setOption(echartsConfig);
+ echartRef.value = echarts.init(analysisChart.value);
+ echartRef.value.setOption(echartsConfig);
})
</script>
@@ -183,7 +301,7 @@
.charts-container {
width: 100%;
- height: 306px;
+ height: 280px;
padding: 20px;
background-color: rgba(17, 34, 58, 0.6);
border: 1px solid rgba(47, 91, 157, 0.8);
diff --git a/src/views/daoAnOffice/right/danger/dataTable.vue b/src/views/daoAnOffice/right/danger/dataTable.vue
new file mode 100644
index 0000000..9df40e7
--- /dev/null
+++ b/src/views/daoAnOffice/right/danger/dataTable.vue
@@ -0,0 +1,177 @@
+<template>
+ <div class="container flex flex-col">
+ <div class="table-top flex justify-between items-center">
+ <div class="top-title">瀹夊叏浜嬫晠鍒楄〃</div>
+ <div class="table-select flex">
+ <div class="select-item mr-2 ml-2 cursor-pointer flex items-center"
+ :class="{ 'item-active': selectItem.isActive }" v-for="selectItem in tableType" :key="selectItem.id">{{
+ selectItem.type }}</div>
+ </div>
+ </div>
+ <div class="table-container flex-1">
+ <div class="table-content">
+ <el-table class="data-table" :data="tableData" :highlight-current-row="false" :stripe="true"
+ :header-cell-style="{ backgroundColor: 'transparent', color: '#79A5E9', borderColor: '#29466A' }"
+ :cell-style="{ color: '#79A5E9', borderColor: '#29466A', paddingTop: '10px', paddingBottom: '10px' }"
+ :row-style="{ backgroundColor: 'transparent' }">
+ <el-table-column prop="street" label="闀�/琛楅亾" align="center" />
+ <el-table-column label="鍙戠幇鏁伴噺" align="center">
+ <template #default="scope">
+ <div style="color: #6289E6;">
+ {{ scope.row.num1 }}
+ </div>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="涓嬪彂閫氱煡涔�" align="center">
+ <template #default="scope">
+ <div style="color: #CFB249;">
+ {{ scope.row.num2 }}
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="澶勭疆鏁伴噺" align="center">
+ <template #default="scope">
+ <div style="color: #2BB06D;">
+ {{ scope.row.num3 }}
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+
+ </div>
+ </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+
+const tableType = ref([
+ { id: 1, type: '鏈湀', isActive: true },
+ { id: 2, type: '鏈', isActive: false },
+]);
+
+const tableData = [
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+ {
+ street: '濂庡厜濉旇閬�',
+ num1: 12,
+ num2: 5,
+ num3: 2
+ },
+];
+</script>
+
+<style lang="scss" scoped>
+.container {
+ height: 360px;
+}
+.table-container {
+ position: relative;
+}
+.table-content {
+ width: 100%;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+}
+.table-top {
+ height: 51px;
+ background-color: rgba(17, 34, 58, 0.6);
+ border: 1px solid #29466A;
+ border-bottom: none;
+}
+
+.table-select {
+ height: 100%;
+}
+
+.top-title {
+ font-size: 16px;
+ color: #447ED6;
+ margin-left: 20px;
+}
+
+.select-item {
+ padding: 0 14px;
+ height: 100%;
+ border-bottom: 2px solid RGBA(98, 137, 230, 0);
+ color: rgba(94, 134, 194, 1);
+}
+
+.item-active {
+ color: #fff;
+ border-color: RGBA(98, 137, 230, 1);
+}
+
+.data-table {
+ font-size: 14px;
+ border: 1px solid #29466A;
+ width: 100%;
+ height: 100%;
+ background: transparent;
+}
+
+.table-color1 {}
+
+
+
+::v-deep .el-table__inner-wrapper::before {
+ background-color: transparent;
+}
+
+::v-deep .el-table thead tr {
+ background-color: rgba(36, 63, 103, 0.6);
+
+}
+
+::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
+ background-color: rgba(36, 63, 103, 0.6);
+}
+
+.el-table__fixed-right {
+ height: 100% !important;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/daoAnOffice/right/danger/dataView.vue b/src/views/daoAnOffice/right/danger/dataView.vue
new file mode 100644
index 0000000..43959d0
--- /dev/null
+++ b/src/views/daoAnOffice/right/danger/dataView.vue
@@ -0,0 +1,62 @@
+<template>
+ <div class="content-container flex flex-col justify-between">
+ <div class="data-plane flex justify-between">
+ <div class="content-item flex flex-col justify-center items-center">
+ <div class="data-container">
+ <span class="data-red data-num">68</span>
+ <span class="data-red">璧�</span>
+ </div>
+ <div class="data-label">鍙戠幇瀹夊叏闅愭偅</div>
+ </div>
+ <div class="content-item flex flex-col justify-center items-center">
+ <div class="data-container">
+ <span class="data-red data-num">51</span>
+ <span class="data-red">璧�</span>
+ </div>
+ <div class="data-label">涓嬪彂閫氱煡涔�</div>
+ </div>
+ <div class="content-item flex flex-col justify-center items-center">
+ <div class="data-container">
+ <span class="data-red data-num">40</span>
+ <span class="data-red">璧�</span>
+ </div>
+ <div class="data-label">澶勭疆瀹夊叏闅愭偅</div>
+ </div>
+ </div>
+
+ <DataTable></DataTable>
+
+ </div>
+</template>
+
+<script setup>
+import DataTable from './dataTable.vue'
+</script>
+
+<style lang="scss" scoped>
+.content-container {
+ width: 100%;
+ height: 510px;
+}
+
+.content-item {
+ width: 197px;
+ height: 124px;
+ background-color: rgba(17, 34, 58, 0.6);
+ border: 1px solid #29466A;
+}
+
+.data-red {
+ color: rgba(254, 49, 70, 1);
+ font-size: 16px;
+}
+
+.data-num {
+ font-size: 34px;
+}
+
+.data-label {
+ color: rgba(68, 219, 221, 1);
+ font-size: 16px;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/daoAnOffice/right/danger/index.vue b/src/views/daoAnOffice/right/danger/index.vue
index 0acfb49..55bb4fa 100644
--- a/src/views/daoAnOffice/right/danger/index.vue
+++ b/src/views/daoAnOffice/right/danger/index.vue
@@ -4,56 +4,29 @@
<RightTitle title="瀹夊叏闅愭偅鎯呭喌">
<template #top>
<div class="select-container flex">
- <div class="item whitespace-no-wrap cursor-pointer" v-for="item in selectItems" :key="item.itemIndex">
+ <div class="item whitespace-no-wrap cursor-pointer" :class="{'select-active': item.isActive}" v-for="item in selectItems" :key="item.itemIndex"
+ @click="changeSelect(item)">
{{ item.name }}
</div>
</div>
</template>
+
<template #content>
- <div class="content-container flex flex-col justify-between">
- <div class="content-item" v-for="item in contentList" :key="item.itemIndex">
- <div class="content-wrapper flex justify-between">
-
- <!-- 淇℃伅闈㈡澘 -->
- <div class="info-content flex flex-col justify-between">
- <div class="info-item">
- <span class="info-label">閫氭嫨鏃堕棶锛�</span>
- <span class="info-value">{{ item.time }}</span>
- </div>
- <div class="info-item">
- <span class="info-label">闅愭偅绫诲瀷锛�</span>
- <span class="info-value">{{ item.type }}</span>
- </div>
- <div class="info-item">
- <span class="info-label">璐d换鍗曚綅锛�</span>
- <span class="info-value">{{ item.unit }}</span>
- </div>
- <div class="info-item">
- <span class="info-label">閯傛敼鏃堕檺锛�</span>
- <span class="info-value">{{ item.rectTime }}</span>
- </div>
- <div class="info-item">
- <span class="info-label">瀹屾垚鎯呭喌锛�</span>
- <span class="info-value">{{ item.state }}</span>
- </div>
- </div>
-
- <!-- 鍥剧墖鍒楄〃 -->
- <div class="image-content flex justify-between items-center">
- <ImageSwiper :imageList="item.images"></ImageSwiper>
- </div>
- </div>
- </div>
- </div>
+ <InfoView :key="selectItems[0].itemIndex" v-show="selectItems[0].isActive"></InfoView>
+ <DataView :key="selectItems[1].itemIndex" v-show="selectItems[1].isActive"></DataView>
+ <!-- <TransitionGroup name="fade" mode="out-in">
+
+ </TransitionGroup> -->
</template>
+
</RightTitle>
</template>
-<script setup lang="ts">
-import testImage from '@/assets/img/test_img/閬撳畨鍔�.png';
+<script setup>
import RightTitle from "@/components/right-title";
-import ImageSwiper from './imageSwiper.vue';
+import DataView from './dataView.vue';
+import InfoView from './infoView.vue';
import { ref } from 'vue';
@@ -62,53 +35,11 @@
{ itemIndex: 2, name: '鏁版嵁缁熻', isActive: true },
]);
-const contentList = ref([
- {
- itemIndex: 1,
- time: '2023 12-12',
- type: '閬撹矾闅愭偅',
- unit: '閮芥睙鍫板競鍏畨灞�',
- rectTime: '2023-13-23',
- state: '鎶慨涓�',
- images: [
- testImage,
- testImage,
- testImage,
- testImage,
- testImage,
- ]
- },
- {
- itemIndex: 2,
- time: '2023 12-12',
- type: '閬撹矾闅愭偅',
- unit: '閮芥睙鍫板競鍏畨灞�',
- rectTime: '2023-13-23',
- state: '鎶慨涓�',
- images: [
- testImage,
- testImage,
- testImage,
- testImage,
- testImage,
- ]
- },
- {
- itemIndex: 3,
- time: '2023 12-12',
- type: '閬撹矾闅愭偅',
- unit: '閮芥睙鍫板競鍏畨灞�',
- rectTime: '2023-13-23',
- state: '鎶慨涓�',
- images: [
- testImage,
- testImage,
- testImage,
- testImage,
- testImage,
- ]
- }
-]);
+
+const changeSelect = (selectItem) => {
+ selectItems.value.map(item => item.isActive = false);
+ selectItem.isActive = true;
+}
</script>
@@ -124,28 +55,26 @@
background: rgba(67, 102, 155, 0.4);
border: 1px solid rgba(47, 91, 157, 0.8);
flex-shrink: 0;
+ color: #5B83BD;
+}
+
+.select-active {
+ color: #fff;
}
.item:last-child {
margin-right: 0;
}
-.content-container {
- height: 560px;
-}
-.content-item {
- background-color: rgba(17, 34, 58, 0.6);
- padding: 23px 7px 23px 23px;
- border: 1px solid #29466A;
-}
-.content-item:last-child {
- margin-bottom: 0px;
+
+.fade-enter-active,
+.fade-leave-active {
+ transition: opacity 0.5s;
}
-.info-item {
- font-size: 12px;
+.fade-enter,
+.fade-leave-to {
+ opacity: 0;
+ transition: opacity 0.5s;
- .info-label {
- color: rgba(91, 131, 189, 1);
- }
}
</style>
\ No newline at end of file
diff --git a/src/views/daoAnOffice/right/danger/infoView.vue b/src/views/daoAnOffice/right/danger/infoView.vue
new file mode 100644
index 0000000..146c1c8
--- /dev/null
+++ b/src/views/daoAnOffice/right/danger/infoView.vue
@@ -0,0 +1,116 @@
+<template>
+ <div class="content-container flex flex-col justify-between">
+ <div class="content-item" v-for="item in contentList" :key="item.itemIndex">
+ <div class="content-wrapper flex justify-between">
+
+ <!-- 淇℃伅闈㈡澘 -->
+ <div class="info-content flex flex-col justify-between">
+ <div class="info-item">
+ <span class="info-label">閫氭嫨鏃堕棶锛�</span>
+ <span class="info-value">{{ item.time }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">闅愭偅绫诲瀷锛�</span>
+ <span class="info-value">{{ item.type }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">璐d换鍗曚綅锛�</span>
+ <span class="info-value">{{ item.unit }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">閯傛敼鏃堕檺锛�</span>
+ <span class="info-value">{{ item.rectTime }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">瀹屾垚鎯呭喌锛�</span>
+ <span class="info-value">{{ item.state }}</span>
+ </div>
+ </div>
+
+ <!-- 鍥剧墖鍒楄〃 -->
+ <div class="image-content flex justify-between items-center">
+ <ImageSwiper :imageList="item.images"></ImageSwiper>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script setup>
+import testImage from '@/assets/img/test_img/閬撳畨鍔�.png';
+
+import ImageSwiper from './imageSwiper.vue';
+import { ref } from 'vue';
+
+const contentList = ref([
+ {
+ itemIndex: 1,
+ time: '2023 12-12',
+ type: '閬撹矾闅愭偅',
+ unit: '閮芥睙鍫板競鍏畨灞�',
+ rectTime: '2023-13-23',
+ state: '鎶慨涓�',
+ images: [
+ testImage,
+ testImage,
+ testImage,
+ testImage,
+ testImage,
+ ]
+ },
+ {
+ itemIndex: 2,
+ time: '2023 12-12',
+ type: '閬撹矾闅愭偅',
+ unit: '閮芥睙鍫板競鍏畨灞�',
+ rectTime: '2023-13-23',
+ state: '鎶慨涓�',
+ images: [
+ testImage,
+ testImage,
+ testImage,
+ testImage,
+ testImage,
+ ]
+ },
+ {
+ itemIndex: 3,
+ time: '2023 12-12',
+ type: '閬撹矾闅愭偅',
+ unit: '閮芥睙鍫板競鍏畨灞�',
+ rectTime: '2023-13-23',
+ state: '鎶慨涓�',
+ images: [
+ testImage,
+ testImage,
+ testImage,
+ testImage,
+ testImage,
+ ]
+ }
+]);
+</script>
+
+<style lang="scss" scoped>
+.content-container {
+ height: 510px;
+}
+
+.content-item {
+ background-color: rgba(17, 34, 58, 0.6);
+ padding: 18px 7px 18px 23px;
+ border: 1px solid #29466A;
+}
+
+.content-item:last-child {
+ margin-bottom: 0px;
+}
+
+.info-item {
+ font-size: 12px;
+
+ .info-label {
+ color: rgba(91, 131, 189, 1);
+ }
+}
+</style>
\ No newline at end of file
diff --git a/src/views/daoAnOffice/right/publicize/index.vue b/src/views/daoAnOffice/right/publicize/index.vue
index b2c56b4..ab8a1f1 100644
--- a/src/views/daoAnOffice/right/publicize/index.vue
+++ b/src/views/daoAnOffice/right/publicize/index.vue
@@ -105,7 +105,7 @@
.content-container {
width: 100%;
- height: 560px;
+ height: 510px;
overflow-y: hidden;
background-color: rgba(17, 34, 58, 0.6);
border: 1px solid rgba(47, 91, 157, 0.8);
@@ -125,7 +125,7 @@
.content-video-info {
width: 100%;
- height: 209px;
+ height: 180px;
position: relative;
}
--
Gitblit v1.8.0