<template>
    <div class="printboard_upload_modal" :class="[driver__.driver?'showEvents':'']">
		
        <div class="printboard_left_upload modal_left">
            <div class="left_upload_header">
                <div class="upload_header_item">
                    <div class="switch_type_list">
                        <div
							
							class="switch_type_item"
							:class="[openClick == 1 ? 'select_swtich' : '']"
						>
							<span @click.stop="open(1)">{{ $t('PrintboardUpload.Upload') }}</span>
						</div>
						<div
							
							class="switch_type_item"
							:class="[openClick == 2 ? 'select_swtich' : '']"
						>
							<span @click.stop="open(2)">{{ $t('PrintboardUpload.Library') }}</span>
						</div>
						<div
							
							class="switch_type_item Guide_1_2_1"
							:class="[openClick == 3 ? 'select_swtich' : '',driver__.driver?'showEvents':'']"
						>
							<span @click.stop="open(3)">{{ $t('PrintboardUpload.Generate') }}</span>
							
						</div>
						<div v-show="openClick == 3" class="generalMenu_printModel printMenu">
							<div @click.stop="openPrintModel"><span>{{ scene.name }}<i class="icon iconfont icon-xiala" :class="{forbidden:openMenu}"></i></span>	</div>
							<ul v-show="openMenu">
								<li 
									v-for="item,index in printCatecoryList" 
									class="printModel_item" 
									@click.stop="setSceneList(item)"
									:title="item.value == 'Pattern'?$t('PrintboardUpload.PatternTitle'):
									item.value == 'Logo'?$t('PrintboardUpload.LogoTitle'):
									item.value == 'Slogan'?$t('PrintboardUpload.SloganTitle'):''"
								>{{ item.name }}</li>
							</ul>
						</div>
                    </div>
                </div>
            </div>
             <div v-show="openClick == 1" class="printboard_body">
                <div class="upload_img_body">
                    <div class="upload_item">
                        <div :class="['upload_file_item']" v-for="(file, index) in fileList" :key="file">
                            <div class="upload_file_img_block">
                                <div class="upload_file_item_content" v-show="file?.status === 'uploading'">
                                    <a-spin  :indicator="indicator" tip="Uploading..."/>
                                </div>
                                <div class="upload_file_item_content"  v-show="file?.status === 'done'">
                                    <img  v-lazy="file.imgUrl" class="upload_img" :key="file.imgUrl">
									<sketchCategory :disignTypeList="printCatecoryList" :generateList="fileList" :isSetSketchCategory="true" :item="file" ></sketchCategory>

                                    <div class="delete_like_file_block" @click.stop="deleteFile(file)">
										<span
											class="icon iconfont icon-shanchu"
										></span>
									</div>
                                </div>
                            </div>
                            <!-- <div class="pin_block" v-show="file?.status === 'done'">
                                <a-checkbox v-model:checked="file.pin">{{ $t('PrintboardUpload.PIN') }}</a-checkbox>
                            </div> -->
                            
                        </div>
                        <div class="upload_file_item upload_component" v-show="printboardList.length < 16">
                            <a-upload
                                :action="uploadUrl + '/api/element/upload'"
								:capture="null"
                                list-type="picture-card"
                                :before-upload="beforeUpload"
                                :data="{
                                    ...upload
                                }"
                                :headers="{Authorization:token}"
                                v-model:file-list="fileList"
                                :customRequest="function(){}"
								:multiple="!driver__.driver"
                                :maxCount="16 - printboardList.length+fileList.length"
                                accept=".jpg,.png,.jpeg,.bmp"
                                @change="fileUploadChange"
                                >
								<div
                                    class="upload_tip_block"
									v-show="printboardList.length < 16"
                                >
                                    <i class="fi fi-br-upload"></i>
                                    <!-- <img class="upload_img_icon" src="@/assets/images/homePage/add_file.png"> -->
                                </div>
                            </a-upload>
                        </div>
                    </div>
                </div>
				<div class="upload_max_tip">
					<span class="icon iconfont icon-zhuyi"></span>
					<span>{{ $t('PrintboardUpload.Maximum') }}</span>
				</div>
            </div>
			<Material v-show="openClick == 2" 
				ref="Material" 
				msg="Printboard" 
				@setLibrary = setSetchboardGenerate 
				@confirmSelect="confirmSelect"
				:disignTypeList="printCatecoryList"
				></Material>
			<Generate v-show="openClick == 3" ref="Generate" :scene="scene" :sketchCatecoryList="printCatecoryList" msg="Printboard"></Generate>
        </div>
		<div class="modal_right">
			<div class="modal_layout">
				<div class="modal_text">
					<div>{{ $t('PrintboardUpload.Thumbnail') }}</div>
					<!-- <div class="modal_btn started_btn" @click="layout()">layout</div> -->
				</div>
				<!-- <div class="modal_img">
					<div class="modal_img_item" v-for="item,index in printboardList" :key="item" @click.stop="deleteFile(item)">
						<img v-lazy="item.imgUrl">
						<div class="checked" >
							<i class="fi fi-rr-trash"></i>
						</div>
					</div>
				</div> -->
			</div>
			<div class="modal_accomplish">
				<div class="modal_img">
					<div v-for="item,index in printboardList" :key="item" class="modal_imgItem Guide_1_2_9" :class="[driver__.driver?'showEvents':'']" >
						<img v-lazy="item.imgUrl">
						<sketchCategory :disignTypeList="printCatecoryList" :generateList="printboardList" :isSpread="true" :item="item" ></sketchCategory>
						<!-- 在sketch 和print暂时关闭like -->
						<!-- <div
							class="delete_like_file_block left1"
							:class="[driver__.driver?'hideEvents':'']"
						>
							<i v-if="!item.like || item.libraryChecked" class="fi fi-rr-heart" @click.stop="likeFile(item,'like')"></i>
							<i v-else class="fi fi-sr-heart" :adminLike="!!item.like" @click.stop="likeFile(item,'noLike')"></i>
						</div> -->
						
						<!-- <div class="delete_like_file_block left"  :class="[driver__.driver?'hideEvents':'']">
							<i class="fi fi-bs-expand-arrows-alt" @click.stop="scaleImage(index)"></i>
						</div>
						<div class="delete_like_file_block" :title="t('LibraryPage.Delete')" @click.stop="deleteFile(item)">
							<span class="icon iconfont icon-shanchu operate_icon"></span>
						</div> -->
						<div class="pin_block">
							<label @click="()=>{if(!item?.pin)item.pin = false;item.pin = !item.pin}">
								<i v-if="item.pin" class="fi fi-rr-check"></i>
								<i v-else class="fi noCheck"></i>
								<span>PIN</span>
							</label>
						</div>
						<div class="moreBox" @click.stop> 
							<more :moreList="['edit','down','enlargement','delete']" :item="item" :index="index" @deleteFile="deleteFile" @scaleImage="scaleImage"></more>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 取消请求 -->
		<scaleImage ref="scaleImage"></scaleImage>
        <Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" @closeCropper="deletUploadFile()" :cropperFileData="cropperFileData" :isUpload="isUpload"></Cropper>
    </div>
