Lou
2023-11-27 d3141851e6ab68d2092e342f19cd0246eaee643e
update
8 files modified
5 files added
390 ■■■■ changed files
api/service/service.js 10 ●●●●● patch | view | raw | blame | history
common/setting.js 3 ●●●● patch | view | raw | blame | history
manifest.json 2 ●●● patch | view | raw | blame | history
mixin/uploadMixin.js 30 ●●●● patch | view | raw | blame | history
pages.json 15 ●●●●● patch | view | raw | blame | history
pages/circle/index.vue 8 ●●●●● patch | view | raw | blame | history
pages/circle/publish.vue 8 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 3 ●●●● patch | view | raw | blame | history
static/img/tabbar-02-selected.png patch | view | raw | blame | history
subPackage/hotLine/index.vue 27 ●●●● patch | view | raw | blame | history
subPackage/house/list/index.vue 84 ●●●● patch | view | raw | blame | history
subPackage/house/list/index02.vue 198 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/editExamine.vue 2 ●●● patch | view | raw | blame | history
api/service/service.js
New file
@@ -0,0 +1,10 @@
import http from '@/http/api.js'
// 获取服务热线
export const getHotLineList = (params) => {
    return http.request({
        url: '/blade-convenienceHotline/convenienceHotline/page',
        method: 'GET',
        params
    })
}
common/setting.js
@@ -12,11 +12,12 @@
    // devUrl: 'https://sk.hubeishuiyi.cn',
    // devUrl: 'http://192.168.1.156:9528',
    // devUrl:'http://192.168.1.50:9528',
    devUrl: 'http://192.168.0.100:9528',
    devUrl: 'http://192.168.0.103:9528',
    // devUrl:'https://srgdjczzxtpt.com:2080/api',
    // devUrl: 'http://192.168.0.102:9528',
    // devUrl: 'https://srgdjczzxtpt.com:2080/api',
    minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
    // minioBaseUrl:"http://192.168.0.103:9528/",
    // minioBaseUrl: 'https://srgdjczzxtpt.com:2080/',
    // 数据中台接口url
    // dataCenterUrl: 'http://10.10.2.192/services',
