2023-08-23 17:50:09 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="detail_modal_body_select">
|
2024-06-17 09:39:01 +08:00
|
|
|
<div v-show="(type_ == 1 || type_ == 2 || type_ == 4) && select == true">
|
2023-08-23 17:50:09 +08:00
|
|
|
<div class="detail_uploadLibrary">
|
2024-06-26 17:26:31 +08:00
|
|
|
<div v-show="type_ == 4" style="font-size:1.5rem; margin:1rem 0">{{ $t('LibraryPage.generated') }}</div>
|
|
|
|
|
<div class="switch_type_list" v-show="type_ != 4">
|
2024-06-17 09:39:01 +08:00
|
|
|
<div
|
|
|
|
|
@click.stop="open(1)"
|
|
|
|
|
class="switch_type_item"
|
|
|
|
|
:class="[openClick == 1 ? 'select_swtich' : '',]"
|
|
|
|
|
:style="{cursor:type_==4?'no-drop':''}"
|
|
|
|
|
>
|
|
|
|
|
<span>{{ $t('DesignDetailAlter.Upload') }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
@click.stop="open(2)"
|
|
|
|
|
class="switch_type_item Guide_1_21"
|
|
|
|
|
:class="[openClick == 2 ? 'select_swtich' : '',driver__.driver?'showEvents':'']"
|
|
|
|
|
>
|
|
|
|
|
<span>{{ $t('DesignDetailAlter.Library') }}</span>
|
|
|
|
|
</div>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
2023-09-12 10:11:27 +08:00
|
|
|
<div v-show="openClick == 2" class="detail_Library">
|
2024-06-17 09:39:01 +08:00
|
|
|
<div class="select_block">
|
|
|
|
|
<a-select
|
|
|
|
|
v-model:value="designType"
|
|
|
|
|
:options="designTypeList"
|
|
|
|
|
@change="handleChange"
|
|
|
|
|
:fieldNames="{ label: 'name', value: 'value' }"
|
|
|
|
|
>
|
|
|
|
|
<template #suffixIcon
|
|
|
|
|
><span
|
|
|
|
|
class="icon iconfont icon-xiala"
|
|
|
|
|
style="color: #343579"
|
|
|
|
|
></span
|
|
|
|
|
></template>
|
|
|
|
|
</a-select>
|
|
|
|
|
</div>
|
2024-06-26 17:26:31 +08:00
|
|
|
<div class="content_search_block" v-show="type_ != 4">
|
2023-10-30 17:26:36 +08:00
|
|
|
<input class="search_input" :placeholder="$t('DesignDetailAlter.inputContent1')" v-model="searchPictureName" @keydown.enter="getLibraryList()">
|
2023-09-12 10:11:27 +08:00
|
|
|
<div class="search_icon_block" @click.stop="getLibraryList()"><span class="icon iconfont icon-sousuo"></span></div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- clothesPrint -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-show="openClick == 1" class="detail_Upload_item">
|
2023-10-11 17:34:14 +08:00
|
|
|
<div class="moodboard_body">
|
|
|
|
|
<div class="upload_img_body scroll_style">
|
|
|
|
|
<div class="upload_item">
|
|
|
|
|
<div
|
|
|
|
|
class="upload_file_item"
|
|
|
|
|
v-for="(file, index) in uploadList"
|
|
|
|
|
:key="file"
|
|
|
|
|
@click.stop="selectImgItem(file)"
|
|
|
|
|
>
|
2023-08-23 17:50:09 +08:00
|
|
|
<div
|
2023-10-11 17:34:14 +08:00
|
|
|
class="upload_file_item_content"
|
|
|
|
|
v-show="file?.status === 'uploading'"
|
2023-08-23 17:50:09 +08:00
|
|
|
>
|
2023-10-11 17:34:14 +08:00
|
|
|
<a-spin :indicator="indicator" tip="Uploading..." />
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="upload_file_item_content"
|
|
|
|
|
v-show="file?.status === 'done'"
|
|
|
|
|
>
|
|
|
|
|
<img :src="file?.url" class="upload_img" />
|
2024-06-28 17:34:28 +08:00
|
|
|
<sketchCategory v-if="selectCode == 'Sketchboard' || selectCode == 'Printboard'" :disignTypeList="designTypeList" :generateList="uploadList" :item="file" ></sketchCategory>
|
2023-08-23 17:50:09 +08:00
|
|
|
<div
|
2023-10-11 17:34:14 +08:00
|
|
|
class="delete_file_block"
|
|
|
|
|
@click.stop="deleteFile(index)"
|
2023-08-23 17:50:09 +08:00
|
|
|
>
|
2023-10-11 17:34:14 +08:00
|
|
|
<span class="icon iconfont icon-shanchu"></span>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-10-11 17:34:14 +08:00
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="upload_file_item upload_component"
|
|
|
|
|
v-show="uploadList.length != 8"
|
2023-09-12 10:11:27 +08:00
|
|
|
|
2023-10-11 17:34:14 +08:00
|
|
|
>
|
|
|
|
|
<a-upload
|
|
|
|
|
:action="uploadUrl + '/api/element/upload'"
|
|
|
|
|
list-type="picture-card"
|
2024-01-27 15:20:23 +08:00
|
|
|
:capture="null"
|
|
|
|
|
|
2023-10-11 17:34:14 +08:00
|
|
|
:data="{
|
|
|
|
|
...upload,
|
|
|
|
|
}"
|
|
|
|
|
:headers="{ Authorization: token }"
|
|
|
|
|
v-model:file-list="uploadList"
|
|
|
|
|
:before-upload="beforeUpload"
|
2023-12-15 15:23:34 +08:00
|
|
|
:maxCount="8"
|
2023-10-11 17:34:14 +08:00
|
|
|
accept=".jpg,.png,.jpeg,.bmp"
|
|
|
|
|
@change="(file) => upFileUploadChange(file)"
|
2023-08-23 17:50:09 +08:00
|
|
|
>
|
2023-10-11 17:34:14 +08:00
|
|
|
<div
|
|
|
|
|
class="upload_tip_block"
|
|
|
|
|
v-show="uploadList.length != 8"
|
2023-08-23 17:50:09 +08:00
|
|
|
>
|
2023-10-11 17:34:14 +08:00
|
|
|
<i class="fi fi-br-upload"></i>
|
|
|
|
|
<!-- <img class="upload_img_icon" src="@/assets/images/homePage/add_file.png"> -->
|
|
|
|
|
</div>
|
|
|
|
|
</a-upload>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-10-11 17:34:14 +08:00
|
|
|
</div>
|
2023-11-28 16:21:00 +08:00
|
|
|
<div v-show="openClick == 2" class="detail_Library_item Guide_1_22" :class="[driver__.driver?'showEvents':'']">
|
2023-09-12 10:11:27 +08:00
|
|
|
<div class="material_content_body scroll_style">
|
|
|
|
|
<div class="content_img_item" v-for="(file) in clothesList" :key="file.id" :class="{active:selectCode !== 'Moodboard'}">
|
|
|
|
|
<div class="content_img_item_block" :class="{active:file?.checked}">
|
|
|
|
|
<img :class="[ selectCode == 'Printboard' ? 'print_content_img' : 'content_img']" v-lazy="file.url" :key="file.url" :alt="file.name" @click.stop="selectImgItem(file)"/>
|
2024-06-17 09:39:01 +08:00
|
|
|
<sketchCategory v-if="selectCode == 'Sketchboard'" :disignTypeList="designTypeList" :generateList="clothesList" :item="file" :isSpread="selectCode == 'DesignElements'" :isSetSketchCategory="true" @upTypeSucced='handleChange'></sketchCategory>
|
2023-09-12 10:11:27 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-10-12 17:09:05 +08:00
|
|
|
<div v-show="total > clothesList.length" class="material_content_list_loding" v-observe>
|
|
|
|
|
<img src="@/assets/images/homePage/loading.gif" alt="">
|
|
|
|
|
</div>
|
2023-09-12 10:11:27 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="no_data_block loading_block" v-show="isShowLoading">
|
|
|
|
|
<a-spin size="large"></a-spin>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
2023-09-12 10:11:27 +08:00
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
<div v-show="type_ == 3 && select == true">
|
|
|
|
|
<div class="detail_color">
|
|
|
|
|
<div class="right_content_line">
|
|
|
|
|
<div class="upload_right_header">
|
|
|
|
|
<i class="color_edit fi fi-bs-comments" ></i>
|
2023-10-30 17:26:36 +08:00
|
|
|
<span>{{ $t('DesignDetailAlter.Palette') }}</span>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="color_setting_block">
|
2023-11-24 16:18:44 +08:00
|
|
|
<!-- <Sketch class="sketch_color" v-model="selectColor" :show.sync="colorPickerVisible"/> -->
|
2023-08-23 17:50:09 +08:00
|
|
|
<!-- <Chrome class="chrome_color" v-model="selectColor"></Chrome> -->
|
2023-11-24 16:18:44 +08:00
|
|
|
<Chrome class="chrome_color" v-model="selectColor"></Chrome>
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
<!-- <Slider class="sileder_color" v-model="selectColor"></Slider> -->
|
2023-11-24 16:18:44 +08:00
|
|
|
<!-- <div class="color_block">
|
2023-08-23 17:50:09 +08:00
|
|
|
<div class="color_left" @click="colorBlockHex = !colorBlockHex">
|
|
|
|
|
<div v-show="colorBlockHex">
|
2023-10-30 17:26:36 +08:00
|
|
|
{{ $t('DesignDetailAlter.HEX') }}
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
<div v-show="!colorBlockHex">
|
2023-10-30 17:26:36 +08:00
|
|
|
{{ $t('DesignDetailAlter.RGBA') }}
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="color_right">
|
|
|
|
|
<div class="color_HEX_block" v-show="colorBlockHex">
|
|
|
|
|
<div class="color_block_bg" :style="{'background-color':`rgba(${getSelectRGB(selectColor).r},${getSelectRGB(selectColor).g},${getSelectRGB(selectColor).b},${getSelectRGB(selectColor).a})`}"></div>
|
|
|
|
|
<div>
|
|
|
|
|
{{getSelectRGB(selectColor).hex}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="color_rgb_block" v-show="!colorBlockHex">
|
|
|
|
|
<div class="color_block_bg" :style="{'background-color':`rgba(${getSelectRGB(selectColor).r},${getSelectRGB(selectColor).g},${getSelectRGB(selectColor).b},${getSelectRGB(selectColor).a})`}"></div>
|
|
|
|
|
<div class="rgb_item">{{getSelectRGB(selectColor).r}},</div>
|
|
|
|
|
<div class="rgb_item">{{getSelectRGB(selectColor).g}},</div>
|
|
|
|
|
<div class="rgb_item">{{getSelectRGB(selectColor).b}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2023-11-24 16:18:44 +08:00
|
|
|
</div> -->
|
2024-05-16 13:24:32 +08:00
|
|
|
<div class="color_setting_operateSingle">
|
2024-06-21 10:30:09 +08:00
|
|
|
<!-- <div class="started_btn" @click="setOperate">
|
2024-05-16 10:13:37 +08:00
|
|
|
{{ colorList[selectIndex]?.gradient?.gradientList?.length>1? 'Gradual Change':'Single'}}
|
2024-06-21 10:30:09 +08:00
|
|
|
</div> -->
|
|
|
|
|
<div class="color_setting_btn" :class="{active:!colorList[selectIndex]?.gradient?.gradientShow}">{{ $t('ColorboardUpload.Single') }}</div>
|
|
|
|
|
<a-switch :checked="colorList[selectIndex]?.gradient?.gradientShow" @click="setOperate"/>
|
|
|
|
|
<div class="color_setting_btn" :class="{active:colorList[selectIndex]?.gradient?.gradientShow}">{{ $t('ColorboardUpload.Gradual') }}</div>
|
|
|
|
|
|
2024-05-16 13:24:32 +08:00
|
|
|
</div>
|
2024-05-16 09:41:16 +08:00
|
|
|
<div class="color_setting_operate" v-if="colorList[selectIndex]?.gradient?.gradientShow">
|
|
|
|
|
<div class="color_setting_operate_item color_setting_operate_control">
|
|
|
|
|
<div class="operate_item_box">
|
2024-06-21 10:30:09 +08:00
|
|
|
<div>{{ $t('ColorboardUpload.Alignment') }}</div>
|
2024-05-16 09:41:16 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="operate_item_box operate_item_angle">
|
2024-05-22 10:45:52 +08:00
|
|
|
<div class="operate_item_angle_box" @mousedown="mousedownGradientAngle($event,'mousedown')" @touchstart="mousedownGradientAngle($event,'touchstart')">
|
2024-05-16 09:41:16 +08:00
|
|
|
<div :style="{'transform':`rotate(${colorList[selectIndex].gradient.angle}deg)`}"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="operate_item_box operate_item_delete">
|
|
|
|
|
<i class="fi fi-rr-trash" @click="deleteGradientItem"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="color_setting_operate_item color_setting_operate_input">
|
|
|
|
|
<div class="color_setting_operate_bg" @click="addGradient($event)" :style="{'background-image':colorList[selectIndex]?.gradient?`linear-gradient(90deg,${setGradient(colorList[selectIndex].gradient)})`:'none'}">
|
|
|
|
|
</div>
|
2024-05-22 10:45:52 +08:00
|
|
|
<div v-for="item,index in colorList[selectIndex].gradient.gradientList" :key="item" class="color_setting_operate_btn" :class="{'active':index == colorList[selectIndex].gradient.selectIndex}" :style="{'left':item.left,'background-color':`rgba(${item.rgba.r},${item.rgba.g},${item.rgba.b},${item.rgba.a})`}" @mousedown="mousedownGradient($event,item,index,'mousedown')" @touchstart="mousedownGradient($event,item,index,'touchstart')"></div>
|
2024-05-16 09:41:16 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="right_content_line right_content_line_upload">
|
|
|
|
|
<div class="upload_right_header">
|
|
|
|
|
<i class="color_edit fi fi-bs-comments" ></i>
|
2023-11-02 11:00:38 +08:00
|
|
|
<span>{{ $t('DesignDetailAlter.UploadImage') }}</span>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="upload_centetn">
|
|
|
|
|
<div class="upload_item">
|
|
|
|
|
<div class="upload_file_item" v-for="(file) in colorFileList" :key="file">
|
|
|
|
|
<div class="upload_file_item_content" v-show="file.status !== 'done'">
|
|
|
|
|
<a-spin :indicator="indicator" tip="Uploading..."/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="upload_file_item_content" v-show="file.status === 'done'">
|
|
|
|
|
<img :src="file?.imgUrl" class="upload_img" ref="colorImage">
|
2023-10-30 17:26:36 +08:00
|
|
|
<div class="delete_file_block" @click="colorDeleteFile(index)">{{ $t('DesignDetailAlter.Delete') }}</div>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-upload
|
2024-01-27 15:20:23 +08:00
|
|
|
:capture="null"
|
2023-08-23 17:50:09 +08:00
|
|
|
v-show="colorFileList.length < 1"
|
|
|
|
|
list-type="picture-card"
|
|
|
|
|
:customRequest="function(){}"
|
|
|
|
|
@change="fileUploadChange"
|
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
|
accept=".jpg,.png,.jpeg,.bmp"
|
|
|
|
|
>
|
|
|
|
|
<div class="upload_tip_block">
|
|
|
|
|
<i class="fi fi-rr-picture"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</a-upload>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="upload_color">
|
|
|
|
|
<div v-for="color,index in selectColorList" :key="color" @click="setUplpadColor(color)" class="upload_color_item">
|
|
|
|
|
<div class="upload_color_item_bg" :style="{'background-color':`rgba(${color.rgba.r},${color.rgba.g},${color.rgba.b},${color.rgba.a})`}">
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="upload_color_item_text">{{ pantongNameList[index] }}</div> -->
|
2024-08-16 15:40:25 +08:00
|
|
|
<img :title="pantongNameList[index]">
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="right_content_line">
|
|
|
|
|
<div class="upload_right_header">
|
|
|
|
|
<i class="color_edit fi fi-bs-comments" ></i>
|
2023-10-30 17:26:36 +08:00
|
|
|
<span>{{ $t('DesignDetailAlter.ColorCode') }}</span>
|
2023-08-23 17:50:09 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="get_color_block">
|
|
|
|
|
<input class="get_color_input" placeholder="tcx value (e.g.: 19-4052)" v-model="tcxColor" @keydown.enter="getTcxColor()"/>
|
|
|
|
|
<div class="get_color_button" @click="getTcxColor()">
|
2024-07-08 16:07:04 +08:00
|
|
|
<!-- <span class="icon iconfont icon-huoquduixiang"></span> -->
|
|
|
|
|
<span class="fi fi-br-fill"></span>
|
2023-08-23 17:50:09 +08:00
|
|
|
<span class="get_color_des"></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="detail_modal_body_result"></div> -->
|
|
|
|
|
<DesignDetailEnd ref="DesignDetailEnd"></DesignDetailEnd>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2023-09-12 10:11:27 +08:00
|
|
|
import { defineComponent,computed,ref, h ,nextTick ,inject,provide } from 'vue'
|
2023-08-23 17:50:09 +08:00
|
|
|
import Draggable from 'vuedraggable'
|
|
|
|
|
import { Https } from "@/tool/https";
|
2023-09-25 10:09:00 +08:00
|
|
|
import GO from "@/tool/GO";
|
2023-08-23 17:50:09 +08:00
|
|
|
import { useStore } from "vuex";
|
|
|
|
|
import { LoadingOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
import { message,Upload} from 'ant-design-vue';
|
2023-11-24 16:18:44 +08:00
|
|
|
import { Sketch, Chrome} from '@ans1998/vue3-color'
|
2024-06-17 09:39:01 +08:00
|
|
|
import {getUploadUrl,rgbToHsv,isMoible} from '@/tool/util'
|
2023-08-23 17:50:09 +08:00
|
|
|
import DesignDetailEnd from './DesignDetailEnd.vue';
|
2023-09-12 10:11:27 +08:00
|
|
|
import { getCookie } from "@/tool/cookie";
|
2023-11-28 16:21:00 +08:00
|
|
|
import { openGuide,driverObj__ } from "@/tool/guide";
|
2023-10-30 17:26:36 +08:00
|
|
|
import { useI18n } from 'vue-i18n';
|
2024-04-25 14:39:28 +08:00
|
|
|
import sketchCategory from "@/component/HomePage/sketchCategory.vue";
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
export default defineComponent({
|
|
|
|
|
props: ["msg"],
|
|
|
|
|
components:{
|
2024-04-25 14:39:28 +08:00
|
|
|
Draggable,Sketch,DesignDetailEnd,Chrome,sketchCategory
|
2023-08-23 17:50:09 +08:00
|
|
|
},
|
|
|
|
|
setup(prop) {
|
|
|
|
|
const store = useStore();
|
|
|
|
|
let type_ = ref(1);
|
|
|
|
|
let select = ref(false);
|
2023-09-12 10:11:27 +08:00
|
|
|
let current = inject('current')//父组件传过来的数据
|
2023-11-28 16:21:00 +08:00
|
|
|
let driver__ = inject('driver__')//父组件传过来的数据
|
2023-12-20 17:03:42 +08:00
|
|
|
let body = inject('body')//父组件传过来的数据
|
2023-08-23 17:50:09 +08:00
|
|
|
let openClick = ref(1);
|
2023-09-12 10:11:27 +08:00
|
|
|
let searchPictureName = ref('')
|
2024-04-25 14:39:28 +08:00
|
|
|
|
2024-05-16 09:41:16 +08:00
|
|
|
|
2023-10-12 17:09:05 +08:00
|
|
|
let total = ref(0)
|
|
|
|
|
let pageSize = ref(10)
|
|
|
|
|
let currentPage = ref(1)
|
2023-08-23 17:50:09 +08:00
|
|
|
|
2023-09-12 10:11:27 +08:00
|
|
|
let isShowLoading = ref(false)
|
|
|
|
|
let clothesList = ref([])
|
|
|
|
|
let uploadList = ref([])
|
|
|
|
|
let apparelList = ref([])
|
|
|
|
|
let printList = ref([])
|
|
|
|
|
let selectCode = ref('Sketchboard')
|
2024-06-17 09:39:01 +08:00
|
|
|
let designTypeList = ref([])
|
|
|
|
|
let printCatecoryList = computed(()=>{
|
|
|
|
|
return store.state.UserHabit.printType
|
|
|
|
|
})
|
|
|
|
|
let designType = ref('')
|
2023-08-23 17:50:09 +08:00
|
|
|
//颜色
|
|
|
|
|
let selectColor = ref({
|
|
|
|
|
rgba:{},
|
|
|
|
|
}) //顔色选择器默认颜色
|
|
|
|
|
let selectColorList = ref({
|
|
|
|
|
})
|
2023-10-11 17:34:14 +08:00
|
|
|
let workspace = ref({})
|
2024-04-25 14:39:28 +08:00
|
|
|
let sketchCatecoryList = computed(()=>{
|
|
|
|
|
return store.state.Workspace.workspacePosition
|
|
|
|
|
})
|
2024-06-17 09:39:01 +08:00
|
|
|
let designElementsType = computed(()=>{
|
|
|
|
|
return store.state.UserHabit.designElementsType;
|
|
|
|
|
})
|
2024-05-16 09:41:16 +08:00
|
|
|
let colorList = ref([{},{},{},{},{},{},{},{},{}])
|
|
|
|
|
let selectIndex = ref(0)
|
|
|
|
|
let gradient = ref({
|
|
|
|
|
gradientList:[
|
|
|
|
|
{
|
|
|
|
|
rgba:{
|
|
|
|
|
r:117,
|
|
|
|
|
g:119,
|
|
|
|
|
b:255,
|
|
|
|
|
a:1,
|
|
|
|
|
},
|
|
|
|
|
left:'0%'
|
|
|
|
|
},{
|
|
|
|
|
rgba:{
|
|
|
|
|
r:0,
|
|
|
|
|
g:222,
|
|
|
|
|
b:152,
|
|
|
|
|
a:1,
|
|
|
|
|
},
|
|
|
|
|
left:'100%'
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
angle:45,
|
|
|
|
|
selectIndex:-1,
|
|
|
|
|
gradientShow:false,
|
|
|
|
|
})
|
|
|
|
|
provide('colorList',colorList)
|
|
|
|
|
provide('selectIndex',selectIndex)
|
2024-06-17 09:39:01 +08:00
|
|
|
provide('designTypeList',designTypeList)
|
2023-10-30 17:26:36 +08:00
|
|
|
let {t} = useI18n()
|
2023-08-23 17:50:09 +08:00
|
|
|
return{
|
|
|
|
|
store,
|
2023-09-12 10:11:27 +08:00
|
|
|
current,
|
2023-08-23 17:50:09 +08:00
|
|
|
openClick,
|
2023-09-12 10:11:27 +08:00
|
|
|
searchPictureName,
|
2023-10-12 17:09:05 +08:00
|
|
|
total,
|
|
|
|
|
pageSize,
|
|
|
|
|
currentPage,
|
2023-09-12 10:11:27 +08:00
|
|
|
isShowLoading,
|
|
|
|
|
clothesList,
|
|
|
|
|
uploadList,
|
|
|
|
|
apparelList,
|
|
|
|
|
printList,
|
|
|
|
|
selectCode,
|
|
|
|
|
|
2024-06-17 09:39:01 +08:00
|
|
|
designTypeList,
|
|
|
|
|
printCatecoryList,
|
|
|
|
|
designType,
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
type_,
|
|
|
|
|
select,
|
|
|
|
|
selectColor,
|
|
|
|
|
selectColorList,
|
2023-10-11 17:34:14 +08:00
|
|
|
workspace,
|
2023-11-28 16:21:00 +08:00
|
|
|
driver__,
|
2023-12-20 17:03:42 +08:00
|
|
|
body,
|
2024-04-25 14:39:28 +08:00
|
|
|
sketchCatecoryList,
|
2024-06-17 09:39:01 +08:00
|
|
|
designElementsType,
|
2024-05-16 09:41:16 +08:00
|
|
|
colorList,
|
|
|
|
|
selectIndex,
|
|
|
|
|
gradient,
|
2023-10-30 17:26:36 +08:00
|
|
|
t,
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
},
|
2023-10-11 17:34:14 +08:00
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
data(){
|
|
|
|
|
return{
|
2023-09-12 10:11:27 +08:00
|
|
|
|
|
|
|
|
token: "",
|
|
|
|
|
uploadUrl:'',
|
|
|
|
|
upload: {
|
|
|
|
|
isPin: 0,
|
2023-12-11 15:22:55 +08:00
|
|
|
gender:'',
|
2023-09-12 10:11:27 +08:00
|
|
|
level1Type: 'Sketchboard',
|
|
|
|
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
indicator: h(LoadingOutlined, {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: "2.4rem",
|
|
|
|
|
},
|
|
|
|
|
spin: true,
|
|
|
|
|
}),
|
2023-08-23 17:50:09 +08:00
|
|
|
designShowPrview:1, //展示图片预览步骤
|
|
|
|
|
//颜色
|
|
|
|
|
reviewColor:{}, //预览的颜色
|
|
|
|
|
colorPickerVisible: true,
|
|
|
|
|
colorBlockHex:true,
|
|
|
|
|
getColorBg:false,
|
|
|
|
|
pantongName:'',//潘通值
|
|
|
|
|
pantongNameList:[],
|
|
|
|
|
tcxColor:'',
|
|
|
|
|
selectColorList: [],
|
|
|
|
|
colorFileList: [],
|
|
|
|
|
indicator : h(LoadingOutlined, {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: '2.4rem',
|
|
|
|
|
},
|
|
|
|
|
spin: true,
|
|
|
|
|
}),
|
2023-10-11 17:34:14 +08:00
|
|
|
getPantongNameTime:true,
|
|
|
|
|
workspaceCom:{}
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
},
|
2023-10-12 17:09:05 +08:00
|
|
|
directives:{
|
|
|
|
|
observe:{
|
|
|
|
|
mounted (el,binding) {
|
|
|
|
|
// console.log(binding.instance);
|
|
|
|
|
const ob = new IntersectionObserver(callback,{
|
|
|
|
|
root:null,
|
|
|
|
|
threshold:[.5]
|
|
|
|
|
})
|
|
|
|
|
ob.observe(el)
|
2024-09-11 16:36:08 +08:00
|
|
|
// this.currentPage = +=1
|
2023-10-12 17:09:05 +08:00
|
|
|
// this.pageSize = 12
|
2024-09-11 16:36:08 +08:00
|
|
|
// currentPage
|
2023-10-12 17:09:05 +08:00
|
|
|
let this_ = binding.instance
|
|
|
|
|
function callback(entries, observer) {
|
|
|
|
|
entries.forEach((entry) => {
|
2024-09-11 16:36:08 +08:00
|
|
|
if (entry.isIntersecting && !this_.isShowLoading) {
|
2023-10-12 17:09:05 +08:00
|
|
|
this_.getLibraryList()
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-10-11 17:34:14 +08:00
|
|
|
computed:{
|
2024-04-25 14:39:28 +08:00
|
|
|
|
2023-10-11 17:34:14 +08:00
|
|
|
|
|
|
|
|
getSelectRGB(selectColor){
|
|
|
|
|
|
|
|
|
|
return (selectColor)=>{
|
|
|
|
|
let rgba = selectColor.rgba
|
|
|
|
|
let data = {
|
|
|
|
|
r:rgba?.r || rgba?.r===0 ? rgba?.r : 255,
|
|
|
|
|
g:rgba?.g || rgba?.g===0 ? rgba?.g : 255,
|
|
|
|
|
b:rgba?.b || rgba?.b===0 ? rgba?.b : 255,
|
|
|
|
|
a:rgba?.a || rgba?.a===1 ? rgba?.a : 1,
|
|
|
|
|
hex:selectColor.hex == undefined ? '#FFFFFF': selectColor.hex
|
|
|
|
|
}
|
|
|
|
|
if(data.a != 1 || data.a != 0){
|
|
|
|
|
data.hex = selectColor.hex8?selectColor.hex8:selectColor.hex
|
|
|
|
|
}
|
|
|
|
|
return data
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-16 09:41:16 +08:00
|
|
|
setGradient(){
|
|
|
|
|
// return this.setGradientAngle(gradient)
|
|
|
|
|
return (gradient)=>{
|
|
|
|
|
let gradientStr = ''
|
2024-08-06 10:05:50 +08:00
|
|
|
if(!gradient.gradientList)return
|
2024-05-16 09:41:16 +08:00
|
|
|
gradient.gradientList.sort((a, b) => {
|
|
|
|
|
let aArr = a.left.split('%')[0]
|
|
|
|
|
let bArr = b.left.split('%')[0]
|
|
|
|
|
return aArr - bArr;
|
|
|
|
|
});
|
|
|
|
|
gradient.gradientList.forEach((item,index)=>{
|
|
|
|
|
let str = ','
|
|
|
|
|
if(gradient.gradientList.length == index+1)str = ''
|
|
|
|
|
gradientStr += `rgba(${item.rgba.r},${item.rgba.g},${item.rgba.b},${item.rgba.a}) ${item.left}${str}`
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
return `${gradientStr}`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2023-10-11 17:34:14 +08:00
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
},
|
|
|
|
|
watch:{
|
2024-05-16 09:41:16 +08:00
|
|
|
// selectColor(newVal,oldVal){
|
|
|
|
|
// this.colorList[this.selectIndex] = newVal
|
|
|
|
|
// let colorList = this.colorList.filter((v) => v && Object.keys(v).length)
|
2023-10-11 17:34:14 +08:00
|
|
|
|
|
|
|
|
|
2024-05-16 09:41:16 +08:00
|
|
|
// clearInterval(this.getPantongNameTime)
|
|
|
|
|
// this.getPantongNameTime = setTimeout(() => {
|
|
|
|
|
// this.getPantongName(newVal.rgba)
|
|
|
|
|
// }, 100);
|
|
|
|
|
// },
|
|
|
|
|
selectColor:{
|
|
|
|
|
handler(newVal,oldVal){
|
|
|
|
|
if(typeof newVal?.rgba?.r !== 'number' && typeof newVal?.rgba?.r !== 'string'){
|
|
|
|
|
this.colorList[this.selectIndex] = {}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.colorList[this.selectIndex].rgba = newVal.rgba
|
|
|
|
|
this.colorList[this.selectIndex].hex = newVal.hex
|
|
|
|
|
if(this.colorList[this.selectIndex]?.gradient && this.colorList[this.selectIndex]?.gradient?.selectIndex>-1 && this.colorList[this.selectIndex]?.gradient?.gradientShow){
|
|
|
|
|
this.colorList[this.selectIndex].gradient.gradientList[this.colorList[this.selectIndex].gradient.selectIndex].rgba = {
|
|
|
|
|
r:newVal.rgba.r,
|
|
|
|
|
g:newVal.rgba.g,
|
|
|
|
|
b:newVal.rgba.b,
|
|
|
|
|
a:1,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// console.log(JSON.parse(JSON.stringify(this.colorList)),JSON.parse(JSON.stringify(newVal)));
|
|
|
|
|
clearInterval(this.getPantongNameTime)
|
|
|
|
|
this.getPantongNameTime = setTimeout(() => {
|
2024-06-17 11:32:31 +08:00
|
|
|
this.getPantongName(newVal.rgba,-1)
|
2024-05-16 09:41:16 +08:00
|
|
|
}, 100);
|
|
|
|
|
},
|
|
|
|
|
immediate: true
|
|
|
|
|
},
|
2023-10-11 17:34:14 +08:00
|
|
|
workspaceCom(newVal,oldVal){
|
|
|
|
|
this.workspace = newVal
|
2024-06-24 16:45:20 +08:00
|
|
|
this.upload.gender = newVal?.sexEnum?.value
|
2023-10-11 17:34:14 +08:00
|
|
|
},
|
|
|
|
|
},
|
2023-09-12 10:11:27 +08:00
|
|
|
mounted () {
|
|
|
|
|
this.token = getCookie("token") || "";
|
|
|
|
|
this.uploadUrl = getUploadUrl();
|
2024-02-22 10:03:51 +08:00
|
|
|
nextTick().then(()=>{
|
|
|
|
|
const backIcon = document.createElement('div');
|
|
|
|
|
backIcon.classList.add('vc-sketch-color-wrap')
|
|
|
|
|
let dropperDom = document.getElementsByClassName("detail_modal_body_select")?.[0].getElementsByClassName('vc-chrome-fields-wrap')[0]
|
|
|
|
|
dropperDom.appendChild(backIcon);
|
|
|
|
|
backIcon.addEventListener('click',async ()=>{
|
|
|
|
|
try {
|
|
|
|
|
const dropper = new EyeDropper();
|
|
|
|
|
const result = await dropper.open();
|
|
|
|
|
let hex = result.sRGBHex.replace("#", "");
|
|
|
|
|
// 将十六进制颜色码拆分成红、绿、蓝三个部分
|
|
|
|
|
const r = parseInt(hex.substring(0, 2), 16);
|
|
|
|
|
const g = parseInt(hex.substring(2, 4), 16);
|
|
|
|
|
const b = parseInt(hex.substring(4, 6), 16);
|
|
|
|
|
this.selectColor = {rgba:{r:r,g:g,b:b,a:1},hex:result.sRGBHex}
|
|
|
|
|
// return `rgb(${r}, ${g}, ${b})`;
|
|
|
|
|
// box.style.backgroundColor = label.textContent = result.sRGBHex;
|
|
|
|
|
} catch (e) {
|
|
|
|
|
message.info(this.t('DesignDetailAlter.jsContent1'))
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-09-12 10:11:27 +08:00
|
|
|
})
|
2024-02-22 10:03:51 +08:00
|
|
|
|
2023-09-12 10:11:27 +08:00
|
|
|
},
|
2023-08-23 17:50:09 +08:00
|
|
|
methods:{
|
|
|
|
|
//点击判断
|
|
|
|
|
init(num){
|
|
|
|
|
this.type_ = num
|
|
|
|
|
this.select = true
|
2024-05-27 17:57:37 +08:00
|
|
|
let arr
|
|
|
|
|
if(this.current?.color){
|
|
|
|
|
arr = this.current.color
|
|
|
|
|
}else{
|
|
|
|
|
arr = {
|
|
|
|
|
r: 0,
|
|
|
|
|
g: 0,
|
|
|
|
|
b: 0,
|
|
|
|
|
a:1,
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
// if(!arr[3]){
|
|
|
|
|
// arr[3] = 1
|
|
|
|
|
// }
|
2023-08-23 17:50:09 +08:00
|
|
|
this.selectColor = {
|
|
|
|
|
rgba:{
|
2023-09-12 10:11:27 +08:00
|
|
|
r:Number(arr.r),
|
|
|
|
|
g:Number(arr.g),
|
2023-10-20 17:21:45 +08:00
|
|
|
b:Number(arr.b),
|
2023-09-12 10:11:27 +08:00
|
|
|
a:Number(arr.a?arr.a:1),
|
2023-08-23 17:50:09 +08:00
|
|
|
},
|
2024-05-16 09:41:16 +08:00
|
|
|
hex:this.rgbaToHex([arr.r,arr.g,arr.b,arr.a?arr.a:1]),
|
|
|
|
|
gradient:this.current.gradient
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
|
|
|
|
this.uploadList = []
|
|
|
|
|
if (num == 1) {
|
|
|
|
|
this.selectCode = 'Sketchboard'
|
|
|
|
|
this.upload.level1Type = 'Sketchboard'
|
|
|
|
|
this.uploadList = this.apparelList
|
2024-06-17 09:39:01 +08:00
|
|
|
this.designTypeList = this.sketchCatecoryList
|
|
|
|
|
this.designType = this.designTypeList[0].value
|
2023-09-12 10:11:27 +08:00
|
|
|
}else if (num == 2){
|
|
|
|
|
this.selectCode = 'Printboard'
|
|
|
|
|
this.upload.level1Type = 'Printboard'
|
|
|
|
|
this.uploadList = this.printList
|
2024-06-17 09:39:01 +08:00
|
|
|
this.designTypeList = this.printCatecoryList
|
|
|
|
|
this.designType = this.designTypeList[0].value
|
|
|
|
|
}else if (num == 4){
|
|
|
|
|
this.selectCode = 'DesignElements'
|
|
|
|
|
this.upload.level1Type = 'DesignElements'
|
|
|
|
|
this.designTypeList = this.designElementsType
|
|
|
|
|
this.designType = this.designTypeList[0]?.value
|
|
|
|
|
this.openClick = 2
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
2024-06-17 09:39:01 +08:00
|
|
|
if(num == 1 || num == 2 || num == 4){
|
2023-09-12 10:11:27 +08:00
|
|
|
this.clothesList = []
|
|
|
|
|
this.getLibraryList()
|
2024-08-30 11:07:31 +08:00
|
|
|
}else{
|
|
|
|
|
this.store.state.UploadFilesModule.allBoardData?.colorBoards?.forEach((item,index) => {
|
|
|
|
|
this.colorList[index+1] = {
|
|
|
|
|
gradient:item.gradient,
|
|
|
|
|
rgba:item.rgbValue,
|
|
|
|
|
tcx:item.tcx,
|
|
|
|
|
name:item.name,
|
|
|
|
|
}
|
|
|
|
|
if(item.gradient){
|
|
|
|
|
this.colorList[index+1].gradient = item.gradient
|
|
|
|
|
}else{
|
|
|
|
|
delete this.colorList[index+1].gradient
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
2024-08-30 11:07:31 +08:00
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
let DesignDetailEnd = this.$refs.DesignDetailEnd
|
|
|
|
|
DesignDetailEnd.init(num)
|
2023-10-11 17:34:14 +08:00
|
|
|
this.workspaceCom = computed(()=>{
|
|
|
|
|
return this.store?.state?.Workspace?.workspace
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-04-25 14:39:28 +08:00
|
|
|
|
2023-09-12 10:11:27 +08:00
|
|
|
deleteFile(num){
|
|
|
|
|
this.uploadList.splice(num, 1)
|
|
|
|
|
},
|
|
|
|
|
upFileUploadChange(data) {
|
|
|
|
|
let file = data.file;
|
2023-12-13 16:09:17 +08:00
|
|
|
let bor = true
|
2023-09-12 10:11:27 +08:00
|
|
|
if (file.status === "done") {
|
|
|
|
|
let res = JSON.parse(file.xhr.response);
|
2023-12-13 16:09:17 +08:00
|
|
|
if(res.errCode == 0){
|
|
|
|
|
file.id = res.data.id;
|
|
|
|
|
file.url = res.data.url;
|
|
|
|
|
file.resData = res.data;
|
2024-06-24 16:45:20 +08:00
|
|
|
let type
|
|
|
|
|
if(res.data.level2Type){
|
|
|
|
|
this.designTypeList.forEach((item) => {
|
|
|
|
|
if(item.value == res.data.level2Type){
|
|
|
|
|
file.categoryValue = item?.value;
|
|
|
|
|
type = item.value
|
|
|
|
|
file.category = item?.name;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
file.categoryValue = this.designTypeList[0].value;
|
|
|
|
|
type = this.designTypeList[0].value
|
|
|
|
|
file.category = this.designTypeList[0].name;
|
|
|
|
|
}
|
2023-12-13 16:09:17 +08:00
|
|
|
file.designType = res.data.designType
|
2023-12-20 17:03:42 +08:00
|
|
|
file.level2Type = type;
|
2023-12-13 16:09:17 +08:00
|
|
|
file.minIOPath = file.resData.minIOPath
|
|
|
|
|
let fileList = this.uploadList.filter(
|
|
|
|
|
(v) => v.status === "done"
|
|
|
|
|
);
|
2023-12-15 15:23:34 +08:00
|
|
|
this.uploadList = fileList
|
2024-06-17 09:39:01 +08:00
|
|
|
this.selectImgItem(this.uploadList[this.uploadList.length-1])
|
2023-12-15 15:23:34 +08:00
|
|
|
// this.store.commit("clearMoodTemplateId");
|
|
|
|
|
if(this.selectCode == 'Sketchboard'){
|
|
|
|
|
this.apparelList = this.uploadList
|
|
|
|
|
}else{
|
|
|
|
|
this.printList = this.uploadList
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
2023-12-15 15:23:34 +08:00
|
|
|
// if (this.uploadList.length > 8) {
|
|
|
|
|
// message.info(this.t('DesignDetailAlter.jsContent2'));
|
|
|
|
|
// } else {
|
|
|
|
|
// // this.store.commit("setSketchboardFile", fileList);
|
|
|
|
|
// }
|
2023-12-13 16:09:17 +08:00
|
|
|
}else{
|
|
|
|
|
bor = false
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
} else if (file.status === "error") {
|
2023-12-13 16:09:17 +08:00
|
|
|
bor = false
|
|
|
|
|
}
|
|
|
|
|
if(!bor){
|
2023-12-14 13:26:51 +08:00
|
|
|
let res = JSON.parse(file.xhr.response);
|
2023-12-13 16:09:17 +08:00
|
|
|
let index = -1;
|
2023-09-12 10:11:27 +08:00
|
|
|
this.uploadList.forEach((ele, index1) => {
|
|
|
|
|
if (file.uid === ele.uid) {
|
|
|
|
|
index = index1;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (index > -1) {
|
|
|
|
|
this.uploadList.splice(index, 1);
|
|
|
|
|
}
|
2023-12-13 16:09:17 +08:00
|
|
|
// message.warning(file.name + this.t('DesignDetailAlter.jsContent3'));
|
|
|
|
|
message.warning(res.errMsg);
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//关闭
|
|
|
|
|
terminate(){
|
|
|
|
|
let DesignDetailEnd = this.$refs.DesignDetailEnd
|
|
|
|
|
this.select = false
|
2024-05-16 09:41:16 +08:00
|
|
|
this.selectIndex = 0
|
2023-09-12 10:11:27 +08:00
|
|
|
DesignDetailEnd.type_ = 0
|
2023-10-20 17:21:45 +08:00
|
|
|
this.colorFileList = []
|
|
|
|
|
this.selectColorList = []
|
2023-12-14 12:02:42 +08:00
|
|
|
DesignDetailEnd.sketchImg = {}
|
2023-09-12 10:11:27 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//切换整体衣服
|
|
|
|
|
changePlace(){
|
|
|
|
|
this.uploadList = []
|
|
|
|
|
let DesignDetailEnd = this.$refs.DesignDetailEnd
|
|
|
|
|
this.uploadList = []
|
|
|
|
|
this.apparelList = []
|
|
|
|
|
this.printList = []
|
2024-05-16 09:41:16 +08:00
|
|
|
this.colorList = [{},{},{},{},{},{},{},{},{}]
|
2023-12-20 17:03:42 +08:00
|
|
|
// DesignDetailEnd.colorList = [{}]
|
2023-09-25 10:09:00 +08:00
|
|
|
DesignDetailEnd.sketchImg={}
|
2023-10-20 17:21:45 +08:00
|
|
|
this.terminate()
|
2024-06-17 09:39:01 +08:00
|
|
|
DesignDetailEnd.clearModal()
|
2023-09-12 10:11:27 +08:00
|
|
|
},
|
|
|
|
|
// this.getLibraryList('Moodboard')
|
|
|
|
|
// this.getLibraryList('Printboard')
|
2023-10-11 17:34:14 +08:00
|
|
|
setSketchLibrary(item){
|
|
|
|
|
let data = {
|
2024-01-05 14:12:03 +08:00
|
|
|
libraryId:[item.id],
|
2023-10-11 17:34:14 +08:00
|
|
|
level2Type:item.level2Type,
|
|
|
|
|
}
|
|
|
|
|
Https.axiosPost(Https.httpUrls.setSketchLibrary,data).then(
|
|
|
|
|
(rv) => {
|
|
|
|
|
}
|
|
|
|
|
).catch((res)=>{
|
|
|
|
|
});
|
|
|
|
|
},
|
2023-09-12 10:11:27 +08:00
|
|
|
selectImgItem(imgData){
|
2024-06-17 09:39:01 +08:00
|
|
|
let DesignDetailEnd = this.$refs.DesignDetailEnd
|
2024-06-24 16:45:20 +08:00
|
|
|
imgData.categoryValue = imgData.categoryValue?imgData.categoryValue:imgData.level2TypeEnum.name
|
|
|
|
|
imgData.category = imgData.category?imgData.category:imgData.level2TypeEnum.value
|
2023-09-12 10:11:27 +08:00
|
|
|
if(this.selectCode == 'Sketchboard'){
|
2023-09-25 10:09:00 +08:00
|
|
|
// this.current.id_ = imgData.id
|
|
|
|
|
// this.current.path = imgData.url
|
|
|
|
|
DesignDetailEnd.setSketchImg(imgData)
|
|
|
|
|
// DesignDetailEnd.sketchImg.id_ = imgData.id
|
|
|
|
|
// DesignDetailEnd.sketchImg.path = imgData.url
|
2024-06-17 09:39:01 +08:00
|
|
|
}else if(this.selectCode == 'Printboard'){
|
|
|
|
|
// this.current.printObject.path = imgData?.url
|
|
|
|
|
// this.current.printObject.id = imgData?.id
|
|
|
|
|
// this.current.printObject.designType = imgData?.designType
|
|
|
|
|
// this.current.printObject.minIOPath = imgData.minIOPath
|
|
|
|
|
// this.current.printObject.prints = [{
|
|
|
|
|
// minIOPath:imgData.minIOPath,
|
|
|
|
|
// path:imgData?.url,
|
|
|
|
|
// designType: imgData?.designType
|
|
|
|
|
// }]
|
2024-08-14 16:02:55 +08:00
|
|
|
|
2024-06-17 09:39:01 +08:00
|
|
|
imgData.path = imgData.url
|
|
|
|
|
DesignDetailEnd.printsList.push(imgData)
|
2024-08-14 16:02:55 +08:00
|
|
|
if(this.driver__.driver){
|
|
|
|
|
nextTick().then(()=>{
|
|
|
|
|
driverObj__.moveNext();
|
|
|
|
|
})
|
|
|
|
|
}
|
2023-10-11 17:34:14 +08:00
|
|
|
// console.log(this.current.printObject,imgData);
|
2024-06-17 09:39:01 +08:00
|
|
|
}else if(this.selectCode == 'DesignElements'){
|
|
|
|
|
imgData.path = imgData.url
|
|
|
|
|
DesignDetailEnd.elementsList.push(imgData)
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
|
|
|
|
},
|
2024-06-17 09:39:01 +08:00
|
|
|
handleChange(){
|
|
|
|
|
this.currentPage = 1
|
|
|
|
|
this.clothesList = []
|
|
|
|
|
this.getLibraryList('')
|
|
|
|
|
},
|
2023-09-12 10:11:27 +08:00
|
|
|
//请求我的印花&&模型
|
|
|
|
|
getLibraryList(){
|
2024-09-11 16:36:08 +08:00
|
|
|
this.isShowLoading = true
|
2024-06-17 09:39:01 +08:00
|
|
|
let level2Type = ''
|
2024-08-30 11:07:31 +08:00
|
|
|
if(this.selectCode == 'Printboard' || this.selectCode == 'DesignElements'){
|
2024-06-17 09:39:01 +08:00
|
|
|
level2Type = this.designType
|
2024-08-30 11:07:31 +08:00
|
|
|
}else if(this.selectCode == 'Sketchboard'){
|
|
|
|
|
level2Type = this.current.type
|
2024-06-17 09:39:01 +08:00
|
|
|
}
|
2023-10-12 17:09:05 +08:00
|
|
|
let workspace = this.store.state.Workspace.workspace
|
2023-09-12 10:11:27 +08:00
|
|
|
let data = {
|
2024-06-17 09:39:01 +08:00
|
|
|
// level1Type:'Printboard',
|
2023-09-12 10:11:27 +08:00
|
|
|
level1Type:this.selectCode,
|
2024-06-17 09:39:01 +08:00
|
|
|
// level2Type:'Pattern',
|
2024-08-30 11:07:31 +08:00
|
|
|
level2Type:level2Type,
|
2023-10-12 17:09:05 +08:00
|
|
|
modelSex:workspace?.sex,
|
|
|
|
|
page:this.currentPage,
|
2023-09-12 10:11:27 +08:00
|
|
|
pictureName:this.searchPictureName,
|
2023-10-12 17:09:05 +08:00
|
|
|
size:this.pageSize+this.clothesList.length,
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
|
|
|
|
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
|
|
|
|
|
(rv) => {
|
2024-04-25 14:39:28 +08:00
|
|
|
if(this.selectCode == 'Sketchboard'){
|
|
|
|
|
rv.content.forEach((vItem)=>{
|
|
|
|
|
this.sketchCatecoryList.forEach((item) => {
|
|
|
|
|
if(item.value == vItem.level2Type){
|
2024-06-24 09:47:59 +08:00
|
|
|
vItem.categoryValue = item.value
|
|
|
|
|
vItem.category = item.name
|
2024-04-25 14:39:28 +08:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
this.clothesList = rv.content
|
|
|
|
|
this.isShowLoading = false
|
2023-10-12 17:09:05 +08:00
|
|
|
this.total = rv.total
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
|
|
|
|
).catch((res)=>{
|
|
|
|
|
this.isShowLoading = false
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
//衣服
|
|
|
|
|
open(num) {
|
2024-06-17 09:39:01 +08:00
|
|
|
if(num == 1 && this.type_ ==4)return
|
2023-08-23 17:50:09 +08:00
|
|
|
this.openClick = num;
|
|
|
|
|
if(num ==2 ){
|
2023-10-11 17:34:14 +08:00
|
|
|
this.getLibraryList()
|
2023-11-28 16:21:00 +08:00
|
|
|
if(this.driver__.driver){
|
|
|
|
|
nextTick().then(()=>{
|
|
|
|
|
driverObj__.moveNext();
|
|
|
|
|
})
|
|
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//印花
|
2023-09-12 10:11:27 +08:00
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//颜色
|
|
|
|
|
beforeUpload(file){
|
|
|
|
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
|
|
|
|
|
if (!isJpgOrPng) {
|
2023-11-16 17:23:17 +08:00
|
|
|
message.info(this.t('DesignDetailAlter.jsContent4'));
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
2024-06-17 09:39:01 +08:00
|
|
|
const isLt2M = file.size / 1024 / 1024 < 5;
|
2023-08-23 17:50:09 +08:00
|
|
|
if (!isLt2M) {
|
2023-11-16 17:23:17 +08:00
|
|
|
message.info(this.t('DesignDetailAlter.jsContent5'));
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
|
|
|
|
},
|
|
|
|
|
//清除当前的颜色
|
|
|
|
|
colorDeleteFile(index){
|
|
|
|
|
this.colorFileList.splice(index, 1)
|
|
|
|
|
this.selectColorList = []
|
|
|
|
|
},
|
|
|
|
|
setUplpadColor(color){
|
|
|
|
|
this.selectColor = color
|
|
|
|
|
},
|
|
|
|
|
rgbaToHex(rgba) { // rgba转16进制
|
|
|
|
|
let hex = '#';
|
2023-09-12 10:11:27 +08:00
|
|
|
rgba.forEach((i,index) => {
|
|
|
|
|
if(index == 3){
|
|
|
|
|
hex += Math.round(i * 255).toString(16)
|
|
|
|
|
}else{
|
|
|
|
|
hex += Number(i).toString(16).padStart(2, '0');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
return hex;
|
|
|
|
|
},
|
|
|
|
|
//通过HSV获取颜色
|
|
|
|
|
getHsvColor(color){
|
|
|
|
|
// let hsv = rgbToHsv(color)
|
|
|
|
|
this.pantongName = ''
|
|
|
|
|
// {params:{id:3}}
|
|
|
|
|
// console.log(color);
|
|
|
|
|
let colorList = []
|
|
|
|
|
color.forEach((item,index)=>{
|
|
|
|
|
let arr = [item.rgba.r,item.rgba.g,item.rgba.b,item.rgba.a]
|
|
|
|
|
colorList.push(arr)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let hsvList = []
|
|
|
|
|
colorList.forEach((item)=>{
|
|
|
|
|
let hsv = rgbToHsv(item)
|
|
|
|
|
if(hsvList.length == 0){
|
|
|
|
|
}else{
|
|
|
|
|
if(hsvList[0].h+5){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let obj = {
|
|
|
|
|
h:Number(hsv[0]),
|
|
|
|
|
s:Number(hsv[1]),
|
|
|
|
|
v:Number(hsv[2]),
|
|
|
|
|
}
|
|
|
|
|
hsvList.push(obj)
|
|
|
|
|
})
|
|
|
|
|
Https.axiosPost(Https.httpUrls.getRgbByHsvBatch, hsvList).then(
|
|
|
|
|
(rv) => {
|
|
|
|
|
if(rv){
|
|
|
|
|
rv.forEach(element => {
|
|
|
|
|
this.pantongNameList.push(element.name)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
).catch(res=>{
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-05-16 09:41:16 +08:00
|
|
|
setOperate(){
|
|
|
|
|
this.selectColor.rgba = this.selectColor?.rgba?.r?this.selectColor.rgba:{r:0,g:0,b:0,a:1}
|
|
|
|
|
this.gradient.selectIndex = 0
|
|
|
|
|
this.gradient.gradientShow = true
|
|
|
|
|
this.colorList[this.selectIndex].rgba = this.selectColor.rgba
|
|
|
|
|
if(!this.colorList[this.selectIndex].gradient){
|
|
|
|
|
if(this.selectColor.rgba.r){
|
|
|
|
|
this.gradient.gradientList[this.gradient.selectIndex].rgba = {
|
|
|
|
|
r:this.selectColor.rgba.r,
|
|
|
|
|
g:this.selectColor.rgba.g,
|
|
|
|
|
b:this.selectColor.rgba.b,
|
|
|
|
|
a:1,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.colorList[this.selectIndex].gradient = JSON.parse(JSON.stringify(this.gradient))
|
|
|
|
|
}else{
|
|
|
|
|
this.selectColor = {rgba:this.colorList[this.selectIndex].gradient.gradientList[0].rgba}
|
2024-08-06 10:05:50 +08:00
|
|
|
this.colorList[this.selectIndex].gradient = null
|
2024-05-16 09:41:16 +08:00
|
|
|
}
|
|
|
|
|
let colorList =this.colorList.filter((v) => v && Object.keys(v).length)
|
|
|
|
|
},
|
2024-05-22 10:45:52 +08:00
|
|
|
mousedownGradient(event,item,index,str){
|
|
|
|
|
let moible = isMoible()
|
|
|
|
|
if(moible && str == 'mousedown'){
|
|
|
|
|
return
|
|
|
|
|
}else if(!moible && str == 'touchstart'){
|
|
|
|
|
return
|
|
|
|
|
}
|
2024-05-16 09:41:16 +08:00
|
|
|
event.stopPropagation();
|
|
|
|
|
this.colorList[this.selectIndex].gradient.selectIndex = index
|
|
|
|
|
let gradientRgba = item.rgba
|
|
|
|
|
let rgba = [gradientRgba.r,gradientRgba.g,gradientRgba.b,gradientRgba.a?gradientRgba.a:1]
|
|
|
|
|
let hex = this.rgbaToHex(rgba)
|
|
|
|
|
this.selectColor = {rgba:gradientRgba,hex:hex} //顔色选择器默认颜色
|
|
|
|
|
// isMoible() true为移动端
|
2024-06-17 09:39:01 +08:00
|
|
|
let gradientWidth = document.querySelector('.detail_modal_body_select .color_setting_operate_bg').clientWidth
|
2024-05-16 09:41:16 +08:00
|
|
|
let position = {
|
2024-05-22 10:45:52 +08:00
|
|
|
x:moible?event.touches[0].screenX:event?.x,
|
2024-05-16 09:41:16 +08:00
|
|
|
left:event.target.style.left?event.target.style.left.split('%')[0]:0
|
|
|
|
|
}
|
|
|
|
|
let mousedownGradient = (e)=>{
|
2024-05-22 10:45:52 +08:00
|
|
|
let left = ((moible?e.touches[0].screenX:e.x) - position.x)/gradientWidth*100+Number(position.left)
|
2024-05-16 09:41:16 +08:00
|
|
|
left = (left<0?0:left>100?100:left)
|
|
|
|
|
item.left = left+'%'
|
|
|
|
|
}
|
|
|
|
|
let mouseupGradient = ()=>{
|
2024-05-22 10:45:52 +08:00
|
|
|
if(moible){
|
|
|
|
|
window.removeEventListener('touchmove',mousedownGradient)
|
|
|
|
|
window.removeEventListener('touchend',mouseupGradient)
|
|
|
|
|
}else{
|
|
|
|
|
window.removeEventListener('mousemove',mousedownGradient)
|
|
|
|
|
window.removeEventListener('mouseup',mouseupGradient)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(moible){
|
|
|
|
|
window.addEventListener('touchmove',mousedownGradient)
|
|
|
|
|
window.addEventListener('touchend',mouseupGradient)
|
|
|
|
|
}else{
|
|
|
|
|
window.addEventListener('mousemove',mousedownGradient)
|
|
|
|
|
window.addEventListener('mouseup',mouseupGradient)
|
2024-05-16 09:41:16 +08:00
|
|
|
}
|
|
|
|
|
// event.target.addEventListener('touchmove',)
|
|
|
|
|
},
|
2024-05-22 10:45:52 +08:00
|
|
|
mousedownGradientAngle(event,str){
|
|
|
|
|
let moible = isMoible()
|
|
|
|
|
if(moible && str == 'mousedown'){
|
|
|
|
|
return
|
|
|
|
|
}else if(!moible && str == 'touchstart'){
|
|
|
|
|
return
|
|
|
|
|
}
|
2024-05-16 09:41:16 +08:00
|
|
|
event.stopPropagation();
|
|
|
|
|
// isMoible() true为移动端
|
|
|
|
|
let domPosition = event.target.getBoundingClientRect()
|
|
|
|
|
let position = {
|
|
|
|
|
x:domPosition.x+domPosition.width/2,
|
|
|
|
|
y:domPosition.y+domPosition.height/2,
|
|
|
|
|
}
|
|
|
|
|
let angle
|
2024-05-22 10:45:52 +08:00
|
|
|
|
2024-05-16 09:41:16 +08:00
|
|
|
let mousedownGradientAngle = (e)=>{
|
|
|
|
|
let X = position.x
|
|
|
|
|
let Y = position.y
|
2024-05-22 10:45:52 +08:00
|
|
|
let x = (moible?e.touches[0].clientX:e?.x) - X
|
|
|
|
|
let y = Y -( moible?e.touches[0].clientY:e?.y)
|
2024-05-16 09:41:16 +08:00
|
|
|
angle = Math.atan2(x,y)*(180 / Math.PI)
|
|
|
|
|
// this.colorList[this.selectIndex].gradient = JSON.parse(JSON.stringify(this.gradient))
|
|
|
|
|
this.colorList[this.selectIndex].gradient.angle = angle
|
2023-09-12 10:11:27 +08:00
|
|
|
|
2024-05-16 09:41:16 +08:00
|
|
|
}
|
|
|
|
|
let mouseupGradientAngle = ()=>{
|
2024-05-22 10:45:52 +08:00
|
|
|
if(moible){
|
|
|
|
|
window.removeEventListener('touchmove',mousedownGradientAngle)
|
|
|
|
|
window.removeEventListener('touchend',mouseupGradientAngle)
|
|
|
|
|
}else{
|
|
|
|
|
window.removeEventListener('mousemove',mousedownGradientAngle)
|
|
|
|
|
window.removeEventListener('mouseup',mouseupGradientAngle)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(moible){
|
|
|
|
|
window.addEventListener('touchmove',mousedownGradientAngle)
|
|
|
|
|
window.addEventListener('touchend',mouseupGradientAngle)
|
|
|
|
|
}else{
|
|
|
|
|
window.addEventListener('mousemove',mousedownGradientAngle)
|
|
|
|
|
window.addEventListener('mouseup',mouseupGradientAngle)
|
2024-05-16 09:41:16 +08:00
|
|
|
}
|
|
|
|
|
},
|
2023-08-23 17:50:09 +08:00
|
|
|
//通过tcx获取颜色
|
|
|
|
|
getTcxColor(){
|
|
|
|
|
if(!this.tcxColor){
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
let DesignDetailEnd = this.$refs.DesignDetailEnd
|
2023-11-13 17:33:41 +08:00
|
|
|
let pattern = /^\d{2}-\d{4}$/;
|
|
|
|
|
if(pattern.test(this.tcxColor)){
|
|
|
|
|
Https.axiosGet(Https.httpUrls.getRgbByTcx + '?tcx=' + this.tcxColor).then((rv) =>{
|
|
|
|
|
if(rv && rv.name){
|
|
|
|
|
// let hex = this.rgbaToHex([color.r,color.g,color.b])
|
|
|
|
|
let hex = this.rgbaToHex([rv.r,rv.g,rv.b,rv.a? rv.a :1])
|
|
|
|
|
this.reviewColor = rv?.r + ''? {rgba:{r:rv.r,g:rv.g,b:rv.b,a:1},hex:hex} : {hex:''}
|
|
|
|
|
this.selectColor = this.reviewColor
|
2024-05-16 09:41:16 +08:00
|
|
|
this.colorList[this.selectIndex] = {r:rv.r, g:rv.g, b:rv.b}
|
2023-11-13 17:33:41 +08:00
|
|
|
this.pantongName = rv.name
|
2024-05-16 09:41:16 +08:00
|
|
|
let colorList =this.colorList.filter((v) => Object.keys(v).length)
|
2023-11-13 17:33:41 +08:00
|
|
|
this.getColorBg = true
|
|
|
|
|
}else{
|
2023-11-16 17:23:17 +08:00
|
|
|
message.info(this.t('DesignDetailAlter.jsContent6'))
|
2023-11-13 17:33:41 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else{
|
2023-11-16 17:23:17 +08:00
|
|
|
message.info(this.t('ColorboardUpload.jsContent5'))
|
2023-11-13 17:33:41 +08:00
|
|
|
}
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
},
|
2023-09-12 10:11:27 +08:00
|
|
|
//查询颜色的潘通值和txc
|
2024-06-17 11:32:31 +08:00
|
|
|
getPantongName(v,index) {
|
2023-12-20 17:03:42 +08:00
|
|
|
if(v?.r == undefined){
|
2023-09-12 10:11:27 +08:00
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let color = [v.r, v.g, v.b];
|
|
|
|
|
let hsv = rgbToHsv(color);
|
|
|
|
|
let data = [{
|
|
|
|
|
h: hsv[0],
|
|
|
|
|
s: hsv[1],
|
|
|
|
|
v: hsv[2],
|
|
|
|
|
}]
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
Https.axiosPost(Https.httpUrls.getRgbByHsvBatch, data)
|
|
|
|
|
.then((rv) => {
|
|
|
|
|
if (rv) {
|
2024-06-17 11:32:31 +08:00
|
|
|
if(index == -1){
|
|
|
|
|
this.colorList[this.selectIndex].tcx = rv[0].tcx
|
|
|
|
|
this.colorList[this.selectIndex].name = rv[0].name
|
|
|
|
|
}else{
|
|
|
|
|
this.colorList[index].tcx = rv[0].tcx
|
|
|
|
|
this.colorList[index].name = rv[0].name
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
resolve();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
reject();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-05-16 09:41:16 +08:00
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
fileUploadChange(data){
|
|
|
|
|
let file = data.file
|
|
|
|
|
let fileData = file.originFileObj
|
|
|
|
|
var reader = new FileReader();
|
|
|
|
|
reader.onload = (e) => {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
file.imgUrl = data_new
|
|
|
|
|
file.status = 'done'
|
|
|
|
|
this.colorFileList.push(file)
|
|
|
|
|
|
2023-09-25 10:09:00 +08:00
|
|
|
setTimeout(async ()=>{
|
2023-10-20 17:21:45 +08:00
|
|
|
const img = new Image();
|
|
|
|
|
let colorImage = this.$refs.colorImage
|
|
|
|
|
img.src = colorImage[0].src;
|
|
|
|
|
|
|
|
|
|
img.onload = async () => {
|
|
|
|
|
const colorThief = new ColorThief();
|
|
|
|
|
// let domImg = colorImage[0];
|
|
|
|
|
// let color = colorThief.getColor(img)
|
|
|
|
|
// let colorHex = this.rgbaToHex(color)
|
|
|
|
|
let selectColorList = [];
|
|
|
|
|
let selectColor = colorThief.getPalette(img,8)
|
|
|
|
|
//排序
|
|
|
|
|
let obj = {
|
|
|
|
|
max : 5,
|
|
|
|
|
min: 5,
|
2023-09-25 10:09:00 +08:00
|
|
|
}
|
2023-10-20 17:21:45 +08:00
|
|
|
let colorSort
|
|
|
|
|
await GO.setColor(selectColor,file.imgUrl,obj).then(
|
|
|
|
|
(rv) => {
|
|
|
|
|
if(rv){
|
|
|
|
|
colorSort = rv.ratio
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
)
|
2023-10-20 17:21:45 +08:00
|
|
|
colorSort.sort((a, b) => {
|
|
|
|
|
var a_num = a.ratio;
|
|
|
|
|
var b_num = b.ratio;
|
|
|
|
|
return b_num - a_num;
|
|
|
|
|
});
|
|
|
|
|
selectColor = []
|
|
|
|
|
colorSort.forEach(v=>{
|
|
|
|
|
selectColor.push(v.rgb)
|
|
|
|
|
})
|
|
|
|
|
selectColor = selectColor.join('&')
|
|
|
|
|
selectColor = selectColor.split("&")
|
|
|
|
|
let color = selectColor[0].split(',')
|
|
|
|
|
let colorHex = this.rgbaToHex(color)
|
|
|
|
|
|
|
|
|
|
let colorLi = []
|
|
|
|
|
new Set(selectColor).forEach((item)=>{
|
|
|
|
|
colorLi.push(item.split(","))
|
|
|
|
|
})
|
|
|
|
|
colorLi.forEach(element => {
|
|
|
|
|
let colorLiHex = this.rgbaToHex(element)
|
|
|
|
|
selectColorList.push(
|
|
|
|
|
{rgba:{r:element[0],g:element[1],b:element[2],a:1},hex:colorLiHex}
|
|
|
|
|
)
|
|
|
|
|
});
|
|
|
|
|
this.selectColorList = selectColorList
|
2024-06-26 17:26:31 +08:00
|
|
|
this.getHsvColor(selectColorList)
|
|
|
|
|
this.selectColor = {rgba:{r:color[0],g:color[1],b:color[2],a:1},hex:colorHex}
|
|
|
|
|
// let colorListIndex = []
|
|
|
|
|
// this.colorList.forEach((item,index)=>{
|
|
|
|
|
// if(!item.rgba){
|
|
|
|
|
// colorListIndex.push(index)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// for (let index = 0; index < selectColorList.length; index++) {
|
|
|
|
|
// this.colorList[colorListIndex[0]] = selectColorList[index]
|
|
|
|
|
// this.getPantongName(selectColorList[index].rgba,colorListIndex[0])
|
|
|
|
|
// colorListIndex.splice(0,1)
|
|
|
|
|
// }
|
2024-06-17 09:39:01 +08:00
|
|
|
img.remove()
|
2023-10-20 17:21:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
},100)
|
|
|
|
|
};
|
|
|
|
|
// 转化为base64S
|
|
|
|
|
reader.readAsDataURL(fileData)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less">
|
|
|
|
|
|
|
|
|
|
.detail_modal_body_select{
|
|
|
|
|
width: 20%;
|
|
|
|
|
>div{
|
|
|
|
|
height: 100%;
|
2023-09-12 10:11:27 +08:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
i{
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.8rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
.detail_uploadLibrary{
|
|
|
|
|
.switch_type_list {
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(1rem*1.2);
|
|
|
|
|
margin-top: calc(-1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
position: relative;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-09-12 10:11:27 +08:00
|
|
|
}
|
|
|
|
|
.detail_Library{
|
2024-06-17 09:39:01 +08:00
|
|
|
.select_block{
|
|
|
|
|
border: calc(0.1rem* 1.2) solid #F1F1F1;
|
|
|
|
|
// margin-right: calc(2.3rem*1.2);
|
|
|
|
|
height: 4rem;
|
|
|
|
|
width: calc(20rem*1.2);
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
.ant-select{
|
|
|
|
|
width: 90%;
|
|
|
|
|
}
|
|
|
|
|
.ant-select:not(.ant-select-customize-input) .ant-select-selector{
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
.content_search_block{
|
|
|
|
|
display: flex;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(1rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
|
|
|
|
|
.search_input{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(15rem*1.2);
|
|
|
|
|
padding-left: calc(1.5rem*1.2);
|
|
|
|
|
// height: 4rem*1.2);
|
|
|
|
|
// line-height: 3.8rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
// background: #FFFFFF;
|
2024-01-10 14:09:44 +08:00
|
|
|
border: calc(0.1rem*1.2) solid #F1F1F1;
|
|
|
|
|
// font-size: 1.6rem*1.2);
|
|
|
|
|
font-size: calc(1.2rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
font-weight: 400;
|
2024-06-17 09:39:01 +08:00
|
|
|
height: 4rem;
|
2023-09-12 10:11:27 +08:00
|
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
|
color: #C2C2C2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search_icon_block{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(5rem*1.2);
|
|
|
|
|
height: calc(3rem*1.2);
|
|
|
|
|
line-height: calc(3rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
text-align: center;
|
|
|
|
|
background: #343579;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
.icon-sousuo{
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(2rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
color: #FFFFFF;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-13 17:06:44 +08:00
|
|
|
|
2023-09-12 10:11:27 +08:00
|
|
|
.detail_Library_item,.detail_Upload_item{
|
|
|
|
|
width: 100%;
|
2024-01-10 14:09:44 +08:00
|
|
|
// height: calc(100% - 19rem*1.2));
|
2023-09-12 10:11:27 +08:00
|
|
|
flex: 1;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
position: relative;
|
|
|
|
|
&.generate::-webkit-scrollbar{display: none;}
|
|
|
|
|
>div{
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-content: flex-start;
|
|
|
|
|
overflow-X: hidden;
|
|
|
|
|
height: 100%;
|
|
|
|
|
&.scroll_style::-webkit-scrollbar{display: none;}
|
|
|
|
|
|
|
|
|
|
}
|
2023-12-15 11:22:58 +08:00
|
|
|
.operate_file_block{
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(1.5rem*1.2);
|
2023-12-15 11:22:58 +08:00
|
|
|
.select_img_type{
|
|
|
|
|
line-height: 1;
|
|
|
|
|
.select_category{
|
|
|
|
|
zoom: .6;
|
|
|
|
|
height: 100%;
|
|
|
|
|
.icon-xiala{
|
|
|
|
|
zoom: .8;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.category_list{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-top: calc(.1rem*1.2);
|
2023-12-15 11:22:58 +08:00
|
|
|
.category_item{
|
|
|
|
|
zoom: .7;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-12 17:09:05 +08:00
|
|
|
.material_content_list_loding{
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: 100%;
|
|
|
|
|
img{
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(10rem*1.2);
|
2023-10-12 17:09:05 +08:00
|
|
|
}
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
.content_img_item{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
2024-01-10 14:09:44 +08:00
|
|
|
// padding: 0 1.4rem*1.2);
|
|
|
|
|
// margin-bottom: 2.8rem*1.2);
|
|
|
|
|
margin-bottom: calc(2rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
padding: 0;
|
2024-01-10 14:09:44 +08:00
|
|
|
// height: 9rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
&.active{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(2rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
.pin_block{
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.pin_block{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.content_img_item_block{
|
2024-01-10 14:09:44 +08:00
|
|
|
// border: 0.1rem*1.2) solid transparent;
|
|
|
|
|
width: calc(10rem*1.2);
|
|
|
|
|
height: calc(10rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
position: relative;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
&.active{
|
|
|
|
|
opacity: .5;
|
|
|
|
|
img{
|
|
|
|
|
transform: scale(.9);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.select_item_img{
|
|
|
|
|
// border-color: #343579;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.print_content_img{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content_img{
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
max-height: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.content_img_name{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(16.5rem*1.2);
|
|
|
|
|
height: calc(3.5rem*1.2);
|
|
|
|
|
line-height: calc(3.5rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
white-space: nowrap;
|
|
|
|
|
text-align: center;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.4rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
color: #030303;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.upload_img_body{
|
|
|
|
|
width: 100%;
|
|
|
|
|
.upload_item{
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.moodboard_body{
|
|
|
|
|
.upload_file_item{
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(2rem*1.2);
|
|
|
|
|
width: calc(9rem*1.2);
|
|
|
|
|
height: calc(9rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
position: relative;
|
|
|
|
|
.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%;
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
}
|
2023-10-13 17:06:44 +08:00
|
|
|
.operate_file_block .select_img_type .select_category{
|
|
|
|
|
zoom: .8;
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
.delete_file_block{
|
|
|
|
|
display: none;
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(3.2rem*1.2);
|
|
|
|
|
height: calc(3.2rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
background: rgba(0,0,0,0.6);
|
2024-01-10 14:09:44 +08:00
|
|
|
border-radius: calc(0.4rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
position: absolute;
|
2024-01-10 14:09:44 +08:00
|
|
|
top: calc(0.9rem*1.2);
|
|
|
|
|
right: calc(0.9rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
text-align: center;
|
2024-01-10 14:09:44 +08:00
|
|
|
line-height: calc(3.2rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
left: auto;
|
|
|
|
|
.icon-shanchu{
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.6rem*1.2);
|
2023-09-12 10:11:27 +08:00
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover .delete_file_block{
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
.detail_color{
|
2024-01-10 14:09:44 +08:00
|
|
|
// height: calc(100% - 5.4rem*1.2));
|
2024-05-16 09:41:16 +08:00
|
|
|
&.detail_color::-webkit-scrollbar{display: none;}
|
2023-08-23 17:50:09 +08:00
|
|
|
height: 100%;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
.right_content_line{
|
|
|
|
|
position: relative;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
.upload_right_header{
|
|
|
|
|
display: flex;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(1rem*1.2);
|
|
|
|
|
margin-top: calc(1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
&.upload_right_header:nth-child(1){
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
}
|
|
|
|
|
span{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-left: calc(1rem*1.2);
|
|
|
|
|
font-size: calc(1.8rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.upload_centetn{
|
|
|
|
|
// overflow-x: hidden;
|
|
|
|
|
}
|
|
|
|
|
.upload_centetn::-webkit-scrollbar {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.color_review_block{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-right: calc(4rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
|
|
|
|
|
.color_review_content{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(16.5rem*1.2);
|
|
|
|
|
height: calc(16.5rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
background: #FFFFFF;
|
2024-01-10 14:09:44 +08:00
|
|
|
border: calc(0.1rem*1.2) solid #DCDCEC;
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pantong_name{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-top: calc(1rem*1.2);
|
|
|
|
|
font-size: calc(1.6rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
font-weight: 400;
|
|
|
|
|
color: #030303;
|
|
|
|
|
text-align: left;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.clear_button{
|
2024-01-10 14:09:44 +08:00
|
|
|
padding: 0 calc(2.8rem*1.2);
|
|
|
|
|
height: calc(3.2rem*1.2);
|
|
|
|
|
line-height: calc(3.2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
background: #EFEEFF;
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
font-family: Roboto;
|
|
|
|
|
color: #343579;
|
|
|
|
|
display: inline-block;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-top: calc(1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.upload_file_item{
|
2024-01-10 14:09:44 +08:00
|
|
|
// margin: 0 2rem*1.2) 2rem*1.2) 0;
|
2023-08-23 17:50:09 +08:00
|
|
|
margin: 0;
|
|
|
|
|
display: inline-block;
|
2024-01-10 14:09:44 +08:00
|
|
|
// width: 16.5rem*1.2);
|
|
|
|
|
// height: 16.5rem*1.2);
|
|
|
|
|
width: calc(6rem*1.2);
|
|
|
|
|
height: calc(6rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
border: 1px solid #F5F5F5;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
|
|
|
|
.upload_file_item_content{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
&:hover .delete_file_block{
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.upload_img{
|
|
|
|
|
display: block;
|
|
|
|
|
max-height: 100%;
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.delete_file_block{
|
|
|
|
|
display: none;
|
|
|
|
|
width: 100%;
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(4rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
background: rgba(0,0,0,0.2);
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.6rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
color: #FFFFFF;
|
2024-01-10 14:09:44 +08:00
|
|
|
line-height: calc(4rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
text-align: center;
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.upload_img_icon{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(4.6rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
.upload_color{
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: nowrap;
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
.upload_color_item{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(2rem*1.2);
|
|
|
|
|
height: calc(2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
position: relative;
|
|
|
|
|
cursor: pointer;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-right: calc(1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
.upload_color_item_bg{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(2rem*1.2);
|
|
|
|
|
height: calc(2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
img{
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
// .upload_color_item_text{
|
|
|
|
|
// font-size: 12px;
|
|
|
|
|
// line-height: 1;
|
|
|
|
|
// text-align: center;
|
|
|
|
|
// }
|
|
|
|
|
div{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.color_setting_block{
|
|
|
|
|
margin: auto;
|
2023-11-27 16:36:09 +08:00
|
|
|
background: linear-gradient(70deg, #eee4f3, #f3f4e6);
|
2024-05-16 09:41:16 +08:00
|
|
|
width: 24rem;
|
2024-01-10 14:09:44 +08:00
|
|
|
border-radius: calc(1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
// box-shadow: 2px 2px 8px #000;
|
|
|
|
|
box-shadow: 2px 2px 8px rgba(0,0,0,.3);
|
2023-11-27 16:36:09 +08:00
|
|
|
.vc-chrome{
|
|
|
|
|
background: rgba(0,0,0,0);
|
2024-04-15 16:09:33 +08:00
|
|
|
box-shadow:none;
|
2023-11-27 16:36:09 +08:00
|
|
|
}
|
2023-11-24 16:18:44 +08:00
|
|
|
.chrome_color{
|
2024-05-16 09:41:16 +08:00
|
|
|
width: 24rem;
|
2024-01-10 14:09:44 +08:00
|
|
|
// height: 16.5rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
.vc-chrome-saturation-wrap{
|
|
|
|
|
height: 100%;
|
2024-05-16 09:41:16 +08:00
|
|
|
// width: calc(16rem*1.2);
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(14rem*1.2);
|
2024-01-10 14:09:44 +08:00
|
|
|
max-height: calc(17rem*1.2);
|
|
|
|
|
max-width: calc(17rem*1.2);
|
|
|
|
|
margin: calc(.7rem*1.2) auto;
|
2023-08-23 17:50:09 +08:00
|
|
|
padding-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
.vc-chrome-body{
|
2023-11-24 16:18:44 +08:00
|
|
|
padding: 0;
|
2023-08-23 17:50:09 +08:00
|
|
|
width: 90%;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin: calc(0.5rem*1.2) auto;
|
2023-11-24 16:18:44 +08:00
|
|
|
margin: 0 auto;
|
|
|
|
|
background: rgba(0,0,0,0);
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(1rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
// display: none;
|
|
|
|
|
.vc-chrome-fields-wrap{
|
|
|
|
|
margin-top: 5%;
|
|
|
|
|
padding: 0;
|
|
|
|
|
position: relative;
|
|
|
|
|
.vc-chrome-toggle-btn{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(3.2rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
.vc-chrome-toggle-icon{
|
|
|
|
|
height: auto;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-right: calc(-0.4rem*1.2);
|
|
|
|
|
margin-top: calc(0rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
svg{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(2.4rem*1.2) !important;
|
|
|
|
|
height: calc(2.4rem*1.2) !important;
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.vc-chrome-fields{
|
|
|
|
|
.vc-chrome-field{
|
2024-01-10 14:09:44 +08:00
|
|
|
padding-left: calc(.6rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
|
|
|
|
.vc-input__label{
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.6rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
|
|
|
|
.vc-input__input{
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.1rem*1.2);
|
|
|
|
|
height: calc(2.1rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
2023-11-24 16:18:44 +08:00
|
|
|
.ant-upload-list{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.vc-sketch-color-wrap{
|
|
|
|
|
background-image: url(@../../../../assets/images/homePage/dropper.png);
|
2023-11-27 16:25:32 +08:00
|
|
|
// background-image: url(@../../../../assets/images/homePage/裁剪后1.jpg);
|
|
|
|
|
// background-image: url(@../../../../assets/images/homePage/裁剪后2.jpg);
|
|
|
|
|
// background-image: url(@../../../../assets/images/homePage/裁剪后3.jpg);
|
2024-01-10 14:09:44 +08:00
|
|
|
background-size: calc(1.5rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-position: 50%;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin: 0;
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(2.2rem*1.2);
|
|
|
|
|
height: calc(2.2rem*1.2);
|
|
|
|
|
padding: calc(.7rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
border: 1px solid;
|
|
|
|
|
position: absolute;
|
2024-01-10 14:09:44 +08:00
|
|
|
bottom: calc(-.5rem*1.2);
|
|
|
|
|
right: calc(.5rem*1.2);
|
|
|
|
|
border-radius: calc(.5rem*1.2);
|
2023-12-15 11:10:32 +08:00
|
|
|
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
|
|
|
|
.vc-chrome-fields{
|
|
|
|
|
.vc-input__label{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-top: calc(1rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
2023-12-15 11:10:32 +08:00
|
|
|
.vc-chrome-fields:nth-child(2){
|
|
|
|
|
>:last-of-type {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.vc-chrome-fields:nth-child(3){
|
|
|
|
|
>:last-of-type {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
2023-11-24 16:18:44 +08:00
|
|
|
.vc-chrome-controls{
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
|
.vc-chrome-color-wrap{
|
2024-01-10 14:09:44 +08:00
|
|
|
// width: 3.6rem*1.2);
|
|
|
|
|
margin-left: calc(2rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
width: auto;
|
2023-11-28 16:21:00 +08:00
|
|
|
.vc-chrome-active-color{
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
2023-11-24 16:18:44 +08:00
|
|
|
.vc-chrome-active-color,.vc-checkerboard{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(3rem*1.2);
|
|
|
|
|
height: calc(3rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.vc-chrome-hue-wrap,.vc-chrome-alpha-wrap{
|
|
|
|
|
.vc-hue{
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
}
|
|
|
|
|
.vc-alpha{
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
2024-01-10 14:09:44 +08:00
|
|
|
height: calc(1rem*1.2);
|
2023-11-27 16:36:09 +08:00
|
|
|
.vc-hue-picker{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(1.4rem*1.2);
|
|
|
|
|
height: calc(1.4rem*1.2);
|
2023-11-27 16:36:09 +08:00
|
|
|
}
|
|
|
|
|
.vc-alpha-picker{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(1.4rem*1.2);
|
|
|
|
|
height: calc(1.4rem*1.2);
|
|
|
|
|
transform: translate(calc(-.6rem*1.2),calc(-.4rem*1.2));
|
2023-11-27 16:36:09 +08:00
|
|
|
}
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
2023-12-14 17:41:11 +08:00
|
|
|
.vc-chrome-alpha-wrap{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2023-11-24 16:18:44 +08:00
|
|
|
.vc-chrome-hue-wrap{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(.5rem*1.2);
|
2023-11-24 16:18:44 +08:00
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.vc-chrome-saturation-wrap .vc-saturation-circle{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(1rem*1.2);
|
|
|
|
|
height: calc(1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-05-16 09:41:16 +08:00
|
|
|
.color_setting_operateSingle{
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin: 1rem 0;
|
2024-06-21 10:30:09 +08:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
.color_setting_btn{
|
|
|
|
|
margin: 0 1rem;
|
|
|
|
|
color: rgba(0, 0, 0, 0.5);
|
|
|
|
|
&.active{
|
|
|
|
|
color: rgba(0, 0, 0, 0.7);
|
|
|
|
|
font-weight: 900;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-16 09:41:16 +08:00
|
|
|
}
|
|
|
|
|
.color_setting_operate{
|
|
|
|
|
*{
|
|
|
|
|
-webkit-touch-callout: none; /* iOS Safari */
|
|
|
|
|
-webkit-user-select: none; /* Safari */
|
|
|
|
|
-moz-user-select: none; /* Firefox */
|
|
|
|
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
.color_setting_operate_item{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.operate_item_box{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.color_setting_operate_control{
|
|
|
|
|
.operate_item_delete,.operate_item_angle{
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.operate_item_delete{
|
|
|
|
|
i{
|
|
|
|
|
display: flex;
|
|
|
|
|
font-size: 3rem;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.operate_item_angle{
|
|
|
|
|
.operate_item_angle_box{
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
width: 4rem;
|
|
|
|
|
height: 4rem;
|
|
|
|
|
border: solid 2px #39215b;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
>div{
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 1rem;
|
|
|
|
|
position: relative;
|
|
|
|
|
pointer-events:none;
|
|
|
|
|
}
|
|
|
|
|
>div::before{
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: "";
|
|
|
|
|
top: 0.2rem;
|
|
|
|
|
width: 1rem;
|
|
|
|
|
height: 1rem;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: #39215b;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.color_setting_operate_input{
|
|
|
|
|
width: 80%;
|
|
|
|
|
// padding: 0 10%;
|
|
|
|
|
margin: 1.2rem 10%;
|
|
|
|
|
border-radius: 10%;
|
|
|
|
|
position: relative;
|
|
|
|
|
height: 2.5rem;
|
|
|
|
|
.color_setting_operate_bg{
|
|
|
|
|
border-radius: .5rem;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 2.5rem;
|
|
|
|
|
background: #fff;
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.color_setting_operate_btn{
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translate(-50%,-50%);
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 1rem;
|
|
|
|
|
height: 110%;
|
|
|
|
|
border: .2rem solid;
|
|
|
|
|
border-radius: .5rem;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
box-sizing: content-box;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
&.active{
|
|
|
|
|
border: .3rem solid;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.color_setting_operate_btn:hover{
|
|
|
|
|
border: .3rem solid;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-23 17:50:09 +08:00
|
|
|
|
|
|
|
|
.sileder_color{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-top:calc(1.3rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
|
|
|
|
|
.vc-slider-swatches{
|
|
|
|
|
display:none
|
|
|
|
|
}
|
|
|
|
|
.vc-slider-hue-warp {
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(16.5rem*1.2);
|
|
|
|
|
height: calc(2.4rem*1.2);
|
|
|
|
|
border-radius: calc(1.2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
.vc-hue-picker{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(1.4rem*1.2);
|
|
|
|
|
height: calc(1.4rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
border-radius: 50%;
|
2024-01-10 14:09:44 +08:00
|
|
|
transform: translate(calc(-0.7rem*1.2), calc(-0.2rem*1.2));
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.vc-hue-pointer{
|
2024-01-10 14:09:44 +08:00
|
|
|
top: calc(0.5rem*1.2) !important;
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.color_block{
|
2024-01-10 14:09:44 +08:00
|
|
|
// margin-top: 1rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
// display: flex;
|
|
|
|
|
// justify-content: space-between;
|
2024-01-10 14:09:44 +08:00
|
|
|
// font-size: 1.6rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
width: 100%;
|
|
|
|
|
padding: 0 5%;
|
|
|
|
|
padding-bottom: 5%;
|
2024-01-10 14:09:44 +08:00
|
|
|
margin: calc(0.5rem*1.2) auto;
|
2023-08-23 17:50:09 +08:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.color_right{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(11rem*1.2);
|
|
|
|
|
font-size: calc(1,2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
color: #666666;
|
|
|
|
|
.color_rgb_block{
|
|
|
|
|
display: flex;
|
|
|
|
|
.rgb_item{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-left: calc(.2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.color_left{
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
color: rgb(153, 153, 153);
|
|
|
|
|
}
|
|
|
|
|
.color_right,.color_left{
|
|
|
|
|
>div{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
.color_HEX_block,.color_rgb_block{
|
2024-01-10 14:09:44 +08:00
|
|
|
padding: calc(.2rem*1.2) calc(.5rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
box-shadow: inset 0 0 0 1px #ccc;
|
2024-01-10 14:09:44 +08:00
|
|
|
border-radius: calc(.4rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
justify-content: space-around;
|
|
|
|
|
text-transform:uppercase;
|
|
|
|
|
.color_block_bg{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(1.5rem*1.2);
|
|
|
|
|
height: calc(1.5rem*1.2);
|
|
|
|
|
// margin-right: .5rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.color_block_bg{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.get_color_block{
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
.get_color_input{
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(15rem*1.2);
|
|
|
|
|
height: calc(2.8rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
background: #FFFFFF;
|
2024-01-10 14:09:44 +08:00
|
|
|
border: calc(0.1rem*1.2) solid #DCDCEC;
|
|
|
|
|
padding: calc(1rem*1.2) calc(1.3rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
box-sizing: border-box;
|
2024-01-10 14:09:44 +08:00
|
|
|
font-size: calc(1.4rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
|
color: #B7B7B7;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.get_color_button{
|
2024-01-10 14:09:44 +08:00
|
|
|
padding: 0 calc(.2rem*1.2);
|
|
|
|
|
height: calc(2.8rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
background: #EFEEFF;
|
|
|
|
|
display: inline-block;
|
2024-01-10 14:09:44 +08:00
|
|
|
line-height: calc(3rem*1.2);
|
|
|
|
|
font-size: calc(1.2rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
color: #343579;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
flex: 1;
|
2024-07-08 16:07:04 +08:00
|
|
|
.fi-br-fill{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-right: calc(0.5rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
color:#343579;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.get_color_des{
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-12 10:11:27 +08:00
|
|
|
|
2023-08-23 17:50:09 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.upload_item{
|
2024-01-10 14:09:44 +08:00
|
|
|
margin-bottom: calc(.5rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
.ant-upload-picture-card-wrapper{
|
|
|
|
|
.ant-upload-list{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
.ant-upload-select-picture-card{
|
2024-01-10 14:09:44 +08:00
|
|
|
// margin: 0 2rem*1.2) 2rem*1.2) 0;
|
2023-08-23 17:50:09 +08:00
|
|
|
margin: 0;
|
|
|
|
|
display: inline-block;
|
2024-01-10 14:09:44 +08:00
|
|
|
width: calc(6rem*1.2);
|
|
|
|
|
height: calc(6rem*1.2);
|
2023-08-23 17:50:09 +08:00
|
|
|
border: 1px solid #F5F5F5;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
i{
|
|
|
|
|
zoom: 1.2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|