fix: 左侧历史菜单在跳转到design时需要点击两次的问题
This commit is contained in:
@@ -18,8 +18,15 @@
|
||||
<p>{{$t('Header.NewProject')}}</p>
|
||||
</div>
|
||||
<div class="navList ">
|
||||
<div class="tools list" v-for="item in navTypeList" :class="{active:openType == item.value,history:item.value == 'history','show-history' : showHistory && item.value === 'history','isHistory' : item.value === 'history'}">
|
||||
<div class="titleBox" @click="setOpenType(item.value,item.list)">
|
||||
<div class="tools list"
|
||||
v-for="item in navTypeList"
|
||||
:class="{
|
||||
active:openType == item.value,
|
||||
history:item.value == 'history',
|
||||
'show-history' : showHistory && item.value === 'history',
|
||||
'isHistory' : item.value === 'history'
|
||||
}">
|
||||
<div class="titleBox" @click="setOpenType(item)">
|
||||
<div class="left">
|
||||
<i :class="['fi',item.icon]"></i>
|
||||
<span>{{item.label}}</span>
|
||||
@@ -37,7 +44,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail" v-else-if="item.value == 'history'" style="height: auto;">
|
||||
<!-- <div class="detail" v-else-if="item.value == 'history'" style="height: auto;">
|
||||
<div v-for="historyTypeItem in historyData.updateTimeType" :key="historyTypeItem">
|
||||
<div class="timeType" v-if="historyTypeItem == 'Todaylist' && item.Todaylist.length>0">{{$t('Header.Today')}}</div>
|
||||
<div class="timeType" v-if="historyTypeItem == 'Yesterdaylist' && item.Yesterdaylist.length>0">{{$t('Header.Yesterday')}}</div>
|
||||
@@ -48,8 +55,6 @@
|
||||
<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" v-if="childItem.process == 'THREE_D_PLATE_MAKING'">3D Pattern Making</div>
|
||||
<div class="type" v-else>{{ childItem.process.replace(/_/g, ' ').toLowerCase().replace(/\b\w/g, char => char.toUpperCase()) }}</div> -->
|
||||
<div class="type">{{ $t(`Header.${childItem.process}`) }}</div>
|
||||
<div class="time">{{ childItem?.updateTime?.replace('T', ' ') }}</div>
|
||||
<div class="btn">
|
||||
@@ -64,10 +69,6 @@
|
||||
<i class="fi fi-rr-settings-sliders"></i>
|
||||
<span>{{$t('Header.Setting')}}</span>
|
||||
</div>
|
||||
<!-- <div class="item" v-if="bathGenerationList.indexOf(childItem.process)>-1" @click.stop="bathGeneration(childItem)">
|
||||
<i class="fi fi-rr-cloud-upload-alt"></i>
|
||||
<span>{{$t('Header.BatchGeneration')}}</span>
|
||||
</div> -->
|
||||
<div class="item" @click.stop="deleteItem(childItem)">
|
||||
<i class="icon iconfont icon-shanchu operate_icon"></i>
|
||||
<span>{{$t('Header.Delete')}}</span>
|
||||
@@ -84,7 +85,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<img v-show="historyData.isNoData && historyData.isNull" src="@/assets/images/homePage/null_img.png">
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -402,10 +403,12 @@ export default defineComponent({
|
||||
homeMainData.openType = Object.keys(query)[0]
|
||||
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
||||
}
|
||||
// if((query?.id || query?.history) && !await getIdExistToHistory()){
|
||||
// router.push('/home')
|
||||
// return
|
||||
// }
|
||||
console.log('homeMainData.openType',homeMainData.openType,'route.path',route.path)
|
||||
if (homeMainData.openType == 'history' && route.path !== '/home/history') {
|
||||
homeMainData.openType = ''
|
||||
homeMainData.openTypeChild = ''
|
||||
}
|
||||
|
||||
}else{
|
||||
homeMainData.openType = ''
|
||||
homeMainData.openTypeChild = ''
|
||||
@@ -432,14 +435,8 @@ export default defineComponent({
|
||||
homeMainData.showHistory = false
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
{ immediate: true}
|
||||
)
|
||||
|
||||
|
||||
|
||||
// watch(()=>homeMainData.openTypeList,()=>{
|
||||
// homeMainData.historyData.page = 1
|
||||
// })
|
||||
|
||||
let isMurmur = ref()
|
||||
let credits = computed(()=>{
|
||||
@@ -564,16 +561,13 @@ export default defineComponent({
|
||||
let imgParent = document.querySelector('.homeMain_max .detail .material_content_list_loding .historyPage_loading')
|
||||
if(Observer?.unobserve)Observer.unobserve(imgParent);
|
||||
})
|
||||
const setOpenType = (type, list) => {
|
||||
|
||||
if(homeMainData.openType == type){
|
||||
homeMainData.openType = ''
|
||||
}else {
|
||||
homeMainData.openType = type
|
||||
if (type === 'history') {
|
||||
router.push('/home/history')
|
||||
}
|
||||
const setOpenType = (item) => {
|
||||
const { value, list } = item
|
||||
if (!list?.length) {
|
||||
router.push(item.router)
|
||||
return
|
||||
}
|
||||
homeMainData.openType = homeMainData.openType === value ? '' : value
|
||||
}
|
||||
let Observer = null
|
||||
let setPorfolioDom = ()=>{
|
||||
|
||||
Reference in New Issue
Block a user