GULIMMO
2023-11-09 79e5599727c2ad19bb40cccd35f6f3302ff1b896
场所维护及其审核页面、报事审核及其审核页面更新
9 files modified
4 files added
912 ■■■■■ changed files
api/placeExp/placeExp.js 4 ●●●● patch | view | raw | blame | history
api/task/taskReportForRepairs.js 70 ●●●●● patch | view | raw | blame | history
pages.json 27 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 7 ●●●●● patch | view | raw | blame | history
subPackage/workbench/components/formItem.vue 45 ●●●●● patch | view | raw | blame | history
subPackage/workbench/components/lineItem.vue 4 ●●● patch | view | raw | blame | history
subPackage/workbench/views/audit.vue 1 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/cshw.vue 19 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/editExamine.vue 169 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/examine.vue 124 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/rental.vue 26 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/report.vue 194 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/reportAudit.vue 222 ●●●●● patch | view | raw | blame | history
api/placeExp/placeExp.js
@@ -10,11 +10,11 @@
export const getCheckPlaceExtData = (params) => {
export const checkPlaceExtData = (data) => {
    return http.request({
        url: 'blade-placeExt/placeExt/checkPlaceExt',
        method: 'POST',
        params
        data
    })
}
api/task/taskReportForRepairs.js
@@ -1,32 +1,40 @@
import http from '@/http/api.js'
//获取报事统计数据
export const getStatistics = (params) => {
    return http.request({
        url: '/blade-taskReportForRepairs/taskReportForRepairs/getStatisticsCount',
        method: 'GET',
        params: {
            ...params
        }
    })
}
export const getPage = (params) => {
    return http.request({
        url: '/blade-taskReportForRepairs/taskReportForRepairs/page',
        method: 'GET',
        params: {
            ...params
        }
    })
}
//添加
export const save = (data) => {
    return http.request({
        url: '/blade-taskReportForRepairs/taskReportForRepairs/save',
        method: 'POST',
        data: data
    })
import http from '@/http/api.js'
//获取报事统计数据
export const getStatistics = (params) => {
    return http.request({
        url: '/blade-taskReportForRepairs/taskReportForRepairs/getStatisticsCount',
        method: 'GET',
        params: {
            ...params
        }
    })
}
export const getPage = (params) => {
    return http.request({
        url: '/blade-taskReportForRepairs/taskReportForRepairs/page',
        method: 'GET',
        params: {
            ...params
        }
    })
}
//添加
export const save = (data) => {
    return http.request({
        url: '/blade-taskReportForRepairs/taskReportForRepairs/save',
        method: 'POST',
        data: data
    })
}
export const checkReportForRepairsData = (data) => {
    return http.request({
        url: 'blade-taskReportForRepairs/taskReportForRepairs/checkReportForRepairs ',
        method: 'POST',
        data
    })
}
pages.json
@@ -206,6 +206,33 @@
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "views/editExamine",
                    "style": {
                        "navigationBarTitleText": "场合维护",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "views/report",
                    "style": {
                        "navigationBarTitleText": "网格任务审核",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "views/reportAudit",
                    "style": {
                        "navigationBarTitleText": "审核",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                }
            ]
        },
pages/home/index.vue
@@ -249,7 +249,8 @@
                        style: {
                            background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
                        },
                        path:"/subPackage/workbench/views/cshw"
                        path: this.roleType === 2 ? '/subPackage/workbench/views/editExamine' :
                            "/subPackage/workbench/views/cshw"
                    },
                    {
                        icon: "/static/icon/menu-06.png",
@@ -257,7 +258,7 @@
                        style: {
                            background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
                        },
                        path: ""
                        path: "/subPackage/workbench/views/report"
                    },
                    // {
                    //     icon: "/static/icon/menu-07.png",
@@ -396,7 +397,7 @@
                    } else {
                        this.curSelectSite = dataList[0];
                    }
                    this.curHouseCode = this.curSelectSite.id
                    this.curHouseCode = this.curSelectSite.id
                    uni.setStorageSync('curSelectSite', this.curSelectSite)
                }
            },
