Lou
2023-12-06 2e1c9c1fafdd7b77744cfe7e7ab3093d3ac54979
修复优化场所采集、场所维护
9 files modified
2 files added
416 ■■■■ changed files
common/common.js 31 ●●●●● patch | view | raw | blame | history
main.js 4 ●●● patch | view | raw | blame | history
pages.json 9 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 22 ●●●●● patch | view | raw | blame | history
subPackage/house/houseNumber/eventDetail.vue 86 ●●●●● patch | view | raw | blame | history
subPackage/house/houseNumber/index.vue 89 ●●●● patch | view | raw | blame | history
subPackage/workbench/components/lineItem.vue 2 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/cscj.vue 97 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/cshw.vue 2 ●●● patch | view | raw | blame | history
subPackage/workbench/views/csjl.vue 13 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/examine.vue 61 ●●●●● patch | view | raw | blame | history
common/common.js
New file
@@ -0,0 +1,31 @@
import { minioBaseUrl }  from "./setting.js"
/**
 *  @description 设置图片回显路径
 *  @param {String} str 路径
 *  @param {Number} type 回显类型    1普通回显   2上传回显
 */
export const setImageUrl = (str,type = 1) =>{
    let strArr = str.split(",")
    let urls = [];
    if(type == 1){
        for(let i of strArr){
            urls.push(`${minioBaseUrl}${i}`)
        }
    }else {
        for(let i of strArr){
            urls.push({
                name:i,
                url:`${minioBaseUrl}${i}`
            })
        }
    }
    return urls;
}
export const showTips = (text,icon)=> {
    uni.showToast({
        title:text,
        icon:icon?icon:'none'
    })
}
main.js
@@ -5,6 +5,7 @@
// import boxTitle from '@/components/boxTitle/index.vue';
// Vue.component('box-title', boxTitle) // 
import footerBtn from '@/components/btn/footerBtn.vue'
import { setImageUrl,showTips } from '@/common/common.js'
Vue.config.productionTip = false;
App.mpType = 'app';
@@ -30,7 +31,8 @@
import http from '@/http/api.js'
Vue.prototype.$http = http
Vue.prototype.$showTips = showTips;
Vue.prototype.$setImageUrl = setImageUrl;
// 公共函数
import globalFunc from '@/utils/func.js'
Vue.use(globalFunc, app);
pages.json
@@ -610,6 +610,15 @@
                    }
                },
                {
                    "path": "houseNumber/eventDetail",
                    "style": {
                        "navigationBarTitleText": "事件详情",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "list/auditList",
                    "style": {
                        "navigationBarTitleText": "住户审核",
pages/home/index.vue
@@ -666,12 +666,30 @@
                        console.log(res)
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                        let eventType = 0;
                        let obj = that.getUrlParams(res.result)
                        console.log(obj)
                        if (obj.stdId == "3C77B40EFC5F4C899AA74BEE747D9DF1") {
                            eventType = 1;
                        }
                        if (obj.stdId == "CDF5528D617342228F3C84EF5C3C8780") {
                            eventType = 2;
                        }
                        if (eventType) {
                            that.$u.func.globalNavigator(
                                `/subPackage/house/houseNumber/index?stdId=${obj.stdId}&eventType=${eventType}`,
                                "navTo")
                        } else {
                            that.$u.func.globalNavigator(
                                `/subPackage/house/houseNumber/index?stdId=${obj.stdId}`, "navTo")
                        }
                        //"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")
                        // let url = `/subPackage/house/houseNumber/index?stdId=${obj.stdId}`
                        // that.$u.func.globalNavigator(url, "navTo")
                    }
                });
            },
subPackage/house/houseNumber/eventDetail.vue
New file
@@ -0,0 +1,86 @@
<template>
    <view class="container">
        <line-item :list="eventType==1?detail:detail2"></line-item>
    </view>
