部分bug修复和对话中的图片过期处理
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
<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="operation" v-show="historyData.selectHistoryId == childItem.id">
|
||||
<div class="item" @click.stop="editName(childItem)">
|
||||
<i class="fi fi-rr-edit"></i>
|
||||
<span>Rename</span>
|
||||
@@ -306,7 +306,7 @@ export default defineComponent({
|
||||
searchCollectionName:'',
|
||||
historyTextarea:'',
|
||||
updateTimeType:['Todaylist','Yesterdaylist','WithinAWeeklist','EarlierTodaylist'],
|
||||
selectHistoryIndex:-1,
|
||||
selectHistoryId:-1,
|
||||
page:1,
|
||||
size:10,
|
||||
isToday:false,
|
||||
@@ -581,33 +581,33 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
const editHistory = (item,index,el,list)=>{
|
||||
if(homeMainData.historyData.selectHistoryIndex == -1){
|
||||
let top = el.target.parentNode.parentNode.getBoundingClientRect().top
|
||||
let parentTop = el.target.parentNode.parentNode.parentNode.offsetTop
|
||||
let parentHeight = el.target.parentNode.parentNode.parentNode.offsetHeight
|
||||
if(homeMainData.historyData.selectHistoryId == -1){
|
||||
let top = el.target.parentNode.parentNode.getBoundingClientRect().y
|
||||
let parentTop = el.target.parentNode.parentNode.parentNode.parentNode.parentNode.getBoundingClientRect().y
|
||||
let parentHeight = el.target.parentNode.parentNode.parentNode.parentNode.parentNode.offsetHeight
|
||||
let operation = el.target.parentNode.querySelector('.operation')
|
||||
homeMainData.historyData.selectHistoryIndex = index
|
||||
homeMainData.historyData.selectHistoryId = item.id
|
||||
//判断弹窗是加载按钮上面还是下面
|
||||
if(list.length == 1){
|
||||
operation.classList.add('activeLeft')
|
||||
return
|
||||
}
|
||||
if((parentTop+parentHeight)/2 < top){//加在按钮上面
|
||||
if(top > parentHeight/2 + parentTop){//加在按钮上面
|
||||
operation.classList.add('active')
|
||||
}else{
|
||||
operation.classList.remove('active')
|
||||
}
|
||||
}else{
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryId = -1
|
||||
}
|
||||
let operationCli = ()=>{
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryId = -1
|
||||
document.removeEventListener("click", operationCli);
|
||||
}
|
||||
document.addEventListener("click",operationCli,);
|
||||
}
|
||||
const editName = (item)=>{
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryId = -1
|
||||
for (const key in homeMainData.openTypeList.history) {
|
||||
let list = ['EarlierTodaylist','Todaylist','WithinAWeeklist','Yesterdaylist']
|
||||
if(list.indexOf(key) == -1)continue
|
||||
@@ -622,7 +622,7 @@ export default defineComponent({
|
||||
const deleteItem = (item)=>{
|
||||
Https.axiosPost(Https.httpUrls.projectDetail,{},{params:{projectId:item.id}}).then(
|
||||
(rv) => {
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryId = -1
|
||||
settingGetHistory()
|
||||
if(homeMainData.openTypeChild == item.id){
|
||||
router.push('/home')
|
||||
@@ -653,7 +653,7 @@ export default defineComponent({
|
||||
}
|
||||
const bathGeneration = (item)=>{
|
||||
homeMainData.openType = ''
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryId = -1
|
||||
router.push(`/home/cloud?type=creation&id=${item.id}&name=${item.name}`)
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user