| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | <script> |
| | | import uploadMixin from "@/mixin/uploadMixinPlace"; |
| | | import { |
| | | getPlaceCheckItem |
| | | getPlaceCheckItem, |
| | | getLocationRecord |
| | | } from "@/api/place/place.js" |
| | | |
| | | import { |
| | |
| | | dangerCount: 0, //隐患项数量 |
| | | isEdit: false, |
| | | isShowPopup: false, |
| | | selectedPlace: {} |
| | | |
| | | selectedPlace: {}, |
| | | placeList: [], |
| | | } |
| | | }, |
| | | async onLoad(option) { |
| | |
| | | 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; |
| | | // } |
| | |
| | | }, |
| | | |
| | | 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({ |
| | |
| | | // 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; |
| | | } |
| | | } |
| | |
| | | }) |
| | | 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() { |
| | |
| | | }) |
| | | }, |
| | | |
| | | searchPlace() { |
| | | this.getPlaceList() |
| | | }, |
| | | |
| | | clearKeyword() { |
| | | this.placeName = "" |
| | | this.getPlaceList() |
| | | }, |
| | | |
| | | selectPlace(item) { |
| | | this.selectedPlace = item; |
| | | this.info.houseCode = item.houseCode; |
| | | this.isShowPopup = false; |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | margin: 20rpx 20rpx 0; |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | |
| | | .info-row { |
| | | margin: 20rpx 20rpx 0; |
| | | padding: 20rpx; |
| | | } |
| | | |
| | | .top { |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | |
| | | <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)"> |
| | |
| | | <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))"> |
| | |
| | | <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" |
| | |
| | | @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> |
| | |
| | | <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> |
| | |
| | | } |
| | | 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) |
| | | } |
| | |
| | | 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) |
| | | }) |
| | | }, |
| | | |
| | |
| | | </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"> |
| | |
| | | </u-upload> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <!-- <footer-btn @click="sumitInfo"></footer-btn> --> |
| | | |
| | |
| | | }) |
| | | 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() { |
| | |
| | | urls.push(e.name) |
| | | }) |
| | | this.info.images = urls.join(",") |
| | | this.info.houseCode = uni.getStorageSync("siteInfo").houseCode; |
| | | } |
| | | addTroubleReport(this.info).then(res => { |
| | | this.$showTips("提交成功", "success") |