Lou
2024-04-25 fa2f2580c2338938be1425f7efc431547d4c9e60
更新
4 files modified
245 ■■■■■ changed files
subPackage/school/security.vue 141 ●●●● patch | view | raw | blame | history
subPackage/school/securityDetail.vue 53 ●●●● patch | view | raw | blame | history
subPackage/school/securityReform.vue 50 ●●●●● patch | view | raw | blame | history
subPackage/school/trouble.vue 1 ●●●● patch | view | raw | blame | history
subPackage/school/security.vue
@@ -1,13 +1,13 @@
<template>
    <view class="wrap">
        <!-- <view class="info-row flex j-c-s-b a-i-c" @click="isShowPopup = true">
        <view class="info-row flex j-c-s-b a-i-c bgc-ff" @click="isShowPopup = true">
            <text class="f-28">场所名称</text>
            <view class="flex">
                <text class="mr-10">{{selectedPlace.placeName}}</text>
                <u-icon name="arrow-right"></u-icon>
            </view>
        </view> -->
        </view>
        <view class="section mb-20">
            <u-collapse :value="itemIndex" ref="collapse">
@@ -19,12 +19,12 @@
                            </view>
                            <u-form-item labelWidth="90" prop="gateStatus">
                                <view class="btn-group flex">
                                    <view class="value-item" :class="i.state == 0?'active bgc-main c-ff':''"
                                        @click="changeStatus(0,i,index,k)">
                                        是
                                    </view>
                                    <view class="value-item" :class="i.state == 1?'active bgc-main c-ff':''"
                                        @click="changeStatus(1,i,index,k)">
                                        是
                                    </view>
                                    <view class="value-item" :class="i.state == 0?'active bgc-main c-ff':''"
                                        @click="changeStatus(0,i,index,k)">
                                        否
                                    </view>
                                </view>
@@ -125,7 +125,8 @@
<script>
    import uploadMixin from "@/mixin/uploadMixinPlace";
    import {
        getPlaceCheckItem
        getPlaceCheckItem,
        getLocationRecord
    } from "@/api/place/place.js"
    import {
@@ -184,8 +185,8 @@
                dangerCount: 0, //隐患项数量
                isEdit: false,
                isShowPopup: false,
                selectedPlace: {}
                selectedPlace: {},
                placeList: [],
            }
        },
        async onLoad(option) {
@@ -195,10 +196,11 @@
                this.getDetail(option.taskId)
            } else {
                this.info.houseCode = "d8460d16ec5a40ccbfe64ba65d34159c7427";
                this.info.placeName = "塔水小学"
                this.info.placeName = "校学小学场所"
                // this.info.houseCode = uni.getStorageSync("siteInfo").houseCode;
                // this.info.placeName = uni.getStorageSync("siteInfo").name;
            }
            this.getPlaceList();
            // if (option.houseCode) {
            //     this.info.houseCode = option.houseCode;
            // }
@@ -206,6 +208,20 @@
        },
        methods: {
            getPlaceList() {
                getLocationRecord({
                    roleName: uni.getStorageSync('activeRole').roleName,
                    current: 1,
                    size: 10,
                    isPerfect: 2,
                    placeName: this.placeName,
                    isNine: 1
                }).then(res => {
                    this.placeList = res.data.records;
                })
            },
            getDetail(id) {
                getPlaceCheckDetail({
@@ -295,7 +311,7 @@
                                // remark: this.questionList[i].children[k].remark || "",
                                type: 3
                            })
                            if (this.questionList[i].children[k].state == 1) {
                            if (this.questionList[i].children[k].state == 0) {
                                count += 1;
                            }
                        }
@@ -411,38 +427,38 @@
                    })
                    this.info.rectificationNoticeImgUrl = urls.join(",")
                }
                if (this.getSelected().length < this.count) {
                    this.$showTips("还未完善");
                    return;
                }
                this.info.taskPlaceRecordVOList = this.getSelected()
                if (this.dangerCount == 0) {
                    this.info.status = 2;
                    if (!this.form.images.length) {
                        this.$showTips("请上传整改文件");
                        return;
                    }
                    if (!this.info.rectificationEndTime) {
                        this.$showTips("请选择整改时间");
                        return;
                    }
                }
                this.info.type = 2;
                if (this.isEdit) {
                    auditPlaceCheck(this.info).then(res => {
                        uni.hideLoading();
                        uni.showToast({
                            icon: 'success',
                            title: '提交成功',
                            success() {
                                setTimeout(() => {
                                    uni.navigateBack();
                                }, 300)
                            }
                        })
                savePlaceCheck(this.info).then(res => {
                    uni.hideLoading();
                    uni.showToast({
                        icon: 'success',
                        title: '提交成功',
                        success() {
                            setTimeout(() => {
                                uni.navigateBack();
                            }, 300)
                        }
                    })
                } else {
                    savePlaceCheck(this.info).then(res => {
                        uni.hideLoading();
                        uni.showToast({
                            icon: 'success',
                            title: '提交成功',
                            success() {
                                setTimeout(() => {
                                    uni.navigateBack();
                                }, 300)
                            }
                        })
                    })
                }
                })
            },
            previewImg() {
@@ -463,6 +479,24 @@
                })
            },
            searchPlace() {
                this.getPlaceList()
            },
            clearKeyword() {
                this.placeName = ""
                this.getPlaceList()
            },
            selectPlace(item) {
                this.selectedPlace = item;
                this.info.houseCode = item.houseCode;
                this.isShowPopup = false;
            },
        }
    }
