添加活动作品

This commit is contained in:
X1627315083
2024-10-09 15:45:17 +08:00
parent fbbf2359cd
commit 50f47cc532
4 changed files with 68 additions and 45 deletions

View File

@@ -6,6 +6,6 @@ NODE_ENV = 'development'
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk' VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
VUE_APP_BASE_URL = 'https://www.api.aida.com.hk' VUE_APP_BASE_URL = 'https://www.api.aida.com.hk'
# 佩佩 # 佩佩
# VUE_APP_BASE_URL = 'http://192.168.1.4:5567' VUE_APP_BASE_URL = 'http://192.168.1.4:5567'
# 海波 # 海波
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567' # VUE_APP_BASE_URL = 'http://192.168.1.9:5567'

View File

@@ -9,7 +9,6 @@
:closable="false" :closable="false"
:mask="publishMask" :mask="publishMask"
:keyboard="false" :keyboard="false"
:destroyOnClose="true"
> >
<div class="generalModel_btn"> <div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cancelDsign()"> <div class="generalModel_closeIcon" @click.stop="cancelDsign()">
@@ -37,7 +36,8 @@
</div> </div>
<div class="publidh_right_name publidh_content_item"> <div class="publidh_right_name publidh_content_item">
<div class="publidh_content_item_title">{{$t('Publish.Description')}}</div> <div class="publidh_content_item_title">{{$t('Publish.Description')}}</div>
<textarea @input="textareaChange()" ref="textarea" v-model="subPublishDate.portfolioDes"></textarea> <!-- <textarea @input="textareaChange()" ref="textarea" v-model="subPublishDate.portfolioDes"></textarea> -->
<textarea ref="textarea" v-model="subPublishDate.portfolioDes"></textarea>
</div> </div>
<div class="publidh_content_item_tagList"> <div class="publidh_content_item_tagList">
<div v-for="item,index in tagList" @click="pushTag(item,index)"> <div v-for="item,index in tagList" @click="pushTag(item,index)">
@@ -54,7 +54,7 @@
</div> </div>
<div class="publidh_right_btn"> <div class="publidh_right_btn">
<div class="started_btn" @click="cancelDsign">{{$t('Publish.Close')}}</div> <div class="started_btn" @click="cancelDsign">{{$t('Publish.Close')}}</div>
<div class="started_btn" @click="setPublish">{{beenPublished == 0?$t('Publish.Publish'):$t('Publish.UpdatePublish')}}</div> <div class="started_btn" @click="setPublish">{{!subPublishDate?.id?$t('Publish.Publish'):$t('Publish.UpdatePublish')}}</div>
</div> </div>
</div> </div>
</div> </div>
@@ -83,12 +83,10 @@ export default defineComponent({
const store = useStore(); const store = useStore();
let publish: any = ref(false);//弹窗 let publish: any = ref(false);//弹窗
let publishMask:any = ref(false)//弹窗遮罩 let publishMask:any = ref(false)//弹窗遮罩
let setBeenPublished:any = inject('setBeenPublished')
let publishData:any = reactive({ let publishData:any = reactive({
publishName:'', publishName:'',
loadingShow:false, loadingShow:false,
publishMarginTop:0, publishMarginTop:0,
beenPublished:inject('beenPublished'),//history回来时候表示是否已经发布0为没发布
publishList:[], publishList:[],
publishIndex:0,//当前图片索引 publishIndex:0,//当前图片索引
isShowMark:false, isShowMark:false,
@@ -97,14 +95,18 @@ export default defineComponent({
url:'', url:'',
}, },
subPublishDate:{ subPublishDate:{
id:'',
portfolioDes:''
}, },
selectPermissions:{ selectPermissions:{
isAllowComment:true, isAllowComment:true,
isDisplayArea:true, isDisplayArea:true,
isSecondaryCreation:true, isSecondaryCreation:true,
} },
}) })
let tagList = ref([{tagId:1,tagName:'#RCAworkshop_2024 ',title:'The process is simple: use AiDA to post your design work on the "Gallery ", and the one with the most likes(at least 20 likes) will be invited to the AiDA Workshop offline event in Hong Kong on November 14th, to exchange ideas with the Royal College of Art (RCA), Jae Lim, co-founder of the renowned fashion brand BESFXXK, and outstanding designers! '}]) let portfolio:any = inject('portfolio')
let setPortfolio:any = inject('setPortfolio')
let tagList = ref([{id:1,tagName:'#RCAworkshop_2024',title:'The process is simple: use AiDA to post your design work on the "Gallery ", and the one with the most likes(at least 20 likes) will be invited to the AiDA Workshop offline event in Hong Kong on November 14th, to exchange ideas with the Royal College of Art (RCA), Jae Lim, co-founder of the renowned fashion brand BESFXXK, and outstanding designers! '}])
// let textarea: any = ref(null) // let textarea: any = ref(null)
// let setCopy = ()=>{ // let setCopy = ()=>{
// textarea.value.select() // textarea.value.select()
@@ -123,14 +125,14 @@ export default defineComponent({
accountId : JSON.parse(userInfo).userId, accountId : JSON.parse(userInfo).userId,
createDate:'', createDate:'',
idDeleted:'', idDeleted:'',
id:'', id:portfolio.value.id?portfolio.value.id:'',
portfolioDes:'', portfolioDes:portfolio.value.portfolioDes?portfolio.value.portfolioDes:'',
portfolioName:'', portfolioName:portfolio.value.portfolioName?portfolio.value.portfolioName:'',
portfolioType:'History', portfolioType:'History',
status:'', status:'',
updateDate:'', updateDate:'',
collectionId:'', collectionId:'',
tagsDTO:[], tagsDTO:portfolio.value.tagsDTO?portfolio.value.tagsDTO:[],
// isAllowLikes:true, // isAllowLikes:true,
} }
} }
@@ -145,24 +147,32 @@ export default defineComponent({
// 使用match方法提取匹配的字符串 // 使用match方法提取匹配的字符串
const matches = text.match(regex); const matches = text.match(regex);
// 处理提取结果,去掉空格并返回 // 处理提取结果,去掉空格并返回
return matches ? matches.map((match:any) => match.trim()) : []; return matches ? matches.map((match:any) => match.replace(/\s+/g, '')) : []; // 去掉所有空格
} }
let textareaChange = ()=>{ let textareaChange = ()=>{
let tagListArr = extractHashtags(publishData.subPublishDate.portfolioDes) let tagListArr = extractHashtags(publishData.subPublishDate.portfolioDes)
let tagsDTO:any = [] let tagsDTO:any = []
tagListArr.forEach((item:any) => { for (let i = 0; i < tagListArr.length; i++) {
const index = tagList.value.findIndex((obj:any) => obj.tagName === item); const index = tagList.value.findIndex((obj:any) => obj.tagName === tagListArr[i]);
if(index>-1){ const tagsDTOIndex = publishData.subPublishDate.tagsDTO.findIndex((obj:any) => obj.tagName === tagListArr[i]);
let obj = { let obj
tagName:tagList.value[index], if(tagsDTOIndex>-1){
tagId:tagList.value[index].tagId obj = {
tagName:publishData.subPublishDate.tagsDTO[tagsDTOIndex].tagName,
id:publishData.subPublishDate.tagsDTO[tagsDTOIndex].id
} }
tagsDTO.push(tagList.value[index]) }else if(index > -1){
}else{ obj = {
tagsDTO.push({tagName:item}) tagName:tagList.value[index].tagName,
id:tagList.value[index].id
}
}else {
obj = {tagName:tagListArr[i]}
} }
}); tagsDTO.push(obj)
publishData.subPublishDate.tagsDTO = tagsDTO }
// publishData.subPublishDate.tagsDTO = tagsDTO
return tagsDTO
} }
let setPermissionsItem = ()=>{ let setPermissionsItem = ()=>{
// publishData.selectPermissions.isAllowLikes && // publishData.selectPermissions.isAllowLikes &&
@@ -224,18 +234,24 @@ export default defineComponent({
let file = base64ToFile(publishData.selectDate.url,'collection') let file = base64ToFile(publishData.selectDate.url,'collection')
param.append('file',file) param.append('file',file)
publishData.subPublishDate.openSource = publishData.selectPermissions.isSecondaryCreation?1:0 publishData.subPublishDate.openSource = publishData.selectPermissions.isSecondaryCreation?1:0
let tagDTO = textareaChange()
publishData.subPublishDate.tagsDTO = tagDTO
param.append('data',JSON.stringify(publishData.subPublishDate)) param.append('data',JSON.stringify(publishData.subPublishDate))
param.append('tagsDTO',JSON.stringify(publishData.subPublishDate.tagsDTO))
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }} let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
// let data = publishData.subPublishDate // let data = publishData.subPublishDate
publishData.isShowMark = true publishData.isShowMark = true
Https.axiosPost(Https.httpUrls.publish, param,config) Https.axiosPost(Https.httpUrls.publish, param,config)
.then((rv) => { .then((rv) => {
cleardata()
publishData.isShowMark = false publishData.isShowMark = false
emit('setPublish') let obj = {
id:rv,
portfolioName:publishData.subPublishDate.portfolioName,
portfolioDes:publishData.subPublishDate.portfolioDes,
tagsDTO:publishData.subPublishDate.tagsDTO,
}
cleardata()
setPortfolio(obj)
message.success(t('Publish.jsContent4')) message.success(t('Publish.jsContent4'))
setBeenPublished()
}) })
.catch((rv) => { .catch((rv) => {
publishData.isShowMark = false publishData.isShowMark = false
@@ -248,8 +264,8 @@ export default defineComponent({
// if(tag.tag == 'RCAworkshop_2024'){ // if(tag.tag == 'RCAworkshop_2024'){
// publishData.subPublishDate.portfolioDes = '#AiDA x RCA workshop ' // publishData.subPublishDate.portfolioDes = '#AiDA x RCA workshop '
// } // }
publishData.subPublishDate.portfolioDes = publishData.subPublishDate.portfolioDes+tag.tagName if(!publishData.subPublishDate.portfolioDes) publishData.subPublishDate.portfolioDes = ''
textareaChange() publishData.subPublishDate.portfolioDes = publishData.subPublishDate.portfolioDes+tag.tagName + ' '
} }
return { return {
publish, publish,

View File

@@ -274,12 +274,12 @@ export default defineComponent({
let userGroupId: any = computed(() => { let userGroupId: any = computed(() => {
return store.state.HomeStoreModule.userGroupId; return store.state.HomeStoreModule.userGroupId;
}); //模特id //当likeDesignCollectionList长度为0时清空startdesign时清空 }); //模特id //当likeDesignCollectionList长度为0时清空startdesign时清空
let beenPublished = ref(0) let setPortfolio = (data:any)=>{
let setBeenPublished = ()=>{ console.log(data);
beenPublished.value = 1
portfolio.value = data
} }
provide('beenPublished',beenPublished) provide('setPortfolio',setPortfolio)
provide('setBeenPublished',setBeenPublished)
let designCollectionId: any = computed(() => { let designCollectionId: any = computed(() => {
return store.state.HomeStoreModule.designCollectionId; return store.state.HomeStoreModule.designCollectionId;
}); });
@@ -338,12 +338,14 @@ export default defineComponent({
let isMannequinShow = ref(false) let isMannequinShow = ref(false)
let chooseIsDesign:any = computed(()=>{ let chooseIsDesign:any = computed(()=>{
return store.state.UploadFilesModule.chooseIsDesign}) return store.state.UploadFilesModule.chooseIsDesign})
let portfolio:any = ref({})
provide('portfolio',portfolio)
return { return {
store, store,
likeDesignCollectionList, likeDesignCollectionList,
designCollectionList, designCollectionList,
userGroupId, userGroupId,
beenPublished, setPortfolio,
designCollectionId, designCollectionId,
designId, designId,
contentImgMax, contentImgMax,
@@ -358,6 +360,7 @@ export default defineComponent({
allBoardData, allBoardData,
isMannequinShow, isMannequinShow,
chooseIsDesign, chooseIsDesign,
portfolio,
}; };
}, },
data() { data() {
@@ -532,8 +535,11 @@ export default defineComponent({
// this.likeDesignCollectionList.push(team) // this.likeDesignCollectionList.push(team)
// }, // },
affiche(text:any){ affiche(text:any){
let affiche:any = this.$refs.affiche nextTick(()=>{
affiche.init(text) let affiche:any = this.$refs.affiche
affiche.init(text)
})
// affiche.afficheMask = true // affiche.afficheMask = true
}, },
dragstart (e:any, index:any) { dragstart (e:any, index:any) {
@@ -952,7 +958,7 @@ export default defineComponent({
Https.httpUrls.historyChoose + `?userGroupId=${userGroupId}`; Https.httpUrls.historyChoose + `?userGroupId=${userGroupId}`;
Https.axiosGet(url) Https.axiosGet(url)
.then((rv: any) => { .then((rv: any) => {
this.beenPublished = rv.beenPublished this.setPortfolio(rv.portfolioDTO)
this.store.commit("setUserGroupId", rv.userGroupId); this.store.commit("setUserGroupId", rv.userGroupId);
this.dealHistoryChooseData(rv, type); this.dealHistoryChooseData(rv, type);
this.isShowMark = false; this.isShowMark = false;
@@ -979,7 +985,7 @@ export default defineComponent({
this.isShowMark = true; this.isShowMark = true;
Https.axiosPost(Https.httpUrls.setPorfolioChoose, data).then( Https.axiosPost(Https.httpUrls.setPorfolioChoose, data).then(
(rv: any) => { (rv: any) => {
this.beenPublished = rv.beenPublished this.setPortfolio(rv.portfolioDTO)
this.store.commit("setUserGroupId", rv.userGroupId); this.store.commit("setUserGroupId", rv.userGroupId);
this.dealHistoryChooseData(rv, type); this.dealHistoryChooseData(rv, type);
this.isShowMark = false; this.isShowMark = false;

View File

@@ -7,7 +7,8 @@
<div v-show="isScroll" v-for="item in worksType" :key="item" class="modal_title_text_assistant" @click="setWorksSelect(item)" :class="{active:item.value == worksSelect}"> <div v-show="isScroll" v-for="item in worksType" :key="item" class="modal_title_text_assistant" @click="setWorksSelect(item)" :class="{active:item.value == worksSelect}">
{{ item.name }} {{ item.name }}
</div> </div>
<div v-show="!isScroll" class="modal_title_text_assistant active">All</div> <div v-show="!isScroll" class="modal_title_text_assistant" :class="{active:'all' == worksSelect}" @click="setWorksSelect({value:'all'})">All</div>
<div v-show="!isScroll" class="modal_title_text_assistant" :class="{active:'RCAworkshop_2024' == worksSelect}" @click="setWorksSelect({value:'RCAworkshop_2024'})">RCA Workshop 2024</div>
<!-- <div class="modal_search_menu"> <!-- <div class="modal_search_menu">
<generalMenu :dataList="menuList" @setprintModel="setprintModel" :item="selectMenu"></generalMenu> <generalMenu :dataList="menuList" @setprintModel="setprintModel" :item="selectMenu"></generalMenu>
</div> --> </div> -->
@@ -87,10 +88,10 @@ export default defineComponent({
name: useI18n().t('works.MyWorks'), name: useI18n().t('works.MyWorks'),
value: 'myWorks' value: 'myWorks'
}, },
// { {
// name: 'RCA Workshop 2024', name: 'RCA Workshop 2024',
// value: 'RCAworkshop_2024' value: 'RCAworkshop_2024'
// }, },
], ],
worksList: [ worksList: [
], ],