<template>
<view>
<image src="https://cczdsz.cn/app/images/background-from.png" class="background"></image>
<view class="project-content">
	<u-form :model="form" :rules="rules" ref="form">
		<view class="top">
			<u-icon class="top-icon" name="map-fill"></u-icon>
			<u-form-item label=" " borderBottom ref="item1" placeholder=" " labelWidth="20" label-align="left">
				<u-input v-model="form.name" disabled placeholder=" " disabled trim="false"></u-input>
			</u-form-item>
			<u-icon class="top-icon" name="calendar"></u-icon>
			<u-form-item label=" " borderBottom ref="item1" placeholder=" " labelWidth="20">
				<u-input v-model="time" disabled style="font-size: 2rpx" length='30px' trim="true"
					placeholder=" "></u-input>
			</u-form-item>
		</view>
		<view style="flex-flow: row;display: flex; justify-content: flex-end;">
		<view class="small-title">调压箱 </view> 
		<view class="small-title" style="margin-left: auto;" @click="BoxDetails()">详情<u-icon name="arrow-right"></u-icon></view>
		</view>
		<u-form-item label="名称" borderBottom ref="item1" placeholder="请输入名称" labelWidth="140">
			<u-input v-model="form.name" length='20px' placeholder="请输入名称" 
				   type="digit" :clearable="false"  disabled></u-input>
		</u-form-item>
		<u-form-item label="管理所" borderBottom ref="item1" labelWidth="140">
			<u-input v-model="AdministrativeOfficeLabel" placeholder="请输入管理所名称"
				disabled  borderBottom @click="showadministrativeOffice= true  "></u-input>
			<!-- 	<u-select v-model="showadministrativeOffice" :list="AdministrativeOfficeList" label-name="name"
					value-name="value" @confirm="AdministrativeOffice()" disabled> </u-select>
				<u-icon slot="right" name="arrow-right"></u-icon> -->
		</u-form-item>
		<u-form-item label="编号" borderBottom ref="item1" labelWidth="140">
			<u-input    v-model="form.number" placeholder="请输入编号" disabled></u-input>
		</u-form-item>
		<u-form-item label="维护项目" labelWidth="140" borderBottom ref="item1">
			<u-checkbox-group   @change="changeconfirm" >
				<u-checkbox  
					v-for="(item, index) in typelist.regulating_box_maintenance"
					:key="index" 
					v-model="item.default" 
					:name="item.dictValue">
					{{item.dictLabel}}
				</u-checkbox>
			</u-checkbox-group>
		</u-form-item>
		<u-form-item borderBottom ref="item1">
			<view>照片</view>
			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传巡检照片"></u-input>
			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
				<image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"  >
				</image>
				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
					<view v-if="item.type == 'image'">
						<image :src="item.url" mode="" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"
							@click="showPhoto(index)">
						</image>
					</view>
					<view v-else>
						<video :src="item" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"></video>
					</view>
					<view @click="remove(index)"
						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
					</view>
				</view>
			</view>
		</u-form-item>
		
		<!-- <u-form-item borderBottom ref="item1">
			<view>备注</view>
			<u-input v-model="form.remarks" type="textarea" placeholder="请输入备注"  ></u-input>
		</u-form-item> -->
	</u-form>
	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()"  
		type='primary' v-if="type!=1">确认上传</u-button>
		<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="update()"  
			type='primary' v-else>确认修改</u-button>
