<template>
	<view class="page-container">
		<view class="condition-box">
			<view class="condition-input-box">
				<view class="condition-input-container">
					<icon class="ml-20" type="search" size="20"></icon>
					<input class="condition-input-text" :value="keywords" @input="inputKeywords"
						@confirm="doSearchKeyWord" placeholder-style="font-size:28rpx;" type="text"
						confirm-type="search" placeholder="项目名称" />
					<view class="icon-clear size-32 mr-10" v-if="keywords != ''" @click="clearSearch"></view>
					<view @click="chooseOptions" class="condition-option-btn icon-arrow-solid">筛选</view>
				</view>
				<view class="add-btn" @click="applyRepair">申请补正</view>
			</view>
			<view :class="['condition-content', { 'visible': isShowOptions }]">
				<view class="condition-content-container">
					<view class="condition-content-box">
						<view class="condition-content-box-left">
							<view class="left-item" @click="chooseLeft" data-value="state">
								<view
									:class="['left-item-line',curOptions=='state'? 'left-sel-line':'left-normal-line']">
								</view>
								<view class="left-sel-text">状态</view>
							</view>
							<view class="left-item" @click="chooseLeft" data-value="kind">
								<view
									:class="['left-item-line',curOptions=='kind'? 'left-sel-line':'left-normal-line']">
								</view>
								<view class="left-sel-text">种类</view>
							</view>
							<view class="left-item" @click="chooseLeft" data-value="type">
								<view
									:class="['left-item-line',curOptions=='type'? 'left-sel-line':'left-normal-line']">
								</view>
								<view class="left-sel-text">类型</view>
							</view>
						</view>
						<scroll-view class="condition-content-box-scroll-right" scroll-y>
							<view class="condition-content-box-right">
								<block v-if="curOptions=='state'">
									<block v-for="(item,index) in stateList" :key="index">
										<view
											:class="[tempSelState==item.value ? 'right-item-sel':'right-item-normal','condition-content-right-item']"
											:data-value="item.value" @click="chooseState">{{item.title}}</view>
									</block>
								</block>
								<block v-else-if="curOptions=='kind'">
									<block v-for="(item,index) in kindList" :key="index">
										<view
											:class="[tempSelKind==item.value ? 'right-item-sel':'right-item-normal','condition-content-right-item']"
											:data-value="item.value" @click="chooseKind">{{item.title}}</view>
									</block>
								</block>
								<block v-else>
									<block v-for="(item,index) in typeList" :key="index">
										<view
											:class="[tempSelType==item.value ? 'right-item-sel':'right-item-normal' ,'condition-content-right-item']"
											:data-value="item.value" @click="chooseType">{{item.title}}</view>
									</block>
								</block>
							</view>
						</scroll-view>
					</view>
					<view class="condition-content-btns">
						<view class="condition-content-btn clear" @click="clearChooseOption">清除</view>
						<view class="condition-content-btn cancel" @click="cancelChooseOption">取消</view>
						<view class="condition-content-btn confirm" @click="confirmChooseOption">确定</view>
					</view>
				</view>
				<view class="condition-mask" @click="cancelChooseOption"></view>
			</view>
		</view>

		<!-- #ifdef MP-TOUTIAO || MP-WEIXIN -->
		<view style="margin-top: 120rpx;">
		<!-- #endif -->
			<!-- #ifndef MP-TOUTIAO || MP-WEIXIN -->
			<view style="margin-top: 80rpx;">
			<!-- #endif -->
				<ContainerLoading :loadingVisible="loadingState">
					<scroll-view scroll-y style="height: 85vh;" :lower-threshold="100" refresher-background="#FFFFFF00"
						@scrolltolower="doLoadMore">
						<view class="repair-list-box">
							<block v-for="(item,index) in repairList" :key="index">
								<view class="repair-list-item">
									<view class="repair-item-title-box" :data-value="item" @click="showReason">
										<view class="repair-title-box">
											<view
												:class="[repairStatusColor(item.applyStatus),'repair-status-content']">
												{{repairStatus(item.applyStatus)}}
											</view>
										</view>
										<view class="repair-title-apply-time">{{item.gmtCreate}}</view>
									</view>
									<view class="divider-v mt-20"></view>
									<view class="repair-name-box mt-10">
										<view class="repair-title-content" :data-value="item" @click="showReason">
											{{item.projName}}
										</view>
										<view v-if="item.applyStatus=='PENDING'" class="icon-cancel-yellow size-48"
											@click="cancelApply" :data-value="item">
										</view>
									</view>
									<view :data-value="item" @click="showReason"
										class="repair-reason-desc multiple-2-ellipsis">{{item.correctionReason}}</view>
									<view class="repair-footer-box">
										<view class="repair-attr-box" :data-value="item" @click="showReason">
											<view class="repair-attr-item">{{repairType(item.type)}}</view>
											<view class="repair-attr-item">{{repairKind(item.correctionType)}}
											</view>
										</view>
										<view v-if="item.applyStatus=='APPROVED'" class="options-btn"
											@click="downloadFile" :data-value="item">下载</view>
									</view>
								</view>
							</block>
							<uni-load-more :status="hasMore"></uni-load-more>
						</view>
					</scroll-view>
				</ContainerLoading>
			</view>
			<DownloadProgress :isShow="downloading" :progress="downloadProgress"></DownloadProgress>
			<uni-popup ref="reasonDialog" type="center" background-color="#fff" border-radius="15rpx 15rpx 15rpx 15rpx">
				<view class="bottom-dialog-container" style="width: 80vw;">
					<view class="approve-title">补正原因</view>
					<view v-if="reasonItem != null" class="approve-content mt-10">{{reasonItem.correctionReason}}</view>
					<view class="approve-title mt-10">补正凭证</view>
					<view v-if="reasonItem != null" class="approve-img-box mt-10">
						<block v-for="(item,index) in reasonItem.correctionVoucherFileKVs" :key="index">
							<view class="approve-img-item single-line" @click="previewImg" :data-item="item">
								{{item.value}}
							</view>
						</block>
					</view>
					<view v-if="reasonItem != null && reasonItem.gmtReview !=''" class="approve-content-box">
						<view class="approve-title mt-10">审核时间</view>
						<view class="approve-content mt-10">{{reasonItem.gmtReview}}</view>
						<view class="approve-title mt-10">审核意见</view>
						<view class="approve-content mt-10">{{reasonItem.reviewReason}}</view>
					</view>
					<view class="close-btn" @click="closeDialog">关闭</view>
				</view>
			</uni-popup>
			<!-- 下载弹窗 -->
			<uni-popup ref="downloadDialog" type="bottom">
				<view class="bottom-dialog-container bg-gray" style="border-radius: 15rpx 15rpx 0rpx 0rpx;">
					<view class="dialog-title-box">
						<view class="icon-close size-48" @click="closeDialog"></view>
						<view class="dialog-title-txt has-icon dialog-title">
							<view class="icon-download-blue size-48"></view>
							<text class="ml-10">资料下载</text>
						</view>
					</view>
					<view class="download-box" v-if="tempDownloadPro != null">
						<view class="download-item"
							v-if="tempDownloadPro.correctionType=='MANUAL' || tempDownloadPro.correctionType=='ALL'">
							<view class="download-title">
								<view class="bg-yellow">
									<view class="icon-source size-48"></view>
								</view>
								<view class="download-title-txt">操作手册</view>
							</view>
							<text class="download-item-desc">软件的鉴别材料-操作手册</text>
							<view class="download-btn-box">
								<view class="download-btn blue" @click="doDownloadDatum" data-type="docx"
									data-path="/route/proj/download/manual/">
									<view class="ic-doc" style="width: 20px;height: 20px;"></view>
									<view class="download-btn-txt">Word格式</view>
								</view>
								<view class="download-btn red" @click="doDownloadDatum" data-type="pdf"
									data-path="/route/proj/download/manual/pdf/">
									<view class="ic-pdf" style="width: 20px;height: 20px;"></view>
									<view class="download-btn-txt">PDF格式</view>
								</view>
							</view>
						</view>
						<view class="download-item"
							v-if="tempDownloadPro.correctionType=='CODE' || tempDownloadPro.correctionType=='ALL'">
							<view class="download-title">
								<view class="bg-blue">
									<view class="icon-tool size-48"></view>
								</view>
								<view class="download-title-txt">源代码</view>
							</view>
							<text class="download-item-desc">软件的鉴别材料-项目源代码</text>
							<view class="download-btn-box">
								<view class="download-btn blue" @click="doDownloadDatum" data-type="docx"
									data-path="/route/proj/download/code/">
									<view class="ic-doc" style="width: 20px;height: 20px;"></view>
									<view class="download-btn-txt">Word格式</view>
								</view>
								<view class="download-btn red" @click="doDownloadDatum" data-type="pdf"
									data-path="/route/proj/download/code/pdf/">
									<view class="ic-pdf" style="width: 20px;height: 20px;"></view>
									<view class="download-btn-txt">PDF格式</view>
								</view>
							</view>
						</view>
						<view class="download-notes mt-20">
							<icon type="info" size="14" color="#3270FF" style="margin-top: 6rpx;"></icon>
							<view class="notes-content-box ml-10">
								<text style="font-weight: bold;font-size: 28rpx;">使用提示</text>
								<text class="mt-20">温馨提示: 若您想把下载的文件留存到本地，打开预览页面后，在界面右上角操作栏内，选择使用其他软件打开或者保存文件功能就能实现。
								</text>
							</view>
						</view>

					</view>
				</view>
			</uni-popup>
			<uni-popup type="message" ref="msg">
				<uni-popup-message :type="msgType" :message="msgHint" :duration="2000"></uni-popup-message>
			</uni-popup>
		</view>