</script>
@@ -478,6 +512,11 @@
            margin: 20rpx 20rpx 0;
            background-color: #fff;
        }
    }
    .info-row {
        margin: 20rpx 20rpx 0;
        padding: 20rpx;
    }
    .top {
@@ -638,4 +677,32 @@
        color: #fff;
        margin-top: 50rpx;
    }
    .popup-content {
        width: 100%;
        padding: 0 30rpx 30rpx;
        box-sizing: border-box;
        .popup-title {
            padding: 30rpx 0;
            text-align: center;
            font-weight: bold;
        }
        .popup-list {
            height: 650rpx;
        }
        .popup-list-item {
            padding: 20rpx 0;
            border-bottom: 1px solid #f1f1f1;
            position: relative;
        }
        .check-icon {
            position: absolute;
            right: 20rpx;
            top: 20rpx;
        }
    }
</style>
subPackage/school/securityDetail.vue
@@ -59,7 +59,9 @@
            <block v-if="info.rectificationFlag == 1">
                <text>未整改完成</text>
            </block>
            <block v-if="info.rectificationFlag == 3">
                <text>无需整改</text>
            </block>
        </view>
        <view class="item-row flex j-c-s-b a-i-c" v-if="info.status == 3 && info.reasonFailure">
            <text>驳回原因</text>
@@ -68,7 +70,7 @@
        <view class="image-wrap bgc-ff" v-if="images.length">
            <view class="mb-20">
                图片
                整改文件
            </view>
            <view class="flex flex-wrap">
                <view class="image-item" v-for="(i,k) in images" @click="previewImage(images,i)">
@@ -81,14 +83,14 @@
            <block v-for="(item,index) in itemList">
                <block v-for="(i,k) in item.children">
                    <block v-for="(n,m) in info.taskPlaceRecordVOList">
                        <view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId && n.state == 1">
                        <view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId && n.state == 0">
                            <text class="item-left fw">{{item.title}}</text>
                            <!-- <text>不存在</text> -->
                        </view>
                        <u-collapse :value="ids" v-if="i.id == n.itemId && n.state == 1" ref="collapse">
                        <u-collapse :value="ids" v-if="i.id == n.itemId && n.state == 0" ref="collapse">
                            <u-collapse-item :name="n.itemId" :title="i.title" value="否" :disabled="true"
                                :clickable="false" :isLink="false">
                                <view class="mb-20" v-if="n.imageUrls">
                                <!-- <view class="mb-20" v-if="n.imageUrls">
                                    <view class="f-26 mb-10 c-00">整改照片</view>
                                    <view class="flex flex-wrap">
                                        <view class="mr-20" v-for="r in ($setImageUrl(n.imageUrls))">
@@ -103,9 +105,9 @@
                                    <view class="f-28 c-00">
                                        {{n.remark}}
                                    </view>
                                </view>
                                </view> -->
                                <!-- <view class="mb-20" v-if="roleType == 2 || (roleType == 1 && n.rectificationImageUrls)">
                                <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"
