<template>
	<view class="main">
		<view class="detail">
			<view class="item">
				<view class="title">培训主题:</view>
				<view class="info">{{detail.name}}</view>
			</view>
			
			<view class="item">
				<view class="title">组织部门:</view>
				<view class="info">{{detail.org_name}}</view>
			</view>
			
			<view class="item">
				<view class="title">开展时间:</view>
				<view class="info">{{detail.drawup}}</view>
			</view>
			
			<view class="item">
				<view class="title">结束时间:</view>
				<view class="info">{{detail.enddrawup}}</view>
			</view>
			
			<view class="item">
				<view class="title">培训地点:</view>
				<view class="info">{{detail.location}}</view>
			</view>
			
			<view class="item">
				<view class="title">主持人:</view>
				<view class="info">{{detail.anchor}}</view>
			</view>
			
			<view class="item">
				<view class="title">培训课件:</view>
				<view class="info">
					<view v-for="(item,index) in detail.files">
						<span @click="downFile(item.url)">{{item.name}}</span>
					</view>
				</view>
			</view>
			
			<view class="item">
				<view class="title">培训内容:</view>
				<view class="info">
					<div style="width: 500rpx;">
						 <u-parse :content="detail.content" noData="无内容" :imageProp="imageProp"></u-parse>
					</div>
				   
				</view>
			</view>
			
		</view>

	</view>
</template>

<script>
	import uParse from '@/components/u-parse/u-parse.vue'
	export default {
		components: {
		    uParse
		  },
		data() {
			return {
				detail:'',
				imageProp:{
					domain:'anquansys.sxlq.com:37100'
				}
			}
		},
		onLoad({m_id}) {
			this.getDetail(m_id);
		},
		methods: {
			downFile(url){
				uni.downloadFile({
					url: url
				});
			},
			getDetail(id)
			{
	            getApp().globalData.request.post(
				  "learn/train/manageInfo",
				  {id:id}
				).then(res=>{
					this.detail = res.data
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	@import url("@/components/u-parse/u-parse.css");
 .main{
	  padding: 30rpx;
	  font-size: 28rpx;
	  background-color: #f4f9ff;
  }
  .detail{
	  padding: 20rpx;
	  background-color: #fff;
	  border-radius: 20rpx;
  }
  .item{
	  display: flex;
	  justify-content: space-between;
	  margin: 23rpx 0;
	  .title{
		  color:#797979;
		  width: 150rpx;
	  }
	  .info{
		  flex:1;
		  text-align: right;
		  color:#6d6d6d;
	  }
  }
</style>