</template>

<script>
	import ProApi from '@/common/js/net/projectApi';
	import ContainerLoading from '@/components/container-loading.vue'
	import DownloadProgress from '@/components/download-progress.vue';
	import {
		inject,
		isReactive
	} from 'vue';
	import {
		typeList,
		stateList,
		kindList
	} from '@/common/js/data';
	import {
		repairStatusColor,
		repairStatus,
		repairType,
		repairKind
	} from '@/common/js/conver.js'
	import {
		previewUrl,
		copyrightUrl
	} from '@/common/js/net/mainUrl';
	import {
		get
	} from '@/common/js/cache/storage';
	export default {
		components: {
			ContainerLoading,
			DownloadProgress
		},
		setup() {
			const globalData = inject('globalData')
			return {
				globalData
			}
		},
		data() {
			return {
				keywords: '',
				pageData: {
					page: 1,
					rows: 10,
					projName: '',
					type: '',
					correctionType: '',
					applyStatus: ''
				},
				msgShow: false,
				msgHint: '',
				msgType: 'error',
				loadingState: 'loading',
				listRefreshTrig: false,
				isLoadMore: false,
				hasMore: true,
				repairList: [], //开票记录
				typeList: typeList,
				selectType: '',
				tempSelType: '',
				kindList: kindList,
				selectKind: '',
				tempSelKind: '',
				stateList: stateList,
				selectState: '',
				tempSelState: '',
				buttons: [{
					text: '关闭'
				}],
				showHint: false,
				approveImgs: [],
				approveTime: '',
				approveDesc: '',
				preUrl: previewUrl,
				approveStatus: false, //是否显示编辑提示
				showDownloadDialog: false,
				downloadProgress: 0, //下载文件进度
				downloading: false, //下载文件中
				tempDownloadPro: null, //下载的item
				approveReason: '', //补正原因
				isShowOptions: false,
				curOptions: 'state',
				needRefresh: false, //是否需要刷新
				reasonItem: null, //详情
			};
		},
		onLoad(options) {
			uni.setNavigationBarTitle({
				title: "补正项目",
			});
			uni.setNavigationBarColor({
				frontColor: "#000000",
				backgroundColor: "#F0F0F0",
				animation: {
					duration: 500,
					timingFunc: "easeIn",
				},
			});
			this.doRefreshList()
		},
		onShow() {
			if (this.needRefresh) {
				this.needRefresh = false
				this.doRefreshList()
			}
		},
		onPullDownRefresh() {
			this.doRefreshList()
		},
		methods: {
			repairStatusColor,
			repairStatus,
			repairType,
			repairKind,
			inputKeywords(e) {
				this.keywords = e.detail.value
			},
			//清除搜索内容
			clearSearch() {
				const _self = this
				this.keywords = ''
				this.doRefreshList()
			},
			//发起搜索
			doSearchKeyWord() {
				this.doRefreshList()
			},
			//展示隐藏筛选
			chooseOptions() {
				this.tempSelKind = this.selectKind
				this.tempSelState = this.selectState
				this.tempSelType = this.selectType
				this.isShowOptions = !this.isShowOptions
			},
			//左边条件
			chooseLeft(e) {
				this.curOptions = e.currentTarget.dataset.value
			},
			//右边条件
			chooseType(e) {
				this.tempSelType = e.currentTarget.dataset.value
			},
			chooseKind(e) {
				this.tempSelKind = e.currentTarget.dataset.value
			},
			chooseState(e) {
				this.tempSelState = e.currentTarget.dataset.value
			},
			confirmChooseOption() {
				this.selectState = this.tempSelState
				this.selectKind = this.tempSelKind
				this.selectType = this.tempSelType
				this.tempSelKind = ''
				this.tempSelState = ''
				this.tempSelType = ''
				this.isShowOptions = false
				this.doRefreshList()
			},
			cancelChooseOption() {
				this.isShowOptions = false
				this.tempSelKind = ''
				this.tempSelState = ''
				this.tempSelType = ''
			},
			clearChooseOption() {
				this.selectKind = ''
				this.selectState = ''
				this.selectType = ''
				this.tempSelKind = ''
				this.tempSelState = ''
				this.tempSelType = ''
				this.isShowOptions = false
				this.doRefreshList()
			},
			closeDialog() {
				this.$refs.reasonDialog.close()
				this.$refs.downloadDialog.close()
			},
			//显示详情
			showReason(e) {
				const item = e.currentTarget.dataset.value
				const _self = this
				item.correctionVoucherFileKVs.map(value => {
					value.url = previewUrl + value.key
					return value
				})
				this.reasonItem = item
				console.log(item)
				this.$refs.reasonDialog.open()
			},
			//预览补正凭证
			previewImg(e) {
				const _self = this
				_self.$refs.reasonDialog.close()
				const item = e.currentTarget.dataset.item
				console.log(item)
				const fileName = item.value
				const path = item.url
				//判断是pdf还是图片
				if (fileName.toLowerCase().endsWith('.pdf')) {
					//文件,下载文件
					_self.download(path)
				} else {
					//图片
					const urls = [path]
					uni.previewImage({
						urls: urls,
					})
				}
			},
			//下载文件
			doDownload(url, header, filePath) {
				const _self = this
				return new Promise((resolve, reject) => {
					const downloadTask = uni.downloadFile({
						url: url,
						filePath: filePath,
						header: header,
						success: resolve,
						fail: reject
					})
					downloadTask.onProgressUpdate(res => {
						_self.downloadProgress = Number(res.progress)
					})
				})
			},
			//点击下载
			//path :文件地址
			async download(path, fileType) {
				const _self = this
				_self.downloadProgress = 0 //重置下载进度
				_self.downloading = true //显示进度
				const url = path
				const token = get('token')
				const header = {}
				if (token) {
					header.Auth = `Bearer ${token}`;
				}
				const filePath = 'bdfile://usr/' + this.tempDownloadPro.projId + '.' + fileType
				const downloadRes = await _self.doDownload(url, header, filePath)
				console.log('下载返回', downloadRes)
				if (downloadRes && downloadRes.statusCode == 200) {
					_self.downloadProgress = 0
					_self.downloading = false
					uni.openDocument({
						filePath: downloadRes.filePath,
						fileType: fileType,
						showMenu: true,
						success: res => {

						},
						fail: err => {
							_self.showErr('很抱歉，文件下载出现问题。建议您稍作等待，之后再尝试下载。')
						}
					})
				} else {
					_self.showErr('很抱歉，文件下载出现问题。建议您稍作等待，之后再尝试下载。')
				}
			},
			showErr(msg) {
				const _self = this
				_self.msgHint = msg
				_self.msgType = 'error'
				_self.showDownload = false
				_self.downloading = false
				_self.downloadProgress = 0
				_self.$refs.msg.open()
			},
			//刷新
			doRefreshList() {
				console.log('正在刷新...')
				const _self = this
				_self.loadingState = 'loading'
				_self.hasMore = 'more'
				_self.pageData.page = 1
				_self.pageData.projName = _self.keywords
				_self.pageData.type = _self.selectType
				_self.pageData.correctionType = _self.selectKind
				_self.pageData.applyStatus = _self.selectState
				_self.isLoadMore = false
				_self.doGetRepairList(true)
			},
			doLoadMore() {
				//判断是否正在加载中 与是否存在更多数据
				const _self = this
				if (_self.isLoadMore || _self.hasMore == 'noMore') {
					return
				}
				_self.isLoadMore = true
				_self.hasMore = 'loading'
				_self.pageData.page = ++_self.pageData.page
				_self.pageData.projName = _self.keywords
				_self.pageData.type = _self.selectType
				_self.pageData.correctionType = _self.selectKind
				_self.pageData.applyStatus = _self.selectState
				_self.doGetRepairList(false)
			},
			//加载列表
			doGetRepairList(isRefresh) {
				const _self = this
				_self.repairList = isRefresh ? [] : _self.repairList
				_self.loadingState = isRefresh ? 'loading' : ''
				ProApi.doGetMineRepairList(_self.pageData)
					.then(res => {
						uni.stopPullDownRefresh()
						console.log(res)
						var status = 'success'
						status = res.rows && res.rows.length > 0 ? 'success' : 'empty'
						_self.loadingState = isRefresh ? status : ''
						_self.repairList = _self.repairList.concat(res.rows)
						_self.isLoadMore = false
						_self.hasMore = _self.repairList.length < res.total ? 'more' : 'noMore'
					})
					.catch(err => {
						uni.stopPullDownRefresh()
						_self.loadingState = 'error'
						_self.isLoadMore = false
						_self.hasMore = 'more'
					})
			},
			//下载
			downloadFile(e) {
				this.tempDownloadPro = e.currentTarget.dataset.value
				this.$refs.downloadDialog.open()
			},
			//下载code或资料
			doDownloadDatum(e) {
				const _self = this
				const path = e.currentTarget.dataset.path
				const fileType = e.currentTarget.dataset.type
				const url = copyrightUrl + path + this.tempDownloadPro.projId
				_self.download(url, fileType)
			},
			//去申请补正
			applyRepair() {
				uni.navigateTo({
					url: '/pages/copyright/applyRepair/applyRepair'
				})
			},
			//取消申请
			cancelApply(e) {
				const item = e.currentTarget.dataset.value
				const _self = this
				uni.showModal({
					title: '警告',
					content: '您确定要撤销这次补正吗?',
					success: res => {
						if (res.confirm) {
							_self.doCancelApply(item)
						}
					}
				})
			},
			//取消
			doCancelApply(item) {
				const _self = this
				uni.showLoading({
					title: '取消中...',
				})
				ProApi.doCancelProrepair(item.projCorrectionApplyId)
					.then(res => {
						uni.hideLoading()
						_self.msgType = 'success'
						_self.msgHint = '撤销成功'
						_self.$refs.msg.open()
						_self.doRefreshList()
					})
					.catch(err => {
						uni.hideLoading()
						_self.msgType = 'error'
						_self.msgHint = err.msg ? err.msg : '撤销失败,请稍后重试'
						_self.$refs.msg.open()
					})
			}
		},
		onPullDownRefresh() {
			this.doRefreshList()
			uni.stopPullDownRefresh()
		}
	};
