Lou
2024-02-28 5affd44d0e01b62ad0bc352916ab5e2c3067baff
update
3 files modified
1 files added
1064 ■■■■■ changed files
common/setting.js 4 ●●●● patch | view | raw | blame | history
pages/home/index5.vue 1023 ●●●●● patch | view | raw | blame | history
subPackage/house/houseNumber/index.vue 29 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/cscj.vue 8 ●●●● patch | view | raw | blame | history
common/setting.js
@@ -10,8 +10,8 @@
    version: '2.0.0',
    // 开发环境接口Url
    // devUrl: 'http://z4042833u6.wicp.vip',
    devUrl: 'http://192.168.2.140:9528',
    // devUrl: 'https://srgdjczzxtpt.com:2080/api',
    // devUrl: 'http://192.168.2.140:9528',
    devUrl: 'https://srgdjczzxtpt.com:2080/api',
    // devUrl: 'https://kt39592615.goho.co',
    minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
    // minioBaseUrl: "http://192.168.0.101:9528/",
pages/home/index5.vue
New file
@@ -0,0 +1,1023 @@
<template>
    <view class="layout">
        <!-- <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder @leftClick="selectBoxShow = !selectBoxShow"
            bgColor="#017BFC">
            <view slot="left" class="top flex">
                <view class="top-text f-30 fw c-ff">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
                </view>
                <u-icon name="arrow-down" color="#fff"></u-icon>
            </view>
        </u-navbar> -->
        <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder @leftClick="navToSelectSite()"
            bgColor="#017BFC">
            <view slot="left" class="top flex">
                <view class="top-text f-30 fw c-ff">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
                </view>
                <u-icon name="arrow-right" color="#fff"></u-icon>
            </view>
        </u-navbar>
        <view class="swiper">
            <u-swiper :list="bannerList" height="320rpx" radius="10"></u-swiper>
        </view>
        <view class="content">
            <view class="">
                <view class="section flex j-c-s-a a-i-c mb-20" v-if="isShowContact && curSelectSite.addressType == 1">
                    <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name"
                        @click="navigatorPage(`${i.path}?id=${i.id}`)">
                        <image class="section-item-bg" :src="i.bgImg" mode="aspectFill"></image>
                        <view class="item-box">
                            <view class="f-28">{{i.title}}</view>
                            <view class="flex j-c-s-b">
                                <text class="f-22">{{i.name}}</text>
                                <u-icon :name="i.icon" @click.stop="callPhone(i.phone)"></u-icon>
                            </view>
                        </view>
                    </view>
                </view>
                <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1 || roleType == 3">
                    <view @click="scan" class="block-item">
                        <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
                        <view class="block-item-box flex a-i-c ">
                            <u-icon name="/static/icon/nav-05.png" width="65rpx" height="65rpx"></u-icon>
                            <view class="item-text flex f-d-c j-c-s-b">
                                <text class="f-24 fw">扫一扫</text>
                                <text class="f-22 opacity">场所采集</text>
                            </view>
                        </view>
                    </view>
                    <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
                        <image class="block-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
                        <view class="block-item-box flex a-i-c">
                            <u-icon name="/static/icon/nav-06.png" width="65rpx" height="65rpx"></u-icon>
                            <view class="item-text flex f-d-c j-c-s-b">
                                <text class="f-24 fw">打卡登记</text>
                                <text class="f-22 opacity">在线打卡</text>
                            </view>
                        </view>
                    </view>
                    <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
                        <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
                        <view class="block-item-box flex a-i-c">
                            <u-icon name="/static/icon/nav-12.png" width="65rpx" height="65rpx"></u-icon>
                            <view class="item-text flex f-d-c j-c-s-b">
                                <text class="f-24 fw">驾驶舱</text>
                                <text class="f-22 opacity">数据统计</text>
                            </view>
                        </view>
                    </view>
                </view>
                <!-- <view class="nav bgc-ff" v-if="liveList.length || roleType == 2">
                    <u-grid :border="false" col="4">
                        <block v-if="liveList.length">
                            <u-grid-item @click.native="navigatorPage(i.path)" v-for="(i,k) in liveList" :key="k">
                                <view class="nav-item flex f-d-c a-i-c">
                                    <u-icon :name="i.pictureImg" width="80rpx" height="80rpx"></u-icon>
                                    <text class="nav-item-text f-26 mt-20">{{i.name}}</text>
                                </view>
                            </u-grid-item>
                        </block>
                        <block v-if="roleType == 2">
                            <u-grid-item @click="navigatorPage(i.path)" v-for="(i,k) in communityList" :key="k">
                                <view class="nav-item flex f-d-c a-i-c">
                                    <u-icon :name="i.icon" width="80rpx" height="80rpx"></u-icon>
                                    <text class="nav-item-text f-26  mt-10">{{i.title}}</text>
                                </view>
                            </u-grid-item>
                        </block>
                    </u-grid>
                </view> -->
                <view class="nav bgc-ff">
                    <u-tabs :list="tabs" @click="changeTabs"></u-tabs>
                    <!-- <u-grid-item @click="navigatorPage(i.path)" v-for="(i,k) in communityList" :key="k">
                        <view class="nav-item flex f-d-c a-i-c">
                            <u-icon :name="i.icon" width="80rpx" height="80rpx"></u-icon>
                            <text class="nav-item-text f-26  mt-10">{{i.title}}</text>
                        </view>
                    </u-grid-item> -->
                </view>
            </view>
            <view class="bgc-ff p-20 mb-20 pb-20" v-if="isShowHouse">
                <caption-row title="楼盘表" />
                <view class="flex flex-wrap">
                    <view class="cell bgc-main flex a-i-c" v-for="(item, index) in houseDataList.slice(0, 6)"
                        @click.native="pushPage(item)" :key="index">
                        <u-icon name="/static/icon/floor.png" width="32rpx" height="32rpx"></u-icon>
                        <text class="cell-text f-26 c-ff">{{item.title}}</text>
                    </view>
                </view>
            </view>
            <view class="bgc-ff mb-20 p-20 pb-20" v-if="jobList.length">
                <caption-row title="工作台" />
                <u-grid :border="false" col="4">
                    <u-grid-item @click="navigatorPage(item.path)" v-for="(item, index) in jobList" :index="index"
                        :key="index" :customStyle="{paddingTop:20+'rpx'}">
                        <view class="grid-item flex f-d-c a-i-c" :style="{background:item.background}">
                            <u-icon :name="item.pictureImg" width="60rpx" height="60rpx"></u-icon>
                            <text class="grid-text f-24 fw mt-10">{{item.name}}</text>
                        </view>
                    </u-grid-item>
                </u-grid>
            </view>
            <!-- <view class="bgc-ff mb-20 p-20 pb-20" v-if="(roleType == 2) && (curSelectSite.addressType == 2)">
                <caption-row title="工作台" />
                <u-grid :border="false" col="4">
                    <u-grid-item @click="navigatorPage('/subPackage/workbench/views/editExamine')"
                        :customStyle="{paddingTop:20+'rpx'}">
                        <view class="grid-item flex f-d-c a-i-c"
                            style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
                            <u-icon name="/static/icon/menu-05.png" width="60rpx" height="60rpx"></u-icon>
                            <text class="grid-text f-24 fw mt-10">场所维护</text>
                        </view>
                    </u-grid-item>
                    <u-grid-item @click="navToSiteList()" :customStyle="{paddingTop:20+'rpx'}">
                        <view class="grid-item flex f-d-c a-i-c"
                            style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
                            <u-icon name="/static/icon/menu-02.png" width="60rpx" height="60rpx"></u-icon>
                            <text class="grid-text f-24 fw mt-10">场所任务</text>
                        </view>
                    </u-grid-item>
                </u-grid>
            </view> -->
            <view class="p-20 bgc-ff mb-20" v-if="isShowNotice">
                <caption-row title="通知公告" :is-link="true" url="/subPackage/article/list" />
                <notice-list :data="notice" />
            </view>
            <u-picker :title="roleTypeName" :defaultIndex="selectSiteIndex" :closeOnClickOverlay="true"
                @close="selectBoxShow = false" :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns"
                @confirm="confirmSite" @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
        </view>
    </view>
