odc.xiaohui
2024-02-29 721f6ec69e796fd5c9807eaf68ec25df2bcf4e66
Merge remote-tracking branch 'origin/master'
3个文件已修改
3个文件已添加
612 ■■■■ 已修改文件
src/views/daoAnOffice/right/analysis/index.vue 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/daoAnOffice/right/danger/dataTable.vue 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/daoAnOffice/right/danger/dataView.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/daoAnOffice/right/danger/index.vue 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/daoAnOffice/right/danger/infoView.vue 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/daoAnOffice/right/publicize/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
src/views/daoAnOffice/right/danger/dataTable.vue
New file
@@ -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>
src/views/daoAnOffice/right/danger/dataView.vue
New file
@@ -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>
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">
      <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">
            <!-- 信息面板 -->
            <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">责任单位:</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>
      </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>
src/views/daoAnOffice/right/danger/infoView.vue
New file
@@ -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">责任单位:</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>
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;
}