页面调整

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;
};