</script>

<style lang="scss" scoped>
	.condition-content-container {
		background-color: $divider-color;
		padding: 0rpx 30rpx;
		height: 350rpx;
		display: flex;
		flex-direction: column;
	}

	.condition-content-box {
		display: flex;
		flex-direction: row;
		flex: 1;
		padding: 20rpx;
	}

	.condition-content-box-left {
		display: flex;
		flex-direction: column;
		flex: .2;
		border-right: 1rpx solid $white-color;
		height: 100%;
	}

	.condition-content-box-scroll-right {
		flex: .8;
		height: 230rpx;
		padding: 0rpx 20rpx;
	}

	.condition-content-box-right {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.left-item {
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 10rpx 0rpx;
	}

	.left-item-line {
		width: 8rpx;
		height: 30rpx;
		border-radius: 5rpx;
	}

	.left-sel-line {
		background-color: $primary-color;
		color: $text-brown-color;
	}

	.left-normal-line {
		background-color: $divider-color;
		color: $text-gray-desc-color;
	}

	.left-sel-text {
		font-size: 28rpx;
		margin-left: 10rpx;
		color: $text-color;
	}

	.left-sel {
		border-left: 5rpx solid $primary-color;
		padding-left: 10rpx;
	}



	.condition-content-right-item {
		white-space: nowrap;
		line-height: 28rpx;
		height: 28rpx;
		border-radius: 10rpx;
		font-size: 24rpx;
		text-align: center;
		padding: 5rpx 10rpx;
		margin: 10rpx;
		color: $text-brown-color;
	}

	.right-item-sel {
		background-color: $primary-color-light;
	}


	.right-item-normal {
		background-color: transparent;
	}

	.condition-content-btns {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-evenly;
		margin-bottom: 20rpx;
		margin-top: 10rpx;
	}

	.condition-content-btn {
		font-size: 28rpx;
		padding: 5rpx 60rpx;
		text-align: center;
		border-radius: 8rpx;
	}

	.cancel {
		background-color: $white-color;
		color: $text-color;
	}

	.clear {
		background-color: $white-color;
		color: $text-color;
	}

	.confirm {
		background-color: $btn-green-color;
		color: $white-color;
	}

	.add-btn {
		border-radius: 8rpx;
		background-color: $btn-green-color;
		color: rgba(255, 255, 255, 1);
		font-size: 28rpx;
		text-align: center;
		height: 50rpx;
		margin-left: 20rpx;
		line-height: 50rpx;
		font-family: PingFangSC-regular;
		padding: 5rpx 10rpx;
	}

	.add-btn:active {
		background-color: $btn-green-color-active;
	}

	.content-container {
		height: 82vh;
		margin-top: 70rpx;
	}

	.bottom-btn {
		position: fixed;
		bottom: 40rpx;
		left: 0;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		width: 100%;
	}


	.repair-list-box {
		display: flex;
		flex-direction: column;
	}

	.repair-list-item {
		display: flex;
		flex-direction: column;
		background-color: $white-color;
		padding: 20rpx;
		border-radius: 8rpx;
	}

	.repair-list-item:nth-of-type(n+2) {
		margin-top: 20rpx;
	}

	.repair-item-title-box {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.repair-title-box {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;
	}

	.repair-name-box {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.repair-title-content {
		font-size: 28rpx;
		font-weight: bold;
		flex: 1;
		padding-right: 15rpx;
	}

	.repair-reason-desc {
		margin-top: 10rpx;
		font-size: 24rpx;
		color: $text-gray-desc-color;
	}

	.repair-footer-box {
		margin-top: 20rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-end;
	}

	.repair-attr-box {
		display: flex;
		flex-direction: row;
	}

	.repair-attr-item {
		font-size: 20rpx;
		color: $text-brown-color;
		background-color: $divider-color;
		padding: 2rpx 10rpx;
		border-radius: 5rpx;
		text-align: center;
	}

	.repair-attr-item:nth-of-type(n+2) {
		margin-left: 10rpx;
	}

	.repair-title-apply-time {
		font-size: 22rpx;
		color: $text-gray-hint-color;
	}

	.repair-status-green {
		background-color: $bg-green-color;
	}

	.repair-status-red {
		background-color: $bg-red-color;
	}

	.repair-status-yellow {
		background-color: $primary-color;

	}

	.repair-status-content {
		padding: 2rpx 10rpx;
		font-size: 22rpx;
		border-radius: 5rpx;
		height: 30rpx;
		line-height: 30rpx;
		text-align: center;
		color: $text-color;
	}

	.repair-status-gray {
		background-color: $bg-gray-deep-color;
	}


	.order-item {
		display: flex;
		flex-direction: column;
		background-color: white;
		border-radius: 10rpx;
		padding: 10rpx 20rpx;
	}

	.record-title-box {
		display: flex;
		flex-direction: row;
	}

	.record-options {
		display: flex;
		flex-direction: row;
	}

	.options-btn {
		font-size: 24rpx;
		line-height: 24rpx;
		height: 24rpx;
		padding: 10rpx 20rpx;
		border-radius: 5rpx;
		background-color: $btn-green-color;
		color: $white-color;
	}

	.options-btn:active {
		background-color: $btn-green-color-active;
	}

	.close-btn {
		font-size: 28rpx;
		text-align: center;
		width: 120rpx;
		align-self: center;
		border-radius: 15rpx;
		padding: 10rpx 15rpx;
		color: $btn-blue-color;
	}

	.close-btn:active {
		color: $btn-blue-color-active;
	}

	.approve-title {
		font-size: 28rpx;
		color: $text-color;
		font-weight: bold;
	}

	.approve-content-box {
		margin-top: 10rpx;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}

	.approve-img-box {
		display: flex;
		flex-direction: column;
		margin-top: 15rpx;
		box-sizing: border-box;
		width: 100%;
	}

	.approve-img-item {
		font-size: 24rpx;
		border-radius: 5rpx;
		padding: 10rpx;
		text-align: left;
		background-color: $gray-bg-color;
		width: 100%;
		margin: 10rpx;
		box-sizing: border-box;
	}

	.approve-img-item:nth-of-type(n+2) {
		margin-top: 10rpx;
	}

	.approve-content {
		font-size: 24rpx;
		margin-left: 20rpx;
		text-align: left;
		color: $text-gray-desc-color;
	}

	.approve-hint {
		margin-top: 20rpx;
		font-size: 24rpx;
		color: $text-gray-hint-color;
	}


	.col-yellow {
		background-color: $primary-color;
		color: $text-color;
	}

	.col-gray {
		background-color: $bg-gray-deep-color;
		color: $text-gray-desc-color;
	}

	.col-green {
		background-color: $bg-green-color;
		color: $text-brown-color;
	}

	.col-red {
		background-color: $bg-red-color;
		color: $text-brown-color;
	}

	.download-box {
		display: flex;
		flex-direction: column;
		padding: 30rpx;
	}

	.download-item {
		display: flex;
		flex-direction: column;
		background-color: $white-color;
		border-radius: 15rpx;
		box-shadow: 0rpx 0rpx 0rpx 5rpx $bg-gray-input-color;
		padding: 30rpx;
	}

	.download-item:nth-last-of-type(n+2) {
		margin-top: 20rpx;
	}


	.download-title {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.download-title-txt {
		font-size: 32rpx;
		font-weight: bold;
		margin-left: 15rpx;
	}

	.download-item-desc {
		font-size: 24rpx;
		margin-top: 10rpx;
	}

	.download-btn-box {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 30rpx 0rpx 0rpx 0rpx;
	}

	.download-btn {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		padding: 15rpx;
		border-radius: 5px;
		flex: 1;
		box-shadow: 0rpx 0rpx 2rpx $bg-gray-input-color;
		font-weight: bold;
	}

	.download-btn:nth-child(2) {
		margin-left: 40rpx;
	}

	.download-btn.blue {
		background-color: $bg-blue-shallow-color;
		color: $text-blue-color;
	}

	.download-btn.gray {
		background-color: $bg-gray-input-light-color;
		color: $text-brown-color;
	}

	.download-btn.red {
		background-color: $bg-red-shallow-color;
		color: $text-red-color;
	}

	.download-btn-txt {
		font-size: 24rpx;
		text-align: center;
		margin-left: 10rpx;
	}

	.download-btn:active {
		background-color: #d1d1d0;
	}




	.bg-blue {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background-color: $bg-blue-shallow-color;
		width: 72rpx;
		height: 72rpx;
		border-radius: 15rpx;
	}

	.bg-yellow {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background-color: $bg-green-light-color;
		width: 72rpx;
		height: 72rpx;
		border-radius: 15rpx;
	}

	.bg-green {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background-color: $bg-green-light-color;
		width: 72rpx;
		height: 72rpx;
		border-radius: 15rpx;
	}


	.bg-gray {
		background-color: $bg-gray-input-color;
	}

	.download-desc {
		display: flex;
		flex-direction: column;
		background-color: $white-color;
		padding: 30rpx;
		border-radius: 15rpx;
		margin-top: 20rpx;
	}

	.link-title {
		font-size: 14px;
		font-weight: bold;
	}

	.link {
		margin-top: 5px;
		word-wrap: break-word;
		word-break: break-all;
		width: 85vw;
		font-size: 14px;
		color: rgba(114, 197, 245, 0.692);
	}

	.custom-tips {
		margin-top: 80px;
	}

	.hint {
		font-size: 14px;
		text-align: center;
		color: $primary-color;
		font-weight: bold;
	}

	.download-notes {
		display: flex;
		flex-direction: row;
		border-left: 12rpx solid $blue-color;
		border-radius: 5rpx;
		background-color: $bg-blue-shallow-color;
		font-size: 24rpx;
		/* #ifdef MP-BAIDU */
		margin-bottom: 10rpx;
		/* #endif */
		/* #ifndef MP-BAIDU */
		margin-bottom: 80rpx;
		/* #endif */
		padding: 20rpx;
		box-shadow: 0rpx 0rpx 0rpx 5rpx $bg-gray-input-color;
	}

	.notes-title-box {
		display: flex;
		flex-direction: row;
		align-items: center;
		color: $text-blue-color;
	}

	.notes-content-box {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		color: $text-blue-color;
	}

	.dialog-title {
		align-self: center;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}
</style>