subPackage/workbench/components/formItem.vue
New file
@@ -0,0 +1,45 @@
<template>
    <view class="form-box">
        <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
            <u-form-item label="姓名" required prop="name" class="form-item">
                <u--input v-model="form.name" border="none"></u--input>
            </u-form-item>
            <u-form-item label="电话号码" class="form-item">
                <u--input v-model="form.phone" border="none"></u--input>
            </u-form-item>
            <u-form-item label="咱据地" class="form-item">
                <u--input v-model="form.address" border="none"></u--input>
            </u-form-item>
        </u-form>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                form: {
                    name: '',
                    phone: '',
                    address: ''
                },
                rules: {
                    name: {
                        type: 'string',
                        required: true,
                        message: '请填写姓名',
                        trigger: ['blur', 'change']
                    }
                }
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form-box {
        .form-item {
            border-bottom: 1rpx solid #f6f6f6;
            padding: 0 20rpx;
            background-color: #fff;
        }
    }
</style>
subPackage/workbench/components/lineItem.vue
@@ -65,7 +65,9 @@
            padding: 20rpx 10px;
            border-bottom: 1px solid #eff1f3;
            .l {}
            .l {
                width: 200rpx;
            }
            .r {
                color: #969799;
subPackage/workbench/views/audit.vue
@@ -77,6 +77,7 @@
        background-color:#fff;
        padding:0 30rpx;
        box-sizing: border-box;
        z-index: 999;
        
    }
    .tab /deep/.u-tabs__wrapper__nav__item{
subPackage/workbench/views/cshw.vue
@@ -65,11 +65,12 @@
                tabIndex: 0,
                tabStatus: 1,
                keyWord: '',
                loadingStatus: 'nomore'
                loadingStatus: 'nomore',
                clickInfo: {}
            }
        },
        onShow() {
            this.siteList = []
            this.resetParams()
            this.getSiteList()
        },
        onReachBottom() {
@@ -95,7 +96,8 @@
                } = res
                if (code !== 200) {
                    uni.showToast({
                        title: '数据请求失败'
                        title: '数据请求失败',
                        icon: 'error'
                    })
                    return
                }
@@ -112,7 +114,9 @@
                this.getSiteList()
            },
            clearConfirm() {
                this.keyWord = ''
                this.keyWord = ''
                this.resetParams()
                this.searchConfirm()
            },
            resetParams() {
                this.siteList = []
@@ -124,8 +128,11 @@
                })
                return res
            },
            pushPage(id) {
                this.$u.func.globalNavigator('/subPackage/workbench/views/examine?id='+id)
            pushPage(id) {
                const siteData = this.siteList.find(item => item.id === id)
                const siteDataStr = JSON.stringify(siteData)
                // this.$u.func.globalNavigator('/subPackage/workbench/views/examine?id='+id)
                this.$u.func.globalNavigator('/subPackage/workbench/views/examine?siteData='+siteDataStr)
            }
        }
    }
subPackage/workbench/views/editExamine.vue
New file
@@ -0,0 +1,169 @@
<template>
    <div class="container">
        <view class="">
            <box-title title="基本信息"></box-title>
            <u-form labelWidth="70" :model="form" :rules="rules" ref="form" class="form">
                <u-form-item label="场所位置" required class="form-item" prop="localtion">
                    <u--input border="none" v-model="form.localtion"></u--input>
                </u-form-item>
                <u-form-item label="场所名称" required class="form-item"  prop="placeName">
                    <u--input border="none" v-model="form.placeName"></u--input>
                </u-form-item>
                <u-form-item label="法人信息" required class="form-item"  prop="legalPerson">
                    <u--input border="none" v-model="form.legalPerson"></u--input>
                </u-form-item>
                <u-form-item label="法人电话" class="form-item">
                    <u--input border="none" v-model="form.legalTel"></u--input>
                </u-form-item>
            </u-form>
        </view>
        <view class="">
            <box-title title="营业执照"></box-title>
            <view class="upload-img">
                <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
                </u-upload>
            </view>
        </view>
        <view class="">
            <box-title title="场所平面图"></box-title>
            <view class="upload-img">
                <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
                </u-upload>
            </view>
        </view>
        <view class="practitioner">
            <box-title title="从业人员信息"></box-title>
            <view class="info" v-for="i in personNum" :key="i">
                <view class="title">人员信息-#{{ i }}</view>
                <formItem ref="formItemRef"></formItem>
            </view>
        </view>
        <u-button type="success" plain class="add-person" @click="addPerson">在加一人</u-button>
        <view class="btn-group">
            <u-button class="btn-item" type="primary" @click="submit">提交</u-button>
            <u-button class="btn-item">我上报的事件</u-button>
        </view>
    </div>
