2023-08-05 12:52:56 +08:00
|
|
|
<template>
|
2024-12-11 16:26:36 +08:00
|
|
|
<div ref="layoutModal">
|
2023-08-05 12:52:56 +08:00
|
|
|
<a-modal
|
2024-05-22 10:45:52 +08:00
|
|
|
class="layout_modal generalModel"
|
2023-08-05 12:52:56 +08:00
|
|
|
v-model:visible="layout"
|
|
|
|
|
:footer="null"
|
2024-12-11 16:26:36 +08:00
|
|
|
:get-container="() => $refs.layoutModal"
|
2024-01-10 14:09:44 +08:00
|
|
|
width="78%"
|
2023-08-05 12:52:56 +08:00
|
|
|
:maskClosable="false"
|
|
|
|
|
:centered="true"
|
|
|
|
|
:closable="false"
|
2023-11-28 16:21:00 +08:00
|
|
|
:keyboard="false"
|
2025-06-26 15:41:08 +08:00
|
|
|
:mask="true"
|
2023-08-21 10:55:39 +08:00
|
|
|
:destroyOnClose="true"
|
2023-08-05 12:52:56 +08:00
|
|
|
>
|
|
|
|
|
<div class="layout_content">
|
2023-09-12 10:11:27 +08:00
|
|
|
<div class="collection_title">
|
|
|
|
|
<div class="collection_title_text">
|
2023-10-30 17:26:36 +08:00
|
|
|
<div class="layout_title">{{ $t('layout.MoodBoardDesign') }}</div>
|
2023-09-12 10:11:27 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-05-22 10:45:52 +08:00
|
|
|
<div class="generalModel_btn">
|
|
|
|
|
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
2025-08-22 10:27:48 +08:00
|
|
|
<svg width="100%" height="100%" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2024-12-11 16:26:36 +08:00
|
|
|
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3"/>
|
|
|
|
|
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
|
|
|
|
|
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
|
|
|
|
|
</svg>
|
2024-05-22 10:45:52 +08:00
|
|
|
</div>
|
2023-09-12 10:11:27 +08:00
|
|
|
</div>
|
2023-08-05 12:52:56 +08:00
|
|
|
<div class="layout_nav">
|
2024-09-11 16:36:08 +08:00
|
|
|
<div v-for="item,index in layoutList" :key="item" :class="{active:item.setPitch}" @mousedown="setpitch(item,index)" @touchstart.passive="setpitch(item,index)">
|
2023-08-05 12:52:56 +08:00
|
|
|
<img :src="item.imgUrl">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-21 10:55:39 +08:00
|
|
|
<div class="layout_centent" :class="{active:flex_direction}" id="layoutCentent">
|
2025-12-01 15:29:20 +08:00
|
|
|
<div v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="item" @mousedown="setpitch(item,index)" @touchstart="setpitch(item,index)" ref="content" :style="{'background-image':`url(${item.imgUrl})`,'transform':`scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}">
|
|
|
|
|
<!-- <img crossOrigin="anonymous" :src="item.imgUrl" :style="{'transform':`translate(-50%, -50%) scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}" draggable="false" :class="moodbClassName[index]" v-modelImg> -->
|
2023-08-21 10:55:39 +08:00
|
|
|
<ul v-show="item.setPitch" class="layout_btn" >
|
|
|
|
|
<li class="layout_btn_top" v-compile.stop="'top'"></li>
|
|
|
|
|
<li class="layout_btn_bottom" v-compile.stop="'bottom'"></li>
|
|
|
|
|
<li class="layout_btn_left" v-compile.stop="'left'"></li>
|
|
|
|
|
<li class="layout_btn_right" v-compile.stop="'right'"></li>
|
2024-09-25 11:07:49 +08:00
|
|
|
<li class="layout_rotote" v-rotote.stop='item' :style="{'transform':`translate(-50%, -50%) rotateZ(${item.angle}deg)`}"></li>
|
2023-08-21 10:55:39 +08:00
|
|
|
<li class="layout_translate" v-translate.stop></li>
|
|
|
|
|
<!-- <li class="layout_translate" v-translate.stop></li> -->
|
|
|
|
|
<li class="layout_angle_tr" v-angle.stop = "'top'"></li>
|
|
|
|
|
<li class="layout_angle_tl" v-angle.stop = "'right'"></li>
|
|
|
|
|
<li class="layout_angle_br" v-angle.stop = "'bottom'"></li>
|
|
|
|
|
<li class="layout_angle_bl" v-angle.stop = "'left'"></li>
|
|
|
|
|
</ul>
|
2023-08-05 12:54:08 +08:00
|
|
|
</div>
|
2023-08-21 10:55:39 +08:00
|
|
|
<!-- <img v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="item" :src="item.imgUrl"> -->
|
2023-08-05 12:54:08 +08:00
|
|
|
<!-- <draggable
|
2023-08-05 12:52:56 +08:00
|
|
|
v-model="layoutList"
|
|
|
|
|
group="people"
|
|
|
|
|
@start="drag=true"
|
|
|
|
|
@end="drag=false"
|
|
|
|
|
animation= "150"
|
|
|
|
|
item-key="id">
|
|
|
|
|
<template #item="{element,index}">
|
|
|
|
|
<div :data-id="element.id_" :class="moodbClassName[index]" class="modal_imgItem">
|
|
|
|
|
<img :src="element.imgUrl">
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2023-08-05 12:54:08 +08:00
|
|
|
</draggable> -->
|
2023-08-05 12:52:56 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layout_left">
|
2023-11-02 11:00:38 +08:00
|
|
|
<div class="layout_left_text">
|
|
|
|
|
{{ $t('layout.LayerOptions') }}
|
|
|
|
|
</div>
|
2023-08-05 12:52:56 +08:00
|
|
|
<div v-for="item,index in moodbList" class="layout_left_items" @click="setmoodb(item)">
|
|
|
|
|
<div v-for="clasitem,clasindex in item" :class="clasitem" class="layout_left_item">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-09-06 13:48:16 +08:00
|
|
|
<div class="layout_right" v-show="isMobile">
|
|
|
|
|
<div class="layout_right_text">
|
|
|
|
|
{{ $t('DesignPrintOperation.Scale') }}
|
|
|
|
|
</div>
|
|
|
|
|
<a-slider
|
|
|
|
|
v-model:value="moodItemScale"
|
|
|
|
|
@change="setMoodItemScale"
|
|
|
|
|
>
|
|
|
|
|
</a-slider>
|
|
|
|
|
</div>
|
2023-08-21 10:55:39 +08:00
|
|
|
<!-- <div class="layout_right">
|
2023-08-05 12:52:56 +08:00
|
|
|
<div v-for="item,index in moodbList" class="layout_left_items" @click="setmoodb(item)">
|
|
|
|
|
<div v-for="clasitem,clasindex in item" :class="clasitem" class="layout_left_item">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-21 10:55:39 +08:00
|
|
|
</div> -->
|
2023-08-05 12:52:56 +08:00
|
|
|
<div
|
|
|
|
|
class="button_second submit_button"
|
|
|
|
|
@click="submitTemplate()"
|
|
|
|
|
>
|
2023-10-30 17:26:36 +08:00
|
|
|
{{ $t('layout.Submit') }}
|
2023-08-05 12:52:56 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-12 10:11:27 +08:00
|
|
|
<div class="mark_loading" v-show="loadingShow">
|
|
|
|
|
<a-spin size="large" />
|
|
|
|
|
</div>
|
|
|
|
|
<a-upload
|
2024-01-27 15:20:23 +08:00
|
|
|
:capture="null"
|
2023-09-12 10:11:27 +08:00
|
|
|
:action="uploadUrl + '/api/element/upload'"
|
|
|
|
|
list-type="picture-card"
|
|
|
|
|
:data="{
|
|
|
|
|
...upload,
|
|
|
|
|
}"
|
|
|
|
|
:headers="{ Authorization: token }"
|
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
|
multiple
|
|
|
|
|
accept=".jpg,.png,.jpeg,.bmp"
|
|
|
|
|
>
|
|
|
|
|
</a-upload>
|
2023-08-05 12:52:56 +08:00
|
|
|
</a-modal>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-09-12 10:11:27 +08:00
|
|
|
import { defineComponent, h, ref ,computed,reactive, nextTick} from "vue";
|
2023-12-15 15:23:34 +08:00
|
|
|
// import { LoadingOutlined } from "@ant-design/icons-vue";
|
2023-08-05 12:52:56 +08:00
|
|
|
import { useStore } from "vuex";
|
2023-08-21 10:55:39 +08:00
|
|
|
import GO from "@/tool/GO";
|
2023-08-05 12:52:56 +08:00
|
|
|
import moodb from "@/tool/moodb";
|
|
|
|
|
import draggable from 'vuedraggable'
|
2023-09-12 10:11:27 +08:00
|
|
|
import { Https } from "@/tool/https";
|
|
|
|
|
import { getCookie } from "@/tool/cookie";
|
2023-08-21 10:55:39 +08:00
|
|
|
import domTurnImg from '@/tool/domTurnImg'
|
2023-09-12 10:11:27 +08:00
|
|
|
import { getUploadUrl } from "@/tool/util";
|
2024-09-06 13:48:16 +08:00
|
|
|
import { getMousePosition } from "@/tool/mdEvent";
|
2023-08-05 12:52:56 +08:00
|
|
|
export default defineComponent({
|
|
|
|
|
props:["moodb_className",'flex_direction'],
|
|
|
|
|
components: {
|
|
|
|
|
draggable
|
|
|
|
|
},
|
|
|
|
|
setup(prop) {
|
2024-08-19 10:36:46 +08:00
|
|
|
let store = useStore()
|
2023-08-05 12:52:56 +08:00
|
|
|
let layout: any = ref(false);
|
|
|
|
|
let templateFileList: any = ref([]);
|
|
|
|
|
let openClick: any = ref(1);
|
|
|
|
|
let drag = false;
|
2023-08-21 10:55:39 +08:00
|
|
|
let layoutList:any = ref([])
|
2024-08-19 10:36:46 +08:00
|
|
|
const content:any = ref<HTMLElement | null>(null);
|
2023-09-12 10:11:27 +08:00
|
|
|
let loadingShow = ref(false)
|
2024-09-27 16:31:33 +08:00
|
|
|
let styleObj:any = {}
|
2024-09-06 13:48:16 +08:00
|
|
|
let moodItemScale = ref(0)
|
2024-08-19 10:36:46 +08:00
|
|
|
let domObj = {
|
|
|
|
|
dom:['img','ul','.layout_rotote','.layout_translate','.layout_angle_tr','.layout_angle_tl','.layout_angle_br','.layout_angle_bl'],
|
|
|
|
|
domStyle:['imgStyle','borStyle','rototeStyle','translateStyle','angleTRStyle','angleTLStyle','angleBRStyle','angleBLStyle'],
|
|
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let isMobile = ref(false)
|
2023-08-05 12:52:56 +08:00
|
|
|
return {
|
|
|
|
|
layout,
|
|
|
|
|
templateFileList,
|
|
|
|
|
openClick,
|
|
|
|
|
drag,
|
2023-08-21 10:55:39 +08:00
|
|
|
layoutList,
|
2023-08-23 17:50:09 +08:00
|
|
|
content,
|
2024-08-19 10:36:46 +08:00
|
|
|
loadingShow,
|
2024-09-06 13:48:16 +08:00
|
|
|
moodItemScale,
|
2024-08-19 10:36:46 +08:00
|
|
|
styleObj,
|
|
|
|
|
domObj,
|
2024-09-06 13:48:16 +08:00
|
|
|
isMobile,
|
2023-08-05 12:52:56 +08:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-08-21 10:55:39 +08:00
|
|
|
// moodTemplateId: "", //模板id
|
2023-08-05 12:52:56 +08:00
|
|
|
store: useStore(),
|
|
|
|
|
|
|
|
|
|
moodb : moodb.moodb_,
|
|
|
|
|
moodbList:{},
|
|
|
|
|
moodbClassName:[],
|
2023-08-21 10:55:39 +08:00
|
|
|
setabsolute:false,
|
2023-09-12 10:11:27 +08:00
|
|
|
token: "",
|
|
|
|
|
uploadUrl: "",
|
2024-09-06 13:48:16 +08:00
|
|
|
moodIndex:0,
|
2023-09-12 10:11:27 +08:00
|
|
|
upload: {
|
|
|
|
|
isPin: 0,
|
2023-12-11 15:22:55 +08:00
|
|
|
gender:'',
|
2023-09-12 10:11:27 +08:00
|
|
|
level1Type: "Moodboard",
|
|
|
|
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
|
|
|
},
|
2023-08-05 12:52:56 +08:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mounted() {
|
2023-09-12 10:11:27 +08:00
|
|
|
this.token = getCookie("token") || "";
|
|
|
|
|
this.uploadUrl = getUploadUrl();
|
2023-08-05 12:52:56 +08:00
|
|
|
},
|
|
|
|
|
directives:{
|
2023-08-21 10:55:39 +08:00
|
|
|
//操作移动
|
2023-08-05 12:52:56 +08:00
|
|
|
layout:{
|
2023-08-21 10:55:39 +08:00
|
|
|
mounted (el,layout:any,binding) {
|
2024-09-03 16:39:06 +08:00
|
|
|
|
2024-09-06 13:48:16 +08:00
|
|
|
let mousedown = function(event: MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseDownOperation(e)
|
2024-09-03 16:39:06 +08:00
|
|
|
}
|
2024-09-04 10:27:45 +08:00
|
|
|
|
2024-09-06 13:48:16 +08:00
|
|
|
let touchstart = function(event: any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseDownOperation(e)
|
2024-09-03 16:39:06 +08:00
|
|
|
}
|
2024-09-04 10:27:45 +08:00
|
|
|
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseDownOperation = function(e: MouseEvent){
|
2023-08-21 10:55:39 +08:00
|
|
|
el.parentElement.children.forEach((v:any) => {
|
|
|
|
|
v.style.left = v.offsetLeft+'px'
|
|
|
|
|
v.style.top = v.offsetTop+'px'
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
el.parentElement.children.forEach((v:any) => {
|
|
|
|
|
v.classList.add('active')
|
|
|
|
|
});
|
|
|
|
|
el.style.zIndex = GO.zIndex++
|
|
|
|
|
let left = el.style.left? el.style.left.replace(/px/g,'') : 0
|
|
|
|
|
let top = el.style.top? el.style.top.replace(/px/g,'') : 0
|
|
|
|
|
let mouseX = e.offsetX //鼠标点击位置到domleft距离
|
|
|
|
|
let mouseY = e.offsetY
|
|
|
|
|
let domX = e.clientX - e.offsetX - Number(left)//鼠标到最左侧距离减去鼠标到dom距离再减去已经有的left值
|
|
|
|
|
let domY = e.clientY - e.offsetY - Number(top)
|
|
|
|
|
let mouse = true
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseMove = function(event:MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseMoveOperation(e)
|
2024-09-04 10:27:45 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let touchmove = function(event:any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseMoveOperation(e)
|
2024-09-04 10:27:45 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseMoveOperation = (e:any)=>{
|
2023-08-21 10:55:39 +08:00
|
|
|
if(mouse){
|
2024-09-03 16:39:06 +08:00
|
|
|
el.style.left = e.clientX-mouseX - domX+'px'
|
|
|
|
|
el.style.top = e.clientY-mouseY - domY+'px'
|
2023-08-21 10:55:39 +08:00
|
|
|
if(el.offsetLeft <=0){
|
|
|
|
|
el.style.left = 0+'px'
|
|
|
|
|
}
|
|
|
|
|
if(el.offsetTop <=0){
|
|
|
|
|
el.style.top = 0+'px'
|
|
|
|
|
}
|
|
|
|
|
if(el.offsetLeft+el.offsetWidth >= el.parentNode.offsetWidth){
|
|
|
|
|
el.style.left = el.parentNode.offsetWidth - el.offsetWidth+'px'
|
|
|
|
|
}
|
|
|
|
|
if(el.offsetTop+el.offsetHeight >= el.parentNode.offsetHeight){
|
|
|
|
|
el.style.top = el.parentNode.offsetHeight - el.offsetHeight+'px'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-03 16:39:06 +08:00
|
|
|
let mouseup = function(){
|
2023-08-21 10:55:39 +08:00
|
|
|
mouse = false
|
2024-09-04 10:27:45 +08:00
|
|
|
document.removeEventListener('mousemove',mouseMove)
|
|
|
|
|
document.removeEventListener('touchmove',touchmove)
|
|
|
|
|
document.removeEventListener('mouseup',mouseup)
|
|
|
|
|
document.removeEventListener('touchend',mouseup)
|
2024-09-03 16:39:06 +08:00
|
|
|
//移动端
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
2024-09-03 16:39:06 +08:00
|
|
|
document.addEventListener('mousemove', mouseMove);
|
2024-09-04 10:27:45 +08:00
|
|
|
document.addEventListener('touchmove', touchmove);
|
2024-09-03 16:39:06 +08:00
|
|
|
document.addEventListener('mouseup', mouseup);
|
2024-09-04 10:27:45 +08:00
|
|
|
document.addEventListener('touchend', mouseup);
|
2024-09-03 16:39:06 +08:00
|
|
|
//移动端
|
2023-12-22 15:42:41 +08:00
|
|
|
}
|
|
|
|
|
el.addEventListener('mousedown',mousedown)
|
2024-09-03 16:39:06 +08:00
|
|
|
el.addEventListener('touchstart',touchstart)
|
|
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
},
|
|
|
|
|
updated (el,layout) {
|
|
|
|
|
|
|
|
|
|
}
|
2023-08-21 10:55:39 +08:00
|
|
|
},
|
|
|
|
|
//操作大小
|
|
|
|
|
compile:{
|
|
|
|
|
mounted (el,compile) {
|
2024-09-06 13:48:16 +08:00
|
|
|
let mousedown = (event:any)=>{
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseDownOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let touchstart = (event:any)=>{
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseDownOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let mouseDownOperation = (e: MouseEvent)=>{
|
2023-08-21 10:55:39 +08:00
|
|
|
let elParent = el.parentNode.parentNode
|
|
|
|
|
el.parentElement.parentNode.parentNode.children.forEach((v:any) => {
|
|
|
|
|
v.style.left = v.offsetLeft+'px'
|
|
|
|
|
v.style.top = v.offsetTop+'px'
|
|
|
|
|
});
|
|
|
|
|
el.parentElement.parentNode.parentNode.children.forEach((v:any) => {
|
|
|
|
|
v.classList.add('active')
|
|
|
|
|
});
|
|
|
|
|
if(compile.value == 'right'){
|
|
|
|
|
|
|
|
|
|
}else if(compile.value == 'left'){
|
|
|
|
|
elParent.style.right = elParent.parentNode.offsetWidth - elParent.offsetWidth - elParent.offsetLeft + 'px'
|
|
|
|
|
elParent.style.left = 'auto'
|
|
|
|
|
}else if(compile.value == 'top'){
|
|
|
|
|
elParent.style.bottom = elParent.parentNode.offsetHeight - elParent.offsetHeight - elParent.offsetTop + 'px'
|
|
|
|
|
elParent.style.top = 'auto'
|
|
|
|
|
}else if(compile.value == 'bottom'){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let gpsXY:any
|
|
|
|
|
let parent:any
|
|
|
|
|
if(compile.value == 'left' || compile.value == 'right'){
|
2024-09-06 13:48:16 +08:00
|
|
|
gpsXY = e.clientX
|
2023-08-21 10:55:39 +08:00
|
|
|
parent = elParent.offsetWidth
|
|
|
|
|
}else{
|
|
|
|
|
parent = elParent.offsetHeight
|
2024-09-06 13:48:16 +08:00
|
|
|
gpsXY = e.clientY
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
let mouse = true
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseMove = function(event:MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseMoveOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let touchmove = function(event:any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseMoveOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let mouseMoveOperation = function(e:MouseEvent){
|
2023-08-21 10:55:39 +08:00
|
|
|
if(mouse){
|
|
|
|
|
if(compile.value == 'left'){
|
2024-09-06 13:48:16 +08:00
|
|
|
elParent.style.width = parent + gpsXY - e.clientX + 'px'
|
2023-08-21 10:55:39 +08:00
|
|
|
}else if(compile.value == 'right'){
|
2024-09-06 13:48:16 +08:00
|
|
|
elParent.style.width = parent + e.clientX - gpsXY + 'px'
|
2023-08-21 10:55:39 +08:00
|
|
|
}else if(compile.value == 'top'){
|
2024-09-06 13:48:16 +08:00
|
|
|
elParent.style.height = parent + gpsXY - e.clientY + 'px'
|
2023-08-21 10:55:39 +08:00
|
|
|
}else if(compile.value == 'bottom'){
|
2024-09-06 13:48:16 +08:00
|
|
|
elParent.style.height = parent + e.clientY - gpsXY + 'px'
|
2023-08-21 10:55:39 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(elParent.parentNode.offsetWidth <= elParent.offsetWidth+Number(elParent.style.right.replace(/px/g,''))){
|
|
|
|
|
elParent.style.width = elParent.parentNode.offsetWidth - Number(elParent.style.right.replace(/px/g,''))+'px'
|
|
|
|
|
}
|
|
|
|
|
if(elParent.offsetLeft + elParent.offsetWidth>=elParent.parentNode.offsetWidth){
|
|
|
|
|
elParent.style.width = elParent.parentNode.offsetWidth - elParent.offsetLeft+'px'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(elParent.parentNode.offsetHeight <= elParent.offsetHeight+Number(elParent.style.bottom.replace(/px/g,''))){
|
|
|
|
|
elParent.style.height = elParent.parentNode.offsetHeight - Number(elParent.style.bottom.replace(/px/g,''))+'px'
|
|
|
|
|
}
|
|
|
|
|
if(elParent.offsetTop + elParent.offsetHeight>=elParent.parentNode.offsetHeight){
|
|
|
|
|
elParent.style.height = elParent.parentNode.offsetHeight - elParent.offsetTop+'px'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
|
|
|
|
|
let mouseup = function(){
|
2023-08-21 10:55:39 +08:00
|
|
|
mouse = false
|
2024-09-06 13:48:16 +08:00
|
|
|
document.removeEventListener('mousemove',mouseMove)
|
|
|
|
|
document.removeEventListener('touchmove',touchmove)
|
|
|
|
|
document.removeEventListener('mouseup',mouseup)
|
|
|
|
|
document.removeEventListener('touchend',mouseup)
|
|
|
|
|
//移动端
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
document.addEventListener('mousemove', mouseMove);
|
|
|
|
|
document.addEventListener('touchmove', touchmove);
|
|
|
|
|
document.addEventListener('mouseup', mouseup);
|
|
|
|
|
document.addEventListener('touchend', mouseup);
|
|
|
|
|
}
|
|
|
|
|
el.addEventListener('mousedown',mousedown)
|
|
|
|
|
el.addEventListener('touchstart',touchstart)
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//操作旋转
|
|
|
|
|
rotote:{
|
2024-09-06 13:48:16 +08:00
|
|
|
mounted(el,item){
|
2023-08-21 10:55:39 +08:00
|
|
|
let mouse = true;
|
|
|
|
|
let angle :any = 0
|
2024-09-25 11:07:49 +08:00
|
|
|
let num:any = 1
|
2023-09-12 10:11:27 +08:00
|
|
|
let x = 0
|
|
|
|
|
let y = 0
|
2023-08-21 10:55:39 +08:00
|
|
|
let elParent = el.parentNode.parentNode
|
2024-09-06 13:48:16 +08:00
|
|
|
|
|
|
|
|
let mousedown = function(event: MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseDownOperation(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let touchstart = function(event: any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseDownOperation(e)
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseDownOperation = (e:any) => {
|
2023-08-21 10:55:39 +08:00
|
|
|
mouse = true;
|
2023-09-12 10:11:27 +08:00
|
|
|
var info = el.getBoundingClientRect();
|
|
|
|
|
let eX = info.x + info.width / 2;
|
|
|
|
|
let eY = info.y + info.height / 2;
|
2024-09-25 11:07:49 +08:00
|
|
|
num = item.value.zoom?item.value.zoom :1
|
|
|
|
|
angle = item.value.angle?item.value.angle:0
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseMove = function(event:MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseMoveOperation(e)
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let touchmove = function(event:any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseMoveOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let mouseMoveOperation = (e:MouseEvent) => {
|
|
|
|
|
if (mouse) {
|
|
|
|
|
let X = eX
|
|
|
|
|
let Y = eY
|
|
|
|
|
let x:any = e.clientX - X
|
|
|
|
|
let y:any = Y - e.clientY
|
|
|
|
|
angle = Math.atan2(x,y)*(180 / Math.PI)
|
2024-09-25 11:07:49 +08:00
|
|
|
item.value.angle = angle
|
2024-09-06 13:48:16 +08:00
|
|
|
}
|
|
|
|
|
};
|
2023-08-21 10:55:39 +08:00
|
|
|
|
|
|
|
|
// 添加鼠标松开事件监听器
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseup = function(){
|
|
|
|
|
mouse = false
|
|
|
|
|
document.removeEventListener('mousemove',mouseMove)
|
|
|
|
|
document.removeEventListener('touchmove',touchmove)
|
|
|
|
|
document.removeEventListener('mouseup',mouseup)
|
|
|
|
|
document.removeEventListener('touchend',mouseup)
|
|
|
|
|
//移动端
|
|
|
|
|
}
|
|
|
|
|
document.addEventListener('mousemove', mouseMove);
|
|
|
|
|
document.addEventListener('touchmove', touchmove);
|
|
|
|
|
document.addEventListener('mouseup', mouseup);
|
|
|
|
|
document.addEventListener('touchend', mouseup);
|
2023-12-22 15:42:41 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
el.addEventListener('mousedown',mousedown)
|
|
|
|
|
el.addEventListener('touchstart',touchstart)
|
|
|
|
|
|
2023-08-21 10:55:39 +08:00
|
|
|
//缩放
|
|
|
|
|
let timeSwitch = true
|
|
|
|
|
el.parentNode.addEventListener('mousemove', (e:MouseEvent) => {
|
|
|
|
|
el.parentNode.addEventListener('mousewheel',(e:MouseEvent) => {
|
2024-09-25 11:07:49 +08:00
|
|
|
num = item.value.zoom?item.value.zoom :1
|
|
|
|
|
angle = item.value.angle?item.value.angle:0
|
2023-08-21 10:55:39 +08:00
|
|
|
if(timeSwitch){
|
|
|
|
|
timeSwitch = false
|
|
|
|
|
if((e as WheelEvent).deltaY > 0){
|
|
|
|
|
if(num <= 1){
|
|
|
|
|
num -= 0.05
|
|
|
|
|
}else{
|
|
|
|
|
num -= 0.1
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
//放大
|
|
|
|
|
if(num <= 1){
|
|
|
|
|
num += 0.05
|
|
|
|
|
}else{
|
|
|
|
|
num += 0.1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(num >= 3){
|
|
|
|
|
num = 3
|
|
|
|
|
}else if (num < .2){
|
|
|
|
|
num = .2
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
timeSwitch = true
|
|
|
|
|
}, 100);
|
2024-09-06 13:48:16 +08:00
|
|
|
let instance:any = item.instance
|
|
|
|
|
instance.moodItemScale = num * 100
|
|
|
|
|
item.value.zoom = num
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
angle:{
|
|
|
|
|
mounted(el,angle){
|
|
|
|
|
let mouse = false;
|
2024-09-06 13:48:16 +08:00
|
|
|
let mousedown = function(event: MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseDownOperation(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let touchstart = function(event: any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseDownOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let mouseDownOperation = (e:MouseEvent) => {
|
2023-08-21 10:55:39 +08:00
|
|
|
el.parentNode.children.forEach((v:any) =>{
|
|
|
|
|
v.classList.add('eventNode')
|
|
|
|
|
})
|
|
|
|
|
mouse = true;
|
|
|
|
|
let elParent = el.parentNode.parentNode
|
|
|
|
|
let eX:any
|
|
|
|
|
let eY:any
|
|
|
|
|
let elParentSide = Math.sqrt(elParent.offsetWidth/2*elParent.offsetWidth/2+elParent.offsetHeight/2*elParent.offsetHeight/2)
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseMove = function(event:MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseMoveOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let touchmove = function(event:any){
|
|
|
|
|
let e:any = getMousePosition(event,true,el.parentNode)
|
|
|
|
|
mouseMoveOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let mouseMoveOperation = (e:MouseEvent)=>{
|
2023-11-27 11:11:07 +08:00
|
|
|
if (mouse) {
|
2023-08-21 10:55:39 +08:00
|
|
|
if(angle.value == 'right'){
|
2023-11-27 11:11:07 +08:00
|
|
|
eX = elParent.offsetWidth - e.offsetX
|
|
|
|
|
eY = elParent.offsetHeight - e.offsetY
|
2023-08-21 10:55:39 +08:00
|
|
|
}else if(angle.value == 'top'){
|
2023-11-27 11:11:07 +08:00
|
|
|
eX = elParent.offsetWidth - e.offsetX- elParent.offsetWidth
|
|
|
|
|
eY = elParent.offsetHeight - e.offsetY
|
2023-08-21 10:55:39 +08:00
|
|
|
}else if(angle.value == 'left'){
|
2023-11-27 11:11:07 +08:00
|
|
|
eX = elParent.offsetWidth - e.offsetX
|
|
|
|
|
eY = elParent.offsetHeight - e.offsetY- elParent.offsetHeight
|
2023-08-21 10:55:39 +08:00
|
|
|
}else if(angle.value == 'bottom'){
|
2023-11-27 11:11:07 +08:00
|
|
|
eX = elParent.offsetWidth - e.offsetX - elParent.offsetWidth
|
|
|
|
|
eY = elParent.offsetHeight - e.offsetY - elParent.offsetHeight
|
|
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseSide = Math.sqrt(eX*eX + eY *eY)/2
|
2023-11-27 11:11:07 +08:00
|
|
|
// el.style.left = e.offsetX /2 +'px'
|
|
|
|
|
// el.style.top = e.offsetY /2+'px'
|
|
|
|
|
if(100 - 100 * mouseSide/elParentSide <= 50){
|
2023-11-27 16:25:32 +08:00
|
|
|
let Xy = (100 - 100 * mouseSide/elParentSide) / 3.33-1
|
|
|
|
|
if(Xy<=0){
|
|
|
|
|
Xy = 0
|
|
|
|
|
}
|
2023-11-27 11:11:07 +08:00
|
|
|
if(angle.value == 'right'){
|
|
|
|
|
el.parentNode.style.borderTopLeftRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
|
|
|
|
elParent.style.borderTopLeftRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
2023-11-27 16:25:32 +08:00
|
|
|
el.style.left = Xy +'%'
|
|
|
|
|
el.style.top = Xy +'%'
|
2023-11-27 11:11:07 +08:00
|
|
|
}else if(angle.value == 'top'){
|
|
|
|
|
el.parentNode.style.borderTopRightRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
|
|
|
|
elParent.style.borderTopRightRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
2023-11-27 16:25:32 +08:00
|
|
|
el.style.right = Xy +'%'
|
2023-11-27 11:11:07 +08:00
|
|
|
el.style.left = 'auto'
|
2023-11-27 16:25:32 +08:00
|
|
|
el.style.top = Xy +'%'
|
2023-11-27 11:11:07 +08:00
|
|
|
}else if(angle.value == 'bottom'){
|
|
|
|
|
el.parentNode.style.borderBottomRightRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
|
|
|
|
elParent.style.borderBottomRightRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
2023-11-27 16:25:32 +08:00
|
|
|
el.style.right = Xy +'%'
|
2023-11-27 11:11:07 +08:00
|
|
|
el.style.top = 'auto'
|
|
|
|
|
el.style.left = 'auto'
|
2023-11-27 16:25:32 +08:00
|
|
|
el.style.bottom = Xy +'%'
|
2023-11-27 11:11:07 +08:00
|
|
|
}else if(angle.value == 'left'){
|
|
|
|
|
el.parentNode.style.borderBottomLeftRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
|
|
|
|
elParent.style.borderBottomLeftRadius = 100 - 100 * mouseSide/elParentSide +'%'
|
2023-11-27 16:25:32 +08:00
|
|
|
el.style.left = Xy +'%'
|
2023-11-27 11:11:07 +08:00
|
|
|
el.style.top = 'auto'
|
2023-11-27 16:25:32 +08:00
|
|
|
el.style.bottom = Xy +'%'
|
2023-11-27 11:11:07 +08:00
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
if(angle.value == 'right'){
|
|
|
|
|
el.parentNode.style.borderTopLeftRadius = 50+'%'
|
|
|
|
|
elParent.style.borderTopLeftRadius = 50+'%'
|
|
|
|
|
}else if(angle.value == 'top'){
|
|
|
|
|
el.parentNode.style.borderTopRightRadius = 50+'%'
|
|
|
|
|
elParent.style.borderTopRightRadius = 50+'%'
|
|
|
|
|
}else if(angle.value == 'bottom'){
|
|
|
|
|
el.parentNode.style.borderBottomRightRadius = 50+'%'
|
|
|
|
|
elParent.style.borderBottomRightRadius = 50+'%'
|
|
|
|
|
}else if(angle.value == 'left'){
|
|
|
|
|
el.parentNode.style.borderBottomLeftRadius = 50+'%'
|
|
|
|
|
elParent.style.borderBottomLeftRadius = 50+'%'
|
|
|
|
|
}
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
}
|
2023-11-27 11:11:07 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseup = function(){
|
|
|
|
|
mouse = false
|
2023-12-22 15:42:41 +08:00
|
|
|
el.parentNode.children.forEach((v:any) =>{
|
|
|
|
|
v.classList.remove('eventNode')
|
|
|
|
|
})
|
2024-09-06 13:48:16 +08:00
|
|
|
el.parentNode.removeEventListener('mousemove',mouseMove)
|
|
|
|
|
el.parentNode.removeEventListener('touchmove',touchmove)
|
|
|
|
|
document.removeEventListener('mouseup',mouseup)
|
|
|
|
|
document.removeEventListener('touchend',mouseup)
|
|
|
|
|
//移动端
|
2023-12-22 15:42:41 +08:00
|
|
|
}
|
2023-11-27 11:11:07 +08:00
|
|
|
el.parentNode.addEventListener('mousemove', mouseMove);
|
2024-09-06 13:48:16 +08:00
|
|
|
el.parentNode.addEventListener('touchmove', touchmove);
|
|
|
|
|
document.addEventListener('mouseup', mouseup);
|
|
|
|
|
document.addEventListener('touchend', mouseup);
|
|
|
|
|
}
|
|
|
|
|
el.addEventListener('mousedown',mousedown)
|
|
|
|
|
el.addEventListener('touchstart',touchstart)
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//移动图片
|
|
|
|
|
translate:{
|
|
|
|
|
mounted (el,layout:any,binding) {
|
2024-09-06 13:48:16 +08:00
|
|
|
let mousedown = function(event: MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseDownOperation(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let touchstart = function(event: any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseDownOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let mouseDownOperation = (e: MouseEvent)=>{
|
2023-08-21 10:55:39 +08:00
|
|
|
let elParent = el.parentNode.parentNode
|
|
|
|
|
el.style.left = (el.offsetLeft+2)/(elParent.offsetWidth)*100+'%'
|
|
|
|
|
el.style.top = (el.offsetTop+2)/(elParent.offsetHeight)*100+'%'
|
|
|
|
|
let left = el.style.left? el.style.left.replace(/%/g,'') : 0
|
|
|
|
|
let top = el.style.top? el.style.top.replace(/%/g,'') : 0
|
|
|
|
|
let mouseX = e.offsetX //鼠标点击位置到domleft距离
|
|
|
|
|
let mouseY = e.offsetY
|
|
|
|
|
let domX = e.clientX - e.offsetX - el.offsetLeft//鼠标到最左侧距离减去鼠标到dom距离再减去已经有的left值
|
|
|
|
|
let domY = e.clientY - e.offsetY - el.offsetTop
|
|
|
|
|
let mouse = true
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseMove = function(event:MouseEvent){
|
|
|
|
|
let e:any = getMousePosition(event,false)
|
|
|
|
|
mouseMoveOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let touchmove = function(event:any){
|
|
|
|
|
let e:any = getMousePosition(event,true)
|
|
|
|
|
mouseMoveOperation(e)
|
|
|
|
|
}
|
|
|
|
|
let mouseMoveOperation = function(e:MouseEvent){
|
2023-08-21 10:55:39 +08:00
|
|
|
if(mouse){
|
2024-09-06 13:48:16 +08:00
|
|
|
let left = ( e.clientX-mouseX + 2 - domX )/(elParent.offsetWidth)*100+'%'
|
|
|
|
|
let top = (e.clientY-mouseY + 2 - domY)/(elParent.offsetHeight)*100+'%'
|
2023-08-21 10:55:39 +08:00
|
|
|
el.style.left = left
|
|
|
|
|
el.style.top = top;
|
|
|
|
|
el.previousSibling.style.top = top
|
|
|
|
|
el.previousSibling.style.left = left
|
|
|
|
|
elParent.firstChild.style.top = top
|
|
|
|
|
elParent.firstChild.style.left = left
|
|
|
|
|
if(el.offsetLeft <=0){
|
|
|
|
|
el.style.left = 0+'%'
|
|
|
|
|
el.previousSibling.style.left = 0+'%'
|
|
|
|
|
elParent.firstChild.style.left = 0+'%'
|
|
|
|
|
}
|
|
|
|
|
if(el.offsetTop <=0){
|
|
|
|
|
el.style.top = 0+'%'
|
|
|
|
|
el.previousSibling.style.top = 0+'%'
|
|
|
|
|
elParent.firstChild.style.top = 0+'%'
|
|
|
|
|
}
|
|
|
|
|
// if(el.offsetLeft+el.offsetWidth >= el.parentNode.offsetWidth){
|
|
|
|
|
// // el.style.left = el.parentNode.offsetWidth - el.offsetWidth+'%'
|
|
|
|
|
// console.log(2);
|
|
|
|
|
// }
|
|
|
|
|
if(el.style.left.replace(/%/g,'')>=100){
|
|
|
|
|
el.style.left = 100+'%'
|
|
|
|
|
el.previousSibling.style.left = 100+'%'
|
|
|
|
|
elParent.firstChild.style.left = 100+'%'
|
|
|
|
|
}
|
|
|
|
|
// if(el.offsetTop+el.offsetHeight >= el.parentNode.offsetHeight){
|
|
|
|
|
// el.style.top = el.parentNode.offsetHeight - el.offsetHeight+'%'
|
|
|
|
|
// }
|
|
|
|
|
if(el.style.top.replace(/%/g,'')>=100){
|
|
|
|
|
el.style.top = 100+'%'
|
|
|
|
|
el.previousSibling.style.top = 100+'%'
|
|
|
|
|
elParent.firstChild.style.top = 100+'%'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
let mouseup = function(){
|
2023-08-21 10:55:39 +08:00
|
|
|
mouse = false
|
2024-09-06 13:48:16 +08:00
|
|
|
document.removeEventListener('mousemove',mouseMove)
|
|
|
|
|
document.removeEventListener('touchmove',touchmove)
|
|
|
|
|
document.removeEventListener('mouseup',mouseup)
|
|
|
|
|
document.removeEventListener('touchend',mouseup)
|
|
|
|
|
//移动端
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
document.addEventListener('mousemove', mouseMove);
|
|
|
|
|
document.addEventListener('touchmove', touchmove);
|
|
|
|
|
document.addEventListener('mouseup', mouseup);
|
|
|
|
|
document.addEventListener('touchend', mouseup);
|
|
|
|
|
}
|
|
|
|
|
el.addEventListener('mousedown',mousedown)
|
|
|
|
|
el.addEventListener('touchstart',touchstart)
|
2023-08-21 10:55:39 +08:00
|
|
|
},
|
2023-09-12 10:11:27 +08:00
|
|
|
},
|
|
|
|
|
modelImg:{
|
|
|
|
|
mounted(el) {
|
|
|
|
|
let parentNode = el.parentNode
|
2024-10-04 11:29:50 +08:00
|
|
|
if(parentNode.offsetHeight >= parentNode.offsetWidth){
|
2023-09-12 10:11:27 +08:00
|
|
|
el.style.height = 100+'%'
|
|
|
|
|
el.style.width = 'auto'
|
|
|
|
|
}else{
|
|
|
|
|
el.style.width = 100+'%'
|
|
|
|
|
el.style.height = 'auto'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
updated (el) {
|
|
|
|
|
let parentNode = el.parentNode
|
2024-10-04 11:29:50 +08:00
|
|
|
if(parentNode.offsetHeight >= parentNode.offsetWidth){
|
2023-09-12 10:11:27 +08:00
|
|
|
el.style.height = 100+'%'
|
|
|
|
|
el.style.width = 'auto'
|
|
|
|
|
}else{
|
|
|
|
|
el.style.width = 100+'%'
|
|
|
|
|
el.style.height = 'auto'
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
init(){
|
2023-09-12 10:11:27 +08:00
|
|
|
let parentList:any = this.$parent
|
2024-09-27 16:31:33 +08:00
|
|
|
this.styleObj = this.store.state.UploadFilesModule.moodboardPosition
|
2023-09-12 10:11:27 +08:00
|
|
|
parentList = parentList.layoutList
|
|
|
|
|
this.layout = true
|
|
|
|
|
// let layoutList = this.store.state.UploadFilesModule.moodboard
|
2023-08-21 10:55:39 +08:00
|
|
|
this.layoutList.forEach((v:any)=>{
|
|
|
|
|
v.setPitch = false
|
|
|
|
|
})
|
2023-09-12 10:11:27 +08:00
|
|
|
this.layoutList = parentList
|
|
|
|
|
this.moodbList = this.moodb[parentList.length-1]
|
2024-09-11 16:36:08 +08:00
|
|
|
this.moodbClassName = this.styleObj?.class?this.styleObj?.class:[]
|
2024-09-26 15:43:27 +08:00
|
|
|
this.moodItemScale = (this.layoutList?.[0]?this.layoutList[0].zoom:1)*100
|
2024-09-06 13:48:16 +08:00
|
|
|
|
2024-08-19 10:36:46 +08:00
|
|
|
this.initDomStyle()
|
|
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
},
|
2023-09-12 10:11:27 +08:00
|
|
|
cancelDsign(){
|
|
|
|
|
this.layout = false
|
|
|
|
|
},
|
2023-08-23 17:50:09 +08:00
|
|
|
setpitch(item:any,index:any){
|
2024-09-06 13:48:16 +08:00
|
|
|
if(!item.zoom){
|
|
|
|
|
item.zoom = 1
|
|
|
|
|
}
|
|
|
|
|
this.moodIndex = index
|
|
|
|
|
this.moodItemScale = (item.zoom?item.zoom:1)*100
|
2023-08-21 10:55:39 +08:00
|
|
|
this.layoutList.forEach((v:any)=>{
|
|
|
|
|
v.setPitch = false
|
|
|
|
|
})
|
|
|
|
|
item.setPitch = true
|
2023-08-23 17:50:09 +08:00
|
|
|
if(this.content){
|
|
|
|
|
(this.content as any)[index].style.zIndex = GO.zIndex++
|
|
|
|
|
|
|
|
|
|
}
|
2023-08-21 10:55:39 +08:00
|
|
|
},
|
2024-09-06 13:48:16 +08:00
|
|
|
setMoodItemScale(value:any){
|
|
|
|
|
if(value > 2){
|
|
|
|
|
this.layoutList[this.moodIndex].zoom = value/100
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-08-05 12:52:56 +08:00
|
|
|
setmoodb(item:any){
|
|
|
|
|
this.moodbClassName = item
|
|
|
|
|
this.$emit('setmoodbClass',this.moodbClassName)
|
2025-12-01 15:29:20 +08:00
|
|
|
this.styleObj.class = this.moodbClassName
|
2023-08-21 10:55:39 +08:00
|
|
|
if(this.content){
|
|
|
|
|
for (item of (this.content as any)) {
|
|
|
|
|
item.classList.remove('active')
|
|
|
|
|
item.style.top = ''
|
|
|
|
|
item.style.left = ''
|
|
|
|
|
item.style.right = ''
|
|
|
|
|
item.style.bottom = ''
|
|
|
|
|
item.style.width = ''
|
|
|
|
|
item.style.height = ''
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
},
|
|
|
|
|
changeTemplateModal(){
|
|
|
|
|
this.layout = !this.layout
|
|
|
|
|
},
|
2024-09-26 15:43:27 +08:00
|
|
|
setIndex(styleArr:any){
|
|
|
|
|
let arr = JSON.parse(JSON.stringify(styleArr))
|
|
|
|
|
const nums = arr.map((obj:any,index:any) => {
|
|
|
|
|
obj.num = index
|
|
|
|
|
return {
|
|
|
|
|
num: obj.num,
|
|
|
|
|
zIndex: obj['z-index']?obj['z-index']:1
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-09-27 16:31:33 +08:00
|
|
|
const sortedNums = nums.sort((a:any, b:any) => a.zIndex - b.zIndex);
|
2024-09-26 15:43:27 +08:00
|
|
|
|
|
|
|
|
GO.zIndex = sortedNums.length + 1
|
|
|
|
|
// GO.zIndex = sortedNums[sortedNums.length - 1].zIndex + 1
|
|
|
|
|
sortedNums.forEach((item:any,index:any) => {
|
|
|
|
|
arr[item.num]['z-index'] = index + 1
|
2024-08-19 10:36:46 +08:00
|
|
|
});
|
|
|
|
|
return arr
|
|
|
|
|
},
|
|
|
|
|
initDomStyle(){
|
|
|
|
|
nextTick(()=>{
|
|
|
|
|
this.content.forEach((item:any,index:any) => {
|
2025-12-01 15:29:20 +08:00
|
|
|
if(this.styleObj.domStyle[index]?.left){
|
2024-08-19 10:36:46 +08:00
|
|
|
item.classList.add('active')
|
|
|
|
|
this.initStyle(item,this.styleObj.domStyle[index])
|
|
|
|
|
}
|
|
|
|
|
this.domObj.dom.forEach((domName:any,domStyle:any) => {
|
|
|
|
|
let dom,style
|
|
|
|
|
if(this.styleObj[this.domObj.domStyle[index]]){
|
|
|
|
|
style = this.styleObj[this.domObj.domStyle[domStyle]][index]
|
|
|
|
|
dom = item.querySelector(domName)
|
|
|
|
|
this.initStyle(dom,style)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
clearStyleObj(){
|
|
|
|
|
this.styleObj.domStyle = []
|
|
|
|
|
this.domObj.domStyle.forEach((item:any)=>{
|
|
|
|
|
if(this.styleObj[item])this.styleObj[item] = []
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initStyle(dom:any,style:any){
|
2025-12-01 15:29:20 +08:00
|
|
|
if(!style || !dom)return
|
2024-08-19 10:36:46 +08:00
|
|
|
for (const [property, value] of Object.entries(style)) {
|
2024-09-26 15:43:27 +08:00
|
|
|
|
2024-08-19 10:36:46 +08:00
|
|
|
dom.style.setProperty(property, value);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setDomStyle(){
|
|
|
|
|
this.clearStyleObj()
|
|
|
|
|
this.content.forEach((item:any) => {
|
|
|
|
|
this.styleObj.domStyle.push(this.setStyle(item.style))
|
|
|
|
|
this.domObj.dom.forEach((domName:any,index:any) => {
|
|
|
|
|
let style = this.domObj.domStyle[index]
|
2025-12-01 15:29:20 +08:00
|
|
|
let dom = item.querySelector(domName) || item
|
2024-08-19 10:36:46 +08:00
|
|
|
this.styleObj[style].push(this.setStyle(dom.style))
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
setStyle(domStyle:any){
|
|
|
|
|
let style:any = {}
|
|
|
|
|
for (let property of domStyle) {
|
|
|
|
|
style[property] = domStyle.getPropertyValue(property);
|
|
|
|
|
}
|
|
|
|
|
return style
|
|
|
|
|
},
|
2023-08-05 12:52:56 +08:00
|
|
|
//提交模板
|
|
|
|
|
submitTemplate() {
|
2023-09-12 10:11:27 +08:00
|
|
|
this.loadingShow = true
|
2024-09-27 16:31:33 +08:00
|
|
|
this.setDomStyle()
|
2024-09-26 15:43:27 +08:00
|
|
|
this.styleObj.domStyle = this.setIndex(this.styleObj.domStyle)//index统一排序设置值
|
2024-09-27 16:31:33 +08:00
|
|
|
this.store.commit("setDisposeMoodboardPosition", JSON.parse(JSON.stringify(this.styleObj)));
|
2023-08-21 10:55:39 +08:00
|
|
|
this.layoutList.forEach((v:any)=>{
|
|
|
|
|
v.setPitch = false
|
|
|
|
|
})
|
2023-09-12 10:11:27 +08:00
|
|
|
nextTick().then(async ()=>{
|
|
|
|
|
let layoutCentent = document.getElementById('layoutCentent')
|
2024-05-23 13:25:19 +08:00
|
|
|
domTurnImg(layoutCentent).then((rv)=>{
|
|
|
|
|
let file =rv
|
|
|
|
|
let param = new FormData();
|
|
|
|
|
param.append('inPin','0')
|
|
|
|
|
param.append('gender','')
|
|
|
|
|
param.append('level1Type','Moodboard')
|
|
|
|
|
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
|
|
|
|
|
param.append('file',file);
|
|
|
|
|
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
|
|
|
|
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
|
|
|
|
.then((rv: any) => {
|
|
|
|
|
rv.imgUrl = rv.url
|
|
|
|
|
this.layout = false
|
|
|
|
|
this.loadingShow = false
|
|
|
|
|
this.store.commit("setDisposeMoodboard", rv);
|
2024-08-19 10:36:46 +08:00
|
|
|
|
|
|
|
|
|
2024-05-23 13:25:19 +08:00
|
|
|
}
|
|
|
|
|
).catch(rv=>{
|
2023-09-12 10:11:27 +08:00
|
|
|
this.loadingShow = false
|
2024-05-23 13:25:19 +08:00
|
|
|
})
|
2023-09-12 10:11:27 +08:00
|
|
|
})
|
2024-05-23 13:25:19 +08:00
|
|
|
|
2023-09-12 10:11:27 +08:00
|
|
|
})
|
2023-08-21 10:55:39 +08:00
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
},
|
2023-09-12 10:11:27 +08:00
|
|
|
beforeUpload(){
|
|
|
|
|
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
2024-12-11 16:26:36 +08:00
|
|
|
<style lang="less" scoped>
|
2023-08-05 12:52:56 +08:00
|
|
|
.layout_modal {
|
2024-09-30 17:59:24 +08:00
|
|
|
user-select: none; /* 对现代浏览器有效 */
|
|
|
|
|
-webkit-user-select: none; /* Safari */
|
|
|
|
|
-moz-user-select: none; /* Firefox */
|
|
|
|
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
2023-08-05 12:52:56 +08:00
|
|
|
.ant-modal-body {
|
|
|
|
|
padding: 0;
|
2023-08-21 10:55:39 +08:00
|
|
|
// height: calc(65vh - 6.4rem);
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(65rem*1.2);
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
.ant-modal-content{
|
2024-01-10 14:09:44 +08:00
|
|
|
border-radius: calc(1rem*1.2);
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.layout_content {
|
|
|
|
|
// background: #f2f3fb;
|
|
|
|
|
// padding-bottom: 2.9rem;
|
|
|
|
|
height: 100%;
|
2023-09-12 10:11:27 +08:00
|
|
|
.collection_title{
|
|
|
|
|
position: absolute;
|
2024-01-10 14:09:44 +08:00
|
|
|
top: calc(4rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
display: flex;
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.8rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
font-weight: 900;
|
|
|
|
|
color: rgba(0,0,0,.65);
|
|
|
|
|
align-items: center;
|
|
|
|
|
.collection_title_text{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-right: calc(4rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
|
|
|
|
.collection_title_text_intro{
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.2rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
font-weight: 400;
|
|
|
|
|
color: rgba(0,0,0,.45);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-22 10:45:52 +08:00
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
.layout_nav{
|
|
|
|
|
display: flex;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-top: calc(2rem*1.2);
|
2023-08-05 12:52:56 +08:00
|
|
|
justify-content: center;
|
2023-10-27 11:09:32 +08:00
|
|
|
max-height: 13%;
|
|
|
|
|
overflow: hidden;
|
2023-08-21 10:55:39 +08:00
|
|
|
.active{
|
|
|
|
|
img{
|
|
|
|
|
border: 2px solid;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-27 11:09:32 +08:00
|
|
|
>div{
|
|
|
|
|
max-height: 13%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
img{
|
|
|
|
|
object-fit: cover;
|
2024-01-10 14:09:44 +08:00
|
|
|
width:calc(5rem*1.2);
|
2023-10-27 11:09:32 +08:00
|
|
|
cursor: pointer;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin: 0 calc(2rem*1.2);
|
2023-10-27 11:09:32 +08:00
|
|
|
max-height: 100%;
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
2023-10-27 11:09:32 +08:00
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
.layout_centent{
|
|
|
|
|
display: flex;
|
2023-11-02 11:00:38 +08:00
|
|
|
// height: 55%;
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(35rem*1.2);
|
|
|
|
|
width: calc(57rem*1.2);
|
2023-08-21 10:55:39 +08:00
|
|
|
// height: 60%;
|
2023-08-05 12:52:56 +08:00
|
|
|
flex-direction: column;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
align-content: space-around;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin: calc(3rem*1.2) auto;
|
2023-08-21 10:55:39 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
// padding: 3rem 0;
|
2023-08-05 12:52:56 +08:00
|
|
|
justify-content: space-between;
|
2023-08-21 10:55:39 +08:00
|
|
|
position: relative;
|
|
|
|
|
user-select:none
|
2023-08-05 12:52:56 +08:00
|
|
|
&.active{
|
2023-08-05 12:54:08 +08:00
|
|
|
flex-direction: row;
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
.layout_btn{
|
|
|
|
|
list-style: none;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
border: 2px solid rgb(20, 188, 255);
|
|
|
|
|
padding: 0;
|
|
|
|
|
-webkit-user-drag: none;
|
|
|
|
|
user-select:none;
|
|
|
|
|
li{
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
// border-radius: 50%;
|
2024-09-30 17:59:24 +08:00
|
|
|
width: calc(2rem*1.2);
|
|
|
|
|
height: calc(2rem*1.2);
|
2023-08-21 10:55:39 +08:00
|
|
|
background-color: rgb(20, 188, 255);
|
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 1049;
|
|
|
|
|
}
|
|
|
|
|
.layout_btn_top,.layout_btn_bottom{
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(-50%,-50%) ;
|
|
|
|
|
cursor: n-resize;
|
|
|
|
|
}
|
|
|
|
|
.layout_btn_top{
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
.layout_btn_bottom{
|
|
|
|
|
top: 100%;
|
|
|
|
|
}
|
|
|
|
|
.layout_btn_left,.layout_btn_right{
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translate(-50%,-50%) ;
|
|
|
|
|
cursor: e-resize;
|
|
|
|
|
}
|
|
|
|
|
.layout_btn_left{
|
|
|
|
|
left: 0;
|
|
|
|
|
}
|
|
|
|
|
.layout_btn_right{
|
|
|
|
|
left: 100%;
|
|
|
|
|
}
|
|
|
|
|
.layout_rotote{
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(-50%,-50%);
|
|
|
|
|
width: 0;
|
|
|
|
|
height: 0;
|
|
|
|
|
}
|
|
|
|
|
.layout_rotote::after{
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: "";
|
|
|
|
|
background-color: #14bcff;
|
|
|
|
|
width: 2px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
left: 50%;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
}
|
|
|
|
|
.layout_rotote::before{
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: "";
|
|
|
|
|
background-color: #14bcff;
|
|
|
|
|
top: calc(50% - 30px);
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(-50%,-50%) ;
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(1.5rem*1.2);
|
|
|
|
|
height: calc(1.5rem*1.2);
|
2023-08-21 10:55:39 +08:00
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
|
|
|
|
.layout_translate{
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(-50%,-50%) ;
|
|
|
|
|
cursor: crosshair;
|
|
|
|
|
cursor: move;
|
|
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
.layout_angle_tr,.layout_angle_tl,.layout_angle_br,.layout_angle_bl{
|
|
|
|
|
// opacity: 0;
|
2024-09-30 17:59:24 +08:00
|
|
|
width: calc(2rem*1.2);
|
|
|
|
|
height: calc(2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
2023-08-21 10:55:39 +08:00
|
|
|
.layout_angle_tr{
|
|
|
|
|
right: 0%;
|
|
|
|
|
top: 0;
|
2024-09-30 17:59:24 +08:00
|
|
|
transform: translate(50%,-50%);
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
.layout_angle_tl{
|
|
|
|
|
left: 0%;
|
|
|
|
|
top: 0;
|
2024-09-30 17:59:24 +08:00
|
|
|
transform: translate(-50%,-50%);
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
.layout_angle_br{
|
|
|
|
|
right: 0%;
|
|
|
|
|
bottom: 0%;
|
2024-09-30 17:59:24 +08:00
|
|
|
transform: translate(50%,50%);
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
.layout_angle_bl{
|
|
|
|
|
left: 0%;
|
|
|
|
|
bottom: 0%;
|
2024-09-30 17:59:24 +08:00
|
|
|
transform: translate(-50%,50%);
|
2023-08-21 10:55:39 +08:00
|
|
|
}
|
|
|
|
|
.eventNode{
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
.layout_centent_bor{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.modal_imgItem{
|
|
|
|
|
position: relative;
|
2023-08-21 10:55:39 +08:00
|
|
|
// >div{
|
|
|
|
|
// position: absolute;
|
|
|
|
|
// width: 100%;
|
|
|
|
|
// height: 100%;
|
|
|
|
|
// }
|
|
|
|
|
overflow: hidden;
|
2025-12-01 15:29:20 +08:00
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-size: cover;
|
2023-08-21 10:55:39 +08:00
|
|
|
&.active{
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.wh1{
|
|
|
|
|
width: 23%;
|
|
|
|
|
height: 48%;
|
2023-08-21 10:55:39 +08:00
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
.wh4{
|
|
|
|
|
width: 48.5%;
|
|
|
|
|
height: 100%;
|
2023-08-21 10:55:39 +08:00
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
2023-10-27 11:09:32 +08:00
|
|
|
.wh8{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 48.5%;
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
.w1h2{
|
|
|
|
|
width: 23%;
|
|
|
|
|
height: 100%;
|
2023-08-21 10:55:39 +08:00
|
|
|
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
.w2h1{
|
|
|
|
|
width: 48.5%;
|
|
|
|
|
height: 48%;
|
|
|
|
|
}
|
|
|
|
|
.layout_left{
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
2024-01-10 14:09:44 +08:00
|
|
|
left: calc(5rem*1.2);
|
2023-08-05 12:52:56 +08:00
|
|
|
overflow-x: hidden;
|
|
|
|
|
// background-color: #000;
|
2024-01-09 16:03:53 +08:00
|
|
|
width: 10%;
|
2023-08-05 12:52:56 +08:00
|
|
|
height: 50%;
|
|
|
|
|
&.layout_left::-webkit-scrollbar {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2023-11-02 11:00:38 +08:00
|
|
|
.layout_left_text{
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.6rem*1.2);
|
|
|
|
|
margin-bottom: calc(1rem*1.2);
|
2023-11-02 11:00:38 +08:00
|
|
|
color: #000;
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
.layout_left_items{
|
|
|
|
|
width: 100%;
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(6rem*1.2);
|
2023-08-05 12:52:56 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-content: space-between;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
flex-direction: column;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(2rem*1.2);
|
2023-08-05 12:52:56 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
.layout_left_item{
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
border: 1px solid #000;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-06 13:48:16 +08:00
|
|
|
.layout_right{
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
right: calc(5rem*1.2);
|
|
|
|
|
// background-color: #000;
|
|
|
|
|
width: 8%;
|
|
|
|
|
height: 50%;
|
|
|
|
|
&.layout_left::-webkit-scrollbar {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.layout_left_text{
|
|
|
|
|
font-size: var(--aida-fsize1-6);
|
|
|
|
|
margin-bottom: calc(1rem*1.2);
|
|
|
|
|
color: #000;
|
|
|
|
|
}
|
|
|
|
|
.layout_left_items{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(6rem*1.2);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-content: space-between;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
margin-bottom: calc(2rem*1.2);
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
.layout_left_item{
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
border: 1px solid #000;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.ant-slider{
|
|
|
|
|
margin: 0;
|
|
|
|
|
margin-top: calc(2rem*1.2);
|
|
|
|
|
padding: 0 calc(1rem*1.2);
|
|
|
|
|
.ant-slider-track,
|
|
|
|
|
.ant-slider-rail {
|
|
|
|
|
height: calc(.6rem*1.2);
|
|
|
|
|
background-color: #e1e1e1;
|
|
|
|
|
border-radius: calc(0.5rem*1.2);
|
|
|
|
|
}
|
|
|
|
|
.ant-slider .ant-slider-handle:not(.ant-tooltip-open),
|
|
|
|
|
.ant-slider-handle {
|
|
|
|
|
background-color: #2d2e76 !important;
|
|
|
|
|
border: none !important;
|
|
|
|
|
}
|
|
|
|
|
.ant-slider-handle:hover {
|
|
|
|
|
box-shadow: 0 0 0 5px rgba(45, 46, 118, 0.2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.habit_System_Designer_text_max {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
.habit_System_Designer_text {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
.submit_button {
|
2024-01-10 14:09:44 +08:00
|
|
|
margin: calc(2rem*1.2) auto 0;
|
2023-12-04 13:14:29 +08:00
|
|
|
position: relative;
|
|
|
|
|
z-index: 2;
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
}
|
2023-11-02 11:00:38 +08:00
|
|
|
.mark_loading{
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
2023-08-05 12:52:56 +08:00
|
|
|
}
|
|
|
|
|
</style>
|