Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
:clothing-image-opts="{
|
:clothing-image-opts="{
|
||||||
imageMode:'contains',
|
imageMode:'contains',
|
||||||
}"
|
}"
|
||||||
|
:hideCanvas="hideCanvas"
|
||||||
ref="editCanvas">
|
ref="editCanvas">
|
||||||
</editCanvas>
|
</editCanvas>
|
||||||
<!-- <canvasContent ref="canvasContent"></canvasContent> -->
|
<!-- <canvasContent ref="canvasContent"></canvasContent> -->
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
:clothing-image-opts="{
|
:clothing-image-opts="{
|
||||||
imageMode:'contains',
|
imageMode:'contains',
|
||||||
}"
|
}"
|
||||||
|
:hideCanvas="hideCanvas"
|
||||||
ref="editCanvasBackFront">
|
ref="editCanvasBackFront">
|
||||||
</editCanvas>
|
</editCanvas>
|
||||||
</div>
|
</div>
|
||||||
@@ -63,6 +65,7 @@ import { useStore } from "vuex";
|
|||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import editCanvas from "@/component/Canvas/CanvasEditor/index.vue";
|
import editCanvas from "@/component/Canvas/CanvasEditor/index.vue";
|
||||||
import { formatTime,segmentImage,getMinioUrl } from "@/tool/util";
|
import { formatTime,segmentImage,getMinioUrl } from "@/tool/util";
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components:{
|
components:{
|
||||||
@@ -77,7 +80,7 @@ export default defineComponent({
|
|||||||
setup(props,{emit}) {
|
setup(props,{emit}) {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const {t} = useI18n();
|
const {t} = useI18n();
|
||||||
|
const route = useRoute()
|
||||||
const detailDom = reactive({
|
const detailDom = reactive({
|
||||||
editFrontBack:null as any,
|
editFrontBack:null as any,
|
||||||
model:null,
|
model:null,
|
||||||
@@ -104,6 +107,7 @@ export default defineComponent({
|
|||||||
getCanvasIfEdit:inject('getCanvasIfEdit')as any,
|
getCanvasIfEdit:inject('getCanvasIfEdit')as any,
|
||||||
canvasInstance:null as any,
|
canvasInstance:null as any,
|
||||||
canvasJSON:'',
|
canvasJSON:'',
|
||||||
|
hideCanvas: computed(()=>store.state.Workspace.projectPath !== route.fullPath),
|
||||||
})
|
})
|
||||||
watch(()=>detailData.selectDetail,(newValue,oldValue)=>{
|
watch(()=>detailData.selectDetail,(newValue,oldValue)=>{
|
||||||
detailData.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == newValue.id)
|
detailData.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == newValue.id)
|
||||||
|
|||||||
@@ -724,8 +724,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generageAdd(data: any) {
|
generageAdd(value: any) {
|
||||||
if (!data?.imgUrl) return
|
if (!value?.imgUrl) return
|
||||||
|
const data = JSON.parse(JSON.stringify(value))
|
||||||
data.type_ = this.type_
|
data.type_ = this.type_
|
||||||
data.type_.type1 = data.designType ? data.designType : this.type_.type1
|
data.type_.type1 = data.designType ? data.designType : this.type_.type1
|
||||||
data.resData = JSON.parse(JSON.stringify(data))
|
data.resData = JSON.parse(JSON.stringify(data))
|
||||||
@@ -1204,13 +1205,14 @@ export default defineComponent({
|
|||||||
Https.axiosPost(Https.httpUrls.generateLike, data)
|
Https.axiosPost(Https.httpUrls.generateLike, data)
|
||||||
.then(rv => {
|
.then(rv => {
|
||||||
item.like = true
|
item.like = true
|
||||||
|
item.libraryId = rv.libraryId
|
||||||
})
|
})
|
||||||
.catch(res => {})
|
.catch(res => {})
|
||||||
this.fileList[index].state = ''
|
this.fileList[index].state = ''
|
||||||
this.generageAdd(item)
|
this.generageAdd(item)
|
||||||
} else {
|
} else {
|
||||||
this.fileList[index].state = 'delete'
|
this.fileList[index].state = 'delete'
|
||||||
this.generageAdd(item)
|
// this.generageAdd(item)
|
||||||
let data = {
|
let data = {
|
||||||
generateDetailId: item.id,
|
generateDetailId: item.id,
|
||||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||||
@@ -1218,6 +1220,7 @@ export default defineComponent({
|
|||||||
Https.axiosGet(Https.httpUrls.generateDislike, { params: data })
|
Https.axiosGet(Https.httpUrls.generateDislike, { params: data })
|
||||||
.then(rv => {
|
.then(rv => {
|
||||||
item.like = false
|
item.like = false
|
||||||
|
item.libraryId = null
|
||||||
})
|
})
|
||||||
.catch(res => {})
|
.catch(res => {})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,10 +119,22 @@ export default defineComponent({
|
|||||||
file.level2Type = cate.value;
|
file.level2Type = cate.value;
|
||||||
file.categoryValue = cate.value;
|
file.categoryValue = cate.value;
|
||||||
file.category = cate.name;
|
file.category = cate.name;
|
||||||
if(props.isSetSketchCategory){
|
|
||||||
|
console.log("libraryId:" + file.libraryId)
|
||||||
|
if(file.libraryId){
|
||||||
|
let data = {
|
||||||
|
libraryId:[file.libraryId],
|
||||||
|
level2Type:props.item.categoryValue,
|
||||||
|
}
|
||||||
|
Https.axiosPost(Https.httpUrls.setSketchLibrary,data).then(
|
||||||
|
(rv: any) => {
|
||||||
|
emit('upTypeSucced')
|
||||||
|
}
|
||||||
|
).catch((res)=>{
|
||||||
|
});
|
||||||
|
}else if(props.isSetSketchCategory){
|
||||||
setSketchLibrary(props.item)
|
setSketchLibrary(props.item)
|
||||||
}
|
}
|
||||||
// this.store.commit("sketchGenerateFiles", this.fileList);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
let setSketchLibrary = (item:any)=>{
|
let setSketchLibrary = (item:any)=>{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
@canvasInit="canvasInit"
|
@canvasInit="canvasInit"
|
||||||
@changeCanvas="changeCanvas"
|
@changeCanvas="changeCanvas"
|
||||||
is-general
|
is-general
|
||||||
|
:hideCanvas="hideCanvas"
|
||||||
:isBackgroundChangeable="false"
|
:isBackgroundChangeable="false"
|
||||||
ref="editCanvas"></editCanvas>
|
ref="editCanvas"></editCanvas>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,6 +27,7 @@ import { Https } from "@/tool/https";
|
|||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import editCanvas from "@/component/Canvas/CanvasEditor/index.vue";
|
import editCanvas from "@/component/Canvas/CanvasEditor/index.vue";
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -53,12 +55,14 @@ export default defineComponent({
|
|||||||
const isShowMark = ref(false)
|
const isShowMark = ref(false)
|
||||||
const component = reactive({
|
const component = reactive({
|
||||||
})
|
})
|
||||||
|
const route = useRoute()
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
canvasLoad:false,
|
canvasLoad:false,
|
||||||
canvasJSON:computed(()=>store.state.HomeStoreModule.canvasData.canvas),
|
canvasJSON:computed(()=>store.state.HomeStoreModule.canvasData.canvas),
|
||||||
canvasConfig:{
|
canvasConfig:{
|
||||||
|
|
||||||
},
|
},
|
||||||
|
hideCanvas: computed(()=>store.state.Workspace.projectPath !== route.fullPath),
|
||||||
})
|
})
|
||||||
watch(()=>data.canvasJSON,(newVal)=>{
|
watch(()=>data.canvasJSON,(newVal)=>{
|
||||||
dataDom.editCanvas.loadJSON(newVal)
|
dataDom.editCanvas.loadJSON(newVal)
|
||||||
|
|||||||
@@ -1067,6 +1067,7 @@ export default defineComponent({
|
|||||||
Https.axiosPost(Https.httpUrls.generateLike, data).then(
|
Https.axiosPost(Https.httpUrls.generateLike, data).then(
|
||||||
(rv) => {
|
(rv) => {
|
||||||
item.like = true
|
item.like = true
|
||||||
|
item.libraryId = rv.libraryId
|
||||||
}
|
}
|
||||||
).catch(res=>{
|
).catch(res=>{
|
||||||
});
|
});
|
||||||
@@ -1078,6 +1079,7 @@ export default defineComponent({
|
|||||||
Https.axiosGet(Https.httpUrls.generateDislike, {params:data}).then(
|
Https.axiosGet(Https.httpUrls.generateDislike, {params:data}).then(
|
||||||
(rv) => {
|
(rv) => {
|
||||||
item.like = false
|
item.like = false
|
||||||
|
item.libraryId = null
|
||||||
}
|
}
|
||||||
).catch(res=>{
|
).catch(res=>{
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user