调整部分bug
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
<i class="fi fi-br-angle-small-down"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detailBox">
|
||||
<div class="detail" v-if="item.value != 'history'" v-show="openType == item.value">
|
||||
<div class="detailBox" v-show="openType">
|
||||
<div class="detail" v-if="item.value != 'history' && item.value != 'cloud'" v-show="openType == item.value">
|
||||
<div class="detailItem" v-for="childItem in item.list" @click="setRouter(item,childItem)" :class="{active:openTypeChild == childItem.value}">
|
||||
<i v-show="childItem.icon" :class="['fi',childItem.icon]"></i>
|
||||
<div class="text">
|
||||
@@ -30,23 +30,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail" v-else>
|
||||
<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="historyTextarea" v-show="childItem.editName"></textarea>
|
||||
<textarea v-model="historyData.historyTextarea" v-show="childItem.editName" @click.stop></textarea>
|
||||
</div>
|
||||
<div class="type">{{ childItem.process }}</div>
|
||||
<div class="type">{{ childItem.process.replace('_', ' ').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)"></i>
|
||||
<i class="fi fi-br-check" v-show="childItem.editName" @click.stop="accomplishHistory(childItem,index,$event)"></i>
|
||||
<div class="operation" v-show="selectHistoryIndex == index">
|
||||
<!-- <div class="item" @click.stop="editName(childItem)">
|
||||
<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>
|
||||
<div class="item" @click.stop="setting(childItem)">
|
||||
<i class="fi fi-rr-edit"></i>
|
||||
<i class="fi fi-rr-settings-sliders"></i>
|
||||
<span>Setting</span>
|
||||
</div>
|
||||
<div class="item" @click.stop="deleteItem(childItem)">
|
||||
@@ -56,20 +57,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="!isNoData" class="material_content_list_loding">
|
||||
<span class="page_loading" v-show="!isShowLoading"></span>
|
||||
<span v-show="isShowLoading">
|
||||
<div v-show="!historyData.isNoData" class="material_content_list_loding">
|
||||
<span class="historyPage_loading" v-show="!historyData.isShowLoading"></span>
|
||||
<span v-show="historyData.isShowLoading">
|
||||
<a-spin size="large" />
|
||||
</span>
|
||||
</div>
|
||||
<img v-show="isNoData && isNull" src="@/assets/images/homePage/null_img.png">
|
||||
|
||||
<img v-show="historyData.isNoData && historyData.isNull" src="@/assets/images/homePage/null_img.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="navListBottom">
|
||||
<div class="tools marginT2 list language" :class="{active:isLanguage}">
|
||||
<div class="navListBottom">
|
||||
<div class="tools marginT2 list" :class="{active:$route.name == 'cloud'}" @click="()=>$router.push('/home/cloud')">
|
||||
<div class="titleBox" style="margin-bottom: 0;">
|
||||
<div class="left">
|
||||
<i class="fi fi-rr-cloud-upload-alt"></i>
|
||||
<span>Batch Generation</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools list language" :class="{active:isLanguage}">
|
||||
<div class="titleBox" @click="()=>isLanguage = !isLanguage">
|
||||
<div class="left">
|
||||
<i class="fi fi-br-globe"></i>
|
||||
@@ -81,17 +89,14 @@
|
||||
</div>
|
||||
<div class="detailBox">
|
||||
<div class="detail" v-show="isLanguage">
|
||||
<div class="detailItem">
|
||||
<span>AI Image Generator</span>
|
||||
</div>
|
||||
<div class="detailItem active">
|
||||
<svg data-v-2396c87a="" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14" class="dark-icon sidebar-lang-icon" width="20" height="20"><path stroke="#52525b" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.167" d="M11.667 3.5 5.25 9.917 2.334 7"></path></svg>
|
||||
<span>AI Image Generator</span>
|
||||
<div class="detailItem" v-for="item in language" :class="{active:locale == item.value}" @click="setLocale(item.value)">
|
||||
<svg v-show="locale == item.value" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14" class="dark-icon sidebar-lang-icon" width="20" height="20"><path stroke="#52525b" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.167" d="M11.667 3.5 5.25 9.917 2.334 7"></path></svg>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="homeMain_right_content">
|
||||
<div
|
||||
class="button_second credits hideChecked"
|
||||
@@ -158,7 +163,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="homeMain_select">
|
||||
<div class="select_item_box" @click.stop="isLanguage = !isLanguage">
|
||||
<!-- <div class="select_item_box" @click.stop="isLanguage = !isLanguage">
|
||||
<div class="select_item">
|
||||
<span class="icon iconfont icon-yuyan"></span>
|
||||
<span class="select_item_des">{{$t('Header.language')}}</span>
|
||||
@@ -169,7 +174,7 @@
|
||||
<span class="select_item_des">{{ item.name }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="select_item" @click="orderForm()">
|
||||
|
||||
<i class="fi fi-rs-notebook"></i>
|
||||
@@ -273,18 +278,20 @@ export default defineComponent({
|
||||
isLanguage:false,
|
||||
openTypeList:openTypeList(t),
|
||||
projectSetting:null,
|
||||
|
||||
historyData:{
|
||||
isNoData:false,
|
||||
isShowLoading:false,
|
||||
isNull:false,
|
||||
searchCollectionName:'',
|
||||
historyTextarea:'',
|
||||
historyList:[],
|
||||
selectHistoryIndex:-1,
|
||||
page:1,
|
||||
size:10,
|
||||
}
|
||||
})
|
||||
const historyData = reactive({
|
||||
isNoData:false,
|
||||
isShowLoading:false,
|
||||
isNull:false,
|
||||
searchCollectionName:'',
|
||||
historyTextarea:'',
|
||||
historyList:[],
|
||||
selectHistoryIndex:-1,
|
||||
page:1,
|
||||
size:10,
|
||||
|
||||
})
|
||||
watch(() => route.query,
|
||||
(query, oldQuery) => {
|
||||
@@ -437,15 +444,16 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
let setPorfolioDom = ()=>{
|
||||
historyData.isShowLoading = false
|
||||
historyData.isNoData = false
|
||||
let imgParent = document.querySelector('.homeMain_max .detailBox .material_content_list_loding .page_loading')
|
||||
homeMainData.historyData.isShowLoading = false
|
||||
homeMainData.historyData.isNoData = false
|
||||
let imgParent = document.querySelector('.homeMain_max .detail .material_content_list_loding .historyPage_loading')
|
||||
console.log(imgParent)
|
||||
new IntersectionObserver(
|
||||
(entries, observer) => {
|
||||
// 如果不是相交,则直接返回
|
||||
if (!entries[0].intersectionRatio) return;
|
||||
getHistory()
|
||||
historyData.page += 1
|
||||
homeMainData.historyData.page += 1
|
||||
},
|
||||
).observe(imgParent);
|
||||
}
|
||||
@@ -459,19 +467,19 @@ export default defineComponent({
|
||||
// router.push(`/home?history=${childItem.id}`)
|
||||
}
|
||||
const settingGetHistory = ()=>{
|
||||
historyData.page = 1
|
||||
homeMainData.historyData.page = 1
|
||||
homeMainData.openTypeList.history.list = []
|
||||
historyData.isShowLoading = false
|
||||
historyData.isNoData = false
|
||||
homeMainData.historyData.isShowLoading = false
|
||||
homeMainData.historyData.isNoData = false
|
||||
}
|
||||
const getHistory = ()=>{
|
||||
if(historyData.isShowLoading && !historyData.isNoData)return
|
||||
historyData.isShowLoading = true
|
||||
if(homeMainData.historyData.isShowLoading && !homeMainData.historyData.isNoData)return
|
||||
homeMainData.historyData.isShowLoading = true
|
||||
let data = {
|
||||
classificationIdList:[],
|
||||
page:historyData.page,
|
||||
size:historyData.size,
|
||||
collectionName:historyData.searchCollectionName,
|
||||
page:homeMainData.historyData.page,
|
||||
size:homeMainData.historyData.size,
|
||||
collectionName:homeMainData.historyData.searchCollectionName,
|
||||
// startDate:startDate,
|
||||
// endDate:endDate,
|
||||
// intersection:1,
|
||||
@@ -480,33 +488,33 @@ export default defineComponent({
|
||||
// Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
|
||||
(rv) => {
|
||||
if(data.page == 1 && rv.content.length == 0){
|
||||
historyData.isNull = true
|
||||
homeMainData.historyData.isNull = true
|
||||
}else{
|
||||
historyData.isNull = false
|
||||
homeMainData.historyData.isNull = false
|
||||
}
|
||||
if (rv.content.length > 0) {
|
||||
historyData.isNull = false
|
||||
homeMainData.historyData.isNull = false
|
||||
homeMainData.openTypeList.history.list.push(...rv.content)
|
||||
} else {
|
||||
historyData.isNoData = true
|
||||
homeMainData.historyData.isNoData = true
|
||||
}
|
||||
historyData.isShowLoading = false
|
||||
homeMainData.historyData.isShowLoading = false
|
||||
}
|
||||
).catch(res=>{
|
||||
historyData.isShowMark = false
|
||||
homeMainData.historyData.isShowMark = false
|
||||
if(data.page == 1){
|
||||
historyData.isNull = true
|
||||
homeMainData.historyData.isNull = true
|
||||
}
|
||||
historyData.isNoData = true
|
||||
homeMainData.historyData.isNoData = true
|
||||
});
|
||||
}
|
||||
const editHistory = (item,index,el)=>{
|
||||
if(historyData.selectHistoryIndex == -1){
|
||||
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
|
||||
let operation = el.target.parentNode.querySelector('.operation')
|
||||
historyData.selectHistoryIndex = index
|
||||
homeMainData.historyData.selectHistoryIndex = index
|
||||
//判断弹窗是加载按钮上面还是下面
|
||||
if((parentTop+parentHeight)/2 < top){//加在按钮上面
|
||||
operation.classList.add('active')
|
||||
@@ -514,26 +522,26 @@ export default defineComponent({
|
||||
operation.classList.remove('active')
|
||||
}
|
||||
}else{
|
||||
historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
}
|
||||
let operationCli = ()=>{
|
||||
historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
document.removeEventListener("click", operationCli);
|
||||
}
|
||||
document.addEventListener("click",operationCli,);
|
||||
}
|
||||
const editName = (item)=>{
|
||||
historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
homeMainData.openTypeList.history.list.forEach((item)=>{
|
||||
item.editName = false
|
||||
})
|
||||
item.editName = true
|
||||
historyData.historyTextarea = item.name
|
||||
homeMainData.historyData.historyTextarea = item.name
|
||||
}
|
||||
const deleteItem = (item)=>{
|
||||
Https.axiosPost(Https.httpUrls.projectDetail,{},{params:{projectId:item.id}}).then(
|
||||
(rv) => {
|
||||
historyData.selectHistoryIndex = -1
|
||||
homeMainData.historyData.selectHistoryIndex = -1
|
||||
settingGetHistory()
|
||||
if(homeMainData.openTypeChild == item.id){
|
||||
router.push('/home')
|
||||
@@ -546,17 +554,14 @@ export default defineComponent({
|
||||
}
|
||||
const accomplishHistory = (item)=>{
|
||||
let data = {
|
||||
libraryIds:[],
|
||||
libraryName:historyData.historyTextarea,//library名字
|
||||
userGroupName:historyData.historyTextarea,//history名字
|
||||
userGroupId :item.id,//history id
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
name:homeMainData.historyData.historyTextarea,//library名字
|
||||
id :item.id,//history id
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.saveOrUpdate, data).then(
|
||||
Https.axiosPost(Https.httpUrls.projectSaveOrUpdate, data).then(
|
||||
(rv) => {
|
||||
item.name = historyData.historyTextarea
|
||||
item.name = homeMainData.historyData.historyTextarea
|
||||
item.editName = false
|
||||
historyData.historyTextarea = ''
|
||||
homeMainData.historyData.historyTextarea = ''
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
@@ -750,25 +755,10 @@ export default defineComponent({
|
||||
let data = {
|
||||
userId: this.userDetail.userId,
|
||||
};
|
||||
if(this.userDetail.systemUser == 3){
|
||||
await Https.axiosGet(Https.httpUrls.trialUserLogout,).then((rv) => {
|
||||
Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
|
||||
if(this.userDetail.systemUser == 7){
|
||||
this.$router.replace("/schoolLogin");
|
||||
}else if(this.userDetail.systemUser == 5){
|
||||
this.$router.replace("/enterpriseLogin");
|
||||
}else{
|
||||
this.$router.replace("/");
|
||||
}
|
||||
// WriteCookie("token");
|
||||
});
|
||||
})
|
||||
}else{
|
||||
await Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
|
||||
// WriteCookie("token");
|
||||
});
|
||||
this.$router.replace("/");
|
||||
}
|
||||
await Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
|
||||
// WriteCookie("token");
|
||||
});
|
||||
this.$router.replace("/");
|
||||
this.store.commit('createDetail')
|
||||
this.store.commit('createProbject')
|
||||
|
||||
@@ -954,6 +944,10 @@ export default defineComponent({
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
> .time{
|
||||
font-size: 1.2rem;
|
||||
opacity: .5;
|
||||
}
|
||||
> i{
|
||||
margin-right: .8rem;
|
||||
display: flex;
|
||||
@@ -986,7 +980,6 @@ export default defineComponent({
|
||||
width: 100%;
|
||||
font-weight: 600;
|
||||
line-height: 2rem;
|
||||
margin-bottom: .8rem;
|
||||
font-size: 1.8rem;
|
||||
display: inline-block;
|
||||
}
|
||||
@@ -1107,6 +1100,7 @@ export default defineComponent({
|
||||
> .titleBox{
|
||||
padding: .8rem;
|
||||
background: #00000000;
|
||||
height: 5rem;
|
||||
> .left{
|
||||
> i{
|
||||
margin-right: 2rem;
|
||||
|
||||
Reference in New Issue
Block a user