Lou
2023-11-09 8a736f150b04c87bd4124b4996a4b3188f2aee2e
新增报事列表
7 files modified
3 files added
393 ■■■■ changed files
api/reporting/reporting.js 42 ●●●●● patch | view | raw | blame | history
manifest.json 2 ●●● patch | view | raw | blame | history
pages.json 29 ●●●●● patch | view | raw | blame | history
subPackage/label/bail.vue 22 ●●●●● patch | view | raw | blame | history
subPackage/label/bailList.vue 69 ●●●●● patch | view | raw | blame | history
subPackage/label/form.vue 50 ●●●● patch | view | raw | blame | history
subPackage/label/formList.vue 70 ●●●●● patch | view | raw | blame | history
subPackage/label/hotel.vue 9 ●●●●● patch | view | raw | blame | history
subPackage/label/hotelList.vue 69 ●●●●● patch | view | raw | blame | history
subPackage/label/index.vue 31 ●●●●● patch | view | raw | blame | history
api/reporting/reporting.js
@@ -1,5 +1,14 @@
import http from '@/http/api.js'
//获取报事数量统计
export const getReportingCount = (data) => {
    return http.request({
        url: '/blade-task/task/countNumber',
        method: 'POST',
        data: data
    })
}
//添加旅馆安全报事
export const saveHotelReporting = (data) => {
    return http.request({
@@ -9,6 +18,39 @@
    })
}
//获取旅馆安报事列表
export const getHotelReportingList = (params) => {
    return http.request({
        url: '/blade-taskHotelReporting/taskHotelReporting/page',
        method: 'get',
        params: {
            ...params
        }
    })
}
//获取取保候审报事列表
export const geteBailReportingList = (params) => {
    return http.request({
        url: '/blade-taskBailReportingEvent/taskBailReportingEvent/page',
        method: 'get',
        params: {
            ...params
        }
    })
}
//获取打金店报事列表
export const getLabelReportingList = (params) => {
    return http.request({
        url: '/blade-taskLabelReportingEvent/taskLabelReportingEvent/page',
        method: 'get',
        params: {
            ...params
        }
    })
}
//添加取保候审报事
export const saveBailReporting = (data) => {
    return http.request({
manifest.json
@@ -142,7 +142,7 @@
    "quickapp": {},
    /* 小程序特有相关 */
    "mp-weixin": {
        "appid": "wx1ff4bbc24b343ef1",
        "appid" : "wxdc5675f4df850da6",
        "setting": {
            "urlCheck": false,
            "minified": true,
pages.json
@@ -139,7 +139,34 @@
                {
                    "path": "form",
                    "style": {
                        "navigationBarTitleText": "大金店报事",
                        "navigationBarTitleText": "打金店报事",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "hotelList",
                    "style": {
                        "navigationBarTitleText": "报事列表",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "bailList",
                    "style": {
                        "navigationBarTitleText": "报事列表",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "formList",
                    "style": {
                        "navigationBarTitleText": "报事列表",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
subPackage/label/bail.vue
@@ -5,7 +5,7 @@
            :labelStyle="{fontSize:'28rpx'}">
            <view class="content">
                <u-form-item label="姓名" prop="checkUserName" borderBottom  required>
                    <u-input v-model="info.checkUserName"  disabled disabledColor="#fff" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                    <u-input v-model="info.checkUserName"  border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="手机" prop="checkTelephone" borderBottom  required>
@@ -30,9 +30,9 @@
            <view class="upload bgc-ff">
                <view class="f-28 mb-20">位置图片</view>
                <view class="mt-20">
                    <u-upload :fileList="form.image" :previewFullImage="uploadConfig.previewFullImage"
                    <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                        :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImgs($event,'fireImageUrls')"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
                        @delete="deletePic">
                        <view class="upload-item upload-icon flex_base">
                            <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
@@ -42,7 +42,7 @@
            </view>
        </u-form>
        <button class="submit-btn" @click="sumitInfo">提交</button>
        <!-- <button class="list-btn" @click="navigatorPage">我上报的事件</button> -->
        <button class="list-btn" @click="navigatorPage">我上报的事件</button>
         <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="applyTime" mode="datetime"
             :formatter="formatter" @confirm="confirmDate"  @cancel="showSelectDate = false"></u-datetime-picker>
    </view>
@@ -130,13 +130,9 @@
            },
            confirmDate(e) {
                console.log(e);
                this.showSelectDate = false;
                this.info.applyTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM')
                this.info.applyTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
            },
        
            checkImages() {
                if (this.form.images.length) {
@@ -153,7 +149,7 @@
            },
            sumitInfo() {
                this.$refs.info.validate().then(valid => {
                this.$refs.form.validate().then(valid => {
                    this.checkImages();
                    saveBailReporting(this.info).then(res => {
                        uni.showToast({
@@ -161,7 +157,8 @@
                            title: '提交成功',
                            success() {
                                setTimeout(() => {
                                    that.$u.func.globalNavigator("", "navBack")
                                    // this.$u.func.globalNavigator("", "navBack")
                                    uni.navigateBack()
                                }, 1000)
                            }
                        })
@@ -169,8 +166,7 @@
                })
            },
            navigatorPage() {
                let url = "/subPackage/bs/views/repairList" + "?title=" + this.title + "&type=" + this.info.type
                this.$u.func.globalNavigator(url, "navTo")
                this.$u.func.globalNavigator('bailList', "navTo")
            }
        }
    }
subPackage/label/bailList.vue
New file
@@ -0,0 +1,69 @@
<template>
    <view class="">
             <view class="list">
                 <view class="list-item bgc-ff mb-20"  v-for="(i,k) in list"  :key="k">
                     <view class="item-title flex a-i-c j-c-s-b mb-20">
                         <text class="f-32 fw">{{i.checkUserName}}</text>
                         <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
                         <u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag>
                         <u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></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">{{i.createTime}}</text>
                     </view>
                 </view>
             </view>
    </view>
</template>
<script>
    import {getBailReportingList} from "@/api/reporting/reporting.js"
    export default {
        data(){
            return {
                list:[]
            }
        },
        onLoad(){
            this.getList()
        },
        methods:{
            getList(){
                getBailReportingList({
                    checkUserId:uni.getStorageSync("userInfo").user_id,
                    page:1,
                    size:20
                }).then(res=>{
                    console.log(res)
                    this.list = res.data.records;
                })
            }
        }
    }
</script>
<style lang="scss">
    page{
        background-color:#F5F5F5;
    }
    .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/label/form.vue
@@ -4,27 +4,25 @@
        <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="100"
            :labelStyle="{fontSize:'28rpx'}">
            <view class="content">
                <u-form-item label="对象电话" prop="transactionObjectTel" borderBottom  required>
                    <u-input v-model="info.transactionObjectTel" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                    <u-input v-model="info.transactionObjectTel" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="交易金额" prop="transactionMoney" borderBottom  required>
                    <u-input v-model="info.transactionMoney"  disabled disabledColor="#fff" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                    <u-input v-model="info.transactionMoney" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="物品数量" prop="goodsNums" borderBottom  required>
                    <u-input v-model="info.goodsNums" type="number" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                    <u-input v-model="info.goodsNums" type="number" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="交易位置" prop="location" borderBottom ref="location" required>
                    <u-input v-model="info.location"  border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="交易过程" prop="transactionProcess" borderBottom>
                    <u-input v-model="info.transactionProcess"   border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                    <u-input v-model="info.transactionProcess" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
            </view>
@@ -33,8 +31,8 @@
                <view class="mt-20">
                    <u-upload :fileList="imageUrls" :previewFullImage="uploadConfig.previewFullImage"
                        :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImgs($event,'imageUrls')"
                        @delete="deletePic">
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
                        @afterRead="afterReadImgs($event,'imageUrls')" @delete="deletePic">
                        <view class="upload-item upload-icon flex_base">
                            <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
                        </view>
@@ -46,8 +44,8 @@
                <view class="mt-20">
                    <u-upload :fileList="goodsImageUrls" :previewFullImage="uploadConfig.previewFullImage"
                        :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImgs($event,'goodsImageUrls')"
                        @delete="deletePic">
                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
                        @afterRead="afterReadImgs($event,'goodsImageUrls')" @delete="deletePic">
                        <view class="upload-item upload-icon flex_base">
                            <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
                        </view>
@@ -58,7 +56,7 @@
        </u-form>
        <button class="submit-btn" @click="sumitInfo">提交</button>
        <!-- <button class="list-btn" @click="navigatorPage">我上报的事件</button> -->
        <button class="list-btn" @click="navigatorPage">我上报的事件</button>
    </view>
</template>
@@ -78,7 +76,7 @@
                    goodsNums:"",
                    location:"",
                    transactionProcess:"",
                    districtId:"",
                    houseCode: "",
                    districtName:"",
                    userId:""
                },
@@ -110,12 +108,16 @@
                    }
                },
                imageUrls:[],
                goodsImageUrls:[]
                goodsImageUrls: [],
                eventType:1
            }
        },
        onLoad(option) {
            if(option.type != 1){
                uni.setNavigationBarTitle({title:this.setTitle(option.type)})
                this.eventType = option.type;
                uni.setNavigationBarTitle({
                    title: this.setTitle(option.type)
                })
            }
            this.$set(this.info,"eventType",option.type);
            let siteInfo = uni.getStorageSync("siteInfo");
@@ -181,7 +183,7 @@
            },
            
            sumitInfo() {
                this.$refs.info.validate().then(valid => {
                this.$refs.form.validate().then(valid => {
                    this.checkImages()
                    saveLabelReporting(this.info).then(res => {
                        uni.showToast({
@@ -189,17 +191,17 @@
                            title: '提交成功',
                            success() {
                                setTimeout(() => {
                                    that.$u.func.globalNavigator("", "navBack")
                                    uni.navigateBack()
                                    // this.$u.func.globalNavigator("", "navBack")
                                }, 1000)
                            }
                        })
                    })
                })
            },
            // navigatorPage() {
            //     let url = "/subPackage/bs/views/repairList" + "?title=" + this.title + "&type=" + this.info.type
            //     this.$u.func.globalNavigator(url, "navTo")
            // }
            navigatorPage() {
                this.$u.func.globalNavigator(`formList?type=${this.eventType}`, "navTo")
            }
        }
    }
</script>
subPackage/label/formList.vue
New file
@@ -0,0 +1,70 @@
<template>
    <view class="">
             <view class="list">
                 <view class="list-item bgc-ff mb-20"  v-for="(i,k) in list"  :key="k">
                     <view class="item-title flex a-i-c j-c-s-b mb-20">
                         <text class="f-32 fw">{{i.hotelName}}</text>
                         <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
                         <u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag>
                         <u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></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">{{i.createTime}}</text>
                     </view>
                 </view>
             </view>
    </view>
</template>
<script>
    import {getLabelReportingList} from "@/api/reporting/reporting.js"
    export default {
        data(){
            return {
                list:[]
            }
        },
        onLoad(option){
            this.getList(option.type)
        },
        methods:{
            getList(type){
                getLabelReportingList({
                    userId:uni.getStorageSync("userInfo").user_id,
                    page:1,
                    size:20,
                    eventType:type
                }).then(res=>{
                    console.log(res)
                    this.list = res.data.records;
                })
            }
        }
    }
</script>
<style lang="scss">
    page{
        background-color:#F5F5F5;
    }
    .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/label/hotel.vue
@@ -149,7 +149,7 @@
            </view>
        </u-form>
        <button class="submit-btn" @click="sumitInfo">提交</button>
        <!-- <button class="list-btn" @click="navigatorPage">我上报的事件</button> -->
        <button class="list-btn" @click="navigatorPage">我上报的事件</button>
        <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="checkTime" mode="datetime"
            :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker>
        <u-picker :show="isShowFireStatus" :columns="fireStatus" :defaultIndex="fireStatusIndex"
@@ -321,7 +321,6 @@
        onReady() {
            // 微信小程序需要用此写法
            this.$refs.datetimePicker.setFormatter(this.formatter)
            console.log("==>", this)
        },
        methods: {
@@ -408,7 +407,8 @@
                            title: '提交成功',
                            success() {
                                setTimeout(() => {
                                    that.$u.func.globalNavigator("", "navBack")
                                    uni.navigateBack()
                                    // that.$u.func.globalNavigator("", "navBack")
                                }, 1000)
                            }
                        })
@@ -416,8 +416,7 @@
                })
            },
            navigatorPage() {
                let url = "/subPackage/bs/views/repairList" + "?title=" + this.title + "&type=" + this.info.type
                this.$u.func.globalNavigator(url, "navTo")
                this.$u.func.globalNavigator('hotelList', "navTo")
            }
        }
    }
subPackage/label/hotelList.vue
New file
@@ -0,0 +1,69 @@
<template>
    <view class="">
             <view class="list">
                 <view class="list-item bgc-ff mb-20"  v-for="(i,k) in list"  :key="k">
                     <view class="item-title flex a-i-c j-c-s-b mb-20">
                         <text class="f-32 fw">{{i.hotelName}}</text>
                         <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
                         <u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag>
                         <u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></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">{{i.createTime}}</text>
                     </view>
                 </view>
             </view>
    </view>
</template>
<script>
    import {getHotelReportingList} from "@/api/reporting/reporting.js"
    export default {
        data(){
            return {
                list:[]
            }
        },
        onLoad(){
            this.getList()
        },
        methods:{
            getList(){
                getHotelReportingList({
                    checkUserId:uni.getStorageSync("userInfo").user_id,
                    page:1,
                    size:20
                }).then(res=>{
                    console.log(res)
                    this.list = res.data.records;
                })
            }
        }
    }
</script>
<style lang="scss">
    page{
        background-color:#F5F5F5;
    }
    .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/label/index.vue
@@ -14,7 +14,7 @@
                    <view class="flex f-d-c ml-40">
                        <text class="f-36">总申请</text>
                        <view class="flex a-i-c">
                            <text class="f-48 c-blue fw mr-6">50</text>
                            <text class="f-48 c-blue fw mr-6">{{count.all}}</text>
                            <text class="f-24 c-99">件</text>
                        </view>
                    </view>
@@ -24,7 +24,7 @@
                    <view class="flex f-d-c ml-40">
                        <text class="f-36">已处理</text>
                        <view class="flex a-i-c">
                            <text class="f-48 c-green fw mr-6">50</text>
                            <text class="f-48 c-green fw mr-6">{{count.processed}}</text>
                            <text class="f-24 c-99">件</text>
                        </view>
                    </view>
@@ -36,12 +36,10 @@
                    <u-icon name="map-fill" color="#AAAAAA"></u-icon>
                    <text class="f-28 c-aa ml-20">当前小区:</text>
                </view>
                <text class="address f-28">{{siteInfo.name}}</text>
            </view>
            
            <view class="nav flex flex-wrap j-c-s-b">
                <view class="nav-item"  v-for="(i,k) in navList"  :key="k"   @click="navTo(i.path,k)">
                    <image class="nav-item-bg" :src="i.bgImg" mode="aspectFill"></image>
                    <view class="nav-item-inner flex f-d-c">
@@ -49,16 +47,16 @@
                        <button class="item-btn"   :style="{backgroundColor:i.background}">立即上报</button>
                    </view>
                </view>
            </view>
        </view>
    </view>
    
</template>
<script>
    import { getReportingCount } from '@/api/reporting/reporting.js'
    export default {
        data(){
            return {
@@ -94,25 +92,32 @@
                        background:"#13C6C7"
                    }
                ],
                siteInfo:{}
                siteInfo:{},
                count:{}
            }
        },
        
        onLoad(){
            this.siteInfo = uni.getStorageSync("siteInfo");
            this.getCount(uni.getStorageSync("siteInfo").id);
        },
        methods:{
            getCount(code){
                  getReportingCount({houseCode:code}).then(res=>{
                      console.log(res);
                      this.count = res.data;
                 })
        },
        
        methods:{
            navTo(path,index){
                let type = 1;
                if(index == 2){
                if(index == 1){
                    type == 1
                }else if (index == 3){
                    type = 2
                }else {
                    type = 3
                }else if(index == 4) {
                    type = 2
                }
                this.$u.func.globalNavigator(`${path}?type=${type}`, "navTo")
                
            }