添加活动作品
This commit is contained in:
2
.env.dev
2
.env.dev
@@ -6,6 +6,6 @@ NODE_ENV = 'development'
|
||||
VUE_APP_BASE_URL = 'https://develop.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'
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
:closable="false"
|
||||
:mask="publishMask"
|
||||
:keyboard="false"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<div class="generalModel_btn">
|
||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||
@@ -37,7 +36,8 @@
|
||||
</div>
|
||||
<div class="publidh_right_name publidh_content_item">
|
||||
<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 class="publidh_content_item_tagList">
|
||||
<div v-for="item,index in tagList" @click="pushTag(item,index)">
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="publidh_right_btn">
|
||||
<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>
|
||||
@@ -83,12 +83,10 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
let publish: any = ref(false);//弹窗
|
||||
let publishMask:any = ref(false)//弹窗遮罩
|
||||
let setBeenPublished:any = inject('setBeenPublished')
|
||||
let publishData:any = reactive({
|
||||
publishName:'',
|
||||
loadingShow:false,
|
||||
publishMarginTop:0,
|
||||
beenPublished:inject('beenPublished'),//history回来时候表示是否已经发布0为没发布
|
||||
publishList:[],
|
||||
publishIndex:0,//当前图片索引
|
||||
isShowMark:false,
|
||||
@@ -97,14 +95,18 @@ export default defineComponent({
|
||||
url:'',
|
||||
},
|
||||
subPublishDate:{
|
||||
id:'',
|
||||
portfolioDes:''
|
||||
},
|
||||
selectPermissions:{
|
||||
isAllowComment:true,
|
||||
isDisplayArea: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 setCopy = ()=>{
|
||||
// textarea.value.select()
|
||||
@@ -123,14 +125,14 @@ export default defineComponent({
|
||||
accountId : JSON.parse(userInfo).userId,
|
||||
createDate:'',
|
||||
idDeleted:'',
|
||||
id:'',
|
||||
portfolioDes:'',
|
||||
portfolioName:'',
|
||||
id:portfolio.value.id?portfolio.value.id:'',
|
||||
portfolioDes:portfolio.value.portfolioDes?portfolio.value.portfolioDes:'',
|
||||
portfolioName:portfolio.value.portfolioName?portfolio.value.portfolioName:'',
|
||||
portfolioType:'History',
|
||||
status:'',
|
||||
updateDate:'',
|
||||
collectionId:'',
|
||||
tagsDTO:[],
|
||||
tagsDTO:portfolio.value.tagsDTO?portfolio.value.tagsDTO:[],
|
||||
// isAllowLikes:true,
|
||||
}
|
||||
}
|
||||
@@ -145,24 +147,32 @@ export default defineComponent({
|
||||
// 使用match方法提取匹配的字符串
|
||||
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 tagListArr = extractHashtags(publishData.subPublishDate.portfolioDes)
|
||||
let tagsDTO:any = []
|
||||
tagListArr.forEach((item:any) => {
|
||||
const index = tagList.value.findIndex((obj:any) => obj.tagName === item);
|
||||
if(index>-1){
|
||||
let obj = {
|
||||
tagName:tagList.value[index],
|
||||
tagId:tagList.value[index].tagId
|
||||
for (let i = 0; i < tagListArr.length; i++) {
|
||||
const index = tagList.value.findIndex((obj:any) => obj.tagName === tagListArr[i]);
|
||||
const tagsDTOIndex = publishData.subPublishDate.tagsDTO.findIndex((obj:any) => obj.tagName === tagListArr[i]);
|
||||
let obj
|
||||
if(tagsDTOIndex>-1){
|
||||
obj = {
|
||||
tagName:publishData.subPublishDate.tagsDTO[tagsDTOIndex].tagName,
|
||||
id:publishData.subPublishDate.tagsDTO[tagsDTOIndex].id
|
||||
}
|
||||
tagsDTO.push(tagList.value[index])
|
||||
}else{
|
||||
tagsDTO.push({tagName:item})
|
||||
}else if(index > -1){
|
||||
obj = {
|
||||
tagName:tagList.value[index].tagName,
|
||||
id:tagList.value[index].id
|
||||
}
|
||||
}else {
|
||||
obj = {tagName:tagListArr[i]}
|
||||
}
|
||||
});
|
||||
publishData.subPublishDate.tagsDTO = tagsDTO
|
||||
tagsDTO.push(obj)
|
||||
}
|
||||
// publishData.subPublishDate.tagsDTO = tagsDTO
|
||||
return tagsDTO
|
||||
}
|
||||
let setPermissionsItem = ()=>{
|
||||
// publishData.selectPermissions.isAllowLikes &&
|
||||
@@ -224,18 +234,24 @@ export default defineComponent({
|
||||
let file = base64ToFile(publishData.selectDate.url,'collection')
|
||||
param.append('file',file)
|
||||
publishData.subPublishDate.openSource = publishData.selectPermissions.isSecondaryCreation?1:0
|
||||
let tagDTO = textareaChange()
|
||||
publishData.subPublishDate.tagsDTO = tagDTO
|
||||
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 data = publishData.subPublishDate
|
||||
publishData.isShowMark = true
|
||||
Https.axiosPost(Https.httpUrls.publish, param,config)
|
||||
.then((rv) => {
|
||||
cleardata()
|
||||
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'))
|
||||
setBeenPublished()
|
||||
})
|
||||
.catch((rv) => {
|
||||
publishData.isShowMark = false
|
||||
@@ -248,8 +264,8 @@ export default defineComponent({
|
||||
// if(tag.tag == 'RCAworkshop_2024'){
|
||||
// publishData.subPublishDate.portfolioDes = '#AiDA x RCA workshop '
|
||||
// }
|
||||
publishData.subPublishDate.portfolioDes = publishData.subPublishDate.portfolioDes+tag.tagName
|
||||
textareaChange()
|
||||
if(!publishData.subPublishDate.portfolioDes) publishData.subPublishDate.portfolioDes = ''
|
||||
publishData.subPublishDate.portfolioDes = publishData.subPublishDate.portfolioDes+tag.tagName + ' '
|
||||
}
|
||||
return {
|
||||
publish,
|
||||
|
||||
@@ -274,12 +274,12 @@ export default defineComponent({
|
||||
let userGroupId: any = computed(() => {
|
||||
return store.state.HomeStoreModule.userGroupId;
|
||||
}); //模特id //当likeDesignCollectionList长度为0时清空,startdesign时清空
|
||||
let beenPublished = ref(0)
|
||||
let setBeenPublished = ()=>{
|
||||
beenPublished.value = 1
|
||||
let setPortfolio = (data:any)=>{
|
||||
console.log(data);
|
||||
|
||||
portfolio.value = data
|
||||
}
|
||||
provide('beenPublished',beenPublished)
|
||||
provide('setBeenPublished',setBeenPublished)
|
||||
provide('setPortfolio',setPortfolio)
|
||||
let designCollectionId: any = computed(() => {
|
||||
return store.state.HomeStoreModule.designCollectionId;
|
||||
});
|
||||
@@ -338,12 +338,14 @@ export default defineComponent({
|
||||
let isMannequinShow = ref(false)
|
||||
let chooseIsDesign:any = computed(()=>{
|
||||
return store.state.UploadFilesModule.chooseIsDesign})
|
||||
let portfolio:any = ref({})
|
||||
provide('portfolio',portfolio)
|
||||
return {
|
||||
store,
|
||||
likeDesignCollectionList,
|
||||
designCollectionList,
|
||||
userGroupId,
|
||||
beenPublished,
|
||||
setPortfolio,
|
||||
designCollectionId,
|
||||
designId,
|
||||
contentImgMax,
|
||||
@@ -358,6 +360,7 @@ export default defineComponent({
|
||||
allBoardData,
|
||||
isMannequinShow,
|
||||
chooseIsDesign,
|
||||
portfolio,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -532,8 +535,11 @@ export default defineComponent({
|
||||
// this.likeDesignCollectionList.push(team)
|
||||
// },
|
||||
affiche(text:any){
|
||||
let affiche:any = this.$refs.affiche
|
||||
affiche.init(text)
|
||||
nextTick(()=>{
|
||||
let affiche:any = this.$refs.affiche
|
||||
affiche.init(text)
|
||||
})
|
||||
|
||||
// affiche.afficheMask = true
|
||||
},
|
||||
dragstart (e:any, index:any) {
|
||||
@@ -952,7 +958,7 @@ export default defineComponent({
|
||||
Https.httpUrls.historyChoose + `?userGroupId=${userGroupId}`;
|
||||
Https.axiosGet(url)
|
||||
.then((rv: any) => {
|
||||
this.beenPublished = rv.beenPublished
|
||||
this.setPortfolio(rv.portfolioDTO)
|
||||
this.store.commit("setUserGroupId", rv.userGroupId);
|
||||
this.dealHistoryChooseData(rv, type);
|
||||
this.isShowMark = false;
|
||||
@@ -979,7 +985,7 @@ export default defineComponent({
|
||||
this.isShowMark = true;
|
||||
Https.axiosPost(Https.httpUrls.setPorfolioChoose, data).then(
|
||||
(rv: any) => {
|
||||
this.beenPublished = rv.beenPublished
|
||||
this.setPortfolio(rv.portfolioDTO)
|
||||
this.store.commit("setUserGroupId", rv.userGroupId);
|
||||
this.dealHistoryChooseData(rv, type);
|
||||
this.isShowMark = false;
|
||||
|
||||
@@ -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}">
|
||||
{{ item.name }}
|
||||
</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">
|
||||
<generalMenu :dataList="menuList" @setprintModel="setprintModel" :item="selectMenu"></generalMenu>
|
||||
</div> -->
|
||||
@@ -87,10 +88,10 @@ export default defineComponent({
|
||||
name: useI18n().t('works.MyWorks'),
|
||||
value: 'myWorks'
|
||||
},
|
||||
// {
|
||||
// name: 'RCA Workshop 2024',
|
||||
// value: 'RCAworkshop_2024'
|
||||
// },
|
||||
{
|
||||
name: 'RCA Workshop 2024',
|
||||
value: 'RCAworkshop_2024'
|
||||
},
|
||||
],
|
||||
worksList: [
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user