语言适配

This commit is contained in:
X1627315083
2024-07-03 17:32:06 +08:00
parent b08a0f85ad
commit 3fd6343e53
17 changed files with 219 additions and 81 deletions

View File

@@ -104,6 +104,7 @@
</div>
<div class="upload_file_item_scale">
<a-upload
:title="$t('ColorboardUpload.uploadTitle')"
:capture="null"
:max-count="1"
list-type="picture-card"
@@ -116,7 +117,7 @@
<i class="fi fi-br-upload"></i>
</div>
</a-upload>
<div class="upload_file_item" @click="setPrintImg()">
<div :title="$t('ColorboardUpload.selectTitle')" class="upload_file_item" @click="setPrintImg()">
<i class="fi fi-rr-picture"></i>
</div>
</div>
@@ -130,7 +131,7 @@
<img src="#" :title="pantongNameList[index]">
</div>
</div>
<div class="upload_color_btn" v-show="selectColorList.length>0">
<div class="upload_color_btn" :title="isSelectSuccessively?$t('ColorboardUpload.SelectSuccessivelyOnTitle'):$t('ColorboardUpload.SelectSuccessivelyOffTitle')" v-show="selectColorList.length>0">
<span>{{$t('ColorboardUpload.SelectSuccessively')}}</span>
<a-switch :checked="isSelectSuccessively" @click="()=>isSelectSuccessively = !isSelectSuccessively" checked-children="ON" un-checked-children="OFF"/>
</div>

View File

