修复detailbug 添加云生成没有图片的提示

This commit is contained in:
X1627315083
2025-04-23 17:30:42 +08:00
parent dc092b64a1
commit ac06be639c
6 changed files with 54 additions and 28 deletions

View File

@@ -262,7 +262,6 @@ export default defineComponent({
let gradient = null let gradient = null
let newData = list[i]?.newDetail?.[detailData.currentDetailType] let newData = list[i]?.newDetail?.[detailData.currentDetailType]
let isCurrent = list[i].id == detailData?.selectDetail?.id let isCurrent = list[i].id == detailData?.selectDetail?.id
let data:any = { let data:any = {
changed:false, changed:false,
color:(newData && detailData.currentDetailType == 'color' && isCurrent)?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`, color:(newData && detailData.currentDetailType == 'color' && isCurrent)?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`,
@@ -278,7 +277,7 @@ export default defineComponent({
priority, priority,
scale, scale,
type:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.level2Type:list[i].type, type:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.level2Type:list[i].type,
sketchString:'', sketchString:list[i].sketchString?list[i].sketchString:'',
trims:(newData && detailData.currentDetailType == 'element' && isCurrent)?{prints:newData}:list[i].trims?list[i].trims:{prints:[]}, trims:(newData && detailData.currentDetailType == 'element' && isCurrent)?{prints:newData}:list[i].trims?list[i].trims:{prints:[]},
} }
if((list[i].color?.gradient || list[i].newDetail?.color?.gradient)){ if((list[i].color?.gradient || list[i].newDetail?.color?.gradient)){

View File

@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
</div> </div>
<workflow v-if="selectObject?.type" ref="workflow" @goHome="()=>state = 1" :workflowType="selectObject.type" :httpWorkflowType="selectObject.httpType" :workflowTitle="selectObject.title"></workflow> <workflow v-if="selectObject?.type" ref="workflow" @goHome="()=>state = 1" :workflowType="selectObject.type" :httpWorkflowType="selectObject.httpType" :workflowTitle="opjectList.filter((item)=>item.value == selectObject.type)[0].title"></workflow>
<div class="mark_loading" v-show="isShowMark"> <div class="mark_loading" v-show="isShowMark">
<a-spin size="large" /> <a-spin size="large" />
</div> </div>

View File

@@ -24,11 +24,11 @@
</div> </div>
</div> </div>
<div class="modal_title_text"> <div class="modal_title_text">
<div>Cloud generation task</div> <div>Create Cloud Generation Tasks</div>
</div> </div>
<div class="allUserPoeration_center admin_page"> <div class="allUserPoeration_center admin_page">
<div class="admin_state_item"> <div class="admin_state_item">
<span>Build type <span>*</span></span> <span>Task type <span>*</span></span>
<a-select <a-select
v-model:value="buildType" v-model:value="buildType"
allowClear allowClear
@@ -38,14 +38,14 @@
@change="changeBuildType" @change="changeBuildType"
></a-select> ></a-select>
</div> </div>
<div class="admin_state_item" > <div class="admin_state_item" v-show="buildType">
<span>Number of images <span>*</span></span> <span>Quantity <span>*</span></span>
<input <input
v-model="numberOfImages" v-model="numberOfImages"
:disabled="buildType =='relight' || buildType == 'poseTransfer'"
placeholder="Please enter number" placeholder="Please enter number"
type="text" type="text"
style="width: 200px" style="width: 200px"
@input="changeNumberOfImages"
/> />
</div> </div>
<!-- toProductimg --> <!-- toProductimg -->
@@ -100,14 +100,14 @@
<!-- <div class="admin_state_item" style="width: 100%;"> <!-- <div class="admin_state_item" style="width: 100%;">
<span style="margin: 0;">Generation time19min</span> <span style="margin: 0;">Generation time19min</span>
</div> --> </div> -->
<div class="admin_state_item" style="width: 100%;"> <div v-show="buildType" class="admin_state_item" style="width: 100%;">
<span style="margin: 0;">Cost credit{{credits * numberOfImages}}</span> <span style="margin: 0;">Cost credit{{credits * numberOfImages}}</span>
</div> </div>
</div> </div>
<div class="allUserPoeration_btn admin_page"> <div class="allUserPoeration_btn admin_page">
<div class="admin_search_item" @click="cancelDsign"> <!-- <div class="admin_search_item" @click="cancelDsign">
Close Close
</div> </div> -->
<div class="admin_search_item" @click="setOk"> <div class="admin_search_item" @click="setOk">
OK OK
</div> </div>
@@ -183,10 +183,8 @@ export default defineComponent({
operationsData.exhibitionImgList = store.state.UploadFilesModule.modularData.design.likeData operationsData.exhibitionImgList = store.state.UploadFilesModule.modularData.design.likeData
}else if(operationsData.buildType == 'relight'){ }else if(operationsData.buildType == 'relight'){
operationsData.exhibitionImgList = store.state.UploadFilesModule.modularData.toProduct operationsData.exhibitionImgList = store.state.UploadFilesModule.modularData.toProduct
operationsData.numberOfImages = operationsData.exhibitionImgList.length
}else if(operationsData.buildType == 'poseTransfer'){ }else if(operationsData.buildType == 'poseTransfer'){
operationsData.exhibitionImgList = store.state.UploadFilesModule.modularData.toProduct operationsData.exhibitionImgList = store.state.UploadFilesModule.modularData.toProduct
operationsData.numberOfImages = operationsData.exhibitionImgList.length
} }
props.cloudList.forEach((item)=>{ props.cloudList.forEach((item)=>{
if(item.value == operationsData.buildType){ if(item.value == operationsData.buildType){
@@ -269,11 +267,12 @@ export default defineComponent({
let setOk = ()=>{ let setOk = ()=>{
let data let data
data = setAddData() data = setAddData()
console.log(data) if(operationsData.buildType == 'toProductImage'){
if(operationsData.buildType == 'toProductImage' || operationsData.buildType == 'relight'){ if(data.toProductImage.toProductImageVOList.length == 0)return message.warning("You need to go to the Design module and generate a design result first before you can use the 'To Product Image' cloud generation feature.")
if(data.toProductImage.toProductImageVOList.length == 0)return message.warning('Please select the image') }else if(operationsData.buildType == 'relight'){
if(data.toProductImage.toProductImageVOList.length == 0)return message.warning("You need to go to the 'To Product Image' module and generate a result first before you can use the 'Relight' cloud generation feature.")
}else if(operationsData.buildType == 'poseTransfer'){ }else if(operationsData.buildType == 'poseTransfer'){
if(data.poseTransform.length == 0)return message.warning('Please enter the number of images') if(data.poseTransform.length == 0)return message.warning("You must first generate results in the 'To Product Image' module before you can use the 'Transfer Pose' cloud generation feature.")
} }
if(!data.buildType || !data.nums)return message.warning('Please check the input box marked with *') if(!data.buildType || !data.nums)return message.warning('Please check the input box marked with *')
operations.loadingShow = true operations.loadingShow = true
@@ -288,6 +287,13 @@ export default defineComponent({
operations.loadingShow = false operations.loadingShow = false
}) })
} }
const changeNumberOfImages = ()=>{
if(operationsData.buildType =='relight' || operationsData.buildType == 'poseTransfer'){
if(operationsData.exhibitionImgList.length < Number(operationsData.numberOfImages)){
operationsData.numberOfImages = operationsData.exhibitionImgList.length
}
}
}
return { return {
...toRefs(operations), ...toRefs(operations),
...toRefs(operationsData), ...toRefs(operationsData),
@@ -297,6 +303,7 @@ export default defineComponent({
blur, blur,
setOk, setOk,
changeBuildType, changeBuildType,
changeNumberOfImages,
}; };
}, },
data() { data() {

View File

@@ -9,7 +9,7 @@
</div> </div>
</div> </div>
<div class="createCloud"> <div class="createCloud">
<div class="gallery_btn" @click="createClound">Create cloudUploading</div> <div class="gallery_btn" @click="createClound">Create</div>
</div> </div>
</div> </div>
<div class="contentList"> <div class="contentList">
@@ -125,23 +125,43 @@ export default defineComponent({
}, },
cloudTiltleList:[ cloudTiltleList:[
{ {
name:'File name', name:'Task type',
value:'name',
},{
name:'Build Type',
value:'buildType', value:'buildType',
fun:(value:any)=>{
let str = ''
if(value == 'design')str = 'Design'
if(value == 'toProductImage')str = 'To Product Image'
if(value == 'relight')str = 'Relight'
if(value == 'poseTransfer')str = 'Transfer Pose'
return str
}
},{ },{
name:'Generate quantity', name:'Quantity generated',
value:'nums', value:'nums',
},{ },{
name:'Task time', name:'Creation time',
value:'updateTime', value:'updateTime',
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:'Schedule', name:'Start time',
value:'updateTime',
fun:(value:any)=>{
//没开始内容为 -
if(!value)return
return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0]
}
},{
name:'End time',
value:'updateTime',
fun:(value:any)=>{
if(!value)return
return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0]
}
},{
name:'Status',
value:'process', value:'process',
fun:(value:any)=>{ fun:(value:any)=>{
if(value == '100.00%'){ if(value == '100.00%'){

View File

@@ -21,7 +21,7 @@
</div> </div>
<div v-show="!navListData?.find((item:any) => item.value === selectKey_)?.name "> <div v-show="!navListData?.find((item:any) => item.value === selectKey_)?.name ">
<i class="fi fi-rr-cloud-upload-alt"></i> <i class="fi fi-rr-cloud-upload-alt"></i>
All files Cloud Generation Tasks
</div> </div>
</div> </div>
<div class="text" @click="setBack()"><i class="fi fi-bs-down-left-and-up-right-to-center"></i></div> <div class="text" @click="setBack()"><i class="fi fi-bs-down-left-and-up-right-to-center"></i></div>
@@ -31,7 +31,7 @@
</div> </div>
</div> </div>
<div v-if="!isUpdataPorject && !selectObject.id" class="workflow"> <div v-if="!isUpdataPorject && !selectObject.id" class="workflow">
<workspace :firstTime="true" :workflowType="workflowType" @setProject="setProject" :httpWorkflowType="httpWorkflowType"></workspace> <workspace :firstTime="true" :workflowType="workflowType" @setProject="setProject" :workflowTitle="workflowTitle" :httpWorkflowType="httpWorkflowType"></workspace>
</div> </div>
<div class="mark_loading" v-show="isShowMark"> <div class="mark_loading" v-show="isShowMark">
<a-spin size="large" /> <a-spin size="large" />

View File

@@ -3,7 +3,7 @@
<div class="workspaceBox"> <div class="workspaceBox">
<div class="title marginBottom" style=" display:flex;align-items: center;"> <div class="title marginBottom" style=" display:flex;align-items: center;">
<i v-if="firstTime" @click="setBack" style="font-size:3rem; display:flex; cursor: pointer;margin-right:2rem" class="fi fi-rr-arrow-small-left"></i> <i v-if="firstTime" @click="setBack" style="font-size:3rem; display:flex; cursor: pointer;margin-right:2rem" class="fi fi-rr-arrow-small-left"></i>
Project setting ({{ workflowTitle }}) Project setting <div v-show="workflowTitle" style="font-size: 1.4rem;margin-top: auto;">({{ workflowTitle }})</div>
</div> </div>
<div class="projectName marginBottom" v-if="show.title"> <div class="projectName marginBottom" v-if="show.title">
<div class="text">Project name: <span style="color: red;">*</span></div> <div class="text">Project name: <span style="color: red;">*</span></div>