This commit is contained in:
X1627315083
2024-01-26 15:12:10 +08:00
parent 085349ae8b
commit 2ec8b12fbf
4 changed files with 262 additions and 42 deletions

View File

@@ -0,0 +1,182 @@
<template>
<!-- 生成collention缩略图用的 -->
<div class="export_new_collection_review">
<div class="img_block_item" v-if="allBoardData?.moodTemplateId">
<MoodTemplate :fileList="allBoardData?.moodboardFiles" :moodTemplateId="allBoardData?.moodTemplateId"></MoodTemplate>
</div>
<div class="img_block_item" v-else>
<div class="lager_img_item" v-for="(mood) in allBoardData.moodboardFiles" :key="mood">
<div class="all_img_item_block">
<img class="all_img_content cover_img" :src="mood.imgUrl" >
</div>
</div>
</div>
<div class="img_block_item">
<div class="small_img_item" v-for="(print) in allBoardData.printboardFiles" :key="print">
<div class="all_img_item_block">
<img class="all_img_content cover_img" :src="print.imgUrl">
</div>
</div>
<div class="small_img_item" v-for="(generate) in allBoardData.generatePrintFiles" :key="generate">
<div class="all_img_item_block">
<img class="all_img_content cover_img" :src="generate.imgUrl">
</div>
</div>
</div>
<div class="img_block_item">
<div class="color_item" v-for="(color) in allBoardData.colorBoards" :key="color">
<div class="color_content" :style="{background:`rgb(${color?.rgbValue?.r},${color?.rgbValue?.g},${color?.rgbValue?.b})`}"></div>
<div class="color_content_body">
<div class="color_des">{{color.tcx}}</div>
<div class="color_des">{{color.name}}</div>
</div>
</div>
</div>
<div class="img_block_item">
<div class="lager_img_item" v-for="(skecth) in allBoardData.skecthboardFiles" :key="skecth">
<div class="all_img_item_block">
<img class="all_img_content" :src="skecth.imgUrl">
</div>
</div>
</div>
<div class="img_block_item">
<div class="lager_img_item" v-for="(marketing) in allBoardData.marketingSketchFiles" :key="marketing">
<div class="all_img_item_block">
<img class="all_img_content" :src="marketing.imgUrl">
</div>
</div>
</div>
<!-- <div class="img_block_item">
<div class="lager_img_item" v-for="(design) in likeDesignCollectionList" :key="design.designItemUrl">
<div class="all_img_item_block">
<img class="all_img_content" :src="design.designItemUrl">
</div>
</div>
</div> -->
</div>
</template>
<script lang="ts">
import { computed, defineComponent } from 'vue'
import MoodTemplate from '@/component/HomePage/MoodTemplate.vue'
import { useStore } from "vuex";
export default defineComponent({
props: {
allBoardData: {
// default: false,
},
},
components:{MoodTemplate},
setup() {
const store = useStore();
// let allBoardData:any = computed(()=>{return store.state.UploadFilesModule.allBoardData})
// let likeDesignCollectionList : any = computed(()=>{return store.state.HomeStoreModule.likeDesignCollectionList})
return {
// allBoardData,
// likeDesignCollectionList,
}
}
})
</script>
<style lang="less" scoped>
.export_new_collection_review{
width: 40.8rem;
background: #fff;
position: fixed;
left: -100rem;
top: 0;
.img_block_item{
margin-bottom: 2rem;
// &.color_block_item{
// padding: 0 0.5rem 0 0.3rem;
// }
.lager_img_item{
display: inline-block;
width: 20.4rem;
height: 20.4rem;
vertical-align: top;
}
.sketch_img_item{
display: inline-block;
width: 20.4rem;
height: 42.2rem;
vertical-align: top;
}
.small_img_item{
width: 6.8rem;
height: 6.8rem;
display: inline-block;
vertical-align: top;
}
.color_item{
display: inline-block;
vertical-align: top;
// padding: 0 0.5rem;
margin-right: 1.6rem;
margin-bottom: 0.5rem;
&:nth-child(4n){
margin-right: 0;
}
}
.color_content{
width: 9rem;
height:6.2rem
}
.color_content_body{
width: 9rem;
padding: 0.7rem 0.2rem;
background: #FEFEFE;
border: 1px solid #E6E6E6;
.color_des{
font-size: 1rem;
font-family: Roboto;
font-weight: 500;
color: #000000;
margin-bottom: 0.5rem;
line-height: 1.3rem;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
&:last-child{
margin-bottom: 0;
}
}
}
.all_img_item_block{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
.all_img_content{
max-height: 100%;
max-width: 100%;
&.cover_img{
width: 100%;
height: 100%;
}
}
}
}
}
</style>

