页面调整

This commit is contained in:
X1627315083
2025-07-19 14:04:48 +08:00
parent 22ee9c6cf1
commit 4b694236ee
161 changed files with 2934 additions and 3979 deletions

View File

@@ -75,10 +75,7 @@
show-search
allowClear
:show-arrow="false"
:default-active-first-option="false"
:not-found-content="null"
:filter-option="false"
style="width: 16rem"
style="width: 200px"
:placeholder="$t('batchGeneration.PleaseSelect')"
:options="objectList"
@search="getHistoryProjectList"
@@ -227,7 +224,7 @@
:headers="{ Authorization: getCookie('token') }"
:before-upload="beforeUpload"
:data="{
projectId:projectData
projectId:projectData?.value?projectData?.value:''
}"
v-model:file-list="fileList"
:multiple="true"
@@ -304,7 +301,10 @@ export default defineComponent({
numberOfImages: "",
credits: 0,
exhibitionImgList: [], //选择的图片
projectData: null, //批量id
projectData: {
id:'',
name:'',
}, //批量id
objectList: [],
porjectName: "", //任务名字
//toProduct
@@ -312,6 +312,7 @@ export default defineComponent({
similarity: [20, 40],
brightenValue: 1, //亮度
relightDirection: "Right Light", //打光方向
sequence:'',
relightDirectionList: [
{
value: "Right Light",
@@ -337,10 +338,15 @@ export default defineComponent({
const getUploadElement = () => {
operations.loadingShow = true;
let value = {
id: operationsData.projectData,
id: operationsData.projectData?.value,
moduleList: ["uploadElement"],
};
operationsData.placeholder = "Batch_" + setPlaceholder();
let str = setPlaceholder()
if(!str){
str = props.cloudList.filter((item)=>item.value == operationsData.buildType)[0].label
str = str.replace(/\s+/g, '_')
}
operationsData.placeholder = "Batch_" + str + '_' + operationsData.sequence;
Https.axiosPost(Https.httpUrls.getModuleContent, value)
.then(async (rv) => {
operationsData.uploadElement = rv.uploadElement;
@@ -350,17 +356,18 @@ export default defineComponent({
operations.loadingShow = false;
});
};
let init = (projectData, buildType) => {
let init = (projectData, buildType,sequence) => {
operationsData.sequence = sequence
operations.operationsModal = true;
clearData();
if (projectData?.id) {
operationsData.projectData = {
label: projectData.name,
label: projectData.label,
value: projectData.id,
};
getUploadElement();
}
if (buildType.value) operationsData.buildType = buildType;
if (buildType.value) operationsData.buildType = buildType.value;
};
const clearData = () => {
operationsData.porjectName = "";
@@ -370,17 +377,28 @@ export default defineComponent({
operationsData.fileList = [];
operationsData.uploadElement = [];
};
const changeProject = () => {
const changeProject = (rv) => {
let porjectData = operationsData.objectList.find(
(item) => item.id === rv
);
operationsData.projectData = {
value: porjectData?.id,
label: porjectData?.name,
}
getUploadElement();
};
const changeBuildType = () => {
// operationsData.exhibitionImgList = []
operationsData.projectData = null;
operationsData.projectData = {
label:'',
value:'',
};
props.cloudList.forEach((item) => {
if (item.value == operationsData.buildType) {
operationsData.credits = item.consumption;
}
});
getUploadElement();
getHistoryProjectList();
};
const getGenerateCloudImgList = (type) => {
@@ -399,7 +417,9 @@ export default defineComponent({
if (type == "POSE_TRANSFER") {
obj = {
poseId: 1,
elementId: item.id,
productImage: getMinioUrl(item.imgUrl),
elementType: item.type?item.type:"ProductElement",
};
} else {
obj = {
@@ -474,7 +494,8 @@ export default defineComponent({
return {
buildType: buildTypeCorresponding[operationsData.buildType],
nums: operationsData.numberOfImages,
projectId: operationsData.projectData,
sequence:operationsData.sequence,
projectId: operationsData.projectData?.value?operationsData.projectData?.value:'',
name: operationsData.porjectName || operationsData.placeholder,
//productimg
toProductImage: {
@@ -483,7 +504,7 @@ export default defineComponent({
operationsData.buildType
), //选择的图片
// toProductImageVOList:getPorductImg(),//选择的图片
projectId: operationsData.projectData,
projectId: operationsData.projectData?.value?operationsData.projectData?.value:'',
direction: operationsData.relightDirection, //打光方向
brightenValue: operationsData.brightenValue,
imageStrength: (100 - getImageStrength()) / 100,
@@ -498,8 +519,8 @@ export default defineComponent({
operationsData.buildType == "POSE_TRANSFER"
? getGenerateCloudImgList("POSE_TRANSFER")
: [],
private: operationsData.projectData,
ToProductImageDTO: operationsData.projectData,
private: operationsData.projectData?.value,
ToProductImageDTO: operationsData.projectData?.value,
};
};
let cancelDsign = () => {
@@ -523,13 +544,13 @@ export default defineComponent({
return message.warning("Please select or upload the picture first.");
// 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 (operationsData.buildType == "DESIGN" && !operationsData.projectData)
if (operationsData.buildType == "DESIGN" && !operationsData.projectData?.value)
return message.warning("Please select a project");
if (
!data.buildType ||
!data.nums ||
!data.name ||
(operationsData.buildType == "DESIGN" && !operationsData.projectData)
(operationsData.buildType == "DESIGN" && !operationsData.projectData?.value)
)
return message.warning("Please check the input box marked with *");
operations.loadingShow = true;
@@ -539,7 +560,7 @@ export default defineComponent({
operations.loadingShow = false;
cancelDsign();
let porjectData = operationsData.objectList.find(
(item) => item.id === operationsData.projectData
(item) => item.id === operationsData.projectData?.value
);
let project = {
value: porjectData?.id,
@@ -625,9 +646,10 @@ export default defineComponent({
}
};
const setPlaceholder = () => {
if (!operationsData.projectData) return "";
if(operationsData.projectData?.label)return operationsData.projectData.label
if (!operationsData.projectData?.value) return "";
let index = operationsData.objectList.findIndex(
(item) => item.id === operationsData.projectData
(item) => item.id === operationsData.projectData?.value
);
return operationsData.objectList[index].name;
};

View File

@@ -55,14 +55,14 @@
<input type="text" v-model="renameText">
<i class="fi fi-br-check" @click="submitRename(row)"></i>
</div>
<div v-else style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">
<div v-else :title="header?.fun?header.fun(row[header.value]) : row[header.value]" style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;width: 15rem;">
{{header?.fun?header.fun(row[header.value]) : row[header.value]}}
</div>
</div>
<span style="color: #007EE5; cursor: pointer; margin-right: 1rem;" v-show="header.value == 'operation'" @click="setRename(row)">
{{$t('batchGeneration.Rename')}}
</span>
<span style="color: #007EE5; cursor: pointer; margin-right: 1rem;" v-show="header.value == 'operation'" @click="detailIamge(row)">
<span style="color: #007EE5; cursor: pointer; margin-right: 1rem;" :style="{opacity:row.status == 1?1:.5}" v-show="header.value == 'operation'" @click="detailIamge(row)">
{{$t('batchGeneration.Review')}}
</span>
<span style="color: #007EE5; cursor: pointer;" v-show="header.value == 'operation'" @click="deleteRom(row)">
@@ -177,6 +177,10 @@ export default defineComponent({
// sketchDesign:[]
},
cloudTiltleList:[
{
name:computed(()=>t('batchGeneration.sequence')),
value:'sequence',
},
{
name:computed(()=>t('batchGeneration.TaskName')),
value:'name',
@@ -205,6 +209,7 @@ export default defineComponent({
},
{
name:computed(()=>t('batchGeneration.StartTime')),
value:'startTime',
fun:(value:any)=>{
//没开始内容为 -
if(!value)return
@@ -243,8 +248,21 @@ export default defineComponent({
const dataDom = reactive({
createCloud,
})
const getNextSequence = ()=>{
return new Promise((resolve, reject) => {
data.loadingShow = true
Https.axiosGet(Https.httpUrls.getNextSequence).then((rv)=>{
data.loadingShow = false
data.isGetContentList = false
resolve(rv)
}).catch(()=>{
data.loadingShow = false
resolve('')
})
})
}
const createClound = ()=>{
data.isGetContentList = false
let obj = {}
if(data.createData){
data.generateList.seriesDesign.forEach((item:any)=>{
@@ -253,8 +271,10 @@ export default defineComponent({
}
})
}
dataDom.createCloud.init(data.createData,obj)
console.log(obj)
getNextSequence().then((rv)=>{
dataDom.createCloud.init(data.createData,obj,rv)
})
}
const createData = ()=>{
store.commit("createProbject");
@@ -274,6 +294,17 @@ export default defineComponent({
buildType:item.buildType,
}
createData()
if(item.buildType == 'design'){
router.push(`/home?history=${item.projectId}&source=batch`)
}else if(item.buildType == 'toProductImage'){
router.push(`/home/tools?tools=toProduct&id=${item.projectId}&source=batch`)
}else if(item.buildType == 'relight'){
router.push(`/home/tools?tools=${item.buildType}&id=${item.projectId}&source=batch`)
}else if(item.buildType == 'poseTransfer'){
router.push(`/home/tools?tools=${item.buildType}&id=${item.projectId}&source=batch`)
}
data.isGetContentList = false
return
Https.axiosPost(Https.httpUrls.getDesignCloudResult,value).then((rv)=>{
if(item.buildType == 'design'){
store.commit('addDesignCollectionList',rv.design)
@@ -294,19 +325,6 @@ export default defineComponent({
// store.commit('setCloudList',{str:'poseTransfer',list:rv.poseTransfer})
router.push(`/home/tools?tools=${item.buildType}&id=${item.projectId}&source=batch`)
}
// 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
})
}
@@ -412,14 +430,22 @@ export default defineComponent({
onBeforeUnmount(()=>{
data.isGetContentList = false
})
onMounted(()=>{
data.isGetContentList = true
watch(()=>route.query.id,(newValue,oldValue)=>{
if(route.query?.id){
data.projectData = {
value:route.query?.id,
label:route.query?.name,
}
data.createData = {
label:route.query?.name,
id:route.query?.id,
process:route.query?.process
}
createClound()
}
},{immediate:true})
onMounted(()=>{
data.isGetContentList = true
getContentList()
// if(route.query?.type == 'creation')dataDom.createCloud.init(data.projectData)
})
@@ -510,7 +536,11 @@ export default defineComponent({
line-height: 4.6rem;
font-size: 2rem;
color: #666666;
width: calc(100% / 4);
// width: calc(100% / 4);
width: 20rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: center;
}
}