manifest.json
@@ -142,7 +142,7 @@
    "quickapp" : {},
    /* 小程序特有相关 */
    "mp-weixin" : {
        "appid" : "wx41aa8a5d2e565a05",
        "appid" : "wx806f03e1f1390c10",
        "setting" : {
            "urlCheck" : false,
            "minified" : true,
mixin/uploadMixin.js
@@ -64,14 +64,17 @@
        },
        //上传成功后对返回数据进行处理
        async afterReadImg(event) {
        async afterReadImg(event,key="images") {
            // console.log(key)
            // console.log(this.form[key]);
            this.showLoading()
            var that = this;
            // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
            let lists = [].concat(event.file)
            let fileListLen = this.form.images.length
            let fileListLen = this.form[key].length
            lists.map((item) => {
                this.form.images.push({
                this.form[key].push({
                    ...item,
                    status: 'uploading',
                    message: '上传中'
@@ -79,12 +82,31 @@
            })
            for (let i = 0; i < lists.length; i++) {
                const result = await this.uploadFilePromise(lists[i].url)
                that.form.images.splice(fileListLen, 1, Object.assign({}, {
                that.form[key].splice(fileListLen, 1, Object.assign({}, {
                    url: result.data.link,
                    name:result.data.name
                }))
                fileListLen++
            }
            // let fileListLen = this.form.images.length
            // lists.map((item) => {
            //     this.form.images.push({
            //         ...item,
            //         status: 'uploading',
            //         message: '上传中'
            //     })
            // })
            // for (let i = 0; i < lists.length; i++) {
            //     const result = await this.uploadFilePromise(lists[i].url)
            //     that.form.images.splice(fileListLen, 1, Object.assign({}, {
            //         url: result.data.link,
            //         name:result.data.name
            //     }))
            //     fileListLen++
            // }
            this.loadingClose()
        },
        
pages.json
@@ -27,6 +27,15 @@
                "enablePullDownRefresh": false,
                "navigationStyle": "custom"
            }
        },
        {
            "path": "pages/circle/index",
            "style": {
                "navigationBarTitleText": "圈子",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#fff",
                "navigationBarTextStyle": "black"
            }
        }
    ],
@@ -559,6 +568,12 @@
                "iconPath": "static/img/tabbar-01.png",
                "text": "首页"
            },
            // {
            //     "pagePath": "pages/circle/index",
            //     "iconPath": "static/img/tabbar-02.png",
            //     "selectedIconPath": "static/img/tabbar-02-selected.png",
            //     "text": "圈子"
            // },
            {
                "pagePath": "pages/user/center",
                "iconPath": "static/img/tabbar-03.png",
pages/circle/index.vue
New file
@@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>
pages/circle/publish.vue
New file
@@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>
pages/home/index.vue
@@ -546,7 +546,8 @@
                        let obj = that.getUrlParams(res.result)
                        console.log(obj)
                        // let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
                        let url = "/subPackage/workbench/views/cscj?houseCode=" + obj.stdId
                        // let url = "/subPackage/workbench/views/cscj?houseCode=" + obj.stdId
                        let url = `/subPackage/house/houseNumber/index?houseCode=${obj.stdId}`
                        that.$u.func.globalNavigator(url, "navTo")
                    }
                });
static/img/tabbar-02-selected.png
subPackage/hotLine/index.vue
@@ -1,9 +1,9 @@
<template>
    <view class="list">
        <view class="list-item flex j-c-s-b">
            <text class="item-text f-28">信州公安局西市派出所信州公安局西市派出所信州公安局西市派出所信州公安局西市派出所</text>
            <view class="flex a-i-c">
                <text class="f-28 c-main mr-20">0793-8222830</text>
        <view class="list-item flex j-c-s-b"  v-for="(item,index) in list"  :key="index">
            <text class="item-text f-28">{{item.name}}</text>
            <view class="flex a-i-c"   @click="onCall(item.telephone)">
                <text class="f-28 c-main mr-20">{{item.telephone}}</text>
                <u-icon name="/static/icon/tel.png"  width="32rpx"  height="32rpx"></u-icon>
            </view>
        </view>
@@ -11,14 +11,29 @@
</template>
<script>
    import { getHotLineList } from "@/api/service/service.js"
    export default{
        data(){
            return {
                list:[]
            }
        },
        onLoad(){
            this.getList()
        },
        methods:{
            getList(){
                getHotLineList().then(res=>{
                    console.log(res)
                    this.list = res.data.records;
                })
            },
            onCall(tel){
                uni.makePhoneCall({
                    phoneNumber:tel
                })
            }
        }
    }
</script>
subPackage/house/list/index.vue
@@ -5,30 +5,19 @@
            <text>{{ curSelectSite.name }}/{{ curHouseTitle }}</text>
        </view>
        <view class="flex f-d-c main">
            <u-icon name="/static/icon/blue_floor.png"></u-icon>
            <view class="r">测试</view>
        </view>
        <!-- <view class="flex f-d-c main">
            <view class="flex house-container">
                <view class="house-list-box" v-if="isShowAoi" v-for="(item, index) in houseList"
                    @click="pushPage(item)">
                <view class="house-list-box">
                    <view class="l">
                        <u-icon name="/static/icon/blue_floor.png"></u-icon>
                    </view>
                    <view class="r">
                        {{item.title}}
                    </view>
                </view>
                <!-- 商铺 -->
                <view class="house-list-box" v-if="isShowShop" v-for="(item, index) in shopList"
                    @click="pushPage(item)">
                    <view class="l">
                        <u-icon name="/static/icon/store.png"></u-icon>
                    </view>
                    <view class="r">
                        {{item.title}}
                    </view>
                    <view class="r">测试</view>
                </view>
            </view>
            <u-toast ref="uToast"></u-toast>
            <u-divider text="已经到底了"></u-divider>
        </view>
        </view> -->
    </view>
</template>
@@ -46,12 +35,12 @@
                currentId: '',
                curSelectSite: {},
                curHouseTitle: '',
                addressType:1,
                addressType: 1,
                houseList: [{
                    title: '-'
                    name: '-'
                }],
                shopList: [{
                    title: '-'
                    name: '-'
                }]
            }
        },
@@ -70,7 +59,7 @@
            this.curSelectSite = uni.getStorageSync('siteInfo')
        },
        mounted() {
            this.getHouseInfo()
            // this.getHouseInfo()
        },
        methods: {
            async getHouseInfo() {
@@ -83,29 +72,41 @@
                    type: 2,
                    code: this.currentId,
                    roleName: uni.getStorageSync('activeRole').roleName,
                    addressType:this.addressType
                    addressType: this.addressType
                }
                const res = await getHouseList(param)
                const aoiList = res.data.aoiList
                const shopList = res.data.shopList
                if (aoiList.length > 0) {
                // const aoiList = res.data.aoiList
                // const shopList = res.data.shopList
                let {
                    aoiList,
                    shopList
                } = res.data;
                this.houseList = aoiList;
                this.shopList = shopList;
                if (aoiList.length) {
                    this.isShowAoi = true
                    aoiList.forEach(item => {
                        item.title = item.name
                    })
                    this.houseList = aoiList || [{
                        title: '-'
                    }]
                }
                if (shopList.length > 0) {
                if (shopList.length) {
                    this.isShowShop = true
                    shopList.forEach(item => {
                        item.title = item.name
                    })
                    this.shopList = shopList || [{
                        title: '-'
                    }]
                }
                // if (aoiList.length > 0) {
                //     this.isShowAoi = true
                //     aoiList.forEach(item => {
                //         item.title = item.name
                //     })
                //     this.houseList = aoiList || [{
                //         title: '-'
                //     }]
                // }
                // if (shopList.length > 0) {
                //     this.isShowShop = true
                //     shopList.forEach(item => {
                //         item.title = item.name
                //     })
                //     this.shopList = shopList || [{
                //         title: '-'
                //     }]
                // }
                this.$nextTick(() => {
                    this.$refs.uToast.isShow = false
                })
@@ -158,17 +159,14 @@
        }
        .main {
            position: relative;
            height: 0;
            flex: 1;
            overflow-y: auto;
            margin-top: 20rpx;
            background-color: #fff;
            .house-container {
                flex-wrap: wrap;
                padding: 14rpx;
                .house-list-box {
                    margin: 16rpx;
                    padding: 0 16rpx;
@@ -180,7 +178,7 @@
                    border-radius: 12rpx;
                    color: #333333;
                    // background: #FAFBFE;
                    background-color:rgb(236,244,255);
                    background-color: rgb(236, 244, 255);
                    box-sizing: border-box;
                }
            }
subPackage/house/list/index02.vue
New file
@@ -0,0 +1,198 @@
<template>
    <view class="container">
        <view class="header">
            <u-icon name="/static/icon/map.png" width="15" height="18"></u-icon>
            <text>{{ curSelectSite.name }}/{{ curHouseTitle }}</text>
        </view>
        <view class="flex f-d-c main">
            <view class="flex house-container">
                <view class="house-list-box" v-if="isShowAoi" v-for="(item, index) in houseList"
                    @click="pushPage(item)"  :key="index">
                    <view class="l">
                        <u-icon name="/static/icon/blue_floor.png"></u-icon>
                    </view>
                    <view class="r">
                        {{item.name}}
                    </view>
                </view>
                <!-- 商铺 -->
                <view class="house-list-box" v-if="isShowShop" v-for="(item, index) in shopList"
                    @click="pushPage(item)"   :key="index">
                    <view class="l">
                        <u-icon name="/static/icon/store.png"></u-icon>
                    </view>
                    <view class="r">
                        {{item.name}}
                    </view>
                </view>
            </view>
            <u-toast ref="uToast"></u-toast>
            <u-divider text="已经到底了"></u-divider>
        </view>
    </view>
</template>
<script>
    import {
        getHouseList
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        components: {},
        data() {
            return {
                isShowAoi: false,
                isShowShop: false,
                currentId: '',
                curSelectSite: {},
                curHouseTitle: '',
                addressType:1,
                houseList: [{
                    name: '-'
                }],
                shopList: [{
                    name: '-'
                }]
            }
        },
        onLoad(e) {
            const {
                id,
                title,
                addressType
            } = e
            this.currentId = id
            this.curHouseTitle = title
            this.addressType = addressType
        },
        onShow() {
            this.curSelectSite = uni.getStorageSync('siteInfo')
        },
        mounted() {
            this.getHouseInfo()
        },
        methods: {
            async getHouseInfo() {
                this.$refs.uToast.show({
                    type: 'loading',
                    message: '正在加载',
                    duration: 9999999
                })
                const param = {
                    type: 2,
                    code: this.currentId,
                    roleName: uni.getStorageSync('activeRole').roleName,
                    addressType:this.addressType
                }
                const res = await getHouseList(param)
                // const aoiList = res.data.aoiList
                // const shopList = res.data.shopList
                let { aoiList ,shopList} = res.data;
                this.houseList = aoiList;
                this.shopList = shopList;
                if (aoiList.length) {
                    this.isShowAoi = true
                }
                if(shopList.length){
                    this.isShowShop = true
                }
                // if (aoiList.length > 0) {
                //     this.isShowAoi = true
                //     aoiList.forEach(item => {
                //         item.title = item.name
                //     })
                //     this.houseList = aoiList || [{
                //         title: '-'
                //     }]
                // }
                // if (shopList.length > 0) {
                //     this.isShowShop = true
                //     shopList.forEach(item => {
                //         item.title = item.name
                //     })
                //     this.shopList = shopList || [{
                //         title: '-'
                //     }]
                // }
                this.$nextTick(() => {
                    this.$refs.uToast.isShow = false
                })
            },
            pushPage(value) {
                const {
                    id,
                    title,
                    addressType
                } = value
                if (!id) {
                    return
                }
                // addressType == 3 街路巷
                if (addressType == 1 || addressType == 3 || addressType == 4) {
                    if (id !== void 0) {
                        let url = `/subPackage/house/family/index?id=${id}&housingName=${this.curHouseTitle}
                        &buildingName=${title}&addressType=${addressType}&neiCode=${this.currentId}`
                        this.$u.func.globalNavigator(url, "navTo")
                    }
                } else {
                    // 跳转场所页面 addressType == 2
                    // let url = `/subPackage/workbench/views/cscj?stdId=${id}`
                    let url = `/subPackage/workbench/views/cscj?houseCode=${id}`
                    this.$u.func.globalNavigator(url, "navTo")
                }
            }
        }
    }
</script>
<style lang="scss" scoped>
    .container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        font-size: 26rpx;
        background-color: #f5f5f5;
        .header {
            background-color: #fff;
            padding: 20rpx 30rpx;
            display: flex;
            color: #333333;
            text {
                margin-left: 15rpx;
            }
        }
        .main {
            position: relative;
            height: 0;
            flex: 1;
            overflow-y: auto;
            margin-top: 20rpx;
            background-color: #fff;
            .house-container {
                flex-wrap: wrap;
                padding: 14rpx;
                .house-list-box {
                    margin: 16rpx;
                    padding: 0 16rpx;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    width: calc((100% - 96rpx) / 3);
                    height: 68rpx;
                    border-radius: 12rpx;
                    color: #333333;
                    // background: #FAFBFE;
                    background-color:rgb(236,244,255);
                    box-sizing: border-box;
                }
            }
        }
    }
</style>
subPackage/workbench/views/editExamine.vue
@@ -25,7 +25,7 @@
                    <u-upload :fileList="form.imageUrls" :previewFullImage="uploadConfig.previewFullImage"
                        :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                        uploadIcon="/static/icon/upload.png"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'imageUrls')"
                        @delete="deletePic">
                    </u-upload>
                </view>