Merge remote-tracking branch 'origin/develop' into dev_vite

This commit is contained in:
X1627315083
2025-06-20 11:40:00 +08:00
21 changed files with 3154 additions and 3171 deletions

View File

@@ -1943,7 +1943,7 @@ textarea:focus {
.accountEdit_page .input_border .input_box_btnBox.sketch .upload_item, .accountEdit_page .input_border .input_box_btnBox.sketch .upload_item,
.generalMenu_printModel_upload .input_border .input_box_btnBox.sketch .upload_item, .generalMenu_printModel_upload .input_border .input_box_btnBox.sketch .upload_item,
.generate .input_border .input_box_btnBox.sketch .upload_item { .generate .input_border .input_box_btnBox.sketch .upload_item {
width: 6rem; width: 8rem;
} }
.collection_modal_body .input_border .input_box_btnBox.sketch .upload_item .upload_file_item, .collection_modal_body .input_border .input_box_btnBox.sketch .upload_item .upload_file_item,
.design_detail_modal_component .input_border .input_box_btnBox.sketch .upload_item .upload_file_item, .design_detail_modal_component .input_border .input_box_btnBox.sketch .upload_item .upload_file_item,
@@ -1954,8 +1954,8 @@ textarea:focus {
.accountEdit_page .input_border .input_box_btnBox.sketch .upload_item .upload_file_item, .accountEdit_page .input_border .input_box_btnBox.sketch .upload_item .upload_file_item,
.generalMenu_printModel_upload .input_border .input_box_btnBox.sketch .upload_item .upload_file_item, .generalMenu_printModel_upload .input_border .input_box_btnBox.sketch .upload_item .upload_file_item,
.generate .input_border .input_box_btnBox.sketch .upload_item .upload_file_item { .generate .input_border .input_box_btnBox.sketch .upload_item .upload_file_item {
height: 6rem; height: 8rem;
width: 6rem; width: 8rem;
} }
.collection_modal_body .input_border .input_box_btnBox > .textarea, .collection_modal_body .input_border .input_box_btnBox > .textarea,
.design_detail_modal_component .input_border .input_box_btnBox > .textarea, .design_detail_modal_component .input_border .input_box_btnBox > .textarea,
@@ -2248,9 +2248,11 @@ textarea:focus {
margin-left: 2rem; margin-left: 2rem;
display: flex; display: flex;
font-size: 1.6rem; font-size: 1.6rem;
padding: 1rem 2rem;
box-sizing: content-box; box-sizing: content-box;
justify-content: center; justify-content: center;
padding: 0 2rem;
line-height: 5.4rem;
height: 5.4rem;
} }
.generage_btn_box .generage_btn { .generage_btn_box .generage_btn {
width: 10rem; width: 10rem;

View File

@@ -2004,10 +2004,10 @@ textarea:focus{
border: none; border: none;
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
.upload_item{ .upload_item{
width: 6rem; width: 8rem;
.upload_file_item{ .upload_file_item{
height: 6rem; height: 8rem;
width: 6rem; width: 8rem;
} }
} }
} }
@@ -2171,9 +2171,11 @@ textarea:focus{
margin-left: 2rem; margin-left: 2rem;
display: flex; display: flex;
font-size: 1.6rem; font-size: 1.6rem;
padding: 1rem 2rem;
box-sizing: content-box; box-sizing: content-box;
justify-content: center; justify-content: center;
padding: 0 2rem;
line-height: 5.4rem;
height: 5.4rem;
} }
.generage_btn{ .generage_btn{
width: 10rem; width: 10rem;

View File

@@ -273,6 +273,8 @@ export default defineComponent({
border: 2px solid #000; border: 2px solid #000;
} }
>.box{ >.box{
width: 100%;
height: 100%;
> .background{ > .background{
flex: 1; flex: 1;
height: 7rem; height: 7rem;

View File

@@ -131,13 +131,18 @@
<div class="generage_btn_box"> <div class="generage_btn_box">
<div class="generage_btn started_btn" v-show="!isGenerate"> <div class="generage_btn started_btn" v-show="!isGenerate">
<i class="fi fi-bs-magic-wand" style="background-color: #000; font-size: 2.3rem; flex: 1;margin: 0;" @click="getgenerate()"></i> <i class="fi fi-bs-magic-wand" style="background-color: #000; font-size: 2.3rem; flex: 1;margin: 0;" @click="getgenerate()"></i>
<div class="icon iconfont icon-xiala" :class="{active:speedState}" @click.stop="openSpeed"></div> <div class="icon iconfont icon-xiala"
v-show="(type_.type2 == 'Sketchboard') ||
(type_.type2 == 'Printboard' && scene.value == 'Pattern') || type_.type2 == 'Moodboard'" :class="{active:speedState}" @click.stop="openSpeed"></div>
<div class="content" v-show="speedState && scene?.value != 'extract'"> <div class="content" v-show="speedState && scene?.value != 'extract'">
<div v-for="item in speedList" v-show="(type_.type2 == 'Moodboard' && item?.value != 'flux') || (type_.type2 == 'Sketchboard' && item?.value != 'flux') || type_.type2 == 'Printboard'" :key="item.value" :class="{active:item.value == speedData.value}" @click="setSpeed(item)" :title="item.title">{{ item.label }}</div> <div v-for="item in speedList"
v-show="(type_.type2 == 'Moodboard' && item?.value != 'flux') ||
(type_.type2 == 'Sketchboard' && item?.value != 'flux') ||
(type_.type2 == 'Printboard')"
:key="item.value" :class="{active:item.value == speedData.value}" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div>
</div> </div>
<div class="content" v-show="speedState && scene?.value == 'extract'"> <div class="content" v-show="speedState && scene?.value == 'extract'">
<div v-for="item in extractList" :key="item.value" :class="{active:item.value == speedData.value}" @click="setSpeed(item)" :title="item.title">{{ item.label }}</div> <div v-for="item in extractList" :key="item.value" :class="{active:item.value == speedData.value}" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div>
</div> </div>
</div> </div>
<div class="generage_btn started_btn" v-show="isGenerate && !remGenerate"> <div class="generage_btn started_btn" v-show="isGenerate && !remGenerate">
@@ -296,10 +301,6 @@ export default defineComponent({
], ],
extractList:[ extractList:[
{ {
title:'This method may produce slight discrepancies between the extracted line art and the original image.',
label:'High',
value:'',
},{
title:'Note: The extracted line art might have minor variations from the original.', title:'Note: The extracted line art might have minor variations from the original.',
label:'FLUX', label:'FLUX',
value:'flux', value:'flux',
@@ -323,13 +324,17 @@ export default defineComponent({
watch(()=>props.scene,(newVal,oldVal)=>{ watch(()=>props.scene,(newVal,oldVal)=>{
if(newVal.value == 'extract'){ if(newVal.value == 'extract'){
speed.speedData = speed.extractList[0] speed.speedData = speed.extractList[0]
}else if(newVal.value == 'Logo' || newVal.value == 'Slogan'){
speed.speedData.value = ''
speed.speedData.label = ''
}else{ }else{
speed.speedData = speed.speedList[0] speed.speedData = speed.speedList[0]
} }
speed.speedState = false
}) })
const setSpeed = (item:any)=>{ const setSpeed = (item:any)=>{
speed.speedData = item
speed.speedState = false speed.speedState = false
speed.speedData = item
} }
return { return {
userDetail, userDetail,

View File

@@ -31,7 +31,7 @@
</div> </div>
<div class="selectImgList_content_bottom"> <div class="selectImgList_content_bottom">
<div class="content_bottom_item" v-for="item in imgList" @click="setItemSelect(item)"> <div class="content_bottom_item" v-for="item in imgList" @click="setItemSelect(item)">
<img :src="item.imgUrl" alt="" :class="{active:item.isChecked}"> <img :src="item?.imgUrl || item?.url" alt="" :class="{active:item.isChecked}">
</div> </div>
</div> </div>
<div class="selectImgList_ok"> <div class="selectImgList_ok">

View File

@@ -55,7 +55,7 @@
<input type="text" v-model="renameText"> <input type="text" v-model="renameText">
<i class="fi fi-br-check" @click="submitRename(row)"></i> <i class="fi fi-br-check" @click="submitRename(row)"></i>
</div> </div>
<div v-else> <div v-else style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">
{{header?.fun?header.fun(row[header.value]) : row[header.value]}} {{header?.fun?header.fun(row[header.value]) : row[header.value]}}
</div> </div>
</div> </div>
@@ -193,23 +193,25 @@ export default defineComponent({
},{ },{
name:'Quantity generated', name:'Quantity generated',
value:'nums', value:'nums',
},{ },
{
name:'Creation time', name:'Creation time',
value:'updateTime', value:'createTime',
fun:(value:any)=>{ fun:(value:any)=>{
if(!value)return if(!value)return
return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0] return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0]
} }
},{ },
{
name:'Start time', name:'Start time',
value:'updateTime', value:'startTime',
fun:(value:any)=>{ fun:(value:any)=>{
//没开始内容为 - //没开始内容为 -
if(!value)return if(!value)return
return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0] return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0]
} }
},{ },{
name:'End time', name:'Update time',
value:'updateTime', value:'updateTime',
fun:(value:any)=>{ fun:(value:any)=>{
if(!value)return if(!value)return
@@ -360,14 +362,14 @@ export default defineComponent({
},1000) },1000)
} }
const submitGetContentList = (project:any)=>{ const submitGetContentList = (project:any)=>{
data.isGetContentList = true // data.isGetContentList = true
if(project){ // if(project){
data.projectData = project // data.projectData = project
}else{ // }else{
data.projectData = null // data.projectData = null
} // }
data.currentPage = 1 // data.currentPage = 1
getContentList() // getContentList()
if(data.settingGetHistory)data.settingGetHistory() if(data.settingGetHistory)data.settingGetHistory()
} }
const handleChange = (event:any,value:any)=>{ const handleChange = (event:any,value:any)=>{

View File

@@ -9,7 +9,7 @@
<div class="chatBox"> <div class="chatBox">
<div class="chattingRecords" v-show="chatList.length > 0 && isChattingRecords"> <div class="chattingRecords" v-show="chatList.length > 0 && isChattingRecords">
<div class="itemBox" ref="chatBox"> <div class="itemBox" ref="chatBox">
<div class="item" v-for="item in chatList" :class="{user:item.role == 'user'}"> <div class="item" v-for="item,index in chatList" :class="{user:item.role == 'user'}">
<div class="textBox"> <div class="textBox">
<div class="icon"> <div class="icon">
<img src="@/assets/images/icon/favicon.png" alt=""> <img src="@/assets/images/icon/favicon.png" alt="">
@@ -29,7 +29,11 @@
</div> </div>
</div> </div>
<div class="imgBox"> <div class="imgBox">
<img v-if="item.content?.img?.length > 0" v-for="imgItem in item.content?.img" :src="imgItem.minioUrl" alt=""> <!-- <span v-show="item.content?.img?.length > 0">
{{ item.content?.img }}
</span> -->
<img v-if="item.content?.img?.length > 0" v-for="imgItem,imgIndex in item.content?.img" :src="imgItem.minioUrl" alt="" @error="imgError(imgItem,index,imgIndex,$event)">
</div> </div>
<div class="colorBox"> <div class="colorBox">
<div v-if="item.content?.color?.length > 0" class="item" v-for="colorItem in item.content?.color"> <div v-if="item.content?.color?.length > 0" class="item" v-for="colorItem in item.content?.color">
@@ -76,6 +80,7 @@
import { defineComponent,computed,ref,inject,nextTick,createVNode,toRefs, reactive, watch} from 'vue' import { defineComponent,computed,ref,inject,nextTick,createVNode,toRefs, reactive, watch} from 'vue'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Https } from "@/tool/https"; import { Https } from "@/tool/https";
import {getMinioUrl} from '@/tool/util'
import { useStore } from "vuex"; import { useStore } from "vuex";
import { Modal,message,Upload,CascaderProps } from 'ant-design-vue'; import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
@@ -157,7 +162,7 @@ export default defineComponent({
}else if(eventData.type == 'think'){ }else if(eventData.type == 'think'){
data.chatList[data.chatList.length-1].content.think+=eventData.content data.chatList[data.chatList.length-1].content.think+=eventData.content
}else if(eventData.type == "tools_response"){ }else if(eventData.type == "tools_response"){
let nameList = ['moodboard','printboard','sketchboard','generate_color_code'] let nameList = ['moodboard','printboard','sketchboard','generate_color_code','search_sketch_img']
let nameData = { let nameData = {
moodboard:'moodBoard', moodboard:'moodBoard',
printboard:'printBoard', printboard:'printBoard',
@@ -171,14 +176,17 @@ export default defineComponent({
getData = 'colorBoard' getData = 'colorBoard'
}else{ }else{
data.chatList[data.chatList.length-1].content.img = JSON.parse(JSON.parse(event.data).content).receiveCollectionElementList data.chatList[data.chatList.length-1].content.img = JSON.parse(JSON.parse(event.data).content).receiveCollectionElementList
if(eventData.tools_name == 'search_sketch_img'){
getData = 'sketchBoard'
}else{
getData = nameData[eventData.tools_name] getData = nameData[eventData.tools_name]
} }
}
data.chatList.push({content:{message:''},role:'system'}) data.chatList.push({content:{message:''},role:'system'})
}else if(eventData.tools_name == 'design_control_signal'){ }else if(eventData.tools_name == 'design_control_signal'){
emit('chatChange',{type:eventData.tools_name,design:true}) emit('chatChange',{type:eventData.tools_name,design:true})
} }
emit('chatChange',{type:eventData.type,module:getData}) emit('chatChange',{type:eventData.type,module:getData})
} }
//emit('chatChange',{type:JSON.parse(event.data).status}) //emit('chatChange',{type:JSON.parse(event.data).status})
}; };
@@ -306,6 +314,19 @@ export default defineComponent({
const deleteFile = (item:any,index:number)=>{ const deleteFile = (item:any,index:number)=>{
data.filList.splice(index,1) data.filList.splice(index,1)
} }
const imgError = (item:any,index:number,imgIndex:number,event:any)=>{
if(!item?.loadNum) item.loadNum = 0
if(item?.loadNum >= 1)return
let value = {
path:getMinioUrl(item.minioUrl)
}
Https.axiosGet(Https.httpUrls.refreshMinioUrl,{params:value}).then((rv:any)=>{
event.target.src = rv
item.loadNum += 1
data.chatList[index].content.img[imgIndex].monioUrl = rv
})
}
return{ return{
...toRefs(dataDom), ...toRefs(dataDom),
...toRefs(data), ...toRefs(data),
@@ -314,6 +335,7 @@ export default defineComponent({
openChattingRecords, openChattingRecords,
handleFileUpload, handleFileUpload,
deleteFile, deleteFile,
imgError,
} }
}, },
provide() { provide() {

View File

@@ -94,7 +94,7 @@ export default defineComponent({
openType:'', openType:'',
collectionStep:1, collectionStep:1,
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目 selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
createProbject:inject('createProbject') as any createProbject:inject('createProbject',()=>{}) as any
}) })
let driver__:any = computed(()=>{ let driver__:any = computed(()=>{

View File

@@ -806,8 +806,18 @@ export default defineComponent({
this.setColorboardList(colorList) this.setColorboardList(colorList)
}, },
setPrintImg(){ setPrintImg(){
let printImgListData = JSON.parse(JSON.stringify(this.store?.state?.UploadFilesModule.printboard)) let printImgListData = []
let moodImgListData = JSON.parse(JSON.stringify(this.store?.state?.UploadFilesModule.moodboard)) if(this.store?.state?.UploadFilesModule.printboard == 0){
printImgListData = JSON.parse(JSON.stringify(this.store?.state?.UploadFilesModule.allBoardData.printboardFiles))
}else{
printImgListData = JSON.parse(JSON.stringify(this.store?.state?.UploadFilesModule.printboard))
}
let moodImgListData = []
if(this.store?.state?.UploadFilesModule.printboard == 0){
moodImgListData = JSON.parse(JSON.stringify(this.store?.state?.UploadFilesModule.allBoardData.moodboardFiles))
}else{
moodImgListData = JSON.parse(JSON.stringify(this.store?.state?.UploadFilesModule.moodboard))
}
let imgListData = [...moodImgListData,...printImgListData] let imgListData = [...moodImgListData,...printImgListData]
if(imgListData?.length==0){ if(imgListData?.length==0){
message.info(this.t('ColorboardUpload.jsContent6')) message.info(this.t('ColorboardUpload.jsContent6'))
@@ -821,7 +831,7 @@ export default defineComponent({
setImgGetColor(data){ setImgGetColor(data){
data.status = 'await' data.status = 'await'
this.fileList[0] = data this.fileList[0] = data
fetch(data.imgUrl) fetch(data.imgUrl || data.url)
.then(response => response.blob()) .then(response => response.blob())
.then(blob => { .then(blob => {
const reader = new FileReader(); const reader = new FileReader();

View File

@@ -506,7 +506,8 @@ setup(props:any,{emit}) {
status:productimg.generateSuccess.status, status:productimg.generateSuccess.status,
listType:productimg.generateSuccess.listType, listType:productimg.generateSuccess.listType,
isIndex:productimg.generateSuccess.isIndex, isIndex:productimg.generateSuccess.isIndex,
userLikeSortId:productimg.generateSuccess.userLikeSortId userLikeSortId:productimg.generateSuccess.userLikeSortId,
parentId:productimg.generateSuccess.parentId
} }
emit('addGenerateImg',data) emit('addGenerateImg',data)
@@ -588,14 +589,16 @@ methods: {
} }
// this. // this.
console.log(list[index])
this.generateSuccess.userLikeSortId = list[index].userLikeSortId this.generateSuccess.userLikeSortId = list[index].userLikeSortId
this.generateSuccess.parentId = list[index].parentId
this.generateSuccess.productimgIsProductimg = !!this.generateSuccess.productimgIsProductimg this.generateSuccess.productimgIsProductimg = !!this.generateSuccess.productimgIsProductimg
this.generateSuccess.productimgRemProductimg = !!this.generateSuccess.productimgRemProductimg this.generateSuccess.productimgRemProductimg = !!this.generateSuccess.productimgRemProductimg
this.generateSuccess.isShowMark = !!this.generateSuccess.isShowMark this.generateSuccess.isShowMark = !!this.generateSuccess.isShowMark
this.generateSuccess.remPrductimgTime = this.generateSuccess.remPrductimgTime?this.generateSuccess.remPrductimgTime:null this.generateSuccess.remPrductimgTime = this.generateSuccess.remPrductimgTime?this.generateSuccess.remPrductimgTime:null
this.generateSuccess.prductimgTime = this.generateSuccess.prductimgTime?this.generateSuccess.prductimgTime:null this.generateSuccess.prductimgTime = this.generateSuccess.prductimgTime?this.generateSuccess.prductimgTime:null
this.scaleImage = true this.scaleImage = true
if(this.poseList.length == 0){ if(this.poseList.length == 0 && list[index].type == 'PoseTransfer'){
this.getPoseList() this.getPoseList()
} }
// if(status == 'edit'){ // if(status == 'edit'){
@@ -623,7 +626,11 @@ methods: {
}else{ }else{
this.speedList = this.speedTypeList.toPorductImg this.speedList = this.speedTypeList.toPorductImg
} }
if(this.scaleImageList[index].resultType == "Relight"){
this.speedData = JSON.parse(JSON.stringify(this.speedList[1]))
}else{
this.speedData = JSON.parse(JSON.stringify(this.speedList[0])) this.speedData = JSON.parse(JSON.stringify(this.speedList[0]))
}
// if(this.scaleImageList[index]?.resultType == 'ToProductImage')this.scaleImageList[index].sourceUrl = this.scaleImageList[index].imgUrl // if(this.scaleImageList[index]?.resultType == 'ToProductImage')this.scaleImageList[index].sourceUrl = this.scaleImageList[index].imgUrl
this.scaleImageIndex = index this.scaleImageIndex = index
if(dialogueIndex)this.robotAssits = dialogueIndex if(dialogueIndex)this.robotAssits = dialogueIndex

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,181 @@
<template>
<div class="designToolsModel" ref="designToolsModel" v-show="designTools"></div>
<a-modal
class="collection generalModel fullScreen"
v-model:visible="designTools"
:footer="null"
width="100%"
height="100%"
:get-container="() => $refs.designToolsModel"
:maskClosable="false"
:centered="true"
:closable="false"
:mask="false"
:keyboard="false"
:destroyOnClose="false"
:zIndex="1000"
>
<div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cleardata()">
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="23" cy="23" r="23" fill="#000" fill-opacity="0.3"/>
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
</svg>
</div>
</div>
<div class="designOpenrtion_content">
<!-- <div class="modal_title_text">
<div>Setting</div>
</div> -->
<div class="collectionBox">
<toProductRelight ref="toProduct"
:productimgMenu="{value:'ToProductImage',label:$t('ProductImg.ProductImage')}"
:isDesignPage="true"
@setLike="designLike"
class="toProduct"
:isState="openType =='toProduct'"
v-if="openType == 'toProduct'"
></toProductRelight>
<toProductRelight ref="relight"
:productimgMenu="{value:'Relight',label:$t('ProductImg.Relight')}"
:isDesignPage="true"
@setLike="designLike"
class="relight"
:isState="openType =='relight'"
v-if="openType == 'relight'"
></toProductRelight>
<poseTransfer v-if="openType == 'poseTransfer'" :isDesignPage="true" @setLike="designLike" ref="poseTransfer"></poseTransfer>
</div>
</div>
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
</div>
</a-modal>
</template>
<script lang="ts">
import { defineComponent,computed,ref,provide,nextTick,inject,toRefs, reactive, onBeforeMount} from 'vue'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Https } from "@/tool/https";
import { useStore } from "vuex";
import { useI18n } from 'vue-i18n'
import toProductRelight from '../tools/toProduct/index.vue'
import poseTransfer from '../tools/poseTransfer/index.vue'
export default defineComponent({
components:{
toProductRelight,poseTransfer
},
props:{
},
emits:['editToolsSuccess'],
setup(props,{emit}) {
const store = useStore();
const data = reactive({
designTools:false,
isShowMark:false,
openType:'',
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
createProbject:inject('createProbject',()=>{}) as any,
likeDesignList:[],
})
const dataDom = reactive({
toProduct:null as any,
relight:null as any,
poseTransfer:null as any,
}) as any
const init = (value:any,list:any)=>{
data.designTools = true
data.openType = value
data.likeDesignList = list
console.log(list)
nextTick(()=>{
let fileList = [] as any
if(value == 'toProduct'){
list.forEach((item:any) => {
item.type = 'DesignOutfit'
fileList.push(item)
});
}else if(value == 'relight' || value == 'poseTransfer'){
list.forEach((item:any) => {
if(item.childList){
item.childList.forEach((child:any) => {
if(child.resultType == 'ToProductImage' || child.resultType == 'Relight'){
fileList.push(child)
}
});
}
});
}
dataDom[value].openSetData(fileList)
})
}
let cleardata = async ()=>{
data.openType = ''
data.likeDesignList = []
data.designTools = false
}
const designLike = ()=>{
}
return{
...toRefs(dataDom),
...toRefs(data),
cleardata,
init,
designLike,
}
},
provide() {
return {
}
},
})
</script>
<style lang="less" scoped>
.designToolsModel{
position: relative;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
z-index: 1000;
:deep(>div){
// position: absolute;
// .ant-modal-mask{
// position: absolute;
// }
.ant-modal-wrap,.ant-modal-mask{
}
> .ant-modal-root{
> .ant-modal-centered{
> .fullScreen{
> .ant-modal-content{
box-shadow: none;
> .ant-modal-body{
padding: 0;
}
}
}
}
}
}
.designOpenrtion_content{
height: 100%;
> .collectionBox{
height: 100%;
}
}
.fullScreen{
.generalModel_btn {
.generalModel_closeIcon{
transform: translate(-10%, 10%);
}
}
}
}
</style>

View File

@@ -450,6 +450,7 @@ export default defineComponent({
let queue = [] as any let queue = [] as any
let start = false let start = false
const chatChange = (value:any)=>{ const chatChange = (value:any)=>{
if(value.type == 'design_control_signal' && dataDom.design){ if(value.type == 'design_control_signal' && dataDom.design){
queue.push( queue.push(
{ {

View File

@@ -126,8 +126,10 @@ export default defineComponent({
} }
const addChatContent = (item:any)=>{ const addChatContent = (item:any)=>{
if((data.textarea.value?.length + item.length) > 10000)return if((data.textarea.value?.length + item.length) > 10000)return
data.chatContent += item // data.chatContent += item
data.textarea.value += item // data.textarea.value += item
data.chatContent = item
data.textarea.value = item
} }
const sendChat = ()=>{ const sendChat = ()=>{
if(!data.chatContent)return if(!data.chatContent)return
@@ -215,7 +217,8 @@ export default defineComponent({
data.chatOrSetting = str data.chatOrSetting = str
} }
const setProject = (item:any)=>{ const setProject = (item:any)=>{
router.push(`home?history=${item.id}`) emit('newProject',item)
// router.push(`home?history=${item.id}`)
} }
onMounted(()=>{ onMounted(()=>{
store.commit('createProbject') store.commit('createProbject')

View File

@@ -67,7 +67,7 @@
<div class="gallery_btn" v-show="!imgOrThree" @click="setImgOrThree(true)">3D view</div> <div class="gallery_btn" v-show="!imgOrThree" @click="setImgOrThree(true)">3D view</div>
<div class="gallery_btn" v-show="imgOrThree" @click="setImgOrThree(false)">Img view</div> <div class="gallery_btn" v-show="imgOrThree" @click="setImgOrThree(false)">Img view</div>
</div> </div>
<div class="flatPatterm" v-show="selectModel.id != -1"> <div class="flatPatterm" v-if="userDetail.systemUser == 6 || userDetail.systemUser == 5" v-show="selectModel.id != -1">
<div class="heard">Flat pattern</div> <div class="heard">Flat pattern</div>
<div class="modelBox"> <div class="modelBox">
<div class="img"> <div class="img">
@@ -112,6 +112,7 @@ export default defineComponent({
// printCatecoryList:computed(()=>{ // printCatecoryList:computed(()=>{
// return store.state.UserHabit.printType // return store.state.UserHabit.printType
// }), // }),
userDetail:computed(()=>store.state.UserHabit.userDetail),//选择的项目
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目 selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
patternMaking3D:computed(()=>store.state.HomeStoreModule.patternMaking3D),//选择的项目 patternMaking3D:computed(()=>store.state.HomeStoreModule.patternMaking3D),//选择的项目
modelList:[] as any, modelList:[] as any,
@@ -137,7 +138,7 @@ export default defineComponent({
data.isNoData = false data.isNoData = false
data.isShowMark = false data.isShowMark = false
} }
const createProbject:any = inject('createProbject') as any const createProbject:any = inject('createProbject',()=>{}) as any
const setSelectModel = async (item:any)=>{ const setSelectModel = async (item:any)=>{
if(!data.selectObject.id)await createProbject() if(!data.selectObject.id)await createProbject()
data.isShowMark = true data.isShowMark = true

View File

@@ -28,7 +28,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="upload_item item"> <div class="upload_item item" v-show="!isDesignPage">
<div class="upload_file_item"> <div class="upload_file_item">
<a-upload <a-upload
:action="getUploadUrl() + '/api/history/toProductImageElementUpload'" :action="getUploadUrl() + '/api/history/toProductImageElementUpload'"
@@ -134,7 +134,10 @@ export default defineComponent({
// selectList, // selectList,
}, },
props:{ props:{
isDesignPage:{
type:Boolean,
default:false,
},
}, },
emits:[], emits:[],
setup(props,{emit}) { setup(props,{emit}) {
@@ -150,7 +153,8 @@ export default defineComponent({
selectImg:{}, selectImg:{},
token:getCookie('token'), token:getCookie('token'),
upload:{ upload:{
projectId:computed(()=>store.state.Workspace.probjects.id) projectId:computed(()=>store.state.Workspace.probjects.id),
CollectionType:'PoseTransfer',
}, },
waitList:[], waitList:[],
likeList:computed(()=>store.state.HomeStoreModule.poseTransfer.likedList), likeList:computed(()=>store.state.HomeStoreModule.poseTransfer.likedList),
@@ -164,6 +168,8 @@ export default defineComponent({
}) })
watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{ watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{
data.fileList = store.state.HomeStoreModule.uploadElement data.fileList = store.state.HomeStoreModule.uploadElement
data.fileList[0].isChecked = true
data.selectImg = data.fileList[0]
}) })
watch(()=>store.state.HomeStoreModule.poseTransfer.list.length,(newVal,oldVal)=>{ watch(()=>store.state.HomeStoreModule.poseTransfer.list.length,(newVal,oldVal)=>{
let list = store.state.HomeStoreModule.poseTransfer.list let list = store.state.HomeStoreModule.poseTransfer.list
@@ -192,7 +198,7 @@ export default defineComponent({
}, },
}) })
const setIsShowMark:any = inject('setIsShowMark') const setIsShowMark:any = inject('setIsShowMark')
const createProbject:any = inject('createProbject') const createProbject:any = inject('createProbject',()=>{})
const dataDom = reactive({ const dataDom = reactive({
generalDragLeft:null as any, generalDragLeft:null as any,
generalDragRight:null as any, generalDragRight:null as any,
@@ -209,7 +215,11 @@ export default defineComponent({
item.isChecked = true item.isChecked = true
if(item.url || item.imgUrl)data.selectImg.minioUrl = getMinioUrl(item.url || item.imgUrl) if(item.url || item.imgUrl)data.selectImg.minioUrl = getMinioUrl(item.url || item.imgUrl)
} }
const openSetData = ()=>{ const openSetData = (designList:any)=>{
if(props.isDesignPage){
data.fileList = designList
return
}
// dataDom.generalDrag.openSetData() // dataDom.generalDrag.openSetData()
data.currentList = store.state.UploadFilesModule.modularData.toProduct data.currentList = store.state.UploadFilesModule.modularData.toProduct
data.currentList = data.currentList?data.currentList:[] data.currentList = data.currentList?data.currentList:[]
@@ -341,6 +351,7 @@ export default defineComponent({
}); });
} }
} }
let isSelectObject = false
let beforeUpload = async (file: any)=>{ let beforeUpload = async (file: any)=>{
const isJpgOrPng = const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/jpeg" ||
@@ -354,7 +365,8 @@ export default defineComponent({
if (!isLt2M) { if (!isLt2M) {
message.info(useI18n().t('MoodboardUpload.jsContent4')); message.info(useI18n().t('MoodboardUpload.jsContent4'));
} }
if(!data.upload.projectId){ if(!data.upload.projectId && !isSelectObject){
isSelectObject = true
await createProbject() await createProbject()
} }
return (isJpgOrPng && isLt2M && data.upload.projectId) || Upload.LIST_IGNORE; return (isJpgOrPng && isLt2M && data.upload.projectId) || Upload.LIST_IGNORE;
@@ -422,12 +434,14 @@ export default defineComponent({
likeOrDislike:'like', likeOrDislike:'like',
transformedId:item.id, transformedId:item.id,
projectId:store.state.Workspace.probjects.id, projectId:store.state.Workspace.probjects.id,
collectionSortParentId:props.isDesignPage?item.parentId:'',
} }
}else{ }else{
value = { value = {
likeOrDislike:'dislike', likeOrDislike:'dislike',
transformedId:item.id, transformedId:item.id,
projectId:store.state.Workspace.probjects.id, projectId:store.state.Workspace.probjects.id,
collectionSortParentId:props.isDesignPage?item.parentId:'',
} }
} }
Https.axiosPost(Https.httpUrls.poselikeOrDisike, {},{params:value}).then( Https.axiosPost(Https.httpUrls.poselikeOrDisike, {},{params:value}).then(
@@ -455,9 +469,9 @@ export default defineComponent({
}); });
} }
const selectPose = (item:any)=>{ const selectPose = (item:any)=>{
data.poseList.forEach((listItem:any)=>listItem.isChecked = false)
item.isChecked = true item.isChecked = true
data.selectPose = item?.id || 1 data.selectPose = item?.id || 1
data.poseList.forEach((listItem:any)=>listItem.isChecked = false)
} }
onMounted(()=>{ onMounted(()=>{
// showViewVideo({url:'https://www.minio.aida.com.hk:12025/api/v1/download-shared-object/aHR0cHM6Ly93d3cubWluaW8uYWlkYS5jb20uaGs6MTIwMjQvYWlkYS11c2Vycy84OS9wb3NlX3RyYW5zZm9ybV92aWRlby8xMjMtODkubXA0P1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9N0tOVDdNWlNLWkRXM1RVOEJZVlklMkYyMDI1MDQwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTA0MDhUMDUxOTM1WiZYLUFtei1FeHBpcmVzPTQzMTk5JlgtQW16LVNlY3VyaXR5LVRva2VuPWV5SmhiR2NpT2lKSVV6VXhNaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpoWTJObGMzTkxaWGtpT2lJM1MwNVVOMDFhVTB0YVJGY3pWRlU0UWxsV1dTSXNJbVY0Y0NJNk1UYzBOREV4T0RneE9Td2ljR0Z5Wlc1MElqb2lZV1J0YVc0aWZRLmY0Z3RoTU1BeC1GUnM3eGhWNFdjTUFCUW5lU19BVkIxUDlYbnJQbEFNWUFsVnJwY3RpYXgtU2cyY2FkZHZ0a0VCOU1NbWxGeUlIbU90aGhUWDlqN2lnJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZ2ZXJzaW9uSWQ9bnVsbCZYLUFtei1TaWduYXR1cmU9Yjg5YmQ4ZDg5M2I4ZjBjYmYxZDI3NDFjZmY0NGRiZGNmYWM2NmU0ZGM2OGIwYzQzZDA2OGI4YjYzZjE5YjhhOA'}) // showViewVideo({url:'https://www.minio.aida.com.hk:12025/api/v1/download-shared-object/aHR0cHM6Ly93d3cubWluaW8uYWlkYS5jb20uaGs6MTIwMjQvYWlkYS11c2Vycy84OS9wb3NlX3RyYW5zZm9ybV92aWRlby8xMjMtODkubXA0P1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9N0tOVDdNWlNLWkRXM1RVOEJZVlklMkYyMDI1MDQwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTA0MDhUMDUxOTM1WiZYLUFtei1FeHBpcmVzPTQzMTk5JlgtQW16LVNlY3VyaXR5LVRva2VuPWV5SmhiR2NpT2lKSVV6VXhNaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpoWTJObGMzTkxaWGtpT2lJM1MwNVVOMDFhVTB0YVJGY3pWRlU0UWxsV1dTSXNJbVY0Y0NJNk1UYzBOREV4T0RneE9Td2ljR0Z5Wlc1MElqb2lZV1J0YVc0aWZRLmY0Z3RoTU1BeC1GUnM3eGhWNFdjTUFCUW5lU19BVkIxUDlYbnJQbEFNWUFsVnJwY3RpYXgtU2cyY2FkZHZ0a0VCOU1NbWxGeUlIbU90aGhUWDlqN2lnJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZ2ZXJzaW9uSWQ9bnVsbCZYLUFtei1TaWduYXR1cmU9Yjg5YmQ4ZDg5M2I4ZjBjYmYxZDI3NDFjZmY0NGRiZGNmYWM2NmU0ZGM2OGIwYzQzZDA2OGI4YjYzZjE5YjhhOA'})

View File

@@ -23,7 +23,7 @@
<div class="" v-if="item.status == 'uploading'" style="display: flex;align-items: center;"> <div class="" v-if="item.status == 'uploading'" style="display: flex;align-items: center;">
<a-spin size="large" /> <a-spin size="large" />
</div> </div>
<img v-show="item.status != 'uploading'" :src="item.imgUrl || item.url" alt=""> <img v-show="item.status != 'uploading'" :src="item.designOutfitUrl || item.imgUrl || item.url" alt="">
<div v-show="item.status != 'uploading'" class="btnBox"> <div v-show="item.status != 'uploading'" class="btnBox">
<div :class="{active:item.isChecked}"> <div :class="{active:item.isChecked}">
<i class="fi fi-br-check"></i> <i class="fi fi-br-check"></i>
@@ -34,7 +34,7 @@
</div> </div>
<!-- <a-checkbox v-model:checked="item.isChecked"></a-checkbox> --> <!-- <a-checkbox v-model:checked="item.isChecked"></a-checkbox> -->
</div> </div>
<div class="upload_item item"> <div class="upload_item item" v-show="!isDesignPage">
<div class="upload_file_item"> <div class="upload_file_item">
<a-upload <a-upload
:action="uploadUrl + '/api/history/toProductImageElementUpload'" :action="uploadUrl + '/api/history/toProductImageElementUpload'"
@@ -147,7 +147,7 @@
</span> </span>
</div> </div>
<div class="content"> <div class="content">
<generalDrag ref="generalDragLeft" :type="productimgMenu.value" @setBtn="selectSetBtn" :isDelete="false" :isLike="true" :list="likeList[productimgMenu.value]"></generalDrag> <generalDrag ref="generalDragLeft" :type="productimgMenu.value" :isCopy="!isDesignPage" @setBtn="selectSetBtn" :isDelete="false" :isLike="true" :list="likeList[productimgMenu.value]"></generalDrag>
</div> </div>
<!-- </div> --> <!-- </div> -->
@@ -167,7 +167,7 @@
</span> </span>
</div> </div>
<div class="content"> <div class="content">
<generalDrag ref="generalDragRight" :type="productimgMenu.value" @setBtn="generateSetBtn" :list="generateList" :showMark="isShowMark"></generalDrag> <generalDrag ref="generalDragRight" :type="productimgMenu.value" :isCopy="!isDesignPage" @setBtn="generateSetBtn" :list="generateList" :showMark="isShowMark"></generalDrag>
</div> </div>
</div> </div>
</div> </div>
@@ -210,7 +210,24 @@ export default defineComponent({
scaleImage, scaleImage,
generalMenu,UpgradePlan,generalDrag generalMenu,UpgradePlan,generalDrag
}, },
props: ['setTask','productimgMenu'], props:{
setTask:{
type:Object,
default:()=>{
return {}
}
},
productimgMenu:{
type:Object,
default:()=>{
return {}
}
},
isDesignPage:{
type:Boolean,
default:false,
},
},
setup(props,{emit}) { setup(props,{emit}) {
const store = useStore(); const store = useStore();
let userDetail:any= computed(()=>{ let userDetail:any= computed(()=>{
@@ -224,7 +241,7 @@ export default defineComponent({
return store.state.Guide.guide return store.state.Guide.guide
}) })
const route = useRoute() const route = useRoute()
const createProbject:any = inject('createProbject') const createProbject:any = inject('createProbject',()=>{})
let productImgData:any = reactive({ let productImgData:any = reactive({
isShowMark:false, isShowMark:false,
fileList:{}, fileList:{},
@@ -283,6 +300,7 @@ export default defineComponent({
}, },
); );
watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{ watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{
if(props.isDesignPage)return
productImgData.fileList[props.productimgMenu.value] = store.state.HomeStoreModule.uploadElement productImgData.fileList[props.productimgMenu.value] = store.state.HomeStoreModule.uploadElement
}) })
const productImgDom = reactive({ const productImgDom = reactive({
@@ -315,7 +333,6 @@ export default defineComponent({
} }
]) ])
let RelightDirection:any = ref(RelightDirectionList.value[0].value) let RelightDirection:any = ref(RelightDirectionList.value[0].value)
let selectList:any = ref({})
// let likeDesignCollectionList: any = computed(() => { // let likeDesignCollectionList: any = computed(() => {
// return store.state.HomeStoreModule.likeDesignCollectionList; // return store.state.HomeStoreModule.likeDesignCollectionList;
// }); // });
@@ -323,14 +340,17 @@ export default defineComponent({
return store.state.UploadFilesModule.modularData; return store.state.UploadFilesModule.modularData;
}); });
let userlikeGroupId = 0 let userlikeGroupId = 0
const openSetData = ()=>{ const openSetData = (designList:any)=>{
// cleardata() // cleardata()
if(props.productimgMenu.value == 'ToProductImage'){ // if(props.productimgMenu.value == 'ToProductImage'){
selectList.value['ToProductImage'] = JSON.parse(JSON.stringify(selectDesignList.value.design.likeData)) // selectList.value['ToProductImage'] = JSON.parse(JSON.stringify(selectDesignList.value.design.likeData))
}else if(props.productimgMenu.value == 'Relight'){ // }else if(props.productimgMenu.value == 'Relight'){
selectList.value['Relight'] = JSON.parse(JSON.stringify(selectDesignList.value.toProduct)) // selectList.value['Relight'] = JSON.parse(JSON.stringify(selectDesignList.value.toProduct))
// }
if(props.isDesignPage){
productImgData.fileList[props.productimgMenu.value] = designList
return
} }
userlikeGroupId = selectDesignList.value.userlikeGroupId userlikeGroupId = selectDesignList.value.userlikeGroupId
// getLikeProductImage(selectDesignList.value.userlikeGroupId) // getLikeProductImage(selectDesignList.value.userlikeGroupId)
productImgDom.generalDragLeft.setItemPosition() productImgDom.generalDragLeft.setItemPosition()
@@ -378,7 +398,6 @@ export default defineComponent({
} }
let cleardata = ()=>{ let cleardata = ()=>{
productImgData.generateList = [] productImgData.generateList = []
selectList.value = {}
// props.productimgMenu = productimgMenuList.value[0] // props.productimgMenu = productimgMenuList.value[0]
} }
@@ -404,6 +423,7 @@ export default defineComponent({
bor = false bor = false
} }
} }
let isSelectObject = false
let beforeUpload = async (file: any)=>{ let beforeUpload = async (file: any)=>{
const isJpgOrPng = const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/jpeg" ||
@@ -417,10 +437,12 @@ export default defineComponent({
if (!isLt2M) { if (!isLt2M) {
message.info(useI18n().t('MoodboardUpload.jsContent4')); message.info(useI18n().t('MoodboardUpload.jsContent4'));
} }
if(!productImgData.selectObject.id){ if(!productImgData.selectObject.id && !isSelectObject){
isSelectObject = true
productImgData.selectObject.id = await createProbject() productImgData.selectObject.id = await createProbject()
upload.value = { upload.value = {
projectId:productImgData.selectObject.id projectId:productImgData.selectObject.id,
CollectionType:props.productimgMenu.value,
} }
} }
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE; return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
@@ -446,7 +468,9 @@ export default defineComponent({
let likeFile = (item:any,str:any,index:any) =>{ let likeFile = (item:any,str:any,index:any) =>{
let url let url
let data = { let data = {
toProductImageResultId:[item.id] toProductImageResultId:[item.id],
projectId: store.state.Workspace.probjects.id,
collectionSortParentId:props.isDesignPage?item.parentId:'',
} }
if(str == 'like'){ if(str == 'like'){
url = Https.httpUrls.productImageLike url = Https.httpUrls.productImageLike
@@ -504,26 +528,17 @@ export default defineComponent({
if(productImgData.fileList[props.productimgMenu.value]){ if(productImgData.fileList[props.productimgMenu.value]){
productImgData.fileList[props.productimgMenu.value].forEach((item:any)=>{ productImgData.fileList[props.productimgMenu.value].forEach((item:any)=>{
if(item.isChecked){ if(item.isChecked){
obj.elementId = item.id if(item.resultType == 'Design'){
obj.elementType = item.type || 'ProductElement'
selectArr.push(JSON.parse(JSON.stringify(obj)))
}
})
}
if(selectList.value[props.productimgMenu.value]){
selectList.value[props.productimgMenu.value].forEach((item:any)=>{
if(item.isChecked){
obj.elementId = item.designOutfitId obj.elementId = item.designOutfitId
obj.elementType = 'DesignOutfit' obj.elementType = 'DesignOutfit'
if(props.productimgMenu.value == 'Relight'){ }else{
obj.elementId = item.id obj.elementId = item.id
obj.elementType = 'ToProductImage' obj.elementType = item.type || 'ProductElement'
} }
selectArr.push(JSON.parse(JSON.stringify(obj))) selectArr.push(JSON.parse(JSON.stringify(obj)))
} }
}) })
} }
if(selectArr.length == 0) { if(selectArr.length == 0) {
message.info(t('ProductImg.jsContent2')) message.info(t('ProductImg.jsContent2'))
return return
@@ -612,11 +627,12 @@ export default defineComponent({
let index = productImgData.generateList.findIndex((obj:any) => obj.taskId === element.taskId); let index = productImgData.generateList.findIndex((obj:any) => obj.taskId === element.taskId);
productImgData.generateList[index] = element productImgData.generateList[index] = element
// productImgData.generateList[props.productimgMenu.value].unshift(element) // productImgData.generateList[props.productimgMenu.value].unshift(element)
data = data.filter((item:any) => item !== element.taskId);
}else if(element.status == 'Fail'){ }else if(element.status == 'Fail'){
let index = productImgData.generateList.findIndex((obj:any) => obj.taskId === element.taskId); let index = productImgData.generateList.findIndex((obj:any) => obj.taskId === element.taskId);
productImgData.generateList.splice(index,1) productImgData.generateList.splice(index,1)
}
data = data.filter((item:any) => item !== element.taskId); data = data.filter((item:any) => item !== element.taskId);
}
}); });
generateProceedList = data generateProceedList = data
if((data.length == 0)|| (rv.filter((item:any)=>item.status == 'Invalid').length ==data.length)){ if((data.length == 0)|| (rv.filter((item:any)=>item.status == 'Invalid').length ==data.length)){
@@ -796,7 +812,6 @@ export default defineComponent({
RelightDirectionList, RelightDirectionList,
RelightDirection, RelightDirection,
selectList,
setproduct, setproduct,
fileUploadChange, fileUploadChange,
beforeUpload, beforeUpload,

View File

@@ -27,7 +27,7 @@
<div class="zoom" v-if="item.url" @click.stop="()=>$emit('setBtn',item.id,'zoom')"> <div class="zoom" v-if="item.url" @click.stop="()=>$emit('setBtn',item.id,'zoom')">
<i class="fi fi-bs-expand-arrows-alt"></i> <i class="fi fi-bs-expand-arrows-alt"></i>
</div> </div>
<div class="copy" v-if="type == 'Relight' || type == 'ToProductImage' || type == 'PoseTransfer'" @click.stop="()=>$emit('setBtn',item.id,'copy')"> <div class="copy" v-if="(type == 'Relight' || type == 'ToProductImage' || type == 'PoseTransfer') && isCopy" @click.stop="()=>$emit('setBtn',item.id,'copy')">
<i class="fi fi-sr-copy-alt"></i> <i class="fi fi-sr-copy-alt"></i>
</div> </div>
<div class="delete" v-if="item.url && isDelete" @click.stop="()=>$emit('setBtn',item.id,'delete')"> <div class="delete" v-if="item.url && isDelete" @click.stop="()=>$emit('setBtn',item.id,'delete')">
@@ -54,6 +54,7 @@ export default defineComponent({
showMark:{type:Boolean,default:false}, showMark:{type:Boolean,default:false},
isLike:{type:Boolean,default:false}, isLike:{type:Boolean,default:false},
isDelete:{type:Boolean,default:true}, isDelete:{type:Boolean,default:true},
isCopy:{type:Boolean,default:true},
type:{type:String,default:''}, type:{type:String,default:''},
}, },
emits:['setBtn','setSort'], emits:['setBtn','setSort'],

View File

@@ -1,515 +1,493 @@
import axios from "axios"; import axios from 'axios'
// import qs from 'qs' // import qs from 'qs'
// import message from '@/components/public/message/src' // import message from '@/components/public/message/src'
import router from "@/router/index"; import router from '@/router/index'
import { getCookie, clonAllCookie } from "@/tool/cookie"; import {getCookie,clonAllCookie} from '@/tool/cookie'
// import cookie from '@/tools/cookie.js' // import cookie from '@/tools/cookie.js'
axios.defaults.timeout = 60000; //响应时间 axios.defaults.timeout = 60000; //响应时间
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; //配置请求头 // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; //配置请求头
axios.defaults.headers.post["Content-Type"] = "application/json"; axios.defaults.headers.post["Content-Type"] = "application/json";
axios.defaults.headers.post["lang"] = "en"; //配置语言请求头
axios.defaults.headers.post['lang'] = 'en'; //配置语言请求头
axios.defaults.withCredentials = true; //跨域携带cookie axios.defaults.withCredentials = true; //跨域携带cookie
import { message } from "ant-design-vue"; import { message } from 'ant-design-vue';
import store from "@/store"; import store from '@/store';
// if(import.meta.env.NODE_ENV == "development"){ // if(process.env.NODE_ENV == "development"){
// axios.defaults.baseURL = ""; //配置接口地址 // axios.defaults.baseURL = ""; //配置接口地址
// }else{ // }else{
// axios.defaults.baseURL = import.meta.env.VUE_APP_BASE_URL; //配置接口地址 // axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
// } // }
// let httpIp // let httpIp
// if(import.meta.env.NODE_ENV == 'development'){ // if(process.env.NODE_ENV == 'development'){
// httpIp = 'http://192.168.1.12:10086' // httpIp = 'http://192.168.1.12:10086'
// }else{ // }else{
// httpIp = '' // httpIp = ''
// } // }
let httpIp = import.meta.env.NODE_ENV == "development" ? "" : ""; let httpIp = process.env.NODE_ENV == 'development' ? "" : "";
// let httpIp = import.meta.env.NODE_ENV == 'development' ? "https://192.168.1.8:10086" : ""; // let httpIp = process.env.NODE_ENV == 'development' ? "https://192.168.1.8:10086" : "";
axios.defaults.baseURL = httpIp; //配置接口地址 axios.defaults.baseURL = httpIp; //配置接口地址
// console.log(axios.defaults.baseURL); // console.log(axios.defaults.baseURL);
axios.defaults.baseURL = import.meta.env.VITE_APP_BASE_URL; //配置接口地址 axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
// 创建取消令牌 // 创建取消令牌
const CancelToken = axios.CancelToken; const CancelToken = axios.CancelToken;
const source = CancelToken.source(); const source = CancelToken.source();
// console.log(import.meta.env.VITE_APP_BASE_URL); // console.log(process.env.VUE_APP_BASE_URL);
const filterHttpsUrl = [ const filterHttpsUrl = ['/api/portfolio/page','/api/portfolio/detail','/api/account/preLogin','/api/account/schoolLogin','/api/account/enterpriseLogin','/api/account/login']
"/api/portfolio/page",
"/api/portfolio/detail",
"/api/account/preLogin",
"/api/account/schoolLogin",
"/api/account/enterpriseLogin",
"/api/account/login",
];
//POST传参序列化(添加请求拦截器) //POST传参序列化(添加请求拦截器)
axios.interceptors.request.use( axios.interceptors.request.use((config) => {
(config) => {
//在发送请求之前做某件事 //在发送请求之前做某件事
// config.cancelToken = source.token // config.cancelToken = source.token
if ( if(config.method === 'post' || config.method === 'put' || config.method === 'delete'){
config.method === "post" ||
config.method === "put" ||
config.method === "delete"
) {
// config.data = qs.stringify(config.data); // config.data = qs.stringify(config.data);
// 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) { if(filterHttpsUrl.indexOf(config.url) == -1){
config.headers.Authorization = getCookie("token"); config.headers.Authorization = getCookie('token');
} else { }else{
config.headers.Authorization = ""; config.headers.Authorization = '';
} }
return config; return config;
}, },(error) =>{
(error) => {
return Promise.reject(error); return Promise.reject(error);
} });
); let isLoginTime = false
let isLoginTime = false; const binaryToUrl = (binary,type = 'application/octet-stream',res)=>{
const binaryToUrl = (binary, type = "application/octet-stream", res) => { let blob = new Blob([binary], {'content-type':res.headers['content-type']});
let blob = new Blob([binary], {
"content-type": res.headers["content-type"],
});
let url = URL.createObjectURL(blob); let url = URL.createObjectURL(blob);
return url; return url
}; }
//返回状态判断(添加响应拦截器) //返回状态判断(添加响应拦截器)
axios.interceptors.response.use( axios.interceptors.response.use((res) =>{
(res) => {
// if(res.data.data == null){ // if(res.data.data == null){
// message.warning(res.data.errMsg) // message.warning(res.data.errMsg)
// return Promise.reject(res.data); // return Promise.reject(res.data);
// }else // }else
if (res.config.env.binary) { if(res.config.env.binary){
let url = binaryToUrl(res.data, res.config.env.binaryType, res); let url = binaryToUrl(res.data,res.config.env.binaryType,res)
return Promise.resolve({ url, data: res.data }); return Promise.resolve({url,data:res.data})
} }
if (res.data) { if (res.data) {
if (res.data.errCode === 0) { if (res.data.errCode === 0) {
// message.error(res.data.errMsg) // message.error(res.data.errMsg)
return Promise.resolve(res.data.data); return Promise.resolve(res.data.data);
} else if (res.data.errCode === 1) { } else if(res.data.errCode === 1){
message.warning(res.data.errMsg); message.warning(res.data.errMsg)
return Promise.reject(res.data); return Promise.reject(res.data);
} else if (res.data.errCode === 2) { } else if(res.data.errCode === 2){
return Promise.reject(res.data); return Promise.reject(res.data);
} else if (res.data.errCode === -1) { }else if(res.data.errCode === -1){
message.error(res.data.errMsg); message.error(res.data.errMsg)
return Promise.reject(res.data); return Promise.reject(res.data);
} }
} else { } else {
if (res.data.errCode === 0) { if (res.data.errCode === 0) {
message.warning(res.data.errMsg); message.warning(res.data.errMsg)
return Promise.reject(res.data); return Promise.reject(res.data);
} else if (res.data.errCode === 1) { } else if(res.data.errCode === 1){
message.warning(res.data.errMsg); message.warning(res.data.errMsg)
return Promise.reject(res.data); return Promise.reject(res.data);
} else if (res.data.errCode === 2) { } else if(res.data.errCode === 2){
return Promise.reject(res.data); return Promise.reject(res.data);
} else if (res.data.errCode === -1) { }else if(res.data.errCode === -1){
message.error(res.data.errMsg); message.error(res.data.errMsg)
return Promise.reject(res.data); return Promise.reject(res.data);
} }
} }
}, }, function(error) {
function (error) { if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
if (
error?.response?.status === 401 &&
router.currentRoute._value.name != "setIdentification"
) {
//如果是记录浏览器页面就不跳转login
// return // return
clonAllCookie(); clonAllCookie()
if (!isLoginTime) { if(!isLoginTime){
isLoginTime = true; isLoginTime = true
let isSystemUserRouteList = ["/Square"]; //如果是这两个页面就无需跳转未登录页 let isSystemUserRouteList = ['/Square']//如果是这两个页面就无需跳转未登录页
let sSystemUser = false; let sSystemUser = false
for (let index = 0; index < isSystemUserRouteList.length; index++) { for (let index = 0; index < isSystemUserRouteList.length; index++) {
if ( if(router.currentRoute.value.path.indexOf(isSystemUserRouteList[index]) > -1){
router.currentRoute.value.path.indexOf( sSystemUser = true
isSystemUserRouteList[index] break
) > -1
) {
sSystemUser = true;
break;
} }
} }
if (!sSystemUser) { if(!sSystemUser){
router.replace("/"); router.replace('/')
} }
message.warning("Please login and try again~"); message.warning('Please login and try again~')
store.commit("createDetail"); store.commit('createDetail')
store.commit("createProbject"); store.commit('createProbject')
setTimeout(() => [(isLoginTime = false)], 2000); setTimeout(()=>[
isLoginTime = false
],2000)
} }
// source.cancel('取消后续接口调用'); // source.cancel('取消后续接口调用');
return Promise.reject(); return Promise.reject()
} }
let data_new = error?.response?.data; let data_new = error?.response?.data
// message.error(data_new?.errMsg || 'Error: server exception') // message.error(data_new?.errMsg || 'Error: server exception')
return Promise.reject(data_new); return Promise.reject(data_new);
} });
);
export const Https = { export const Https = {
httpUrls: { httpUrls: {
interfaceUrl: "", interfaceUrl: '',
parseGoogleCredential: "/api/third/party/parseGoogleCredential", //谷歌登录注册 parseGoogleCredential:'/api/third/party/parseGoogleCredential',//谷歌登录注册
parseWeChatCode: "/api/third/party/parseWeChatCode", //微信登录 parseWeChatCode:'/api/third/party/parseWeChatCode',//微信登录
accountIsLogin: "/api/account/isLogin", //判断用户是否登录 accountIsLogin:'/api/account/isLogin', //判断用户是否登录
accountLogin: `/api/account/login`, //账号密码登录接口 accountLogin:`/api/account/login`, //账号密码登录接口
organizationNameSearch: `/api/account/organizationNameSearch`, //查询学校或者企业版名字 organizationNameSearch:`/api/account/organizationNameSearch`, //查询学校或者企业版名字
getUserLanguage: `/api/account/getUserLanguage`, //获取当前用户语言 getUserLanguage:`/api/account/getUserLanguage`, //获取当前用户语言
changeUserLanguage: `/api/account/changeUserLanguage`, //切换用户当前语言 changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
uploadAvatar: `/api/account/uploadAvatar`, //修改头像 uploadAvatar:`/api/account/uploadAvatar`, //修改头像
editUserName: `/api/account/editUserName`, //修改用户名 editUserName:`/api/account/editUserName`, //修改用户名
updateUserInfo: `/api/account/updateUserInfo`, //修改国家职业 updateUserInfo:`/api/account/updateUserInfo`, //修改国家职业
accountDetail: `/api/account/getAccountDetail`, //用户详细信息 accountDetail:`/api/account/getAccountDetail`, //用户详细信息
trialUserLogout: `/api/account/trialUserLogout`, //试用用户退出登录接口 trialUserLogout:`/api/account/trialUserLogout`, //试用用户退出登录接口
completeGuidancet: `/api/account/completeGuidance`, //用户指引结束 completeGuidancet:`/api/account/completeGuidance`, //用户指引结束
getExpiredTime: `/api/account/getExpiredTime`, //获取用户到期时间 getExpiredTime:`/api/account/getExpiredTime`, //获取用户到期时间
addNoLoginRequired: `/api/third/party/addNoLoginRequired`, //机房用户注册 addNoLoginRequired:`/api/third/party/addNoLoginRequired`, //机房用户注册
deleteNoLoginRequired: `/api/third/party/deleteNoLoginRequired`, //机房用户注销 deleteNoLoginRequired:`/api/third/party/deleteNoLoginRequired`, //机房用户注销
noLoginRequired: `api/account/noLoginRequired`, //机房用户登录 noLoginRequired:`api/account/noLoginRequired`, //机房用户登录
existNoLoginRequired: `/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在 existNoLoginRequired:`/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在
deleteNoLoginRequiredNew: `/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销 deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
addNoLoginRequiredNew: `api/third/party/addNoLoginRequiredNew`, //机房用户注册 addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册
updateNoLoginRequiredNew: `api/third/party/updateNoLoginRequiredNew`, //机房用户更新 updateNoLoginRequiredNew:`api/third/party/updateNoLoginRequiredNew`, //机房用户更新
endpoint: `api/third/party/your-secured-endpoint`, //获取唯一标识是否存在 endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
designWorksRegister: "/api/account/designWorksRegister", //注册
designWorksRegisterCode: "/api/account/designWorksRegisterCode", //注册
preLogin: "/api/account/preLogin", //预先登入 designWorksRegister:'/api/account/designWorksRegister', //注册
schoolLogin: "/api/account/schoolLogin", //学校管理员登录 designWorksRegisterCode:'/api/account/designWorksRegisterCode', //注册
enterpriseLogin: "/api/account/enterpriseLogin", //企业管理员登录
accountSendEmail: `/api/account/sendEmail`, //发送邮件
accountResetPwd: "/api/account/resetPwd", //忘记密码修改
accountLogout: "/api/account/logout", //登出
accountBindEmail: "/api/account/bindEmail", //绑定邮箱
bindGoogle: "/api/account/bindGoogle", //绑定谷歌
bindWeChat: "/api/account/bindWeChat", //绑定微信
unbindGoogle: `/api/account/unbindGoogle`, //取消绑定谷歌
unbindWeChat: "/api/account/unbindWeChat", //取消绑定微信
elementGeneratePrint: "/api/element/generatePrint", //生成印花
elementSavePrint: "/api/element/savePrint", //保存印花
getRgbByTcx: "/api/element/getRgbByTcx", // 通过hsv值获取潘通信息
getRgbByHsv: "/api/element/getRgbByHsv", //通过hsv值获取潘通信息
designCollection: `/api/design/designCollection`, //设计 Conllection
reDesignCollection: `/api/design/reDesignCollection`, //重新设计 Conllection
countDesignProcess: "/api/design/countDesignProcess", //统计design进度
getDesignResult: "/api/design/getDesignResult", //查询design结果
designSort: `/api/design/sort`, //design排序
collectionLikeUpdate: `/api/history/collectionLikeUpdate`, //赋值排序
designProcess: `/api/design/designProcess`, //统计design进度
designGetModel: `/api/design/getModel`, //导出获取模特链接 preLogin:'/api/account/preLogin',//预先登入
schoolLogin:'/api/account/schoolLogin',//学校管理员登录
enterpriseLogin:'/api/account/enterpriseLogin',//企业管理员登录
accountSendEmail:`/api/account/sendEmail`, //发送邮件
accountResetPwd:'/api/account/resetPwd', //忘记密码修改
accountLogout:'/api/account/logout',//登出
accountBindEmail:'/api/account/bindEmail', //绑定邮箱
bindGoogle:'/api/account/bindGoogle', //绑定谷歌
bindWeChat:'/api/account/bindWeChat', //绑定微信
unbindGoogle:`/api/account/unbindGoogle`, //取消绑定谷歌
unbindWeChat:'/api/account/unbindWeChat', //取消绑定微信
elementGeneratePrint:'/api/element/generatePrint', //生成印花
elementSavePrint:'/api/element/savePrint',//保存印花
getRgbByTcx:'/api/element/getRgbByTcx', // 通过hsv值获取潘通信息
getRgbByHsv:'/api/element/getRgbByHsv', //通过hsv值获取潘通信息
designCollection:`/api/design/designCollection`, //设计 Conllection
reDesignCollection:`/api/design/reDesignCollection`,//重新设计 Conllection
countDesignProcess:'/api/design/countDesignProcess', //统计design进度
getDesignResult:'/api/design/getDesignResult', //查询design结果
designSort:`/api/design/sort`, //design排序
collectionLikeUpdate:`/api/history/collectionLikeUpdate`, //赋值排序
designProcess:`/api/design/designProcess`, //统计design进度
designGetModel:`/api/design/getModel`, //导出获取模特链接
//充值相关 //充值相关
productList: `/api/product/list`, //获取商品列表 productList:`/api/product/list`, //获取商品列表
payAlipay: `/api/ali-pay/trade/page/pay`, //支付宝确认支付 payAlipay:`/api/ali-pay/trade/page/pay`, //支付宝确认支付
payAlipayHK: `/api/alipay-hk/createOrder`, //香港支付宝确认支付 payAlipayHK:`/api/alipay-hk/createOrder`, //香港支付宝确认支付
payStripe: `/api/stripe/createOrder`, //Stripe支付 payStripe:`/api/stripe/createOrder`, //Stripe支付
payPaypal: `/api/paypal/trade`, //paypal确认支付 payPaypal:`/api/paypal/trade`, //paypal确认支付
getCredits: `/api/credits/getCredits`, //查询用户积分 getCredits:`/api/credits/getCredits`, //查询用户积分
cancelSubscription: `/api/stripe/cancelSubscription`, //取消订阅 cancelSubscription:`/api/stripe/cancelSubscription`, //取消订阅
orderInfoList: `/api/order-info/list`, //查询订单列表 orderInfoList:`/api/order-info/list`, //查询订单列表
getCreditsDetail: `/api/credits/getCreditsDetail`, //查询积分列表 getCreditsDetail:`/api/credits/getCreditsDetail`, //查询积分列表
tradeRefundAlipay: `/api/ali-pay/trade/refund`, //支付宝退款 tradeRefundAlipay:`/api/ali-pay/trade/refund`, //支付宝退款
tradeRefundPaypal: `/api/paypal/trade/refund`, //paypal退款 tradeRefundPaypal:`/api/paypal/trade/refund`, //paypal退款
tradeQuery: `/api/ali-pay/trade/query/{orderNo}`, //查询订单状态 tradeQuery:`/api/ali-pay/trade/query/{orderNo}`, //查询订单状态
getRgbByHsvBatch: `/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息 getRgbByHsvBatch:`/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息
designLike: `/api/design/like`, //Design Like designLike:`/api/design/like`, //Design Like
designDislike: `/api/design/dislike`, //Design Dislike designDislike: `/api/design/dislike`, //Design Dislike
queryUserGroup: `/api/history/queryUserGroup`, //History用户分页分组列表 queryUserGroup:`/api/history/queryUserGroup`, //History用户分页分组列表
deleteUserGroup: `/api/history/deleteUserGroup`, //History删除用户分组 deleteUserGroup:`/api/history/deleteUserGroup`, //History删除用户分组
updateUserGroupName: `/api/history/updateUserGroupName`, //History修改用户分组名 updateUserGroupName:`/api/history/updateUserGroupName`, //History修改用户分组名
projectSaveOrUpdate: `/api/project/saveOrUpdate`, //History修改用户分组名 projectSaveOrUpdate:`/api/project/saveOrUpdate`, //History修改用户分组名
historyChoose: `/api/history/choose`, //History choose historyChoose:`/api/history/choose`, //History choose
getDesignDetail: `/api/design/detail/getDetail`, //查询design详情 getDesignDetail:`/api/design/detail/getDetail`,//查询design详情
designSingleWithGradient: `/api/design/detail/designSingleWithGradient`, //查询需要更新mask列表 designSingleWithGradient:`/api/design/detail/designSingleWithGradient`,//查询需要更新mask列表
getNextSysElement: "/api/design/detail/getNextSysElement", //切换系统的element getNextSysElement:'/api/design/detail/getNextSysElement',//切换系统的element
detailPrintDot: "/api/design/detail/printDot", //print打点预览 detailPrintDot:'/api/design/detail/printDot',//print打点预览
designSingle: `/api/design/detail/designSingle`, //单个design designSingle:`/api/design/detail/designSingle`,//单个design
queryLibraryPage: `/api/library/queryLibraryPage`, //Library分页列表 queryLibraryPage:`/api/library/queryLibraryPage`,//Library分页列表
libraryUpload: `/api/library/upload`, // Library文件上传 libraryUpload:`/api/library/upload`, // Library文件上传
setSketchLibrary: `/api/library/updateLibraryLevel2Type`, // Library文件上传 setSketchLibrary:`/api/library/updateLibraryLevel2Type`, // Library文件上传
queryClassification: `/api/classification/queryClassification`, //标签类别查询 queryClassification:`/api/classification/queryClassification`,//标签类别查询
classificationSaveOrUpdate: `/api/classification/saveOrUpdate`, //标签类别新增修改 classificationSaveOrUpdate:`/api/classification/saveOrUpdate`,//标签类别新增修改
classificationDelete: `/api/classification/delete`, //标签类别新增修改 classificationDelete:`/api/classification/delete`,//标签类别新增修改
relationLibrary: `/api/classification/relationLibrary`, //标签类别新增修改 relationLibrary:`/api/classification/relationLibrary`,//标签类别新增修改
getRelClassificationIdList: `/api/classification/getRelClassificationIdList`, //标签类别新增修改 getRelClassificationIdList:`/api/classification/getRelClassificationIdList`,//标签类别新增修改
getRelPublicClassificationIdList: `/api/classification/getRelPublicClassificationIdList`, //多选获取公共标签 getRelPublicClassificationIdList:`/api/classification/getRelPublicClassificationIdList`,//多选获取公共标签
editRelPublicClassificationIdList: `/api/classification/editRelPublicClassificationIdList`, //多选修改公共标签 editRelPublicClassificationIdList:`/api/classification/editRelPublicClassificationIdList`,//多选修改公共标签
//模块化 //模块化
llmStream: `/api/llm/streamNew`, //聊天 llmStream:`/api/llm/streamNew`,//聊天
// llmStream:`/api/llm/stream`,//聊天 // llmStream:`/api/llm/stream`,//聊天
chatCreateProject: `/api/llm/chatCreateProject`, //聊天创建项目 chatCreateProject:`/api/llm/chatCreateProject`,//聊天创建项目
getChatHistory: `/api/llm/getChatHistory`, //获取聊天历史记录 getChatHistory:`/api/llm/getChatHistory`,//获取聊天历史记录
llmUploadFile: `/api/llm/uploadFile`, //聊天上传文件 llmUploadFile:`/api/llm/uploadFile`,//聊天上传文件
saveOrUpdate: `/api/project/saveOrUpdate`, //模块化新增修改 saveOrUpdate:`/api/project/saveOrUpdate`,//模块化新增修改
getModuleContent: `/api/project/getModuleContent`, //获取模块内容 getModuleContent:`/api/project/getModuleContent`,//获取模块内容
saveModuleContent: `/api/project/saveModuleContent`, //储存模块内容 saveModuleContent:`/api/project/saveModuleContent`,//储存模块内容
historyProject: `/api/project/page`, //项目记录 historyProject:`/api/project/page`,//项目记录
projectDetail: `/api/project/delete`, //删除项目 projectDetail:`/api/project/delete`,//删除项目
//3d //3d
threeDPage: `/api/project/threeDPage`, threeDPage:`/api/project/threeDPage`,
downloadZip: `/api/project/downloadZip`, //下载zip downloadZip:`/api/project/downloadZip`,//下载zip
getThreeDSize: `/api/project/getThreeDSize`, //下载列表 getThreeDSize:`/api/project/getThreeDSize`,//下载列表
getLayoutDetail: `/api/project/getLayoutDetail`, //获取3d详情 getLayoutDetail:`/api/project/getLayoutDetail`,//获取3d详情
getThreeDGlb: `/api/project/getThreeDGlb`, getThreeDGlb:`/api/project/getThreeDGlb`,
selectHistoryProject: `/api/project/choose`, //选择项目 selectHistoryProject:`/api/project/choose`,//选择项目
getMannequinDetail: `/api/project/getMannequinDetail`, //模块化查看模特点位 getMannequinDetail:`/api/project/getMannequinDetail`,//模块化查看模特点位
modifyProportion: `/api/generate/modifyProportion`, //模特拉伸 modifyProportion:`/api/generate/modifyProportion`,//模特拉伸
addSysModelToLib: `/api/library/addSysModelToLib`, addSysModelToLib:`/api/library/addSysModelToLib`,
poselikeOrDisike: `/api/generate/likeOrDislike`, //postTransform like poselikeOrDisike:`/api/generate/likeOrDislike`,//postTransform like
getAllPose: `/api/generate/getAllPose`, //获取动作 getAllPose:`/api/generate/getAllPose`,//获取动作
//拼贴 //拼贴
genSketchRecon: `/api/generate/genSketchRecon`, genSketchRecon:`/api/generate/genSketchRecon`,
saveReconCanvas: `/api/generate/saveReconCanvas`, saveReconCanvas:`/api/generate/saveReconCanvas`,
//动作变换 //动作变换
poseTransform: `/api/generate/poseTransform`, poseTransform:`/api/generate/poseTransform`,
poseTransformResult: `/api/generate/poseTransformResult`, poseTransformResult:`/api/generate/poseTransformResult`,
batchUpdateLibraryName: "/api/library/batchUpdateLibraryName", //Library修改用户文件名 batchUpdateLibraryName:'/api/library/batchUpdateLibraryName',//Library修改用户文件名
batchDeleteLibrary: "/api/library/batchDeleteLibrary", //删除library batchDeleteLibrary:'/api/library/batchDeleteLibrary',//删除library
queryLibraryTopAndBottomPage: "/api/library/queryLibraryTopAndBottomPage", //Library分页列表(查询top和bottom) queryLibraryTopAndBottomPage:'/api/library/queryLibraryTopAndBottomPage',//Library分页列表(查询top和bottom)
saveOrEditTemplatePoint: "/api/library/saveOrEditTemplatePoint", //保存或者编辑template打点 saveOrEditTemplatePoint:'/api/library/saveOrEditTemplatePoint',//保存或者编辑template打点
libraryModelsDot: "/api/library/modelsDot", //Models打点预览 libraryModelsDot:'/api/library/modelsDot',//Models打点预览
chatStreamTest: `/api/python/chatStream`, //机器人助力 chatStreamTest:`/api/python/chatStream`,//机器人助力
pictureLikeOrUnLike: `/api/python/pictureLikeOrUnLike`, //机器人生成图喜欢 pictureLikeOrUnLike:`/api/python/pictureLikeOrUnLike`,//机器人生成图喜欢
getBloodBars: `/api/python/getBloodBars`, //机器人血条 getBloodBars:`/api/python/getBloodBars`,//机器人血条
//工作空间 //工作空间
workspaceDetail: `/api/workspace/detail`, //用户习惯详情 workspaceDetail:`/api/workspace/detail`,//用户习惯详情
workspaceenumValues: `/api/workspace/enumValues`, //getSex workspaceenumValues:`/api/workspace/enumValues`,//getSex
workspaceRemove: `/api/workspace/remove`, //删除用户习惯详情 workspaceRemove:`/api/workspace/remove`,//删除用户习惯详情
workspacesaveOrUpdate: `/api/workspace/saveOrUpdate`, //修改用户习惯详情 workspacesaveOrUpdate:`/api/workspace/saveOrUpdate`,//修改用户习惯详情
getMannequins: `/api/workspace/getMannequins`, //模特 getMannequins:`/api/workspace/getMannequins`,//模特
getStyleList: `/api/workspace/styleList`, //获取所有风格列表 getStyleList:`/api/workspace/styleList`,//获取所有风格列表
workspaceList: `/api/workspace/list`, workspaceList:`/api/workspace/list`,
sketchAndPrintGenerate: "/api/generate/sketchAndPrint", //sketchGenerate生成图片 sketchAndPrintGenerate:'/api/generate/sketchAndPrint',//sketchGenerate生成图片
generatePrepare: "/api/generate/prepare", //开始生成generate图片 generatePrepare:'/api/generate/prepare',//开始生成generate图片
generateStopWaiting: "/api/generate/stopWaiting", //取消生成 generateStopWaiting:'/api/generate/stopWaiting',//取消生成
generateResult: "/api/generate/result", //获取生成结果 generateResult:'/api/generate/result',//获取生成结果
generateLike: "/api/generate/like", //喜欢ganerate图片 generateLike:'/api/generate/like',//喜欢ganerate图片
generateDislike: "/api/generate/dislike", //喜欢ganerate图片 generateDislike:'/api/generate/dislike',//喜欢ganerate图片
imageToSketch: "/api/generate/imageToSketch", //成品图转为线稿 imageToSketch:'/api/generate/imageToSketch',//成品图转为线稿
modifySketch: "/api/generate/modifySketch", //修改画布内容并且储存 modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存
elementUpload: `/api/element/upload`, //上传图片 elementUpload:`/api/element/upload`,//上传图片
imageSegmentation: `/api/element/imageSegmentation`, //分割衣服 imageSegmentation:`/api/element/imageSegmentation`,//分割衣服
convertRelightElement: `/api/history/convertRelightElement`, //toproduct复制到上传图片位置 convertRelightElement:`/api/history/convertRelightElement`,//toproduct复制到上传图片位置
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片 // oldHis:`/oldHis/history/queryUserGroup`,//上传图片
sketchBoardsBoundingBox: `/api/design/sketchBoardsBoundingBox`, //裁剪sketch图片 sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片
trialOrderList: `/api/account/trialOrderList`, //获取审批列表 trialOrderList:`/api/account/trialOrderList`,//获取审批列表
switchIsAutoApproval: `/api/account/switchIsAutoApproval`, //切换是否自动审批 switchIsAutoApproval:`/api/account/switchIsAutoApproval`,//切换是否自动审批
getIsAutoApproval: `/api/account/getIsAutoApproval`, //获取是否自动审批 getIsAutoApproval:`/api/account/getIsAutoApproval`,//获取是否自动审批
trialOrderApproval: `/api/account/trialOrderApproval`, //通过审批 trialOrderApproval:`/api/account/trialOrderApproval`,//通过审批
trialOrderRefuse: `/api/account/trialOrderRefuse`, //拒绝审批 trialOrderRefuse:`/api/account/trialOrderRefuse`,//拒绝审批
//管理员接口 //管理员接口
//查询所有试用用户 //查询所有试用用户
inquiryGetTrial: `/api/inquiry/getTrial`, //查询所有试用用户 inquiryGetTrial:`/api/inquiry/getTrial`,//查询所有试用用户
getCities: `/api/inquiry/getCities`, //获取所有付款订单使用的国家 getCities:`/api/inquiry/getCities`,//获取所有付款订单使用的国家
getUserInfo: `/api/inquiry/getUserInfo`, //查询所有用户 getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
queryTransaction: `/api/inquiry/queryTransaction`, //查询交易记录 queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
queryTransactionDownload: `/api/inquiry/queryTransaction/download`, //导出交易记录 queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
createCoupon: `/api/stripe/createCoupon`, //创建优惠码 createCoupon:`/api/stripe/createCoupon`,//创建优惠码
updatePromCodeInfo: `/api/stripe/updatePromCodeInfo`, //修改优惠码 updatePromCodeInfo:`/api/stripe/updatePromCodeInfo`,//修改优惠码
getAllCoupons: `/api/stripe/getAllCoupons`, //查询优惠码列表 getAllCoupons:`/api/stripe/getAllCoupons`,//查询优惠码列表
checkCoupon: `/api/stripe/checkCoupon`, //根据优惠码获取结算后的金额 checkCoupon:`/api/stripe/checkCoupon`,//根据优惠码获取结算后的金额
deletePromCode: `/api/stripe/deletePromCode`, //删除优惠券 deletePromCode:`/api/stripe/deletePromCode`,//删除优惠券
addOrganization: `/api/inquiry/addOrganization`, //添加企业版或者教育版 addOrganization:`/api/inquiry/addOrganization`,//添加企业版或者教育版
queryOrganization: `/api/inquiry/queryOrganization`, //查询企业版或者教育版 queryOrganization:`/api/inquiry/queryOrganization`,//查询企业版或者教育版
//云生成 //云生成
designCloud: `/api/design/designCloud`, //创建云生成 designCloud:`/api/design/designCloud`,//创建云生成
cloudPage: `/api/design/cloudPage`, //创建云生成 cloudPage:`/api/design/cloudPage`,//创建云生成
cloudTaskDelete: `/api/design/cloudTaskDelete`, //删除云生成 cloudTaskDelete:`/api/design/cloudTaskDelete`,//删除云生成
cloudTaskNameUpdate: `/api/design/cloudTaskNameUpdate`, //修改云生成名字 cloudTaskNameUpdate:`/api/design/cloudTaskNameUpdate`,//修改云生成名字
getDesignCloudResult: `/api/design/getDesignCloudResult`, //查询这条云生成记录的所有内容 getDesignCloudResult:`/api/design/getDesignCloudResult`,//查询这条云生成记录的所有内容
//企业版教育版管理员页面 //企业版教育版管理员页面
subAccountList: `/api/account/subAccountList`, //查询子账号 subAccountList:`/api/account/subAccountList`,//查询子账号
addOrUpdateSubAccount: `/api/account/addOrUpdateSubAccount`, //添加子账号 addOrUpdateSubAccount:`/api/account/addOrUpdateSubAccount`,//添加子账号
deleteSubAccount: `/api/account/deleteSubAccount`, //删除子账号 deleteSubAccount:`/api/account/deleteSubAccount`,//删除子账号
subAccountImportExcelDownload: `/api/account/subAccountImportExcelDownload`, //批量添加模板下载模板 subAccountImportExcelDownload:`/api/account/subAccountImportExcelDownload`,//批量添加模板下载模板
subAccountImport: `/api/account/subAccountImport`, //模板导入 subAccountImport:`/api/account/subAccountImport`,//模板导入
getGenerateFrequency: `/api/inquiry/getGenerateFrequency`, //积分使用详情 getGenerateFrequency:`/api/inquiry/getGenerateFrequency`,//积分使用详情
getAllGenerateFuncName: `/api/inquiry/getAllGenerateFuncName`, //获取所有generate类型 getAllGenerateFuncName:`/api/inquiry/getAllGenerateFuncName`,//获取所有generate类型
//查询某个时间内design点击次数 //查询某个时间内design点击次数
getDesignStatistic: `/api/inquiry/getDesignStatistic`, //拒绝审批 getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
getAllQuestionnaire: `/api/inquiry/getAllQuestionnaire`, //拒绝审批 getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
getActiveUserFunc: `/api/inquiry/getActiveUserFunc`, //获取各模块功能 getActiveUserFunc:`/api/inquiry/getActiveUserFunc`,//获取各模块功能
toProductImageElementDelete: `/api/history/toProductImageElementDelete`, //删除指定模块上传的内容 toProductImageElementDelete:`/api/history/toProductImageElementDelete`,//删除指定模块上传的内容
recentActiveUser: `/api/inquiry/recentActiveUser`, //获取近期活跃用户 recentActiveUser:`/api/inquiry/recentActiveUser`,//获取近期活跃用户
recentActiveUserChart: `/api/inquiry/recentActiveUserChart`, //获取近期活跃用户图表数据 recentActiveUserChart:`/api/inquiry/recentActiveUserChart`,//获取近期活跃用户图表数据
recentNewUser: `/api/inquiry/recentNewUser`, //获取近期新增用户 recentNewUser:`/api/inquiry/recentNewUser`,//获取近期新增用户
recentNewUserChart: `/api/inquiry/recentNewUserChart`, //获取新增用户图表 recentNewUserChart:`/api/inquiry/recentNewUserChart`,//获取新增用户图表
trialUserCountry: `/api/inquiry/trialUserCountry`, //试用用户国家-城市分布 trialUserCountry:`/api/inquiry/trialUserCountry`,//试用用户国家-城市分布
conversionRate: `/api/inquiry/conversionRate`, //试用用户国家-城市分布 conversionRate:`/api/inquiry/conversionRate`,//试用用户国家-城市分布
getAllUserId: `/api/inquiry/getAllUserId`, //获取所有用户id和Name getAllUserId:`/api/inquiry/getAllUserId`,//获取所有用户id和Name
adminAddUser: `/api/inquiry/addUser`, //添加用户 adminAddUser:`/api/inquiry/addUser`,//添加用户
modifyUser: `/api/inquiry/modifyUser`, //修改用户 modifyUser:`/api/inquiry/modifyUser`,//修改用户
publishSysMessage: `/api/message/publishSysMessage`, //发布系统任务 publishSysMessage:`/api/message/publishSysMessage`,//发布系统任务
//affiliate接口 //affiliate接口
viewsIncrease: `/api/affiliate/viewsIncrease`, //增加访问量 viewsIncrease:`/api/affiliate/viewsIncrease`,//增加访问量
affiliateRegistration: `/api/affiliate/registration`, //affiliate注册 affiliateRegistration:`/api/affiliate/registration`,//affiliate注册
personalCenter: `/api/affiliate/personalCenter`, //affiliate个人中心 personalCenter:`/api/affiliate/personalCenter`,//affiliate个人中心
affiliateList: `/api/affiliate/list`, //affiliate审批列表 affiliateList:`/api/affiliate/list`,//affiliate审批列表
getEachAffiliateGeneratedRevenue: `/api/affiliate/getEachAffiliateGeneratedRevenue`, //affiliate每个用户根据日期查询收益 getEachAffiliateGeneratedRevenue:`/api/affiliate/getEachAffiliateGeneratedRevenue`,//affiliate每个用户根据日期查询收益
affiliateApproval: `/api/affiliate/approval`, //affiliate同意 审批 affiliateApproval:`/api/affiliate/approval`,//affiliate同意 审批
getPersonalMonthlyIncome: `/api/affiliate/getPersonalMonthlyIncome`, //affiliate图表接口 getPersonalMonthlyIncome:`/api/affiliate/getPersonalMonthlyIncome`,//affiliate图表接口
getTasksList:`/api/tasks/getList`,//获取w为执行完的所有任务
getTasksHistory:`/api/tasks/getAllTask`,//获取所有任务列表
prepareForSR:`/api/python/prepareForSR`,//超分
getTasksList: `/api/tasks/getList`, //获取w为执行完的所有任务
getTasksHistory: `/api/tasks/getAllTask`, //获取所有任务列表
prepareForSR: `/api/python/prepareForSR`, //超分
//作品广场 //作品广场
publish: `/api/portfolio/publish`, //发布作品到作品广场 publish:`/api/portfolio/publish`,//发布作品到作品广场
getPorfolio: `/api/portfolio/page`, //查询作品广场 getPorfolio:`/api/portfolio/page`,//查询作品广场
getPorfolioDetail: `/api/portfolio/detail`, //查询作品广场作品详情 getPorfolioDetail:`/api/portfolio/detail`,//查询作品广场作品详情
setPorfolioChoose: `/api/portfolio/choose`, //二次创作 setPorfolioChoose:`/api/portfolio/choose`,//二次创作
portfolioLike: `/api/portfolio/like`, //作品广场点赞 portfolioLike:`/api/portfolio/like`,//作品广场点赞
portfolioNoLike: `/api/portfolio/unlike`, //作品广场取消点赞 portfolioNoLike:`/api/portfolio/unlike`,//作品广场取消点赞
portfolioComment: `/api/portfolio/comment`, //作品广场评论 portfolioComment:`/api/portfolio/comment`,//作品广场评论
portfolioCommentPage: `/api/portfolio/commentPage`, //作品广场评论列表 portfolioCommentPage:`/api/portfolio/commentPage`,//作品广场评论列表
commentDelete: `/api/portfolio/commentDelete`, //删除评论 commentDelete:`/api/portfolio/commentDelete`,//删除评论
porfolioDelete: `/api/portfolio/delete`, //删除作品 porfolioDelete:`/api/portfolio/delete`,//删除作品
porfolioFollow: `/api/portfolio/follow`, //删除作品 porfolioFollow:`/api/portfolio/follow`,//删除作品
porfolioFollow: `/api/portfolio/follow`, //关注 porfolioFollow:`/api/portfolio/follow`,//关注
porfolioCancelFollow: `/api/portfolio/cancelFollow`, //取消关注 porfolioCancelFollow:`/api/portfolio/cancelFollow`,//取消关注
porfolioGetFolloweeList: `/api/portfolio/getFolloweeList`, //获取关注列表 porfolioGetFolloweeList:`/api/portfolio/getFolloweeList`,//获取关注列表
porfolioGetFollowerList: `/api/portfolio/getFollowerList`, //获取粉丝列表 porfolioGetFollowerList:`/api/portfolio/getFollowerList`,//获取粉丝列表
//product生成 //product生成
toProduct: `/api/history/toProduct`, //开始生成 toProduct:`/api/history/toProduct`,//开始生成
toProductImageResult: `/api/history/toProductImageResult`, //获取结果 toProductImageResult:`/api/history/toProductImageResult`,//获取结果
toProductImageElementUpload: `/api/history/toProductImageElementUpload`, //上传 toProductImageElementUpload:`/api/history/toProductImageElementUpload`,//上传
productImageLike: `/api/history/productImageLike`, //like生成结果 productImageLike:`/api/history/productImageLike`,//like生成结果
productImageUnLike: `/api/history/productImageUnLike`, //取消like生成结果 productImageUnLike:`/api/history/productImageUnLike`,//取消like生成结果
productImageLikeList: `/api/history/productImageLikeList`, //like生成结果 productImageLikeList:`/api/history/productImageLikeList`,//like生成结果
//打光 //打光
relight: `/api/history/relight`, //开始生成 relight:`/api/history/relight`,//开始生成
relightResult: `/api/history/relightResult`, //开始生成 relightResult:`/api/history/relightResult`,//开始生成
//保存画布 //保存画布
canvasElementUpload: `/api/history/canvasElementUpload`, //画布上传临时图片 canvasElementUpload:`/api/history/canvasElementUpload`,//画布上传临时图片
exportSave: `/api/history/exportSave`, //保存画布 exportSave:`/api/history/exportSave`,//保存画布
exportSearch: `/api/history/exportSearch`, //保存画布 exportSearch:`/api/history/exportSearch`,//保存画布
//活动 //活动
activity: `/api/account/activity`, activity:`/api/account/activity`,
//bradDNA //bradDNA
brandLogoUpload: `/api/history/brandLogoUpload`, //上传bradDNA brandLogoUpload:`/api/history/brandLogoUpload`,//上传bradDNA
brandDNAGenerate: `/api/history/brandDNAGenerate`, //上传bradDNA brandDNAGenerate:`/api/history/brandDNAGenerate`,//上传bradDNA
brandDNAUpload: `/api/history/brandDNAUpload`, //上传DNA图片 brandDNAUpload:`/api/history/brandDNAUpload`,//上传DNA图片
getInitializeProgress: `/api/history/getInitializeProgress`, //获取brand进度 getInitializeProgress:`/api/history/getInitializeProgress`,//获取brand进度
brandDNADelete: `/api/history/brandDNADelete`, //删除brandDna brandDNADelete:`/api/history/brandDNADelete`,//删除brandDna
brandDNAPage: `/api/history/brandDNAPage`, //brand列表 brandDNAPage:`/api/history/brandDNAPage`,//brand列表
brandDNASaveOrUpdate: `/api/history/brandDNASaveOrUpdate`, //提交个人信息 brandDNASaveOrUpdate:`/api/history/brandDNASaveOrUpdate`,//提交个人信息
productImageInitialize: `/api/history/productImageInitialize`, //产品识别 productImageInitialize:`/api/history/productImageInitialize`,//产品识别
//调查问卷 //调查问卷
questionnaire: `/api/account/questionnaire`, //保存画布 questionnaire:`/api/account/questionnaire`,//保存画布
//消息系统 //消息系统
getUnreadCount: `/api/message/getUnreadCount`, //获取未读消息 getUnreadCount:`/api/message/getUnreadCount`,//获取未读消息
setReadStatus: `/api/message/setReadStatus`, //设置消息已读 setReadStatus:`/api/message/setReadStatus`,//设置消息已读
getHistoryNotification: `/api/message/getHistoryNotification`, //获取历史消息 getHistoryNotification:`/api/message/getHistoryNotification`,//获取历史消息
oneClickRead: `/api/message/oneClickRead`, //全部设为已读 oneClickRead:`/api/message/oneClickRead`,//全部设为已读
personalHomepage: `/api/account/personalHomepage`, //获取个人主页信息 personalHomepage:`/api/account/personalHomepage`,//获取个人主页信息
refreshMinioUrl:`/api/third/party/refreshMinioUrl`,//获取可以使用的minio地址
}, },
axiosGet(url, config) { axiosGet(url,config) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (isLoginTime && url != "/api/portfolio/page") { if(isLoginTime && url != '/api/portfolio/page') {
resolve(""); resolve('')
return; return
} }
axios axios.get(url,config).then(response => {
.get(url, config) resolve(response)
.then((response) => { }).catch((error) => {
resolve(response); reject(error)
}) })
.catch((error) => {
reject(error);
});
}); });
}, },
axiosPut(url, data) { axiosPut(url, data) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (isLoginTime && url != "/api/portfolio/page") { if(isLoginTime && url != '/api/portfolio/page') {
resolve(""); resolve('')
return; return
} }
axios axios.put(url, data).then(response => {
.put(url, data) resolve(response)
.then((response) => { }).catch((error) => {
resolve(response); reject(error)
}) })
.catch((error) => {
reject(error);
});
}); });
}, },
axiosPost(url, data, config) { axiosPost(url, data,config) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (isLoginTime && url != "/api/portfolio/page") { if(isLoginTime && url != '/api/portfolio/page') {
resolve(""); resolve('')
return; return
} }
axios axios.post(url, data,config).then(response => {
.post(url, data, config) resolve(response)
.then((response) => { }).catch((error) => {
resolve(response); reject(error)
}) })
.catch((error) => {
reject(error);
});
}); });
}, },
axiosDelete(url, newData) { axiosDelete(url, newData) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (isLoginTime && url != "/api/portfolio/page") { if(isLoginTime && url != '/api/portfolio/page') {
resolve(""); resolve('')
return; return
} }
axios axios.delete(url,{data:newData}).then(response => {
.delete(url, { data: newData }) resolve(response)
.then((response) => { }).catch((error) => {
resolve(response); reject(error)
}) })
.catch((error) => {
reject(error);
});
}); });
}, },
};
}

View File

@@ -47,7 +47,7 @@
<div class="btn"> <div class="btn">
<i class="fi fi-br-menu-dots-vertical" v-show="!childItem.editName" @click.stop="editHistory(childItem,index,$event,item[historyTypeItem])"></i> <i class="fi fi-br-menu-dots-vertical" v-show="!childItem.editName" @click.stop="editHistory(childItem,index,$event,item[historyTypeItem])"></i>
<i class="fi fi-br-check" v-show="childItem.editName" @click.stop="accomplishHistory(childItem,index,$event)"></i> <i class="fi fi-br-check" v-show="childItem.editName" @click.stop="accomplishHistory(childItem,index,$event)"></i>
<div class="operation" v-show="historyData.selectHistoryIndex == index"> <div class="operation" v-show="historyData.selectHistoryId == childItem.id">
<div class="item" @click.stop="editName(childItem)"> <div class="item" @click.stop="editName(childItem)">
<i class="fi fi-rr-edit"></i> <i class="fi fi-rr-edit"></i>
<span>Rename</span> <span>Rename</span>
@@ -306,7 +306,7 @@ export default defineComponent({
searchCollectionName:'', searchCollectionName:'',
historyTextarea:'', historyTextarea:'',
updateTimeType:['Todaylist','Yesterdaylist','WithinAWeeklist','EarlierTodaylist'], updateTimeType:['Todaylist','Yesterdaylist','WithinAWeeklist','EarlierTodaylist'],
selectHistoryIndex:-1, selectHistoryId:-1,
page:1, page:1,
size:10, size:10,
isToday:false, isToday:false,
@@ -581,33 +581,33 @@ export default defineComponent({
}); });
} }
const editHistory = (item,index,el,list)=>{ const editHistory = (item,index,el,list)=>{
if(homeMainData.historyData.selectHistoryIndex == -1){ if(homeMainData.historyData.selectHistoryId == -1){
let top = el.target.parentNode.parentNode.getBoundingClientRect().top let top = el.target.parentNode.parentNode.getBoundingClientRect().y
let parentTop = el.target.parentNode.parentNode.parentNode.offsetTop let parentTop = el.target.parentNode.parentNode.parentNode.parentNode.parentNode.getBoundingClientRect().y
let parentHeight = el.target.parentNode.parentNode.parentNode.offsetHeight let parentHeight = el.target.parentNode.parentNode.parentNode.parentNode.parentNode.offsetHeight
let operation = el.target.parentNode.querySelector('.operation') let operation = el.target.parentNode.querySelector('.operation')
homeMainData.historyData.selectHistoryIndex = index homeMainData.historyData.selectHistoryId = item.id
//判断弹窗是加载按钮上面还是下面 //判断弹窗是加载按钮上面还是下面
if(list.length == 1){ if(list.length == 1){
operation.classList.add('activeLeft') operation.classList.add('activeLeft')
return return
} }
if((parentTop+parentHeight)/2 < top){//加在按钮上面 if(top > parentHeight/2 + parentTop){//加在按钮上面
operation.classList.add('active') operation.classList.add('active')
}else{ }else{
operation.classList.remove('active') operation.classList.remove('active')
} }
}else{ }else{
homeMainData.historyData.selectHistoryIndex = -1 homeMainData.historyData.selectHistoryId = -1
} }
let operationCli = ()=>{ let operationCli = ()=>{
homeMainData.historyData.selectHistoryIndex = -1 homeMainData.historyData.selectHistoryId = -1
document.removeEventListener("click", operationCli); document.removeEventListener("click", operationCli);
} }
document.addEventListener("click",operationCli,); document.addEventListener("click",operationCli,);
} }
const editName = (item)=>{ const editName = (item)=>{
homeMainData.historyData.selectHistoryIndex = -1 homeMainData.historyData.selectHistoryId = -1
for (const key in homeMainData.openTypeList.history) { for (const key in homeMainData.openTypeList.history) {
let list = ['EarlierTodaylist','Todaylist','WithinAWeeklist','Yesterdaylist'] let list = ['EarlierTodaylist','Todaylist','WithinAWeeklist','Yesterdaylist']
if(list.indexOf(key) == -1)continue if(list.indexOf(key) == -1)continue
@@ -622,7 +622,7 @@ export default defineComponent({
const deleteItem = (item)=>{ const deleteItem = (item)=>{
Https.axiosPost(Https.httpUrls.projectDetail,{},{params:{projectId:item.id}}).then( Https.axiosPost(Https.httpUrls.projectDetail,{},{params:{projectId:item.id}}).then(
(rv) => { (rv) => {
homeMainData.historyData.selectHistoryIndex = -1 homeMainData.historyData.selectHistoryId = -1
settingGetHistory() settingGetHistory()
if(homeMainData.openTypeChild == item.id){ if(homeMainData.openTypeChild == item.id){
router.push('/home') router.push('/home')
@@ -653,7 +653,7 @@ export default defineComponent({
} }
const bathGeneration = (item)=>{ const bathGeneration = (item)=>{
homeMainData.openType = '' homeMainData.openType = ''
homeMainData.historyData.selectHistoryIndex = -1 homeMainData.historyData.selectHistoryId = -1
router.push(`/home/cloud?type=creation&id=${item.id}&name=${item.name}`) router.push(`/home/cloud?type=creation&id=${item.id}&name=${item.name}`)
} }
return { return {

View File

@@ -423,13 +423,17 @@
(selectCode == 'Sketchboard')" class="fi fi-bs-magic-wand" style="background-color: #000; font-size: 2.3rem; flex: 1;margin: 0;"></i> (selectCode == 'Sketchboard')" class="fi fi-bs-magic-wand" style="background-color: #000; font-size: 2.3rem; flex: 1;margin: 0;"></i>
<span v-else>{{ $t('LibraryPage.Generate') }}</span> <span v-else>{{ $t('LibraryPage.Generate') }}</span>
</div> </div>
<div class="icon iconfont icon-xiala" v-show=" <div class="icon iconfont icon-xiala"
selectCode == 'Moodboard' || v-show="(selectCode == 'Sketchboard') ||
(selectCode == 'Printboard' && scene?.value == 'Pattern') || (selectCode == 'Printboard' && scene.value == 'Pattern') || selectCode == 'Moodboard'"
(selectCode == 'Sketchboard')" :class="{active:speedState}" @click.stop="openSpeed"></div> :class="{active:speedState}" @click.stop="openSpeed"></div>
</div> </div>
<div class="content" v-if="scene?.value != 'extract'" v-show="speedState"> <div class="content" v-if="scene?.value != 'extract'" v-show="speedState">
<div v-for="item in speedList" :class="{active:item.value == speedData.value}" v-show="(selectCode == 'Moodboard' && item?.value != 'flux') || (selectCode == 'Sketchboard' && item?.value != 'flux') || selectCode == 'Printboard'" :key="item.value" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div> <div v-for="item in speedList" :class="{active:item.value == speedData.value}"
v-show="(selectCode == 'Moodboard' && item?.value != 'flux') ||
(selectCode == 'Sketchboard' && item?.value != 'flux') ||
(selectCode == 'Printboard')"
:key="item.value" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div>
</div> </div>
<div class="content" v-else v-show="speedState"> <div class="content" v-else v-show="speedState">
<div v-for="item in extractList" :class="{active:item.value == speedData.value}" :key="item.value" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div> <div v-for="item in extractList" :class="{active:item.value == speedData.value}" :key="item.value" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div>
@@ -716,14 +720,14 @@ export default defineComponent({
title:'Generate using Wanxiang', title:'Generate using Wanxiang',
label:'WX', label:'WX',
value:'wx', value:'wx',
},{
title:'',
label:'FLUX',
value:'flux',
}, },
], ],
extractList:[ extractList:[
{ {
title:'This method may produce slight discrepancies between the extracted line art and the original image.',
label:'High',
value:'',
},{
title:'Note: The extracted line art might have minor variations from the original.', title:'Note: The extracted line art might have minor variations from the original.',
label:'FLUX', label:'FLUX',
value:'flux', value:'flux',
@@ -774,7 +778,7 @@ export default defineComponent({
level1Type:selectCode.value, level1Type:selectCode.value,
level2Type:design, level2Type:design,
page:1, page:1,
ageGroup:selectCode.value == 'Sketchboard'?pageData.ageGroup:'', ageGroup:selectCode.value == 'Models'?pageData.ageGroup:'',
modelSex:sex.value?sex.value:'', modelSex:sex.value?sex.value:'',
pictureName:searchPictureName.value, pictureName:searchPictureName.value,
size:pageSize.value, size:pageSize.value,
@@ -933,9 +937,13 @@ export default defineComponent({
} }
if(newVal.value == 'extract'){ if(newVal.value == 'extract'){
this.speedData = this.extractList[0] this.speedData = this.extractList[0]
}else if(newVal.value == 'Logo' || newVal.value == 'Slogan'){
this.speedData.value = ''
this.speedData.label = ''
}else{ }else{
this.speedData = this.speedList[0] this.speedData = this.speedList[0]
} }
this.speedState = false
} }
}, },
'$route.query':{ '$route.query':{