linwe
2024-08-02 9765c4e6afc9863c9bedc37e7759a53a8bc6a764
三色任务与自查任务
5 files modified
1 files added
202 ■■■■■ changed files
pages.json 10 ●●●●● patch | view | raw | blame | history
subPackage/label/check.vue 8 ●●●●● patch | view | raw | blame | history
subPackage/label/checkList.vue 2 ●●● patch | view | raw | blame | history
subPackage/task/gridWord.vue 162 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/auditSite.vue 12 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/workLog.vue 8 ●●●● patch | view | raw | blame | history
pages.json
@@ -88,7 +88,7 @@
        {
            "path": "pages/myMap/myMap",
            "style": {
                "navigationBarTitleText": "地图",
                "navigationBarTitleText": "周边",
                "enablePullDownRefresh": false
            }
        }
@@ -448,6 +448,14 @@
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path" : "gridWord",
                    "style" :
                    {
                        "navigationBarTitleText" : "",
                        "enablePullDownRefresh" : false
                    }
                }
            ]
        },
subPackage/label/check.vue
@@ -111,6 +111,7 @@
                    images: []
                },
                info: {
                    id: '',
                    remark: "",
                    imageUrls: "",
                    signaturePath: ""
@@ -165,9 +166,10 @@
                this.info.houseCode = uni.getStorageSync("siteInfo").houseCode;
                this.info.placeName = uni.getStorageSync("siteInfo").name;
            }
            if (option.id) {
                this.info.taskId = option.id
                this.getDetail(option.id)
            }
        },
        methods: {
subPackage/label/checkList.vue
@@ -6,7 +6,7 @@
                    <text class="f-32 fw">消防自查</text>
                    <!--     <text class="f-32 fw" v-if="i.eventType == 3">二手车交易</text>
                    <text class="f-32 fw" v-if="i.eventType == 2">二手手机维修</text> -->
                    <u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 4" text="待提交" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
subPackage/task/gridWord.vue
New file
@@ -0,0 +1,162 @@
<template>
    <view>
        <!-- <view class="tab">
            <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
                :activeStyle="{color:'#017BFC'}"></u-tabs>
        </view> -->
        <view class="list">
            <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i)">
                <view class="item-title flex a-i-c j-c-s-b mb-20">
                    <text class="f-32 fw">{{i.name}}</text>
                    <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 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 class="item-row flex a-i-c j-c-s-b">
                    <text class="f-28">地址</text>
                    <text class="address f-28 c-66">{{i.address}}</text>
                </view>
            </view>
        </view>
        <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
    </view>
</template>
<script>
    import {
        getAuditReportingList,
        getWorkLogList
    } from "@/api/workLog/workLog"
    export default {
        data() {
            return {
                tabList: [{
                    name: "待走访",
                    status: 1
                }],
                tabIndex: 0,
                currentStatus: 1,
                list: [],
                loadingStatus: 'nomore',
                currentPage: 1,
                frequency: '',
            }
        },
        onLoad(option) {
            if (option.type == 1) {
                uni.setNavigationBarTitle({
                    title: "一次性"
                })
                this.frequency = 1
            }
            if (option.type == 2) {
                uni.setNavigationBarTitle({
                    title: "周期性"
                })
                this.frequency = 2
            }
            this.getList()
        },
        onReachBottom() {
            this.currentPage++
            this.getList()
        },
        methods: {
            changeTab(e) {
                this.tabIndex = e.index;
                this.currentStatus = e.status;
                this.list = [];
                this.currentPage = 1;
                this.getList();
            },
            getList() {
                getWorkLogList({
                    current: this.currentPage,
                    size: 20,
                    status: 1,
                    source: 2,
                    // frequency: this.frequency,
                }).then(res => {
                    if (res.code != 200) {
                        uni.showToast({
                            title: '数据请求失败',
                            icon: 'error'
                        })
                        return
                    }
                    let records = res.data.records;
                    this.list = [...this.list, ...records]
                    this.loadingStatus = 'nomore'
                })
            },
            navTo(item) {
                this.$u.func.globalNavigator(`/subPackage/workbench/views/workLog?id=${item.id}`)
                // if (name == "旅馆安全") {
                //     this.$u.func.globalNavigator(`/subPackage/workbench/views/hotelReportDetail?id=${id}`)
                // } else if (name == "取保候审") {
                //     this.$u.func.globalNavigator(`/subPackage/workbench/views/bailReportDetail?id=${id}`)
                // } else if (name == "校园安全自查") {
                //     this.$u.func.globalNavigator(`/subPackage/workbench/views/schoolReportDetail?id=${id}`)
                // } else {
                //     this.$u.func.globalNavigator(`/subPackage/workbench/views/labelReportDetail?id=${id}`)
                // }
            }
        }
    }
