Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite

This commit is contained in:
X1627315083
2025-09-17 14:02:17 +08:00
11 changed files with 1074 additions and 662 deletions

12
components.d.ts vendored
View File

@@ -9,14 +9,11 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
ABadge: typeof import('ant-design-vue/es')['Badge']
ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb']
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
ADrawer: typeof import('ant-design-vue/es')['Drawer']
AImage: typeof import('ant-design-vue/es')['Image']
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
AMenu: typeof import('ant-design-vue/es')['Menu']
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
AModal: typeof import('ant-design-vue/es')['Modal']
APagination: typeof import('ant-design-vue/es')['Pagination']
APopover: typeof import('ant-design-vue/es')['Popover']
@@ -24,16 +21,17 @@ declare module 'vue' {
ASelect: typeof import('ant-design-vue/es')['Select']
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
ASlider: typeof import('ant-design-vue/es')['Slider']
ASpace: typeof import('ant-design-vue/es')['Space']
ASpin: typeof import('ant-design-vue/es')['Spin']
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
ASwitch: typeof import('ant-design-vue/es')['Switch']
ATable: typeof import('ant-design-vue/es')['Table']
ATabPane: typeof import('ant-design-vue/es')['TabPane']
ATabs: typeof import('ant-design-vue/es')['Tabs']
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
AUpload: typeof import('ant-design-vue/es')['Upload']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElLoading: typeof import('element-plus/es')['ElLoading']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}

View File

@@ -4,7 +4,7 @@
<div
class="image-list-trigger"
@click="showPanel = true"
:title="$t('打开图片库')"
:title="$t('Canvas.photoGallery')"
>
<SvgIcon name="CImageList" :size="20" />
</div>

View File