@@ -376,7 +376,7 @@ export default defineComponent({
likeDesignCollectionList;
allBoardData.value[productData.key] = productData.imgList;
nextTick().then(async () => {
let exportCanvasBoxCanvas = document.querySelector('.exportCanvasBox_center')
let exportCanvasBoxCanvas = document.querySelector('.Export .exportCanvasBox_center')
canvasWH.value.width = exportCanvasBoxCanvas.offsetWidth - 10
let canvasBox = document.querySelector(
@@ -647,25 +647,33 @@ export default defineComponent({
// data
let imgId = 0
let minioUrl = ''//表示收藏或者generate
if(key == 'likeDesignCollectionList'){
imgId = data.designOutfitId
minioUrl = data.url
}else if(key == 'upImgFiles'){
imgId = data
minioUrl = data.url
}else if(key == 'FinalizeImage'){
imgId = data.id
let url = data.imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/);
minioUrl = match[2]
}else if(key == 'disposeMoodboard'){
let url = data.imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/);
minioUrl = match[2]
// data.imgUrl
}else{
minioUrl = data.minIOPath?data.minIOPath:data.resData.minIOPath
// if(key == 'likeDesignCollectionList'){
// imgId = data.designOutfitId
// minioUrl = data.url
// }else if(key == 'upImgFiles'){
// imgId = data
// minioUrl = data.url
// }else if(key == 'FinalizeImage'){
// imgId = data.id
// let url = data.imgUrl.split('?')[0]
// var match = url.match(/:(\d+)\/(.*)/);
// minioUrl = match[2]
// }else if(key == 'disposeMoodboard'){
// let url = data.imgUrl.split('?')[0]
// var match = url.match(/:(\d+)\/(.*)/);
// minioUrl = match[2]
// // data.imgUrl
// }else{
// minioUrl = data.minIOPath?data.minIOPath:data.resData.minIOPath
// }
let imgUrl = data.imgUrl
if (key == "likeDesignCollectionList") {
imgUrl = data.designOutfitUrl;
}
console.log(data);
let url = imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/);
minioUrl = match[2]
// let id =
let proportion = img.height / img.width; //计算图形宽高比例
let imgWidth = setImageWidth(key)
@@ -830,6 +838,7 @@ export default defineComponent({
centered:true,
onOk() {
showUpgradePlan.value = false;
canvas.dispose();
position = {
//设置每个图形位置的初始值
x: 0,

View File

@@ -55,7 +55,7 @@
@keydown.enter="getgenerate()"
@click="inputFocus()"
/>
<i class="fi fi-br-upload" v-show="!isTextarea && upload.level1Type !== 'Moodboard' && scene?.value != 'Slogan' && scene?.value != 'Logo'">
<i class="fi fi-br-upload" :title="$t('Generate.uploadTitle')" v-show="!isTextarea && upload.level1Type !== 'Moodboard' && scene?.value != 'Slogan' && scene?.value != 'Logo'">
<a-upload
class="search_upImg"
:capture="null"
@@ -73,7 +73,7 @@
>
</a-upload>
</i>
<i v-show="scene?.value == 'Slogan'" @click.stop="setSlogan" class="fi fi-rr-poll-h"></i>
<i v-show="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-bs-compress" @click.stop="setTextareaShow"></i>
</div>
@@ -171,7 +171,7 @@
<script lang="ts">
import { LoadingOutlined } from "@ant-design/icons-vue";
import { message, Upload, Modal } from "ant-design-vue";
import { defineComponent, computed, createVNode, h, ref, nextTick, inject } from "vue";
import { defineComponent, computed, createVNode, h, ref,watch, nextTick, inject } from "vue";
import { Https } from "@/tool/https";
import { useStore } from "vuex";
import GO from "@/tool/GO";
@@ -605,8 +605,10 @@ export default defineComponent({
str = ','
}
if(this.upload.level1Type == "Moodboard"){
this.styleRecommend.push(value)
this.styleRecommend = [...new Set(this.styleRecommend)]
if(this.workspace?.allKeywordsByStyle['Printboard'].indexOf(value) == -1){
this.styleRecommend.push(value)
this.styleRecommend = [...new Set(this.styleRecommend)]
}
}
this.searchPictureName += str + value
},

View File

@@ -30,7 +30,14 @@
<div v-show="openClick == 3" class="generalMenu_printModel printMenu">
<div @click.stop="openPrintModel">{{ scene.name }} <i class="icon iconfont icon-xiala" :class="{forbidden:openMenu}"></i></div>
<ul v-show="openMenu">
<li v-for="item,index in printCatecoryList" class="printModel_item" @click.stop="setSceneList(item)">{{ item.name }}</li>
<li
v-for="item,index in printCatecoryList"
class="printModel_item"
@click.stop="setSceneList(item)"
:title="item.value == 'Pattern'?$t('PrintboardUpload.PatternTitle'):
item.value == 'Logo'?$t('PrintboardUpload.LogoTitle'):
item.value == 'Slogan'?$t('PrintboardUpload.SloganTitle'):''"
>{{ item.name }}</li>
</ul>
</div>
</div>

View File

@@ -196,6 +196,9 @@ export default defineComponent({
let sketchCatecoryList:any = computed(()=>{
return store.state.Workspace.workspacePosition
})
let sketchCatecoryAllList:any = computed(()=>{
return store.state.Workspace.workspaceAllPosition
})
let workspace:any = ref({})
let sketchboardList:any = computed(()=>{
return store.state.UploadFilesModule.sketchboard
@@ -216,6 +219,7 @@ export default defineComponent({
openClick,
store,
sketchCatecoryList,
sketchCatecoryAllList,
workspace,
sketchboardList,
t,
@@ -512,7 +516,7 @@ export default defineComponent({
}
arr.forEach((v:any)=>{
v.pin = v.pin == 1?true:false
this.sketchCatecoryList.forEach((item:any) => {
this.sketchCatecoryAllList.forEach((item:any) => {
if(v.level2Type == item.value){
v.category=item.name
v.categoryValue=item.value

View File

@@ -90,11 +90,11 @@
<div v-show="modeOfPayment == 'alipay'" class="UpgradePlan_payAffirm_content_detail">
<label>
<input name="location" type="radio" value="ALIPAYHK" v-model="modeOfPaymentDetail">
<span>HK</span>
<span>Hong Kong</span>
</label>
<label>
<input name="location" type="radio" value="ALIPAYCN" v-model="modeOfPaymentDetail">
<span>大陆</span>
<span>Mainland China</span>
</label>
</div>
</label>

View File

@@ -385,6 +385,7 @@ export default defineComponent({
cancelDsign(){
canvas.dispose();
this.showPayOrder = false
}
},

View File

@@ -181,7 +181,7 @@
<div class="productImg_right_item_scale iconLeft" @click.stop="setScaleImage(likeList,index,false)">
<i class="fi fi-bs-expand-arrows-alt"></i>
</div>
<div class="productImg_right_item_menu iconLeft" @click.stop="setMenuShow(item)">
<div class="productImg_right_item_menu iconLeft" :title="$t('ProductImg.moreTitle')" @click.stop="setMenuShow(item)">
<i class="fi fi-rr-circle-ellipsis"></i>
<ul v-show="item.menuShow">
<li v-for="menuItem,index in productimgMenuList" v-show="index != 0" @click.stop="setMenu(menuItem,item)" :key="menuItem.value">{{ menuItem.label }}</li>
@@ -198,6 +198,8 @@
:productData="{
upload:upload,
similarity:similarity,
RelightDirection:RelightDirection,
RelightDirectionList:RelightDirectionList,
}"
:isProductimg="true"></scaleImage>
</a-modal>
@@ -562,7 +564,8 @@ export default defineComponent({
arr.forEach((item:any)=>{
item.imgUrl = item.url
})
scaleImage.value.isProductimg = isLike
// scaleImage.value.isProductimg = isLike
scaleImage.value.isProductimg = false
scaleImage.value.init(arr,index)
scaleImage.value.isLike = false
scaleImage.value.isComparison = true

View File

@@ -58,6 +58,20 @@
</a-slider>
<input type="number" readonly v-model="productimgSimilarity">
</div>
<div v-show="scaleImageList[scaleImageIndex]?.resultType == 'Relight'" class="productImg_content_item_title productImg_content_item_title_similarity">
<span>{{$t('ProductImg.RelightDirection')}}</span>
</div>
<div v-show="scaleImageList[scaleImageIndex]?.resultType == 'Relight'" class="productImg_content_item_Direction">
<!-- <a-slider class="system_silder"
v-model:value="similarity"
@afterChange="setSimilarity"
:tooltipVisible="false"
:step="5"
>
</a-slider> -->
<a-select style="width: 100%;" v-model:value="productimgRelightDirection" :options="productimgRelightDirectionList"></a-select>
</div>
<div class="productImg_content_item_generate_btn input_border">
<div class="input_box">
<div v-show="!productimgIsProductimg" class="generage_btn started_btn" @click.stop="getPrductimg">
@@ -140,6 +154,8 @@ export default defineComponent({
productimgIsProductimg:false,
productimgSimilarity:props.productData.similarity,
productimgUpload:props.productData.upload,
productimgRelightDirection:props.productData.RelightDirection,
productimgRelightDirectionList:props.productData.RelightDirectionList,
})
let scaleImage: any = ref(false);
let isShowMark = ref(false)