guanqb
2023-05-24 88b2c2f1b8509681aee4cb69b0b45a08c88195f5
首页警情折线图添加类型,社区户室数据清零
2 files modified
59 ■■■■■ changed files
src/views/home/components/rightContainer.vue 58 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/home/components/rightContainer.vue
@@ -417,6 +417,7 @@
            ).then((res) => {
                let obj = {}
                if (res.data.timeList) {
                    console.log(res.data, 1111)
                    let yDataList = {}
                    yDataList.dqList = res.data.dqList.reduce(
                        (previous, current) => {
@@ -440,6 +441,34 @@
                        []
                    )
                    yDataList.qtList = res.data.qtList.reduce(
                        (previous, current) => {
                            previous.push(current.count)
                            return previous
                        },
                        []
                    )
                    yDataList.qjList = res.data.qjList.reduce(
                        (previous, current) => {
                            previous.push(current.count)
                            return previous
                        },
                        []
                    )
                    yDataList.sdList = res.data.sdList.reduce(
                        (previous, current) => {
                            previous.push(current.count)
                            return previous
                        },
                        []
                    )
                    yDataList.sduList = res.data.sduList.reduce(
                        (previous, current) => {
                            previous.push(current.count)
                            return previous
                        },
                        []
                    )
                    yDataList.shList = res.data.shList.reduce(
                        (previous, current) => {
                            previous.push(current.count)
                            return previous
@@ -580,7 +609,7 @@
                        },
                    },
                    legend: {
                        data: ['盗窃', '涉诈', '纠纷', '其他'],
                        data: ['盗窃', '涉诈', '纠纷', '其他', '求助', '涉毒', '涉赌', '涉黄'],
                        textStyle: {
                            color: "#fff"
                        }
@@ -658,10 +687,35 @@
                            data: yDataList.qtList,
                            type: "line",
                            smooth: true,
                        },
                        {
                            name: '求助',
                            data: yDataList.qjList,
                            type: "line",
                            smooth: true,
                        },
                        {
                            name: '涉毒',
                            data: yDataList.sduList,
                            type: "line",
                            smooth: true,
                        },
                        {
                            name: '涉赌',
                            data: yDataList.sdList,
                            type: "line",
                            smooth: true,
                        },
                        {
                            name: '涉黄',
                            data: yDataList.shList,
                            type: "line",
                            smooth: true,
                        }
                    ],
                    grid: {
                        top: "4%",
                        top: "24%",
                        left: "3%",
                        right: "2%",
                        bottom: "4%",
src/views/house/index.vue
@@ -1631,6 +1631,7 @@
        // 点击户室--大搜
        residentDetailsClick (params) {
            let residentId = ''
            this.houseDate = []
            if (params.exttype == 'room') {
                residentId = params.std_addr_id.split('|')[2]
                this.getVillagePersonInfo(residentId)