Lou
2023-11-29 11cfec702172022207304a4bdbbc6f21e846468e
修复优化部分问题
7 files modified
1 files added
338 ■■■■ changed files
common/setting.js 2 ●●● patch | view | raw | blame | history
mixin/uploadMixin.js 4 ●●●● patch | view | raw | blame | history
pages.json 9 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 4 ●●●● patch | view | raw | blame | history
subPackage/article/detail.vue 23 ●●●●● patch | view | raw | blame | history
subPackage/bs/views/repair.vue 8 ●●●● patch | view | raw | blame | history
subPackage/bs/views/repairRecord.vue 211 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/editExamine.vue 77 ●●●● patch | view | raw | blame | history
common/setting.js
@@ -12,7 +12,7 @@
    // devUrl: 'https://sk.hubeishuiyi.cn',
    // devUrl: 'http://192.168.1.156:9528',
    // devUrl:'http://192.168.1.50:9528',
    devUrl: 'http://192.168.0.103:9528',
    devUrl: 'http://192.168.0.102:9528',
    // devUrl:'https://srgdjczzxtpt.com:2080/api',
    // devUrl: 'http://192.168.0.102:9528',
    // devUrl: 'https://srgdjczzxtpt.com:2080/api',
mixin/uploadMixin.js
@@ -112,8 +112,8 @@
        
        //删除图片
        deletePic(event) {
            this.form.images.splice(event.index, 1)
        deletePic(event,key="images") {
            this.form[key].splice(event.index, 1)
        },
        showLoading() {
            uni.showLoading({
pages.json
@@ -485,6 +485,15 @@
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "views/repairRecord",
                    "style": {
                        "navigationBarTitleText": "报事明细",
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black",
                        "enablePullDownRefresh": false
                    }
                }
            ]
        },
pages/home/index.vue
@@ -524,9 +524,9 @@
            navigatorPage(path) {
                if (path) {
                    if (path == '/subPackage/bs/views/zhsb' && this.curHouseCode === '') {
                    if (( path == '/subPackage/bs/views/zhsb' || path == '/subPackage/bs/views/repair' )&& this.curHouseCode === '') {
                        uni.showToast({
                            title: "请选择地址",
                            title: "尚无绑定房屋信息",
                            icon: "error"
                        })
                        
subPackage/article/detail.vue
@@ -77,9 +77,10 @@
                                    <u-radio :label="i.optionContent" :name="i.id"></u-radio>
                                    <view class="flex j-c-s-b a-i-c mt-10">
                                        <view class="mt-10" style="width:80%;">
                                            <uv-line-progress height="6" :showText="false"
                                            <uv-line-progress v-if="item.selected"  height="6" :showText="false"
                                                :percentage="getRatio(i.number)"
                                                activeColor="#017BFC"></uv-line-progress>
                                            <uv-line-progress  v-else  height="6" :showText="false"></uv-line-progress>
                                        </view>
                                        <text class="c-33 f-28" v-if="i.number">{{i.number}}人</text>
@@ -95,9 +96,10 @@
                                    <u-checkbox :label="i.optionContent" :name="i.id"></u-checkbox>
                                    <view class="flex j-c-s-b a-i-c mt-10">
                                        <view class="mt-10" style="width:80%;">
                                            <uv-line-progress height="6" :showText="false"
                                            <uv-line-progress v-if="item.selected"  height="6" :showText="false"
                                                :percentage="getRatio(i.number)"
                                                activeColor="#017BFC"></uv-line-progress>
                                            <uv-line-progress  v-else  height="6" :showText="false"></uv-line-progress>
                                        </view>
                                        <text class="c-33 f-28" v-if="i.number">{{i.number}}人</text>
                                    </view>
@@ -132,8 +134,7 @@
            </view>
        </view>
        <view class="footer">
            <u-search searchIcon='edit-pen' :showAction="true" actionText="写评论" :animation="true" disabled
                @click="navToComment"></u-search>
            <u-search searchIcon='edit-pen' :animation="true" placeholder="写评论" disabled @click="navToComment"></u-search>
        </view>
@@ -232,7 +233,7 @@
                getCommentList({
                    page: 1,
                    size: 20,
                    articleId:this.params.id
                    articleId: this.params.id
                }).then(res => {
                    this.commentList = res.data.records;
                })
@@ -404,7 +405,7 @@
    }
    .apply {
        padding: 30rpx;
        padding: 30rpx 30rpx 140rpx;
        .apply-user {
            width: 80rpx;
@@ -440,12 +441,13 @@
    .c-d1 {
        color: #d1d1d1;
    }
    .c-33{
        color:#333;
    .c-33 {
        color: #333;
    }
    .vote {
        padding: 0 40rpx 30rpx;
        padding: 0 40rpx 130rpx;
        .vote-title {
            padding: 30rpx 0;
@@ -460,7 +462,8 @@
    .comment-list {
        width: 100%;
        padding-top:20rpx;
        padding-top: 20rpx;
        .comment-item {
            width: 100%;
            padding: 20rpx 0;
subPackage/bs/views/repair.vue
@@ -9,7 +9,7 @@
        <view class="container">
            <view class="c-ff f-36">请选择您需要的服务</view>
            <view class="serve-box bgc-ff mb-20 flex j-c-s-b a-i-c">
                <view class="flex a-i-c">
                <view class="flex a-i-c"   @click="navToRecord()">
                    <u-icon name="/static/icon/nav-09.png" width="91rpx" height="70rpx"></u-icon>
                    <view class="flex f-d-c ml-40">
                        <text class="f-36">总申请</text>
@@ -19,7 +19,7 @@
                        </view>
                    </view>
                </view>
                <view class="flex a-i-c">
                <view class="flex a-i-c"  @click="navToRecord(3)">
                    <u-icon name="/static/icon/nav-10.png" width="91rpx" height="70rpx"></u-icon>
                    <view class="flex f-d-c ml-40">
                        <text class="f-36">已处理</text>
@@ -130,6 +130,10 @@
                getStatistics().then(res => {
                    this.statistic = res.data
                })
            },
            navToRecord(type=0){
                return
                this.$u.func.globalNavigator(`/subPackage/bs/views/repairRecord?type=${type}`, "navTo")
            }
subPackage/bs/views/repairRecord.vue
New file
@@ -0,0 +1,211 @@
<template>
    <view>
        <u-sticky>
            <view class="tab">
                <view class="tab">
                    <u-tabs :list="tabList" :scrollable="false" :current="tabIndex" @click="changeTab"
                        :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>
                    </view>
                </view>
            </view>
        </u-sticky>
        <view class="list">
            <view class="list-item bgc-ff mb-20" v-for="item in reportList" :key="item.id" @click="pushPage(item)">
                <view class="item-title flex a-i-c j-c-s-b mb-20">
                    <text class="f-32 fw">{{ findObjValue(item.type, typeList, 'type').name }}</text>
                    <u-tag class="u_tag" size="mini" plain plainFill :text="findObjValue(item.confirmFlag, tabList, 'status').name" :type="findObjValue(item.confirmFlag, tabList, 'status').type"></u-tag>
                </view>
                <view class="item-row flex a-i-c j-c-s-b">
                    <text class="f-28">姓名</text>
                    <text class="f-28 c-66">{{ item.realName }}</text>
                </view>
                <view class="item-row flex a-i-c j-c-s-b">
                    <text class="f-28">手机</text>
                    <text class="f-28 c-66">{{ item.phone }}</text>
                </view>
                <view class="item-row flex a-i-c j-c-s-b">
                    <text class="f-28">地址</text>
                    <text class="address f-28 c-66">{{ item.addressName || "" }}</text>
                </view>
            </view>
        </view>
        <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
    </view>
</template>
<script>
    import {
        getPage
    } from '@/api/task/taskReportForRepairs.js'
    export default {
        data() {
            return {
                reportList: [],
                pagingParams: {
                    current: 1,
                    size: 10
                },
                tabList: [
                    {
                        name: "全部",
                        status: '',
                        type: 'warning'
                    },
                    {
                        name: "待处理",
                        status: 1,
                        type: 'warning'
                    },
                    {
                        name: "处理中",
                        status: 2,
                        type: 'success'
                    },
                    {
                        name: "已处理",
                        status: 3,
                        type: 'error'
                    },
                ],
                typeList: [
                    {
                        name: "公共维修",
                        type: 1
                    },
                    {
                        name: "居家维修",
                        type: 2
                    },
                    {
                        name: "矛盾纠纷",
                        type: 3
                    },
                    {
                        name: "投诉举报",
                        type: 4
                    },
                    {
                        name: "企业商户上报",
                        type: 5
                    }
                ],
                tabIndex: 0,
                tabStatus: '',
                keyWord: '',
                loadingStatus: 'nomore'
            }
        },
        onLoad(option){
            this.tabIndex = option.type;
            this.tabStatus = option.type == 0?'':option.type
        },
        onShow() {
            this.currentRole = uni.getStorageSync("activeRole")
            this.reportList = []
            this.getPageList()
        },
        onReachBottom() {
            this.pagingParams.current++
            this.getPageList()
        },
        methods: {
            async getPageList() {
                this.loadingStatus = 'loadingmore'
                const params = {
                    realName: this.keyWord,
                    confirmFlag: this.tabStatus
                }
                const { roleName } = this.currentRole
                const res = await getPage({
                    ...params,
                    roleName,
                    ...this.pagingParams
                })
                const {
                    code,
                    data: {
                        records
                    }
                } = res
                if (code !== 200) {
                    uni.showToast({
                        title: '数据请求失败',
                        icon: 'error'
                    })
                    return
                }
                this.reportList = [...this.reportList, ...records]
                this.loadingStatus = 'nomore'
            },
            changeTab(e) {
                this.tabStatus = e.status;
                this.resetParams()
                this.getPageList()
            },
            searchConfirm() {
                this.resetParams()
                this.getPageList()
            },
            clearConfirm() {
                this.keyWord = ''
                this.searchConfirm()
            },
            resetParams() {
                this.reportList = []
                this.pagingParams.current = 1
            },
            findObjValue(value, obj, word) {
                const res = obj.find(item => {
                    return item[word] == value
                })
                return res
            },
            pushPage(item) {
                const data = JSON.stringify(item)
                // this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?id='+id)
                this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?data='+data)
            }
        }
    }
</script>
<style lang="scss">
    page {
        background-color: #F5F5F5;
    }
    .tab {
        background-color: #fff;
        .search {
            padding: 20rpx 70rpx;
        }
    }
    .list {
        margin: 20rpx 30rpx 0;
    }
    .list-item {
        padding: 0 30rpx 20rpx;
        border-radius: 8rpx;
        .item-title {
            padding: 30rpx 0;
            border-bottom: 1px solid #F5F5F5;
        }
        .item-row {
            padding: 10rpx 0;
            .address {
                width: 75%;
                text-align: right;
            }
        }
    }
</style>
subPackage/workbench/views/editExamine.vue
@@ -26,7 +26,7 @@
                        :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                        uploadIcon="/static/icon/upload.png"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'imageUrls')"
                        @delete="deletePic">
                        @delete="deletePic($event,'imageUrls')">
                    </u-upload>
                </view>
            </view>
@@ -37,7 +37,7 @@
                        :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                        uploadIcon="/static/icon/upload.png"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'planImageUrls')"
                        @delete="deletePic">
                        @delete="deletePic($event,'planImageUrls')">
                    </u-upload>
                </view>
            </view>
@@ -73,6 +73,7 @@
    import uploadMixin from "@/mixin/uploadMixin";
    import boxTitle from "@/subPackage/workbench/components/boxTitle/index.vue"
    import formItem from '../components/formItem.vue'
    import { minioBaseUrl } from '@/common/setting'
    export default {
        mixins: [uploadMixin],
        components: {
@@ -148,22 +149,32 @@
                        return
                    }
                    const placePractitioner = data?.placePractitioner || []
                    Object.keys(this.form).forEach(key => {
                        this.form[key] = data[key]
                        if (key === 'imageUrls' || key === 'planImageUrls') {
                            data[key] = data[key] || ''
                            this.form[key] = []
                            if (!!data[key]) {
                                data[key] = JSON.parse(data[key])
                                if (Array.isArray(data[key])) {
                                    this.form[key] = data[key]
                                } else {
                                    this.form[key].push(data[key])
                                }
                    // Object.keys(this.form).forEach(key => {
                    //     this.form[key] = data[key]
                    //     if (key === 'imageUrls' || key === 'planImageUrls') {
                    //         data[key] = data[key] || ''
                    //         this.form[key] = []
                    //         if (!!data[key]) {
                    //             data[key] = JSON.parse(data[key])
                    //             if (Array.isArray(data[key])) {
                    //                 this.form[key] = data[key]
                    //             } else {
                    //                 this.form[key].push(data[key])
                    //             }
                    //         }
                    //     }
                    // })
                    for(let i in this.form){
                        if(i === 'imageUrls' || i === 'planImageUrls'){
                            if(this.form[i]){
                                this.form[i] = this.setImageUrl(i,data[i].split('、'))
                            }
                        }else{
                            this.form[i]  = data[i]
                        }
                    })
                    }
                    this.personNum = placePractitioner.length
                    const componetns = this.$refs.formItemRef || []
                    this.$refs.formItemRef.forEach((item, index) => {
@@ -171,9 +182,36 @@
                    })
                })
            },
            setImageUrl(key,arr){
                let urls = [];
                for(let i of arr){
                    urls.push({
                        name:i,
                        url:`${minioBaseUrl}${i}`
                    })
                }
                return urls
            },
            getImageUrl(key){
                if(this.form[key].length){
                    let urls = [];
                   for(let i of this.form[key]){
                        urls.push(i.name)
                   }
                   return urls.join('、');
                }else {
                    return "";
                }
            },
            updatePlaceExt(data) {
                data['imageUrls'] = data['imageUrls'].join('、')
                data['planImageUrls'] = data['planImageUrls'].join('、')
                data['imageUrls'] = this.getImageUrl('imageUrls')
                data['planImageUrls'] = this.getImageUrl('planImageUrls')
                // data['imageUrls'] = data['imageUrls'].join('、')
                // data['planImageUrls'] = data['planImageUrls'].join('、')
                updatePlaceExtData({
                    ...data
                }).then(res => {
@@ -189,11 +227,10 @@
                    }
                    uni.showToast({
                        title: '提交成功',
                        icon: 'success',
                        complete() {
                            setTimeout(() => {
                                uni.navigateBack()
                            }, 1500)
                            }, 1000)
                        }
                    })
                })