</template>
<script>
    import lineItem from './lineItem.vue'
    export default {
        components: {
            lineItem
        },
        data() {
            return {
                eventType:1,
                detail: [{
                        title: '事件名称',
                        value: '邻里纠纷'
                    },
                    {
                        title: '发生时间',
                        value: '2023-12-04'
                    },
                    {
                        title: '所属社区',
                        value: '景苑社区'
                    },
                    {
                        title: '发生地点',
                        value: '同心景苑'
                    },
                    {
                        title: '联系方式',
                        value: '暂无'
                    },
                    {
                        title: '事件简述',
                        value: '遛狗未牵绳与别人发生矛盾'
                    },
                    {
                        title: '处理结果',
                        value: '经协调已处理,双方已达成和解'
                    }
                ],
                detail2: [{
                        title: '事件名称',
                        value: '噪音扰民'
                    },
                    {
                        title: '发生时间',
                        value: '2023-12-04'
                    },
                    {
                        title: '所属社区',
                        value: '杨家湖社区'
                    },
                    {
                        title: '发生地点',
                        value: '名仕康城'
                    },
                    {
                        title: '联系方式',
                        value: '邻里纠纷'
                    },
                    {
                        title: '事件简述',
                        value: '业主投诉楼上小孩跳绳影响休息,现场进行调解'
                    },
                    {
                        title: '处理结果',
                        value: '经过E呼即办处置队小组与茅家岭派出所民警协调,楼上住户答应小孩不在跳绳'
                    }
                ]
            }
        },
        onLoad(option) {
            this.eventType = option.type
        }
    }
</script>
<style>
    .container{
        padding:0 30rpx;
    }
</style>
subPackage/house/houseNumber/index.vue
@@ -4,6 +4,13 @@
            <view class="item">
                <box-title title="门牌号信息"></box-title>
                <line-item :list="houseNumberData"></line-item>
                <view class="cell flex j-c-s-b a-i-c"  @click="navToEventDetail()"  v-if="eventType">
                    <view class="cell-title">历史事件</view>
                    <view class="flex a-i-c">
                        <view class="cell-value mr-20">{{eventType ==1?"邻里纠纷":"噪音扰民"}}</view>
                        <u-icon name="arrow-right"></u-icon>
                    </view>
                </view>
                <view class="map">
                    <map style="width: 100%; height: 100%;" :latitude="lngLat.lat" :longitude="lngLat.lng"
                        :markers="marker"></map>
@@ -17,6 +24,10 @@
                        <view class="orange citem">85.9</view>
                        <view class="green citem"></view>
                    </view>
                </view>
                <view class="cell flex j-c-s-b a-i-c">
                    <view class="cell-title">社区名称</view>
                    <view class="cell-value">{{neiName}}</view>
                </view>
                <line-item :list="gridData"></line-item>
                <line-item :list="collectData">
@@ -103,11 +114,12 @@
                        value: '未完善'
                    }
                ],
                gridData: [{
                        title: '社区名称',
                        name: 'communityName',
                        value: '未完善'
                    },
                gridData: [
                    // {
                    //     title: '社区名称',
                    //     name: 'communityName',
                    //     value: '未完善'
                    // },
                    {
                        title: '网格名称',
                        name: 'gridName',
@@ -145,10 +157,10 @@
                        name: 'createTime',
                        value: '未完善'
                    },
                    {
                        title: '历史事件',
                        value: '未完善'
                    }
                    // {
                    //     title: '历史事件',
                    //     value: '未完善'
                    // }
                ],
                policeData: [{
                        title: '公安局',
@@ -199,7 +211,9 @@
                },
                marker: [],
                addressType:2,
                placeId:""
                placeId:"",
                eventType:0   ,//历史事件类型    1邻里纠纷    2噪音扰民
                neiName:""    //社区名称
            }
        },
        onLoad(option) {
@@ -207,6 +221,9 @@
            this.addressType = option.addressType
            if(this.addressType ==4){
                this.placeId = this.stdId
            }
            if(option.eventType){
                this.eventType = option.eventType;
            }
            this.getBuildingDetail()
        },