</template>
<script>
    import { updatePlaceExtData } from '@/api/placeExp/placeExp.js'
    import uploadMixin from "@/mixin/uploadMixin";
    import boxTtitle from '@/components/boxTitle/index.vue'
    import formItem from '../components/formItem.vue'
    export default {
        mixins: [uploadMixin],
        components: {
            formItem
        },
        data() {
            return {
                form: {
                    localtion: '',
                    placeName: '',
                    legalPerson: '',
                    legalTel: '',
                    imageUrls: [],
                    planImageUrls: []
                },
                rules: {
                    localtion: {
                        required: true,
                        message: '请选择地址',
                        trigger: ['blur', 'change']
                    },
                    placeName: {
                        required: true,
                        message: '请填写场所名称',
                        trigger: ['blur', 'change']
                    },
                    legalPerson: {
                        required: true,
                        message: '请填写法人信息',
                        trigger: ['blur', 'change']
                    }
                },
                personNum: 1
            }
        },
        methods: {
            updatePlaceExt() {
            },
            addPerson() {
                this.personNum++
            },
            submit() {
                const personList = []
                this.$refs.formItemRef.forEach(item => {
                    personList.push(item.form)
                })
                console.log(personList);
            }
        }
    }
</script>
<style lang="scss" scoped>
    page {
        background-color: #f6f6f6;
    }
    .container {
        padding-bottom: 300rpx;
        .form {
            margin-top: 20rpx;
            .form-item {
                background-color: #fff;
                padding: 0 20rpx;
                border-bottom: 1rpx solid #f6f6f6;
            }
        }
        .upload-img {
            background-color: #fff;
            padding: 20rpx;
            padding-bottom: 10rpx;
            margin-top: 20rpx;
        }
        .add-person {
            width: 30%;
            margin: 20rpx auto;
        }
        .practitioner {
            .info {
                margin-top: 20rpx;
                .title {
                    text-align: center;
                    font-size: 30rpx;
                    margin-bottom: 10rpx;
                }
            }
        }
        .btn-group {
            background-color: #fff;
            position: fixed;
            bottom: 0;
            left: 0;
            width: calc(100% - 40rpx);
            padding: 20rpx;
            border-top: 1rpx solid #f6f6f6;
            z-index: 999;
            .btn-item {
                margin-top: 20rpx;
            }
        }
    }
</style>
subPackage/workbench/views/examine.vue
@@ -32,12 +32,12 @@
            <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.status" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
                            border="none"></u-input>
                        <u--input v-model="form.confirmFlag" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
                            border="none"></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.remark" border="none"></u-input>
                        <u--input v-model="form.confirmNotion" border="none"></u--input>
                    </u-form-item>
                </u-form>
            </view>
@@ -53,6 +53,9 @@
<script>
    import boxTitle from '@/components/boxTitle/index.vue'
    import lineItem from '../components/lineItem.vue'
    import {
        checkPlaceExtData
    } from '@/api/placeExp/placeExp.js'
    export default {
        components: {
            boxTitle,
@@ -61,19 +64,23 @@
        data() {
            return {
                basicData: [{
                        label: '场所名称',
                        label: '场所名称',
                        name: "placeName",
                        value: '未完善'
                    },
                    {
                        label: '法人信息',
                        label: '法人信息',
                        name: 'legalPerson',
                        value: '未完善'
                    },
                    {
                        label: '法人电话',
                        label: '法人电话',
                        name: 'legalTel',
                        value: '未完善'
                    },
                    {
                        label: '场所位置',
                        label: '场所位置',
                        name: 'localtion',
                        value: '未完善'
                    },
                ],
@@ -90,45 +97,84 @@
                            label: '暂住地',
                            value: '未完善',
                        }
                    ],
                    [{
                            label: '姓名',
                            value: '未完善',
                        },
                        {
                            label: '电话号码',
                            value: '未完善',
                        },
                        {
                            label: '暂住地',
                            value: '未完善',
                        }
                    ]
                ],
                form: {
                    status: '未审批',
                    remark: ''
                    confirmFlag: '待审核',
                    confirmNotion: ''
                },
                isPickerShow: false,
                columns: [
                    [{
                        name: '通过',
                        type: 1
                    }, {
                        name: '不通过',
                        type: 2
                    }]
                ]
                            name: "待审核",
                            status: 1
                        },
                        {
                            name: "审核通过",
                            status: 2
                        },
                        {
                            name: "审核不通过",
                            status: 3
                        },
                    ]
                ],
                currentId: '',
                currentData: {}
            }
        },
        methods: {
        onLoad(option) {
            // const {
            //     id
            // } = option
            // this.currentId = id
            const { siteData } = option
            this.currentData = JSON.parse(siteData)
        },
        onShow() {
            this.setDefaultValue()
        },
        methods: {
            setDefaultValue() {
                this.basicData.forEach(item => {
                    item.value = this.currentData[item.name]
                })
            },
            async checkPlaceExt(data) {
                const res = await checkPlaceExtData(data)
                if (res.code !== 200) {
                    uni.showToast({
                        title: '更新失败',
                        icon: 'error'
                    })
                    return
                }
                uni.navigateBack()
            },
            handleConfirm(e) {
                this.form.status = e.value[0].name
                this.form.confirmFlag = e.value[0].name
                this.isPickerShow = false
            },
            submit() {
            }
                const {
                    confirmFlag,
                    confirmNotion
                } = this.form
                let data = {
                    id: this.currentData.id,
                    confirmFlag: this.findObjValue(confirmFlag, this.columns[0]).status
                }
                confirmNotion && Object.assign(data, {
                    confirmNotion
                })
                this.checkPlaceExt(data)
            },
            findObjValue(value, obj) {
                const res = obj.find(item => {
                    return item.name == value
                })
                return res
            },
        }
    }
