linwe
2024-07-17 505c20d5f4d0901eb5f38c737f3c785a300647d7
代码优化
8 files modified
2 files added
399 ■■■■ changed files
pages/circle/index.vue 17 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 11 ●●●● patch | view | raw | blame | history
static/icon/ehjb.png patch | view | raw | blame | history
subPackage/counterfraud/add.vue 16 ●●●● patch | view | raw | blame | history
subPackage/school/troubleDetail.vue 8 ●●●● patch | view | raw | blame | history
subPackage/task/index.vue 13 ●●●●● patch | view | raw | blame | history
subPackage/workbench/components/actionBtn.vue 5 ●●●●● patch | view | raw | blame | history
subPackage/workbench/components/actionBtnTwo.vue 270 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/counterfraudReportDetail.vue 57 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/labelReportDetail.vue 2 ●●●●● patch | view | raw | blame | history
pages/circle/index.vue
@@ -141,7 +141,6 @@
            if (role.roleName == "居民") {
                this.roleType = 0
            } else {
                this.roleType = 1;
            }
@@ -318,36 +317,42 @@
                })
            },
            linkTo(item) {
                // 报事报修
                if (item.evenType == 1) {
                    uni.navigateTo({
                        url: `/subPackage/workbench/views/reportDetail?id=${item.eventId}&from=circle`
                    })
                }
                // E呼即办
                if (item.evenType == 2) {
                    uni.navigateTo({
                        url: `/subPackage/workbench/views/eCallReportDetail?id=${item.eventId}&from=circle`
                    })
                }
                // E呼即办2
                if (item.evenType == 3) {
                    uni.navigateTo({
                        url: `/subPackage/ecall/detail?id=${item.eventId}&types=circle`
                    })
                }
                // 校园
                if (item.evenType == 4) {
                    // subPackage/school/troubleDetail?id=1811233007500054530
                    uni.navigateTo({
                        url: `/subPackage/school/troubleDetail?id=${item.eventId}&disable=true`
                    })
                }
                // 二手交易
                if (item.evenType == 5) {
                    // subPackage/workbench/views/labelReportDetail?id=1805127669027196929
                    uni.navigateTo({
                        url: `/subPackage/workbench/views/labelReportDetail?id=${item.eventId}&disable=true`
                    })
                }
                // 无诈
                if (item.evenType == 6) {
                    uni.navigateTo({
                        url: `/subPackage/workbench/views/counterfraudReportDetail?id=${item.eventId}&roleType=3`
                    })
                }
            }
        }
    }
pages/home/index.vue
@@ -918,9 +918,14 @@
                }).then(res => {
                    let data = res.data;
                    let count = 0;
                    count += Number(data.bqsj) + Number(data.xfzc) + Number(data.xfyhzg) + Number(data.qbhs) +
                        Number(data.cssh) + Number(data.czsh) + Number(data.jzzsq) + Number(data.wztj) + Number(
                            data.xyaqjc) + Number(data.xyjfmd) + Number(data.xyyh);
                    if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
                        count += Number(data.bqsj) + Number(data.xfzc) + Number(data.xfyhzg) +
                            Number(data.cssh) + Number(data.czsh);
                    } else {
                        count += Number(data.bsbx) + Number(data.bqsj) + Number(data.xfzc) + Number(data.xfyhzg) +
                            Number(data.qbhs) + Number(data.jzzsq) + Number(data.wztj) + Number(data.cyrysh) +
                            Number(data.xyyh) + Number(data.xyaqjc) + Number(data.xyjfmd);
                    }
                    this.taskCount = count
                })
            },
