commit
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user