Merge branch 'StableVersion' of ssh://18.167.251.121:10002/aidlab/aida_front into StableVersion

This commit is contained in:
X1627315083
2025-10-15 15:20:15 +08:00
59 changed files with 1156 additions and 746 deletions

View File

@@ -1816,13 +1816,11 @@ textarea:focus {
.accountEdit_page .input_border, .accountEdit_page .input_border,
.generalMenu_printModel_upload .input_border, .generalMenu_printModel_upload .input_border,
.generate .input_border { .generate .input_border {
z-index: 2;
display: flex; display: flex;
align-items: center; align-items: center;
padding-bottom: calc(2rem*1.2); padding-bottom: calc(2rem*1.2);
top: 0; top: 0;
flex-wrap: wrap; flex-wrap: wrap;
z-index: 6;
--width: 65%; --width: 65%;
} }
.collection_modal_body .input_border .input_box, .collection_modal_body .input_border .input_box,
@@ -1836,7 +1834,6 @@ textarea:focus {
.generalMenu_printModel_upload .input_border .input_box, .generalMenu_printModel_upload .input_border .input_box,
.generate .input_border .input_box { .generate .input_border .input_box {
position: relative; position: relative;
z-index: 6;
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -1992,7 +1989,7 @@ textarea:focus {
display: flex; display: flex;
float: left; float: left;
align-items: center; align-items: center;
padding: 1.5rem 2rem; padding: 1rem 2rem;
background-color: #fff; background-color: #fff;
flex: 1; flex: 1;
height: auto; height: auto;
@@ -2210,7 +2207,6 @@ textarea:focus {
cursor: pointer; cursor: pointer;
transition: all 0.3s; transition: all 0.3s;
position: relative; position: relative;
z-index: 4;
width: 4rem; width: 4rem;
display: flex; display: flex;
min-height: 3rem; min-height: 3rem;
@@ -2318,6 +2314,8 @@ textarea:focus {
top: 0rem; top: 0rem;
flex: 1; flex: 1;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
width: calc(var(--width) + 6rem);
padding: 1rem;
} }
.generage_btn_box { .generage_btn_box {
position: relative; position: relative;

View File

@@ -1974,17 +1974,17 @@ textarea:focus{
//设计input和上传按钮样式 //设计input和上传按钮样式
.collection_modal_body,.design_detail_modal_component,.library_page,.productImg_content,.poseTransfer,.scaleImage_modal,.editDesignType_modal,.accountEdit_page,.generalMenu_printModel_upload,.generate{ .collection_modal_body,.design_detail_modal_component,.library_page,.productImg_content,.poseTransfer,.scaleImage_modal,.editDesignType_modal,.accountEdit_page,.generalMenu_printModel_upload,.generate{
.input_border{ .input_border{
z-index: 2; // z-index: 2;
display: flex; display: flex;
align-items: center; align-items: center;
padding-bottom: calc(2rem*1.2); padding-bottom: calc(2rem*1.2);
top: 0; top: 0;
flex-wrap: wrap; flex-wrap: wrap;
z-index: 6; // z-index: 6;
--width:65%; --width:65%;
.input_box{ .input_box{
position: relative; position: relative;
z-index: 6; // z-index: 6;
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -2057,7 +2057,7 @@ textarea:focus{
display: flex; display: flex;
float: left; float: left;
align-items: center; align-items: center;
padding: 1.5rem 2rem; padding: 1rem 2rem;
// padding-right: 0; // padding-right: 0;
background-color: #fff; background-color: #fff;
flex: 1; flex: 1;
@@ -2150,7 +2150,6 @@ textarea:focus{
cursor: pointer; cursor: pointer;
transition: all .3s; transition: all .3s;
position: relative; position: relative;
z-index: 4;
width: 4rem; width: 4rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -2201,6 +2200,8 @@ textarea:focus{
top: 0rem; top: 0rem;
flex: 1; flex: 1;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
width: calc(var(--width) + 6rem);
padding: 1rem;
} }
// span{ // span{

View File

@@ -50,10 +50,10 @@
<div v-if="!isEditEmail">{{ userDetail.email }}</div> <div v-if="!isEditEmail">{{ userDetail.email }}</div>
<input v-else type="text" :value="editEmail"> <input v-else type="text" :value="editEmail">
</div> </div>
<div class="icon"> <!-- <div class="icon">
<i v-if="!isEditEmail" class="fi fi-rr-edit" @click="openEdit('email')"></i> <i v-if="!isEditEmail" class="fi fi-rr-edit" @click="openEdit('email')"></i>
<i v-else class="fi fi-br-check" @click="editChek('email')"></i> <i v-else class="fi fi-br-check" @click="editChek('email')"></i>
</div> </div> -->
</div> </div>
</div> </div>
<div class="content_item_user_left_detail_bottom"> <div class="content_item_user_left_detail_bottom">

View File

@@ -27,10 +27,10 @@
<div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div> <div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div> <div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
</div> --> </div> -->
<div class="gmail_btn" @click="toGmailLogin"> <div class="gmail_btn">
<div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn forbidden">{{ $t('frontPage.BindNow') }}</div> <div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn" style="pointer-events: none;">{{ $t('frontPage.BindNow') }}</div>
<!-- <div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div> --> <div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn forbidden" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div> <div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
<!-- <div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div> --> <!-- <div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div> -->
</div> </div>
</div> </div>
@@ -138,12 +138,13 @@ export default defineComponent({
bindPageDom.bindEmail.init('Modify') bindPageDom.bindEmail.init('Modify')
} }
const toGmailLogin = ()=>{
message.info(t('account.canNotUtilize'))
}
onMounted(async ()=>{ onMounted(async ()=>{
return let GOOGLE_CLIENT_ID
let GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com' if(import.meta.env.VITE_USER_NODE_ENV == 'development'){
GOOGLE_CLIENT_ID = '157095842121-kdd1fdf8m8nudvj9sprstb2k2prnf9e4.apps.googleusercontent.com'
}else{
GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com'
}
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`); var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(!window.isAddGmail){ if(!window.isAddGmail){
if(!existingScript){ if(!existingScript){
@@ -206,7 +207,6 @@ export default defineComponent({
ungroupGoogleModel, ungroupGoogleModel,
ungroupWeiXinModel, ungroupWeiXinModel,
modifyEmail, modifyEmail,
toGmailLogin,
} }
}, },
data(){ data(){
@@ -271,14 +271,21 @@ export default defineComponent({
} }
>.gmail_btn{ >.gmail_btn{
position: relative; position: relative;
border-radius: 4rem;
overflow: hidden;
> .gallery_btn{
position: relative;
z-index: 2;
}
#g_id_bind{ #g_id_bind{
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
opacity: 0; // opacity: 0;
z-index: 2; z-index: 1;
:deep(.nsm7Bb-HzV7m-LgbsSe.Bz112c-LgbsSe){ :deep(.nsm7Bb-HzV7m-LgbsSe.Bz112c-LgbsSe){
width: 100%; width: 100%;
} }

View File

@@ -28,7 +28,7 @@
optionFilterProp="label" optionFilterProp="label"
:options="countryList" :options="countryList"
:field-names="{ label: locale == 'CHINESE_SIMPLIFIED'?'labelCn':'label' }" :field-names="{ label: locale == 'CHINESE_SIMPLIFIED'?'labelCn':'label' }"
placeholder="Please select" :placeholder="`${$t('account.plaseSelect')} ${$t('account.Country')}`"
allowClear allowClear
show-search show-search
></a-select> ></a-select>

View File

@@ -22,7 +22,7 @@
</a-range-picker> </a-range-picker>
</div> </div>
<!-- <div class="admin_state_item"> <!-- <div class="admin_state_item">
<span>Country:</span> <span>Country or Region:</span>
<a-select <a-select
v-model:value="country" v-model:value="country"
:allowClear="true" :allowClear="true"

View File

@@ -77,10 +77,12 @@ import { PieChart } from 'echarts/charts';
import { LabelLayout } from 'echarts/features'; import { LabelLayout } from 'echarts/features';
import { useStore } from "vuex"; import { useStore } from "vuex";
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
import { useI18n } from 'vue-i18n'
export default defineComponent({ export default defineComponent({
components: { components: {
}, },
setup() { setup() {
const {t} = useI18n()
const store:any = useStore() const store:any = useStore()
let filter:any = reactive({ let filter:any = reactive({
dataList:computed(()=>{ dataList:computed(()=>{
@@ -115,7 +117,7 @@ export default defineComponent({
let data:any = [] let data:any = []
rv.names.forEach((item:any,index:number) => { rv.names.forEach((item:any,index:number) => {
let obj = { let obj = {
name : item, name : t(`admin.${item}`),
value:rv.values[index], value:rv.values[index],
} }
data.push(obj) data.push(obj)

View File

@@ -22,7 +22,7 @@
</a-range-picker> </a-range-picker>
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span>Country:</span> <span>Country or Region:</span>
<a-select <a-select
v-model:value="country" v-model:value="country"
:allowClear="true" :allowClear="true"
@@ -365,11 +365,11 @@ export default defineComponent({
ellipsis:true ellipsis:true
}, },
{ {
title: "Country", title: "Country or Region",
align: "center", align: "center",
dataIndex: "country", dataIndex: "country",
key: "country", key: "country",
width:150, width:200,
ellipsis:true ellipsis:true
}, },
{ {

View File

@@ -26,7 +26,7 @@
<a-select v-model:value="userType" size="large" style="width:250px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select> <a-select v-model:value="userType" size="large" style="width:250px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
</div> --> </div> -->
<div class="admin_state_item"> <div class="admin_state_item">
<span>Country:</span> <span>Country or Region:</span>
<a-select <a-select
v-model:value="country" v-model:value="country"
:allowClear="true" :allowClear="true"
@@ -292,11 +292,11 @@ export default defineComponent({
}, },
}, },
{ {
title: "Country", title: "Country or Region",
align: "center", align: "center",
dataIndex: "country", dataIndex: "country",
key: "country", key: "country",
width:100, width:200,
}, },
{ {
title: "Create Date", title: "Create Date",

View File

@@ -92,7 +92,7 @@
/> />
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span>Country:</span> <span>Country or Region:</span>
<input <input
:disabled="title != 'Add'" :disabled="title != 'Add'"
:class="{active:title != 'Add'}" :class="{active:title != 'Add'}"

View File

@@ -1,298 +1,331 @@
<template> <template>
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div> <div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
<a-modal <a-modal
class="allUserPoeration_modal generalModel" class="allUserPoeration_modal generalModel"
v-model:visible="operationsModal" v-model:visible="operationsModal"
:footer="null" :footer="null"
:get-container="() => $refs.allUserPoerationModal" :get-container="() => $refs.allUserPoerationModal"
width="50%" width="50%"
:height="'77rem'" :height="'77rem'"
:maskClosable="false" :maskClosable="false"
:centered="true" :centered="true"
:closable="false" :closable="false"
:mask="true" :mask="true"
wrapClassName="#app" wrapClassName="#app"
:keyboard="false" :keyboard="false"
> >
<div class="generalModel_btn"> <div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cancelDsign()"> <div class="generalModel_closeIcon" @click.stop="cancelDsign()">
<svg <svg
width="100%" height="100%" width="100%" height="100%"
viewBox="0 0 46 46" viewBox="0 0 46 46"
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
> >
<circle cx="23" cy="23" r="23" fill="black" fill-opacity="0.3" /> <circle cx="23" cy="23" r="23" fill="black" fill-opacity="0.3" />
<rect <rect
x="32.5063" x="32.5063"
y="12" y="12"
width="3" width="3"
height="29" height="29"
rx="1.5" rx="1.5"
transform="rotate(45 32.5063 12)" transform="rotate(45 32.5063 12)"
fill="white" fill="white"
/> />
<rect <rect
x="34.6274" x="34.6274"
y="32.5059" y="32.5059"
width="3" width="3"
height="29" height="29"
rx="1.5" rx="1.5"
transform="rotate(135 34.6274 32.5059)" transform="rotate(135 34.6274 32.5059)"
fill="white" fill="white"
/> />
</svg> </svg>
</div> </div>
</div> </div>
<div class="modal_title_text"> <div class="modal_title_text">
<div>{{ title }} Coupon</div> <div>{{ title }} Coupon</div>
</div> </div>
<div class="allUserPoeration_center admin_page"> <div class="allUserPoeration_center admin_page">
<div class="admin_state_item"> <div class="admin_state_item">
<span>Cooperator:</span> <span>Cooperator:</span>
<input <input
v-model="cooperator" v-model="cooperator"
placeholder="Please enter cooperator" placeholder="Please enter cooperator"
type="text" type="text"
style="width: 220px" style="width: 220px"
/> />
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span>percentOff(%): <span>*</span></span> <span>percentOff(%): <span>*</span></span>
<input <input
:class="{ active: title != 'Add' }" :class="{ active: title != 'Add' }"
:disabled="title != 'Add'" :disabled="title != 'Add'"
v-model="percentOff" v-model="percentOff"
placeholder="Please enter percentOff" placeholder="Please enter percentOff"
type="text" type="text"
style="width: 220px" style="width: 220px"
/> />
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span>Commission Rate: <span>*</span></span> <span>Commission Rate: <span>*</span></span>
<input <input
:class="{ active: title != 'Add' }" :class="{ active: title != 'Add' }"
:disabled="title != 'Add'" :disabled="title != 'Add'"
v-model="commissionRate" v-model="commissionRate"
placeholder="Please enter commission rate" placeholder="Please enter commission rate"
type="text" type="text"
style="width: 220px" style="width: 220px"
/> />
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<!-- <div class="admin_state_item" > --> <!-- <div class="admin_state_item" > -->
<span>End Time: <span>*</span></span> <span>Start Time: <span>*</span></span>
<a-space direction="vertical" style="width: 220px"> <a-space direction="vertical" style="width: 220px">
<a-date-picker <a-date-picker
v-model:value="rangePickerValue" v-model:value="startTime"
:disabled="title != 'Add'" :disabled="title != 'Add'"
style="width: 220px" style="width: 220px"
/> />
</a-space> </a-space>
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span>MaxRedemptions:</span> <!-- <div class="admin_state_item" > -->
<input <span>End Time: <span>*</span></span>
:class="{ active: title != 'Add' }" <a-space direction="vertical" style="width: 220px">
:disabled="title != 'Add'" <a-date-picker
v-model="maxRedemptions" v-model:value="endTime"
placeholder="Please enter maximum" :disabled="title != 'Add'"
type="text" style="width: 220px"
style="width: 220px" />
/> </a-space>
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span>PaidCommission:</span> <span>MaxRedemptions:</span>
<input <input
v-model="paidCommission" :class="{ active: title != 'Add' }"
placeholder="Please enter paidCommission" :disabled="title != 'Add'"
type="text" v-model="maxRedemptions"
style="width: 220px" placeholder="Please enter maximum"
/> type="text"
</div> style="width: 220px"
<div class="admin_state_item"> />
<span>Remark:</span> </div>
<input <div class="admin_state_item">
v-model="remark" <span>PaidCommission:</span>
placeholder="Please enter remark" <input
type="text" v-model="paidCommission"
style="width: 220px" placeholder="Please enter paidCommission"
/> type="text"
</div> style="width: 220px"
</div> />
<div class="allUserPoeration_btn admin_page"> </div>
<div class="admin_search_item" @click="cancelDsign">Close</div> <div class="admin_state_item">
<div class="admin_search_item" @click="setOk">OK</div> <span>Remark:</span>
</div> <input
</a-modal> v-model="remark"
<div class="mark_loading" v-show="loadingShow"> placeholder="Please enter remark"
<a-spin size="large" /> type="text"
</div> style="width: 220px"
</template> />
<script> </div>
import { </div>
defineComponent, <div class="allUserPoeration_btn admin_page">
ref, <div class="admin_search_item" @click="cancelDsign">Close</div>
reactive, <div class="admin_search_item" @click="setOk">OK</div>
watch, </div>
onMounted, </a-modal>
nextTick, <div class="mark_loading" v-show="loadingShow">
toRefs, <a-spin size="large" />
} from "vue"; </div>
import { Https } from "@/tool/https"; </template>
import { Modal, message } from "ant-design-vue"; <script>
import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; import {
import { formatTime, isEmail } from "@/tool/util"; defineComponent,
import dayjs, { Dayjs } from "dayjs"; ref,
import md5 from "md5"; reactive,
export default defineComponent({ watch,
components: {}, onMounted,
emits: ["searchHistoryList"], nextTick,
setup(props, { emit }) { toRefs,
let operations = reactive({ } from "vue";
operationsModal: false, import { Https } from "@/tool/https";
operationsEdit: false, import { Modal, message } from "ant-design-vue";
loadingShow: false, import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
title: "", import { formatTime, isEmail } from "@/tool/util";
}); import dayjs, { Dayjs } from "dayjs";
let operationsData = reactive({ import md5 from "md5";
rangePickerValue: "", export default defineComponent({
percentOff: "", components: {},
commissionRate: "", emits: ["searchHistoryList"],
maxRedemptions: "", setup(props, { emit }) {
cooperator: "", let operations = reactive({
paidCommission: "", operationsModal: false,
remark: "", operationsEdit: false,
id: "", loadingShow: false,
}); title: "",
let init = (funStr, data) => { });
operations.operationsModal = true; let operationsData = reactive({
operations.operationsEdit = true; endTime: "",
operations.title = funStr; startTime: "",
if (funStr == "Add") operations.operationsEdit = false; percentOff: "",
if (funStr == "Edit") { commissionRate: "",
operationsData.id = data.id; maxRedemptions: "",
operationsData.percentOff = data.percentOff; cooperator: "",
operationsData.commissionRate = data.commissionRate; paidCommission: "",
operationsData.maxRedemptions = data.maxRedemptions; remark: "",
operationsData.cooperator = data.cooperator; id: "",
operationsData.paidCommission = data.paidCommission; });
operationsData.remark = data.remark; let init = (funStr, data) => {
operationsData.rangePickerValue = dayjs( operations.operationsModal = true;
new Date(data.redeemBy * 1000).toISOString().split("T")[0], operations.operationsEdit = true;
"YYYY/MM/DD" operations.title = funStr;
); if (funStr == "Add") operations.operationsEdit = false;
if (funStr == "Edit") {
// operationsData.rangePickerValue='2024-08-05T00:00:06' operationsData.id = data.id;
// operationsData.validEndTime='2024-08-05T00:00:06' operationsData.percentOff = data.percentOff;
// operationsData.commissionRate = data.commissionRate operationsData.commissionRate = data.commissionRate;
// operationsData.maxRedemptions = data.maxRedemptions operationsData.maxRedemptions = data.maxRedemptions;
// operationsData.validStartTime = formatTime(data.validStartTime) operationsData.cooperator = data.cooperator;
// operationsData.validEndTime = formatTime(data.validEndTime) operationsData.paidCommission = data.paidCommission;
} operationsData.remark = data.remark;
}; operationsData.endTime = dayjs(
let setAddData = () => { new Date(data.redeemBy * 1000).toLocaleDateString('zh-CN', {
const timestampMs = year: 'numeric',
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳 month: '2-digit',
return { day: '2-digit'
percentOff: operationsData.percentOff, }).replace(/\//g, '/'),
maxRedemptions: operationsData.maxRedemptions, "YYYY/MM/DD"
commissionRate: operationsData.commissionRate, );
timestamp: timestampMs, // 确保格式一致
cooperator: operationsData.cooperator, // operationsData.startTime = dayjs(
remark: operationsData.remark, // new Date(data.startTime * 1000).toISOString().split("T")[0],
}; // "YYYY/MM/DD"
}; // );
let setEditData = () => { operationsData.startTime = dayjs(
const timestampMs = new Date(data.startTime * 1000).toLocaleDateString('zh-CN', {
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳 year: 'numeric',
return { month: '2-digit',
id: operationsData.id, day: '2-digit'
paidCommission: operationsData.commissionRate, }).replace(/\//g, '/'),
cooperator: operationsData.cooperator, "YYYY/MM/DD"
remark: operationsData.remark, );
}; // operationsData.endTime='2024-08-05T00:00:06'
}; // operationsData.validEndTime='2024-08-05T00:00:06'
let cancelDsign = () => { // operationsData.commissionRate = data.commissionRate
operationsData.rangePickerValue = ""; // operationsData.maxRedemptions = data.maxRedemptions
operationsData.percentOff = ""; // operationsData.validStartTime = formatTime(data.validStartTime)
operationsData.commissionRate = ""; // operationsData.validEndTime = formatTime(data.validEndTime)
operationsData.maxRedemptions = ""; }
operationsData.cooperator = ""; };
operationsData.paidCommission = ""; let setAddData = () => {
operationsData.remark = ""; const emdTimeMs =
operationsData.id = ""; new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
operations.operationsModal = false; const startTimeMs =
}; new Date(operationsData.startTime).getTime() / 1000; // 直接获取毫秒时间戳
let setOk = () => { return {
let data; percentOff: operationsData.percentOff,
if (operations.title == "Add") { maxRedemptions: operationsData.maxRedemptions,
data = setAddData(); commissionRate: operationsData.commissionRate,
if (!data.commissionRate || !data.timestamp || !data.percentOff) endTime: emdTimeMs,
return message.warning("Please check the input box marked with *"); startTime: startTimeMs,
Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => { cooperator: operationsData.cooperator,
if (rv) { remark: operationsData.remark,
cancelDsign(); };
emit("searchHistoryList"); };
} let setEditData = () => {
}); const timestampMs =
} else { new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
data = setEditData(); return {
Https.axiosGet(Https.httpUrls.updatePromCodeInfo, { id: operationsData.id,
params: data, paidCommission: operationsData.commissionRate,
}).then((rv) => { cooperator: operationsData.cooperator,
if (rv) { remark: operationsData.remark,
cancelDsign(); };
emit("searchHistoryList"); };
} let cancelDsign = () => {
}); operationsData.endTime = "";
} operationsData.startTime = "";
}; operationsData.percentOff = "";
return { operationsData.commissionRate = "";
...toRefs(operations), operationsData.maxRedemptions = "";
...toRefs(operationsData), operationsData.cooperator = "";
cancelDsign, operationsData.paidCommission = "";
init, operationsData.remark = "";
focus, operationsData.id = "";
blur, operations.operationsModal = false;
setOk, };
}; let setOk = () => {
}, let data;
data() { if (operations.title == "Add") {
return {}; data = setAddData();
}, if (!data.commissionRate || !data.startTime || !data.percentOff || !data.endTime)
mounted() {}, return message.warning("Please check the input box marked with *");
methods: {}, Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => {
}); if (rv) {
</script> cancelDsign();
<style lang="less" scoped> emit("searchHistoryList");
:deep(.allUserPoeration_modal) { }
.ant-modal-body { });
display: flex; } else {
flex-direction: column; data = setEditData();
Https.axiosGet(Https.httpUrls.updatePromCodeInfo, {
params: data,
}).then((rv) => {
if (rv) {
cancelDsign();
emit("searchHistoryList");
}
});
}
};
return {
...toRefs(operations),
...toRefs(operationsData),
cancelDsign,
init,
focus,
blur,
setOk,
};
},
data() {
return {};
},
mounted() {},
methods: {},
});
</script>
<style lang="less" scoped>
:deep(.allUserPoeration_modal) {
.ant-modal-body {
display: flex;
flex-direction: column;
}
} }
} </style>
</style> <style lang="less" scoped>
<style lang="less" scoped> .allUserPoeration_modal {
.allUserPoeration_modal { .closeIcon {
.closeIcon { z-index: 2;
z-index: 2; }
.allUserPoeration_btn {
display: flex;
flex-direction: row;
height: auto;
justify-content: flex-end;
padding: 1rem 0;
.admin_search_item {
margin-bottom: 0;
}
}
.allUserPoeration_center {
flex: 1;
overflow-y: auto;
flex-direction: row;
flex-wrap: wrap;
}
} }
.allUserPoeration_btn { </style>
display: flex;
flex-direction: row;
height: auto;
justify-content: flex-end;
padding: 1rem 0;
.admin_search_item {
margin-bottom: 0;
}
}
.allUserPoeration_center {
flex: 1;
overflow-y: auto;
flex-direction: row;
flex-wrap: wrap;
}
}
</style>

View File

@@ -150,11 +150,11 @@ export default defineComponent({
}, },
}, },
{ {
title: "Country", title: "Country or Region",
align: "center", align: "center",
dataIndex: "country", dataIndex: "country",
key: "country", key: "country",
width:100, width:200,
}, },
{ {
title: "Create Date", title: "Create Date",

View File

@@ -177,11 +177,11 @@ export default defineComponent({
}, },
}, },
{ {
title: "Country", title: "Country or Region",
align: "center", align: "center",
dataIndex: "country", dataIndex: "country",
key: "country", key: "country",
width:100, width:200,
}, },
{ {
title: "Create Date", title: "Create Date",

View File

@@ -23,7 +23,7 @@
</a-range-picker> </a-range-picker>
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span>Country:</span> <span>Country or Region:</span>
<a-select <a-select
v-model:value="country" v-model:value="country"
:allowClear="true" :allowClear="true"

View File

@@ -519,7 +519,7 @@ function showPanel(event) {
} }
visible.value = true; visible.value = true;
closePanel.value = true // closePanel.value = true
isEditing.value = true; isEditing.value = true;
// 初始化液化管理器并准备液化环境 // 初始化液化管理器并准备液化环境

View File

@@ -456,6 +456,15 @@ onMounted(async () => {
// 使用window的resize事件代替ResizeObserver // 使用window的resize事件代替ResizeObserver
// 只有当窗口大小变化时才更新画布尺寸 // 只有当窗口大小变化时才更新画布尺寸
// window.addEventListener("resize", handleWindowResize); // window.addEventListener("resize", handleWindowResize);
if(props.config.initZoom) {
const width = canvasManager.width;
const height = canvasManager.height;
const cwidth = props.config.width;
const cheight = props.config.height;
let zoom = Math.min(1,width/cwidth,height/cheight);
if(zoom < 1) zoom -= 0.05;
setZoom(zoom); // 设置画布缩放
}
}); });
watchEffect(() => { watchEffect(() => {
@@ -521,6 +530,19 @@ function resetZoom() {
canvasManager.resetZoom(); canvasManager.resetZoom();
} }
function setZoom(zoom) {
setTimeout(()=>{
if (!canvasManager) return;
const newZoom = Math.max(zoom, 0.1); // 减少10%最小0.1倍
// 使用画布中心作为缩放点
const centerPoint = {
x: canvasManager.canvas.width / 2,
y: canvasManager.canvas.height / 2,
};
canvasManager.animateZoom(centerPoint, newZoom);
})
}
function zoomIn() { function zoomIn() {
if (!canvasManager) return; if (!canvasManager) return;
@@ -882,6 +904,7 @@ defineExpose({
layerId = "", // 导出具体图层ID layerId = "", // 导出具体图层ID
layerIdArray = [], // 导出多个图层ID数组 layerIdArray = [], // 导出多个图层ID数组
expPicType = "png", // 导出图片类型 JPG 或 PNG ,SVG expPicType = "png", // 导出图片类型 JPG 或 PNG ,SVG
isEnhanceImg, // 是否是增强图片
} = {}) => { } = {}) => {
return canvasManager.exportImage({ return canvasManager.exportImage({
isContainBg, isContainBg,
@@ -890,6 +913,7 @@ defineExpose({
layerId, layerId,
layerIdArray, layerIdArray,
expPicType, expPicType,
isEnhanceImg,
}); });
}, },
/** /**

View File

@@ -811,6 +811,7 @@ export class CanvasManager {
* @param {Array} options.layerIdArray 导出多个图层ID数组 * @param {Array} options.layerIdArray 导出多个图层ID数组
* @param {String} options.expPicType 导出图片类型 (png/jpg/svg) * @param {String} options.expPicType 导出图片类型 (png/jpg/svg)
* @param {Boolean} options.restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1 * @param {Boolean} options.restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} options.isEnhanceImg 是否是增强图片
* @returns {String} 导出的图片数据URL * @returns {String} 导出的图片数据URL
*/ */
async exportImage(options = {}) { async exportImage(options = {}) {

View File

@@ -18,10 +18,12 @@ export class ExportManager {
* @param {Object} options 导出选项 * @param {Object} options 导出选项
* @param {Boolean} options.isContainBg 是否包含背景图层 * @param {Boolean} options.isContainBg 是否包含背景图层
* @param {Boolean} options.isContainFixed 是否包含固定图层 * @param {Boolean} options.isContainFixed 是否包含固定图层
* @param {Boolean} options.isCropByBg 是否使用背景大小裁剪
* @param {String} options.layerId 导出具体图层ID * @param {String} options.layerId 导出具体图层ID
* @param {Array} options.layerIdArray 导出多个图层ID数组 * @param {Array} options.layerIdArray 导出多个图层ID数组
* @param {String} options.expPicType 导出图片类型 (png/jpg/svg) * @param {String} options.expPicType 导出图片类型 (png/jpg/svg)
* @param {Boolean} options.restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1 * @param {Boolean} options.restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} options.isEnhanceImg 是否是增强图片
* @returns {String} 导出的图片数据URL * @returns {String} 导出的图片数据URL
*/ */
exportImage(options = {}) { exportImage(options = {}) {
@@ -33,6 +35,7 @@ export class ExportManager {
layerIdArray = [], layerIdArray = [],
expPicType = "png", expPicType = "png",
restoreOpacityInRedGreen = true, restoreOpacityInRedGreen = true,
isEnhanceImg, // 是否是增强图片
} = options; } = options;
try { try {
// 检查是否为红绿图模式 // 检查是否为红绿图模式
@@ -44,7 +47,8 @@ export class ExportManager {
expPicType, expPicType,
isRedGreenMode, isRedGreenMode,
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
isCropByBg isCropByBg,
isEnhanceImg, // 是否是增强图片
); );
} }
@@ -57,7 +61,8 @@ export class ExportManager {
isContainFixed, isContainFixed,
isRedGreenMode, isRedGreenMode,
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
isCropByBg isCropByBg,
isEnhanceImg, // 是否是增强图片
); );
} }
@@ -68,7 +73,8 @@ export class ExportManager {
isContainFixed, isContainFixed,
isRedGreenMode, isRedGreenMode,
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
isCropByBg isCropByBg,
isEnhanceImg, // 是否是增强图片
); );
} catch (error) { } catch (error) {
console.error("导出图片失败:", error); console.error("导出图片失败:", error);
@@ -82,6 +88,8 @@ export class ExportManager {
* @param {String} expPicType 导出类型 * @param {String} expPicType 导出类型
* @param {Boolean} isRedGreenMode 是否为红绿图模式 * @param {Boolean} isRedGreenMode 是否为红绿图模式
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1 * @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL * @returns {String} 图片数据URL
* @private * @private
*/ */
@@ -89,7 +97,9 @@ export class ExportManager {
layerId, layerId,
expPicType, expPicType,
isRedGreenMode, isRedGreenMode,
restoreOpacityInRedGreen restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) { ) {
if (!this.layerManager) { if (!this.layerManager) {
throw new Error("图层管理器未初始化"); throw new Error("图层管理器未初始化");
@@ -117,7 +127,9 @@ export class ExportManager {
return this._exportWithRedGreenMode( return this._exportWithRedGreenMode(
objectsToExport, objectsToExport,
expPicType, expPicType,
restoreOpacityInRedGreen restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
); );
} }
@@ -137,6 +149,8 @@ export class ExportManager {
* @param {Boolean} isContainFixed 是否包含固定图层 * @param {Boolean} isContainFixed 是否包含固定图层
* @param {Boolean} isRedGreenMode 是否为红绿图模式 * @param {Boolean} isRedGreenMode 是否为红绿图模式
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1 * @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL * @returns {String} 图片数据URL
* @private * @private
*/ */
@@ -147,7 +161,8 @@ export class ExportManager {
isContainFixed, isContainFixed,
isRedGreenMode, isRedGreenMode,
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
isCropByBg isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) { ) {
if (!this.layerManager) { if (!this.layerManager) {
throw new Error("图层管理器未初始化"); throw new Error("图层管理器未初始化");
@@ -178,7 +193,9 @@ export class ExportManager {
return await this._exportWithCanvasSize( return await this._exportWithCanvasSize(
objectsToExport, objectsToExport,
expPicType, expPicType,
restoreOpacityInRedGreen restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
); );
} }
@@ -189,6 +206,8 @@ export class ExportManager {
* @param {Boolean} isContainFixed 是否包含固定图层 * @param {Boolean} isContainFixed 是否包含固定图层
* @param {Boolean} isRedGreenMode 是否为红绿图模式 * @param {Boolean} isRedGreenMode 是否为红绿图模式
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1 * @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL * @returns {String} 图片数据URL
* @private * @private
*/ */
@@ -198,7 +217,8 @@ export class ExportManager {
isContainFixed, isContainFixed,
isRedGreenMode, isRedGreenMode,
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
isCropByBg isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) { ) {
// 按图层顺序收集对象(从底到顶) // 按图层顺序收集对象(从底到顶)
const objectsToExport = this._collectObjectsByLayerOrder( const objectsToExport = this._collectObjectsByLayerOrder(
@@ -251,7 +271,9 @@ export class ExportManager {
objectsToExport, objectsToExport,
expPicType, expPicType,
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
canvasClipPath canvasClipPath,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
); );
} }
@@ -603,6 +625,9 @@ export class ExportManager {
* @param {Array} objectsToExport 要导出的对象数组 * @param {Array} objectsToExport 要导出的对象数组
* @param {String} expPicType 导出类型 * @param {String} expPicType 导出类型
* @param {Boolean} restoreOpacityInRedGreen 是否恢复透明度为1 * @param {Boolean} restoreOpacityInRedGreen 是否恢复透明度为1
* @param {Object} maskObject 裁剪对象
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL * @returns {String} 图片数据URL
* @private * @private
*/ */
@@ -610,7 +635,9 @@ export class ExportManager {
objectsToExport, objectsToExport,
expPicType, expPicType,
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
maskObject maskObject, // 裁剪对象
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) { ) {
// 使用当前画布尺寸 // 使用当前画布尺寸
// const canvasWidth = // const canvasWidth =
@@ -629,6 +656,8 @@ export class ExportManager {
trimWhitespace: true, // 裁剪空白 trimWhitespace: true, // 裁剪空白
trimPadding: 0, // 裁剪边距 trimPadding: 0, // 裁剪边距
restoreOpacityInRedGreen, restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
}); });
console.log("导出图片数据URL:", dataURL); console.log("导出图片数据URL:", dataURL);

View File

@@ -21,6 +21,7 @@ export const createRasterizedImage = async ({
preserveOriginalQuality = true, // 是否保持原始质量(新增) preserveOriginalQuality = true, // 是否保持原始质量(新增)
selectionManager = null, // 选区管理器,用于获取羽化值等设置 selectionManager = null, // 选区管理器,用于获取羽化值等设置
restoreOpacityInRedGreen, // 是否在红绿图模式下恢复透明度 restoreOpacityInRedGreen, // 是否在红绿图模式下恢复透明度
isEnhanceImg, // 是否是增强图片
} = {}) => { } = {}) => {
try { try {
console.log(`📊 开始栅格化 ${fabricObjects.length} 个对象`); console.log(`📊 开始栅格化 ${fabricObjects.length} 个对象`);
@@ -41,6 +42,7 @@ export const createRasterizedImage = async ({
clippingObject, clippingObject,
isReturenDataURL, isReturenDataURL,
selectionManager, // 传递选区管理器 selectionManager, // 传递选区管理器
isEnhanceImg, // 是否是增强图片
}); });
} }
@@ -81,6 +83,7 @@ const createClippedObjects = async ({
clippingObject, clippingObject,
isReturenDataURL, isReturenDataURL,
selectionManager = null, // 新增选区管理器参数 selectionManager = null, // 新增选区管理器参数
isEnhanceImg, // 是否是增强图片
}) => { }) => {
try { try {
console.log("🎯 使用新的图像遮罩裁剪方法创建对象"); console.log("🎯 使用新的图像遮罩裁剪方法创建对象");
@@ -110,6 +113,7 @@ const createClippedObjects = async ({
clippingObject, clippingObject,
selectionBounds: optimizedBounds, // 使用优化后的边界框 selectionBounds: optimizedBounds, // 使用优化后的边界框
featherAmount, featherAmount,
isEnhanceImg, // 是否是增强图片
}); });
} }
@@ -120,6 +124,7 @@ const createClippedObjects = async ({
clippingObject, clippingObject,
selectionBounds: optimizedBounds, // 使用优化后的边界框 selectionBounds: optimizedBounds, // 使用优化后的边界框
featherAmount, featherAmount,
isEnhanceImg, // 是否是增强图片
}); });
// 将DataURL转换为fabric.Image对象 // 将DataURL转换为fabric.Image对象
@@ -173,6 +178,7 @@ const createClippedDataURLByCanvas = async ({
clippingObject, clippingObject,
selectionBounds, selectionBounds,
featherAmount = 0, featherAmount = 0,
isEnhanceImg = false, // 是否是增强图片
}) => { }) => {
try { try {
console.log("🖼️ 使用图像遮罩裁剪方法生成DataURL"); console.log("🖼️ 使用图像遮罩裁剪方法生成DataURL");
@@ -185,7 +191,9 @@ const createClippedDataURLByCanvas = async ({
// 使用高分辨率以保证质量 // 使用高分辨率以保证质量
const pixelRatio = window.devicePixelRatio || 1; const pixelRatio = window.devicePixelRatio || 1;
const qualityMultiplier = Math.max(2, pixelRatio); const qualityMultiplier = !!isEnhanceImg ? Math.max(2, pixelRatio) : 1;
console.log("使用高分辨率以保证质量:" + isEnhanceImg, optimizedBounds);
const canvasWidth = Math.ceil(optimizedBounds.width * qualityMultiplier); const canvasWidth = Math.ceil(optimizedBounds.width * qualityMultiplier);
const canvasHeight = Math.ceil(optimizedBounds.height * qualityMultiplier); const canvasHeight = Math.ceil(optimizedBounds.height * qualityMultiplier);
@@ -455,6 +463,8 @@ const createLegacyRasterization = async ({
quality, quality,
format, format,
isReturenDataURL, isReturenDataURL,
isCropByBg, // 是否根据背景裁剪
isEnhanceImg, // 是否是增强图片
}) => { }) => {
console.log("⚠️ 使用兼容的离屏渲染方法"); console.log("⚠️ 使用兼容的离屏渲染方法");
@@ -481,6 +491,8 @@ const createLegacyRasterization = async ({
format, format,
currentZoom, currentZoom,
isReturenDataURL, isReturenDataURL,
isCropByBg, // 是否根据背景裁剪
isEnhanceImg, // 是否是增强图片
}); });
}; };
@@ -571,6 +583,8 @@ const createOffscreenRasterization = async ({
format, format,
currentZoom, currentZoom,
isReturenDataURL, isReturenDataURL,
isCropByBg, // 是否根据背景裁剪
isEnhanceImg, // 是否是增强图片
}) => { }) => {
try { try {
// 创建离屏画布,使用绝对尺寸以保证高质量 // 创建离屏画布,使用绝对尺寸以保证高质量

View File

@@ -349,18 +349,18 @@ const handleImageError = (event) => {
/* 图片网格 */ /* 图片网格 */
.image-grid { .image-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
gap: 16px; gap: 16px;
min-height: 200px; min-height: 20rem;
max-height: 500px; max-height: 50rem;
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
gap: 12px; gap: 12px;
} }
@media screen and (max-width: 480px) { @media screen and (max-width: 48rem) {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
gap: 10px; gap: 10px;
} }
} }
@@ -387,7 +387,7 @@ const handleImageError = (event) => {
.image-wrapper { .image-wrapper {
position: relative; position: relative;
width: 100%; width: 100%;
height: 220px; height: 22rem;
overflow: hidden; overflow: hidden;
img { img {

View File

@@ -62,6 +62,7 @@
@addSketch="()=>isEditPattern.value=false" @addSketch="()=>isEditPattern.value=false"
@revocation="revocation" @revocation="revocation"
@oppositeRevocation="oppositeRevocation" @oppositeRevocation="oppositeRevocation"
@modelOnLoad="modelOnLoad"
></model> ></model>
<div class="btn"> <div class="btn">
<div class="gallery_btn" style="margin-right: 0;" @click="submit">{{$t('DesignPrintOperation.Submit')}}</div> <div class="gallery_btn" style="margin-right: 0;" @click="submit">{{$t('DesignPrintOperation.Submit')}}</div>
@@ -154,6 +155,7 @@ export default defineComponent({
fun:null, fun:null,
}, },
positionKey:0, positionKey:0,
isUndividedLayerWithSinglePrint:false,
}) })
provide('getCanvasIfEdit',detailData.getCanvasIfEdit) provide('getCanvasIfEdit',detailData.getCanvasIfEdit)
@@ -167,60 +169,73 @@ export default defineComponent({
} }
const showDesignDetailModal = (data:any,str:any)=>{ const showDesignDetailModal = (data:any,str:any)=>{
// let url = Https.httpUrls.getDesignDetail + `?designItemId=${77770}&designPythonOutfitId=${77423}` return new Promise<void>((resolve, reject) => {
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}` store.commit('DesignDetail/clearDetailData')
detailData.loadingShow = true // let url = Https.httpUrls.getDesignDetail + `?designItemId=${77770}&designPythonOutfitId=${77423}`
Https.axiosGet(url).then( let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
async (rv: any) => { detailData.loadingShow = true
store.commit('DesignDetail/setDesignDetail',rv) Https.axiosGet(url).then(
rv.clothes.forEach((item:any)=>{ async (rv: any) => {
let a store.commit('DesignDetail/setDesignDetail',rv)
item.designType='Library' rv.clothes.forEach((item:any)=>{
if(item.layersObject[0].imageCategory.indexOf("back") == -1){ let a
a = item.layersObject[0] item.designType='Library'
item.layersObject[0] = item.layersObject[1] if(item.layersObject[0].imageCategory.indexOf("back") == -1){
item.layersObject[1] = a a = item.layersObject[0]
} item.layersObject[0] = item.layersObject[1]
if(item.color){ item.layersObject[1] = a
item.color.rgba = {
r:item.color.r,
g:item.color.g,
b:item.color.b,
} }
}else{ if(item.color){
item.color = { item.color.rgba = {
// rgba:{ r:item.color.r,
// r:undefined, g:item.color.g,
// g:undefined, b:item.color.b,
// b:undefined, }
// } }else{
item.color = {
// rgba:{
// r:undefined,
// g:undefined,
// b:undefined,
// }
}
} }
} if(item.gradient){
if(item.gradient){ item.color.gradient = item.gradient
item.color.gradient = item.gradient
}
if(item.printObject.prints == null)item.printObject.prints = []
item.printObject.prints.forEach((element:any) => {
if(!element.designType){
element.designType = 'Library'
} }
}); if(item.printObject.prints == null)item.printObject.prints = []
}) item.printObject.prints.forEach((element:any) => {
detailData.singleOveral.value = rv.singleOverall if(!element.designType){
detailData.designDetailShow = true element.designType = 'Library'
// this.deleteShow = false }
initialize() });
setRevocation() if(!item.layersObject[0].undividedLayerWithSinglePrint){
detailData.loadingShow = false detailData.isUndividedLayerWithSinglePrint = true
if(rv.singleOverall == "single"){ }
store.commit('DesignDetail/setDesignColthes',rv.clothes[0].id) })
} detailData.singleOveral.value = rv.singleOverall
detailData.designDetailShow = true
// this.deleteShow = false
initialize()
setRevocation()
if(rv.singleOverall == "single"){
store.commit('DesignDetail/setDesignColthes',rv.clothes[0].id)
modelOnLoad()
}
}
if(detailData.isUndividedLayerWithSinglePrint){
).catch(rv=>{ }else{
detailData.loadingShow = false detailData.loadingShow = false
}) }
resolve(rv)
}
).catch(rv=>{
detailData.loadingShow = false
resolve(rv)
})
})
} }
const initialize = ()=>{//design后初始化 const initialize = ()=>{//design后初始化
@@ -282,9 +297,10 @@ export default defineComponent({
} }
const setClothes = async (list:any)=>{ const setClothes = async (list:any)=>{
let clothesList:any = [] let clothesList:any = []
await nextTick()
for(let i = 0;i<list.length;i++){ for(let i = 0;i<list.length;i++){
detailData.selectDetail detailData.selectDetail
let {scale,offset,priority,maskUrl,maskMinioUrl} = (detailDom.model as any).getSubmitData(list[i]) let {scale,offset,priority,maskUrl,maskMinioUrl} = await (detailDom.model as any).getSubmitData(list[i],detailData.isUndividedLayerWithSinglePrint)
if(detailDom.canvasBox?.privewDetail)await (detailDom.canvasBox as any).privewDetail() if(detailDom.canvasBox?.privewDetail)await (detailDom.canvasBox as any).privewDetail()
if(detailDom.detailRight?.privewDetail)await (detailDom.detailRight as any).privewDetail() if(detailDom.detailRight?.privewDetail)await (detailDom.detailRight as any).privewDetail()
let gradient = null let gradient = null
@@ -298,18 +314,24 @@ export default defineComponent({
// 0.35822305 // 0.35822305
// ] // ]
let isCurrent = list[i].id == detailData?.selectDetail?.id let isCurrent = list[i].id == detailData?.selectDetail?.id
let color = (detailData.currentDetailType == 'color' && isCurrent && newData?.rgba?.r)?(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):(list[i].color?.rgba?.r?`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:'') let color = (detailData.currentDetailType == 'color' && isCurrent && !detailData.isEditPattern.value)?
(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):
(list[i].color?.rgba?.r?
`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:
'')
if(detailData.currentDetailType == 'sketch' && newData){ if(detailData.currentDetailType == 'sketch' && newData){
color = detailData.designDetail.clothes[0].color?.rgba?.r?`${detailData.designDetail.clothes[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:'' color = detailData.designDetail.clothes?.[0]?.color?.rgba?.r?`${detailData.designDetail.clothes?.[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:''
detailData.selectDetail.maskUrl = ''
detailData.selectDetail.maskMinioUrl = ''
} }
let data:any = { let data:any = {
changed:false, changed:false,
color, color,
designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.designType:list[i].designType, designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.designType:list[i].designType,
id:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.id:list[i].id, id:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.id:list[i].id,
maskMinioUrl:list[i]?.maskMinioUrl, maskMinioUrl:((newData && detailData.currentDetailType == 'sketch') || list[i].sketchString)?'':list[i]?.maskMinioUrl,
// maskUrl:'', // maskUrl:'',
maskUrl:list[i].maskUrl, maskUrl:((newData && detailData.currentDetailType == 'sketch') || list[i].sketchString)?'':list[i]?.maskUrl,
// offset:[ // offset:[
// -233.13985, // -233.13985,
// 406.90964 // 406.90964
@@ -317,19 +339,19 @@ export default defineComponent({
offset, offset,
partialDesign:list[i].partialDesign || {}, partialDesign:list[i].partialDesign || {},
// partialDesign:detailData.isEditPattern.value?list[i].partialDesign:{}, // partialDesign:detailData.isEditPattern.value?list[i].partialDesign:{},
path:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.minIOPath:list[i].minIOPath, path:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.minIOPath:list[i].minIOPath,
printObject:(newData && detailData.currentDetailType == 'print' && isCurrent)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]}, printObject:(newData && detailData.currentDetailType == 'print' && isCurrent && !detailData.isEditPattern.value)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]},
priority, priority,
// scale:[ // scale:[
// 0.5, // 0.5,
// 0.35822305 // 0.35822305
// ], // ],
scale:[scale[0]?scale[0]:1,scale[1]?scale[1]:1], scale:[scale[0]?scale[0]:1,scale[1]?scale[1]:1],
type:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.level2Type || newData.categoryValue:list[i].type, type:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.level2Type || newData.categoryValue:list[i].type,
sketchString:list[i].sketchString?list[i].sketchString:'', sketchString:list[i].sketchString?list[i].sketchString:'',
trims:(newData && detailData.currentDetailType == 'element' && isCurrent)?{prints:newData}:list[i].trims?.prints?list[i].trims:{prints:[]}, trims:(newData && detailData.currentDetailType == 'element' && isCurrent && !detailData.isEditPattern.value)?{prints:newData}:list[i].trims?.prints?list[i].trims:{prints:[]},
} }
if((list[i].color?.gradient || list[i].newDetail?.color?.gradient)){ if((detailData.isEditPattern.value && list[i].color?.gradient) || (!detailData.isEditPattern.value && (list[i].newDetail?.color?.gradient || list[i].color?.gradient))){
gradient = list[i].newDetail?.color?.gradient || list[i].color.gradient gradient = list[i].newDetail?.color?.gradient || list[i].color.gradient
gradient.colorImg = await setGradual(gradient,320,700) gradient.colorImg = await setGradual(gradient,320,700)
data.gradient = gradient data.gradient = gradient
@@ -341,9 +363,9 @@ export default defineComponent({
const getSubmitData = async (str:string)=>{ const getSubmitData = async (str:string)=>{
// return // return
let workspace = store.state.Workspace.probjects let workspace = store.state.Workspace.probjects
if(!detailData.selectDetail.path && !detailData.selectDetail.newDetail?.sketch?.minIOPath)return if(!detailData?.selectDetail?.path && !detailData?.selectDetail?.newDetail?.sketch?.minIOPath)return
let clothes:any let clothes:any
if(detailData.currentDetailType == 'models'){ if(detailData.currentDetailType == 'models' || detailData.isUndividedLayerWithSinglePrint){
clothes = await setClothes(detailData.designDetail.clothes) clothes = await setClothes(detailData.designDetail.clothes)
}else{ }else{
clothes = await setClothes([detailData.selectDetail]) clothes = await setClothes([detailData.selectDetail])
@@ -372,6 +394,8 @@ export default defineComponent({
delete detailData.designDetail.newModel delete detailData.designDetail.newModel
store.commit('DesignDetail/setPraeview',value) store.commit('DesignDetail/setPraeview',value)
detailData.loadingShow = false detailData.loadingShow = false
detailData.isUndividedLayerWithSinglePrint = false
canvasReload()
// setRevocation() // setRevocation()
}).catch(res=>{ }).catch(res=>{
detailData.loadingShow = false detailData.loadingShow = false
@@ -385,7 +409,7 @@ export default defineComponent({
designSingleItemDTOList:clothes, designSingleItemDTOList:clothes,
isPreview:false, isPreview:false,
// ifSubmit:designItemDetail.isPreview, // ifSubmit:designItemDetail.isPreview,
gender:workspace?.sex == 'Male'?1:0, gender:workspace?.sex,
sketchString:'', sketchString:'',
modelId:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.id:detailData.designDetail.oldModel?detailData.designDetail.oldModel.id:'', modelId:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.id:detailData.designDetail.oldModel?detailData.designDetail.oldModel.id:'',
modelType:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.type:detailData.designDetail.oldModel?detailData.designDetail.oldModel.type:'', modelType:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.type:detailData.designDetail.oldModel?detailData.designDetail.oldModel.type:'',
@@ -420,6 +444,12 @@ export default defineComponent({
let data = getSubmitData('preview') let data = getSubmitData('preview')
store.dispatch('DesignDetail/setSubmit',data) store.dispatch('DesignDetail/setSubmit',data)
} }
const modelOnLoad = ()=>{
if(!detailData.isUndividedLayerWithSinglePrint)return
setTimeout(()=>{
previwe()
})
}
const detailEdit = async (str:any)=>{ const detailEdit = async (str:any)=>{
if(str == 'edit'){ if(str == 'edit'){
if(detailData.isEditPattern.value){ if(detailData.isEditPattern.value){
@@ -464,6 +494,7 @@ export default defineComponent({
oppositeRevocation, oppositeRevocation,
detailEdit, detailEdit,
canvasReload, canvasReload,
modelOnLoad,
} }
}, },

View File

@@ -9,7 +9,7 @@
<editCanvas v-if="canvasLoad" :config="canvasConfig" <editCanvas v-if="canvasLoad" :config="canvasConfig"
@canvasInit="canvasInit" @canvasInit="canvasInit"
@changeCanvas="changeCanvas" @changeCanvas="changeCanvas"
:clothingImageUrl="selectDetail.undividedLayer || selectDetail.path" :clothingImageUrl="selectDetail?.undividedLayerWithSinglePrint || selectDetail.undividedLayer || selectDetail.path"
showFixedLayer showFixedLayer
:canvasJSON="canvasJSON" :canvasJSON="canvasJSON"
:clothing-image-opts="{ :clothing-image-opts="{
@@ -35,7 +35,7 @@
</editFrontBack> --> </editFrontBack> -->
<editCanvas v-if="canvasLoad" :config="canvasConfig" <editCanvas v-if="canvasLoad" :config="canvasConfig"
:enabledRedGreenMode="true" :enabledRedGreenMode="true"
:clothingImageUrl="selectDetail.undividedLayer || selectDetail.path" :clothingImageUrl="selectDetail.path"
:redGreenImageUrl="frontBack.front[imgDomIndex].maskUrl" :redGreenImageUrl="frontBack.front[imgDomIndex].maskUrl"
@trigger-red-green-mouseup="frontBackChange" @trigger-red-green-mouseup="frontBackChange"
:clothing-image-opts="{ :clothing-image-opts="{
@@ -141,7 +141,7 @@ export default defineComponent({
}else{ }else{
if(detailData.currentView === 'redGreenExample'){ if(detailData.currentView === 'redGreenExample'){
nextTick(()=>{ nextTick(()=>{
setCanvas(detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{ setCanvas(detailData.selectDetail?.undividedLayerWithSinglePrint || detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{
detailData.canvasLoad = true detailData.canvasLoad = true
}) })
}) })
@@ -185,7 +185,7 @@ export default defineComponent({
}) })
} }
const frontBackChange = (value:any)=>{ const frontBackChange = (value:any)=>{
let full = detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.frontBack.front[detailData.imgDomIndex].imageUrl let full = detailData.frontBack.front[detailData.imgDomIndex]?.undividedLayerWithSinglePrint || detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.selectDetail.path
let size = { let size = {
...detailData.canvasConfig, ...detailData.canvasConfig,
} }
@@ -193,7 +193,7 @@ export default defineComponent({
let front = detailData.frontBack.front[detailData.imgDomIndex] let front = detailData.frontBack.front[detailData.imgDomIndex]
let back = detailData.frontBack.back[detailData.imgDomIndex] let back = detailData.frontBack.back[detailData.imgDomIndex]
if(!front?.oldImageUrl)front.oldImageUrl = front.imageUrl if(!front?.oldImageUrl)front.oldImageUrl = front.imageUrl
if(!front?.oldMaskUrl)front.oldMaskUrl = front.imageUrl if(!front?.oldMaskUrl)front.oldMaskUrl = front.maskUrl
if(!back?.oldImageUrl)back.oldImageUrl = back.imageUrl if(!back?.oldImageUrl)back.oldImageUrl = back.imageUrl
if(!front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl}) if(!front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl})
@@ -218,7 +218,6 @@ export default defineComponent({
detailData.isShowMark = true detailData.isShowMark = true
} }
const index = detailData.designDetail.clothes.findIndex(item => item.id === detailData.selectDetail.id); const index = detailData.designDetail.clothes.findIndex(item => item.id === detailData.selectDetail.id);
console.log(index,detailData.selectDetail.id)
await new Promise<void>((resolve, reject) => { await new Promise<void>((resolve, reject) => {
if(!detailDom?.editCanvas)return resolve() if(!detailDom?.editCanvas)return resolve()
let canvasJSON = detailDom?.editCanvas?.getJSON() let canvasJSON = detailDom?.editCanvas?.getJSON()
@@ -261,7 +260,7 @@ export default defineComponent({
if(front?.oldImageUrl)front.imageUrl = front.oldImageUrl if(front?.oldImageUrl)front.imageUrl = front.oldImageUrl
if(front?.oldMaskUrl)front.maskUrl = front.oldMaskUrl if(front?.oldMaskUrl)front.maskUrl = front.oldMaskUrl
if(back?.oldImageUrl)back.imageUrl = back.oldImageUrl if(back?.oldImageUrl)back.imageUrl = back.oldImageUrl
if(front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl}) if(front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.maskUrl})
sessionStorage.removeItem('frontBackEdit'); sessionStorage.removeItem('frontBackEdit');
sessionStorage.removeItem('sketchEdit'); sessionStorage.removeItem('sketchEdit');
@@ -290,7 +289,7 @@ export default defineComponent({
}); });
}) })
} }
setCanvas(detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{ setCanvas(detailData.selectDetail?.undividedLayerWithSinglePrint || detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{
detailData.canvasLoad = true detailData.canvasLoad = true
}) })
}) })

View File

@@ -56,11 +56,13 @@ export default defineComponent({
}) })
const selectImgItem = (file:any)=>{ const selectImgItem = (file:any)=>{
if(props.type != 'models'){ if(props.type != 'models'){
if(!file.resData.minIOPath){ if(!file.resData?.minIOPath){
file.minIOPath = getMinioUrl(file.imgUrl || file.resData.url) file.minIOPath = getMinioUrl(file?.imgUrl || file?.resData?.url)
}else{
file.minIOPath = file.resData.minIOPath
} }
if(!file.designType){ if(!file.designType){
file.designType = file.resData.designType file.designType = file?.resData?.designType
} }
} }
// store.commit('DesignDetail/setNewDetail',file.resData) // store.commit('DesignDetail/setNewDetail',file.resData)

View File

@@ -129,6 +129,7 @@ export default defineComponent({
file.designType = res.data.designType file.designType = res.data.designType
file.level2Type = type; file.level2Type = type;
file.resData.level2Type = type;
file.minIOPath = file.resData.minIOPath file.minIOPath = file.resData.minIOPath
let fileList = detailData.uploadList.filter( let fileList = detailData.uploadList.filter(
(v:any) => v.status === "done" (v:any) => v.status === "done"

View File

@@ -76,10 +76,10 @@ export default defineComponent({
selectImgItem(data) selectImgItem(data)
return return
} }
data.id = id
if(data?.imgUrl)data.url = data.imgUrl if(data?.imgUrl)data.url = data.imgUrl
let value = { let value = {
data, data,
id,
} }
if(detailData.currentDetailType == 'sketch'){ if(detailData.currentDetailType == 'sketch'){
detailData.selectDetail.sketchString = '' detailData.selectDetail.sketchString = ''

View File

@@ -70,7 +70,7 @@
</div> </div>
</div> </div>
<!-- <img :src="selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg"> --> <!-- <img :src="selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg"> -->
<img :src="selectDetail?.undividedLayer?selectDetail.undividedLayer:selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg"> <img :src="selectDetail?.undividedLayer?selectDetail.undividedLayer:selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg" @load="()=>isSketchLoad = true">
<div class="designOpenrtion_btn"> <div class="designOpenrtion_btn">
<ul v-if="overallSingle" v-for="item,index in printStyleList[type][stateOverallSingle]" :key="item" :class="{active:item?.pattern.designOpenrtionBtn?item?.pattern.designOpenrtionBtn:false}" class="designOpenrtion_Mousingle" :style="item?.pattern.style" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))"> <ul v-if="overallSingle" v-for="item,index in printStyleList[type][stateOverallSingle]" :key="item" :class="{active:item?.pattern.designOpenrtionBtn?item?.pattern.designOpenrtionBtn:false}" class="designOpenrtion_Mousingle" :style="item?.pattern.style" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))">
<li class="designOpenrtion_btn_top" @mousedown.stop="itemSizeMousedown('top',getMousePosition($event,false))" @touchstart.passive="itemSizeMousedown('top',getMousePosition($event,true))"></li> <li class="designOpenrtion_btn_top" @mousedown.stop="itemSizeMousedown('top',getMousePosition($event,false))" @touchstart.passive="itemSizeMousedown('top',getMousePosition($event,true))"></li>
@@ -148,6 +148,7 @@ export default defineComponent({
}, },
loadingShow:false, loadingShow:false,
printElementList:null as any, printElementList:null as any,
isSketchLoad:false,
}) })
const collItemSize = reactive({ const collItemSize = reactive({
collValue:18, collValue:18,
@@ -208,6 +209,7 @@ export default defineComponent({
}) })
} }
const addPrintELement = async (data:any)=>{ const addPrintELement = async (data:any)=>{
if(!editPrintElementData.isSketchLoad)return
let {scale,location} = await setScaleLocation(data) let {scale,location} = await setScaleLocation(data)
let item = { let item = {
angle:0, angle:0,
@@ -379,6 +381,7 @@ export default defineComponent({
}) })
watch(()=>((editPrintElementData.selectDetail?.undividedLayer || editPrintElementData.selectDetail?.id)),(newVal)=>{ watch(()=>((editPrintElementData.selectDetail?.undividedLayer || editPrintElementData.selectDetail?.id)),(newVal)=>{
if(!newVal)return if(!newVal)return
editPrintElementData.isSketchLoad = false,
editPrintElementData.printStyleList[props.type] = { editPrintElementData.printStyleList[props.type] = {
single:[], single:[],
overall:[], overall:[],
@@ -914,7 +917,7 @@ export default defineComponent({
> img{ > img{
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: contain;
} }
> i{ > i{
position: absolute; position: absolute;

View File

@@ -23,7 +23,7 @@
<i class="fi fi-rr-copy" :title="$t('DesignDetail.compareTitle')" @mousedown="mousedownDesignImg" @mouseup="mousedownDesignImg" @touchstart="mousedownDesignImg" @touchend="mousedownDesignImg"></i> <i class="fi fi-rr-copy" :title="$t('DesignDetail.compareTitle')" @mousedown="mousedownDesignImg" @mouseup="mousedownDesignImg" @touchstart="mousedownDesignImg" @touchend="mousedownDesignImg"></i>
</div> </div>
<position ref="position" @canvasReload="()=>$emit('canvasReload')" :imgDesignImg=imgDesignImg></position> <position ref="position" @modelOnLoad="()=>$emit('modelOnLoad')" @canvasReload="()=>$emit('canvasReload')" @addSketch="()=>$emit('addSketch')" :imgDesignImg=imgDesignImg></position>
</div> </div>
</div> </div>
@@ -42,7 +42,7 @@ export default defineComponent({
components:{ components:{
position,modelNav position,modelNav
}, },
emits:['detailEdit','canvasReload','addSketch','revocation','oppositeRevocation'], emits:['detailEdit','canvasReload','addSketch','revocation','oppositeRevocation','modelOnLoad'],
setup(props,{emit}) { setup(props,{emit}) {
const {t} = useI18n() const {t} = useI18n()
const store = useStore(); const store = useStore();
@@ -60,8 +60,8 @@ export default defineComponent({
libraryList:null as any, libraryList:null as any,
position:null as any, position:null as any,
}) })
const getSubmitData = (value:any)=>{ const getSubmitData = (value:any,boolean)=>{
return getDetailListDom.position.getSubmitData(value) return getDetailListDom.position.getSubmitData(value,boolean)
} }
const showDesignImgDetail = (str:any)=>{ const showDesignImgDetail = (str:any)=>{
new Promise((resolve, reject) => { new Promise((resolve, reject) => {

View File

@@ -74,29 +74,31 @@ export default defineComponent({
},{immediate:true}) },{immediate:true})
const selectDetailItem = (item:any,index:number)=>{ const selectDetailItem = (item:any,index:number)=>{
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
// if(detailData.isEditPattern.value && if(detailData.isEditPattern.value &&
// detailData.selectDetail?.id && detailData.selectDetail?.id &&
// detailData?.getCanvasIfEdit?.fun&&detailData?.getCanvasIfEdit?.fun() > 0 detailData?.getCanvasIfEdit?.fun&&detailData?.getCanvasIfEdit?.fun() > 0
// ){ ){
// Modal.confirm({ Modal.confirm({
// title: t('collectionModal.jsContent2'), title: t('collectionModal.jsContent6'),
// icon: createVNode(ExclamationCircleOutlined), icon: createVNode(ExclamationCircleOutlined),
// okText: 'Yes', okText: 'Yes',
// cancelText: 'No', cancelText: 'No',
// mask:false, mask:false,
// centered:true, centered:true,
// onOk() { onOk() {
// resolve(true) resolve(true)
// emit('canvasReload') emit('canvasReload')
// }, },
// onCancel(){ onCancel(){
// resolve(false) resolve(false)
// } }
// }); });
// }else{ }else{
resolve(true) resolve(true)
emit('canvasReload') if(detailData.selectDetail.id !== item.id){
// } emit('canvasReload')
}
}
}).then((rv)=>{ }).then((rv)=>{
if(rv)store.commit('DesignDetail/setDesignColthes',item.id) if(rv)store.commit('DesignDetail/setDesignColthes',item.id)
}) })

View File

@@ -4,7 +4,7 @@
<div class="designOpenrtion_print" v-for="item,index in frontBack.back" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="frontBack.front[index].style"> <div class="designOpenrtion_print" v-for="item,index in frontBack.back" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="frontBack.front[index].style">
<img :style="item.imageUrl?'':'display:none;'" :src="item.imageUrl" alt=""> <img :style="item.imageUrl?'':'display:none;'" :src="item.imageUrl" alt="">
</div> </div>
<img class="perview_img" @load="setPrintSize()" ref="detailBody" :src="frontBack?.body?.path" :style="'width:'+ frontBack?.body?.layersObject?.[0].imageSize?.[0] +';height:' + frontBack?.body?.layersObject?.[0].imageSize?.[0] +';'"> <img class="perview_img" @load="setPrintSize()" ref="detailBody" :key="designDetail.designItemId" :src="frontBack?.body?.path" :style="'width:'+ frontBack?.body?.layersObject?.[0].imageSize?.[0] +';height:' + frontBack?.body?.layersObject?.[0].imageSize?.[0] +';'">
<div class="detail_modal_item_front" v-for="item,index in frontBack.front" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="item.style"> <div class="detail_modal_item_front" v-for="item,index in frontBack.front" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="item.style">
<img :src="item.imageUrl" alt=""> <img :src="item.imageUrl" alt="">
</div> </div>
@@ -18,7 +18,7 @@
</div> </div>
</div> </div>
<div class="designOpenrtion_imgMask" v-if="!frontBack?.body?.path"> <div class="designOpenrtion_imgMask" v-if="!frontBack?.body?.path">
<img :src="designDetail?.undividedLayer || selectDetail?.path" style="object-fit: cover;" alt=""> <img :src="selectDetail?.undividedLayerWithSinglePrint || selectDetail?.undividedLayer || selectDetail?.path" style="object-fit: cover;" alt="">
<!-- <img @load="setSelectSketch()" :src="designDetail?.currentFullBodyView || selectDetail?.undividedLayer" style="object-fit: cover;" alt=""> --> <!-- <img @load="setSelectSketch()" :src="designDetail?.currentFullBodyView || selectDetail?.undividedLayer" style="object-fit: cover;" alt=""> -->
</div> </div>
</div> </div>
@@ -49,7 +49,7 @@ export default defineComponent({
type:Boolean, type:Boolean,
} }
}, },
emits:['canvasReload'], emits:['canvasReload','addSketch','modelOnLoad'],
setup(props,{emit}) { setup(props,{emit}) {
const {t} = useI18n() const {t} = useI18n()
const store = useStore(); const store = useStore();
@@ -82,6 +82,11 @@ export default defineComponent({
let dom = document.querySelector('.molepositon .perview_img') as any let dom = document.querySelector('.molepositon .perview_img') as any
if(!detailData.frontBack?.body?.path || !dom)return if(!detailData.frontBack?.body?.path || !dom)return
img.onload = () => { img.onload = () => {
if(detailData.designDetail.clothes.length == 0){
store.commit('DesignDetail/addDesignColthes')
emit('addSketch')
return
}
if(!detailData.selectDetail?.id){ if(!detailData.selectDetail?.id){
store.commit('DesignDetail/setDesignColthes',detailData.designDetail.clothes[0].id) store.commit('DesignDetail/setDesignColthes',detailData.designDetail.clothes[0].id)
} }
@@ -111,6 +116,9 @@ export default defineComponent({
// detailData.frontBack.back[index].style[key] = value*sacle+'px' // detailData.frontBack.back[index].style[key] = value*sacle+'px'
} }
}); });
setTimeout(() => {
emit('modelOnLoad')
},500);
}; };
img.src = detailData.frontBack?.body?.path; img.src = detailData.frontBack?.body?.path;
}) })
@@ -236,38 +244,41 @@ export default defineComponent({
// } // }
} }
const itemMoveMousedown = async (index:any,e:any)=>{ const itemMoveMousedown = async (index:any,e:any)=>{
if(detailData.selectDetail.id != detailData.frontBack.front[index].id)return
let isOpen = false let isOpen = false
let isModal = false let isModal = false
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
if( // if(
detailData.isEditPattern.value && // detailData.isEditPattern.value &&
selectItem.selectDetail?.id && // selectItem.selectDetail?.id &&
(detailData.frontBack.front[index].id != selectItem.selectDetail.id) // (detailData.frontBack.front[index].id != selectItem.selectDetail.id)
){ // ){
isModal = true // isModal = true
Modal.confirm({ // Modal.confirm({
title: t('collectionModal.jsContent2'), // title: t('collectionModal.jsContent2'),
icon: createVNode(ExclamationCircleOutlined), // icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes', // okText: 'Yes',
cancelText: 'No', // cancelText: 'No',
mask:false, // mask:false,
centered:true, // centered:true,
onOk() { // onOk() {
resolve(true) // resolve(true)
isOpen = true // isOpen = true
}, // },
onCancel(){ // onCancel(){
resolve(false) // resolve(false)
isOpen = false // isOpen = false
} // }
}); // });
}else{ // }else{
if(detailData.frontBack.front[index].id != selectItem.selectDetail.id){ // if(detailData.frontBack.front[index].id != selectItem.selectDetail.id){
isOpen = true // isOpen = true
} // }
resolve(true) // resolve(true)
isModal = false // isModal = false
} // }
resolve(true)
isOpen = true
}).then((rv)=>{ }).then((rv)=>{
}) })
if(isOpen){ if(isOpen){
@@ -305,9 +316,9 @@ export default defineComponent({
}); });
return arr return arr
} }
const getSubmitData = (value:any)=>{ const getSubmitData = (value:any,isNoComputed)=>{
let parentNode = document.getElementsByClassName('molepositon')[0].getElementsByClassName("designOpenrtion_imgMask")[0].getBoundingClientRect() let parentNode = document.getElementsByClassName('molepositon')[0].getElementsByClassName("designOpenrtion_imgMask")[0].getBoundingClientRect()
if(!detailData.frontBack?.body?.layersObject?.[0]?.imageSize){ if(!detailData.frontBack?.body?.layersObject?.[0]?.imageSize || isNoComputed){
return{ return{
scale:value.layersObject[0].scale, scale:value.layersObject[0].scale,
offset:value.layersObject[0].offset, offset:value.layersObject[0].offset,
@@ -315,7 +326,6 @@ export default defineComponent({
} }
} }
let ratio = detailData.frontBack.body.layersObject[0].imageSize[0]/parentNode.width let ratio = detailData.frontBack.body.layersObject[0].imageSize[0]/parentNode.width
// let arr:any = sort(detailData.frontBack.front) // let arr:any = sort(detailData.frontBack.front)
let arr:any = sort(JSON.parse(JSON.stringify(detailData.frontBack.front))) let arr:any = sort(JSON.parse(JSON.stringify(detailData.frontBack.front)))
let num = 10 let num = 10
@@ -481,7 +491,7 @@ export default defineComponent({
align-items: center; align-items: center;
justify-content: center; justify-content: center;
img{ img{
height: auto; // height: auto;
} }
} }
} }

View File

@@ -338,7 +338,7 @@ export default defineComponent({
speed.speedData.value = '' speed.speedData.value = ''
speed.speedData.label = '' speed.speedData.label = ''
}else{ }else{
if(newVal.value == "Pattern"){ if(newVal.value == "Pattern" || props.msg == 'Sketchboard'){
speed.speedData = speed.speedList[1] speed.speedData = speed.speedList[1]
}else{ }else{
speed.speedData = speed.speedList[0] speed.speedData = speed.speedList[0]
@@ -350,6 +350,9 @@ export default defineComponent({
} }
onMounted(() => { onMounted(() => {
instance.appContext.config.globalProperties.$dropdownEvents.onClose(removeOpenSpeed) instance.appContext.config.globalProperties.$dropdownEvents.onClose(removeOpenSpeed)
if(props.msg == 'Sketchboard'){
speed.speedData = speed.speedList[1]
}
}) })
onUnmounted(() => { onUnmounted(() => {
@@ -742,7 +745,7 @@ export default defineComponent({
data = data.filter((item:any) => item !== element.taskId); data = data.filter((item:any) => item !== element.taskId);
console.log(data) console.log(data)
this.fileList = this.fileList.filter((item:any) => item.taskId !== element.taskId); this.fileList = this.fileList.filter((item:any) => item.taskId !== element.taskId);
message.info(this.t('Generate.everyTimeEffectPoor')); // message.info(this.t('Generate.everyTimeEffectPoor'));
} }
}); });
if((data.length == 0)){ if((data.length == 0)){
@@ -1008,6 +1011,7 @@ export default defineComponent({
this.searchPictureName = ""; this.searchPictureName = "";
}, },
onPaste(e:any){ onPaste(e:any){
if(this.sketchboardList.length != 0)return
if(e.clipboardData.files[0] && !this.isTextarea && this.upload.level1Type !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){ if(e.clipboardData.files[0] && !this.isTextarea && this.upload.level1Type !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){
let param = new FormData(); let param = new FormData();
param.append('inPin','0') param.append('inPin','0')

View File

@@ -365,6 +365,7 @@ export default defineComponent({
title:this.selectSex, title:this.selectSex,
surname:this.surname, surname:this.surname,
givenName:this.givenName, givenName:this.givenName,
userId:this.userDetail?.userId,
}; };
if(this.loginTime){ if(this.loginTime){
this.loginTime = false this.loginTime = false

View File

@@ -71,7 +71,7 @@ import { message, Upload, Modal } from "ant-design-vue";
}, },
isFontType:{ isFontType:{
type:Boolean, type:Boolean,
default:true, default:false,
}, },
selectSize:{ selectSize:{
type:String, type:String,

View File

@@ -608,30 +608,31 @@ export default defineComponent({
setImageIndex(index:any){ setImageIndex(index:any){
if(this.isNext)return if(this.isNext)return
let this_ = this let this_ = this
if(this.imgType == 'Printboard' || this.imgType == 'Sketchboard'){ // if(this.imgType == 'Printboard' || this.imgType == 'Sketchboard'){
this.isNext = true // this.isNext = true
new Promise((resolve,reject)=>{ // new Promise((resolve,reject)=>{
Modal.confirm({ // Modal.confirm({
title: this.t('scaleImage.submitCanvas'), // title: this.t('scaleImage.submitCanvas'),
icon: createVNode(ExclamationCircleOutlined), // icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes', // okText: 'Yes',
cancelText: 'No', // cancelText: 'No',
mask:false, // mask:false,
centered:true, // centered:true,
onOk() { // onOk() {
this_.scaleImageIndex = index // this_.scaleImageIndex = index
this_.isNext = false // this_.isNext = false
resolve('') // resolve('')
}, // },
onCancel(){ // onCancel(){
this_.isNext = false // this_.isNext = false
resolve('') // resolve('')
} // }
}); // });
}) // })
}else{ // }else{
this.scaleImageIndex = index // this.scaleImageIndex = index
} // }
this.scaleImageIndex = index
}, },
LikeFile(item:any,str:string){ LikeFile(item:any,str:string){
let parent:any = this.$parent let parent:any = this.$parent

View File

@@ -4,9 +4,9 @@
<div class="general_video_btn" @click="clearVideo"> <div class="general_video_btn" @click="clearVideo">
<i class="fi fi-rr-cross-small"></i> <i class="fi fi-rr-cross-small"></i>
</div> </div>
<video ref="video" controls> <video ref="video" controls :src="url">
<source :src="url" type="video/webm"> <!-- <source :src="url" type="video/webm">
Your browser does not support the video tag or the file format of this video. Your browser does not support the video tag or the file format of this video. -->
</video> </video>
</div> </div>
</div> </div>

View File

@@ -1,9 +1,10 @@
<template> <template>
<div class="Container"> <div class="Container">
<!-- 谷歌登录 --> <!-- 谷歌登录 -->
<!-- <div class="g_id_signin" id="g_id_signin"> <div class="g_id_signin" id="g_id_signin">
</div> --> </div>
<div class="icon" @click="toGmailLogin" style="opacity: .7;"> <!-- <div class="icon" @click="toGmailLogin"> -->
<div class="icon">
<img src="@/assets/images/loginPage/gmailIcon.svg" alt=""> <img src="@/assets/images/loginPage/gmailIcon.svg" alt="">
<span>{{ $props.text }}</span> <span>{{ $props.text }}</span>
</div> </div>
@@ -25,8 +26,33 @@
}, },
setup(props, { emit }) { setup(props, { emit }) {
const {t} = useI18n() const {t} = useI18n()
function decodeJWT(token) {
let base64Url = token.split(".")[1];
let base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
let jsonPayload = decodeURIComponent(
atob(base64)
.split("")
.map(function (c) {
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
})
.join("")
);
return JSON.parse(jsonPayload);
}
const handleCredentialResponse = async (response) => { const handleCredentialResponse = async (response) => {
// 获取回调响应的凭证数据 然后拿这个凭证给后台后台jwt进行解析获取登录信息 // 获取回调响应的凭证数据 然后拿这个凭证给后台后台jwt进行解析获取登录信息
console.log("Encoded JWT ID token: " + response.credential);
const responsePayload = decodeJWT(response.credential);
console.log("Decoded JWT ID token fields:");
console.log(" Full Name: " + responsePayload.name);
console.log(" Given Name: " + responsePayload.given_name);
console.log(" Family Name: " + responsePayload.family_name);
console.log(" Unique ID: " + responsePayload.sub);
console.log(" Profile image URL: " + responsePayload.picture);
console.log(" Email: " + responsePayload.email);
let code = response.credential let code = response.credential
emit('googelLogin',code) emit('googelLogin',code)
window.isAddGmail = false window.isAddGmail = false
@@ -36,10 +62,10 @@
scriptSrc:'https://accounts.google.com/gsi/client', scriptSrc:'https://accounts.google.com/gsi/client',
script:null script:null
}) })
console.log() console.log(import.meta.env.VITE_USER_NODE_ENV)
let GOOGLE_CLIENT_ID let GOOGLE_CLIENT_ID
if(import.meta.env.VITE_USER_NODE_ENV == 'development'){ if(import.meta.env.VITE_USER_NODE_ENV == 'development'){
GOOGLE_CLIENT_ID = '29310152396-c44dcsoksjirhn7vbo29p8u8n0sg4qps.apps.googleusercontent.com' GOOGLE_CLIENT_ID = '157095842121-kdd1fdf8m8nudvj9sprstb2k2prnf9e4.apps.googleusercontent.com'
}else{ }else{
GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com' GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com'
} }
@@ -51,11 +77,11 @@
window.isAddGmail = true window.isAddGmail = true
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
const script = document.createElement("script"); const script = document.createElement("script");
script.src = data.scriptSrc
script.onload=()=>{ script.onload=()=>{
resolve() resolve()
} }
document.body.appendChild(script); document.body.appendChild(script);
script.src = data.scriptSrc
}) })
} }
window.google.accounts.id.initialize({ window.google.accounts.id.initialize({
@@ -67,19 +93,19 @@
ux_mode:"popup", ux_mode:"popup",
itp_support:true, itp_support:true,
}); });
console.log(document.querySelector('.Container #g_id_signin'))
window.google.accounts.id.renderButton( window.google.accounts.id.renderButton(
document.querySelector('.Container #g_id_signin'), document.querySelector('.Container #g_id_signin'),
{ {
type:"standard",//icon为只有一个icon type:"standard",//icon为只有一个icon
shape:"circle", shape:"circle",
theme:"outline", theme:"outline",
size:"large", size:"large",
logo_alignment:"center", logo_alignment:"center",
}); });
} }
} }
const toGmailLogin = ()=>{ const toGmailLogin = ()=>{
console.log(12312)
message.info(t('account.canNotUtilize')) message.info(t('account.canNotUtilize'))
} }
onBeforeUnmount(()=>{ onBeforeUnmount(()=>{
@@ -90,7 +116,7 @@
} }
}) })
onMounted(()=>{ onMounted(()=>{
// createGmailLogin() createGmailLogin()
}) })
return { return {
toGmailLogin, toGmailLogin,
@@ -121,7 +147,6 @@
// width: 100%; // width: 100%;
// height: 100%; // height: 100%;
// } // }
// } // }
.icon{ .icon{
// width: 40px; // width: 40px;
@@ -135,7 +160,7 @@
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
background: transparent; background: transparent;
// pointer-events: none; pointer-events: none;
background-color: #f5f5f5; background-color: #f5f5f5;
@media (max-width: 768px) { @media (max-width: 768px) {
border-radius: 2.5rem; border-radius: 2.5rem;
@@ -165,15 +190,20 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; // overflow: hidden;
top: 0; top: 0;
left: 0; left: 0;
opacity: 0; // opacity: 0;
.S9gUrf-YoZ4jf{ .S9gUrf-YoZ4jf{
} }
:deep(.S9gUrf-YoZ4jf){ :deep(.S9gUrf-YoZ4jf){
width: 100%; width: 100%;
height: 100%; height: 100%;
iframe{
zoom: 3;
}
} }
} }
&:hover{ &:hover{

View File

@@ -105,7 +105,7 @@
<span> <span>
I agree to the I agree to the
<a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>, <a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>,
<a href="aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>, <a href="https://aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
and Fees. and Fees.
</span> </span>
</label> </label>

View File

@@ -68,6 +68,7 @@
<div class="codeEmail">Weve sent an code to your email <span>{{ email }}</span></div> <div class="codeEmail">Weve sent an code to your email <span>{{ email }}</span></div>
<div class="codeEmailInput"> <div class="codeEmailInput">
<VerificationCodeInput <VerificationCodeInput
ref="verificationCodeInputDom"
:ct="emailCode" :ct="emailCode"
@sendCaptcha="submitEmailLogin($event)" @sendCaptcha="submitEmailLogin($event)"
></VerificationCodeInput> ></VerificationCodeInput>
@@ -88,7 +89,7 @@
<span> <span>
I agree to the I agree to the
<a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>, <a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>,
<a href="aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>, <a href="https://aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
and Fees. and Fees.
</span> </span>
</label> </label>
@@ -97,7 +98,9 @@
<div <div
class="login_submit_button" class="login_submit_button"
:state="emailStap" :state="emailStap"
:class="{'active':animation}"
@click="submitPerLogin()" @click="submitPerLogin()"
@mousedown="loginBtnMousedown"
> >
Sign in Sign in
</div> </div>
@@ -302,6 +305,8 @@ export default defineComponent({
passwordType: "password", passwordType: "password",
userId: "", userId: "",
loginTime: true, loginTime: true,
animation: false,
inputCodeTime: null as any,
}; };
}, },
onBeforeUnmount() { onBeforeUnmount() {
@@ -413,6 +418,16 @@ export default defineComponent({
submitPerLogin() { submitPerLogin() {
//输入账号密码 //输入账号密码
if (this.emailStap >= 2) { if (this.emailStap >= 2) {
let verificationCodeInputDom:any = this.$refs.verificationCodeInputDom
let code = verificationCodeInputDom.getCtData.map(item => item).join('');
console.log(code)
if(code.length !== this.emailCode.length){
message.info("Please enter the complete verification code.");
}else{
this.submitEmailLogin(code)
}
//提交验证码
return; return;
} else { } else {
if (!this.password) { if (!this.password) {
@@ -480,20 +495,23 @@ export default defineComponent({
//邮箱登录提交 //邮箱登录提交
submitEmailLogin(emailVerifyCode: any) { submitEmailLogin(emailVerifyCode: any) {
let data = { clearTimeout(this.inputCodeTime)
email: this.email, this.inputCodeTime = setTimeout(()=>{
emailVerifyCode: emailVerifyCode, let data = {
loginType: "EMAIL", email: this.email,
userId: this.userId, emailVerifyCode: emailVerifyCode,
}; loginType: "EMAIL",
this.$emit('update:isMask',true) userId: this.userId,
Https.axiosPost(Https.httpUrls.accountLogin, data) };
.then((rv: any) => { this.$emit('update:isMask',true)
this.setSuccessLogin(rv); Https.axiosPost(Https.httpUrls.accountLogin, data)
}) .then((rv: any) => {
.catch((res) => { this.setSuccessLogin(rv);
this.$emit('update:isMask',false) })
}); .catch((res) => {
this.$emit('update:isMask',false)
});
},1000)
}, },
isCheckAgreement() { isCheckAgreement() {
message.info("Agree to all terms, privacy fees and policies"); message.info("Agree to all terms, privacy fees and policies");
@@ -602,7 +620,15 @@ export default defineComponent({
// } // }
// ); // );
// }, // },
}, loginBtnMousedown(){
this.animation = true
let mouseup = ()=>{
this.animation = false
document.removeEventListener('mouseup',mouseup)
}
document.addEventListener('mouseup',mouseup)
},
},
mounted() { mounted() {
}, },
}); });
@@ -763,13 +789,12 @@ export default defineComponent({
transition: all 0.3s; transition: all 0.3s;
margin-top: 5rem; margin-top: 5rem;
font-weight: 600; font-weight: 600;
&.active{
transform: scale(.9);
}
&:hover { &:hover {
background: #3c3c3c; background: #3c3c3c;
} }
&[state="2"] {
cursor: not-allowed;
}
} }
.NewAccount{ .NewAccount{
font-size: 1.6rem; font-size: 1.6rem;
@@ -778,6 +803,8 @@ export default defineComponent({
margin-top: 1.2rem; margin-top: 1.2rem;
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
width: min-content;
white-space: nowrap;
} }
.segmentation{ .segmentation{
margin-top: 4rem; margin-top: 4rem;

View File

@@ -90,6 +90,7 @@
<div class="codeEmail">Weve sent an code to your email <span>{{ email }}</span></div> <div class="codeEmail">Weve sent an code to your email <span>{{ email }}</span></div>
<div class="codeEmailInput"> <div class="codeEmailInput">
<VerificationCodeInput <VerificationCodeInput
ref="verificationCodeInputDom"
:ct="emailCode" :ct="emailCode"
@sendCaptcha="submitEmailLogin($event)" @sendCaptcha="submitEmailLogin($event)"
></VerificationCodeInput> ></VerificationCodeInput>
@@ -105,7 +106,7 @@
<span> <span>
I agree to the I agree to the
<a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>, <a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>,
<a href="aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>, <a href="https://aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
and Fees. and Fees.
</span> </span>
</label> </label>
@@ -121,9 +122,11 @@
</div> </div>
</div> --> </div> -->
<div <div
class="login_submit_button marign_top40" class="login_submit_button"
:state="emailStap" :state="emailStap"
:class="{'active':animation}"
@click="submitPerLogin()" @click="submitPerLogin()"
@mousedown="loginBtnMousedown"
> >
Sign in Sign in
</div> </div>
@@ -302,6 +305,8 @@ export default defineComponent({
passwordType: "password", passwordType: "password",
userId: "", userId: "",
loginTime: true, loginTime: true,
animation: false,
inputCodeTime: null as any,
}; };
}, },
onBeforeUnmount() { onBeforeUnmount() {
@@ -413,6 +418,16 @@ export default defineComponent({
submitPerLogin() { submitPerLogin() {
//输入账号密码 //输入账号密码
if (this.emailStap >= 2) { if (this.emailStap >= 2) {
let verificationCodeInputDom:any = this.$refs.verificationCodeInputDom
let code = verificationCodeInputDom.getCtData.map(item => item).join('');
console.log(code)
if(code.length !== this.emailCode.length){
message.info("Please enter the complete verification code.");
}else{
this.submitEmailLogin(code)
}
//提交验证码
return; return;
} else { } else {
if (!this.password) { if (!this.password) {
@@ -481,21 +496,24 @@ export default defineComponent({
//邮箱登录提交 //邮箱登录提交
submitEmailLogin(emailVerifyCode: any) { submitEmailLogin(emailVerifyCode: any) {
let data = { clearTimeout(this.inputCodeTime)
email: this.email, this.inputCodeTime = setTimeout(()=>{
emailVerifyCode: emailVerifyCode, let data = {
loginType: "EMAIL", email: this.email,
userId: this.userId, emailVerifyCode: emailVerifyCode,
organizationName: this.selectSchool, loginType: "EMAIL",
}; userId: this.userId,
this.$emit('update:isMask',true) organizationName: this.selectSchool,
Https.axiosPost(Https.httpUrls.accountLogin, data) };
.then((rv: any) => { this.$emit('update:isMask',true)
this.setSuccessLogin(rv); Https.axiosPost(Https.httpUrls.accountLogin, data)
}) .then((rv: any) => {
.catch((res) => { this.setSuccessLogin(rv);
this.$emit('update:isMask',false) })
}); .catch((res) => {
this.$emit('update:isMask',false)
});
},1000)
}, },
isCheckAgreement() { isCheckAgreement() {
message.info("Agree to all terms, privacy fees and policies"); message.info("Agree to all terms, privacy fees and policies");
@@ -604,6 +622,14 @@ export default defineComponent({
// } // }
// ); // );
// }, // },
loginBtnMousedown(){
this.animation = true
let mouseup = ()=>{
this.animation = false
document.removeEventListener('mouseup',mouseup)
}
document.addEventListener('mouseup',mouseup)
},
}, },
mounted() { mounted() {
}, },
@@ -781,13 +807,12 @@ export default defineComponent({
transition: all 0.3s; transition: all 0.3s;
margin-top: 5rem; margin-top: 5rem;
font-weight: 600; font-weight: 600;
&.active{
transform: scale(.9);
}
&:hover { &:hover {
background: #3c3c3c; background: #3c3c3c;
} }
&[state="2"] {
cursor: not-allowed;
}
} }
.NewAccount{ .NewAccount{
font-size: 1.6rem; font-size: 1.6rem;
@@ -796,6 +821,8 @@ export default defineComponent({
margin-top: 1.2rem; margin-top: 1.2rem;
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
width: min-content;
white-space: nowrap;
} }
.segmentation{ .segmentation{
margin-top: 4rem; margin-top: 4rem;

View File

@@ -440,6 +440,13 @@ export default defineComponent({
if(userDetail.value.systemList.indexOf(1) == -1){ if(userDetail.value.systemList.indexOf(1) == -1){
return message.info(t('newScaleImage.jsContent1')) return message.info(t('newScaleImage.jsContent1'))
} }
const targetDate = new Date('2025-09-01T00:00:00');
// 解析输入日期字符串
const inputDate = new Date(imgData.scaleImageData.createDate);
if(inputDate < targetDate){
return message.info(t('newScaleImage.jsContent2'))
}
if(imgData.scaleImageData.openSource == 0){ if(imgData.scaleImageData.openSource == 0){
return message.info(t('newScaleImage.jsContent2')) return message.info(t('newScaleImage.jsContent2'))
} }

View File

@@ -339,7 +339,7 @@ export default defineComponent({
}, },
deleteFile(item: any) { deleteFile(item: any) {
if(item.type_.type1 == 'generate' || item.type_.type1 == 'material'){ if(item?.type_?.type1 == 'generate' || item?.type_?.type1 == 'material'){
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:8}) item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:8})
item.state = 'delete' item.state = 'delete'
this.store.commit("addGenerateMaterialFils", item); this.store.commit("addGenerateMaterialFils", item);

View File

@@ -385,7 +385,7 @@ export default defineComponent({
deleteFile(item:any){ deleteFile(item:any){
// this.fileList.splice(item, 1) // this.fileList.splice(item, 1)
// this.store.commit('setPrintboardFile',this.fileList) // this.store.commit('setPrintboardFile',this.fileList)
if(item.type_.type1 == 'generate' || item.type_.type1 == 'material'){ if(item?.type_?.type1 == 'generate' || item?.type_?.type1 == 'material'){
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:16}) item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:16})
item.state = 'delete' item.state = 'delete'
this.store.commit("addGenerateMaterialFils", item); this.store.commit("addGenerateMaterialFils", item);
@@ -610,7 +610,6 @@ export default defineComponent({
} }
this.fileList.push(data) this.fileList.push(data)
} }
console.log(this.fileList)
this.store.commit('setPrintboardFile',this.fileList) this.store.commit('setPrintboardFile',this.fileList)
}, },

View File

@@ -124,6 +124,14 @@ export default defineComponent({
designType:props.item.resData.designType, designType:props.item.resData.designType,
} }
}else{ }else{
rv.imgUrl = rv.url
rv.category = props.item.category
rv.categoryValue = props.item.categoryValue
rv.resData = {
id:rv.id,
url:rv.url,
designType:props.item.resData.designType,
}
props.list.unshift(rv) props.list.unshift(rv)
} }
} }

View File

@@ -812,31 +812,32 @@ methods: {
}, },
setImageIndex(index:any){ setImageIndex(index:any){
if(this.isNext)return if(this.isNext)return
let this_ = this // let this_ = this
if(this.isCanvas){ // if(this.isCanvas){
this.isNext = true // this.isNext = true
new Promise((resolve,reject)=>{ // new Promise((resolve,reject)=>{
Modal.confirm({ // Modal.confirm({
title: this.t('scaleImage.submitCanvas'), // title: this.t('scaleImage.submitCanvas'),
icon: createVNode(ExclamationCircleOutlined), // icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes', // okText: 'Yes',
cancelText: 'No', // cancelText: 'No',
mask:false, // mask:false,
centered:true, // centered:true,
onOk() { // onOk() {
this_.scaleImageIndex = index // this_.scaleImageIndex = index
this_.isNext = false // this_.isNext = false
resolve('') // resolve('')
}, // },
onCancel(){ // onCancel(){
this_.isNext = false // this_.isNext = false
resolve('') // resolve('')
} // }
}); // });
}) // })
}else{ // }else{
this.scaleImageIndex = index // this.scaleImageIndex = index
} // }
this.scaleImageIndex = index
}, },
LikeFile(item:any,str:string){ LikeFile(item:any,str:string){
let parent:any = this.$parent let parent:any = this.$parent

View File

@@ -1591,12 +1591,10 @@ export default defineComponent({
//设计新的collection //设计新的collection
async designNewCollection() { async designNewCollection() {
clearTimeout(this.getDesignTime); clearTimeout(this.getDesignTime);
let probjects = this.store.state.Workspace.probjects
if(probjects.type == "seriesDesign" && probjects?.model?.length == 0)return message.info(this.t('collectionModal.jsContent7'));
let data = await this.getDesignData(""); let data = await this.getDesignData("");
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
this.isShowMark = true this.isShowMark = true
// this.store.commit("setLikeDesignCollectionList", []); // this.store.commit("setLikeDesignCollectionList", []);
Https.axiosPost(Https.httpUrls.designCollection, data) Https.axiosPost(Https.httpUrls.designCollection, data)
@@ -1911,7 +1909,7 @@ export default defineComponent({
if(design?.childList?.length > 0){ if(design?.childList?.length > 0){
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
Modal.confirm({ Modal.confirm({
title: this.t('LibraryPage.jsContent11'), title: this.t('HomeView.jsContent12'),
icon: createVNode(ExclamationCircleOutlined), icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes', okText: 'Yes',
cancelText: 'No', cancelText: 'No',
@@ -2117,13 +2115,14 @@ export default defineComponent({
type: string type: string
) { ) {
// if() // if()
if(this.isMove)return if(this.isMove || this.isShowMark)return
this.store.commit('setOpenChatStatus',false) this.store.commit('setOpenChatStatus',false)
if(design.resultType != "Design"){ if(design.resultType != "Design"){
this.selectEditBtn = design this.selectEditBtn = design
this.setEditDesignType(collectionList,index,design.resultType,'edit',type) this.setEditDesignType(collectionList,index,design.resultType,'edit',type)
return return
} }
this.isShowMark = true
design.designOutfitId = design.designPythonOutfitId?design.designPythonOutfitId:design.designOutfitId design.designOutfitId = design.designPythonOutfitId?design.designPythonOutfitId:design.designOutfitId
let data = { let data = {
design: design, design: design,
@@ -2134,7 +2133,9 @@ export default defineComponent({
this.detailDestroy = true this.detailDestroy = true
nextTick(()=>{ nextTick(()=>{
let designDetail: any = this.$refs.designDetail; let designDetail: any = this.$refs.designDetail;
designDetail.showDesignDetailModal(data); designDetail.showDesignDetailModal(data).then(()=>{
this.isShowMark = false
})
}) })
}, },

View File

@@ -228,6 +228,7 @@ export default defineComponent({
let uploadElementData = { let uploadElementData = {
str:'add', str:'add',
list:rv.uploadElement, list:rv.uploadElement,
isGetModule:true,
} }
store.commit('setUploadElement',uploadElementData) store.commit('setUploadElement',uploadElementData)

View File

@@ -43,7 +43,6 @@
</div> </div>
<div class="style brand marginBottom"> <div class="style brand marginBottom">
<div class="text">{{$t('Habit.Brand')}}:</div> <div class="text">{{$t('Habit.Brand')}}:</div>
<!-- <div class="text"><img v-show="selectObject.userBrandDna" :src="selectObject.userBrandDnaImg">{{ selectObject.userBrandDnaName }}</div> -->
<div class="gallery_btn" @click="setBrandDNA">{{ $t('Habit.Select') }}</div> <div class="gallery_btn" @click="setBrandDNA">{{ $t('Habit.Select') }}</div>
</div> </div>
<div class="brandImg" v-if="selectObject.userBrandDna"><img :src="selectObject.userBrandDnaImg"></div> <div class="brandImg" v-if="selectObject.userBrandDna"><img :src="selectObject.userBrandDnaImg"></div>

View File

@@ -113,12 +113,16 @@ export default defineComponent({
return new Promise((res,rev)=>{ return new Promise((res,rev)=>{
let img = new Image() let img = new Image()
img.onload = ()=>{ img.onload = ()=>{
let wH = [1,1] // let wH = [1,1]
let domHeight = dataDom.canvasBox.offsetHeight - 200 // let domHeight = dataDom.canvasBox.offsetHeight - 200
let imgHeight = img.height // let imgHeight = img.height
wH = [1,domHeight/imgHeight] // wH = [1,domHeight/imgHeight]
data.canvasConfig.width = img.width * wH[1] // data.canvasConfig.width = img.width * wH[1]
data.canvasConfig.height = domHeight // data.canvasConfig.height = domHeight
data.canvasConfig.height = img.height
data.canvasConfig.width = img.width
data.canvasConfig.initZoom = true
data.canvasLoad = true data.canvasLoad = true
res('') res('')
} }

View File

@@ -39,8 +39,7 @@
}" }"
:headers="{ Authorization: token }" :headers="{ Authorization: token }"
:before-upload="beforeUpload" :before-upload="beforeUpload"
v-model:file-list="fileList" :multiple="!!upload.projectId"
:multiple="true"
accept=".jpg,.png,.jpeg,.bmp" accept=".jpg,.png,.jpeg,.bmp"
@change="(file) => fileUploadChange(file)" @change="(file) => fileUploadChange(file)"
> >
@@ -136,6 +135,7 @@ import generalDrag from '@/component/modules/generalDrag.vue';
import { getUploadUrl,isMoible,getMinioUrl } from "@/tool/util"; import { getUploadUrl,isMoible,getMinioUrl } from "@/tool/util";
import { getCookie,setCookie } from "@/tool/cookie"; import { getCookie,setCookie } from "@/tool/cookie";
import showViewVideo from "@/tool/mount"; import showViewVideo from "@/tool/mount";
import router from '@/router';
export default defineComponent({ export default defineComponent({
components:{ components:{
@@ -156,6 +156,7 @@ export default defineComponent({
setup(props,{emit}) { setup(props,{emit}) {
const {t,locale} = useI18n() const {t,locale} = useI18n()
const store = useStore(); const store = useStore();
const route = useRoute();
const data:any = reactive({ const data:any = reactive({
button:{ button:{
left:false, left:false,
@@ -305,6 +306,23 @@ export default defineComponent({
data.isGenerate = false data.isGenerate = false
clearInterval(data.remGenerateTime) clearInterval(data.remGenerateTime)
data.remGenerate = false data.remGenerate = false
if(res.errCode === 2){
Modal.confirm({
title: res.errMsg,
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
zIndex:99999,
centered:true,
onOk() {
store.commit("setUpgradePlan", true);
},
onCancel(){
}
});
}
}) })
} }
const setGenerate = (dataList:any)=>{ const setGenerate = (dataList:any)=>{
@@ -328,6 +346,8 @@ export default defineComponent({
list = '' list = ''
clearInterval(data.generateTime) clearInterval(data.generateTime)
clearInterval(data.remGenerateTime) clearInterval(data.remGenerateTime)
data.remGenerate = false
data.isGenerate = false
// if(list?.filter)list = list?.filter((item:any) => item !== element.taskId); // if(list?.filter)list = list?.filter((item:any) => item !== element.taskId);
store.dispatch('getCredits') store.dispatch('getCredits')
}else if(element.status == 'Fail'){ }else if(element.status == 'Fail'){
@@ -381,6 +401,11 @@ export default defineComponent({
} }
} }
let isSelectObject = false let isSelectObject = false
watch(()=>route?.query,(newVal)=>{
if(!newVal.id){
isSelectObject = false
}
},{immediate:true})
let beforeUpload = async (file: any)=>{ let beforeUpload = async (file: any)=>{
const isJpgOrPng = const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/jpeg" ||
@@ -408,19 +433,21 @@ export default defineComponent({
if(res.errCode == 0){ if(res.errCode == 0){
file.imgUrl = res.data.url; file.imgUrl = res.data.url;
file.id = res.data.id file.id = res.data.id
data.fileList.forEach((listItem:any)=>listItem.isChecked = false)
data.currentList.forEach((listItem:any)=>listItem.isChecked = false) data.currentList.forEach((listItem:any)=>listItem.isChecked = false)
file.isChecked = true
file.type = 'ProductElement' file.type = 'ProductElement'
// if(props.productimgMenu.value == 'Relight'){ // if(props.productimgMenu.value == 'Relight'){
// file.type = "ToProductImage" // file.type = "ToProductImage"
// } // }
data.selectImg = res.data data.selectImg = res.data
data.fileList.filter((v: any) => v.status === "done"); // data.fileList.filter((v: any) => v.status === "done");
let storeData = {
str:'add',
list:[file]
}
store.commit('setUploadElement',storeData)
}else{ }else{
bor = false bor = false
} }
// this.showFileList = productImgData.fileList
} else if (file.status === "error") { } else if (file.status === "error") {
bor = false bor = false
} }
@@ -548,6 +575,13 @@ export default defineComponent({
watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{ watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{
if(props.isDesignPage)return if(props.isDesignPage)return
data.fileList = store.state.HomeStoreModule.uploadElement data.fileList = store.state.HomeStoreModule.uploadElement
data.fileList.forEach((listItem:any)=>{
if(listItem.id == data.selectImg.id){
listItem.isChecked = true
}else{
listItem.isChecked = false
}
})
}) })
watch(()=>data.noLikeList.length,(newVal,oldVal)=>{ watch(()=>data.noLikeList.length,(newVal,oldVal)=>{
nextTick(()=>{ nextTick(()=>{

View File

@@ -45,8 +45,7 @@
}" }"
:headers="{ Authorization: token }" :headers="{ Authorization: token }"
:before-upload="beforeUpload" :before-upload="beforeUpload"
v-model:file-list="fileList[productimgMenu.value]" :multiple="!!upload.projectId"
:multiple="true"
accept=".jpg,.png,.jpeg,.bmp" accept=".jpg,.png,.jpeg,.bmp"
@change="(file) => fileUploadChange(file)" @change="(file) => fileUploadChange(file)"
> >
@@ -323,6 +322,9 @@ export default defineComponent({
watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{ watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{
if(props.isDesignPage)return if(props.isDesignPage)return
productImgData.fileList[props.productimgMenu.value] = store.state.HomeStoreModule.uploadElement productImgData.fileList[props.productimgMenu.value] = store.state.HomeStoreModule.uploadElement
if(productImgData.fileList[props.productimgMenu.value][0]){
productImgData.fileList[props.productimgMenu.value][0].isChecked = true
}
}) })
const productImgDom = reactive({ const productImgDom = reactive({
generalDragLeft:null as any, generalDragLeft:null as any,
@@ -423,6 +425,7 @@ export default defineComponent({
} }
let fileUploadChange = (data: any)=> { let fileUploadChange = (data: any)=> {
console.log(data)
let file = data.file; let file = data.file;
let bor = true let bor = true
if (file.status === "done") { if (file.status === "done") {
@@ -435,11 +438,16 @@ export default defineComponent({
// if(props.productimgMenu.value == 'Relight'){ // if(props.productimgMenu.value == 'Relight'){
// file.type = "ToProductImage" // file.type = "ToProductImage"
// } // }
productImgData.fileList[props.productimgMenu.value].filter((v: any) => v.status === "done"); let storeData = {
str:'add',
list:[file]
}
console.log(storeData)
console.log(1111)
store.commit('setUploadElement',storeData)
}else{ }else{
bor = false bor = false
} }
// this.showFileList = productImgData.fileList
} else if (file.status === "error") { } else if (file.status === "error") {
bor = false bor = false
} }
@@ -466,11 +474,9 @@ export default defineComponent({
CollectionType:props.productimgMenu.value, CollectionType:props.productimgMenu.value,
} }
} }
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE; console.log(!!((isJpgOrPng && isLt2M && productImgData.selectObject.id) || Upload.LIST_IGNORE))
return !!((isJpgOrPng && isLt2M && productImgData.selectObject.id) || Upload.LIST_IGNORE);
} }
let deleteFile = (index:any)=>{
productImgData.fileList[props.productimgMenu.value].splice(index,1)
}
let setGenerate = (item:any)=>{ let setGenerate = (item:any)=>{
item.isChecked = !item.isChecked item.isChecked = !item.isChecked
} }
@@ -563,6 +569,7 @@ export default defineComponent({
}else{ }else{
obj.elementId = item.id obj.elementId = item.id
obj.elementType = item.resultType || 'ProductElement' obj.elementType = item.resultType || 'ProductElement'
obj.elementType = obj.elementType == 'Relight'?'ToProductImage':obj.elementType
} }
obj.parentId = item?.parentId || item?.userLikeSortId, obj.parentId = item?.parentId || item?.userLikeSortId,
selectArr.push(JSON.parse(JSON.stringify(obj))) selectArr.push(JSON.parse(JSON.stringify(obj)))
@@ -892,7 +899,6 @@ export default defineComponent({
setproduct, setproduct,
fileUploadChange, fileUploadChange,
beforeUpload, beforeUpload,
deleteFile,
setGenerate, setGenerate,
setUploadDelete, setUploadDelete,
likeFile, likeFile,

View File

@@ -87,7 +87,7 @@ export default defineComponent({
// dataDom.editCanvas.exportImage({isContainBg:props.source == 'detail',isContainFixed:true}).then((rv)=>{ // dataDom.editCanvas.exportImage({isContainBg:props.source == 'detail',isContainFixed:true}).then((rv)=>{
// emit('submitBase64Data',rv) // emit('submitBase64Data',rv)
// }) // })
dataDom.editCanvas.exportImage({isContainBg:true,isContainFixed:true}).then((rv)=>{ dataDom.editCanvas.exportImage({isContainBg:true,isContainFixed:true,isCropByBg:true}).then((rv)=>{
emit('submitBase64Data',rv) emit('submitBase64Data',rv)
}) })
} }
@@ -135,12 +135,16 @@ export default defineComponent({
if(props.imgUrl){ if(props.imgUrl){
let img = new Image() let img = new Image()
img.onload = ()=>{ img.onload = ()=>{
let wH = [1,1] // let wH = [1,1]
let domHeight = dataDom.canvasBox.offsetHeight - 200 // let domHeight = dataDom.canvasBox.offsetHeight - 200
let imgHeight = img.height // let imgHeight = img.height
wH = [1,domHeight/imgHeight] // wH = [1,domHeight/imgHeight]
data.canvasConfig.height = domHeight // data.canvasConfig.height = domHeight
data.canvasConfig.width = wH[1] * img.width // data.canvasConfig.width = wH[1] * img.width
data.canvasConfig.height = img.height
data.canvasConfig.width = img.width
data.canvasConfig.initZoom = true
data.canvasLoad = true data.canvasLoad = true
// setTimeout(()=>{ // setTimeout(()=>{
// canvasLoadAddImg() // canvasLoadAddImg()

View File

@@ -239,6 +239,7 @@ export default {
jsContent9: "您确定要清除当前系列并重新开始吗?", jsContent9: "您确定要清除当前系列并重新开始吗?",
jsContent10: "二次创作的作品不允许使用'设计',但是您可以使用'重新设计'", jsContent10: "二次创作的作品不允许使用'设计',但是您可以使用'重新设计'",
jsContent11: "取消喜欢后相关联的元素会被删除,确认要删除吗", jsContent11: "取消喜欢后相关联的元素会被删除,确认要删除吗",
jsContent12: "你确定要删除选中元素和相关元素吗?",
}, },
ProductImg: { ProductImg: {
productInput: "请输入关键词(例如款式、材质)", productInput: "请输入关键词(例如款式、材质)",
@@ -582,6 +583,8 @@ export default {
jsContent2: "上传的文件不会保存,是否继续? ", jsContent2: "上传的文件不会保存,是否继续? ",
jsContent3: "您必须选择一种或多种颜色进行下一步。", jsContent3: "您必须选择一种或多种颜色进行下一步。",
jsContent5: "我们检测到您的({str})上的PIN数量超过了八个这可能会导致一些已钉住的项目未被使用。您是否仍要继续", jsContent5: "我们检测到您的({str})上的PIN数量超过了八个这可能会导致一些已钉住的项目未被使用。您是否仍要继续",
jsContent6: "画布内容没有保存,请点击预保存后继续。",
jsContent7: "请至少选择一个模特",
}, },
DesignDetail: { DesignDetail: {
Details: "详情", Details: "详情",
@@ -750,7 +753,8 @@ export default {
editUser: "修改个人信息", editUser: "修改个人信息",
notModifiable: "没有修改次数", notModifiable: "没有修改次数",
remainingModifications: "本月剩余次数:", remainingModifications: "本月剩余次数:",
Country: "国家", plaseSelect:"请选择",
Country: "国家或地区",
CompanyName: "职业", CompanyName: "职业",
Status: "状态", Status: "状态",
Valid: "有效", Valid: "有效",
@@ -1347,5 +1351,16 @@ export default {
jsContent1:'邮箱格式有误', jsContent1:'邮箱格式有误',
jsContent2:'请检查所有带 * 号的内容', jsContent2:'请检查所有带 * 号的内容',
jsDelete:'确定删除这一项吗', jsDelete:'确定删除这一项吗',
Design:'设计',
SingleDesign:'单品设计',
MoodBoard:'情绪版',
PrintBoard:'印花板',
SketchBoard:'线稿板',
Pattern:'设计',
Logo:'标志',
Slogan:'标语',
ToProductImage:'产品图',
Relight:'打光',
ChatRobot:'对话生成',
}, },
}; };

View File

@@ -241,6 +241,7 @@ export default {
jsContent9: "Are you sure to erase current collection and start over?", jsContent9: "Are you sure to erase current collection and start over?",
jsContent10: "Re-created works are not allowed to use 'design', but you can use 'redesign'", jsContent10: "Re-created works are not allowed to use 'design', but you can use 'redesign'",
jsContent11: "By unliking this, all connected posts will be deleted. Are you sure you want to continue?", jsContent11: "By unliking this, all connected posts will be deleted. Are you sure you want to continue?",
jsContent12: "Are you sure about deleting the current brand DNA?",
}, },
ProductImg: { ProductImg: {
productInput: "Enter keyword(style,texture)", productInput: "Enter keyword(style,texture)",
@@ -584,6 +585,8 @@ export default {
jsContent2: "The uploaded files will not be saved, being sure to continue? ", jsContent2: "The uploaded files will not be saved, being sure to continue? ",
jsContent3: "You must choose one or more colors for further process.", jsContent3: "You must choose one or more colors for further process.",
jsContent5: "We've detected that the number of pins on your ({str}) exceeds eight, which may result in some pinned items not being used. Would you like to continue anyway?", jsContent5: "We've detected that the number of pins on your ({str}) exceeds eight, which may result in some pinned items not being used. Would you like to continue anyway?",
jsContent6: 'The content on the canvas has not been saved. Please click "Preview" to continue.',
jsContent7: "Please select at least one model.",
}, },
DesignDetail: { DesignDetail: {
Details: "Details", Details: "Details",
@@ -752,7 +755,8 @@ export default {
editUser: "Change Information", editUser: "Change Information",
notModifiable: "Not modifiable", notModifiable: "Not modifiable",
remainingModifications: "Remaining this month:", remainingModifications: "Remaining this month:",
Country: "Country", plaseSelect:"Please select",
Country: "Country or Region",
CompanyName: "Occupation", CompanyName: "Occupation",
Status: "Status", Status: "Status",
Valid: "Valid", Valid: "Valid",
@@ -1349,5 +1353,16 @@ export default {
jsContent1:'The email format is incorrect', jsContent1:'The email format is incorrect',
jsContent2:'Please check the input box marked with *', jsContent2:'Please check the input box marked with *',
jsDelete:'Are you sure you want to delete this item?', jsDelete:'Are you sure you want to delete this item?',
Design:'Design',
SingleDesign:'SingleDesign',
MoodBoard:'MoodBoard',
PrintBoard:'PrintBoard',
SketchBoard:'SketchBoard',
Pattern:'Pattern',
Logo:'Logo',
Slogan:'Slogan',
ToProductImage:'ToProductImage',
Relight:'Relight',
ChatRobot:'ChatRobot',
}, },
}; };

View File

@@ -1,5 +1,6 @@
import {Module} from 'vuex' import {Module} from 'vuex'
import {RootState} from '../index' import {RootState} from '../index'
import { forEach } from 'jszip'
interface DesignDetail{ interface DesignDetail{
designDetail:any, designDetail:any,
@@ -28,6 +29,19 @@ const DesignDetail : Module<DesignDetail,RootState> = {
currentPrintElement:null, currentPrintElement:null,
}, },
mutations:{ mutations:{
clearDetailData(state){
state.designDetail = null
state.designPreviewData = {}
state.frontBack = {
front:[],
back:[],
body:{},
}
state.selectDetail = null
state.printZIndex = -1
state.currentDetailType = ''
state.currentPrintElement = null
},
setDesignDetail(state,data){ setDesignDetail(state,data){
if(data.others.length > 0 && data.others[0].type == "Body"){ if(data.others.length > 0 && data.others[0].type == "Body"){
state.frontBack.body = data.others[0] state.frontBack.body = data.others[0]
@@ -58,11 +72,13 @@ const DesignDetail : Module<DesignDetail,RootState> = {
// front[index].style.zIndex = v.priority // front[index].style.zIndex = v.priority
front[index].id = v.id front[index].id = v.id
front[index].undividedLayer = v.undividedLayer front[index].undividedLayer = v.undividedLayer
front[index].undividedLayerWithSinglePrint = v?.undividedLayerWithSinglePrint
}else{ }else{
back[index] = v.layersObject[i] back[index] = v.layersObject[i]
back[index].style.zIndex = v.priority back[index].style.zIndex = v.priority
back[index].id = v.id back[index].id = v.id
back[index].undividedLayer = v.undividedLayer back[index].undividedLayer = v.undividedLayer
back[index].undividedLayerWithSinglePrint = v?.undividedLayerWithSinglePrint
// back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++ // back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
} }
if(state.printZIndex < v.priority){ if(state.printZIndex < v.priority){
@@ -138,7 +154,6 @@ const DesignDetail : Module<DesignDetail,RootState> = {
} }
}, },
setDesignColthes(state,data){ setDesignColthes(state,data){
console.log(data)
if(!state.currentDetailType)state.currentDetailType = 'sketch' if(!state.currentDetailType)state.currentDetailType = 'sketch'
//切换选择 //切换选择
// state.currentDetailType = '' // state.currentDetailType = ''
@@ -181,6 +196,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
trims:null, trims:null,
type:null, type:null,
undividedLayer:null, undividedLayer:null,
undividedLayerWithSinglePrint:null,
} }
if(!state.currentDetailType)state.currentDetailType = 'sketch' if(!state.currentDetailType)state.currentDetailType = 'sketch'
state.designDetail.clothes.forEach((item:any) => { state.designDetail.clothes.forEach((item:any) => {
@@ -192,33 +208,36 @@ const DesignDetail : Module<DesignDetail,RootState> = {
}, },
async setPraeview(state,value){//preview async setPraeview(state,value){//preview
let data = value?.rv || value let data = value?.rv || value
console.log(data,'preview')
let currentType = value?.currentType let currentType = value?.currentType
if(state.designDetail.oldModel?.url)state.frontBack.body.path = state.designDetail.oldModel.url if(state.designDetail.oldModel?.url)state.frontBack.body.path = state.designDetail.oldModel.url
if(value?.rv?.currentFullBodyView)state.designDetail.currentFullBodyView = value.rv.currentFullBodyView if(value?.rv?.currentFullBodyView)state.designDetail.currentFullBodyView = value.rv.currentFullBodyView
for (let j = 0; j < data.clothes.length; j++) { for (let j = 0; j < data.clothes.length; j++) {
const item = data.clothes[j]; const item = data.clothes[j];
if(!item.id)continue if(!item.id)continue
if(item.id == state.selectDetail.id || state.selectDetail.newDetail?.sketch?.id == item.id){
}
let id_:any let id_:any
if(state.currentDetailType != 'models'){ if(state.currentDetailType != 'models'){
id_ = state.selectDetail.id || state.selectDetail.newDetail?.sketch?.id if(data.clothes.length > 2){
//缺少字段临时添加
id_ = item.id || state.selectDetail.newDetail?.sketch?.id
}else{
id_ = state.selectDetail.id || state.selectDetail.newDetail?.sketch?.id
}
}else{ }else{
id_ = item.id id_ = item.id
} }
console.log(id_)
let el:any = document.querySelector('.molepositon .perview_img') let el:any = document.querySelector('.molepositon .perview_img')
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
if(!state.frontBack?.body?.path){ if(!state.frontBack?.body?.path){
state.frontBack.front[0].undividedLayer = value.rv.clothes[0].undividedLayer state.frontBack.front[0].undividedLayer = value.rv.clothes[0].undividedLayer
state.frontBack.front[0].undividedLayerWithSinglePrint = value.rv.clothes[0]?.undividedLayerWithSinglePrint
resolve('') resolve('')
} }
const img = new Image(); const img = new Image();
img.src = state.frontBack.body.path; img.src = state.frontBack.body.path;
img.onload = () => { img.onload = () => {
let scale:any = el.parentNode.offsetWidth / img.width; let scale:any = el.parentNode.offsetWidth / img.width;
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){ if(state.selectDetail?.newDetail?.sketch?.id && !state.selectDetail.id){
state.frontBack.front.push({id:state.selectDetail.newDetail?.sketch?.id}) state.frontBack.front.push({id:state.selectDetail.newDetail?.sketch?.id})
state.frontBack.back.push({id:state.selectDetail.newDetail?.sketch?.id}) state.frontBack.back.push({id:state.selectDetail.newDetail?.sketch?.id})
} }
@@ -230,7 +249,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
left:item.layersObject[i].position?.[1] * scale + 'px', left:item.layersObject[i].position?.[1] * scale + 'px',
width:item.layersObject[i].imageSize?.[0] * scale + 'px', width:item.layersObject[i].imageSize?.[0] * scale + 'px',
height:item.layersObject[i].imageSize?.[1] * scale + 'px', height:item.layersObject[i].imageSize?.[1] * scale + 'px',
zIndex:v?.style?.zIndex?v.style.zIndex:state.frontBack.front.length zIndex:v?.style?.zIndex?v.style.zIndex:v.priority?v.priority:state.frontBack.front.length
} }
item.layersObject[i].centers={ item.layersObject[i].centers={
left:0, left:0,
@@ -242,11 +261,13 @@ const DesignDetail : Module<DesignDetail,RootState> = {
// state.frontBack.front[index].style.zIndex = v.priority // state.frontBack.front[index].style.zIndex = v.priority
state.frontBack.front[index].id = item.id state.frontBack.front[index].id = item.id
state.frontBack.front[index].undividedLayer = item.undividedLayer state.frontBack.front[index].undividedLayer = item.undividedLayer
state.frontBack.front[index].undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
}else{ }else{
state.frontBack.back[index] = item.layersObject[i] state.frontBack.back[index] = item.layersObject[i]
// state.frontBack.back[index].style.zIndex = v.priority // state.frontBack.back[index].style.zIndex = v.priority
state.frontBack.back[index].id = item.id state.frontBack.back[index].id = item.id
state.frontBack.back[index].undividedLayer = item.undividedLayer state.frontBack.back[index].undividedLayer = item.undividedLayer
state.frontBack.back[index].undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
} }
} }
} }
@@ -254,31 +275,89 @@ const DesignDetail : Module<DesignDetail,RootState> = {
resolve('') resolve('')
}; };
}) })
if(state.currentDetailType != 'models'){ let uploadDetail = (detailItem)=>{
state.selectDetail.change = item.change detailItem.change = item.change
if(state.selectDetail?.newDetail?.color){ if(detailItem?.newDetail?.color && currentType != 'color'){
state.selectDetail.color = state.selectDetail?.newDetail?.color detailItem.color = detailItem?.newDetail?.color
state.selectDetail.newDetail.color = null detailItem.newDetail.color = null
} }
if(item.partialDesign){ if(item.partialDesign){
state.selectDetail.partialDesign = item.partialDesign detailItem.partialDesign = item.partialDesign
} }
state.selectDetail.designType = item.designType detailItem.designType = item.designType
state.selectDetail.gradient = item.gradient detailItem.layersObject = item.layersObject
state.selectDetail.layersObject = item.layersObject detailItem.path = item.path
state.selectDetail.path = item.path detailItem.minIOPath = item.minIOPath
state.selectDetail.minIOPath = item.minIOPath detailItem.scale = [1,1]
state.selectDetail.scale = [1,1] detailItem.offset = [0,0]
state.selectDetail.offset = [0,0] detailItem.printObject = item.printObject
state.selectDetail.printObject = item.printObject detailItem.trims = item.trims
state.selectDetail.trims = item.trims detailItem.type = item.type
state.selectDetail.type = item.type detailItem.maskMinioUrl = item.layersObject?.[0]?.maskMinioUrl
state.selectDetail.undividedLayer = item.undividedLayer detailItem.maskUrl = item.layersObject?.[0]?.maskUrl
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){ detailItem.color = {
state.designDetail.clothes.push(state.selectDetail) ...item.color,
rgba:{
r:item.color?.r,
g:item.color?.g,
b:item.color?.b,
},
gradient:item.gradient,
} }
state.selectDetail.id = item.id detailItem.undividedLayer = item.undividedLayer
if(currentType)if(state.selectDetail.newDetail?.[currentType])delete state.selectDetail.newDetail[currentType] detailItem.undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
if(detailItem.newDetail?.sketch?.id && !detailItem.id){
state.designDetail.clothes.push(detailItem)
}
detailItem.id = item.id
if(currentType)if(detailItem.newDetail?.[currentType] && currentType != 'color')delete detailItem.newDetail[currentType]
}
if(data.clothes.length > 2){
state.designDetail.clothes.forEach((detailItem:any) => {
if(detailItem.id == id_){
uploadDetail(detailItem)
}
});
}else{
uploadDetail(state.selectDetail)
}
if(state.currentDetailType != 'models'){
// state.selectDetail.change = item.change
// if(state.selectDetail?.newDetail?.color && currentType != 'color'){
// state.selectDetail.color = state.selectDetail?.newDetail?.color
// state.selectDetail.newDetail.color = null
// }
// if(item.partialDesign){
// state.selectDetail.partialDesign = item.partialDesign
// }
// state.selectDetail.designType = item.designType
// state.selectDetail.layersObject = item.layersObject
// state.selectDetail.path = item.path
// state.selectDetail.minIOPath = item.minIOPath
// state.selectDetail.scale = [1,1]
// state.selectDetail.offset = [0,0]
// state.selectDetail.printObject = item.printObject
// state.selectDetail.trims = item.trims
// state.selectDetail.type = item.type
// state.selectDetail.maskMinioUrl = item.layersObject?.[0]?.maskMinioUrl
// state.selectDetail.maskUrl = item.layersObject?.[0]?.maskUrl
// state.selectDetail.color = {
// ...item.color,
// rgba:{
// r:item.color?.r,
// g:item.color?.g,
// b:item.color?.b,
// },
// gradient:item.gradient,
// }
// state.selectDetail.undividedLayer = item.undividedLayer
// state.selectDetail.undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
// if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
// state.designDetail.clothes.push(state.selectDetail)
// }
// state.selectDetail.id = item.id
// if(currentType)if(state.selectDetail.newDetail?.[currentType] && currentType != 'color')delete state.selectDetail.newDetail[currentType]
} }
} }
if(value.fun)value.fun() if(value.fun)value.fun()

View File

@@ -95,6 +95,9 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
} }
}, },
setUploadElement(state,data){ setUploadElement(state,data){
if(data?.isGetModule){
state.uploadElement = []
}
if(data.str == 'add'){ if(data.str == 'add'){
state.uploadElement.unshift(...data.list) state.uploadElement.unshift(...data.list)
}else{ }else{

View File

@@ -38,19 +38,7 @@ const CancelToken = axios.CancelToken;
const source = CancelToken.source(); const source = CancelToken.source();
// console.log(import.meta.env.VITE_APP_BASE_URL); // console.log(import.meta.env.VITE_APP_BASE_URL);
let isLoginTime = false let isLoginTime = false
const filterHttpsUrl = [
// '/api/portfolio/page',
'/api/account/resetPwd',
'/api/portfolio/detail',
'/api/account/preLogin',
'/api/account/designWorksRegister',
'/api/account/schoolLogin',
'/api/account/enterpriseLogin',
'/api/account/login',
'/api/account/organizationNameSearch',
'/api/account/designWorksRegisterCode',
'/api/third/party/parseWeChatCode',
'/api/account/sendEmail']
//POST传参序列化(添加请求拦截器) //POST传参序列化(添加请求拦截器)
axios.interceptors.request.use((config) => { axios.interceptors.request.use((config) => {
//在发送请求之前做某件事 //在发送请求之前做某件事
@@ -63,23 +51,7 @@ axios.interceptors.request.use((config) => {
// config.data = JSON.stringify(config.data); // config.data = JSON.stringify(config.data);
} }
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA'; // config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
if(filterHttpsUrl.indexOf(config.url) == -1){ config.headers.Authorization = getCookie('token');
if (!getCookie('token')) {
console.log('无Token取消请求');
if(!isLoginTime){
isLoginTime = true
router.replace('/')
message.warning('Please login and try again~')
setTimeout(()=>[
isLoginTime = false
],2000)
}
return Promise.reject(new Error('缺少Token请求被拦截')); // 阻止请求
}
config.headers.Authorization = getCookie('token');
}else{
config.headers.Authorization = '';
}
return config; return config;
},(error) =>{ },(error) =>{
return Promise.reject(error); return Promise.reject(error);

View File

@@ -339,7 +339,8 @@ const openTypeList = (t)=>{
label:t('LibraryPage.Mannequins'), label:t('LibraryPage.Mannequins'),
value:'Models', value:'Models',
router:'library=Models' router:'library=Models'
},{ },
{
icon:'fi-ss-gem', icon:'fi-ss-gem',
label:t('LibraryPage.brandDNA'), label:t('LibraryPage.brandDNA'),
value:'MyBrand', value:'MyBrand',

View File

@@ -240,11 +240,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="userSystem" v-if="userDetail.systemList.indexOf(1) == -1"> <div class="routerView">
{{$t('Header.pastDue')}} <div class="userSystem" v-show="pastDuePage">
</div> {{$t('Header.pastDue')}}
<div class="router" v-else-if="!getLangIsShowMark"> </div>
<home ref="home" @setNewProject="()=>leftShow=true" @setTask="setTask"></home> <div class="router" v-if="!getLangIsShowMark">
<home ref="home" @setNewProject="()=>leftShow=true" @setTask="setTask"></home>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -341,6 +343,14 @@ export default defineComponent({
}, },
bathGenerationList:["poseTransfer","SERIES_DESIGN","toProduct","relight"] bathGenerationList:["poseTransfer","SERIES_DESIGN","toProduct","relight"]
}) })
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
})
const pastDuePage = computed(()=>{
const isAllowedRoute = route.path === '/home/events' || route.path === '/home/works';
const hasNoSystemAccess = userDetail.value.systemList.indexOf(1) === -1;
return hasNoSystemAccess && !isAllowedRoute;
})
watch(()=>homeMainData.userDetailLanguage,(newVal)=>{ watch(()=>homeMainData.userDetailLanguage,(newVal)=>{
if(locale.value == newVal || !newVal)return if(locale.value == newVal || !newVal)return
locale.value = newVal locale.value = newVal
@@ -413,9 +423,6 @@ export default defineComponent({
// homeMainData.historyData.page = 1 // homeMainData.historyData.page = 1
// }) // })
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
})
let isMurmur = ref() let isMurmur = ref()
let credits = computed(()=>{ let credits = computed(()=>{
return store.state.UserHabit.credits.value return store.state.UserHabit.credits.value
@@ -791,6 +798,7 @@ export default defineComponent({
t, t,
...toRefs(homeMainData), ...toRefs(homeMainData),
...toRefs(historyData), ...toRefs(historyData),
pastDuePage,
locale, locale,
isMurmur, isMurmur,
credits, credits,
@@ -953,9 +961,9 @@ export default defineComponent({
let url = 'https://aida-user-manual-chinese.super.site/' let url = 'https://aida-user-manual-chinese.super.site/'
if(this.locale == 'ENGLISH'){ if(this.locale == 'ENGLISH'){
url = 'https://code-create.com.hk/wp-content/uploads/2025/02/aida_3.0-Manual-2_5-EN.pdf' url = 'https://code-create.com.hk/wp-content/uploads/2025/02/aida_3.0-Manual-2_5-EN.pdf'
showViewVideo({url:'https://aida.com.hk/video/user_manual_3_1_0.mp4'}) showViewVideo({url:'https://aida.com.hk/video/AiDA_3_1_Demo_V2_EN.mp4'})
}else{ }else{
showViewVideo({url:'https://aida.com.hk/video/user_manual_3_1_0.mp4'}) showViewVideo({url:'https://aida.com.hk/video/AiDA_3_1_Demo_V2_CN.mp4'})
} }
this.toUserManual() this.toUserManual()
// //打开视频 // //打开视频
@@ -1778,26 +1786,32 @@ export default defineComponent({
} }
} }
> .router{ > .routerView{
flex: 1; position: relative;
overflow: hidden; overflow: hidden;
padding: 0 6rem; flex: 1;
padding-bottom: 2rem;
}
> .userSystem{
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index:2;
display: flex; display: flex;
justify-content: center; > .router{
align-items: center; flex: 1;
color: #fff; overflow: hidden;
font-weight: 600; padding: 0 6rem;
font-size: 4rem; padding-bottom: 2rem;
}
> .userSystem{
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-weight: 600;
font-size: 4rem;
z-index: 100;
}
} }
} }
} }

View File

@@ -357,7 +357,7 @@
</i> </i>
<i v-show="selectCode == 'Printboard' && scene?.value == 'Slogan'" :title="$t('Generate.sloganTitle')" @click.stop="setSlogan" class="fi fi-rr-poll-h"></i> <i v-show="selectCode == 'Printboard' && scene?.value == 'Slogan'" :title="$t('Generate.sloganTitle')" @click.stop="setSlogan" class="fi fi-rr-poll-h"></i>
<i v-show="!isTextarea" class="fi fi-br-expand" @click.stop="setTextareaShow"></i> <i v-show="!isTextarea" class="fi fi-br-expand" @click.stop="setTextareaShow"></i>
<i v-show="isTextarea" class="fi fi-bs-compress" @click.stop="setTextareaShow"></i> <i v-show="isTextarea" class="fi fi-bs-compress" style="z-index: 100;" @click.stop="setTextareaShow"></i>
</div> </div>
<div class="input_box_btnBox sketch" v-else> <div class="input_box_btnBox sketch" v-else>
<div class="upload_item" v-show="selectGenerateList.length > 0"> <div class="upload_item" v-show="selectGenerateList.length > 0">
@@ -857,7 +857,6 @@ export default defineComponent({
dataDom.createBrand.openAddBrand() dataDom.createBrand.openAddBrand()
} }
const editImg = (item:any,index:number)=>{ const editImg = (item:any,index:number)=>{
console.log(item)
pageData.editIndex = index pageData.editIndex = index
dataDom.modalCanvas.init(item,'') dataDom.modalCanvas.init(item,'')
// imgList // imgList
@@ -995,7 +994,7 @@ export default defineComponent({
label:'' label:''
} }
}else{ }else{
if(newVal.value == "Pattern"){ if(newVal.value == "Pattern" || this.selectCode == 'Sketchboard'){
this.speedData = this.speedList[1] this.speedData = this.speedList[1]
}else{ }else{
this.speedData = this.speedList[0] this.speedData = this.speedList[0]
@@ -1823,7 +1822,7 @@ export default defineComponent({
}else if(element.status == 'Fail' || element.status == 'Invalid'){ }else if(element.status == 'Fail' || element.status == 'Invalid'){
data = data.filter((item:any) => item !== element.taskId); data = data.filter((item:any) => item !== element.taskId);
this.generateList[str] = this.generateList[str].filter((item:any) => item.taskId !== element.taskId); this.generateList[str] = this.generateList[str].filter((item:any) => item.taskId !== element.taskId);
message.info(this.t('Generate.everyTimeEffectPoor')); // message.info(this.t('Generate.everyTimeEffectPoor'));
} }
}); });
if((data.length == 0)){ if((data.length == 0)){
@@ -1935,6 +1934,7 @@ export default defineComponent({
scaleImage.init(list,index) scaleImage.init(list,index)
}, },
onPaste(e:any){ onPaste(e:any){
if(this.selectGenerateList.length != 0)return
if(e.clipboardData.files[0] && !this.isTextarea && this.selectCode !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){ if(e.clipboardData.files[0] && !this.isTextarea && this.selectCode !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){
let param = new FormData(); let param = new FormData();
param.append('inPin','0') param.append('inPin','0')

View File

@@ -40,7 +40,7 @@
<div class="title"> <div class="title">
<i class="fi fi-br-angle-left" @click="loginBack"></i> <i class="fi fi-br-angle-left" @click="loginBack"></i>
<!-- <i class="fi fi-rr-arrow-left" @click="()=>loginType = ''"></i> --> <!-- <i class="fi fi-rr-arrow-left" @click="()=>loginType = ''"></i> -->
<span>Log on to AiDA</span> <span>Log on to AiDA 3.1</span>
</div> </div>
<div class="info" v-show="!loginType">Please fill your information below</div> <div class="info" v-show="!loginType">Please fill your information below</div>
<personal ref="personal" v-if="loginType == 'personal'" v-model:isMask="isMask"></personal> <personal ref="personal" v-if="loginType == 'personal'" v-model:isMask="isMask"></personal>