</template>
<script>
    import {
        getFuncList,
        getHouseList
    } from "@/api/doorplateAddress/doorplateAddress";
    import {
        getPage
    } from "@/api/article/article";
    import {
        getBannerList,
        getContact,
        getQrCodeDetail
    } from "@/api/system/index"
    import {
        minioBaseUrl
    } from "@/common/setting"
    import noticeList from "@/components/noticeList/noticeList";
    import captionRow from "@/components/caption/caption.vue"
    import {
        getPublicSecurityDetail
    } from "@/api/grid/grid.js"
    export default {
        components: {
            noticeList,
            captionRow
        },
        data() {
            return {
                jobList: [],
                roleType: 2, // 1网格员/系统管理员 、  2居民   3民警
                roleTypeName: "街道社区网格",
                selectBoxShow: false,
                siteColumns: [],
                curSelectSite: {
                    addressType: 1
                },
                columnData: [],
                houseDataList: [{
                    title: '-',
                    useSlot: true
                }],
                menuList: [],
                curHouseCode: '',
                notice: [],
                selectSiteIndex: [0, 0],
                liveList: [], //生活菜单
                contactList: [], //便民服务联系方式
                isShowHouse: false, //显示楼盘表
                isShowNotice: true, //显示通知公告
                isShowContact: false,
                bannerList: [],
                navList: [{
                        title: "物业",
                        name: "",
                        icon: "/static/icon/tel-green.png",
                        bgImg: "/static/icon/nav-bg-01.png",
                        phone: ""
                    },
                    {
                        title: "综治网格",
                        name: "",
                        icon: "/static/icon/tel-orange.png",
                        bgImg: "/static/icon/nav-bg-02.png",
                        phone: ""
                    },
                    {
                        title: "公安网格",
                        name: "",
                        icon: "/static/icon/tel-blue.png",
                        bgImg: "/static/icon/nav-bg-03.png",
                        phone: ""
                    },
                ],
                communityList: [{
                        title: "选举调查",
                        icon: "/static/icon/nav-14.png",
                        path: "/subPackage/article/communityList?type=1"
                    },
                    {
                        title: "公益报名",
                        icon: "/static/icon/nav-13.png",
                        path: "/subPackage/article/signUpList?type=0"
                    },
                    {
                        title: "公共收益",
                        icon: "/static/icon/nav-15.png",
                        path: "/subPackage/article/list?type=1"
                    }
                ],
                tabs: [{
                        name: '公众服务',
                        list: [{
                                name: "公共报事"
                            },
                            {
                                name: "便民服务"
                            },
                        ]
                    }, {
                        name: '警务服务',
                        hasPlaceMenu: true,
                        list: [{
                                name: "取保候审"
                            },
                            {
                                name: "二手交易"
                            },
                            {
                                name: "消防自查"
                            }
                        ]
                    }, {
                        name: '生活服务',
                        list: [{
                                name: "物业缴费"
                            },
                            {
                                name: "租客上报"
                            }
                        ]
                    }, {
                        name: '企业服务',
                        list: [{
                                name: "场所维护"
                            },
                            {
                                name: "企业商户上报"
                            },
                            {
                                name: "场所任务"
                            }
                        ]
                    },
                    {
                        name: '社区服务',
                        list: [{
                                title: "选举调查",
                                icon: "/static/icon/nav-14.png",
                                path: "/subPackage/article/communityList?type=1"
                            },
                            {
                                title: "公益报名",
                                icon: "/static/icon/nav-13.png",
                                path: "/subPackage/article/signUpList?type=0"
                            },
                            {
                                title: "公共收益",
                                icon: "/static/icon/nav-15.png",
                                path: "/subPackage/article/list?type=1"
                            }
                        ]
                    }
                ]
            }
        },
        onLoad() {
            this.getBanner();
            this.init()
            uni.$on('refresh', () => {
                this.selectSiteIndex = [0, 0]
                this.curSelectSite = {
                    addressType: 1
                }
                this.init()
            })
            //选择位置刷新楼盘表
            uni.$on('refreshPage', (val) => {
                console.log("refreshPage=>", val);
                this.curSelectSite = val
                this.getHouseDataList(val.id)
                this.curHouseCode = this.curSelectSite.houseCode
                uni.setStorageSync("curHouseCode", this.curSelectSite.houseCode)
            })
        },
        onShareAppMessage() {
        },
        computed: {
            hasMenu() {
                return (name) => {
                    let resultArr = this.getMenu(name, this.menuList)
                    if (resultArr.length) {
                        return resultArr
                    } else {
                        return []
                    }
                }
            }
        },
        watch: {
            'curSelectSite.id': {
                handler(newVal, oldVal) {
                    if (newVal) {
                        this.$store.commit("setSiteInfo", this.curSelectSite)
                    }
                },
                deep: true,
                immediate: true
            },
            'curSelectSite.addressType': {
                handler(newVal, oldVal) {
                    if (newVal) {
                        this.$store.dispatch("getMenuList").then(res => {
                            this.getMenuList()
                        });
                    }
                },
                deep: true,
                // immediate: true
            }
        },
        // onPullDownRefresh() {
        //     this.$store.dispatch("getMenuList").then(res => {
        //         this.getMenuList()
        //     });
        //     setTimeout(() => {
        //         uni.stopPullDownRefresh();
        //     }, 300)
        // },
        methods: {
            changeTabs(item) {
                console.log(item);
                // let list = item.list;
                // for (let i of list) {
                // }
            },
            //初始化
            init() {
                this.selectRole = uni.getStorageSync("activeRole")
                this.getMenuList()
                this.getSiteList()
                this.getNoticeList()
            },
            getBanner() {
                getBannerList({
                    current: 1,
                    size: 5
                }).then(res => {
                    let data = res.data.records;
                    if (data.length) {
                        for (let i of data) {
                            i.url = `${minioBaseUrl}${i.url}`
                        }
                        this.bannerList = data;
                    }
                })
            },
            getContactList() {
                getContact({
                    houseCode: uni.getStorageSync("curHouseCode")
                }).then(res => {
                    let data = res.data;
                    this.contactList = this.navList;
                    if (data.wg) {
                        this.contactList[1].name = data.wg.name;
                        this.contactList[1].phone = data.wg.phone
                        this.contactList[1].path = "/subPackage/grid/comprehensive";
                        this.contactList[1].id = data.wg.code;
                    } else {
                        this.contactList[1].name = "";
                    }
                    if (data.wy) {
                        this.contactList[0].name = data.wy.name;
                        this.contactList[0].phone = data.wy.phone;
                        this.contactList[0].path = "/subPackage/grid/tenement";
                        this.contactList[0].id = data.wy.code;
                    } else {
                        this.contactList[0].name = "";
                    }
                    if (data.ga) {
                        this.contactList[2].name = data.ga.name;
                        this.contactList[2].phone = data.ga.phone;
                        this.contactList[2].path = "/subPackage/grid/publicSecurity";
                        this.contactList[2].id = data.ga.code;
                    } else {
                        this.contactList[2].name = "";
                    }
                })
            },
            callPhone(phone) {
                uni.makePhoneCall({
                    phoneNumber: phone
                })
            },
            async getNoticeList() {
                const param = {
                    size: 5,
                    current: 1,
                    houseCode: uni.getStorageSync("siteInfo").houseCode
                }
                const res = await getPage(param)
                this.notice = res.data.records
            },
            //获取场所列表
            async getSiteList() {
                let type = null
                let roleName = this.selectRole.roleName
                if (roleName == '网格员' || roleName == '系统管理员') {
                    type = 1
                    this.roleType = 1;
                    this.roleTypeName = "街道社区网格"
                } else if (roleName == '居民') {
                    type = 2
                    this.roleType = 2
                    this.roleTypeName = "居民"
                } else if (roleName == '民警') {
                    type = 1
                    this.roleType = 3
                    this.roleTypeName = "街道社区"
                }
                const res = await getFuncList(type, roleName)
                this.columnData = res.data;
                let data = res.data
                this.siteColumns = []
                this.buildSiteColumn(data, 0)
            },
            buildSiteColumn(dataList, index) {
                if (dataList.length > 0) {
                    this.siteColumns[index] = dataList
                    if (dataList[0].children && dataList[0].children.length > 0) {
                        this.curSelectSite = dataList[0].children[0];
                        this.getHouseDataList(dataList[0].children[0].id)
                        this.buildSiteColumn(dataList[0].children, index + 1)
                    } else {
                        this.curSelectSite = dataList[0];
                    }
                    this.curHouseCode = this.curSelectSite.id
                    uni.setStorageSync("curHouseCode", this.curSelectSite.id)
                }
            },
            // 获取楼盘
            async getHouseDataList(code) {
                const param = {
                    type: 1,
                    code: code,
                    roleName: uni.getStorageSync('activeRole').roleName
                }
                const res = await getHouseList(param)
                res.data.forEach(item => {
                    item.title = item.name
                    item.useSlot = true
                    delete item.name
                })
                this.houseDataList = res.data || [{
                    title: '-',
                    useSlot: true
                }]
            },
            changeSite(e) {
                const {
                    columnIndex,
                    value,
                    values, // values为当前变化列的数组内容
                    index,
                    // 微信小程序无法将picker实例传出来,只能通过ref操作
                    picker = this.$refs.uPicker
                } = e
                // 当第一列值发生变化时,变化第二列(后一列)对应的选项
                if (columnIndex === 0 && this.columnData.length > 0) {
                    // picker为选择器this实例,变化第二列对应的选项
                    picker.setColumnValues(1, this.columnData[index])
                    // this.siteColumns[1] = this.columnData[index].children
                    this.$set(this.siteColumns, 1, this.columnData[index].children)
                };
            },
            // 回调参数为包含columnIndex、value、values
            confirmSite(e) {
                console.log('confirm', e)
                this.selectSiteIndex = e.indexs;
                this.curSelectSite = e.value[e.value.length - 1]
                this.selectBoxShow = false
                this.getHouseDataList(e.value[1]?.id)
                this.curHouseCode = e.value[0].id
                console.log("curSite=>", this.curSelectSite);
            },
            getMenu(menuName) {
                let list = [];
                for (let i of this.menuList) {
                    if (i.name == menuName) {
                        if (i.children && i.children.length) {
                            list = i.children;
                            break;
                        }
                    }
                }
                return list;
            },
            //获取首页菜单
            getMenuList() {
                this.menuList = uni.getStorageSync("menu")
                this.liveList = this.setLiveMenu(this.hasMenu('生活'));
                this.jobList = this.hasMenu('工作台')
                if (this.menuList.length) {
                    this.getContactMenu();
                    this.getHouseMenu();
                    this.getNoticeMenu();
                }
                setTimeout(() => {
                    if (this.jobList.length) {
                        let taskList = this.jobList.filter(item => item.name == "我的任务")
                        if (taskList.length) {
                            uni.setStorageSync("taskMenu", taskList[0].children);
                        } else {
                            uni.setStorageSync("taskMenu", []);
                        }
                    } else {
                        uni.setStorageSync("taskMenu", []);
                    }
                }, 200)
            },
            getContactMenu() {
                let list = [];
                list = this.menuList.filter(item => item.name == "快捷拨号")
                this.isShowContact = list.length ? true : false;
                if (list.length) {
                    this.getContactList()
                }
            },
            getHouseMenu() {
                let list = [];
                list = this.menuList.filter(item => item.name == "楼盘表")
                this.isShowHouse = list.length ? true : false;
            },
            getNoticeMenu() {
                let list = [];
                list = this.menuList.filter(item => item.name == "通知公告")
                this.isShowNotice = list.length ? true : false;
                if (list.length) {
                    this.getNoticeList()
                }
            },
            setLiveMenu(arr) {
                if (arr.length) {
                    let index = this.getLiveMenuItem(arr, 1)
                    let index2 = this.getLiveMenuItem(arr, 2)
                    if (this.curSelectSite.addressType == 1) {
                        if (index != -1) {
                            arr.splice(index, 1)
                            index = this.getLiveMenuItem(arr, 1)
                            index2 = this.getLiveMenuItem(arr, 2)
                        }
                        if (index2 == -1 && this.roleType == 2) {
                            arr.push({
                                name: "租客上报",
                                path: "/subPackage/bs/views/zhsb",
                                pictureImg: "/static/icon/nav-04.png"
                            })
                            index = this.getLiveMenuItem(arr, 1)
                            index2 = this.getLiveMenuItem(arr, 2)
                        }
                    } else {
                        if (index == -1) {
                            arr.unshift({
                                name: "标签报事",
                                path: "/subPackage/label/index",
                                pictureImg: "/static/icon/nav-11.png"
                            })
                            index = this.getLiveMenuItem(arr, 1)
                            index2 = this.getLiveMenuItem(arr, 2)
                        }
                        if (index2 != -1) {
                            arr.splice(index2, 1)
                            index = this.getLiveMenuItem(arr, 1)
                            index2 = this.getLiveMenuItem(arr, 2)
                        }
                    }
                }
                return arr;
            },
            getLiveMenuItem(arr, type) {
                if (type == 1) {
                    let index = arr.findIndex(item => item.name == "标签报事")
                    return index;
                } else {
                    let index2 = arr.findIndex(item => item.name == "租户上报")
                    return index2
                }
            },
            // 页面跳转
            pushPage(item) {
                const {
                    id,
                    title,
                    addressType
                } = item;
                if (id !== void 0) {
                    let url = `/subPackage/house/list/index?id=${id}&title=${title}&addressType=${addressType}`
                    this.$u.func.globalNavigator(url, "navTo")
                }
            },
            navTo() {
                if (this.curHouseCode === '') {
                    uni.showToast({
                        title: "请选择地址",
                        icon: "error"
                    })
                    return
                }
                this.$u.func.globalNavigator(`/subPackage/bs/views/zhsb?houseCode=${this.curHouseCode}`, "navTo")
            },
            navigatorPage(path) {
                if (path) {
                    if ((path == '/subPackage/bs/views/zhsb' || path == '/subPackage/bs/views/repair') && this
                        .curHouseCode === '') {
                        uni.showToast({
                            title: "尚无绑定房屋信息",
                            icon: "error"
                        })
                    } else if (path == '/subPackage/workbench/views/cscj') {
                        this.$u.func.globalNavigator(path, "navTo")
                    } else {
                        this.$u.func.globalNavigator(`${path}?houseCode=${this.curHouseCode}`, "navTo")
                    }
                } else {
                    uni.showToast({
                        title: "功能开发中~",
                        icon: "none"
                    })
                }
            },
            navToSelectSite() {
                this.$u.func.globalNavigator('selectSite', "navTo")
            },
            //扫一扫
            scan() {
                const that = this
                uni.scanCode({
                    success: function(res) {
                        console.log("扫码结果", res)
                        let eventType = 0;
                        let obj = that.getUrlParams(res.result)
                        console.log(obj)
                        if (!that.isLogin) {
                            let data = res.data;
                            that.$u.func.globalNavigator(
                                `/subPackage/bs/views/danger?id=${obj.stdId}`, "navTo")
                            return
                        }
                        if (obj.stdId == "3C77B40EFC5F4C899AA74BEE747D9DF1") {
                            eventType = 1;
                            that.$u.func.globalNavigator(
                                `/subPackage/house/houseNumber/index?stdId=${obj.stdId}&eventType=${eventType}`,
                                "navTo")
                        } else if (obj.stdId == "CDF5528D617342228F3C84EF5C3C8780") {
                            eventType = 2;
                            that.$u.func.globalNavigator(
                                `/subPackage/house/houseNumber/index?stdId=${obj.stdId}&eventType=${eventType}`,
                                "navTo")
                        } else {
                            that.getHouseType(obj.stdId);
                        }
                        //"3C77B40EFC5F4C899AA74BEE747D9DF1"
                        // let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
                        // let url = "/subPackage/workbench/views/cscj?houseCode=" + obj.stdId
                        // let url = `/subPackage/house/houseNumber/index?stdId=${obj.stdId}`
                        // that.$u.func.globalNavigator(url, "navTo")
                    }
                });
            },
            getUrlParams(url) {
                // 通过 ? 分割获取后面的参数字符串
                let urlStr = url.split('?')[1]
                // 创建空对象存储参数
                let obj = {};
                // 再通过 & 将每一个参数单独分割出来
                let paramsArr = urlStr.split('&')
                for (let i = 0, len = paramsArr.length; i < len; i++) {
                    // 再通过 = 将每一个参数分割为 key:value 的形式
                    let arr = paramsArr[i].split('=')
                    obj[arr[0]] = arr[1];
                }
                return obj
            },
            getHouseType(code) {
                // getPublicSecurityDetail
                getQrCodeDetail({
                    roleName: uni.getStorageSync("activeRole").roleName,
                    addressCode: code,
                }).then(res => {
                    let {
                        isJur,
                        doorplateType,
                        addressLevel,
                        aoiName,
                        addressName,
                        neiName,
                        buildingName,
                        unitName,
                        aoiCode,
                        neiCode,
                        unitCode,
                        buildingCode
                    } = res.data;
                    if (isJur == 1) {
                        if (doorplateType == "户室牌") {
                            this.$u.func.globalNavigator(
                                `/subPackage/house/roomDetails/index?id=${code}&from=scan`, "navTo")
                        } else if (doorplateType == "中门牌") {
                            if (addressLevel == 4) { //自建房
                                this.$u.func.globalNavigator(
                                    `/subPackage/house/roomDetails/detail?code=${code}`, "navTo")
                            } else { //商铺
                                this.$u.func.globalNavigator(
                                    `/subPackage/house/houseNumber/index?stdId=${code}`, "navTo")
                            }
                        } else if (doorplateType == "楼幢牌") {
                            let url = "/subPackage/house/family/index"
                            this.$u.func.globalNavigator(
                                `${url}?id=${code}&address=${addressName}&neiName=${neiName}&housingName=${aoiName}&buildingName=${buildingName}&buildingCode=${buildingCode}&aoiCode=${aoiCode}&neiCode=${neiCode}`,
                                "navTo")
                        } else if (doorplateType == "单元牌") {
                            let url = "/subPackage/house/family/index"
                            this.$u.func.globalNavigator(
                                `${url}?id=${code}&address=${addressName}&neiName=${neiName}&housingName=${aoiName}&buildingName=${buildingName}&unitName=${unitName}&unitCode=${unitCode}&neiCode=${neiCode}&buildingCode=${buildingCode}`,
                                "navTo")
                        } else if (doorplateType == "大门牌") {
                            this.$u.func.globalNavigator(
                                `/subPackage/house/list/index?id=${code}&title=${aoiName}&neiName=${neiName}&address=${addressName}&neiCode=${neiCode}&aoiCode=${aoiCode}`,
                                "navTo")
                        } else if (doorplateType == "小门牌") {
                            this.$u.func.globalNavigator(
                                `/subPackage/house/houseNumber/index?stdId=${code}`, "navTo")
                        }
                    } else {
                        uni.showModal({
                            title: "提示!",
                            content: "该区域不是您管辖范围",
                            showCancel: false
                        })
                    }
                })
            },
            //场所任务跳转
            navToSiteList() {
                let {
                    houseCode
                } = uni.getStorageSync("siteInfo")
                uni.navigateTo({
                    url: `/subPackage/workbench/views/audit?code=${houseCode}&from=index`
                })
            }
        }
    }
