调整部分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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="homeView">
|
||||
<homeIndex @setTask="()=>$emit('setTask')"></homeIndex>
|
||||
<!-- <homeIndex @setTask="()=>$emit('setTask')"></homeIndex> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -15,7 +15,7 @@ import generalCanvas from "@/component/modules/generalCanvas.vue";
|
||||
import affiche from "@/component/HomePage/affiche.vue";
|
||||
import DesignDetail from "@/component/Detail/DesignDetail.vue";
|
||||
import DesignDetailcopy from "@/component/DetailCopy/designDetail.vue";
|
||||
import homeIndex from "@/component/HomePage/index/index.vue";
|
||||
// import homeIndex from "@/component/HomePage/index/index.vue";
|
||||
import html2canvas from "html2canvas";
|
||||
import { message,Modal } from "ant-design-vue";
|
||||
import { useStore } from "vuex";
|
||||
@@ -33,7 +33,7 @@ const FileSaver = require("file-saver");
|
||||
export default defineComponent({
|
||||
name: "homePage",
|
||||
components: {
|
||||
homeIndex,
|
||||
// homeIndex,
|
||||
NewCollectionReview,
|
||||
DesignDetail,
|
||||
ExportNewCoolection,
|
||||
|
||||
43
src/views/HomeView/cloudGeneration.vue
Normal file
43
src/views/HomeView/cloudGeneration.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="cloud">
|
||||
<batchGeneration></batchGeneration>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive} from 'vue'
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { Https } from "@/tool/https";
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import batchGeneration from '@/component/home/batchGeneration/index.vue'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
batchGeneration,
|
||||
},
|
||||
props:{
|
||||
},
|
||||
emits:[],
|
||||
setup(props,{emit}) {
|
||||
const store = useStore();
|
||||
const data = reactive({
|
||||
})
|
||||
const dataDom = reactive({
|
||||
})
|
||||
return{
|
||||
...toRefs(dataDom),
|
||||
...toRefs(data),
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.cloud{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
@@ -1,562 +0,0 @@
|
||||
<template>
|
||||
<div class="history_page">
|
||||
<div class="page_content">
|
||||
<div class="page_content_body">
|
||||
<!-- <HeaderComponent></HeaderComponent> -->
|
||||
<div class="history_page_body">
|
||||
<div class="history_table_search">
|
||||
|
||||
<!-- <div class="content_search_block">
|
||||
<input class="search_input" :placeholder="$t('HistoryPage.inputContent1')" v-model="searchCollectionName" @keydown.enter="searchHistoryList()">
|
||||
<div class="search_icon_block" @click="searchHistoryList()"><span class="icon iconfont icon-sousuo"></span></div>
|
||||
</div> -->
|
||||
<div class="content_search_block generalModel_state">
|
||||
<div class="generalModel_state_item">
|
||||
<a-range-picker class="range_picker" v-model:value="rangePickerValue" :placeholder="[$t('HistoryPage.StartDate'), $t('HistoryPage.EndDate')]" valueFormat="YYYY-MM-DD">
|
||||
<template #suffixIcon>
|
||||
<span class="icon iconfont range_picker_icon icon-rili"></span>
|
||||
</template>
|
||||
</a-range-picker>
|
||||
</div>
|
||||
<div class="generalModel_state_item">
|
||||
<input class="search_input" :placeholder="$t('LibraryPage.inputContent1')" v-model="searchCollectionName" @keydown.enter="searchHistoryList()">
|
||||
</div>
|
||||
<div class="generalModel_state_item">
|
||||
<el-cascader
|
||||
:options="options"
|
||||
filterable
|
||||
v-model="value.labelValue"
|
||||
:collapse-tags="true"
|
||||
:show-all-levels="false"
|
||||
:clearable="true"
|
||||
:placeholder="$t('LibraryPage.Select')"
|
||||
:max-collapse-tags=3
|
||||
:props="props"
|
||||
:collapse-tags-tooltip="true"
|
||||
ref="cascader"
|
||||
popper-class="libraryPageCascader"
|
||||
@visible-change="dropdownVisibleChange"
|
||||
>
|
||||
<template #empty>
|
||||
<div>
|
||||
{{$t('LibraryPage.Select')}}
|
||||
</div>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</div>
|
||||
<div class="intersection">
|
||||
<div :title="$t('LibraryPage.unionSet')" @click="()=>intersection = 1" v-show="intersection == 0" :class="['icon', 'iconfont','icon-bingji',]"></div>
|
||||
<div :title="$t('LibraryPage.intersection')" @click="()=>intersection = 0" v-show="intersection == 1" :class="['icon', 'iconfont','icon-bingji1',]"></div>
|
||||
</div>
|
||||
<!-- <div class="search_icon_block" @click="getLibraryList('')"><span class="icon iconfont icon-sousuo"></span></div> -->
|
||||
<div class="gallery_btn" style="padding: 2rem; line-height: 1;" @click="searchHistoryList('')"><span class="icon iconfont icon-sousuo"></span></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="history_table_content" ref="historyTable">
|
||||
<a-table :columns="columns" :data-source="collectionList" :scroll="{ y: historyTableHeight }" @change="changePage"
|
||||
:pagination="{
|
||||
showSizeChanger:true,
|
||||
current: currentPage,
|
||||
pageSize:pageSize,
|
||||
total: total,
|
||||
showQuickJumper:true,
|
||||
bordered:false
|
||||
}">
|
||||
<template #bodyCell="{ column, text, record ,index}">
|
||||
<div class="operate_list" v-if="column?.Operations">
|
||||
<div class="operate_item" @click="turnToDetail(record)">{{ $t('HistoryPage.Detail') }}</div>
|
||||
<div class="operate_item" @click="renameCollection(record,index)">{{ $t('LibraryPage.Rename') }}</div>
|
||||
<div class="operate_item" @click="retrieveHome(record)">{{ $t('HistoryPage.Retrieve') }}</div>
|
||||
<div class="operate_item" @click="deleteGroup(record, index)">{{ $t('HistoryPage.Delete') }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<HistoryDetail ref="historyDetail" :groupDetails="groupDetails" :collectionName="collectionName"></HistoryDetail>
|
||||
<setLabel ref="setLabel"></setLabel>
|
||||
<!-- <RobotAssist></RobotAssist> -->
|
||||
<searchLabel ref="searchLabel"></searchLabel>
|
||||
<div class="mark_loading" v-show="isShowMark">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode,computed,nextTick,provide} from 'vue'
|
||||
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { formatTime } from "@/tool/util"
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
// import RobotAssist from "@/component/HomePage/RobotAssist.vue";
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { ElCascader } from 'element-plus'
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import setLabel from '@/component/LibraryPage/setLabel.vue';
|
||||
import searchLabel from '@/component/LibraryPage/searchLabel.vue';
|
||||
import { useStore } from "vuex";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
// HeaderComponent,
|
||||
HistoryDetail,
|
||||
// RobotAssist,
|
||||
setLabel,
|
||||
ElCascader,
|
||||
searchLabel,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
let rangePickerValue:any = ref([])
|
||||
let renameData:any = ref({}) //修改名字选中的数据
|
||||
let isShowMark:any = ref(false)
|
||||
const columns:any = computed(()=>{
|
||||
return [
|
||||
{ title: useI18n().t('HistoryPage.CollectionsName'), align:'center', ellipsis: true, width: 150, dataIndex: 'name', key: 'collectionName' },
|
||||
{ title: useI18n().t('HistoryPage.UptateTime'), align:'center', ellipsis: true,width: 150, dataIndex: 'updateDate', key: 'updateTime',customRender:(record:any)=>{
|
||||
let time = formatTime(record.text / 1000, 'YYYY-MM-DD hh:mm:ss')
|
||||
return time
|
||||
}},
|
||||
// {
|
||||
// title: useI18n().t('HistoryPage.source'),
|
||||
// align:'center', ellipsis: true, width: 150,
|
||||
// dataIndex: 'original', key: 'original',
|
||||
// customRender:(record:any)=>{
|
||||
// let str = ''
|
||||
// if(record.text == 1){
|
||||
// str = useI18n().t('newScaleImage.Original')
|
||||
// }else{
|
||||
// str = `@${record.record.originalAccountName}/${record.record.originalPortfolioName}`
|
||||
// }
|
||||
// // let time = formatTime(record.text / 1000, 'YYYY-MM-DD hh:mm:ss')
|
||||
// return str
|
||||
// }
|
||||
// },
|
||||
{ title: useI18n().t('HistoryPage.SketchCounts'), align:'center', ellipsis: true, width: 120, dataIndex: 'process', key: 'process' },
|
||||
{
|
||||
title: useI18n().t('HistoryPage.Operations'),
|
||||
key: 'operation',
|
||||
align:'center',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
// slots:{customRender:'action'}
|
||||
Operations:true,
|
||||
},
|
||||
]
|
||||
});
|
||||
let collectionList:any = ref([])
|
||||
let {t} = useI18n()
|
||||
const options:any = ref([
|
||||
]);
|
||||
let value = ref({
|
||||
labelValue:[],
|
||||
editLabelValue:[],
|
||||
})
|
||||
let props = {
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
emitPath:true,
|
||||
children:'childList',
|
||||
value:'id',
|
||||
label:'classificationName',
|
||||
}
|
||||
let intersection = ref(1)
|
||||
let selectCode = ref('History')
|
||||
let type:any = {
|
||||
selectCode:selectCode,
|
||||
designType:''
|
||||
}
|
||||
provide('type',type)
|
||||
return {
|
||||
store,
|
||||
rangePickerValue,
|
||||
columns,
|
||||
collectionList,
|
||||
renameData,
|
||||
t,
|
||||
options,
|
||||
value,
|
||||
props,
|
||||
intersection,
|
||||
selectCode,
|
||||
isShowMark,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
currentPage:1,
|
||||
pageSize:10,
|
||||
total:0,
|
||||
historyTableHeight:0,
|
||||
newCollectionName:'',
|
||||
groupDetails:{},//每个collection的详情
|
||||
collectionName:'',//选中的名字
|
||||
searchCollectionName:'',
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
let historyTable:any = this.$refs.historyTable
|
||||
this.historyTableHeight = historyTable.clientHeight - 130
|
||||
this.getHistoryList()
|
||||
this.getClass()
|
||||
},
|
||||
methods:{
|
||||
getClass(){
|
||||
let data = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": '',
|
||||
"id": '',
|
||||
"libraryId": '',
|
||||
"parentId": '',
|
||||
"type": this.selectCode,
|
||||
"updateTime": "",
|
||||
"userId": ''
|
||||
}
|
||||
|
||||
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
|
||||
(rv: any) => {
|
||||
this.options = rv
|
||||
rv.forEach((rvItem:any,rvIndex:number) => {
|
||||
this.options[rvIndex].value = rvItem.id
|
||||
this.options[rvIndex].label = rvItem.classificationName
|
||||
rvItem.childList.forEach((childItem:any,index:number) => {
|
||||
this.options[rvIndex].childList[index].value = childItem.id
|
||||
this.options[rvIndex].childList[index].label = childItem.classificationName
|
||||
});
|
||||
});
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
},
|
||||
turnToDetail(record:any){
|
||||
this.groupDetails = record.groupDetails
|
||||
let historyDetail:any = this.$refs.historyDetail
|
||||
this.collectionName = record.name
|
||||
historyDetail.changeDetailShow()
|
||||
},
|
||||
|
||||
|
||||
//改变页码
|
||||
changePage(e:any){
|
||||
this.currentPage = e.current
|
||||
this.pageSize = e.pageSize
|
||||
this.getHistoryList()
|
||||
},
|
||||
|
||||
//查询列表
|
||||
searchHistoryList(){
|
||||
this.currentPage = 1
|
||||
this.getHistoryList()
|
||||
},
|
||||
|
||||
getHistoryList(){
|
||||
this.isShowMark = true
|
||||
let startDate:any = this.rangePickerValue ? new Date(this.rangePickerValue[0]).getTime(): ''
|
||||
let endDate:any = this.rangePickerValue ? new Date(this.rangePickerValue[1]).getTime(): ''
|
||||
|
||||
let labelArr:any = []
|
||||
this.value.labelValue.forEach((item:any)=>{
|
||||
labelArr.push(item[item.length-1])
|
||||
})
|
||||
let data = {
|
||||
classificationIdList:labelArr,
|
||||
page:this.currentPage,
|
||||
size:this.pageSize,
|
||||
collectionName:this.searchCollectionName,
|
||||
startDate:startDate,
|
||||
endDate:endDate,
|
||||
intersection:this.intersection,
|
||||
}
|
||||
|
||||
Https.axiosPost( Https.httpUrls.historyProject, data).then(
|
||||
// Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
|
||||
(rv: any) => {
|
||||
if(this.currentPage > 1 && rv.content.length == 0){
|
||||
this.currentPage = 1
|
||||
this.getHistoryList()
|
||||
}else{
|
||||
this.collectionList = rv.content
|
||||
this.total = rv.total
|
||||
}
|
||||
this.isShowMark = false
|
||||
}
|
||||
).catch(res=>{
|
||||
this.isShowMark = false
|
||||
});
|
||||
},
|
||||
|
||||
//删除分组
|
||||
deleteGroup(record:any,index:number){
|
||||
console.log(record)
|
||||
let deleteGroupFun = (id:any,index:number) =>{
|
||||
let data = {
|
||||
projectId:id
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.projectDetail,{},{params:data}).then(
|
||||
(rv: any) => {
|
||||
message.success(this.t('HistoryPage.jsContent1'))
|
||||
this.collectionList.splice(index,1)
|
||||
// let userGroupId: any = computed(() => {
|
||||
// return
|
||||
// });
|
||||
if(record.id == this.store.state.HomeStoreModule.userGroupId){
|
||||
// this.store.commit('deleteUserGroupId')
|
||||
this.store.commit("setLikeDesignCollectionList", []);
|
||||
this.store.commit('createProbject')
|
||||
|
||||
this.store.commit("clearAllData");
|
||||
this.store.commit("clearAllCollection");
|
||||
this.store.commit("setAllBoardDataChoose",{});
|
||||
this.store.commit("clearShowSketchboard",{});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
Modal.confirm({
|
||||
title: this.t('HistoryPage.jsContent2'),
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
okText: 'Yes',
|
||||
cancelText: 'No',
|
||||
centered:true,
|
||||
mask:false,
|
||||
onOk() {
|
||||
deleteGroupFun(record.id,index)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//修改名字
|
||||
renameCollection(record:any,index:number){
|
||||
let searchLabel:any = this.$refs.searchLabel
|
||||
searchLabel.init(record,index)
|
||||
},
|
||||
|
||||
retrieveHome(record:any){
|
||||
let num = true
|
||||
if(record.original == 0){
|
||||
num = false
|
||||
}
|
||||
this.store.commit('createProbject')
|
||||
this.$router.push({name:'homePage',params: {id:record.id,type:'History'}})
|
||||
this.store.commit('setChooseIsDesign',num)
|
||||
|
||||
},
|
||||
removeLabel(){
|
||||
let setLabel:any = this.$refs.setLabel
|
||||
let cascader:any = this.$refs.cascader
|
||||
cascader.togglePopperVisible()
|
||||
let event = new Event('click', {"bubbles":true, "cancelable":true});
|
||||
document.dispatchEvent(event);
|
||||
setLabel.init('add',this.options)
|
||||
},
|
||||
dropdownVisibleChange(){
|
||||
let element:any = this.$refs.cascader
|
||||
nextTick().then(()=>{
|
||||
let cascader = document.getElementsByClassName('libraryPageCascader')[0]
|
||||
let cascaderChild = cascader
|
||||
let element:any = this.$refs.cascader
|
||||
if(cascader.children.length > 3 ){
|
||||
}else{
|
||||
let button1:any = document.createElement("span")
|
||||
button1.classList.add('started_btn','cascader_btn1')
|
||||
let button2:any = document.createElement("span")
|
||||
button2.classList.add('started_btn','cascader_btn2')
|
||||
let divMax:any = document.createElement("div")
|
||||
divMax.classList.add('cascader_btn_max')
|
||||
button1.textContent = 'Edit'
|
||||
// button2.textContent = '删除'
|
||||
button1.addEventListener('click',this.removeLabel,false)
|
||||
divMax.appendChild(button1)
|
||||
// divMax.appendChild(button2)
|
||||
cascaderChild?.insertAdjacentElement("afterbegin", divMax);
|
||||
|
||||
// cascader.addEventListener('click',this.cascaderClick)
|
||||
}
|
||||
})
|
||||
let el = element.contentRef?.getElementsByClassName('el-cascader-menu__empty-text')?.[0]
|
||||
if(el){
|
||||
el.innerHTML = this.t('LibraryPage.NoLabel')
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="less">
|
||||
.history_page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 6rem;
|
||||
overflow: hidden;
|
||||
// min-width: 1440px;
|
||||
position: relative;
|
||||
.page_content {
|
||||
position: relative;
|
||||
.el-cascader .el-input .icon-arrow-down{
|
||||
font-size: 2.4rem;
|
||||
}
|
||||
.page_content_body {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.history_page_body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 3rem 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.history_header{
|
||||
font-size: 1.8rem;
|
||||
height: 6.3rem;
|
||||
line-height: 6.3rem;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.history_table_search{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.ant-picker:hover, .ant-picker-focused{
|
||||
border-color: #d5d8df;
|
||||
}
|
||||
.content_search_block{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 140rem;
|
||||
|
||||
.search_icon_block{
|
||||
width: 5.2rem;
|
||||
height: 2.8rem;
|
||||
line-height: 2.8rem;
|
||||
text-align: center;
|
||||
background: #343579;
|
||||
background-color: #39215b;
|
||||
cursor: pointer;
|
||||
border-radius: 2rem;
|
||||
margin-left: 3rem;
|
||||
.icon-sousuo{
|
||||
font-size: 1.6rem;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
.intersection{
|
||||
cursor: pointer;
|
||||
margin-right: 3rem;
|
||||
>div{
|
||||
font-size: 3rem;
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.history_table_content{
|
||||
margin-top: 2.6rem;
|
||||
width: 100%;
|
||||
height: calc(100% - 13.7rem);
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
padding-bottom: 3rem;
|
||||
|
||||
.ant-table{
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ant-table-body{
|
||||
overflow-y: auto !important;
|
||||
-ms-overflow-style: none;
|
||||
overflow: -moz-scrollbars-none;
|
||||
|
||||
&::-webkit-scrollbar { width: 0 !important }
|
||||
|
||||
}
|
||||
|
||||
.ant-table-thead > tr > th{
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.ant-table-tbody > tr:hover{
|
||||
background: #ededed;
|
||||
}
|
||||
.ant-table-tbody > tr > td{
|
||||
border: none;
|
||||
background: transparent;
|
||||
|
||||
|
||||
}
|
||||
.ant-table-pagination-right{
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ant-table-pagination-right{
|
||||
padding-right: 3.5rem;
|
||||
}
|
||||
|
||||
.operate_list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 1rem;
|
||||
|
||||
.operate_item{
|
||||
font-size: 1.4rem;
|
||||
font-family: Roboto;
|
||||
font-weight: 400;
|
||||
color: #007EE5;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.rename_modal_component{
|
||||
|
||||
.collection_rename_content{
|
||||
padding:2rem 9.2rem 3rem;
|
||||
|
||||
|
||||
.rename_form_content{
|
||||
|
||||
.rename_form_input{
|
||||
width: 100%;
|
||||
height: 4.6rem;
|
||||
margin-top: 1rem;
|
||||
border: 0.1rem solid #B4BED7;
|
||||
padding-left: 2.1rem;
|
||||
line-height: 4.6rem;
|
||||
font-size: 1.8rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
&::placeholder {
|
||||
color:#A5B0C2,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rename_submit_button{
|
||||
height: 4.8rem;
|
||||
line-height: 4.8rem;
|
||||
background: #343579;
|
||||
font-size: 2.4rem;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
width: 16rem;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
margin: 4.5rem auto 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -481,7 +481,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>{{ ageGroup }}
|
||||
</div>
|
||||
<mannequinEdit ref="ModelPlacement" :ageGroup="ageGroup" :isPop="true" @submit="getLibraryList"></mannequinEdit>
|
||||
|
||||
</div>
|
||||
@@ -524,7 +524,7 @@ import { remove } from "jszip";
|
||||
import createSlogan from "@/component/HomePage/createSlogan.vue";
|
||||
import generalMenu from "@/component/HomePage/generalMenu.vue";
|
||||
import UpgradePlan from "@/component/HomePage/UpgradePlan.vue";
|
||||
import mannequinEdit from "@/component/HomePage/index/model/mannequin/edit.vue";
|
||||
import mannequinEdit from "@/component/home/design/mannequin/edit.vue";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
setLabel,
|
||||
@@ -1966,6 +1966,8 @@ export default defineComponent({
|
||||
// width: calc(100% - 23.5rem);
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header_operate_item{
|
||||
margin-right: 5rem;
|
||||
color: #C2C2C2;
|
||||
@@ -2048,7 +2050,9 @@ export default defineComponent({
|
||||
|
||||
.libray_right_content{
|
||||
width:100%;
|
||||
height:calc(100% - 12rem);
|
||||
// height:calc(100% - 12rem);
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding: 0.1rem 0 0 0.3rem;
|
||||
box-sizing: border-box;
|
||||
&.myBrand{
|
||||
@@ -2165,6 +2169,7 @@ export default defineComponent({
|
||||
justify-content: flex-start;
|
||||
align-content: flex-start;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
&.content_body_table::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@@ -2343,7 +2348,7 @@ export default defineComponent({
|
||||
.table_pagination{
|
||||
text-align: center;
|
||||
// height: 5.2rem;
|
||||
flex: 1;
|
||||
// flex: 1;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user