@@ -0,0 +1,134 @@
<template>
<a-modal
class="hsitory_detail_modal_component"
v-model:visible="hsitoryDetailShow"
:footer="null"
width="80%"
:maskClosable="false"
:keyboard="false"
:centered="true"
:closable="false"
>
<!-- <template #closeIcon>
<div class="close_icon" @click.stop="changeDetailShow()">
<span class="icon iconfont icon-guanbi"></span>
</div>
</template> -->
<template #title>
<div class="custom_title">
<div class="title_text">{{ collectionName }}</div>
<div class="close_icon" @click.stop="changeDetailShow()">
<span class="icon iconfont icon-guanbi"></span>
</div>
</div>
</template>
<div class="history_detail_content scroll_style">
<div class="history_img_block" v-for="img in groupDetails" :key="img">
<div class="history_img_item">
<img class="element_img" :src="img.url" />
</div>
</div>
</div>
</a-modal>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
props: {
groupDetails: {
default: {}
},
collectionName: {
default: ''
}
},
setup() {},
data() {
return {
hsitoryDetailShow: false
}
},
methods: {
changeDetailShow() {
this.hsitoryDetailShow = !this.hsitoryDetailShow
}
}
})
</script>
<style lang="less" scoped>
.hsitory_detail_modal_component {
// .ant-modal-close {
// width: 3.6rem;
// height: 3.6rem;
// position: absolute;
// top: -1.8rem;
// right: -1.8rem;
// }
.custom_title {
display: flex;
justify-content: space-between;
align-items: center;
}
.title_text {
font-size: 1.6rem;
}
.ant-modal-header {
background: #f7f7f7;
}
.ant-modal-body {
background: #f2f3fb;
height: 80vh;
min-height: 72rem;
overflow-y: hidden;
padding: 0;
}
.close_icon {
width: 3.6rem;
height: 3.6rem;
background: #000000;
border-radius: 50%;
line-height: 3.6rem;
text-align: center;
cursor: pointer;
.icon-guanbi {
font-size: 2rem;
color: #ffffff;
}
}
.history_detail_content {
padding: 2.6rem 2rem 2.6rem 3.7rem;
height: 100%;
width: 100%;
overflow-y: auto;
background: #ffffff;
.history_img_block {
width: 16.5rem;
height: 16.5rem;
border: 0.1rem solid #343579;
margin: 0 1.7rem 1.7rem 0;
display: inline-block;
.history_img_item {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.element_img {
max-width: 100%;
max-height: 100%;
}
}
}
}
</style>

View File

@@ -14,6 +14,7 @@
<div class="rename_form_content">
<input class="rename_form_input" :placeholder="$t('LibraryPage.inputContent3')" v-model="newPicName" @keydown.enter="confrimRename()">
</div>
<template v-if="!isHistory">
<div class="collection_rename_title">{{$t('LibraryPage.Tag')}}</div>
<el-cascader
:options="options"
@@ -35,6 +36,7 @@
</div>
</template>
</el-cascader>
</template>
<div v-show="selectCode == 'Sketchboard' || selectCode == 'Printboard'" class="collection_rename_title">{{$t('LibraryPage.Category')}}</div>
<!-- <div v-show="selectCode == 'Sketchboard' || selectCode == 'Printboard'" class="collection_rename_title">{{$t('LibraryPage.Category')}}</div> -->
<div v-show="selectCode == 'Sketchboard' || selectCode == 'Printboard'" class="rename_form_content">
@@ -90,6 +92,12 @@ import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
import { ElCascader } from 'element-plus'
export default defineComponent({
props:{
isHistory:{
type:Boolean,
default:false
},
},
components:{
VueCropper,
ElCascader,

View File

@@ -0,0 +1,112 @@
<template>
<div class="table_search_bar flex flex-justify-between flex-align-center">
<div class="search_preset flex flex-1">
<div
class="preset_item gallery_btn white"
v-for="item in buttonList"
:class="{ active: searchParams.currentPreset === item.value }"
:key="item.value"
@click="handleButtonClick(item.value)"
>
{{ item.label }}
</div>
</div>
<div class="search_input flex flex-align-center">
<input
class="search_input_inner flex-1"
v-model="searchParams.searchText"
:bordered="false"
@keydown.enter="handleSearch"
:placeholder="placeholder"
/>
<SearchOutlined @click="handleSearch" />
</div>
</div>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { SearchOutlined } from '@ant-design/icons-vue'
interface ButtonItem {
label: string
value: string
}
interface Props {
buttonList: ButtonItem[]
placeholder?: string
}
interface SearchParams {
searchText: string
currentPreset: string
}
interface Emits {
(e: 'search', params: SearchParams): void
}
const props = withDefaults(defineProps<Props>(), {
placeholder: 'batchGeneration.Search'
})
const emit = defineEmits<Emits>()
// 内部状态管理
const searchParams = reactive({
searchText: '',
currentPreset:props.buttonList[0]?.value || ''
})
// 处理按钮点击
const handleButtonClick = (value: string) => {
searchParams.currentPreset = value
handleSearch()
}
// 处理搜索
const handleSearch = () => {
emit('search', searchParams)
}
</script>
<style lang="less" scoped>
.flex {
display: flex;
}
.flex-1 {
flex: 1;
}
.flex-justify-between {
justify-content: space-between;
}
.flex-align-center {
align-items: center;
}
.table_search_bar {
.search_preset {
column-gap: 2rem;
.preset_item {
line-height: 4rem;
min-width: 10rem;
font-weight: normal;
}
}
.search_input {
height: 4rem;
background-color: #fff;
border: 0.1rem solid #000;
border-radius: 43rem;
// column-gap: 3rem;
padding-right: 1rem;
.search_input_inner {
border: none;
height: 100%;
padding-left: 3rem;
border-radius: 4rem;
}
}
}
</style>

View File

@@ -295,6 +295,7 @@ export default defineComponent({
})
let obj = {
value:'mannquin',
// type:'Mannquin',
type:data.locale == "ENGLISH"?'Mannquin':'模特',
imgList:list
}

View File

@@ -351,8 +351,8 @@ export default {
CollectionsName: "名字",
source: "来源",
UptateTime: "修改时间",
SketchCounts: "项目名字",
Operations: "Operations",
SketchCounts: "草图数量",
Operations: "操作",
jsContent1: "删除成功",
jsContent2: "您确定要删除这个收藏吗?",
jsContent3: "修改成功",

View File

@@ -353,7 +353,7 @@ export default {
CollectionsName: "Collections Name",
source: "Source",
UptateTime: "Uptate Time",
SketchCounts: "Project Name",
SketchCounts: "SketchCounts",
Operations: "Operations",
jsContent1: "Deleted successfully",
jsContent2: "Do you really want to delete this collection? ",

View File

@@ -348,18 +348,24 @@ const navTypeList = (t)=>{
},
]
},
history:{
// history:{
// icon:'fi-br-time-past',
// label:t('HistoryPage.History'),
// value:'history',
// Todaylist:[
// ],
// Yesterdaylist:[
// ],
// WithinAWeeklist:[
// ],
// Earlierlist:[
// ],
// },
history111:{
icon:'fi-br-time-past',
label:t('HistoryPage.History'),
value:'history',
Todaylist:[
],
Yesterdaylist:[
],
WithinAWeeklist:[
],
Earlierlist:[
],
value:'history111',
router:'/home/history111'
},
gallery:{
icon:'fi-rr-gallery',

View File

@@ -18,17 +18,17 @@
<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'}">
<div class="tools list" v-for="item in navTypeList" :class="{active:openType == item.value,history:item.value == 'history','show-history' : showHistory && item.value === 'history111','isHistory' : item.value === 'history111'}">
<div class="titleBox" @click="setOpenType(item.value,item.list)">
<div class="left">
<i :class="['fi',item.icon]"></i>
<span>{{item.label}}</span>
</div>
<div class="right">
<div class="right" v-if="item.value !== 'history111' ">
<i class="fi fi-br-angle-small-down"></i>
</div>
</div>
<div class="detailBox" v-show="openType">
<div class="detailBox" v-if="item.value != 'history111'" 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>
@@ -342,7 +342,8 @@ export default defineComponent({
isWithinAWeek:false,
isEarlier:false,
},
bathGenerationList:["poseTransfer","SERIES_DESIGN","toProduct","relight"]
bathGenerationList: ["poseTransfer", "SERIES_DESIGN", "toProduct", "relight"],
showHistory:false
})
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
@@ -366,6 +367,8 @@ export default defineComponent({
}
}
})
// watch(()=>locale.value,(newVal,oldVal)=>{
// if(newVal == oldVal)return
// console.log(newVal , oldVal)
@@ -420,7 +423,21 @@ export default defineComponent({
},
{ immediate: true } // 立即触发一次以处理初始参数
);
// watch(()=>homeMainData.navTypeList,()=>{
// 监听路由,当路由地址为/home/history111时homeMainData.showHistory为true,改变左侧菜单颜色
watch(() => route.path, () => {
if(route.path == '/home/history111'){
homeMainData.showHistory = true
}else{
homeMainData.showHistory = false
}
},
{ immediate: true }
)
// watch(()=>homeMainData.openTypeList,()=>{
// homeMainData.historyData.page = 1
// })
@@ -548,15 +565,14 @@ export default defineComponent({
if(Observer?.unobserve)Observer.unobserve(imgParent);
})
const setOpenType = (type, list) => {
if(homeMainData.openType == type){
homeMainData.openType = ''
}else {
homeMainData.openType = type
// if(type == 'history'){
// if(list.length == 0){
// }
// }
if (type === 'history111') {
router.push('/home/history111')
}
}
}
let Observer = null
@@ -1129,6 +1145,10 @@ export default defineComponent({
// padding: 1.2rem;
max-height: 5rem;
border-radius: 2rem;
&.show-history{
background: #fff;
border-radius: 0.8rem;
}
&.active{
> .detailBox{
flex: 1;
@@ -1377,6 +1397,11 @@ export default defineComponent({
overflow: hidden;
max-height: 100%;
background: #00000008;
&.isHistory{
background: #fff;
border-radius: 0.8rem;
max-height: 5rem;
}
> .titleBox{
padding: 0;
margin-bottom: 1.6rem;
@@ -1388,6 +1413,7 @@ export default defineComponent({
}
}
}
&.language{
> .titleBox{
padding: .8rem;

View File

@@ -1,101 +1,30 @@
徽标
工单管理
合并请求
里程碑
探索
aidlab
/
aida_front
代码
工单
合并请求
Actions
软件包
项目
版本发布
百科
动态
您已经于43分钟前推送了分支 dev_vite
您已经于43分钟前推送了分支 StableVersion
文件
Events.vue
HomeView.vue
Works.vue
history.vue
library.vue
404.vue
Administrator.vue
Demo.vue
HomeMain.vue
HomeRecommend.vue
LoginPage.vue
Register.vue
Upgrade.vue
emailVerify.vue
feedbackSurvey.vue
feedbackSurveyCN.vue
paySucceed.vue
setIdentification.vue
test.vue
trialApproval.vue
versions1Guide.vue
App.vue
main.ts
shims-vue.d.ts
.env
.env.dev
.env.dev_build
.env.production
.env.test
.env.test_build
.eslintrc.js
.gitignore
README.md
babel.config.js
dist.7z
package-lock.json
package.json
tsconfig.json
vue.config.js
aida_front
/
src
/
views
/
HomeView
/
history.vue
X1627315083
b6e5f05f06
fix
6个月前
559
18 KiB
Vue
<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="history_page_body flex">
<!-- <div class="history_table_search">
<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">
<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()">
<input
class="search_input"
:placeholder="$t('LibraryPage.inputContent1')"
v-model="searchCollectionName"
@keydown.enter="searchHistoryList()"
/>
</div>
<div class="generalModel_state_item">
<el-cascader
@@ -106,7 +35,7 @@ Vue
:show-all-levels="false"
:clearable="true"
:placeholder="$t('LibraryPage.Select')"
:max-collapse-tags=3
:max-collapse-tags="3"
:props="props"
:collapse-tags-tooltip="true"
ref="cascader"
@@ -121,43 +50,82 @@ Vue
</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
: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
class="gallery_btn"
style="padding: 2rem; line-height: 1"
@click="searchHistoryList('')"
>
<span class="icon iconfont icon-sousuo"></span>
</div>
</div>
<div class="history_table_content" ref="historyTable">
<a-table :columns="columns" :data-source="collectionList" :scroll="{ y: historyTableHeight }" @change="changePage"
</div> -->
<TableSearchBar
:button-list="presetList"
:placeholder="t('batchGeneration.Search')"
@search="searchHistoryList"
/>
<div class="history_table_content flex-1" ref="historyTable">
<a-config-provider :locale="tableLocale">
<a-table
row-class-name="history_table_row"
:columns="columns"
:data-source="collectionList"
:scroll="{ y: historyTableHeight }"
@change="changePage"
:pagination="{
showSizeChanger:true,
current: currentPage,
pageSize: pageSize,
total: total,
bordered: false,
showQuickJumper: true,
bordered:false
}">
showSizeChanger: 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 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>
</a-config-provider>
</div>
</div>
</div>
</div>
<!-- <HistoryDetail ref="historyDetail" :groupDetails="groupDetails" :collectionName="collectionName"></HistoryDetail> -->
<setLabel ref="setLabel"></setLabel>
<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">
<!-- <searchLabel ref="searchLabel" isHistory></searchLabel> -->
<projectSetting ref="projectSetting" @getHistory="getHistoryList"></projectSetting>
<div class="history_loading" v-show="isShowMark">
<a-spin size="large" />
</div>
</div>
@@ -165,43 +133,77 @@ Vue
<script lang="ts">
import { defineComponent, ref, createVNode, computed, nextTick, provide } from 'vue'
// import HeaderComponent from "@/component/HomePage/Header.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 HistoryDetail from '@/component/Detail/historyDetail/index.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 { ExclamationCircleOutlined, SearchOutlined } 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";
import { useI18n } from 'vue-i18n'
import enUS from 'ant-design-vue/es/locale/en_US'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import { ConfigProvider } from 'ant-design-vue'
import TableSearchBar from '@/component/common/TableSearchBar.vue'
// import setLabel from '@/component/LibraryPage/setLabel.vue'
// import searchLabel from '@/component/LibraryPage/searchLabel.vue'
import projectSetting from '@/component/home/newProject/setting.vue'
import { useStore } from 'vuex'
export default defineComponent({
components: {
// HeaderComponent,
// HistoryDetail,
HistoryDetail,
// RobotAssist,
setLabel,
// setLabel,
ElCascader,
searchLabel,
// searchLabel,
SearchOutlined,
ConfigProvider,
TableSearchBar,
projectSetting
},
setup() {
const store = useStore();
const store = useStore()
let rangePickerValue: any = ref([])
const projectSetting: any = ref(null)
let renameData: any = ref({}) //修改名字选中的数据
let isShowMark: any = ref(false)
// 根据store中的语言设置返回对应的ant-design-vue语言包
const tableLocale = computed(() => {
const language = store.state.UserHabit?.userDetail?.language
return language === 'ENGLISH' ? enUS : zhCN
})
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)=>{
{
title: useI18n().t('HistoryPage.CollectionsName'),
align: 'left',
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',
align: 'center',
ellipsis: true,
width: 150,
dataIndex: 'original',
key: 'original',
customRender: (record: any) => {
let str = ''
if (record.text == 1) {
@@ -213,7 +215,14 @@ export default defineComponent({
return str
}
},
{ title: useI18n().t('HistoryPage.SketchCounts'), align:'center', ellipsis: true, width: 120, dataIndex: 'sketchCount', key: 'sketchCounts' },
{
title: useI18n().t('HistoryPage.SketchCounts'),
align: 'center',
ellipsis: true,
width: 120,
dataIndex: 'sketchCount',
key: 'sketchCounts'
},
{
title: useI18n().t('HistoryPage.Operations'),
key: 'operation',
@@ -221,17 +230,16 @@ export default defineComponent({
fixed: 'right',
width: 180,
// slots:{customRender:'action'}
Operations:true,
},
Operations: true
}
]
});
})
let collectionList: any = ref([])
let { t } = useI18n()
const options:any = ref([
]);
const options: any = ref([])
let value = ref({
labelValue: [],
editLabelValue:[],
editLabelValue: []
})
let props = {
multiple: true,
@@ -239,7 +247,7 @@ export default defineComponent({
emitPath: true,
children: 'childList',
value: 'id',
label:'classificationName',
label: 'classificationName'
}
let intersection = ref(1)
let selectCode = ref('History')
@@ -261,6 +269,10 @@ export default defineComponent({
intersection,
selectCode,
isShowMark,
enUS,
zhCN,
tableLocale,
projectSetting
}
},
data() {
@@ -268,36 +280,71 @@ export default defineComponent({
currentPage: 1,
pageSize: 10,
total: 0,
presetList: [
{ label: this.t('Header.All'), value: 'all' },
{ label: this.t('newProjectg.series'), value: 'series' },
{ label: this.t('newProjectg.single'), value: 'single' },
{ label: this.t('Header.Product'), value: 'product' },
{ label: this.t('Header.POSE_TRANSFER'), value: 'video' }
],
searchParam: {
text: '',
type: '',
current: 1,
pageSize: 10,
total: 0
},
historyTableHeight: 0,
newCollectionName: '',
groupDetails: {}, //每个collection的详情
collectionName: '', //选中的名字
searchCollectionName: '',
resizeObserver: null // ResizeObserver 实例
}
},
mounted() {
let historyTable: any = this.$refs.historyTable
this.historyTableHeight = historyTable.clientHeight - 130
// 创建 ResizeObserver 监听 historyTable 高度变化
this.resizeObserver = new ResizeObserver(entries => {
for (let entry of entries) {
const newHeight = entry.contentRect.height - 130
this.historyTableHeight = newHeight
}
})
// 开始观察 historyTable 元素
this.resizeObserver.observe(historyTable)
this.getHistoryList()
this.getClass()
},
beforeUnmount() {
// 清理 ResizeObserver
if (this.resizeObserver) {
this.resizeObserver.disconnect()
this.resizeObserver = null
}
},
methods: {
getClass() {
let data = {
"classificationIdList": [],
"classificationName": "",
"createTime": "",
"deleteConfirm": '',
"id": '',
"libraryId": '',
"parentId": '',
"type": this.selectCode,
"updateTime": "",
"userId": ''
classificationIdList: [],
classificationName: '',
createTime: '',
deleteConfirm: '',
id: '',
libraryId: '',
parentId: '',
type: this.selectCode,
updateTime: '',
userId: ''
}
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
(rv: any) => {
Https.axiosPost(Https.httpUrls.queryClassification, data)
.then((rv: any) => {
this.options = rv
rv.forEach((rvItem: any, rvIndex: number) => {
this.options[rvIndex].value = rvItem.id
@@ -305,20 +352,19 @@ export default defineComponent({
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)=>{
});
})
})
})
.catch(res => {})
},
turnToDetail(record: any) {
this.groupDetails = record.groupDetails
let historyDetail: any = this.$refs.historyDetail
this.collectionName = record.name
historyDetail.changeDetailShow()
historyDetail.changeDetailShow(record)
},
//改变页码
changePage(e: any) {
this.currentPage = e.current
@@ -327,15 +373,20 @@ export default defineComponent({
},
//查询列表
searchHistoryList(){
searchHistoryList(value: any) {
console.log('value', value)
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 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) => {
@@ -348,49 +399,63 @@ export default defineComponent({
collectionName: this.searchCollectionName,
startDate: startDate,
endDate: endDate,
intersection:this.intersection,
intersection: this.intersection
}
Https.axiosPost( Https.httpUrls.historyProject, data).then(
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.collectionList = rv.content.map(el => {
const object = {
...el,
sketchCount: el.userLikeGroupVO?.sketchCount,
groupDetails: el.userLikeGroupVO?.groupDetails
}
return object
})
this.total = rv.total
}
this.isShowMark = false
}
).catch(res=>{
)
.catch(res => {
this.isShowMark = false
});
})
},
//删除分组
deleteGroup(record: any, index: number) {
console.log('record', record)
let deleteGroupFun = (id: any, index: number) => {
let data = {
userGroupId:id
}
Https.axiosPost(Https.httpUrls.deleteUserGroup,data).then(
(rv: any) => {
// let data = {
// userGroupId: id
// }
Https.axiosPost(
Https.httpUrls.projectDetail,
{},
{ params: { projectId: id } }
).then((rv: any) => {
message.success(this.t('HistoryPage.jsContent1'))
this.collectionList.splice(index, 1)
this.getHistoryList()
// let userGroupId: any = computed(() => {
// return
// });
if(record.id == this.store.state.HomeStoreModule.userGroupId){
this.store.commit('deleteUserGroupId')
this.store.commit("setLikeDesignCollectionList", []);
this.store.commit("clearAllData");
this.store.commit("clearAllCollection");
this.store.commit("setAllBoardDataChoose",{});
this.store.commit("clearShowSketchboard",{});
}
}
);
// if (record.id == this.store.state.HomeStoreModule.userGroupId) {
// this.store.commit('deleteUserGroupId')
// this.store.commit('setLikeDesignCollectionList', [])
// this.store.commit('clearAllData')
// this.store.commit('clearAllCollection')
// this.store.commit('setAllBoardDataChoose', {})
// this.store.commit('clearShowSketchboard', {})
// }
})
}
Modal.confirm({
title: this.t('HistoryPage.jsContent2'),
@@ -402,30 +467,52 @@ export default defineComponent({
onOk() {
deleteGroupFun(record.id, index)
}
});
})
},
//修改名字
renameCollection(record: any, index: number) {
let searchLabel:any = this.$refs.searchLabel
searchLabel.init(record,index)
// let searchLabel: any = this.$refs.searchLabel
// searchLabel.init(record, index)
this.$refs.projectSetting.init(record)
},
retrieveHome(record: any) {
let num = true
if(record.original == 0){
num = false
}
this.$router.push({name:'homePage',params: {id:record.id,type:'History'}})
this.store.commit('setChooseIsDesign',num)
// let num = true
// if (record.original == 0) {
// num = false
// }
// this.$router.push({ name: 'homePage', params: { id: record.id, type: 'History' } })
// this.store.commit('setChooseIsDesign', num)
// router.push(`/home/tools?tools=toProduct&id=${childItem.id}`)
if (record.process == 'SERIES_DESIGN' || record.process == 'SINGLE_DESIGN') {
this.$router.push(`/home?history=${record?.id}`)
} else {
let processList = {
toProduct: 'TO_PRODUCT_IMAGE',
relight: 'RELIGHT',
poseTransfer: 'POSE_TRANSFER',
deReconstruction: 'DE_RECONSTRUCTION',
patternMaking3D: 'THREE_D_PLATE_MAKING',
canvasUpload: 'CANVAS'
}
let process = ''
for (const key in processList) {
if (processList[key] == record.process) {
process = key
break
}
}
this.$router.push(`/home/tools?tools=${process}&id=${record.id}`)
}
},
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);
let event = new Event('click', { bubbles: true, cancelable: true })
document.dispatchEvent(event)
setLabel.init('add', this.options)
},
dropdownVisibleChange() {
@@ -436,38 +523,67 @@ export default defineComponent({
let element: any = this.$refs.cascader
if (cascader.children.length > 3) {
} else {
let button1:any = document.createElement("span")
let button1: any = document.createElement('span')
button1.classList.add('started_btn', 'cascader_btn1')
let button2:any = document.createElement("span")
let button2: any = document.createElement('span')
button2.classList.add('started_btn', 'cascader_btn2')
let divMax:any = document.createElement("div")
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);
cascaderChild?.insertAdjacentElement('afterbegin', divMax)
// cascader.addEventListener('click',this.cascaderClick)
}
})
let el = element.contentRef?.getElementsByClassName('el-cascader-menu__empty-text')?.[0]
let el = element.contentRef?.getElementsByClassName(
'el-cascader-menu__empty-text'
)?.[0]
if (el) {
el.innerHTML = this.t('LibraryPage.NoLabel')
}
},
}
}
})
</script>
<style lang="less">
<style lang="less" scoped>
.flex {
display: flex;
}
.flex-1 {
flex: 1;
}
.flex-justify-between {
justify-content: space-between;
}
.flex-align-center {
align-items: center;
}
.history_page {
width: 100%;
height: 100%;
padding: 0 6rem;
overflow: hidden;
background-color: #f5f5f5;
// min-width: 1440px;
position: relative;
.history_loading {
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
left: 0;
top: 0;
z-index: 99999;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
flex-direction: column;
}
.page_content {
position: relative;
.el-cascader .el-input .icon-arrow-down {
@@ -484,6 +600,7 @@ export default defineComponent({
height: 100%;
padding: 3rem 0;
box-sizing: border-box;
flex-direction: column;
.history_header {
font-size: 1.8rem;
@@ -493,53 +610,54 @@ export default defineComponent({
color: #333333;
}
.history_table_search{
display: flex;
align-items: center;
// .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;
.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;
}
}
}
}
// .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);
// height: calc(100% - 13.7rem);
// background: rgba(255, 255, 255, 0.6);
background: #f5f5f5;
padding-bottom: 3rem;
.ant-table{
:deep(.ant-table) {
background: transparent;
}
@@ -548,21 +666,21 @@ export default defineComponent({
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
&::-webkit-scrollbar { width: 0 !important }
&::-webkit-scrollbar {
width: 0 !important;
}
}
.ant-table-thead > tr > th{
background: #FFFFFF;
:deep(.ant-table-thead > tr > th) {
// background: #ffffff;
background: transparent;
}
.ant-table-tbody > tr:hover{
:deep(.ant-table-tbody > tr:hover) {
background: #ededed;
}
.ant-table-tbody > tr > td{
:deep(.ant-table-tbody > tr > td) {
border: none;
background: transparent;
}
.ant-table-pagination-right {
justify-content: center;
@@ -572,6 +690,27 @@ export default defineComponent({
padding-right: 3.5rem;
}
:deep(.ant-table-placeholder) {
&,
.ant-table-cell {
background-color: #f5f5f5;
}
}
:deep(.ant-pagination-item) {
background: none;
border: none;
a {
color: rgba(0, 0, 0, 0.3);
}
&-active a {
color: #000;
}
a:hover {
color: #000;
}
}
.operate_list {
display: flex;
align-items: center;
@@ -582,7 +721,7 @@ export default defineComponent({
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #007EE5;
color: #007ee5;
cursor: pointer;
}
}
@@ -590,30 +729,25 @@ export default defineComponent({
}
}
}
}
.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;
border: 0.1rem solid #b4bed7;
padding-left: 2.1rem;
line-height: 4.6rem;
font-size: 1.8rem;
box-sizing: border-box;
&::placeholder {
color:#A5B0C2,
color: #a5b0c2;
}
}
}
@@ -624,7 +758,7 @@ export default defineComponent({
background: #343579;
font-size: 2.4rem;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
width: 16rem;
text-align: center;
cursor: pointer;
@@ -633,10 +767,3 @@ export default defineComponent({
}
}
</style>
Powered by Gitea
当前版本: 1.24.5 页面:
155ms
模板:
20ms
许可证
API