智慧园区前端大屏
linwe
2024-11-04 015854c3952f95d88b8080ea410b35e41cf39bdb
首页优化
3 files modified
71 ■■■■ changed files
src/views/survey/components/box/dataContent.vue 32 ●●●● patch | view | raw | blame | history
src/views/survey/components/box/fireContent.vue 31 ●●●● patch | view | raw | blame | history
src/views/survey/components/box/fireTrend.vue 8 ●●●●● patch | view | raw | blame | history
src/views/survey/components/box/dataContent.vue
@@ -23,13 +23,12 @@
function getStatistic() {
    getRescueTeamStatistic().then(res => {
        let xaxis_data = []
        res.data.data.forEach(element => {
            xaxis_data.push(element.type)
        });
        let yaxis_data = []
        res.data.data.forEach(element => {
            xaxis_data.push(element.type)
            yaxis_data.push(element.num)
        });
        myEcharts.setOption({
            tooltip: {
                trigger: 'axis',
@@ -37,15 +36,32 @@
                    type: 'shadow'
                }
            },
            xAxis: {
                data: xaxis_data
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            yAxis: {},
            xAxis: [
                {
                    type: 'category',
                    data: xaxis_data,
                    axisTick: {
                        alignWithLabel: true
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value'
                }
            ],
            series: [
                {
                    name: 'Direct',
                    type: 'bar',
                    data: yaxis_data,
                    barWidth: '30%'
                    barWidth: '30%',
                    data: yaxis_data
                }
            ]
        })
src/views/survey/components/box/fireContent.vue
@@ -20,11 +20,9 @@
function getRiskSource() {
    getRiskSourceStatistic().then(res => {
        let xaxis_data = []
        res.data.data.forEach(element => {
            xaxis_data.push(element.riskLevel)
        });
        let yaxis_data = []
        res.data.data.forEach(element => {
            xaxis_data.push(element.riskLevel)
            yaxis_data.push(element.num)
        });
        myEcharts.setOption({
@@ -34,15 +32,32 @@
                    type: 'shadow'
                }
            },
            xAxis: {
                data: xaxis_data
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            yAxis: {},
            xAxis: [
                {
                    type: 'category',
                    data: xaxis_data,
                    axisTick: {
                        alignWithLabel: true
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value'
                }
            ],
            series: [
                {
                    name: 'Direct',
                    type: 'bar',
                    data: yaxis_data,
                    barWidth: '30%'
                    barWidth: '30%',
                    data: yaxis_data
                }
            ]
        })
src/views/survey/components/box/fireTrend.vue
@@ -22,7 +22,7 @@
})
function getPages () {
function getPages() {
  getPage().then(res => {
    parkQy.value = res.data.data.records
    console.log(res)
@@ -31,7 +31,7 @@
  })
}
function search () {
function search() {
  getPage({ name: searchQuery.value }).then(res => {
    parkQy.value = res.data.data.records
    console.log(res)
@@ -88,6 +88,8 @@
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  outline: none;
  background-color: transparent;
  color: #fff;
}
.search-button {
@@ -107,7 +109,7 @@
.data-content-item {
  display: flex;
  margin: 2px 10px;
  padding: 5px 0;
  padding: 5px 5px;
  background-color: #747bff;
  justify-content: space-between;
  border-radius: 5px;