新增 删除 衣服

This commit is contained in:
X1627315083
2023-12-13 16:09:17 +08:00
parent e6c8fe3866
commit a0a8ab9a17
27 changed files with 608 additions and 260 deletions

View File

@@ -395,8 +395,6 @@ export default defineComponent({
})
if(num == 2 || num == 1){
if(this.driver__.driver){
console.log(213);
driverObj__.moveNext()
}
}
@@ -520,31 +518,41 @@ export default defineComponent({
fileUploadChange(data: any) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
file.id_ = GO.id++;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
let fileList = this.sketchboardList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.sketchboard;
if (arr.length >= 8) {
message.info(this.t('Generate.jsContent6'));
} else {
this.sketchboardList = fileList
}
nextTick().then(()=>{
if(this.driver__.driver){
driverObj__.moveNext()
if(res.errCode == 0){
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
file.id_ = GO.id++;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
let fileList = this.sketchboardList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.sketchboard;
if (arr.length >= 8) {
message.info(this.t('Generate.jsContent6'));
} else {
this.sketchboardList = fileList
}
})
nextTick().then(()=>{
if(this.driver__.driver){
driverObj__.moveNext()
}
})
}else{
bor = false
}
} else if (file.status === "error") {
let index = -1;
bor = false
}
if(!bor){
let index = -1;
let res:any = JSON.parse(file.xhr.response);
this.sketchboardList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
index = index1;
@@ -553,8 +561,9 @@ export default defineComponent({
if (index > -1) {
this.sketchboardList.splice(index, 1);
}
message.warning(file.name + this.t('Generate.jsContent7'));
}
// message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
message.warning(res.errMsg);
}
},
showFileCategory(file: any) {
file.categoryShow = true;

View File

@@ -308,28 +308,37 @@ export default defineComponent({
},
fileUploadChange(data: any) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = {
type1:'upload',
type2:'Moodboard'
};
file.id_ = GO.id++
file.id = res.data.id
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.moodboard
if(arr.length >= 8){
message.info(this.t('MoodboardUpload.jsContent1'))
if(res.errCode == 0){
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = {
type1:'upload',
type2:'Moodboard'
};
file.id_ = GO.id++
file.id = res.data.id
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.moodboard
if(arr.length >= 8){
message.info(this.t('MoodboardUpload.jsContent1'))
}else{
this.store.commit("setMoodboardFile", fileList);
}
}else{
this.store.commit("setMoodboardFile", fileList);
bor = false
}
// this.showFileList = this.fileList
} else if (file.status === "error") {
let index = -1;
bor = false
}
if(!bor){
let res:any = JSON.parse(file.xhr.response);
let index = -1;
this.fileList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
index = index1;
@@ -338,9 +347,9 @@ export default defineComponent({
if (index > -1) {
this.fileList.splice(index, 1);
}
message.warning(file.name + this.t('MoodboardUpload.jsContent2'));
}
// message.warning(file.name + this.t('MoodboardUpload.jsContent2'));
message.warning(res.errMsg);
}
},
beforeUpload(file: any) {
const isJpgOrPng =

View File

@@ -11,10 +11,10 @@
{{item.str}}
</span>
<div class="driver__btn" v-if="item.driver">
<span @click="setDriver">
<span @click="setDriver(index)">
Yes
</span>
<span @click="removeDriver">
<span @click="removeDriver(index)">
No
</span>
</div>
@@ -114,7 +114,6 @@ export default defineComponent({
watch:{
driver__:{
handler: function(newval) {
console.log(this.driver__);
if(this.driver__.driver && this.driver__.index == 0){
this.robotTop = true
this.robotInput = true
@@ -124,8 +123,6 @@ export default defineComponent({
str:"Welcome to AiDA. I am your friendly fashion design assistant. If you have any questions or need assistance, please don't hesitate to ask. ",
driver:false,
})
console.log(this.record);
this.textScroll()
setTimeout(() => {
this.record.push({
@@ -146,7 +143,7 @@ export default defineComponent({
}else{
clearTimeout(this.driver__Time)
}
if(!newval.driver){
if(!newval.driver && this.driver__.index != 0){
this.record.push({
state:1,
str:"You can start the tutorial at any time by simply telling me that you want to. ",
@@ -290,11 +287,12 @@ export default defineComponent({
Https.axiosPost(Https.httpUrls.chatStreamTest, data).then(
// Https.axiosPost(Https.httpUrls.pythonChatStream, data,interaction).then(
(rv) => {
if(rv){
if(rv.isTutorial){
this.record.push({
state:1,
str:"We need to refresh the page before starting the tutorial,Would you like to start the tutorial now?",
str:"We need to refresh the page before starting the tutorial. Would you like to start the tutorial now?",
driver:true,
})
}else{
@@ -325,7 +323,7 @@ export default defineComponent({
});
this.chatCentent = ""
},
setDriver(){
setDriver(index:number){
if(this.driver__.driver){
driverObj__.moveNext();
this.robotTop = false
@@ -335,8 +333,11 @@ export default defineComponent({
setCookie("isBeginner", true);
setCookie("isBeginnerNum", 1);
}
this.record[index].driver = false
sessionStorage.setItem('record', JSON.stringify(this.record));
this.textScroll()
},
removeDriver(){
removeDriver(index:number){
if(this.driver__.driver){
driverObj__.destroy();
let data = {
@@ -348,6 +349,9 @@ export default defineComponent({
// this.robotInput = false
this.createTimer()
}
this.record[index].driver = false
sessionStorage.setItem('record', JSON.stringify(this.record));
this.textScroll()
},
likeFile(item:any,imgIndex:number,index:number){
let data = {

View File

@@ -378,9 +378,6 @@ export default defineComponent({
workspaceCom(newVal,oldVal){
this.workspace = newVal
this.upload.gender = newVal.sexEnum.name
console.log(this.workspace);
// this.getPosition()
},
sketchboardList:{
handler(newVal:any,oldVal:any){
@@ -437,28 +434,36 @@ export default defineComponent({
},
fileUploadChange(data: any) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.imgUrl = res.data.url;
file.resData = res.data;
// file.pin = false;
//category用来数据处理
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryShow = false;
file.id_ = GO.id++
file.id = res.data.id
file.type_ = {
type1:'upload',
type2:'Sketchboard'
};
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
this.store.commit("setSketchboardFile", fileList);
} else if (data.errCode === -1) {
let index = -1;
if(res.errCode == 0){
file.imgUrl = res.data.url;
file.resData = res.data;
// file.pin = false;
//category用来数据处理
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryShow = false;
file.id_ = GO.id++
file.id = res.data.id
file.type_ = {
type1:'upload',
type2:'Sketchboard'
};
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
this.store.commit("setSketchboardFile", fileList);
}else{
bor = false
}
} else if (file.status === "error") {
bor = false
}
if(!bor){
let index = -1;
let res:any = JSON.parse(file.xhr.response);
this.fileList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
index = index1;
@@ -467,9 +472,9 @@ export default defineComponent({
if (index > -1) {
this.fileList.splice(index, 1);
}
message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
}
// message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
message.warning(res.errMsg);
}
},
beforeUpload(file: any) {

View File

@@ -237,16 +237,12 @@ export default defineComponent({
});
let str
if(numTop >= 8){
console.log(1);
str = `top ${topStr.join(' and ')}`
return this.isPin(str)
}else if(numBottom >= 8){
console.log(2);
str = `bottom ${bottomStr.join(' and ')}`
return this.isPin(str)
}else{
console.log(3);
return true
}