This commit is contained in:
2023-10-11 17:34:14 +08:00
parent 98dc5cd8f7
commit 268ffecff7
35 changed files with 1947 additions and 878 deletions

View File

@@ -74,7 +74,7 @@
class="select_category"
@click.stop="showFileCategory(file)"
>
{{ getSketchLabel(file.category) }}
{{ file.category }}
<div
:class="[
'icon',
@@ -219,6 +219,8 @@ export default defineComponent({
num:1,
optype:false,
})
let sketchCatecoryList:any = ref([])
let workspace:any = ref({})
let loadingShow = ref(false)
return {
@@ -242,6 +244,8 @@ export default defineComponent({
checkboxImage,
printModel,
loadingShow,
sketchCatecoryList,
workspace
};
},
data(prop) {
@@ -266,31 +270,15 @@ export default defineComponent({
type1: "generate",
type2: prop.msg,
},
sketchCatecoryList: [
{
value: "Outwear",
label: "Outwear",
},
{
value: "Blouse",
label: "Blouse",
},
{
value: "Dress",
label: "Dress",
},
{
value: "Trousers",
label: "Trousers",
},
{
value: "Skirt",
label: "Skirt",
},
],
workspaceCom:{}
};
},
watch:{
workspaceCom(newVal,oldVal){
this.workspace = newVal
this.getPosition()
},
},
mounted() {
// this.fileList.forEach((item,index)=>{
// item.checked = true
@@ -300,6 +288,9 @@ export default defineComponent({
// this.store.commit("addGenerateFils", this.fileList);
this.token = getCookie("token") || "";
this.uploadUrl = getUploadUrl();
this.workspaceCom = computed(()=>{
return this.store?.state?.Workspace?.workspace
})
},
computed: {
getSketchLabel(value: any) {
@@ -321,6 +312,28 @@ export default defineComponent({
data.resData = JSON.parse(JSON.stringify(data))
this.store.commit("addGenerateMaterialFils", data);
},
getPosition(){
let params
if(this.workspace.sex == 'Female'){
params = 'FemalePosition'
}else{
params = 'MalePosition'
}
Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:params}}).then((rv: any) => {
if (rv) {
let arr:any = []
rv.forEach((item:any) => {
let obj = {
value:item.name,
label:item.name,
}
arr.push(obj)
});
this.sketchCatecoryList = arr
}
})
},
beforeUpload(file: any) {
const isJpgOrPng =
file.type === "image/jpeg" ||
@@ -405,7 +418,7 @@ export default defineComponent({
file.resData = res.data;
file.type_ = "upload";
file.id_ = GO.id++;
file.category = "Outwear";
file.category = this.sketchCatecoryList[0].value;
let fileList = this.sketchboardList.filter(
(v: any) => v.status === "done"
);
@@ -490,7 +503,6 @@ export default defineComponent({
}
Https.axiosPost(Https.httpUrls.generateLike, data).then(
(rv) => {
console.log(rv);
item.like = true
}