@@ -238,6 +255,9 @@
                if(data){
                    const doorplateAddressEntity = data?.doorplateAddressEntity || {}
                    const placePoiLabelVOList = data?.placePoiLabelVOList || {}
                    this.neiName = doorplateAddressEntity.neiName || '未完善'
                    this.houseNumberData.forEach(item => {
                        if (!data[item.name]) {
                            item.value = data.doorplateAddressEntity[item.name] || '未完善'
@@ -245,7 +265,7 @@
                            item.value = data[item.name] || '未完善'
                        }
                    
                        if (item.name == 'label') {
                        if (item.name == 'label' && data.label) {
                    
                            let labelArr = []
                            placePoiLabelVOList.forEach(item => {
@@ -256,30 +276,32 @@
                        }
                    })
                    
                    this.gridData.forEach(item => {
                        if (!data[item.name]) {
                            item.value = data.grid[item.name] || '未完善'
                        } else {
                            item.value = data[item.name] || '未完善'
                        }
                    })
                    if(data.grid){
                        this.gridData.forEach(item => {
                            if (!data.grid[item.name]) {
                                item.value = data.grid[item.name] || '未完善'
                            } else {
                                item.value = data.grid[item.name] || '未完善'
                            }
                        })
                    }
                    
                    this.collectData.forEach(item => {
                        if (!data[item.name]) {
                        if (!data.doorplateAddressEntity[item.name]) {
                            item.value = data.doorplateAddressEntity[item.name] || '未完善'
                        } else {
                            item.value = data[item.name] || '未完善'
                            item.value = data.doorplateAddressEntity[item.name] || '未完善'
                            if(item.name == "imageUrls" ){
                                item.value = minioBaseUrl + data[item.name] || '未完善'
                                item.value = minioBaseUrl + data.doorplateAddressEntity[item.name] || '未完善'
                            }
                        }
                    })
                    
                    this.policeData.forEach(item => {
                        if (!data[item.name]) {
                        if (!data.doorplateAddressEntity[item.name]) {
                            item.value = data.doorplateAddressEntity[item.name] || '未完善'
                        } else {
                            item.value = data[item.name] || '未完善'
                            item.value = data.doorplateAddressEntity[item.name] || '未完善'
                        }
                    })
                    
@@ -311,6 +333,10 @@
            },
            csjlClick() {
                this.$u.func.globalNavigator('/subPackage/workbench/views/csjl?stdId=' + this.stdId)
            },
            navToEventDetail(){
                this.$u.func.globalNavigator(`eventDetail?type=${this.eventType}`)
            }
        },
    }
@@ -399,4 +425,21 @@
        background-color: green;
        border-radius: 0rpx 10rpx 10rpx 0rpx;
    }
    .cell {
        padding: 25rpx 20rpx;
        font-size: 32rpx;
        background-color: #fff;
        border-bottom: 1rpx solid #f6f6f6;
        .cell-title {
            flex-shrink: 0;
            width: 200rpx;
        }
        .cell-value {
            color: #989898;
            word-wrap: break-word;
            text-align: right;
        }
    }
</style>
subPackage/workbench/components/lineItem.vue
@@ -71,6 +71,8 @@
            .r {
                color: #969799;
                width:calc(100% - 200rpx);
                text-align: right;
            }
        }
        .r {
subPackage/workbench/views/cscj.vue
@@ -23,9 +23,9 @@
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <view v-if="showLabelList.length>0" class="label">
                <view v-if="showLabelList.length" class="label"   style="border-bottom:1px solid eff1f3;">
                    <view v-for="(item,index) in showLabelList" :key="index" class="activeLabel">
                        <u-tag closable :show="!item.isClose" size="mini" @close="delTag(item)"
                        <u-tag :closable="currentId?false:true" :show="!item.isClose" size="mini" @close="delTag(item)"
                            :text="item.text"></u-tag>
                    </view>
                </view>
@@ -59,21 +59,17 @@
                </u-form-item>
            </view>
            <view class="item pic">
            <view class="item pic"    v-if="(currentId && form.images.length) || !currentId ">
                <view class="box-title">
                    <box-title title="场所照片"></box-title>
                </view>
                <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" uploadIcon="/static/icon/upload.png" @afterRead="afterReadImg" @delete="deletePic">
                    :capture="uploadConfig.capture" uploadIcon="/static/icon/upload.png" @afterRead="afterReadImg" @delete="deletePic"
                    :disabled="currentId?true:false"  :deletable="currentId?false:true"
                    >
                </u-upload>
            </view>
        </u-form>
@@ -99,6 +95,9 @@
                    <view class="image" v-if="scope.value !== ''">
                        <u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx"
                            :src="scope.value"></u--image>
                    </view>
                    <view class=""  v-else>
                        {{scope.value}}
                    </view>
                </template>
            </lineItem>
@@ -192,7 +191,8 @@
                selectValue: [],
                form: {
                    buildingCode: "",
                    // buildingCode: "",
                    images:[],
                    label: "",
                    remark: "",
                    imageUrls: "",
@@ -201,12 +201,12 @@
                    phone: ''
                },
                rules: {
                    'buildingCode': {
                        type: 'string',
                        required: true,
                        message: '请选择楼栋',
                        trigger: ['blur', 'change']
                    },
                    // 'buildingCode': {
                    //     type: 'string',
                    //     required: true,
                    //     message: '请选择楼栋',
                    //     trigger: ['blur', 'change']
                    // },
                    'placeName': {
                        type: 'string',
                        required: true,
@@ -372,19 +372,23 @@
            styleIsolation: 'shared', // 解除样式隔离
        },
        onLoad(option) {
            console.log(option)
            const {
                houseCode,
                id,
                type,
                addressType
            } = option
            this.houseCode = houseCode
            this.currentId = id
            this.addressType = addressType
            if (this.currentId || this.houseCode) {
                type
            } = option
            if(option.addressType){
                this.addressType = option.addressType
            }
            if(option.id){
                this.currentId = option.id
            }
            if(option.houseCode){
                this.houseCode = option.houseCode
                this.form.houseCode = option.houseCode
            }
            if (option.id || option.houseCode) {
                this.getBuildingDetail()
            }
            if (!!type || type != void 0) {
                uni.setNavigationBarTitle({
                    title: '详情'
@@ -447,8 +451,11 @@
                if (this.houseCode) {
                    idorCodeParams = {
                        houseCode: this.houseCode,
                        addressType:this.addressType
                        // addressType:this.addressType
                    }
                }
                if(this.addressType){
                    idorCodeParams.addressType = this.addressType
                }
                if (this.currentId) {
                    idorCodeParams = {
@@ -473,7 +480,7 @@
                    const gridEntity = data?.grid || {}
                    this.form.buildingCode = dpaEntity?.buildingCode || ''
                    // this.form.buildingCode = dpaEntity?.buildingCode || ''
                    let buildingNameArr = [
                        dpaEntity?.townStreetName,
@@ -489,17 +496,30 @@
                    Object.keys(this.form).forEach(key => {
                        if (!data[key]) {
                            this.form[key] = dpaEntity[key] || '未完善'
                            // this.form[key] = dpaEntity[key] || '未完善'
                            this.form[key] = dpaEntity[key]
                        } else {
                            this.form[key] = data[key] || '未完善'
                            // this.form[key] = data[key] || '未完善'
                            this.form[key] = data[key]
                        }
                        if (key === "images") {
                            this.form[key] = []
                            // this.form[key] = data.imageUrls
                            if(data.imageUrls){
                                this.form.images = this.$setImageUrl(data.imageUrls,2);
                            }else {
                                this.form.images = []
                            }
                        }
                    })
                    this.form.building = arr.join("")
                    setTimeout(()=>{
                        data.placePoiLabelVOList.forEach(item => {
                            let label = this.labelList[0].children.find(sl => sl.text === item.labelName) || {}
                            label['isClose'] = false
                            label?.text && this.showLabelList.push(label)
                        })
                    },500)
                    Object.keys(this.comprehensiveData).forEach(key => {
                        this.comprehensiveData[key].forEach(item => {
                            if (!data[item.name]) {
@@ -508,7 +528,8 @@
                            } else {
                                item.value = data[item.name] || '未完善'
                                if(item.name == "imageUrls" ){
                                    item.value = minioBaseUrl + data[item.name] || '未完善'
                                    item.value = this.$setImageUrl(data[item.name])
                                    // item.value = minioBaseUrl + data[item.name] || '未完善'
                                }
                            }
                        })
@@ -520,12 +541,7 @@
                            }
                        })
                    })
                    data.placePoiLabelVOList.forEach(item => {
                        let label = this.labelList[0].children.find(sl => sl.text === item.labelName) || {}
                        label['isClose'] = false
                        label?.text && this.showLabelList.push(label)
                    })
                })
            },
@@ -555,7 +571,6 @@
                        })
                    }
                })
            },
            async buildColumn() {
subPackage/workbench/views/cshw.vue
@@ -7,7 +7,7 @@
                        :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs>
                    <view class="search">
                        <u-search placeholder="请输入场所名称" v-model="keyWord" :clearabled="true" :showAction="true"
                            :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
                            :animation="true" @search="searchConfirm" @clear="clearConfirm"  @custom="searchConfirm"></u-search>
                    </view>
                </view>
            </view>
subPackage/workbench/views/csjl.vue
@@ -3,19 +3,20 @@
        <u-sticky>
            <view class="tabsAndSearch">
                <view class="tabs">
                    <u-tabs :list="tabsList" @click="tabClick" :scrollable="false"></u-tabs>
                    <u-tabs :list="tabsList" @click="tabClick"  :inactiveStyle="{color:'#999999'}"
                :activeStyle="{color:'#017BFC'}" :scrollable="false"></u-tabs>
                </view>
                <view class="search">
                    <u-search placeholder="请输入场所名称" v-model="iptContext" :clearabled="true" :showAction="true"
                        :animation="true" @change="keyWordChange" @search="searchConfirm"
                        @clear="clearConfirm"></u-search>
                        @clear="clearConfirm"   @custom="searchConfirm"></u-search>
                </view>
            </view>
        </u-sticky>
        <view class="info-box">
            <view class="records-card" v-for="(records, index) in recordsData" :key="records.id"
                @click="pushPage(records)">
                <view class="title">
                <view class="title flex j-c-s-b">
                    <text>{{ records.placeName }}</text>
                    <text>{{ records.createTime }}</text>
                </view>
@@ -187,16 +188,14 @@
            margin-bottom: 20rpx;
            .title {
                line-height: 70rpx;
                display: flex;
                padding:20rpx 0;
                font-size: 35rpx;
                display: flex;
                justify-content: space-between;
                border-bottom: 1rpx solid #f6f6f6;
                text {
                    &:nth-child(1) {
                        font-weight: 700;
                        width:50%;
                    }
                    &:nth-child(2) {
subPackage/workbench/views/examine.vue
@@ -6,21 +6,21 @@
                <lineItem :dataInfo="basicData"></lineItem>
            </view>
        </view>
        <view class="licence">
        <view class="licence"  v-if="imageObj.imageUrls.length">
            <box-title title="营业执照" class="box-title"></box-title>
            <view class="info">
                <view class="images-box" v-if="!!imageObj.imageUrls">
                    <u-image  width="80" height="80" :src="imageObj.imageUrls"
                        @click="preViewImg(imageObj.imageUrls)"></u-image>
                <view class="images-box"  v-for="(i,k) in imageObj.imageUrls"  :key="k">
                    <u-image  width="80" height="80" :src="i"
                        @click="preViewImg(i,imageObj.imageUrls)"></u-image>
                </view>
            </view>
        </view>
        <view class="planegraph">
        <view class="planegraph"  v-if="imageObj.planImageUrls.length" >
            <box-title title="场所平面图" class="box-title"></box-title>
            <view class="info">
                <view class="images-box" v-if="!!imageObj.planImageUrl">
                    <u-image  width="80" height="80" :src="imageObj.planImageUrls"
                        @click="preViewImg(imageObj.planImageUrl)"></u-image>
                <view class="images-box"  v-for="(i,k) in imageObj.planImageUrls"  :key="k">
                    <u-image  width="80" height="80" :src="i"
                        @click="preViewImg(i,imageObj.planImageUrls)"></u-image>
                </view>
            </view>
        </view>
@@ -51,19 +51,23 @@
            <view class="info">
                <u-form labelWidth="70" :model="form" ref="form" class="form">
                    <u-form-item label="审核状态" @click="isPickerShow = true" class="form-item">
                        <u--input v-model="form.confirmFlag" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
                            border="none" :placeholder="this.defaultPlaceholder"></u--input>
                        <u--input v-model="defaultPlaceholder" disabled disabledColor="#ffffff"
                            border="none"   inputAlign="right"></u--input>
                        <u-icon slot="right" name="arrow-right"></u-icon>
                    </u-form-item>
                    <u-form-item label="备注" class="form-item">
                        <u--input v-model="form.confirmNotion" border="none"></u--input>
                        <u--input v-model="form.confirmNotion"  inputAlign="right" border="none"></u--input>
                    </u-form-item>
                </u-form>
            </view>
        </view>
        <view class="bottom-btn">
        <!-- <view class="bottom-btn">
            <u-button type="primary" @click="submit">提交审核</u-button>
        </view>
        </view> -->
        <footer-btn  @click="submit"   text="提交审核" />
        <u-picker :defaultIndex="[this.defaultColumns]" :closeOnClickOverlay="true" @close="isPickerShow = false"
            :show="isPickerShow" ref="uPicker" :columns="columns" keyName="name" @cancel="isPickerShow = false"
            @confirm="handleConfirm"></u-picker>
@@ -77,6 +81,7 @@
        checkPlaceExtData,
        getPlaceDetail
    } from '@/api/placeExp/placeExp.js'
    import { minioBaseUrl } from "@/common/setting.js"
    export default {
        components: {
            boxTitle,
@@ -111,8 +116,8 @@
                    confirmNotion: ''
                },
                imageObj: {
                    imageUrls: '',
                    planImageUrls: ''
                    imageUrls:[],
                    planImageUrls:[]
                },
                isPickerShow: false,
                columns: [
@@ -135,7 +140,7 @@
                    id: ''
                },
                defaultColumns: 0,
                defaultPlaceholder: ''
                defaultPlaceholder: '待审核'
            }
        },
        onLoad(option) {
@@ -166,9 +171,18 @@
                    })
                    return
                }
                Object.keys(this.imageObj).forEach(key => {
                    this.imageObj[key] = data[key]
                })
                // Object.keys(this.imageObj).forEach(key => {
                //     this.imageObj[key] = data[key]
                // })
                if(data.imageUrls){
                    // let urls = data.imageUrls.split(",");
                    // this.imageObj.imageUrls = `${minioBaseUrl}${data.imageUrls}`
                    this.imageObj.imageUrls = this.$setImageUrl(data.imageUrls)
                }
                if(data.planImageUrls){
                    this.imageObj.planImageUrls = this.$setImageUrl(data.planImageUrls)
                }
                this.basicData.forEach(item => {
                    item.value = data[item.name] || '未完善'
                })
@@ -199,12 +213,15 @@
                })
            },
            handleConfirm(e) {
                this.form.confirmFlag = e.value[0].name
                console.log(e);
                this.defaultColumns = e.indexs[0];
                this.defaultPlaceholder = e.value[0].name
                this.form.confirmFlag = e.value[0].status
                this.isPickerShow = false
            },
            preViewImg(url) {
            preViewImg(current,urls) {
                uni.previewImage({
                    urls: [url], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
                    current,urls
                })
            },
            submit() {