合并画布代码
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<p>New Project</p>
|
||||
</div>
|
||||
<div class="navList marginT2">
|
||||
<div class="tools list" v-for="item in openTypeList" :class="{active:openType == item.value}">
|
||||
<div class="tools list" v-for="item in openTypeList" :class="{active:openType == item.value,history:item.value == 'history'}">
|
||||
|
||||
<div class="titleBox" @click="setOpenType(item.value,item.list)">
|
||||
<div class="left">
|
||||
@@ -32,36 +32,44 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail" v-else-if="item.value == 'history'">
|
||||
<div class="detailItem history" v-for="childItem,index in item.list" @click="setHistory(item,childItem)" :class="{active:openTypeChild == childItem.id}">
|
||||
<div class="text" style="width: 100%;">
|
||||
<span :title="childItem.name" v-show="!childItem.editName">{{ childItem.name }}</span>
|
||||
<textarea v-model="historyData.historyTextarea" v-show="childItem.editName" @click.stop></textarea>
|
||||
</div>
|
||||
<div class="type">{{ childItem.process.replace(/_/g, ' ').toLowerCase().replace(/\b\w/g, char => char.toUpperCase()) }}</div>
|
||||
<div class="time">{{ childItem.updateTime.replace('T', ' ') }}</div>
|
||||
<div class="btn">
|
||||
<i class="fi fi-br-menu-dots-vertical" v-show="!childItem.editName" @click.stop="editHistory(childItem,index,$event,item.list)"></i>
|
||||
<i class="fi fi-br-check" v-show="childItem.editName" @click.stop="accomplishHistory(childItem,index,$event)"></i>
|
||||
<div class="operation" v-show="historyData.selectHistoryIndex == index">
|
||||
<div class="item" @click.stop="editName(childItem)">
|
||||
<i class="fi fi-rr-edit"></i>
|
||||
<span>Rename</span>
|
||||
</div>
|
||||
<div class="item" v-if="childItem.process == 'SINGLE_DESIGN' || childItem.process == 'SERIES_DESIGN'" @click.stop="setting(childItem)">
|
||||
<i class="fi fi-rr-settings-sliders"></i>
|
||||
<span>Setting</span>
|
||||
</div>
|
||||
<div class="item" v-if="bathGenerationList.indexOf(childItem.process)>-1" @click.stop="bathGeneration(childItem)">
|
||||
<i class="fi fi-rr-settings-sliders"></i>
|
||||
<span>Batch Generation</span>
|
||||
</div>
|
||||
<div class="item" @click.stop="deleteItem(childItem)">
|
||||
<i class="icon iconfont icon-shanchu operate_icon"></i>
|
||||
<span>Delete</span>
|
||||
<div v-for="historyTypeItem in historyData.updateTimeType" :key="historyTypeItem">
|
||||
<div class="timeType" v-if="historyTypeItem == 'Todaylist' && item.Todaylist.length>0">Today</div>
|
||||
<div class="timeType" v-if="historyTypeItem == 'Yesterdaylist' && item.Yesterdaylist.length>0">Yesterday</div>
|
||||
<div class="timeType" v-if="historyTypeItem == 'WithinAWeeklist' && item.WithinAWeeklist.length>0">Within a wseek</div>
|
||||
<div class="timeType" v-if="historyTypeItem == 'EarlierTodaylist' && item.EarlierTodaylist.length>0">Earlier</div>
|
||||
<div v-for="childItem,index in item[historyTypeItem]" class="detailItem history" @click="setHistory(item,childItem)" :class="{active:openTypeChild == childItem.id}">
|
||||
<div class="text" style="width: 100%;">
|
||||
<span :title="childItem.name" v-show="!childItem.editName">{{ childItem.name }}</span>
|
||||
<textarea v-model="historyData.historyTextarea" v-show="childItem.editName" @click.stop></textarea>
|
||||
</div>
|
||||
<div class="type">{{ childItem.process.replace(/_/g, ' ').toLowerCase().replace(/\b\w/g, char => char.toUpperCase()) }}</div>
|
||||
<div class="time">{{ childItem.updateTime.replace('T', ' ') }}</div>
|
||||
<div class="btn">
|
||||
<i class="fi fi-br-menu-dots-vertical" v-show="!childItem.editName" @click.stop="editHistory(childItem,index,$event,item[historyTypeItem])"></i>
|
||||
<i class="fi fi-br-check" v-show="childItem.editName" @click.stop="accomplishHistory(childItem,index,$event)"></i>
|
||||
<div class="operation" v-show="historyData.selectHistoryIndex == index">
|
||||
<div class="item" @click.stop="editName(childItem)">
|
||||
<i class="fi fi-rr-edit"></i>
|
||||
<span>Rename</span>
|
||||
</div>
|
||||
<div class="item" v-if="childItem.process == 'SINGLE_DESIGN' || childItem.process == 'SERIES_DESIGN'" @click.stop="setting(childItem)">
|
||||
<i class="fi fi-rr-settings-sliders"></i>
|
||||
<span>Setting</span>
|
||||
</div>
|
||||
<div class="item" v-if="bathGenerationList.indexOf(childItem.process)>-1" @click.stop="bathGeneration(childItem)">
|
||||
<i class="fi fi-rr-settings-sliders"></i>
|
||||
<span>Batch Generation</span>
|
||||
</div>
|
||||
<div class="item" @click.stop="deleteItem(childItem)">
|
||||
<i class="icon iconfont icon-shanchu operate_icon"></i>
|
||||
<span>Delete</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-show="!historyData.isNoData" class="material_content_list_loding">
|
||||
<span class="historyPage_loading" v-show="!historyData.isShowLoading"></span>
|
||||
<span v-show="historyData.isShowLoading">
|
||||
@@ -217,7 +225,7 @@
|
||||
You can use these features only after becoming a regular user~
|
||||
</div>
|
||||
<div class="router" v-else-if="!getLangIsShowMark">
|
||||
<home ref="home" @setTask="setTask"></home>
|
||||
<home ref="home" @setNewProject="()=>leftShow=!leftShow" @setTask="setTask"></home>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -289,7 +297,7 @@ export default defineComponent({
|
||||
openType:'',
|
||||
openTypeChild:'',
|
||||
isLanguage:false,
|
||||
openTypeList:openTypeList(t),
|
||||
openTypeList:computed(()=>openTypeList(t)),
|
||||
projectSetting:null,
|
||||
historyData:{
|
||||
isNoData:false,
|
||||
@@ -297,10 +305,14 @@ export default defineComponent({
|
||||
isNull:false,
|
||||
searchCollectionName:'',
|
||||
historyTextarea:'',
|
||||
historyList:[],
|
||||
updateTimeType:['Todaylist','Yesterdaylist','WithinAWeeklist','EarlierTodaylist'],
|
||||
selectHistoryIndex:-1,
|
||||
page:1,
|
||||
size:10,
|
||||
isToday:false,
|
||||
isYesterday:false,
|
||||
isWithinAWeek:false,
|
||||
isEarlier:false,
|
||||
},
|
||||
bathGenerationList:["poseTransfer","SERIES_DESIGN","toProduct","relight"]
|
||||
})
|
||||
@@ -323,6 +335,7 @@ export default defineComponent({
|
||||
homeMainData.openType = ''
|
||||
homeMainData.openTypeChild = ''
|
||||
}
|
||||
if(query.create == 'true')settingGetHistory()
|
||||
})
|
||||
},
|
||||
{ immediate: true } // 立即触发一次以处理初始参数
|
||||
@@ -450,11 +463,11 @@ export default defineComponent({
|
||||
homeMainData.openType = ''
|
||||
}else {
|
||||
homeMainData.openType = type
|
||||
if(type == 'history'){
|
||||
if(list.length == 0){
|
||||
// if(type == 'history'){
|
||||
// if(list.length == 0){
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
let setPorfolioDom = ()=>{
|
||||
@@ -501,11 +514,31 @@ export default defineComponent({
|
||||
}
|
||||
const settingGetHistory = ()=>{
|
||||
homeMainData.historyData.page = 1
|
||||
homeMainData.openTypeList.history.list = []
|
||||
homeMainData.openTypeList.history.Todaylist = []
|
||||
homeMainData.openTypeList.history.Yesterdaylist = []
|
||||
homeMainData.openTypeList.history.WithinAWeeklist = []
|
||||
homeMainData.openTypeList.history.EarlierTodaylist = []
|
||||
homeMainData.historyData.isShowLoading = false
|
||||
homeMainData.historyData.isNoData = false
|
||||
}
|
||||
provide('settingGetHistory',settingGetHistory)
|
||||
const categorizeDate = (inputDate) => {
|
||||
const now = new Date();
|
||||
const date = new Date(inputDate);
|
||||
// 计算时间差(毫秒)
|
||||
const diffTime = now - date;
|
||||
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
// 判断逻辑
|
||||
if ((diffDays === -1 || diffDays === 0) && date.getDate() === now.getDate()) {
|
||||
return "Today";
|
||||
} else if (diffDays === 1 || (diffDays === 0 && date.getDate() !== now.getDate())) {
|
||||
return "Yesterday";
|
||||
} else if (diffDays <= 7) {
|
||||
return "WithinAWeek";
|
||||
} else {
|
||||
return "Earlier";
|
||||
}
|
||||
}
|
||||
const getHistory = ()=>{
|
||||
if(homeMainData.historyData.isShowLoading && !homeMainData.historyData.isNoData)return
|
||||
homeMainData.historyData.isShowLoading = true
|
||||
@@ -528,8 +561,12 @@ export default defineComponent({
|
||||
homeMainData.historyData.isNull = false
|
||||
}
|
||||
if (rv.content.length > 0) {
|
||||
rv.content.forEach((item)=>{
|
||||
let str = categorizeDate(item.updateTime) + 'list'
|
||||
homeMainData.openTypeList.history[str].push(item)
|
||||
})
|
||||
homeMainData.historyData.isNull = false
|
||||
homeMainData.openTypeList.history.list.push(...rv.content)
|
||||
// homeMainData.openTypeList.history.list.push(...rv.content)
|
||||
} else {
|
||||
homeMainData.historyData.isNoData = true
|
||||
}
|
||||
@@ -571,9 +608,14 @@ export default defineComponent({
|
||||
}
|
||||
const editName = (item)=>{
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
homeMainData.openTypeList.history.list.forEach((item)=>{
|
||||
item.editName = false
|
||||
})
|
||||
for (const key in homeMainData.openTypeList.history) {
|
||||
let list = ['EarlierTodaylist','Todaylist','WithinAWeeklist','Yesterdaylist']
|
||||
if(list.indexOf(key) == -1)continue
|
||||
homeMainData.openTypeList.history[key].forEach((item)=>{
|
||||
item.editName = false
|
||||
})
|
||||
}
|
||||
|
||||
item.editName = true
|
||||
homeMainData.historyData.historyTextarea = item.name
|
||||
}
|
||||
@@ -939,6 +981,9 @@ export default defineComponent({
|
||||
// padding: 1.2rem;
|
||||
max-height: 5rem;
|
||||
border-radius: 2rem;
|
||||
&.history{
|
||||
flex: 1;
|
||||
}
|
||||
> .titleBox{
|
||||
padding: 1.2rem;
|
||||
display: flex;
|
||||
@@ -982,10 +1027,18 @@ export default defineComponent({
|
||||
> .detail{
|
||||
position: relative;
|
||||
height: 100%;
|
||||
min-height: 10rem;
|
||||
> img{
|
||||
width: 100%;
|
||||
}
|
||||
> .detailItem{
|
||||
.timeType{
|
||||
font-size: 1.6rem;
|
||||
color: #52525b;
|
||||
font-weight: 400;
|
||||
margin-top: 1.2rem;
|
||||
margin-bottom: .8rem;
|
||||
}
|
||||
.detailItem{
|
||||
cursor: pointer;
|
||||
padding: 1.2rem 1.1rem 1.2rem 2.2rem;
|
||||
font-size: 1.4rem;
|
||||
@@ -1119,7 +1172,7 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
}
|
||||
> .detailItem:last-child{
|
||||
.detailItem:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
> .material_content_list_loding{
|
||||
@@ -1165,7 +1218,7 @@ export default defineComponent({
|
||||
}
|
||||
> .detailBox{
|
||||
> .detail{
|
||||
> .detailItem{
|
||||
.detailItem{
|
||||
padding: .8rem;
|
||||
> svg{
|
||||
margin-right: 2.5rem;
|
||||
|
||||
Reference in New Issue
Block a user