接入画布

This commit is contained in:
X1627315083
2025-06-09 10:25:54 +08:00
parent 87a08f5f8f
commit c266967f16
157 changed files with 43833 additions and 1571 deletions

View File

@@ -12,17 +12,28 @@
<div class="generalModel_state_item smail">
<span>Project :</span>
<a-select
v-model:value="changeEvent"
v-model:value="projectData"
show-search
allowClear
style="width: 150px"
size="large"
:show-arrow="false"
:default-active-first-option="false"
:not-found-content="null"
:filter-option="false"
style="width: 16rem"
:fieldNames="{ label: 'name', value: 'value'}"
placeholder="Please select"
:options="objectList"
@search="getHistoryProjectList"
@change="handleChange"
></a-select>
>
<template #option="{ value: val, label, icon,updateTime }">
<span :title="updateTime.replace('T', ' ')">{{ label }}</span>
</template>
</a-select>
</div>
</div>
<div class="createCloud" v-show="selectObject.id">
<div class="createCloud">
<div class="gallery_btn" @click="createClound">Create</div>
</div>
</div>
@@ -46,7 +57,7 @@
</div>
<a-pagination style="text-align: center;" v-model:current="currentPage" :total="total" show-less-items />
</div>
<createCloud ref="createCloud" :cloudList="generateList[workflowType]" @getContentList="submitGetContentList"></createCloud>
<createCloud ref="createCloud" :cloudList="generateList.seriesDesign" @getContentList="submitGetContentList"></createCloud>
</div>
</template>
<script lang="ts">
@@ -57,44 +68,50 @@ import { useStore } from "vuex";
import { useI18n } from 'vue-i18n'
import createCloud from "./createCloud.vue";
import { da } from 'element-plus/es/locale';
import { useRouter,useRoute } from 'vue-router'
export default defineComponent({
components:{
createCloud,
},
props:{
workflowType:{
type:String,
default:'' as any,
required:true
}
},
emits:['retrieve'],
setup(props,{emit}) {
const store = useStore();
const route = useRoute()
const data = reactive({
pageType:'list',
pageSize:10,
currentPage:1,
total:0,
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
projectData:null as any,//批量id
createData:null as any,
generateList:{
seriesDesign:[
{
label:'Design',
value:'design',
{
label:'Series design',
// value:'SERIES_DESIGN',
consumption:0,
value:'SERIES_DESIGN',
},{
label:'Single design',
// value:'SINGLE_DESIGN',
consumption:0,
value:'SINGLE_DESIGN',
},{
label:'To Product Image',
value:'toProductImage',
// value:'toProductImage',
consumption:5,
value:'TO_PRODUCT_IMAGE',
},{
label:'Relight',
value:'relight',
// value:'relight',
consumption:5,
value:'RELIGHT',
},{
label:'Transfer Pose',
value:'poseTransfer',
// value:'poseTransfer',
consumption:10,
value:'POSE_TRANSFER',
},
],
singleProductDesign:[
@@ -191,6 +208,7 @@ export default defineComponent({
] as any,
contentList:[
] as any,
objectList:[],
isGetContentList:false as any,
})
const dataDom = reactive({
@@ -198,7 +216,16 @@ export default defineComponent({
})
const createClound = ()=>{
data.isGetContentList = false
dataDom.createCloud.init()
let obj = {}
if(data.createData){
data.generateList.seriesDesign.forEach((item:any)=>{
if((item.value == data.createData.process)){
obj = item
}
})
}
dataDom.createCloud.init(data.createData,obj)
}
const detailIamge = (item:any)=>{
//去除里面的T2025-04-17T13:45:43
@@ -233,7 +260,7 @@ export default defineComponent({
let value = {
page:data.currentPage,
size:data.pageSize,
projectId: data.selectObject.id,
projectId: data.projectData.id,
}
Https.axiosPost(Https.httpUrls.cloudPage,value).then((rv)=>{
data.contentList = rv.content
@@ -247,16 +274,47 @@ export default defineComponent({
})
}
}
let getHistoryTime = null as any
const getHistoryProjectList = (event:any)=>{
clearTimeout(getHistoryTime)
if(!event){
data.objectList = []
return
}
getHistoryTime = setTimeout(()=>{
let value = {
projectName:event,
page:1,
size:9999,
asc:0,
process:'',
}
Https.axiosPost(Https.httpUrls.historyProject,value).then((rv)=>{
rv.content.forEach((item:any)=>{
item.value = item.id
item.label = item.name
})
data.objectList = rv.content
})
},1000)
}
const submitGetContentList = ()=>{
data.isGetContentList = true
getContentList()
}
const handleChange = (event:any,value:any)=>{
data.createData = value
}
onBeforeUnmount(()=>{
data.isGetContentList = false
})
onMounted(()=>{
data.isGetContentList = true
getContentList()
if(route.query?.id){
data.projectData.value = route.query?.id
data.projectData.label = route.query?.name
}
// if(route.query?.type == 'creation')dataDom.createCloud.init(data.projectData)
})
return{
...toRefs(dataDom),
@@ -265,6 +323,8 @@ export default defineComponent({
detailIamge,
getContentList,
submitGetContentList,
handleChange,
getHistoryProjectList,
}
},
provide() {
@@ -316,7 +376,6 @@ export default defineComponent({
}
}
> .createCloud{
margin-left: auto;
}
> .searchObject{
margin-left: auto;