@@ -125,14 +127,14 @@
                                                @click="previewImage($setImageUrl(n.rectificationImageUrls),i)"></u-image>
                                        </view>
                                    </view>
                                </view> -->
                                </view>
                                <!--     <view class="" v-if="roleType == 2 || (roleType == 1 && n.rectificationRemark)">
                                <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> -->
                                </view>
                            </u-collapse-item>
                        </u-collapse>
                    </block>
@@ -146,7 +148,8 @@
            <audit-action v-if="roleType == 1 && info.status == 1" @handle="submitAudit" />
        </block>
        <block v-if="info.rectificationFlag == 1">
            <footer-btn v-if="roleType == 2 &&( info.status == 3  || info.status == 1)" text="重新提交" @click="navTo" />
            <footer-btn v-if="roleType == 2 &&( info.status == 3  || info.status == 1)" text="提交"
                @click="submitInfo()" />
        </block>
    </view>
</template>
@@ -229,13 +232,13 @@
                    }
                    let ids = [];
                    for (let i of data.taskPlaceRecordVOList) {
                        // if ((data.status == 4 || data.status == 3) && this.roleType == 2) {
                        //     if (i.rectificationImageUrls) {
                        //         i.urls = this.$setImageUrl(i.rectificationImageUrls, 2);
                        //     } else {
                        //         i.urls = [];
                        //     }
                        // }
                        if ((data.status == 4 || data.status == 3) && this.roleType == 2) {
                            if (i.rectificationImageUrls) {
                                i.urls = this.$setImageUrl(i.rectificationImageUrls, 2);
                            } else {
                                i.urls = [];
                            }
                        }
                        if (i.state == 0) {
                            ids.push(i.itemId)
                        }
@@ -327,14 +330,12 @@
                if (data.status == 4) {
                    data.status = 1;
                }
                addPlaceCheckReform(data).then(res => {
                    uni.hideLoading()
                    if (res.code == 200) {
                        this.$showTips("操作成功", "success");
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 300)
                    }
                auditPlaceCheck(this.info).then(res => {
                    uni.hideLoading();
                    this.$showTips("操作成功", "success");
                    setTimeout(() => {
                        uni.navigateBack()
                    }, 300)
                })
            },
subPackage/school/securityReform.vue
@@ -53,9 +53,8 @@
            </u-collapse>
        </view>
        <view class="content bgc-ff" v-if="dangerCount > 0">
        <!-- <view class="content bgc-ff" v-if="dangerCount > 0">
            <view class="upload ">
                <!-- <view class="f-28 mb-20">其它隐患问题</view> -->
                <view class="flex j-c-s-b a-i-c" @click="showSelectDate = true">
                    <view class="f-28">整改截止时间</view>
                    <view class="flex a-i-c">
@@ -75,7 +74,7 @@
                    </u-upload>
                </view>
            </view>
        </view>
        </view> -->
        <!-- <footer-btn @click="sumitInfo"></footer-btn> -->
@@ -408,36 +407,29 @@
                    })
                    this.info.rectificationNoticeImgUrl = urls.join(",")
                }
                if (!this.getSelected().length < this.count) {
                    this.$showTips("还未完善");
                    return;
                }
                this.info.taskPlaceRecordVOList = this.getSelected()
                this.info.status = 1;
                this.info.type = 2;
                if (this.isEdit) {
                    auditPlaceCheck(this.info).then(res => {
                        uni.hideLoading();
                        uni.showToast({
                            icon: 'success',
                            title: '提交成功',
                            success() {
                                setTimeout(() => {
                                    uni.navigateBack();
                                }, 300)
                            }
                        })
                auditPlaceCheck(this.info).then(res => {
                    uni.hideLoading();
                    uni.showToast({
                        icon: 'success',
                        title: '提交成功',
                        success() {
                            setTimeout(() => {
                                uni.navigateBack();
                            }, 300)
                        }
                    })
                } else {
                    savePlaceCheck(this.info).then(res => {
                        uni.hideLoading();
                        uni.showToast({
                            icon: 'success',
                            title: '提交成功',
                            success() {
                                setTimeout(() => {
                                    uni.navigateBack();
                                }, 300)
                            }
                        })
                    })
                }
                })
            },
            previewImg() {
subPackage/school/trouble.vue
@@ -133,6 +133,7 @@
                            urls.push(e.name)
                        })
                        this.info.images = urls.join(",")
                        this.info.houseCode = uni.getStorageSync("siteInfo").houseCode;
                    }
                    addTroubleReport(this.info).then(res => {
                        this.$showTips("提交成功", "success")