static/icon/ehjb.png
subPackage/counterfraud/add.vue
@@ -539,14 +539,14 @@
                            this.$showTips("请完善宣防对象信息")
                            return;
                        }
                        if (!i.telephone) {
                            this.$showTips("请完善宣防对象信息")
                            return;
                        }
                        if (!i.idCard) {
                            this.$showTips("请完善宣防对象信息")
                            return;
                        }
                        // if (!i.telephone) {
                        //     this.$showTips("请完善宣防对象信息")
                        //     return;
                        // }
                        // if (!i.idCard) {
                        //     this.$showTips("请完善宣防对象信息")
                        //     return;
                        // }
                    }
                }
                if (this.isEdit) {
subPackage/school/troubleDetail.vue
@@ -151,10 +151,9 @@
        <!-- <footer-btn v-if="roleType == 2 && info.confirmFlag == 1 && roleTypeName == 'mj'" text="确定"
            @click="submitInfo" /> -->
        <view class="footer flex a-i-c j-c-s-b"
            v-if="roleType == 2 && info.confirmFlag == 1 && roleTypeName == 'mj' && !disable">
            <button class="footer-btn" @click="submitInfo">处置</button>
            <button class="footer-btn" @click="submit(2)">共享</button>
        <view class="footer flex a-i-c j-c-s-b" v-if="roleType == 2  && roleTypeName == 'mj' && !disable">
            <button v-if="info.confirmFlag == 1" class="footer-btn" @click="submitInfo">处置</button>
            <button v-if="info.confirmFlag == 2" class="footer-btn" @click="submit(2)">共享</button>
        </view>
@@ -210,6 +209,7 @@
        data() {
            return {
                disable: false,
                radiovalue1: 0,
                show: false,
                info: {},
                roleType: 1,
subPackage/task/index.vue
@@ -244,13 +244,18 @@
                                i.count = data.jzzsq;
                            } else if (i.name.trim() == "从业人员审核") {
                                i.count = data.cyrysh;
                            } else if (i.name.trim() == "无诈申请") {
                            } else if (i.name.trim() == "无诈上报") {
                                i.count = data.wztj;
                            } else if (i.name.trim() == "校园安全隐患排查") {
                            } else {
                                i.count = data.qbhs;
                            }
                        }
                        for (let i of this.schoolList) {
                            if (i.name.trim() == "安全隐患上报") {
                                i.count = data.xyyh;
                            } else if (i.name.trim() == "校园纠纷矛盾") {
                            } else if (i.name.trim() == "纠纷矛盾上报") {
                                i.count = data.xyjfmd;
                            } else if (i.name.trim() == "校园安全检查") {
                            } else if (i.name.trim() == "校园安保管理") {
                                i.count = data.xyaqjc;
                            } else {
                                i.count = data.qbhs;
subPackage/workbench/components/actionBtn.vue
@@ -27,9 +27,7 @@
                            @change="radioChange">
                        </u-radio>
                    </view>
                </u-radio-group>
                <view class="popup-btn flex a-i-c j-c-s-b">
                    <button class="popup-btn-item" @click="pushCircle">确认</button>
                </view>
@@ -76,6 +74,7 @@
                houseCode: '',
                dataItem: {},
                placeList: [],
                radiovalue1: 0,
                // 基本案列数据
                radiolist1: [{
                        name: '邻里圈',
@@ -126,7 +125,7 @@
            },
            submitTwo(type) {
                console.log("*****111*******", JSON.stringify(this.dataItem))
                // console.log("*****111*******", JSON.stringify(this.dataItem))
                this.isShowModalTwo = true
            },
subPackage/workbench/components/actionBtnTwo.vue
New file
@@ -0,0 +1,270 @@
<template>
    <view class="">
        <view class="footer flex a-i-c j-c-s-b">
            <button v-if="dataItem.type === 1 && dataItem.status === 1" class="footer-btn"
                @click="submit(2)">通过</button>
            <button v-if="dataItem.type === 2 && dataItem.status === 1" class="footer-btn"
                @click="submitTwo(2)">通过</button>
            <button class="footer-btn" v-if="(dataItem.status === 1 || dataItem.confirmFlag === 1)"
                @click="open()">驳回</button>
            <button class="footer-btn" v-if="dataItem.status === 2" @click="show = true">共享</button>
        </view>
        <u-modal :show="isShowModal" title="备注" :showConfirmButton="false" :closeOnClickOverlay="true" @click="close">
            <view class="modal-content">
                <u-textarea v-model="remark" placeholder="请输入驳回原因"></u-textarea>
                <view class="modal-btn flex j-c-s-b a-i-c" slot="confirmButton">
                    <button class="modal-btn-item c-main f-30" @click="isShowModal = false">取消</button>
                    <button class="modal-btn-item bgc-main f-30 c-ff" @click="submit(3)">确定</button>
                </view>
            </view>
        </u-modal>
        <u-popup :show="show" mode="bottom" @close="close" :round="10" :closeable="true">
            <view class="popup-title">
                共享
            </view>
            <view style="margin-top: 20rpx 0rpx;" class="popup-content">
                <u-radio-group v-model="radiovalue1" @change="groupChange" iconPlacement="right" placement="column">
                    <view v-for="(item, index) in radiolist1" style="padding:10rpx 0;">
                        <u-radio :customStyle="{marginBottom: '8px'}" :key="index" :label="item.name" :name="item.id"
                            @change="radioChange">
                        </u-radio>
                    </view>
                </u-radio-group>
                <view class="popup-btn flex a-i-c j-c-s-b">
                    <button class="popup-btn-item" @click="pushCircle">确认</button>
                </view>
            </view>
        </u-popup>
        <u-modal :show="isShowModalTwo" title="备注" :showConfirmButton="false">
            <view class="modal-content">
                <u-search placeholder="请输入场所名称" :clearabled="true" @blur="searchPlace()" v-model="placeName"></u-search>
                <u-radio-group v-model="houseCode" placement="column" @change="groupChange">
                    <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in placeList" :key="index"
                        :label="item.placeName +'----场所地址:'+item.location" :name="item.houseCode" @change="radioChange">
                    </u-radio>
                </u-radio-group>
                <view class="modal-btn flex j-c-s-b a-i-c" slot="confirmButton">
                    <button class="modal-btn-item c-main f-30" @click="isShowModalTwo = false">取消</button>
                    <button class="modal-btn-item bgc-main f-30 c-ff" @click="submit(2)">确定</button>
                </view>
            </view>
        </u-modal>
    </view>
</template>
<script>
    import {
        getLocationRecord
    } from "@/api/place/place";
    import {
        handlePublish
    } from '@/api/circle/circle.js'
    export default {
        name: "auditAction",
        data() {
            return {
                isShowModal: false,
                isShowModalTwo: false,
                show: false,
                remark: "",
                placeName: '',
                houseCode: '',
                dataItem: {},
                placeList: [],
                radiovalue1: 0,
                // 基本案列数据
                radiolist1: [{
                        name: '邻里圈',
                        disabled: false,
                        id: 0
                    },
                    {
                        name: '协同圈',
                        disabled: false,
                        id: 1
                    }
                ],
            }
        },
        props: ['dataItem'],
        computed() {
            console.log("*********1******", dataItem)
        },
        methods: {
            pushCircle() {
                handlePublish({
                    houseCode: this.dataItem.houseCode,
                    eventId: this.dataItem.id,
                    // 无诈
                    evenType: 6,
                    circleType: this.radiovalue1,
                    circleText: this.dataItem.placeName,
                    circleImages: this.dataItem.images
                }).then(res => {
                    this.$showTips("操作成功", "success")
                    this.close()
                    // this.$set(this.peopleList, 1, res.data);
                })
            },
            groupChange(n) {
                this.houseCode = n
                console.log('groupChange', n);
            },
            radioChange(n) {
                console.log('radioChange', n);
            },
            open() {
                this.isShowModal = true;
            },
            close() {
                this.show = false
                this.isShowModal = false;
            },
            submitTwo(type) {
                // console.log("*****111*******", JSON.stringify(this.dataItem))
                this.isShowModalTwo = true
            },
            searchPlace() {
                if (!this.placeName) {
                    return
                }
                getLocationRecord({
                    roleName: 'admin',
                    current: 1,
                    size: 30,
                    isPerfect: 2,
                    placeName: this.placeName,
                    isNine: 1
                }).then(res => {
                    this.placeList = res.data.records;
                    this.placeList.forEach(item => {
                        item.isSelect = false
                    })
                })
            },
            submit(type) {
                let data = {
                    type,
                    remark: this.remark,
                    houseCode: this.houseCode
                }
                if (type == 3 && !this.remark) {
                    uni.showToast({
                        title: "请输入驳回原因",
                        icon: "none"
                    })
                    return
                }
                this.$emit("handle", data)
                if (type == 3) {
                    this.close()
                }
            }
        }
    }
</script>
<style lang="scss" scoped>
    .footer {
        width: 100%;
        padding: 20rpx 30rpx;
        box-sizing: border-box;
        position: fixed;
        bottom: 0;
        left: 0;
        background-color: #fff;
        z-index: 10;
        padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
        z-index: 999;
        background-color: #fff;
        box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
        .footer-btn {
            width: 200rpx;
            height: 78rpx;
            border-radius: 8rpx;
            font-size: 32rpx;
            color: #fff;
            border: none;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
        }
        .footer-btn:after {
            border: none;
        }
    }
    .modal-content {
        width: 100%;
        .modal-btn {
            width: 100%;
            padding: 40rpx 0 0;
            .modal-btn-item {
                width: 240rpx;
                height: 74rpx;
                line-height: 74rpx;
                border-radius: 35rpx;
                border: none;
                padding: 0;
                margin: 0;
            }
            .modal-btn-item:first-child {
                border: 1px solid currentColor;
                background: transparent;
            }
        }
    }
    .popup-title {
        padding: 20rpx 0;
        text-align: center;
    }
    .popup-content {
        padding: 20rpx;
    }
    .popup-btn {
        padding: 20rpx;
        .popup-btn-item {
            width: 100%;
            height: 78rpx;
            line-height: 78rpx;
            border-radius: 36rpx;
            color: #fff;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
            font-size: 28rpx;
        }
        .popup-btn-item:after {
            border: none;
        }
    }
    /deep/ .u-modal__content {
        padding-bottom: 20rpx !important;
    }
</style>
subPackage/workbench/views/counterfraudReportDetail.vue
@@ -60,45 +60,6 @@
                                        </view>
                                    </view>
                                </view>
                                <!-- <view class="mb-20" v-if="n.remark">
                                    <view class="f-26 mb-10 c-00">描述</view>
                                    <view class="f-28 c-00">
                                        {{n.remark}}
                                    </view>
                                </view> -->
                                <!-- <view class="mb-20" v-if="roleType == 2 || (roleType == 1 && n.rectificationImageUrls)">
                                    <view class="f-26 mb-10 c-00">整改后照片</view>
                                    <u-upload v-if="roleType == 2 && (info.status == 4 || info.status == 3)"
                                        :fileList="n.urls" :previewFullImage="uploadConfig.previewFullImage"
                                        :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                                        :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
                                        @afterRead="afterReadImgs($event,n,m)" @delete="deleteImages($event,m)">
                                        <view class="upload-item upload-icon flex_base">
                                            <u-icon name="/static/icon/upload.png" width="60rpx"
                                                height="60rpx"></u-icon>
                                        </view>
                                    </u-upload>
                                    <view class="flex flex-wrap" v-if="info.status != 4 &&  n.rectificationImageUrls ">
                                        <view class="mr-20" v-for="r in ($setImageUrl(n.rectificationImageUrls))">
                                            <u-image :src="r" width="140rpx" height="140rpx"
                                                @click="previewImage($setImageUrl(n.rectificationImageUrls),i)"></u-image>
                                        </view>
                                    </view>
                                </view> -->
                                <!--     <view class="" v-if="roleType == 2 || (roleType == 1 && n.rectificationRemark)">
                                    <view class="f-26 mb-10 c-00">整改后描述</view>
                                    <u-textarea v-model="n.rectificationRemark" placeholder="请输入整改后描述"
                                        placeholderClass="c-99 f-26"
                                        :disabled="roleType == 2 && (info.status == 4 || info.status == 3)?false:true"></u-textarea>
                                </view> -->
                            </u-collapse-item>
                        </u-collapse>
                    </block>
@@ -108,7 +69,7 @@
        <view class="blank"></view>
        <!-- <footer-btn @click="submitInfo" v-if="roleType == 2 && (info.status == 4 || info.status == 3)"     /> -->
        <audit-action :dataItem="info" v-if="roleType == 1 && info.status == 1" @handle="submitAudit" />
        <actionBtnTwo :dataItem="info" v-if="roleType == 1" @handle="submitAudit" />
        <footer-btn v-if="roleType == 2 && info.status == 3" text="重新提交" @click="navTo" />
    </view>
</template>
@@ -130,11 +91,11 @@
        getCounterfraudReportDetail,
        auditCounterfraudReport
    } from "@/api/counterfraud/counterfraud.js"
    import auditAction from '../components/actionBtn.vue'
    import actionBtnTwo from '../components/actionBtnTwo.vue'
    export default {
        mixins: [uploadMixin],
        components: {
            auditAction
            actionBtnTwo
        },
        data() {
            return {
@@ -159,6 +120,10 @@
            if (roleName == "民警" || roleName == "系统管理员") {
                this.roleType = 1;
            }
            if (option.roleType) {
                // 不显示按钮
                this.roleType = option.roleType
            }
            await this.getItem();
            this.taskId = option.id;
@@ -179,13 +144,6 @@
                    id: this.id
                }).then(res => {
                    let data = res.data;
                    // this.info = res.data;
                    // this.images = this.$setImageUrl(res.data.imageUrls);
                    // this.signatureUrl = this.$setImageUrl(res.data.signaturePath);
                    // if (res.data.placePoiLabelVOList.length) {
                    //     this.label = res.data.placePoiLabelVOList[res.data.placePoiLabelVOList.length - 1]
                    //         .labelName;
                    // }
                    let ids = [];
                    for (let i of data.taskPlaceRecordVOList) {
                        if ((data.status == 4 || data.status == 3) && this.roleType == 2) {
@@ -309,6 +267,7 @@
                }
                if (val.type == 3) {
                    data.reasonFailure = val.remark;
                    data.remark = val.remark;
                }
                auditCounterfraudReport(data).then(res => {
subPackage/workbench/views/labelReportDetail.vue
@@ -68,6 +68,7 @@
            return {
                info: {
                    type: 1,
                    status: 1,
                },
                basicData: [{
                        label: '物品名称',
@@ -204,6 +205,7 @@
                    this.info.labelName = data.labelName
                    this.info.transactionObject = data.transactionObject
                    this.info.id = this.taskId
                    this.info.status = data.confirmFlag
                    this.info.houseCode = data.houseCode
                    console.log("********0", this.info)
                    this.imageUrls = this.$setImageUrl(data.imageUrls);