| | |
| | | <template> |
| | | <view class="wrap"> |
| | | |
| | | |
| | | <view class="info mt-20 bgc-ff" v-if="from == 'home'"> |
| | | <view class="info-row flex j-c-s-b a-i-c" @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> |
| | | |
| | | <block v-if="selectedPlace.houseCode"> |
| | | <view class="info-row flex j-c-s-b a-i-c"> |
| | | <text class="f-28">场所标签</text> |
| | | <text>{{categoryValue}}</text> |
| | | </view> |
| | | <view class="info-row flex j-c-s-b a-i-c"> |
| | | <text class="f-28">九小场所</text> |
| | | <text>{{selectedPlace.isNine == 1?"是":"否"}}</text> |
| | | </view> |
| | | <view class="info-row flex j-c-s-b a-i-c" v-if="selectedPlace.isNine == 1"> |
| | | <text class="f-28">九小场所类型</text> |
| | | <text>{{nineTypeValue}}</text> |
| | | </view> |
| | | <view class="info-row flex j-c-s-b a-i-c"> |
| | | <text class="f-28">场所负责人</text> |
| | | <text>{{selectedPlace.principal}}</text> |
| | | </view> |
| | | <view class="info-row flex j-c-s-b a-i-c"> |
| | | <text class="f-28">手机号</text> |
| | | <text>{{selectedPlace.principalPhone}}</text> |
| | | </view> |
| | | <view class="info-row flex j-c-s-b a-i-c"> |
| | | <text class="f-28">身份证号</text> |
| | | <text>{{selectedPlace.principalIdCard}}</text> |
| | | </view> |
| | | <view class="info-row flex j-c-s-b a-i-c"> |
| | | <text class="f-28">标准地址</text> |
| | | <text class="info-row-right">{{selectedPlace.location}}</text> |
| | | </view> |
| | | </block> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <view class="section mb-20"> |
| | | <u-collapse :value="itemIndex" ref="collapse"> |
| | | <u-collapse-item :title="item.title" :name="index" v-for="(item,index) in questionList"> |
| | |
| | | </view> |
| | | </u-popup> |
| | | |
| | | |
| | | |
| | | <u-popup :show="isShowPopup" mode="bottom" :round="10" closeable="true" @close="isShowPopup = false"> |
| | | <view class="popup-content"> |
| | | <view class="popup-title f-30">选择场所</view> |
| | | <u-search placeholder="请输入场所名称" :showAction="true" actionText="搜索" :animation="true" v-model="placeName" |
| | | @search="searchPlace" @custom="searchPlace" @clear="clearKeyword"></u-search> |
| | | <scroll-view class="popup-list" :scroll-y="true"> |
| | | <view class="popup-list-item" v-for="(i,k) in placeList" :key="k" @click="selectPlace(i)"> |
| | | <view class="flex a-i-c mb-10"> |
| | | <text class="f-28 fw mr-20">{{i.placeName}}</text> |
| | | <text class="f-26" v-if="i.phoneNumber">{{i.phoneNumber}}</text> |
| | | </view> |
| | | <!-- |
| | | <view class="f-28"> |
| | | {{i.townStreetName}}{{i.neiName}}{{i.aoiName}}{{i.address || ""}} |
| | | </view> --> |
| | | <view class="check-icon" v-if="i.houseCode == info.houseCode"> |
| | | <u-icon name="checkbox-mark" color="#017BFC" size="30"></u-icon> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | | <view class="blank"></view> |
| | | </view> |
| | | </template> |
| | |
| | | import uploadMixin from "@/mixin/uploadMixin"; |
| | | import { |
| | | addPlaceCheckTwo, |
| | | getPlaceCheckItem |
| | | getPlaceCheckItem, |
| | | getLocationRecord, |
| | | getPlaceDetail |
| | | } from "@/api/place/place.js" |
| | | import { |
| | | bizDictionary, |
| | | bizDictionaryTree |
| | | } from '@/api/system/dict.js' |
| | | export default { |
| | | mixins: [uploadMixin], |
| | | data() { |
| | |
| | | ], |
| | | time: Number(new Date()), |
| | | showSelectDate: false, |
| | | dangerCount: 0 //隐患项数量 |
| | | dangerCount: 0, //隐患项数量 |
| | | isShowPopup: false, |
| | | placeList: [], |
| | | placeName: "", |
| | | selectedPlace: {}, |
| | | nineTypeValue: "", |
| | | from: "", |
| | | categoryValue: "" |
| | | |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option.code) { |
| | | this.info.houseCode = option.code; |
| | | this.info.placeName = option.name; |
| | | } else { |
| | | this.from = "home" |
| | | this.getPlaceList(); |
| | | } |
| | | |
| | | this.getItem(); |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | getNineTypeList(callback) { |
| | | bizDictionaryTree({ |
| | | code: "nineType" |
| | | }).then(res => { |
| | | console.log(res.data); |
| | | callback(res.data) |
| | | }) |
| | | }, |
| | | |
| | | getPlaceList() { |
| | | getLocationRecord({ |
| | | roleName: uni.getStorageSync('activeRole').roleName, |
| | | current: 1, |
| | | size: 10, |
| | | isPerfect: 2, |
| | | placeName: this.placeName |
| | | }).then(res => { |
| | | this.placeList = res.data.records; |
| | | }) |
| | | }, |
| | | |
| | | |
| | | getPlaceInfo(id) { |
| | | getPlaceDetail({ |
| | | id |
| | | }).then(res => { |
| | | let labelList = res.data.placePoiLabelVOList; |
| | | let tempLabelList = []; |
| | | for (let i of labelList) { //过滤一级数据 |
| | | if (i.type != 1) { |
| | | tempLabelList.push(i) |
| | | } |
| | | } |
| | | this.categoryValue = tempLabelList[1].labelName; |
| | | }) |
| | | }, |
| | | |
| | | |
| | | getItem() { |
| | |
| | | this.count = count; |
| | | this.itemIndex = arr; |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | searchPlace() { |
| | | this.getPlaceList() |
| | | }, |
| | | |
| | | clearKeyword() { |
| | | this.placeName = "" |
| | | this.getPlaceList() |
| | | }, |
| | | |
| | | selectPlace(item) { |
| | | this.selectedPlace = item; |
| | | this.info.houseCode = item.houseCode; |
| | | this.isShowPopup = false; |
| | | this.getPlaceInfo(item.id); |
| | | if (item.isNine == 1) { |
| | | this.getNineTypeList(res => { |
| | | let { |
| | | name |
| | | } = this.$getIndex(res, item.nineType, "key", "title"); |
| | | this.nineTypeValue = name; |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | changeStatus(value, item, fIndex, cIndex) { |
| | |
| | | margin: 20rpx 20rpx 0; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .info { |
| | | margin: 20rpx 20rpx 0; |
| | | padding: 0 40rpx; |
| | | |
| | | .info-row { |
| | | padding: 20rpx 0; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | |
| | | } |
| | | |
| | | .info-row:last-child { |
| | | border: none; |
| | | } |
| | | |
| | | .info-row-right { |
| | | width: 70%; |
| | | text-align: right; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .top { |
| | |
| | | width: 100%; |
| | | height: 140rpx; |
| | | } |
| | | |
| | | .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> |