guoshilong
2023-11-03 e559f66268d107f33772193f0960c7c602e939ee
场所采集根据二维码回显楼栋
3 files modified
65 ■■■■■ changed files
api/doorplateAddress/doorplateAddress.js 11 ●●●●● patch | view | raw | blame | history
manifest.json 3 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/cscj.vue 51 ●●●●● patch | view | raw | blame | history
api/doorplateAddress/doorplateAddress.js
@@ -85,3 +85,14 @@
        data
    })
}
// 获取门牌地址
export const getDoorplateAddressDetail = (params) => {
    return http.request({
        url: 'blade-doorplateAddress/doorplateAddress/getDoorplateAddressDetail',
        method: 'GET',
        params: {
            ...params
        }
    })
}
manifest.json
@@ -142,7 +142,7 @@
    "quickapp" : {},
    /* 小程序特有相关 */
    "mp-weixin" : {
        "appid" : "wxdc5675f4df850da6",
        "appid": "wx1ff4bbc24b343ef1",
        "setting" : {
            "urlCheck" : false,
            "minified" : true,
@@ -156,6 +156,7 @@
        "uniStatistics" : {
            "enable" : false
        },
        "requiredPrivateInfos": ["getLocation"],
        "permission" : {
            "scope.userLocation" : {
                "desc" : "定位"
subPackage/workbench/views/cscj.vue
@@ -150,6 +150,7 @@
        getLabelList
    } from "@/api/label/label";
    import {
        getDoorplateAddressDetail,
        getDoorplateAddressList
    } from "@/api/doorplateAddress/doorplateAddress";
    import {
@@ -315,7 +316,9 @@
                },
                activeIds: [],
                showLabelList: []
                showLabelList: [],
                stdId: "",
            }
        },
        watch: {
@@ -323,7 +326,13 @@
                handler(newVal) {
                    this.form.label = newVal.join(",")
                }
            },
            "form.buildingCode": {
                handler(newVal) {
                    console.log(newVal)
            }
            }
        },
        created() {
@@ -332,7 +341,16 @@
        mounted() {
        },
        options: {
            styleIsolation: 'shared', // 解除样式隔离
        },
        onLoad(option) {
            this.stdId = option.stdId
            console.log(this.stdId, "----------")
            if (this.stdId) {
                this.getBuildingDetail()
            }
        },
        onShow() {
@@ -340,6 +358,26 @@
            this.getLocation()
        },
        methods: {
            getBuildingDetail(params = {}) {
                getDoorplateAddressDetail(Object.assign(params, {
                    stdId: this.stdId
                })).then(res => {
                    let data = res.data
                    this.form.buildingCode = data.buildingCode
                    let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
                        data.buildingName
                    ]
                    let arr = buildingNameArr.filter(e => {
                        return e != null || e != ''
                    })
                    this.form.building = arr.join("")
                })
            },
            //表单提交
            submit() {
@@ -421,7 +459,6 @@
            },
            confirmPicker(e) {
                console.log(e, "--------------------")
                if (e.value[4]) {
                    this.selectValue = e.value
@@ -441,9 +478,7 @@
                    // 微信小程序无法将picker实例传出来,只能通过ref操作
                    picker = this.$refs.uPicker
                } = e
                console.log(e, "/*/*/*")
                let item = e.values[columnIndex][index]
                console.log(item, "-----------")
                //街道
                if (columnIndex === 0) {
                    //获取社区列表
@@ -568,7 +603,7 @@
        .item {
            /deep/ .form-item {
            .form-item {
                background-color: #ffffff;
                padding: 2rpx 10px;
                border-bottom: 1px solid #eff1f3;
@@ -609,6 +644,12 @@
        }
    }
    /deep/ .u-form-item {
        background-color: #ffffff;
        padding: 2rpx 10px;
        border-bottom: 1px solid #eff1f3;
    }
    .red {
        background-color: red;
        border-radius: 10rpx 0rpx 0rpx 10rpx;