</script>
@@ -146,10 +192,10 @@
        }
        .info {
            .title {
                font-size: 30rpx;
                font-size: 30rpx;
                padding-left: 10rpx;
            }
@@ -160,13 +206,14 @@
            }
        }
        .form {
        .form {
            background-color: #fff;
            .form-item {
                padding: 0 20rpx;
                &:first-child {
                    border: 1rpx solid #f6f6ff;
                    border-bottom: 1rpx solid #f6f6ff;
                }
            }
        }
@@ -178,11 +225,12 @@
            padding: 20rpx;
            width: calc(100% - 40rpx);
            background-color: #fff;
            z-index: 9999;
        }
    }
    /deep/ .u-form-item__body__left__content__label,
    /deep/ .uni-input-input {
    /deep/ .uni-input-placeholder {
        font-size: 30rpx;
    }
</style>
subPackage/workbench/views/rental.vue
@@ -173,17 +173,18 @@
        methods: {
            handleSelect(res) {
                const [auditStatus, floor] = res
                console.log(auditStatus, floor);
                this.pagingParams = {
                    current: 1,
                    size: 10
                }
                this.tenantList = []
                this.resetParams()
                let params = {}
                if (auditStatus[0].value !== '') {
                    params = {
                        auditStatus: auditStatus[0].value
                    }
                }
                if (floor[0].value !== '') {
                    params = {
                        ...params,
                        floor: floor[0].value
                    }
                }
                this.getRentalHouseInfo(params)
            },
@@ -226,11 +227,13 @@
                this.tenantList = [...this.tenantList, ...records]
                this.loadingStatus = 'nomore'
            },
            search() {
            search() {
                this.resetParams()
                this.getRentalHouseInfo()
            },
            clear() {
                this.keyword = ''
                this.keyword = ''
                this.resetParams()
                this.search()
            },
            tenantManage({
@@ -238,6 +241,13 @@
                id
            }) {
                this.$u.func.globalNavigator(`/subPackage/bs/views/rentDetail?houseCode=${houseCode}&id=${id}`)
            },
            resetParams() {
                this.tenantList = []
                this.pagingParams = {
                    current: 1,
                    size: 10
                }
            }
        }
    }
subPackage/workbench/views/report.vue
New file
@@ -0,0 +1,194 @@
<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.id)">
                <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.status, tabList, 'status').name" :type="findObjValue(item.status, 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="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: 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: 1,
                keyWord: '',
                loadingStatus: 'nomore'
            }
        },
        onShow() {
            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 res = await getPage({
                    ...params,
                    ...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(id) {
                this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?id='+id)
            }
        }
    }
</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: 65%;
            }
        }
    }
