<template>
	<view class="appWrapper">
		<form action="">
			<view style="height:30rpx"></view>

			<view class="form-item">
				<view class="title">
					<text class="necessary">*</text>
					监察标题:
				</view>
				<input type="text" v-model="controlReportDetail.supervision_title" disabled>
			</view>

			<view class="form-item">
				<view class="title"><text class="necessary">*</text>所属站点:</view>
				<select name="" id="" filterable clearable v-model="controlReportDetail.site_id" disabled>
					<option value="">请选择</option>
					<option :value=item.id v-for="item in siteListData">{{ item.site_name}}</option>
				</select>
			</view>

			<view class="form-item">
				<view class="title"><text class="necessary">*</text>监察内容:</view>
				<textarea maxlength="-1" width="250" v-model="controlReportDetail.supervision_content"
					disabled></textarea>
			</view>


			<view class="form-item">
				<view class="title"><text class="necessary">*</text>上传图片:</view>
				<view style="width:500rpx">
					<img :src=bathUrl+controlReportDetail.scene_pictures style="width:90%">

				</view>
			</view>
		</form>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				siteListData: [],
				controlReportDetail: {},
				bathUrl: 'https://wx.ewoogi.com/wx/'
			}
		},
		onLoad: function(option) {
			this.getDataList({
				"id": option.id
			});
			this.getSiteList();
		},
		mounted() {},
		methods: {

			//数据请求
			async getDataList(params = {}) {
				const res = await this.$myRequest({
					url: 'MonitoringReporting/getMonitoringReportingList',
					showLoading: true,
					data: params
				})
				// console.log('res.data.data')
				// console.log(res.data.data)
				this.controlReportDetail = res.data.data[0];
				console.log(this.controlReportDetail)
			},
			//站带下拉数据请求
			async getSiteList(params = {}) {
				const res = await this.$myRequest({
					url: 'BlackoutPlan/getSiteBox',
					showLoading: true,
					data: params
				})
				this.siteListData = res.data.data
			},
		}
	}
</script>

<style lang="scss">
	select {
		background-size: 6%;
	}
</style>
