2025-04-16 10:43:54 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="uploading">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<div class="list">
|
|
|
|
|
<div
|
|
|
|
|
class="titleItem active"
|
|
|
|
|
>
|
|
|
|
|
<span class="detailText">All</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="createCloud">
|
2025-04-23 17:30:42 +08:00
|
|
|
<div class="gallery_btn" @click="createClound">Create</div>
|
2025-04-16 10:43:54 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="contentList">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<div class="titleItem" v-for="item in cloudTiltleList" :key="item.value">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-04-16 15:08:59 +08:00
|
|
|
<div class="content">
|
|
|
|
|
<tr v-for="(row, index) in contentList" :key="index">
|
|
|
|
|
<td v-for="header in cloudTiltleList" :key="header.value">
|
|
|
|
|
<span v-show="header.value != 'operation'">
|
2025-04-23 09:39:24 +08:00
|
|
|
{{header?.fun?header.fun(row[header.value]) : row[header.value]}}
|
2025-04-16 15:08:59 +08:00
|
|
|
</span>
|
2025-04-23 16:20:53 +08:00
|
|
|
<span style="color: #007EE5; cursor: pointer;" v-show="header.value == 'operation'" @click="detailIamge(row)">
|
|
|
|
|
Review
|
2025-04-16 15:08:59 +08:00
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</div>
|
2025-04-23 09:39:24 +08:00
|
|
|
<a-pagination style="text-align: center;" v-model:current="currentPage" :total="total" show-less-items />
|
2025-04-16 10:43:54 +08:00
|
|
|
</div>
|
2025-04-23 09:39:24 +08:00
|
|
|
<createCloud ref="createCloud" :cloudList="generateList[workflowType]" @getContentList="submitGetContentList"></createCloud>
|
2025-04-16 10:43:54 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
2025-04-23 09:39:24 +08:00
|
|
|
import { defineComponent,computed,ref,onMounted,nextTick,createVNode,toRefs, reactive, onBeforeUnmount} from 'vue'
|
2025-04-16 10:43:54 +08:00
|
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
import { Https } from "@/tool/https";
|
|
|
|
|
import { useStore } from "vuex";
|
|
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
|
import createCloud from "./createCloud.vue";
|
2025-04-23 09:39:24 +08:00
|
|
|
import { da } from 'element-plus/es/locale';
|
2025-04-16 10:43:54 +08:00
|
|
|
export default defineComponent({
|
|
|
|
|
components:{
|
|
|
|
|
createCloud,
|
|
|
|
|
},
|
|
|
|
|
props:{
|
|
|
|
|
workflowType:{
|
|
|
|
|
type:String,
|
|
|
|
|
default:'' as any,
|
|
|
|
|
required:true
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-04-23 09:39:24 +08:00
|
|
|
emits:['retrieve'],
|
2025-04-16 10:43:54 +08:00
|
|
|
setup(props,{emit}) {
|
|
|
|
|
const store = useStore();
|
|
|
|
|
const data = reactive({
|
|
|
|
|
pageType:'list',
|
2025-04-23 09:39:24 +08:00
|
|
|
pageSize:10,
|
|
|
|
|
currentPage:1,
|
|
|
|
|
total:0,
|
|
|
|
|
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
|
2025-04-16 10:43:54 +08:00
|
|
|
generateList:{
|
|
|
|
|
seriesDesign:[
|
|
|
|
|
{
|
2025-04-23 09:39:24 +08:00
|
|
|
label:'Design',
|
|
|
|
|
value:'design',
|
|
|
|
|
consumption:0,
|
|
|
|
|
},{
|
|
|
|
|
label:'To Product Image',
|
|
|
|
|
value:'toProductImage',
|
|
|
|
|
consumption:5,
|
|
|
|
|
},{
|
|
|
|
|
label:'Relight',
|
|
|
|
|
value:'relight',
|
|
|
|
|
consumption:5,
|
|
|
|
|
},{
|
|
|
|
|
label:'Transfer Pose',
|
|
|
|
|
value:'poseTransfer',
|
|
|
|
|
consumption:10,
|
|
|
|
|
},
|
2025-04-16 10:43:54 +08:00
|
|
|
],
|
|
|
|
|
singleProductDesign:[
|
|
|
|
|
{
|
2025-04-23 10:08:23 +08:00
|
|
|
label:'Design',
|
|
|
|
|
value:'design',
|
|
|
|
|
consumption:0,
|
|
|
|
|
},{
|
|
|
|
|
label:'To Product Image',
|
|
|
|
|
value:'toProductImage',
|
|
|
|
|
consumption:5,
|
|
|
|
|
},
|
2025-04-16 10:43:54 +08:00
|
|
|
],
|
2025-04-23 10:08:23 +08:00
|
|
|
// printDesign:[
|
|
|
|
|
// {
|
|
|
|
|
// label:'1',
|
|
|
|
|
// value:100,
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
2025-04-16 10:43:54 +08:00
|
|
|
productDrawingDesign:[
|
|
|
|
|
{
|
2025-04-23 10:08:23 +08:00
|
|
|
label:'To Product Image',
|
|
|
|
|
value:'toProductImage',
|
|
|
|
|
consumption:5,
|
|
|
|
|
},{
|
|
|
|
|
label:'Relight',
|
|
|
|
|
value:'relight',
|
|
|
|
|
consumption:5,
|
|
|
|
|
},{
|
|
|
|
|
label:'Transfer Pose',
|
|
|
|
|
value:'poseTransfer',
|
|
|
|
|
consumption:10,
|
|
|
|
|
},
|
2025-04-16 10:43:54 +08:00
|
|
|
],
|
2025-04-23 10:08:23 +08:00
|
|
|
// printingDesign3D:[
|
|
|
|
|
// {
|
|
|
|
|
// label:'1',
|
|
|
|
|
// value:100,
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
|
|
|
|
// sketchDesign:[]
|
2025-04-16 10:43:54 +08:00
|
|
|
},
|
|
|
|
|
cloudTiltleList:[
|
|
|
|
|
{
|
2025-04-23 17:30:42 +08:00
|
|
|
name:'Task type',
|
2025-04-23 09:39:24 +08:00
|
|
|
value:'buildType',
|
2025-04-23 17:30:42 +08:00
|
|
|
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
|
|
|
|
|
}
|
2025-04-16 10:43:54 +08:00
|
|
|
},{
|
2025-04-23 17:30:42 +08:00
|
|
|
name:'Quantity generated',
|
2025-04-23 09:39:24 +08:00
|
|
|
value:'nums',
|
2025-04-16 10:43:54 +08:00
|
|
|
},{
|
2025-04-23 17:30:42 +08:00
|
|
|
name:'Creation time',
|
|
|
|
|
value:'updateTime',
|
|
|
|
|
fun:(value:any)=>{
|
|
|
|
|
if(!value)return
|
|
|
|
|
return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0]
|
|
|
|
|
}
|
|
|
|
|
},{
|
|
|
|
|
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',
|
2025-04-23 09:39:24 +08:00
|
|
|
value:'updateTime',
|
|
|
|
|
fun:(value:any)=>{
|
|
|
|
|
if(!value)return
|
|
|
|
|
return value.split('T')[0] + ' ' + value.split('T')[1].split('.')[0]
|
|
|
|
|
}
|
|
|
|
|
},{
|
2025-04-23 17:30:42 +08:00
|
|
|
name:'Status',
|
2025-04-23 09:39:24 +08:00
|
|
|
value:'process',
|
|
|
|
|
fun:(value:any)=>{
|
|
|
|
|
if(value == '100.00%'){
|
|
|
|
|
return 'Completed'
|
|
|
|
|
}else{
|
|
|
|
|
return value
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-16 15:08:59 +08:00
|
|
|
},{
|
|
|
|
|
name:'Operation',
|
|
|
|
|
value:'operation',
|
2025-04-16 10:43:54 +08:00
|
|
|
},
|
2025-04-16 15:08:59 +08:00
|
|
|
] as any,
|
|
|
|
|
contentList:[
|
|
|
|
|
] as any,
|
2025-04-23 09:39:24 +08:00
|
|
|
isGetContentList:false as any,
|
2025-04-16 10:43:54 +08:00
|
|
|
})
|
|
|
|
|
const dataDom = reactive({
|
|
|
|
|
createCloud,
|
|
|
|
|
})
|
|
|
|
|
const createClound = ()=>{
|
2025-04-23 09:39:24 +08:00
|
|
|
data.isGetContentList = false
|
2025-04-16 15:08:59 +08:00
|
|
|
dataDom.createCloud.init()
|
|
|
|
|
}
|
2025-04-23 09:39:24 +08:00
|
|
|
const detailIamge = (item:any)=>{
|
|
|
|
|
//去除里面的T2025-04-17T13:45:43
|
|
|
|
|
if(item.process == '100.00%' || item.status == 1){
|
|
|
|
|
let value = {
|
|
|
|
|
taskId:item.taskId,
|
|
|
|
|
page:1,
|
|
|
|
|
size:10,
|
|
|
|
|
buildType:item.buildType,
|
|
|
|
|
}
|
|
|
|
|
Https.axiosPost(Https.httpUrls.getDesignCloudResult,value).then((rv)=>{
|
|
|
|
|
console.log(rv)
|
|
|
|
|
if(rv.design && rv.design.length > 0){
|
|
|
|
|
store.commit('addDesignCollectionList',rv.design)
|
|
|
|
|
emit('retrieve','design')
|
|
|
|
|
}else if(rv.toProductImage && rv.toProductImage.length > 0){
|
|
|
|
|
store.commit('setCloudList',{str:'toProduct',list:rv.toProductImage})
|
|
|
|
|
emit('retrieve','toProduct')
|
|
|
|
|
}else if(rv.relight && rv.relight.length > 0){
|
|
|
|
|
store.commit('setCloudList',{str:'relight',list:rv.relight})
|
|
|
|
|
emit('retrieve','relight')
|
|
|
|
|
}else if(rv.poseTransfer && rv.poseTransfer.length > 0){
|
|
|
|
|
store.commit('setCloudList',{str:'poseTransfer',list:rv.poseTransfer})
|
|
|
|
|
emit('retrieve','poseTransfer')
|
|
|
|
|
}
|
|
|
|
|
data.isGetContentList = false
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-04-16 10:43:54 +08:00
|
|
|
}
|
2025-04-23 09:39:24 +08:00
|
|
|
const getContentList = ()=>{
|
|
|
|
|
if(data.isGetContentList){
|
|
|
|
|
let value = {
|
|
|
|
|
page:data.currentPage,
|
|
|
|
|
size:data.pageSize,
|
|
|
|
|
projectId: data.selectObject.id,
|
|
|
|
|
}
|
|
|
|
|
Https.axiosPost(Https.httpUrls.cloudPage,value).then((rv)=>{
|
|
|
|
|
data.contentList = rv.content
|
|
|
|
|
data.total = rv.total
|
|
|
|
|
let arr = rv.content
|
|
|
|
|
let result = arr.some((item:any) => (item.process !== '100.00%' && item.status !== 1));
|
|
|
|
|
if(!result)data.isGetContentList = false
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
getContentList()
|
|
|
|
|
},1500)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const submitGetContentList = ()=>{
|
|
|
|
|
data.isGetContentList = true
|
|
|
|
|
getContentList()
|
|
|
|
|
}
|
|
|
|
|
onBeforeUnmount(()=>{
|
|
|
|
|
data.isGetContentList = false
|
|
|
|
|
})
|
|
|
|
|
onMounted(()=>{
|
|
|
|
|
data.isGetContentList = true
|
|
|
|
|
getContentList()
|
|
|
|
|
})
|
2025-04-16 10:43:54 +08:00
|
|
|
return{
|
|
|
|
|
...toRefs(dataDom),
|
|
|
|
|
...toRefs(data),
|
|
|
|
|
createClound,
|
2025-04-23 09:39:24 +08:00
|
|
|
detailIamge,
|
|
|
|
|
getContentList,
|
|
|
|
|
submitGetContentList,
|
2025-04-16 10:43:54 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
provide() {
|
|
|
|
|
return {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.uploading{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
padding-top: 3rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
> .title{
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
> .list{
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-bottom: 2.5rem;
|
|
|
|
|
> .titleItem:last-child{
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
}
|
|
|
|
|
> .titleItem{
|
|
|
|
|
position: relative;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin-right: 6.5rem;
|
|
|
|
|
}
|
|
|
|
|
> .titleItem::before {
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: "";
|
|
|
|
|
display: block;
|
|
|
|
|
background: #000;
|
|
|
|
|
height: calc(.4rem*1.2);
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
bottom: -.5rem;
|
|
|
|
|
width: 0px;
|
|
|
|
|
transition: 0.3s all;
|
|
|
|
|
}
|
|
|
|
|
> .active {
|
|
|
|
|
color: #000;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
> .active::before {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
> .createCloud{
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
> .contentList{
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
padding-top: 2.5rem;
|
2025-04-23 09:39:24 +08:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2025-04-16 15:08:59 +08:00
|
|
|
> .content tr , > .title{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 0 1.2rem;
|
|
|
|
|
}
|
2025-04-16 10:43:54 +08:00
|
|
|
> .title{
|
2025-04-16 15:08:59 +08:00
|
|
|
background: #F7F7F7;
|
|
|
|
|
> .titleItem{
|
|
|
|
|
line-height: 4.6rem;
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
color: #666666;
|
|
|
|
|
width: calc(100% / 4);
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-23 09:39:24 +08:00
|
|
|
.content{
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
> tr{
|
|
|
|
|
> td{
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: calc(100% / 4);
|
|
|
|
|
line-height: 4.6rem;
|
|
|
|
|
font-size: 2.2rem;
|
|
|
|
|
}
|
2025-04-16 15:08:59 +08:00
|
|
|
}
|
2025-04-16 10:43:54 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|