</script>
<style lang="scss">
    page {
        background-color: #F5F5F5;
    }
    .tab {
        width: 100%;
        height: 88rpx;
        position: fixed;
        /*#ifdef H5*/
        top: 88rpx;
        /*#endif*/
        /*#ifdef MP-WEIXIN*/
        top: 0;
        /*#endif*/
        left: 0;
        background-color: #fff;
        padding: 0 30rpx;
        box-sizing: border-box;
        z-index: 999;
    }
    .tab /deep/.u-tabs__wrapper__nav__item {
        flex: 1;
    }
    .list {
        margin: 8rpx 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/auditSite.vue
@@ -196,8 +196,12 @@
                        this.navToDetail(reportType, id, type)
                    } else {
                        if (uni.getStorageSync("activeRole").roleName == "民警") {
                            console.log("***********************1******************************")
                            this.navToDetail(reportType, id, type)
                        } else {
                            console.log("*****************************************************")
                            this.navToEdit(reportType, id, type);
                        }
                    }
@@ -207,6 +211,8 @@
            },
            navToEdit(reportType, id, type) {
                console.log("****************2*************************************")
                // if (reportType == 1) {
                //     this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
                // } else if (reportType == 2 || type == 7) {
@@ -223,6 +229,12 @@
                    this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`)
                } else if (reportType == 5) {
                    this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
                } else if (reportType == 7) {
                    console.log("**************************3***************************")
                    this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}&id=${id}`)
                    // uni.navigateTo({
                    //     url: '/subPackage/label/check?id=' + id
                    // })
                }
            },
subPackage/workbench/views/workLog.vue
@@ -2,7 +2,7 @@
    <view>
        <view class="content bgc-ff">
            <view class="top item flex j-c-s-b a-i-c" @click="onScan()" v-if="!currentId">
            <view class="top item flex j-c-s-b a-i-c" @click="onScan()">
                <view class="flex a-i-c">
                    <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
                    <text class="f-28 ml-10">扫码获取信息</text>
@@ -96,7 +96,7 @@
        <button class="list-btn" @click="navToRecord">走访记录</button>
        <u-popup :show="isShowPopup" mode="bottom" :round="10" closeable="true" @close="isShowPopup = false">
        <u-popup :show="isShowPopup" mode="bottom" :round="10" :closeable="true" @close="isShowPopup = false">
            <view class="popup-content">
                <view class="popup-title f-30">
                    选择居民
@@ -297,8 +297,8 @@
                        // this.info.householdId = data.householdId;
                        // this.info.personType = data.personType;
                        console.log(typeof data.personType)
                        this.labelIndex = this.$getIndex(this.labelList[0], data.personType, "id", "name").index;
                        this.labelName = this.$getIndex(this.labelList[0], data.personType, "id", "name").name;
                        // this.labelIndex = this.$getIndex(this.labelList[0], data.personType, "id", "name").index;
                        // this.labelName = this.$getIndex(this.labelList[0], data.personType, "id", "name").name;
                        this.getHouseholdList();
                        this.getHousehold(data.householdId);
                        this.form.images = this.$setImageUrl(data.url, 2);