</template>
<script lang="ts">
import { defineComponent,h,ref,computed,inject,createVNode,provide, nextTick } from 'vue'
import { LoadingOutlined } from '@ant-design/icons-vue';
import {getCookie} from '@/tool/cookie'
import {getUploadUrl} from '@/tool/util'
import {useStore} from 'vuex'
import { Https } from "@/tool/https";
import { Modal,message,Upload} from 'ant-design-vue';
import Cropper from '@/component/HomePage/Cropper.vue'
import Material from '@/component/HomePage/Material.vue'
import Generate from "@/component/HomePage/Generate.vue";
import GO from "@/tool/GO";
import { useI18n } from 'vue-i18n';
import { openGuide,driverObj__ } from "@/tool/guide";
import scaleImage from "@/component/HomePage/scaleImage.vue";
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import sketchCategory from "@/component/HomePage/sketchCategory.vue";
import axios from 'axios'
import generalMenu from "@/component/HomePage/generalMenu.vue";
import { overflow } from 'html2canvas/dist/types/css/property-descriptors/overflow';
import more from './more.vue'

export default defineComponent({
    components:{
        Cropper,
        Material,
		Generate,
		scaleImage,
		generalMenu,
		sketchCategory,
		more,
    },
    setup(){
        let store:any =useStore()
        let fileList:any = ref([]),//选中的文件id数据
            printImgList:any = ref([]), //print的印花图片
            moodBoards:any = computed(()=>{return store.state.UploadFilesModule.moodboard})
        let openClick: any = ref(1);
		let driver__:any = inject('driver__')
		let {t} = useI18n()
		let isTest = ref()
		let userInfo:any = {}
		let useGenerate:any = ref({
			imgId : '',
			imgUrl:1,
			checked:false,
			level2Type:'',
			designType:''
		})
		let workspace:any = ref({})
		let scene = ref({
			name:'Pattern',
			value:'Pattern'
		})
		let openMenu = ref(false)
		let printCatecoryList:any = computed(()=>{
			return store.state.UserHabit.printType
		})
        return {
            fileList,
            printImgList,
            moodBoards,
			openClick,
			driver__,
			t,
			isTest,
			userInfo,
			useGenerate,
			workspace,
			scene,
			openMenu,
			printCatecoryList,
        }
    },
    computed:{
       
    },
	watch:{
	},
    data(){
        return {
            swtich_type:'upload',
            indicator : h(LoadingOutlined, {
                style: {
                    fontSize: '2.4rem*1.2)',
                },
                spin: true,
            }),
            upload:{
                isPin:0,
				gender:'',
                level1Type:'Printboard',
                timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
            },
            token:'',
            uploadUrl:'',
            store:useStore(),
            cropperFileData:{name:'',uid:''}, //裁剪的原始文件数据
            currentFileNum:0, //当前上传的文件数
            isUpload:false,
			printboardList:computed(()=>{
				return  useStore().state.UploadFilesModule.printboard
			}),
			isTextarea:false,
			isInputFocus:false,
        }
    },
    mounted(){
		let userInfo:any = getCookie("userInfo")
        this.userInfo = JSON.parse(userInfo);
        this.token = getCookie('token') || ''
		let isTest:any = getCookie('isTest')
        this.isTest =JSON.parse(isTest)
        this.uploadUrl = getUploadUrl()
		this.workspace = computed(()=>{
			return  this.store?.state?.Workspace?.workspace
		})
		let Generate:any = this.$refs.Generate

		if(this.driver__.driver){
			Generate.searchPictureName = 'Elegant floral print for high-fashion attire'
		}else{
			Generate.searchPictureName = ''
		}
    },
     methods:{
		setSetchboardGenerate(item:any){
			this.useGenerate.imgId = item.imgId
			this.useGenerate.imgUrl = item.imgUrl
			this.useGenerate.level2Type = item.level2Type
			this.useGenerate.designType = item.designType
			let Material:any = this.$refs.Material
			let generate:any = this.$refs.Generate

			if(item.designType == 'collection'){
			}else {
				generate.sketchboardList.forEach((item:any) => {
					item.checked = false
				});
			}
		},
		open(num: Number) {
            this.openClick = num;
			let material:any = this.$refs.Material
			if(num == 2){
				material.init('Printboard')
			}
			if(num == 3){
				this.scene = this.printCatecoryList[0]
				nextTick().then(()=>{
					if(this.driver__.driver){
						driverObj__.moveNext()
					}
				})
			}
        },
        fileUploadChange(data:any){
            let file = data.file
			
			// let res = JSON.parse(data?.xhr?.response);
			file.id_ = GO.id++
			file.type_ = {
				type1:'upload',
				type2:'Printboard'
			};
			file.pin = false;
			// file.id = res.data.id?res.data.id:""
            let Cropper:any = this.$refs.Cropper
            if(this.currentFileNum === 1){
                var reader = new FileReader();
				
                reader.onload = (e:any) => {
                    let data_new;
                    if (typeof e.target.result === 'object') {
                    // 把Array Buffer转化为blob 如果是base64不需要
                    data_new = window.URL.createObjectURL(new Blob([e.target.result]));
                    } else {
                    data_new = e.target.result;
                    }
                    Cropper.getOptionImg(data_new)
					
					
                };
                // 转化为base64
                // reader.readAsDataURL(file)
                // 转化为blob
                reader.readAsArrayBuffer(file.originFileObj);
                this.cropperFileData = file
                Cropper.changeShowModal(true)
				nextTick().then(()=>{
					if(this.driver__.driver){
						driverObj__.moveNext()
					}
				})
            }else{
                this.customRequest(file)
            }
        },

        beforeUpload(file:any,fileList:any){
            const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
            if (!isJpgOrPng) {
                message.info(this.t('PrintboardUpload.jsContent1'));
            }
            const isLt2M = file.size / 1024 / 1024 < 5;
            if (!isLt2M) {
                message.info(this.t('PrintboardUpload.jsContent2'));
            }
            if(isJpgOrPng && isLt2M){
                this.currentFileNum = fileList.length
            }else{
                return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
            }
            
        },

        deleteFile(item:any){
            // this.fileList.splice(item, 1)
            // this.store.commit('setPrintboardFile',this.fileList)
			if(item.type_.type1 == 'generate' || item.type_.type1 == 'material'){
				item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:16})
				item.state = 'delete'
				this.store.commit("addGenerateMaterialFils", item);
			}else{
				this.fileList = this.store.state.UploadFilesModule.printboardFiles
				let moodboard 
				this.store.state.UploadFilesModule.printboardFiles.forEach((items:any,index:Number)=>{
					if(items.id_ == item.id_){
						moodboard = index
						
					}
				})
				this.fileList.splice(moodboard,1)
				this.store.commit("setPrintboardFile", this.fileList);
			}
        },
		likeFile(item:any,str:string){
			if(str == 'like'){
				let data = {
					generateDetailId:item.id,
					level1Type:"Printboard",
					level2Type: item.categoryValue,
					gender:this.workspace.sexEnum.value,
					timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
				}
				Https.axiosPost(Https.httpUrls.generateLike, data).then(
					(rv) => {
						item.like = true
					}
				).catch(res=>{
				});
			}else{
				let data = {
					generateDetailId:item.id,
					timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
				}
				Https.axiosGet(Https.httpUrls.generateDislike, {params:data}).then(
					(rv) => {
						item.like = false
					}
				).catch(res=>{
				});
			}

		},
        
        customRequest(data:any){
            let new_data = {
                ...this.upload,
                file:data.originFileObj
            }
            let fileUid = data.uid
            Https.axiosPost('/api/element/upload', new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
                (rv: any) => {
                    if (rv) {
                        for(let file of this.fileList){
                            if(fileUid === file.uid){
                                file.status = 'done'
                                file.imgUrl = rv.url
                                file.pin = false
                                file.id = rv.id
								file.category = this.printCatecoryList[0].name
								file.categoryValue = this.printCatecoryList[0].value
                                file.resData = rv
								
                            }
                        }
                        let fileList = this.fileList.filter((v:any)=> v.status === 'done')
                        this.store.commit('setPrintboardFile',fileList)
                    }
                }
            ).catch((res)=>{
                let index = -1
                this.fileList.forEach((ele:any,index1:any) => {
                    if(fileUid === ele.uid){
                        index = index1
                    }
                });
                if(index > -1){
                    this.fileList.splice(index, 1)
                }
            });
        },

        closeCropper(type:any){
            if(this.isUpload){
                return
            }
            if(type == 'error'){
                let index = -1
                this.fileList.forEach((ele:any,index1:any) => {
                    if(this.cropperFileData.uid === ele.uid){
                        index = index1
                    }
                });
                if(index > -1){
                    this.fileList.splice(index, 1)
                }
            }
            let Cropper:any = this.$refs.Cropper
            Cropper.closeCropper()

        },

        deletUploadFile(){
            let index = -1
            this.fileList.forEach((ele:any,index1:any) => {
                if(this.cropperFileData.uid === ele.uid){
                    index = index1
                }
            });
            if(index > -1){
                this.fileList.splice(index, 1)
            }
        },


        handleCropperSuccess(event:any){
            let {file, fileData} =event
            let new_data = {
                ...this.upload,
                file:file
            }
            if(this.isUpload){
                return
            }
            this.isUpload = true
            const hide = message.loading('loading', 0);
            Https.axiosPost('/api/element/upload', new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
                (rv: any) => {
                    for(let file of this.fileList){
                        if(fileData.uid === file.uid){
                            file.status = 'done'
                            file.imgUrl = rv.url
                            file.id = rv.id
                            file.resData = rv
							file.category = this.printCatecoryList[0].name
							file.categoryValue = this.printCatecoryList[0].value
                        }
                    }
                    let fileList = this.fileList.filter((v:any)=> v.status === 'done')
                    this.isUpload = false
                    this.closeCropper('success')
                    this.cropperFileData = {name:'',uid:''}
                    this.store.commit('setPrintboardFile',fileList)
                    hide()
					nextTick().then(()=>{
						if(this.driver__.driver){
							driverObj__.moveNext()
						}
					})
                }
            ).catch(res=>{
                let index = -1
                this.fileList.forEach((ele:any,index1:any) => {
                    if(fileData.uid === ele.uid){
                        index = index1
                    }
                });
                if(index > -1){
                    this.fileList.splice(index, 1)
                }
                this.cropperFileData = {name:'',uid:''}
                this.isUpload = false
                this.closeCropper('error')
                hide()
            });
        },

        openSetData(){
			this.useGenerate = {
				imgId : '',
				imgUrl:1,
				checked:false,
				level2Type:'',
				designType:'',
			}
            let arr = JSON.parse(JSON.stringify(this.store.state.UploadFilesModule.allBoardData.printboardFiles)) || []
			let setboard = {
				generate:[] as any,
				material:[] as any,
				moodboard:[] as any,
			}
			arr.forEach((v:any)=>{
				v.pin = v.pin == 1?true:false
				this.printCatecoryList.forEach((item:any) => {
					if(v.level2Type == item.value){
						v.category=item.name
						v.categoryValue=item.value
					}
				});
				if(v.type_.type1 == 'generate'){
					setboard.generate.push(v)
				}else if(v.type_.type1 == 'material'){
					setboard.material.push(v)
				}else{
					setboard.moodboard.push(v)
				}
			})
			this.store.commit("setPrintboardGenerateFiles", setboard.generate);
			this.store.commit("setPrintboardMaterialFiles", setboard.material);
			this.store.commit("setPrintboardFile", setboard.moodboard);
			this.fileList = setboard.moodboard
            // this.printImgList = JSON.parse(JSON.stringify(this.store.state.UploadFilesModule.allBoardData.generatePrintFiles))
            this.store.commit('setPrintboardFile',this.fileList)
            // this.store.commit('setGeneratePrintFile',this.printImgList)

        },

        confirmSelect(event:any){
            for(let item of event){
                let data = {
                    imgUrl:item.url,
                    resData:item,
                    pin:false,
                    id:item.id,
                    status:'done',
                }
                if(this.fileList.length == 15){
                    message.warning(this.t('PrintboardUpload.jsContent3'))
                    break
                }
                this.fileList.push(data)
            }
            this.store.commit('setPrintboardFile',this.fileList)
            
        },
		scaleImage(index:any){
			let scaleImage:any = this.$refs.scaleImage
			scaleImage.isLike = false
			scaleImage.init(this.printboardList,index)
		},
		setSceneList(data:any){
			if(this.scene.value === data.value) return
			this.scene = data
			let generate:any = this.$refs.Generate
			generate.sketchboardList = []
			generate.searchPictureName = ''
			this.openMenu = false
		},
		openPrintModel(){
			if(this.openMenu)return
			document.addEventListener('click',this.removePrintModel)
			this.openMenu = true
		},
		removePrintModel(){
			this.openMenu = false
			document.removeEventListener('click',this.removePrintModel)
		}
     }

})
</script>
<style lang="less" scoped>
.printboard_upload_modal{
    // padding: calc(1rem*1.2) calc(1rem*1.2) calc(1.8rem*1.2) calc(1rem*1.2);
	height: 100%;
    flex: 1;
    display: flex;
	justify-content: space-between;
	.modal_left,.modal_right{
		background: #f7f8fa;
		border-radius: 3rem;
		padding: 2rem 3rem;
	}
    .printboard_left_upload{
		display: flex;
		flex-direction: column;
		margin-right: 2rem;
		width: 71rem;
        .switch_type_list {
            display: flex;
            align-items: center;
            position: relative;
			z-index: 11;
            .switch_type_item {
                display: flex;
                align-items: center;
                // padding: 0 2rem*1.2);
                height: calc(4rem*1.2);
                border-radius: calc(0.8rem*1.2);
                line-height: calc(4rem*1.2);
                font-size: var(--aida-fsize1-8);
                // margin-right: 2.2rem*1.2);
                margin-right: calc(8rem*1.2);
                color: #000;
                cursor: pointer;
                position: relative;
                text-align: center;
                transform-origin: left;
                transform: scale(1);
                transition: 0.3s all;
                &.switch_type_item::before {
                    position: absolute;
                    content: "";
                    display: block;
                    background: #000;
                    height: calc(.3rem*1.2);
                    left: 50%;
                    transform: translateX(-50%);
                    bottom: calc(.6rem*1.2);
                    width: 0px;
                    transition: 0.3s all;
                }
                &.select_swtich {
                    color: #000;
                    // font-weight: 900;
                    transform: scale(1.15);
                }
                &.select_swtich::before {
                    width: 100%;
                }
				
                .switch_icon {
                    font-size: calc(1.8rem*1.2);
                    margin-right: calc(0.8rem*1.2);
                }
            }
			.printMenu{
				margin-right: 0;
				margin-top: auto;
				position: relative;
				margin-left: 2rem;
				>div{
					width: 14rem;
					font-size: var(--aida-fsize1-6);
					border: 0;
					i{
						transition: all .3s;
						display: inline-block;
						margin-left: 1rem;
					}
					.forbidden{
						transform: rotate(180deg);
					}
				}
				ul{
					width: 14rem;
				}
			}
			.switch_type_item:nth-child(3){
				margin: 0;
			}
        }

        .printboard_body{
			display: flex;
			flex-direction: column;
            // height: calc(100% - 5rem*1.2));
			flex: 1;
			padding-top: calc(2.5rem*1.2);
			height: calc(30rem*1.2);
			overflow-x: hidden;
			&.printboard_body::-webkit-scrollbar {
            display: none;
        }
            .upload_img_body{
                height: calc(100% - 3rem*1.2);
                overflow-y: auto;
                margin-bottom: calc(1rem*1.2);
				&.upload_img_body::-webkit-scrollbar {
					display: none;
				}
            }
		
            .upload_file_item{
				// margin: 0 2rem*1.2) 2rem*1.2) 0;
				display: inline-block;
				// width: 10rem;
				// height: 10rem;
				width: calc(25% - 2rem);
				aspect-ratio: 1 / 1;
				border: 1px solid #f5f5f5;
				vertical-align: top;
				position: relative;
				text-align: center;
				img{
					width: auto;
					object-fit: cover;
					height: 100%;
					max-width: 100%;
				}

              .upload_file_img_block{
				height: 100%;
			  }

                &.upload_component{
                }
				.checked{
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					cursor: pointer;
					display: none;
					justify-content: center;
					align-items: center;
				}
				&.modal_img_item:hover .checked{
				display: flex;
				}
				.upload_file_item_content{
					display: flex;
					align-items: center;
					justify-content: center;
					height: 100%;
					position: relative;
					cursor: pointer;
					.upload_img{
						display: block;
						max-height: 100%;
						width: auto;
						max-width: 100%;
						object-fit: cover;
					}
					&:hover .more{
						display: block;
					}
				}
			}
			.upload_max_tip {
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: calc(1.4rem*1.2);
                color: #030303;

                .icon-zhuyi {
                    font-size: calc(1.6rem*1.2);
                    margin-right: calc(0.7rem*1.2);
                }
            }
        }
    }
	
	.modal_right{
		flex: 1;
		display: flex;
		flex-direction: column;
		overflow: hidden;
		.modal_layout{
			.modal_text{
				font-size: var(--aida-fsize1-4);
				font-weight: 400;
				color: rgba(0, 0, 0, 0.45);
				display: flex;
				align-items: center;
				justify-content: space-between;
			}
		}
		.modal_layout{
			padding-bottom: 4.8rem;
			.modal_img{
				width: calc(40rem*1.2);
				height: calc(5rem*1.2);
				overflow-x: hidden;
				display: flex;
				flex-direction: row;
				&.modal_img::-webkit-scrollbar {
					display: none;
				}
				.modal_img_item{
					width: calc(4rem*1.2);
					height: calc(4rem*1.2);
					margin: 0 calc(1rem*1.2) calc(1rem*1.2) 0;
					position: relative;
					cursor: pointer;
					text-align: center;
					overflow: hidden;
					img{
						width: auto;
						height: 100%;
						object-fit: cover;
						max-width: 100%;
					}
					.checked{
						position: absolute;
						top: 0;
						left: 0;
						width: 100%;
						height: 100%;
						cursor: pointer;
						display: none;
						justify-content: center;
						align-items: center;
					}
					&.modal_img_item:hover .checked{
						display: flex;
					}
				}
				
			}
		}
		.modal_accomplish{
			// margin-top: 2rem*1.2);
			overflow-x: hidden;
			height: calc(30rem*1.2);
			display: flex;
			flex-direction: column;
			flex: 1;
			position: relative;
			.mark_loading{
				position: absolute;
				width: 100%;
				height: 100%;
				z-index: 99;
			}
            // overflow-x: hidden;
			&.modal_accomplish::-webkit-scrollbar {
                display: none;
            }
			.modal_text{
				padding-top: calc(2rem*1.2);
				padding-block: calc(2rem*1.2);
			}
			.modal_img{
				flex: 1;
				display: flex;
				flex-wrap: wrap;
				justify-content: flex-start;
				position: relative;
				align-content: flex-start;
				.modal_imgItem:hover .more{
					// display: block;
					opacity: 1;
				}
				.modal_imgItem{
					margin: 1rem;
					margin-bottom: 5rem;
					display: inline-block;
					// width: calc(10rem*1.2);
					// height: calc(10rem*1.2);
					width: calc(33.33% - 2rem);
					aspect-ratio: 1 / 1;
					border: 1px solid #f5f5f5;
					position: relative;
					cursor: pointer;
					text-align: center;
					overflow: hidden;
					.moreBox{
						position: absolute;
						right: 1rem;
						top: 1rem;
						// opacity: 0;
						width: 3.5rem;
						height: 3.5rem;
						transition: all 0.3s ease-in-out;
					}
					&.modal_imgItem:nth-child(even) {
					}
					img{
						object-fit: cover;
						height: 100%;
						max-width: 100%;
						width: auto;
					}
					.pin_block{
						position: absolute;
						left: 1rem;
						top: 1rem;
						width: 8rem;
						height: 3.5rem;
						border-radius: 3rem;
						background: rgba(0,0,0,.7);
						color: #fff;
						>label{
							width: 100%;
							height: 100%;
							display: flex;
							align-items: center;
							justify-content: space-between;
							cursor: pointer;
							padding-right: 1rem;
							padding-left: .2rem;
						}
						i{
							width: 3rem;
							height: 3rem;
							border-radius: 50%;
							display: flex;
							align-items: center;
							justify-content: center;
							font-size: 2rem;
							background: #000;
							&.noCheck{
								background: inherit;
								border: 2px solid #fff;
							}
						}
						span{
							font-size: 1.8rem;
							font-weight: 600;
						}
					}
					&.active{
						opacity: 0.5;
					// border: 2px solid;
						border-radius: calc(1rem*1.2);
						transform: scale(0.9);
						img {
						}
						
						.more{
							pointer-events:none
						}
					}
				}
			}
		}
	}
}


</style>