</view>
<view>
			<u-popup v-model="showBoxDetails" height= "400px" border-radius="14" mode=bottom closeable=true   close-icon-color="#000000">
				<image src="https://cczdsz.cn/app/images/background.png" class="background"></image>
				<view>
					<u-form :model="boxform" ref="boxform">
						<view style="text-align:center; font-size: 40rpx;">调压箱详情</view>
						<view class="project-content" style="margin-top: 20px;">
	                    <u-form-item label="管理所" borderBottom ref="item1" placeholder=" " labelWidth="200" >
		                 <u-input v-model="AdministrativeOfficeLabel" disabled></u-input>
	                    </u-form-item>
						<u-form-item label="编号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="boxform.number" placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="名称" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="boxform.name" placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="性质" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="boxform.nature"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="类型" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="boxform.type"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="路数" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="boxform.numberOfRoutes"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="性质" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="boxform.nature"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="总户数" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.totalNumberOfHousehold"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="调压箱位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.positionOfPressureRegulatingBox"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="控制范围" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.controlRange"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="接收时间" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.receivingTime"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="阀井位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.valveWellPosition"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="阀井钥匙形状" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.valveWellKeyShape"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="厂家" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.manufacturer"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="流量" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.flow"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="进口管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.importPipeDiameter"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="出口管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.outletPipeDiameter"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="旁通管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.bypassPipeDiameter"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="调压器" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.voltageRegulator"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="设施规格型号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.facilitySpecificationsAndModels"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="入口压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.inletPressure"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="出口压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.outletPressure"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="切断压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.cutOffPressure"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="放散压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.releasePressure"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="出厂编号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.factoryNumber"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="出厂日期" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.factoryDate"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="主电源位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="pressureRegulatingBoxDetailsBo.mainPowerSupplyPosition"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label="备注" borderBottom ref="item1" placeholder=" " labelWidth="200" >
						 <u-input v-model="inspectionFrequency"  placeholder=" " disabled></u-input>
						</u-form-item>
						<u-form-item label=" " labelWidth="0" borderBottom ref="item1">
							<u-input v-model="boxform.remark" type="textarea" borderBottom placeholder="请填写备注信息内容"
								  ></u-input>
						</u-form-item>
							</view>
							</u-form>
				</view>
			</u-popup>
		</view>