</script>
<style lang="scss">
    page {
        color: #333;
        width: 100%;
        height: 100%;
        background-color: #f5f5f5;
    }
    .layout {
        width: 100%;
        height: 100%;
    }
    .top {
        width: 530rpx;
        .top-text {
            max-width: 85%;
            margin-right: 20rpx;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
    .swiper {
        width: 100%;
        height: 340rpx;
        background: linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%);
        padding: 0 30rpx;
        box-sizing: border-box;
    }
    .content {
        padding: 0 30rpx;
    }
    // .grid {
    //     margin-top: 20rpx;
    //     margin-bottom: 10rpx;
    // }
    .nav {
        padding: 10rpx 0;
        margin-bottom: 20rpx;
        border-radius: 10rpx;
        .nav-item {
            padding: 10rpx 0;
        }
        .nav-item-text {
            font-family: PingFang SC;
            font-weight: 500;
            color: #585b61;
        }
    }
    .section {
        .section-item {
            width: 216rpx;
            height: 120rpx;
            position: relative;
        }
        .section-item-bg {
            width: 216rpx;
            height: 120rpx;
        }
        .item-box {
            width: 216rpx;
            height: 120rpx;
            position: absolute;
            top: 0;
            left: 0;
            padding: 20rpx 20rpx 0;
            box-sizing: border-box;
        }
    }
    .block {
        .block-item {
            position: relative;
        }
        .block-item,
        .block-item-bg,
        .block-item-box {
            width: 220rpx;
            height: 150rpx;
            border-radius: 10rpx;
        }
        .block-item-box {
            padding: 0 12rpx;
            box-sizing: border-box;
            position: absolute;
            top: 0;
            left: 0;
        }
        .item-text {
            height: 65rpx;
            margin-left: 20rpx;
            color: #fff;
        }
        .opacity {
            opacity: .4;
        }
    }
    .cell {
        padding: 0 16rpx;
        height: 64rpx;
        border-radius: 8rpx;
        margin-right: 20rpx;
        margin-top: 30rpx;
        .cell-text {
            margin-left: 16rpx;
        }
    }
    .grid-item {
        width: 153rpx;
        height: 153rpx;
        border-radius: 16rpx 16rpx 16rpx 16rpx;
        justify-content: center;
    }
    .row {
        width: 100%;
        margin: 30rpx 0;
        .row-item {
            width: 330rpx;
            height: 134rpx;
            box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(0, 0, 0, 0.02);
            border-radius: 16rpx 16rpx 16rpx 16rpx;
        }
    }
    .p-20 {
        padding: 0 20rpx;
        border-radius: 10rpx;
    }
    .pb-20 {
        padding-bottom: 20rpx;
    }
</style>
subPackage/house/houseNumber/index.vue
@@ -340,7 +340,8 @@
                    url: prodUrl + "/blade-resource/oss/endpoint/put-file",
                    header: {},
                },
                signatureUrl: ""
                signatureUrl: "",
                info: {}
            }
        },
        async onLoad(option) {
@@ -422,6 +423,7 @@
                    return
                }
                if (data) {
                    this.info = data;
                    this.placeName = data.placeName;
                    const doorplateAddressEntity = data?.doorplateAddressEntity || {}
                    const placePoiLabelVOList = data?.placePoiLabelVOList || {}
@@ -613,6 +615,31 @@
            },
            navToInspect() {
                if (!this.info.principa) {
                    this.$showTips("请先完善场所信息")
                    return
                }
                if (!this.info.principal_phone) {
                    this.$showTips("请先完善场所信息")
                    return
                }
                if (!this.info.place_name) {
                    this.$showTips("请先完善场所信息")
                    return
                }
                if (!this.info.image_urls) {
                    this.$showTips("请先完善场所信息")
                    return
                }
                if (!this.info.location) {
                    this.$showTips("请先完善场所信息")
                    return
                }
                if (!this.info.principal_id_card) {
                    this.$showTips("请先完善场所信息")
                    return
                }
                uni.navigateTo({
                    url: `/subPackage/house/houseNumber/siteInspect?code=${this.stdId}&name=${this.placeName}`
                })
subPackage/workbench/views/cscj.vue
@@ -308,18 +308,18 @@
                        message: '是否九小场所',
                        trigger: ['blur', 'change']
                    },
                    'form.placeName': {
                    placeName: [{
                        type: 'string',
                        required: true,
                        message: '请输入场所名称',
                        trigger: ['blur', 'change']
                    },
                    'form.label': {
                    }],
                    label: [{
                        type: 'string',
                        required: true,
                        message: '请选择标签',
                        trigger: ['blur', 'change'],
                    },
                    }],
                    'form.username': {
                        type: 'string',
                        required: true,