guanqb
2023-05-07 13b6a88a1c703d966bd7cf111619fc9c39c31393
社区二维码、户室
3 files modified
318 ■■■■■ changed files
src/styles/media/index.scss 8 ●●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 88 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 222 ●●●● patch | view | raw | blame | history
src/styles/media/index.scss
@@ -2018,6 +2018,14 @@
                            font-size: countSizeVh(18);
                            right: countSizeVw(10, 1920);
                        }
                        .mini-code {
                            position: absolute;
                            width: countSizeVh(30);
                            height: countSizeVh(30);
                            top: countSizeVh(6);
                            right: countSizeVw(40, 1920);
                        }
                    }
                    .panorama-details-box {
src/views/home/components/leftContainer.vue
@@ -400,7 +400,7 @@
                    this.villagePersonStatisticInfoList = res.data.data
                    var xDate = [], yDate1 = [], yDate2 = [], colors1 = ['#ccf9d0', '#f9d888', '#f7857e'], colors2 = ['#FF6666', '#FFFF00', '#0066CC']
                    var xDate = [], yDate1 = [], yDate2 = [], colors1 = ['#f1ce0d', '#eea827', '#e87a4a'], colors2 = ['#8ce070', '#4fd690', '#1bcdaf']
                    if (this.villagePersonStatisticInfoList.data.length > 0) {
                        this.villagePersonStatisticInfoList.data.forEach(e => {
@@ -463,7 +463,7 @@
                })
            }
            homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate1, yDate2, ['#06B5D7', '#44C0C1', '#71C8B1'], ['#FF6666', '#9a76dc', '#602ac2']))
            homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate1, yDate2, ['#53eefe', '#51d5f1', '#133d6b'], ['#8b25c1', '#b81fee', '#421784']))
        },
        /**
@@ -549,30 +549,28 @@
                            },
                            itemStyle: {
                                normal: {
                                    color: colors1[0],
                                    // color: function (params) {
                                    //     return new global.echarts.graphic.LinearGradient(
                                    //         0, 0, 0, 1,
                                    //         [
                                    //             { offset: 0, color: colors1[0] },
                                    //             { offset: 0.5, color: colors1[1] },
                                    //             { offset: 1, color: colors1[2] },
                                    //         ]
                                    //     )
                                    // }
                                    color: function (params) {
                                        return new global.echarts.graphic.LinearGradient(
                                            0, 0, 0, 1,
                                            [
                                                { offset: 0, color: colors1[0] },
                                                { offset: 0.5, color: colors1[1] },
                                                { offset: 1, color: colors1[2] },
                                            ]
                                        )
                                    }
                                },
                                emphasis: {
                                    color: colors1[0],
                                    // color: function (params) {
                                    //     return new global.echarts.graphic.LinearGradient(
                                    //         0, 0, 0, 1,
                                    //         [
                                    //             { offset: 0, color: colors1[2] },
                                    //             { offset: 0.7, color: colors1[1] },
                                    //             { offset: 1, color: colors1[0] }
                                    //         ]
                                    //     )
                                    // }
                                    color: function (params) {
                                        return new global.echarts.graphic.LinearGradient(
                                            0, 0, 0, 1,
                                            [
                                                { offset: 0, color: colors1[2] },
                                                { offset: 0.7, color: colors1[1] },
                                                { offset: 1, color: colors1[0] }
                                            ]
                                        )
                                    }
                                }
                            },
                        },
@@ -588,30 +586,28 @@
                            },
                            itemStyle: {
                                normal: {
                                    color: colors2[0]
                                    // color: function (params) {
                                    //     return new global.echarts.graphic.LinearGradient(
                                    //         0, 0, 0, 1,
                                    //         [
                                    //             { offset: 0, color: colors2[2] },
                                    //             { offset: 0.5, color: colors2[1] },
                                    //             { offset: 1, color: colors2[0] },
                                    //         ]
                                    //     )
                                    // }
                                    color: function (params) {
                                        return new global.echarts.graphic.LinearGradient(
                                            0, 0, 0, 1,
                                            [
                                                { offset: 0, color: colors2[2] },
                                                { offset: 0.5, color: colors2[1] },
                                                { offset: 1, color: colors2[0] },
                                            ]
                                        )
                                    }
                                },
                                emphasis: {
                                    color: colors2[0]
                                    // color: function (params) {
                                    //     return new global.echarts.graphic.LinearGradient(
                                    //         0, 0, 0, 1,
                                    //         [
                                    //             { offset: 0, color: colors2[0] },
                                    //             { offset: 0.7, color: colors2[1] },
                                    //             { offset: 1, color: colors2[2] }
                                    //         ]
                                    //     )
                                    // }
                                    color: function (params) {
                                        return new global.echarts.graphic.LinearGradient(
                                            0, 0, 0, 1,
                                            [
                                                { offset: 0, color: colors2[0] },
                                                { offset: 0.7, color: colors2[1] },
                                                { offset: 1, color: colors2[2] }
                                            ]
                                        )
                                    }
                                }
                            },
                        },
src/views/house/index.vue
@@ -65,11 +65,12 @@
                                <div class="l">标准地址:</div>
                                <div class="r">{{ villageInfo.address ? villageInfo.address : '暂无数据' }}</div>
                            </div>
                            <!-- <div class="code">
                                <el-image fit="contain" src="/img/code.jpg" :preview-src-list="['/img/code.jpg']">
                                    <div slot="error" class="image-slot">暂无二维码</div>
                            <div class="code">
                                <el-image fit="contain" :src="villageInfo.codeUrl"
                                    :preview-src-list="[villageInfo.codeUrl]">
                                    <div slot="error" class="image-slot"> </div>
                                </el-image>
                            </div> -->
                            </div>
                        </div>
                    </div>
                </el-main>
@@ -148,6 +149,10 @@
                                        <div>户籍人口</div>
                                    </div>
                                    <div @click="goTOPeopleDetail(2)">
                                        <div style="color:#FF796C">{{ peopleInfo.actualPopulation }}</div>
                                        <div>实有人口</div>
                                    </div>
                                    <div @click="goTOPeopleDetail(3)">
                                        <div style="color:#FF796C">{{ peopleInfo.KeyPopulation }}</div>
                                        <div>重点人口</div>
                                    </div>
@@ -257,11 +262,16 @@
                <div class="police-info" v-if="navType == 1" ref="policeTableBox">
                    <el-main v-loading="policeInfoLoading" element-loading-text="拼命加载中"
                        element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.5)">
                        <div class="timer">
                        <div class="select-type">
                            <el-date-picker :clearable="false" v-model="eventTime" type="daterange" align="right"
                                unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                                @change="caseTimeChange" :picker-options="pickerOptions"></el-date-picker>
                            <el-select v-model="typeValue" @change="changeJQType" placeholder="请选择" class="type-select-css">
                                <el-option v-for="item in policeInforOptions" :key="item.value" :label="item.label"
                                    :value="item.value" class="option-css"></el-option>
                            </el-select>
                        </div>
                        <!-- <div class="jq-tab">1111111111</div> -->
                        <el-table :data="callPoliceData" style="width: 100%" :height="currentTableHeight"
                            :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
@@ -364,52 +374,57 @@
                element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText">
                <el-table-column prop="realName" label="姓名">
                    <template slot-scope="scope">
                        <span :style="{ color: (scope.row.isKeyPeople == 1 ? '#f00!important' : '#000') }">{{
                        <span :style="{ color: (scope.row.status == 2 ? '#f00!important' : '#000') }">{{
                            scope.row.realName }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="phone" label="电话">
                    <template slot-scope="scope">
                        <span :style="{ color: (scope.row.isKeyPeople == 1 ? '#f00!important' : '#000') }">{{
                        <span :style="{ color: (scope.row.status == 2 ? '#f00!important' : '#000') }">{{
                            scope.row.phone }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="cardNo" label="身份证号">
                    <template slot-scope="scope">
                        <span :style="{ color: (scope.row.isKeyPeople == 1 ? '#f00!important' : '#000') }">{{
                        <span :style="{ color: (scope.row.status == 2 ? '#f00!important' : '#000') }">{{
                            scope.row.cardNo }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="relationship" label="户主关系">
                <el-table-column prop="relation" label="户主关系">
                    <template slot-scope="scope">
                        <span :style="{ color: (scope.row.isKeyPeople == 1 ? '#f00!important' : '#000') }">{{
                            scope.row.relationship }}
                        <span :style="{ color: (scope.row.status == 2 ? '#f00!important' : '#000') }">{{
                            scope.row.relation }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="address" label="户籍地址">
                <el-table-column prop="censusAddress" label="户籍地址">
                    <template slot-scope="scope">
                        <span :style="{ color: (scope.row.isKeyPeople == 1 ? '#f00!important' : '#000') }">{{
                            scope.row.address }}
                        <span :style="{ color: (scope.row.status == 2 ? '#f00!important' : '#000') }">{{
                            scope.row.censusAddress }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column label="人口类型">
                    <template slot-scope="scope"><span
                            :style="{ color: (scope.row.isKeyPeople == 1 ? '#f00!important' : '#000') }">{{
                            :style="{ color: (scope.row.status == 2 ? '#f00!important' : '#000') }">{{
                                scope.row.personType == 1 ? '户籍人口' : '实有人口' }}</span></template>
                </el-table-column>
                <el-table-column label="是否为重点人员">
                    <template slot-scope="scope"><span
                            :style="{ color: (scope.row.isKeyPeople == 1 ? '#f00!important' : '#000') }">{{
                                scope.row.isKeyPeople == 1 ? '是' :
                            :style="{ color: (scope.row.status == 2 ? '#f00!important' : '#000') }">{{
                                scope.row.status == 2 ? '是' :
                                '否'
                            }}</span></template>
                </el-table-column>
            </el-table>
            <div class="mini-code">
                <el-image fit="contain" :src="residentCodeUrl" :preview-src-list="[residentCodeUrl]">
                    <div slot="error" class="image-slot"> </div>
                </el-image>
            </div>
        </el-dialog>
        <el-dialog :title="keyPersonTitle" :visible.sync="keyPersonVisible" :modal-append-to-body="false" :modal="true"
@@ -490,6 +505,45 @@
    data () {
        return {
            typeValue: '',
            policeInforOptions: [
                {
                    value: '',
                    label: '全部'
                },
                {
                    value: '盗窃',
                    label: '盗窃'
                },
                {
                    value: '诈骗',
                    label: '诈骗'
                },
                {
                    value: '纠纷',
                    label: '纠纷'
                },
                {
                    value: '涉赌',
                    label: '涉赌'
                },
                {
                    value: '涉毒',
                    label: '涉毒'
                },
                {
                    value: '涉黄',
                    label: '涉黄'
                },
                {
                    value: '求救',
                    label: '求救'
                },
                {
                    value: '其他',
                    label: '其他'
                }
            ],
            isShowFloorCount: false,
            isBuildHighLightchecked: true,
            isShowBuildListBox: true,
@@ -595,7 +649,8 @@
            },
            floorInfo: {},
            peopleInfo: {},
            choosedBuildId: "",
            choosedBuildUid: "",
            choosedBuildStdId: "",
            keyPeopleType: "",
            peoplePage: {
                total: 0,
@@ -645,6 +700,7 @@
            },
            eventTime: [],
            eventTimeArr: [],
            residentCodeUrl: ''
        }
    },
@@ -740,13 +796,17 @@
    updated () { },
    methods: {
        changeJQType (type) {
            this.getAlarmList()
        },
        // 警情统计中时间变化
        async caseTimeChange (e) {
            const date = e.map((item) => {
                return this.dateFormat(item)
            })
            this.eventTimeArr = date
            this.getAlarmList(this.eventTimeArr)
            this.getAlarmList()
        },
        // 获取当前日期
@@ -955,7 +1015,8 @@
                this.callPolicePage.currentPage = 1
                this.callPoliceData = []
                this.eventTime = this.getHalfYearTime()
                this.getAlarmList(this.eventTimeArr)
                this.eventTimeArr = this.eventTime
                this.getAlarmList()
            } else {
                circleLayer.clear()
                circleLayer.remove()
@@ -1103,7 +1164,7 @@
                }
                this.callPolicePage.currentPage = 1
                this.getAlarmList(this.eventTimeArr)
                this.getAlarmList()
            }).catch(res => {
                setTimeout(() => {
                    this.villageInfoLoading = false
@@ -1166,7 +1227,7 @@
            })
        },
        // 三维接口查询楼栋
        // 三维接口查询楼栋户室
        getHouses3DData (build_std_addr_id, adcode, aoiArr) {
            getHouses(build_std_addr_id, adcode).then((res) => {
                let houseData = res.data.data.properties
@@ -1212,7 +1273,7 @@
        },
        // 三维接口查询楼栋
        // 三维接口高亮楼栋户室
        getResident3DData (build_std_addr_id, adcode, house_name) {
            getHouses(build_std_addr_id, adcode).then((res) => {
                let residentList = res.data.data.properties.nwwqd.features
@@ -1254,17 +1315,17 @@
        // 点击户室--大搜
        residentDetailsClick (params) {
            this.floorChoosed = params.sname
            this.getResident3DData(this.choosedBuildId, "361102", params.sname)
            console.log('residentDetailsClick--then')
            let residentId = params.std_addr_id.split('|')[2]
            // this.getVillagePersonInfo(residentId)
            this.houseDate = [
                { realName: '张三', phone: '17755556666', cardNo: '123456999911223344', personType: 1, isKeyPeople: 0, address: '湖北省武汉市江汉区', relationship: '夫妻' },
                { realName: '李四', phone: '17755556666', cardNo: '123456999911223344', personType: 0, isKeyPeople: 0, address: '湖北省武汉市江汉区', relationship: '夫妻' },
                { realName: '王五', phone: '17755556666', cardNo: '123456999911223344', personType: 1, isKeyPeople: 1, address: '湖北省武汉市江汉区', relationship: '夫妻' },
                { realName: '孙六', phone: '17755556666', cardNo: '123456999911223344', personType: 1, isKeyPeople: 0, address: '湖北省武汉市江汉区', relationship: '夫妻' },
                { realName: '薛七', phone: '17755556666', cardNo: '123456999911223344', personType: 0, isKeyPeople: 1, address: '湖北省武汉市江汉区', relationship: '夫妻' },
            ]
            this.getResident3DData(residentId, "361102", params.sname)
            this.getVillagePersonInfo(residentId)
            // this.houseDate = [
            //     { realName: '张三', phone: '17755556666', cardNo: '123456999911223344', personType: 1, status: 2, censusAddress: '湖北省武汉市江汉区', relation: '夫妻' },
            //     { realName: '李四', phone: '17755556666', cardNo: '123456999911223344', personType: 0, status: 2, censusAddress: '湖北省武汉市江汉区', relation: '夫妻' },
            //     { realName: '王五', phone: '17755556666', cardNo: '123456999911223344', personType: 1, status: 1, censusAddress: '湖北省武汉市江汉区', relation: '夫妻' },
            //     { realName: '孙六', phone: '17755556666', cardNo: '123456999911223344', personType: 1, status: 2, censusAddress: '湖北省武汉市江汉区', relation: '夫妻' },
            //     { realName: '薛七', phone: '17755556666', cardNo: '123456999911223344', personType: 0, status: 1, censusAddress: '湖北省武汉市江汉区', relation: '夫妻' },
            // ]
            this.residentDetailsTitle = `${params.name}住户信息`
            this.residentDetailsShow = true
            this.residentNoDataText = ' '
@@ -1301,7 +1362,8 @@
            }, 200)
            this.isShowFloorCount = true
            // 获取户籍人口重点人口数据
            this.choosedBuildId = item.build_uid
            this.choosedBuildUid = item.build_uid
            this.choosedBuildStdId = item.build_std_addr_id
            // 重点人口户籍人口
            this.getVillagePersonStatisticInfoByBuildId(item.build_uid)
            // 楼栋单元楼层户室查询-大搜
@@ -1481,19 +1543,27 @@
            this.keyPersonVisible = true
            this.keyPeopleType = status
            this.peoplePage.currentPage = 1
            this.keyPersonTitle = status == 1 ? "户籍人口详情" : "重点人口详情"
            this.keyPersonTitle = status == 1 ? "户籍人口详情" : status == 2 ? "实有人口详情" : "重点人口详情"
            this.peopleNoDataText = ' '
            this.keyPeopleLoading = true
            this.personDetailArr = []
            let typeObj = {}
            if (status == 1 || status == 2) {
                typeObj = { peopletype: status }
            } else {
                typeObj = { status: 2 }
            }
            this.getVillagePersonInfo(
                "",
                this.choosedBuildId,
                status == 1 ? "" : status
                this.choosedBuildUid,
                typeObj
            )
        },
        // 获取历史接警记录
        getAlarmList (timeArr) {
        getAlarmList () {
            this.callPoliceData = []
            if (circleLayer != null) {
                circleLayer.clear()
                circleLayer.remove()
@@ -1506,16 +1576,15 @@
            // 获取半年内数据
            getAlarmList({
                current: this.callPolicePage.currentPage,
                size: this.callPolicePage.pagesize,
                sfdz: this.villageInfo.name,
                jjdwbh: this.userInfo.dept_id,
                // start: this.getHalfYearTime()[0],
                // end: this.getHalfYearTime()[1],
                start: timeArr[0],
                end: timeArr[1]
                size: this.callPolicePage.pageSize,
                aoiId: this.villageInfo.aoiId,
                // jjdwbh: this.userInfo.dept_id,
                bjlx: this.typeValue,
                start: this.eventTimeArr[0],
                end: this.eventTimeArr[1]
            }).then((res) => {
                this.callPolicePage.count = res.data.data.pages
                console.log('getAlarmList', res)
                if (res.data.data.records.length > 0) {
                    this.callPoliceData = res.data.data.records.map((item, index) => {
@@ -1655,17 +1724,23 @@
            this.callPolicePage.currentPage = currentPage
            this.policeInfoLoading = true
            this.jqNoDataText = '  '
            this.getAlarmList(this.eventTimeArr)
            this.getAlarmList()
        },
        peopleHandleCurrentChange (currentPage) {
            this.keyPeopleLoading = true
            this.peoplePage.currentPage = currentPage
            this.personDetailArr = []
            let typeObj = {}
            if (this.keyPeopleType == 1 || this.keyPeopleType == 2) {
                typeObj = { peopletype: this.keyPeopleType }
            } else {
                typeObj = { status: 2 }
            }
            this.getVillagePersonInfo(
                "",
                this.choosedBuildId,
                this.keyPeopleType == 1 ? "" : this.keyPeopleType,
                this.choosedBuildUid,
                typeObj,
                currentPage
            )
        },
@@ -1693,6 +1768,9 @@
                this.getResidentialQuartersInfo(res.data.data.md5Id, "361102")
                this.villageInfo.policeName = res.data.data.policeName
                this.villageInfo.policeStationName = res.data.data.policeStationName
                this.villageInfo.codeUrl = res.data.data.url
                this.villageInfo.aoiId = res.data.data.aoiId
                console.log('getVillageInfo', res)
            })
        },
@@ -1700,16 +1778,17 @@
        getVillagePersonStatisticInfoByBuildId (buildId) {
            getVillagePersonStatisticInfoByBuildId(buildId).then((res) => {
                this.peopleInfo.registeredPopulation = res.data.data[0]
                this.peopleInfo.KeyPopulation = res.data.data[1]
                this.peopleInfo.actualPopulation = res.data.data[1]
                this.peopleInfo.KeyPopulation = res.data.data[2]
            })
        },
        // 房屋人口信息
        getVillagePersonInfo (resBusId, buildId, status, current, realName, phone) {
        getVillagePersonInfo (resBusId, buildId, typeObj, current, realName, phone) {
            getVillagePersonInfo(
                resBusId,
                buildId,
                status,
                typeObj,
                current,
                realName,
                phone
@@ -1718,14 +1797,16 @@
                    setTimeout(() => {
                        this.personDetailArr = res.data.data.records
                    }, 500)
                    console.log('getVillagePersonInfo', res)
                    this.peoplePage.pageSize = res.data.data.size
                    this.peoplePage.total = res.data.data.total
                    setTimeout(() => {
                        this.keyPeopleLoading = false
                        if (res.data.data.records.length == 0) {
                            if (status == '') {
                            if (this.keyPeopleType == 1) {
                                this.peopleNoDataText = '暂无户籍人口信息'
                            } else if (this.keyPeopleType == 2) {
                                this.peopleNoDataText = '暂无实有人口信息'
                            } else {
                                this.peopleNoDataText = '暂无重点人口信息'
                            }
@@ -1733,6 +1814,10 @@
                    }, 500)
                } else {
                    this.houseDate = res.data.data.records
                    this.residentCodeUrl = ''
                    if (this.houseDate.length > 0) {
                        this.residentCodeUrl = this.houseDate[0].url
                    }
                    setTimeout(() => {
                        this.residentLoading = false
                    }, 500)
@@ -1744,8 +1829,10 @@
                setTimeout(() => {
                    this.keyPeopleLoading = false
                    this.residentLoading = false
                    if (status == '') {
                    if (this.keyPeopleType == 1) {
                        this.peopleNoDataText = '暂无户籍人口信息'
                    } else if (this.keyPeopleType == 2) {
                        this.peopleNoDataText = '暂无实有人口信息'
                    } else {
                        this.peopleNoDataText = '暂无重点人口信息'
                    }
@@ -1760,10 +1847,16 @@
            this.peopleName = ""
            this.peoplePage.currentPage = 1
            this.personDetailArr = []
            let typeObj = {}
            if (this.keyPeopleType == 1 || this.keyPeopleType == 2) {
                typeObj = { peopletype: this.keyPeopleType }
            } else {
                typeObj = { status: 2 }
            }
            this.getVillagePersonInfo(
                "",
                this.choosedBuildId,
                this.keyPeopleType == 1 ? "" : this.keyPeopleType,
                this.choosedBuildUid,
                typeObj,
                this.peoplePage.currentPage
            )
        },
@@ -1773,10 +1866,16 @@
            this.keyPeopleLoading = true
            this.peoplePage.currentPage = 1
            this.personDetailArr = []
            let typeObj = {}
            if (this.keyPeopleType == 1 || this.keyPeopleType == 2) {
                typeObj = { peopletype: this.keyPeopleType }
            } else {
                typeObj = { status: 2 }
            }
            this.getVillagePersonInfo(
                "",
                this.choosedBuildId,
                this.keyPeopleType == 1 ? "" : this.keyPeopleType,
                this.choosedBuildUid,
                typeObj,
                this.peoplePage.currentPage,
                this.peopleName,
                this.callPhone
@@ -2638,6 +2737,13 @@
                    align-items: center;
                    justify-content: center;
                }
                .select-type {
                    :deep(.el-select) {
                        width: 100%;
                    }
                }
            }
        }
    }