</style>
subPackage/workbench/views/reportAudit.vue
New file
@@ -0,0 +1,222 @@
<template>
    <view class="container">
        <view class="basic-box">
            <view class="title-box">
                <view class="line"></view>
                <view class="text">基本信息</view>
            </view>
            <view class="basic-data">
                <lineItem :data-info="basicData"></lineItem>
            </view>
        </view>
        <view class="pic-box">
            <view class="title-box">
                <view class="line"></view>
                <view class="text">事件照片</view>
            </view>
            <view class="pic-data">
                <u-image class="img" v-for="i in 1" src="" width="80" height="80"></u-image>
            </view>
        </view>
        <view class="audit-box">
            <view class="title-box">
                <view class="line"></view>
                <view class="text">审核信息</view>
            </view>
            <view class="audit-form">
                <u-form labelWidth="70" :model="form" class="form" ref="form">
                    <u-form-item label="事件状态" @click="isPickerShow = true" class="form-item">
                        <u--input v-model="form.confirmFlag" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
                            border="none"></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-form-item>
                </u-form>
            </view>
        </view>
        <view class="bottom">
            <u-button type="primary" @click="submit">提交处理</u-button>
        </view>
        <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
            :columns="columns" keyName="name" @cancel="isPickerShow = false" @confirm="handleConfirm"></u-picker>
    </view>
</template>
<script>
    import lineItem from '../components/lineItem.vue'
    import { checkReportForRepairsData } from '@/api/task/taskReportForRepairs.js'
    export default {
        components: {
            lineItem
        },
        data() {
            return {
                basicData: [{
                        label: '当前位置',
                        value: '未完善'
                    },
                    {
                        label: '业主',
                        value: '未完善'
                    },
                    {
                        label: '手机号码',
                        value: '未完善'
                    },
                    {
                        label: '事件类型',
                        value: '未完善'
                    },
                    {
                        label: '事件描述',
                        value: '未完善'
                    }
                ],
                form: {
                    confirmFlag: '待审核',
                    confirmNotion: ''
                },
                currentId: '',
                isPickerShow: false,
                columns: [
                    [{
                            name: "待处理",
                            status: 1
                        },
                        {
                            name: "处理中",
                            status: 2
                        },
                        {
                            name: "已处理",
                            status: 3
                        },
                    ]
                ]
            }
        },
        onLoad(option) {
            const { id } = option
            this.currentId = id
        },
        methods: {
            async checkReportForRepairs() {
                const { confirmFlag, confirmNotion } = this.form
                const res = await checkReportForRepairsData({
                    id: this.currentId,
                    confirmFlag: this.findObjValue(confirmFlag, this.columns[0]).status,
                    confirmNotion
                })
                if (res.code !== 200) {
                    uni.showToast({
                        title: "提交处理失败",
                        icon: "error"
                    })
                    return
                }
                uni.showToast({
                    title: "处理事件成功",
                    icon: "success",
                    duration: 1500,
                    complete() {
                        setTimeout(() =>{
                            uni.navigateBack()
                        }, 1500)
                    }
                })
            },
            submit() {
                this.checkReportForRepairs()
            },
            handleConfirm(e) {
                this.form.confirmFlag = e.value[0].name
                this.isPickerShow = false
            },
            findObjValue(value, obj) {
                const res = obj.find(item => {
                    return item.name == value
                })
                return res
            },
        }
    }
</script>
<style lang="scss" scoped>
    page {
        background-color: #f6f6f6;
    }
    .container {
        padding: 20rpx 30rpx 150rpx 30rpx;
        .basic-box,
        .pic-box,
        .audit-box,
        .bottom {
            background-color: #fff;
            padding: 20rpx;
        }
        .pic-box {
            margin-top: 20rpx;
            .pic-data {
                display: flex;
                flex-wrap: wrap;
                margin-top: 20rpx;
            }
        }
        .audit-box {
            margin-top: 20rpx;
            .audit-form {
                .form {
                    font-size: 30rpx;
                    .form-item {
                        padding: 0 20rpx;
                        &:first-child {
                            border-bottom: 1rpx solid #f6f6ff;
                        }
                    }
                }
            }
        }
        .bottom {
            position: fixed;
            left: 0;
            bottom: 0;
            width: calc(100% - 40rpx);
            border-top: 1rpx solid #f6f6f6;
        }
        .title-box {
            display: flex;
            font-size: 30rpx;
            .line {
                background-color: #4586FE;
                width: 7rpx;
                margin-right: 10rpx;
            }
            .text {
                font-weight: 700;
            }
        }
    }
    /deep/ .u-form-item__body__left__content__label,
    /deep/ .uni-input-placeholder {
        font-size: 30rpx;
    }
</style>