View File

@@ -42,7 +42,7 @@ export default {
},
HomeView:{
GetStarted:'开始设计',
Start:'重新开始',
Start:'开始',
Edit:'编辑',
Design:'设计',
Redesign:'重新设计',
@@ -52,7 +52,7 @@ export default {
moodboard:"情绪板",
printboard:"印刷板",
colorboard:"调色板",
sketchboard:"素描板",
sketchboard:"线稿板",
mannequins:"人体模型",
masnnequinHint:"您使用的模特与当前的衣服不匹配,这将导致生成的模型不使用所选的衣服",
jsContent1:'您必须选择一种或多种颜色进行下一步。',
@@ -289,7 +289,7 @@ export default {
Moodboard:'情绪板',
Printboard:'印花板',
Colorboard:'颜色板',
Sketchboard:'服装板块',
Sketchboard:'线稿板块',
MoodCollection:'为您的系列选择情绪版',
PrinCollection:'为您的系列选择印花版',
ColorCollection:'为您的系列选择颜色版',

View File

@@ -35,7 +35,7 @@
<div class="operate_list" v-if="column?.Operations">
<div class="operate_item" @click="turnToDetail(record)">{{ $t('HistoryPage.Detail') }}</div>
<!-- <div class="operate_item" @click="renameCollection(record,index)">{{ $t('HistoryPage.Rename') }}</div> -->
<div class="operate_item" @click="exportCanvas(record)">{{ $t('HomeView.Export') }}</div>
<div class="operate_item" @click="setExport(record)">{{ $t('HomeView.Export') }}</div>
<div class="operate_item" @click="deleteGroup(record, index)">{{ $t('HistoryPage.Delete') }}</div>
</div>
</template>
@@ -64,9 +64,10 @@
</a-modal> -->
<RobotAssist></RobotAssist>
</div>
<OldExportNewCoolection id="oldExportNewCoolection" allBoardData="allBoardData"></OldExportNewCoolection>
</template>
<script lang="ts">
import { defineComponent,ref,createVNode,computed} from 'vue'
import { defineComponent,ref,createVNode,computed, nextTick} from 'vue'
import HeaderComponent from "@/component/HomePage/Header.vue";
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
import { Https } from "@/tool/https";
@@ -80,12 +81,15 @@ import html2canvas from "html2canvas";
import { useStore } from "vuex";
import { useI18n } from 'vue-i18n';
import { getCookie } from "@/tool/cookie";
import OldExportNewCoolection from "@/component/HomePage/OldExportNewCoolection.vue";
const FileSaver = require("file-saver");
export default defineComponent({
components: {
HeaderComponent,
HistoryDetail,
RobotAssist
RobotAssist,
OldExportNewCoolection
},
setup() {
let rangePickerValue:any = ref([])
@@ -113,6 +117,7 @@ export default defineComponent({
let collectionList:any = ref([])
let {t} = useI18n()
let userInfo:any = ref()
let allBoardData:any = ref({})
return {
rangePickerValue,
columns,
@@ -121,6 +126,7 @@ export default defineComponent({
t,
store,
userInfo,
allBoardData,
}
},
data(){
@@ -177,10 +183,9 @@ export default defineComponent({
endDate:endDate,
userId:83,
}
Https.axiosPost('http://192.168.1.9:5566/api/history/queryUserGroup', data).then(
Https.axiosPost('https://old.api.aida.com.hk/api/history/queryUserGroup', data).then(
(rv: any) => {
console.log(rv);
this.collectionList = rv.content
this.total = rv.total
}
@@ -212,45 +217,78 @@ export default defineComponent({
}
});
},
dealViewChooseData(data:any){
if(!data){
return []
}
let filesList = data.map((v:any)=>{
let newData:any = {
imgUrl:v.url,
id:v.id,
status:'done',
resData:v,
}
if(v.level1Type === 'Sketchboard'){
newData.pin = v.isPin
newData.category = v.level2Type
}
if(v.level1Type === 'Printboard'){
newData.pin = v.isPin
}
return newData
})
return filesList
},
//修改名字
// renameCollection(record:any,index:number){
// this.renameVisivle = true
// this.renameData = {
// ...record,
// index:index
// }
// },
//确定修改名字
// confrimRename(){
// let data = {
// timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
// userGroupId: this.renameData.id,
// userGroupName: this.newCollectionName
// }
// Https.axiosPost(Https.httpUrls.updateUserGroupName,data).then(
// (rv: any) => {
// message.success(this.t('HistoryPage.jsContent3'))
// this.collectionList[this.renameData.index].name = this.newCollectionName
// this.collectionList[this.renameData.index].updateDate = rv.updateDate
// this.renameVisivle = false
// this.newCollectionName = ''
// this.renameData = {}
// }
// );
// },
exportCanvas(recold:any){
console.log(recold);
return
let url = Https.httpUrls.historyChoose + `?userGroupId=${recold.id}`
dealHistoryChooseData(data:any,type:any){
let collectionData = {
moodboardFiles:this.dealViewChooseData(data.collection.moodBoards),
printboardFiles:this.dealViewChooseData(data.collection.printBoards),
generatePrintFiles:[],
colorBoards:this.dealViewChooseColor(data.collection.colorBoards),
skecthboardFiles:this.dealViewChooseData(data.collection.sketchBoards),
marketingSketchFiles:this.dealViewChooseData(data.collection.marketingSketchs),
moodTemplateId:data.collection.moodTemplateId
}
this.allBoardData = collectionData
// if(type === 'normal'){
// let likeDesignCollectionList = data.userLikeDetails.map((v:any)=>{
// let data = {
// ...v,
// groupDetailId:v.id,
// designItemUrl:v.url,
// }
// return data
// })
// }
},
dealViewChooseColor(data:any){
let colorList = data.map((v:any)=>{
let rgbValue = v.rgbValue.split(' ')
let newData:any = {
id:v.id,
name:v.name,
tcx:v.tcx || '',
rgbValue:{r:rgbValue[0],g:rgbValue[1],b:rgbValue[2],a:1}
}
return newData
})
return colorList
},
setExport(recold:any){
let url = 'https://old.api.aida.com.hk/api/history/choose' + `?userGroupId=${recold.id}`
Https.axiosGet(url).then(
(rv: any) => {
// this.dealHistoryChooseData(rv,type)
this.dealHistoryChooseData(rv,'')
nextTick().then(()=>{
this.exportCanvas()
})
}
).catch(rv=>{
});
let collectionReview:any = document.querySelector("#exportNewCoolection")
},
exportCanvas(){
let collectionReview:any = document.querySelector("#oldExportNewCoolection")
let a = document.createElement('a');
this.isShowMark = true
html2canvas(collectionReview,{useCORS:true,scale:3}).then((canvas) => {

View File

@@ -30,7 +30,7 @@ module.exports = defineConfig({
}
},
'/oldsis':{
target:'http://192.168.1.9:5566',
target:'https://old.api.aida.com.hk',
changeOrigin:true,
pathRewrite:{
'^/oldsis': 'api', // api替换成api