</view>
</template>
<script>
import service from '@/api/index.js'
export default {
data() {
	return {
		showBoxDetails:false,
		repairType: [{
			label: '施工问题',
			value: 1
		}, {
			label: '施工问题',
			value: 2
		}, ],
		showrepairType: false,
		action: this.$HTTP.webUrl + `/obs`,
		headers: {
			MAuthorization: "wxBearer " + uni.getStorageSync('token')
		},
		url: [],
		params: {
			year: true,
			month: true,
			day: true,
			hour: true,
			minute: true,
			second: false
		},
		uploading: false,
		time:null,
		showtime:false,
		imgArr: [],
		imgymxs: [],
		progress: 0, //图片或视频上传百分比
		form: {
			findProblem:1
		},
		typelist: [],
		causesOfFamageLabel: null,
		dictlist: ['regulating_box_maintenance'],
		teamName: null,
		team:null,
		unit: null,
		unitName: null,
		showbuilding: false,
		showunit: false,
		buildingList: [],
		unitList: [],
		type: 2,
		id: null,
		community: null,
		createBy:null,
		name:null,
		administrativeOffice:null,
		AdministrativeOfficeLabel:null,
		AdministrativeOfficeList:[],
		maintenanceItem:[],
		managementOfficeId:null,
		boxform:{},
		pressureRegulatingBoxDetailsBo:{}
		
	}
},
onLoad(e) {
	// this.building = e.building
	// this.buildingName = e.buildingName
	// this.community = e.community
	// this.unitName = e.unitName
	// this.unit = e.unit
	 this.id = e.id
	this.type = e.type
	this.administrativeOffice=e.managementOffice
	this.form.administrativeOffice=e.managementOffice
	this.form.name=e.name
	this.name=e.name
	this.form.number=e.number
	this.managementOfficeId=e.managementOfficeId
	this.code=e.number
	console.log(e)
	this.name=e.name
	let time1 = new Date()
	console.log(time1.toLocaleString())
	var year = time1.getFullYear(); //得到年份
	var month = time1.getMonth() + 1; //得到月份
	var date = time1.getDate(); //得到日期
	var hours = time1.getHours(); //获取系统时
	var Min = time1.getMinutes(); //分
	this.type = e.type
	this.id = e.id
	this.time = year + "/" + month + "/" + date + "-" + hours + ":" + Min
	this.getdictsysinfo()
	uni.setNavigationBarTitle({
		title: '调压箱维护'
	});
	uni.setNavigationBarColor({
		frontColor: '#ffffff',
		backgroundColor: '#2d95f4',
	})
	// if (this.type != 1) {
	// 	this.getBuildingList()
	// }
	this.getUserName()
},
methods: {
	BoxDetails()
	{
		service.getpressureRegulatingBox(this.managementOfficeId).then(res=>{
			this.boxform=res
			this.pressureRegulatingBoxDetailsBo = res.pressureRegulatingBoxDetailsVo[0];
			this.showBoxDetails=true
		})
		
	},
	getAdministrativeOffice(userId){
		service.getAdministrativeOffice({userId:userId}).then(res=>{
			this.AdministrativeOfficeList=res
			console.log(this.administrativeOffice)
			if(this.type!=1)
			{
			this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
			}
		})
	},
	time(e) {
		console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
		this.form.createTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
	},
	// checksamplingMeterCount(e) {
	// 	console.log(e)
	// 				//正则表达试
	// 				e = (e.match(/^\d*(\.?\d{0,10})/g)[0]) || null
	// 				//重新赋值给input
	// 				this.$nextTick(() => {
	// 					this.form.samplingMeterCount= e
	// 				})
	// 			},
	getUserName(){
		service.getUserName().then(res=>{
			this.userId=res.id
			this.createBy=res.name
			this.getAdministrativeOffice(res.id)
		})
	},
	// showPhoto(index) {
	// 	uni.previewImage({
	// 		current: index,
	// 		urls: this.imgArr,
	// 	})
	// },
	// showPhotos(index) {
	// 	uni.previewImage({
	// 		current: index,
	// 		urls: this.photo,
	// 	})
	// },
	changeconfirm(e) {
		console.log(e)
		this.maintenanceItem=e
		this.form.maintenanceItem=e.join(',')
		// this.teamName = e[0].label
		// this.team = e[0].value
		// this.form.team=e[0].value
		// console.log(this.team)
		//this.getUnitList(e[0].value)
	},
	// unitconfirm(e) {
	// 	this.unitName = e[0].label
	// 	this.unit = e[0].value
	// },
	// getBuildingList() {
	// 	const _this = this
	// 	service.getBuildingList({
	// 		areaId: this.community
	// 	}).then(res => {
	// 		_this.buildingList = res
	// 	})
	// },
	// getUnitList(building) {
	// 	const _this = this
	// 	service.getUnitList({
	// 		buildingId: building
	// 	}).then(res => {
	// 		_this.unitList = res
	// 	})
	// },
	update()
	{
		let _this = this
		this.form.photoList = this.imgArr
		// if(this.building==null)
		// {
		// 	uni.showToast({
		// 		title: '请选择楼栋',
		// 		icon: 'none'
		// 	})
		// 	return
		// }
		if(this.imgArr.length==0)
		{
			uni.showToast({
				title: '请上传图片或视频！',
				icon: 'none'
			})
			return
		}
		this.form.processStatus = -1
		// this.form.buildingId = this.building
		// this.form.communityId=this.community
		this.form.userId=this.userId
		this.form.createBy=this.userId
		service.updateregulatingBoxMaintenance(this.form).then(res => {
			console.log(res)
			_this.$UTILS.showPrompt('修改成功！')
			// setTimeout(() => {
			// 	console.log('跳')
			// 	uni.switchTab({
			// 		url: '/pages/index/index'
			// 	})
			// }, 2000)
			//this.form={isNormalInspection:1}
			// this.buildingName=''
			// this.imgArr=[]
			// this.imgymxs=[]
		})
		
	},
	save() {
		let _this = this
		this.form.photoList = this.imgArr
		// if(this.building==null)
		// {
		// 	uni.showToast({
		// 		title: '请选择楼栋',
		// 		icon: 'none'
		// 	})
		// 	return
		// }
		if(this.imgArr.length==0)
		{
			uni.showToast({
				title: '请上传图片或视频！',
				icon: 'none'
			})
			return
		}
		// this.form.buildingId = this.building
		// this.form.communityId=this.community
		this.form.userId=this.userId
		this.form.createBy=this.userId
		this.form.parentId=this.managementOfficeId
		this.form.team=this.team
		service.setregulatingBoxMaintenance(this.form).then(res => {
			console.log(res)
			_this.$UTILS.showPrompt('上报成功！')
			// setTimeout(() => {
			// 	console.log('跳')
			// 	uni.switchTab({
			// 		url: '/pages/index/index'
			// 	})
			// }, 2000)
			this.form={number:this.code,administrativeOffice:this.administrativeOffice,name:this.name}
			let yesandnolist=[]
			this.typelist.regulating_box_maintenance .forEach(item=>{
				item.default=false
				yesandnolist.push(item)
			})
			this.typelist.regulating_box_maintenance=yesandnolist
			
			// this.buildingName=''
			this.imgArr=[]
			this.imgymxs=[]
		})
	},
	getdictsysinfo() {
		let _this = this
		service.getDictInfoList({
			type: this.dictlist
		}).then(res => {
			_this.typelist = res
			if (this.type == 1) {
				let _this = this
				console.log(this.id)
				service.getregulatingBoxMaintenance(this.id).then(res => {
					// console.log(_this.typelist)
					// _this.buildingName = res.buildingName
					// _this.unitName = res.unitName
					// let list = []
					// list = _this.typelist.find_problem
					// list.forEach((item) => {
					// 	if (item.dictValue == res.findProblem) {
					// 		_this.causesOfFamageLabel = item.dictLabel
					// 	}
					// })
					if (null != res.photoList) {
						res.photoList.forEach(item => {
							let url = {}
							url.url = item
							url.type = 'image'
							this.imgymxs.push(url)
							this.imgArr.push(item)
						})
					}
					this.teamName=this.name
					this.time=res.createTime
					this.form = res
					this.maintenanceItem=res.maintenanceItem.split(',')
					let yesandnolist=[]
					this.typelist.regulating_box_maintenance .forEach(item=>{
						item.default=this.maintenanceItem.includes(item.dictValue)
						yesandnolist.push(item)
					})
					this.administrativeOffice=res.administrativeOffice
					this.name=res.name
					this.code=res.code
					this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
					this.typelist.regulating_box_maintenance=yesandnolist
					this.managementOfficeId=this.form.parentId
				})
			}
			
			
			console.log(res)
		})
	},
	confirm(e) {
		this.form.findProblem =e
	},
	choose() {
		let _this = this;
		uni.showActionSheet({
			title: '上传',
			itemList: ['图片', '视频'],
			success: (res) => {
				// console.log(res)
				if (res.tapIndex == 0) {
					this.chooseimage()
				} else {
					this.choosevideo()
				}
			}
		})
	},
	chooseimage() {
		console.log('图片')
		let _this = this;
		uni.chooseImage({
			sourceType: ['camera'],
			success(resp) {
				console.log('res--uni.chooseMedia', resp);
				resp.tempFiles.forEach((item, index) => {
					const task = uni.uploadFile({
						url: _this.$HTTP.webUrl + `/obs`,
						filePath: item.path,
						name: 'file',
						formData: {},
						header: _this.headers,
						success: res => {
							// 判断是否json字符串，将其转为json格式
							let data = _this.$u.test.jsonString(res.data) ? JSON.parse(
								res.data) : res.data;
							if (![200, 201, 204].includes(res.statusCode)) {
								// this.uploadError(index, data);
								_this.$UTILS.showPrompt('选取失败！')
							} else {
								// 上传成功
								// this.lists[index].response = data;
								// this.lists[index].progress = 100;
								// this.lists[index].error = false;
								// this.$emit('on-success', data, index, this.lists, this
								// 	.index);
								if (_this.progress === 100) {
									// console.log('_this.progress', _this.progress)
									// console.log('data----', data)
									// console.log('res--', res)
									_this.imgymxs.push({
										url: data.data.url,
										type: 'image'
									})
									_this.imgArr.push(data.data.url)
									// console.log('imgArr', _this.imgArr)
									_this.$UTILS.showPrompt('选取成功！')
								}
							}
						},
						fail: e => {
							_this.$UTILS.showPrompt('选取失败！')
							this.uploadError(index, e);
						},
						
						complete: res => {
							_this.uploading = false;
							// _this.uploadFile(index + 1);
							// this.$emit('on-change', res, index, this.lists, this
							// .index);
						}
					});
					task.onProgressUpdate(res => {
						// if (res.progress > 0) {
						// 	this.lists[index].progress = res.progress;
						// 	this.$emit('on-progress', res, index, this.lists, this.index);
						// }
						_this.progress = res.progress;
						console.log('onProgressUpdate', res)
						uni.showLoading({
							title: '选取中'
						})
					});
				})
			},
		})
	},
	choosevideo() {
		let _this = this;
		console.log('视频')
		uni.chooseVideo({
			sourceType: ['camera'],
			maxDuration: 30,
			success(resp) {
				const task = uni.uploadFile({
					url: _this.$HTTP.webUrl + `/obs`,
					filePath: resp.tempFilePath,
					name: 'file',
					formData: {},
					header: _this.headers,
					success: res => {
						// 判断是否json字符串，将其转为json格式
						let data = _this.$u.test.jsonString(res.data) ? JSON.parse(res.data) :
							res.data;
						if (![200, 201, 204].includes(res.statusCode)) {
							this.uploadError(index, data);
						} else {
							// 上传成功
							// this.lists[index].response = data;
							// this.lists[index].progress = 100;
							// this.lists[index].error = false;
							// this.$emit('on-success', data, index, this.lists, this
							// 	.index);
							if (_this.progress === 100) {
								console.log('_this.progress', _this.progress)
								console.log('data----', data)
								console.log('res--', res)
								// _this.imgArr.push(data.data.url)
								_this.imgymxs.push({
									url: data.data.url,
									type: 'video'
								})
								_this.imgArr.push(data.data.url)
								console.log('imgArr', _this.imgArr)
								_this.$UTILS.showPrompt('选取成功！')
							}
						}
					},
					fail: e => {
						_this.$UTILS.showPrompt('选取失败！')
						this.uploadError(index, e);
					},
					complete: res => {
						uni.hideLoading();
						_this.uploading = false;
						// _this.uploadFile(index + 1);
						// this.$emit('on-change', res, index, this.lists, this
						// .index);
					}
				});
				task.onProgressUpdate(res => {
					// if (res.progress > 0) {
					// 	this.lists[index].progress = res.progress;
					// 	this.$emit('on-progress', res, index, this.lists, this.index);
					// }
					_this.progress = res.progress;
					console.log('onProgressUpdate', res)
					uni.showLoading({
						title: '选取中'
					})
				});
			},
		})
	},
	remove(index) {
		uni.showModal({
			title: '提示',
			content: '是否删除该图片或视频？',
			success: (res) => {
				if (res.confirm) {
					this.imgArr.splice(index, 1);
					this.imgymxs.splice(index, 1);
					console.log('this.imgarr', this.imgArr)
				}
			}
		})
	},
}
}
</script>
<style>
.project-content {
padding: 10rpx 20rpx;
border-radius: 20rpx;
background: #fff;
width: 90%;
margin: 0 auto;
}

.background {
z-index: -1;
position: fixed;
width: 100%;
height: 100%;
background-size: 100% 100%;
}
.top {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

.top-icon {
		font-size: 40rpx;
		color: #2d95f4;
	}
.small-title {
		font-size: 38rpx;
		color: #2d95f4;
		margin: 20rpx 0;
	}
</style>
