| | |
| | | <template> |
| | | <view class="wrap"> |
| | | |
| | | <view class="top item flex j-c-s-b a-i-c bgc-ff" @click="onScan()" v-if="roleName =='mj'"> |
| | | <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> |
| | | </view> |
| | | <u-icon name="arrow-right" size="20"></u-icon> |
| | | </view> |
| | | |
| | | <view class="info-row flex j-c-s-b a-i-c bgc-ff" @click="isShowPopup = true" v-if="!from"> |
| | | <text class="f-28">场所名称</text> |
| | | <text class="f-28">校园名称</text> |
| | | <view class="flex"> |
| | | <text class="mr-10">{{selectedPlace.placeName}}</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | |
| | | <u-form :model="info" ref="form"> |
| | | <block v-for="(i,k) in item.children"> |
| | | <view class="f-30 c-33"> |
| | | {{i.title}} |
| | | <text style="color: red; padding-right: 5rpx;">* </text> {{i.title}} |
| | | </view> |
| | | <u-form-item labelWidth="90" prop="gateStatus"> |
| | | <view class="btn-group flex"> |
| | |
| | | </view> |
| | | </view> |
| | | </u-form-item> |
| | | <!-- <view class="" v-if="i.state == 0"> |
| | | <u-form-item labelWidth="100" label="照片" prop="gateStatus"> |
| | | <u-upload :fileList="i.urls" :previewFullImage="uploadConfig.previewFullImage" |
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" |
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" |
| | | @afterRead="afterReadImgs($event,i,index,k)" |
| | | @delete="deleteImages($event,index,k)"> |
| | | <view class="upload-item upload-icon flex_base"> |
| | | <u-icon name="/static/icon/upload.png" width="60rpx" |
| | | height="60rpx"></u-icon> |
| | | </view> |
| | | </u-upload> |
| | | </u-form-item> |
| | | <u-form-item labelWidth="100" label="描述" prop="gateStatus"> |
| | | <u-textarea v-model="i.remark" placeholder="请输入描述" |
| | | placeholderClass="c-99 f-26"></u-textarea> |
| | | </u-form-item> |
| | | </view> --> |
| | | |
| | | </block> |
| | | </u-form> |
| | | </u-collapse-item> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="mt-20"> |
| | | <view class="f-28 mb-20">整改文件</view> |
| | | <view class="f-28 mb-20"> <text style="color: red;">* </text> 整改文件</view> |
| | | <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage" |
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" |
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg" |
| | |
| | | selectedPlace: {}, |
| | | placeList: [], |
| | | placeName: "", |
| | | from: "" //页面进入来源 |
| | | from: "", //页面进入来源 |
| | | roleName: uni.getStorageSync("activeRole").roleAlias, |
| | | } |
| | | }, |
| | | async onLoad(option) { |
| | |
| | | if (uni.getStorageSync("houseCode")) { |
| | | let houseCode = uni.getStorageSync("houseCode"); |
| | | this.getHouseType(houseCode); |
| | | } else { |
| | | this.info.houseCode = "d8460d16ec5a40ccbfe64ba65d34159c7427"; |
| | | this.info.placeName = "校学小学场所" |
| | | } |
| | | } |
| | | this.getPlaceList(); |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | onScan() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | let obj = this.getUrlParams(res.result); |
| | | this.getHouseType(obj.stdId); |
| | | } |
| | | }) |
| | | }, |
| | | getUrlParams(url) { |
| | | let urlStr = url.split('?')[1] |
| | | let obj = {}; |
| | | let paramsArr = urlStr.split('&') |
| | | for (let i = 0, len = paramsArr.length; i < len; i++) { |
| | | let arr = paramsArr[i].split('=') |
| | | obj[arr[0]] = arr[1]; |
| | | } |
| | | return obj |
| | | }, |
| | | |
| | | getHouseType(code) { |
| | | getQrCodeDetail({ |
| | | roleName: uni.getStorageSync("activeRole").roleName, |
| | | addressCode: code |
| | | }).then(res => { |
| | | let { |
| | | isJur, |
| | | doorplateType, |
| | | addressLevel |
| | | } = res.data; |
| | | if (isJur == 1) { |
| | | if (doorplateType == "中门牌" || doorplateType == "小门牌") { |
| | | this.info.houseCode = code; |
| | | this.info.placeName = res.data.aoiName; |
| | | this.selectedPlace.placeName = res.data.aoiName; |
| | | this.info.location = res.data.addressName; |
| | | this.info.lng = res.data.x; |
| | | this.info.lat = res.data.y; |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示!", |
| | | content: "该区域不是您管辖范围", |
| | | showCancel: false |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | getPlaceList() { |
| | | getLocationRecord({ |
| | | roleName: uni.getStorageSync('activeRole').roleName, |
| | |
| | | |
| | | |
| | | this.info.taskPlaceRecordVOList = this.getSelected() |
| | | if (this.dangerCount == 0) { |
| | | if (this.dangerCount > 0) { |
| | | this.info.status = 2; |
| | | if (!this.form.images.length) { |
| | | this.$showTips("请上传整改文件"); |
| | |
| | | this.info.houseCode = item.houseCode; |
| | | this.isShowPopup = false; |
| | | }, |
| | | |
| | | getHouseType(code) { |
| | | getQrCodeDetail({ |
| | | roleName: uni.getStorageSync("activeRole").roleName, |
| | | addressCode: code |
| | | }).then(res => { |
| | | let { |
| | | isJur, |
| | | doorplateType, |
| | | addressLevel |
| | | } = res.data; |
| | | if (isJur == 1) { |
| | | if (doorplateType == "中门牌" || doorplateType == "小门牌") { |
| | | if (res.data.labelCode == 160102 || res.data.labelCode == 160103) { |
| | | this.info.houseCode = code; |
| | | this.info.placeName = poi; |
| | | this.from = "jump" |
| | | } else { |
| | | this.$showTips("该场所不是校园类型"); |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示!", |
| | | content: "该区域不是您管辖范围", |
| | | showCancel: false |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |