修改generate传参

This commit is contained in:
X1627315083
2024-01-26 13:16:47 +08:00
parent a75342fe08
commit a90333517d
11 changed files with 524 additions and 65 deletions

View File

@@ -756,7 +756,7 @@ export default defineComponent({
.ant-modal-body{ .ant-modal-body{
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important; padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
// height: calc(65vh - 6.4rem*1.2)); // height: calc(65vh - 6.4rem*1.2));
height: calc(65rem*1.2*1.2); height: calc(65rem*1.2);
display: flex; display: flex;
overflow-y: hidden; overflow-y: hidden;
flex-direction: column; flex-direction: column;

View File

@@ -758,7 +758,7 @@ export default defineComponent({
.ant-modal-body{ .ant-modal-body{
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important; padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
// height: calc(65vh - 6.4rem*1.2)); // height: calc(65vh - 6.4rem*1.2));
height: calc(65rem*1.2*1.2); height: calc(65rem*1.2);
display: flex; display: flex;
overflow-y: hidden; overflow-y: hidden;
flex-direction: column; flex-direction: column;

View File

@@ -173,14 +173,15 @@
</div> </div>
</div> </div>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
<div class="mark_loading_text" v-show="generateLineUp >= 0">
<div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div>
</div>
<div class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div>
</div>
</div> </div>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
<div class="mark_loading_text" v-show="generateLineUp >= 0">
<div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div>
</div>
<div v-show="remGenerate" :class="[driver__.driver?'hideEvents':'']" class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div>
</div>
<scaleImage ref="scaleImage"></scaleImage> <scaleImage ref="scaleImage"></scaleImage>
</div> </div>
@@ -260,7 +261,9 @@ export default defineComponent({
let userInfo:any = {} let userInfo:any = {}
let generateId:any = ref() let generateId:any = ref()
let generateTime:any = ref() let generateTime:any = ref()
let generateLineUp:any = ref(0) let generateLineUp:any = ref(-1)
let remGenerate:any = ref(false)
let remGenerateTime:any = ref()
return { return {
imgList, imgList,
selectImgList, selectImgList,
@@ -296,6 +299,8 @@ export default defineComponent({
generateId, generateId,
generateTime, generateTime,
generateLineUp, generateLineUp,
remGenerate,
remGenerateTime,
}; };
}, },
data(prop) { data(prop) {
@@ -503,6 +508,8 @@ export default defineComponent({
}) })
}, },
getgenerate(){ getgenerate(){
clearInterval(this.remGenerateTime)
this.remGenerate = false
if(this.isTest){//试用用户禁止使用 if(this.isTest){//试用用户禁止使用
message.info( message.info(
this.t('isTest.available') this.t('isTest.available')
@@ -550,6 +557,9 @@ export default defineComponent({
if(rv){ if(rv){
this.generateId = rv this.generateId = rv
this.setGenerate() this.setGenerate()
this.remGenerateTime = setTimeout(()=>{
this.remGenerate = true
},10000)
}else{ }else{
// this.loadingShow = false // this.loadingShow = false
} }
@@ -589,7 +599,7 @@ export default defineComponent({
Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then( Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then(
(rv) => { (rv) => {
if(rv.generateId){ if(rv.generateId){
this.generateLineUp = 0 this.generateLineUp = -1
this.fileList = [] this.fileList = []
let arr let arr
rv.generatedCollectionItems.forEach((v:any,index:number)=>{ rv.generatedCollectionItems.forEach((v:any,index:number)=>{
@@ -608,12 +618,9 @@ export default defineComponent({
} }
}) })
clearInterval(this.generateTime) clearInterval(this.generateTime)
}else if(rv.rankPosition == null){ clearInterval(this.remGenerateTime)
this.generateLineUp = 0 this.remGenerate = false
// this.loadingShow = false
}else if(rv.rankPosition == 0){
this.generateLineUp = 0
// this.loadingShow = false
}else{ }else{
this.generateLineUp = rv.rankPosition this.generateLineUp = rv.rankPosition
} }
@@ -624,12 +631,12 @@ export default defineComponent({
}, },
removeGenerate(){ removeGenerate(){
if(this.generateId){ if(this.generateId){
let data = {uniqueId:this.generateId} let data = {uniqueId:this.generateId,userId:this?.userInfo?.userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}
Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then( Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(
(rv) => { (rv) => {
this.generateId = '' this.generateId = ''
this.loadingShow = false this.loadingShow = false
this.generateLineUp = 0 this.generateLineUp = -1
clearInterval(this.generateTime) clearInterval(this.generateTime)
} }
).catch(res=>{ ).catch(res=>{

View File

@@ -125,15 +125,15 @@
<a-checkbox v-model:checked="item.pin">{{ $t('PrintboardUpload.PIN') }}</a-checkbox> <a-checkbox v-model:checked="item.pin">{{ $t('PrintboardUpload.PIN') }}</a-checkbox>
</div> </div>
</div> </div>
<div class="mark_loading" v-show="loadingShow">
</div>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" /> <a-spin size="large" />
<div class="mark_loading_text" v-show="generateLineUp >= 0"> <div class="mark_loading_text" v-show="generateLineUp >= 0">
<div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div> <div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div>
</div> </div>
<div class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div> <div v-show="remGenerate" :class="[driver__.driver?'hideEvents':'']" class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div>
</div> </div>
</div>
</div> </div>
</div> </div>
<!-- 取消请求 --> <!-- 取消请求 -->
@@ -188,7 +188,9 @@ export default defineComponent({
let userInfo:any = {} let userInfo:any = {}
let generateId:any = ref() let generateId:any = ref()
let generateTime:any = ref() let generateTime:any = ref()
let generateLineUp:any = ref(0) let generateLineUp:any = ref(-1)
let remGenerate:any = ref(false)
let remGenerateTime:any = ref()
return { return {
fileList, fileList,
printImgList, printImgList,
@@ -207,6 +209,8 @@ export default defineComponent({
generateId, generateId,
generateTime, generateTime,
generateLineUp, generateLineUp,
remGenerate,
remGenerateTime,
} }
}, },
computed:{ computed:{
@@ -578,6 +582,8 @@ export default defineComponent({
},500) },500)
}, },
getgenerate(){ getgenerate(){
clearInterval(this.remGenerateTime)
this.remGenerate = false
if(this.isTest){//试用用户禁止使用 if(this.isTest){//试用用户禁止使用
message.warning( message.warning(
this.t('isTest.available') this.t('isTest.available')
@@ -668,6 +674,9 @@ export default defineComponent({
if(rv){ if(rv){
this.generateId = rv this.generateId = rv
this.setGenerate() this.setGenerate()
this.remGenerateTime = setTimeout(()=>{
this.remGenerate = true
},10000)
}else{ }else{
// this.loadingShow = false // this.loadingShow = false
} }
@@ -682,7 +691,7 @@ export default defineComponent({
Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then( Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then(
(rv) => { (rv) => {
if(rv.generateId){ if(rv.generateId){
this.generateLineUp = 0 this.generateLineUp = -1
this.generateList = [] this.generateList = []
let arr let arr
rv.generatedCollectionItems.forEach((v:any,index:number)=>{ rv.generatedCollectionItems.forEach((v:any,index:number)=>{
@@ -701,12 +710,8 @@ export default defineComponent({
} }
}) })
clearInterval(this.generateTime) clearInterval(this.generateTime)
}else if(rv.rankPosition == null){ clearInterval(this.remGenerateTime)
this.generateLineUp = 0 this.remGenerate = false
// this.loadingShow = false
}else if(rv.rankPosition == 0){
this.generateLineUp = 0
// this.loadingShow = false
}else{ }else{
this.generateLineUp = rv.rankPosition this.generateLineUp = rv.rankPosition
} }
@@ -717,12 +722,12 @@ export default defineComponent({
}, },
removeGenerate(){ removeGenerate(){
if(this.generateId){ if(this.generateId){
let data = {uniqueId:this.generateId} let data = {uniqueId:this.generateId,userId:this?.userInfo?.userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}
Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then( Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(
(rv) => { (rv) => {
this.generateId = '' this.generateId = ''
this.loadingShow = false this.loadingShow = false
this.generateLineUp = 0 this.generateLineUp = -1
clearInterval(this.generateTime) clearInterval(this.generateTime)
} }
).catch(res=>{ ).catch(res=>{

View File

@@ -247,14 +247,15 @@
<a-checkbox v-model:checked="item.pin">{{ $t('SketchboardUpload.PIN') }}</a-checkbox> <a-checkbox v-model:checked="item.pin">{{ $t('SketchboardUpload.PIN') }}</a-checkbox>
</div> </div>
</div> </div>
<div class="mark_loading" v-show="loadingShow">
</div>
<div class="mark_loading" v-show="loadingShow && remGenerate">
<a-spin size="large" /> <a-spin size="large" />
<div class="mark_loading_text" v-show="generateLineUp >= 0"> <div class="mark_loading_text" v-show="generateLineUp >= 0">
<div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div> <div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div>
</div> </div>
<div class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div> <div v-show="remGenerate" class="mark_loading_btn" :class="[driver__.driver?'hideEvents':'']" @click="removeGenerate">{{$t('Generate.Close')}}</div>
</div> </div>
</div>
</div> </div>
</div> </div>
<scaleImage ref="scaleImage"></scaleImage> <scaleImage ref="scaleImage"></scaleImage>
@@ -306,7 +307,9 @@ export default defineComponent({
let userInfo:any = {} let userInfo:any = {}
let generateId:any = ref() let generateId:any = ref()
let generateTime:any = ref() let generateTime:any = ref()
let generateLineUp:any = ref(0) let generateLineUp:any = ref(-1)
let remGenerate:any = ref(false)
let remGenerateTime:any = ref()
return { return {
fileList, fileList,
openClick, openClick,
@@ -326,6 +329,8 @@ export default defineComponent({
generateId, generateId,
generateTime, generateTime,
generateLineUp, generateLineUp,
remGenerate,
remGenerateTime,
}; };
}, },
data() { data() {
@@ -687,6 +692,8 @@ export default defineComponent({
}, },
//发送请求生成图片 //发送请求生成图片
getgenerate(){ getgenerate(){
clearInterval(this.remGenerateTime)
this.remGenerate = false
// this.sketchCatecoryList = this.store.state.Workspace.workspacePosition // this.sketchCatecoryList = this.store.state.Workspace.workspacePosition
let sketchCatecoryList = this.sketchCatecoryList let sketchCatecoryList = this.sketchCatecoryList
if(this.isTest){//试用用户禁止使用 if(this.isTest){//试用用户禁止使用
@@ -770,6 +777,9 @@ export default defineComponent({
if(rv){ if(rv){
this.generateId = rv this.generateId = rv
this.setGenerate() this.setGenerate()
this.remGenerateTime = setTimeout(()=>{
this.remGenerate = true
},10000)
} }
} }
).catch(res=>{ ).catch(res=>{
@@ -778,23 +788,29 @@ export default defineComponent({
}, },
setGenerate(){ setGenerate(){
let generage:any = this.$refs.Generate let generage:any = this.$refs.Generate
let generateType = generage.checkbox.filter((v:any)=>v.type)[0].name
let sketchCatecoryList = this.sketchCatecoryList let sketchCatecoryList = this.sketchCatecoryList
let categoryValue:any
generage.sketchboardList.forEach((item:any) => {
if(item.checked){
categoryValue = item.categoryValue
}
});
this.generateTime = setInterval(()=>{ this.generateTime = setInterval(()=>{
let data = {uniqueId:this.generateId} let data = {uniqueId:this.generateId}
Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then( Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then(
(rv) => { (rv) => {
if(rv.generateId){ if(rv.generateId){
this.generateLineUp = 0 this.generateLineUp = -1
clearInterval(this.generateTime) clearInterval(this.generateTime)
this.generateList = [] this.generateList = []
let arr let arr
rv.generatedCollectionItems.forEach((v:any,index:number)=>{ rv.generatedCollectionItems.forEach((v:any,index:number)=>{
arr = { arr = {
id:v.generateItemId, id:v.generateItemId,
imgUrl:v.generateItemUrl, imgUrl:v.generateItemUrl,
category:generage.level2Type?generage.level2Type:sketchCatecoryList[0].name, category:generage.level2Type?generage.level2Type:sketchCatecoryList[0].name,
categoryValue:generage.level2Type?generage.level2Type:sketchCatecoryList[0].value, categoryValue:categoryValue,
id_:GO.id++, id_:GO.id++,
like:v.isLiked like:v.isLiked
} }
@@ -806,12 +822,8 @@ export default defineComponent({
driverObj__.moveNext() driverObj__.moveNext()
} }
}) })
}else if(rv.rankPosition == null){ clearInterval(this.remGenerateTime)
this.generateLineUp = 0 this.remGenerate = false
// this.loadingShow = false
}else if(rv.rankPosition == 0){
this.generateLineUp = 0
// this.loadingShow = false
}else{ }else{
this.generateLineUp = rv.rankPosition this.generateLineUp = rv.rankPosition
} }
@@ -822,12 +834,12 @@ export default defineComponent({
}, },
removeGenerate(){ removeGenerate(){
if(this.generateId){ if(this.generateId){
let data = {uniqueId:this.generateId} let data = {uniqueId:this.generateId,userId:this?.userInfo?.userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}
Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then( Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(
(rv) => { (rv) => {
this.generateId = '' this.generateId = ''
this.loadingShow = false this.loadingShow = false
this.generateLineUp = 0 this.generateLineUp = -1
clearInterval(this.generateTime) clearInterval(this.generateTime)
} }
).catch(res=>{ ).catch(res=>{

View File

@@ -339,7 +339,7 @@ export default {
DesignPrintOperation:{ DesignPrintOperation:{
Placement:'调整位置', Placement:'调整位置',
Overall:'整体', Overall:'整体',
Single:'比例', Single:'单件',
Scale:'Scale', Scale:'Scale',
Random:'随机', Random:'随机',
inputContent:'输入名字进行搜索', inputContent:'输入名字进行搜索',

View File

@@ -65,7 +65,7 @@ export default {
Organize:'Organize', Organize:'Organize',
Upload:'Upload', Upload:'Upload',
Generate:'Generate', Generate:'Generate',
Close:'Close', Close:'Cancle',
Reset:'Reset', Reset:'Reset',
currently:'You are currently in the {generateLineUp} th position in the queue', currently:'You are currently in the {generateLineUp} th position in the queue',
Delete:'Delete', Delete:'Delete',
@@ -174,7 +174,7 @@ export default {
Upload:'Upload', Upload:'Upload',
Library:'Library', Library:'Library',
Generate:'Generate', Generate:'Generate',
Close:'Close', Close:'Cancle',
currently:'You are currently in the {generateLineUp} th position in the queue', currently:'You are currently in the {generateLineUp} th position in the queue',
PIN:'PIN', PIN:'PIN',
Maximum:'Maximum {maxImg} images can be uploaded, Maximum 2M per image', Maximum:'Maximum {maxImg} images can be uploaded, Maximum 2M per image',
@@ -193,7 +193,7 @@ export default {
Upload:'Upload', Upload:'Upload',
Library:'Library', Library:'Library',
Generate:'Generate', Generate:'Generate',
Close:'Close', Close:'Cancle',
currently:'You are currently in the {generateLineUp} th position in the queue', currently:'You are currently in the {generateLineUp} th position in the queue',
PIN:'PIN', PIN:'PIN',
Maximum:'Maximum 8 images can be uploaded, Maximum 2M per image', Maximum:'Maximum 8 images can be uploaded, Maximum 2M per image',
@@ -272,7 +272,7 @@ export default {
inputContent1:'Input prompt', inputContent1:'Input prompt',
Generate:'Generate', Generate:'Generate',
Sequence:'Sequence', Sequence:'Sequence',
Close:'Close', Close:'Cancle',
currently:'You are currently in the {generateLineUp} th position in the queue', currently:'You are currently in the {generateLineUp} th position in the queue',
Merge:'Merge', Merge:'Merge',
maximumLength:'The entered content exceeds the maximum length.', maximumLength:'The entered content exceeds the maximum length.',

View File

@@ -36,6 +36,11 @@ const routes: Array<RouteRecordRaw> = [
name: 'history', name: 'history',
component: _import('HistoryPage') component: _import('HistoryPage')
}, },
{
path: '/oldHistory',
name: 'oldHistory',
component: _import('OldHistoryPage')
},
{ {
path: '/library', path: '/library',
name: 'library', name: 'library',

View File

@@ -410,7 +410,7 @@
<div class="mark_loading_text" v-show="generateLineUp >= 0"> <div class="mark_loading_text" v-show="generateLineUp >= 0">
<div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div> <div>{{$t('Generate.Sequence')}}: {{ generateLineUp }}</div>
</div> </div>
<div class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div> <div v-show="remGenerate" class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div>
</div> </div>
<!-- 蒙层 end--> <!-- 蒙层 end-->
@@ -544,8 +544,10 @@ export default defineComponent({
}) })
let generateId:any = ref() let generateId:any = ref()
let generateTime:any = ref() let generateTime:any = ref()
let generateLineUp:any = ref(0) let generateLineUp:any = ref(-1)
let isGenerate:any = ref(false) let isGenerate:any = ref(false)
let remGenerate:any = ref(false)
let remGenerateTime:any = ref()
return { return {
menuList, menuList,
selectImgList, selectImgList,
@@ -589,6 +591,8 @@ export default defineComponent({
generateTime, generateTime,
generateLineUp, generateLineUp,
isGenerate, isGenerate,
remGenerate,
remGenerateTime,
} }
}, },
data(this_) { data(this_) {
@@ -1236,6 +1240,8 @@ export default defineComponent({
} }
}, },
getgenerate(){ getgenerate(){
clearInterval(this.remGenerateTime)
this.remGenerate = false
if(this.isTest){//试用用户禁止使用 if(this.isTest){//试用用户禁止使用
message.info( message.info(
this.t('isTest.available') this.t('isTest.available')
@@ -1323,6 +1329,9 @@ export default defineComponent({
if(rv){ if(rv){
this.generateId = rv this.generateId = rv
this.setGenerate() this.setGenerate()
this.remGenerateTime = setTimeout(()=>{
this.remGenerate = true
},10000)
} }
} }
).catch(res=>{ ).catch(res=>{
@@ -1336,7 +1345,7 @@ export default defineComponent({
Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then( Https.axiosGet(Https.httpUrls.generateResult, {params:data}).then(
(rv) => { (rv) => {
if(rv.generateId){ if(rv.generateId){
this.generateLineUp = 0 this.generateLineUp = -1
clearInterval(this.generateTime) clearInterval(this.generateTime)
let arr let arr
rv.generatedCollectionItems.forEach((v:any,index:number)=>{ rv.generatedCollectionItems.forEach((v:any,index:number)=>{
@@ -1352,12 +1361,8 @@ export default defineComponent({
// this.isShowMark = false // this.isShowMark = false
this.isGenerate = false this.isGenerate = false
this.isShowMark = false this.isShowMark = false
}else if(rv.rankPosition == null){ clearInterval(this.remGenerateTime)
this.generateLineUp = 0 this.remGenerate = false
// this.isShowMark = false
}else if(rv.rankPosition == 0){
this.generateLineUp = 0
// this.isShowMark = false
}else{ }else{
this.generateLineUp = rv.rankPosition this.generateLineUp = rv.rankPosition
} }
@@ -1368,13 +1373,13 @@ export default defineComponent({
}, },
removeGenerate(){ removeGenerate(){
if(this.generateId){ if(this.generateId){
let data = {uniqueId:this.generateId} let data = {uniqueId:this.generateId,userId:this?.userInfo?.userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}
Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then( Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(
(rv) => { (rv) => {
this.generateId = '' this.generateId = ''
this.isShowMark = false this.isShowMark = false
this.isGenerate = false this.isGenerate = false
this.generateLineUp = 0 this.generateLineUp = -1
clearInterval(this.generateTime) clearInterval(this.generateTime)
} }
).catch(res=>{ ).catch(res=>{

View File

@@ -0,0 +1,425 @@
<template>
<div class="history_page">
<div class="page_content">
<img
class="page_content_bg"
src="@/assets/images/homePage/bg.png"
/>
<div class="page_content_body">
<!-- <HeaderComponent></HeaderComponent> -->
<div class="history_page_body">
<!-- <div class="history_header">{{ $t('HistoryPage.History') }}</div> -->
<div class="history_table_search">
<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 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>
<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('HistoryPage.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>
<!-- <a-modal class="rename_modal_component"
v-model:visible="renameVisivle"
:footer="null"
:title="renameData?.name"
:keyboard="false"
width="56rem"
:maskClosable="false"
:centered="true"
>
<div class="collection_rename_content">
<div class="rename_form_content">
<input class="rename_form_input" :placeholder="$t('HistoryPage.inputContent2')" v-model="newCollectionName" @keydown.enter="confrimRename()">
</div>
<div class="rename_submit_button" @click="confrimRename()">{{ $t('HistoryPage.Submit') }}</div>
</div>
</a-modal> -->
<RobotAssist></RobotAssist>
</div>
</template>
<script lang="ts">
import { defineComponent,ref,createVNode,computed} 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 RobotAssist from "@/component/HomePage/RobotAssist.vue";
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { useI18n } from 'vue-i18n';
export default defineComponent({
components: {
HeaderComponent,
HistoryDetail,
RobotAssist
},
setup() {
let rangePickerValue:any = ref([])
let renameData:any = ref({}) //修改名字选中的数据
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.SketchCounts'), align:'center', ellipsis: true, width: 150, dataIndex: 'sketchCount', key: 'sketchCounts' },
{
title: useI18n().t('HistoryPage.Operations'),
key: 'operation',
align:'center',
fixed: 'right',
width: 150,
// slots:{customRender:'action'}
Operations:true,
},
]
});
let collectionList:any = ref([])
let {t} = useI18n()
return {
rangePickerValue,
columns,
collectionList,
renameData,
t,
}
},
data(){
return{
currentPage:1,
pageSize:10,
total:0,
historyTableHeight:0,
newCollectionName:'',
renameVisivle:false,//修改名字弹窗
groupDetails:{},//每个collection的详情
collectionName:'',//选中的名字
searchCollectionName:'',
}
},
mounted(){
let historyTable:any = this.$refs.historyTable
this.historyTableHeight = historyTable.clientHeight - 130
this.getHistoryList()
},
methods:{
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(){
let startDate:any = this.rangePickerValue ? new Date(this.rangePickerValue[0]).getTime(): ''
let endDate:any = this.rangePickerValue ? new Date(this.rangePickerValue[1]).getTime(): ''
let data = {
page:this.currentPage,
size:this.pageSize,
collectionName:this.searchCollectionName,
startDate:startDate,
endDate:endDate
}
Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
(rv: any) => {
this.collectionList = rv.content
this.total = rv.total
}
);
},
//删除分组
deleteGroup(record:any,index:number){
let deleteGroupFun = (id:any,index:number) =>{
let data = {
userGroupId:id
}
Https.axiosPost(Https.httpUrls.deleteUserGroup,data).then(
(rv: any) => {
message.success(this.t('HistoryPage.jsContent1'))
this.collectionList.splice(index,1)
}
);
}
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){
// this.renameVisivle = true
// this.renameData = {
// ...record,
// index:index
// }
// },
//确定修改名字
// confrimRename(){
// let data = {
// timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
// userGroupId: this.renameData.id,
// userGroupName: this.newCollectionName
// }
// Https.axiosPost(Https.httpUrls.updateUserGroupName,data).then(
// (rv: any) => {
// message.success(this.t('HistoryPage.jsContent3'))
// this.collectionList[this.renameData.index].name = this.newCollectionName
// this.collectionList[this.renameData.index].updateDate = rv.updateDate
// this.renameVisivle = false
// this.newCollectionName = ''
// this.renameData = {}
// }
// );
// },
retrieveHome(record:any){
this.$router.push({name:'home',params: {id:record.id}})
}
}
})
</script>
<style lang="less">
.history_page {
width: 100%;
height: 100%;
padding: 0 9rem;
overflow: hidden;
// min-width: 1440px;
position: relative;
.page_content {
position: relative;
.page_content_bg {
position: absolute;
width: 100%;
height: 100%;
}
.page_content_body {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
.history_page_body{
width: 100%;
height: calc(100% - 7rem);
padding: 0 2.5rem 4rem;
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;
.range_picker{
width: 36rem;
height: 4.8rem;
.ant-picker-input > input{
font-size: 1.6rem;
}
.range_picker_icon{
font-size: 2.2rem;
}
}
.content_search_block{
margin-left: 4rem;
display: flex;
.search_input{
width: 32.8rem;
padding-left: 1.5rem;
height: 4.8rem;
line-height: 4.6rem;
background: #FFFFFF;
border: 0.1rem solid #F1F1F1;
font-size: 1.6rem;
font-weight: 400;
&::placeholder {
color: #C2C2C2;
}
}
.search_icon_block{
width: 7.2rem;
height: 4.8rem;
line-height: 4.8rem;
text-align: center;
background: #343579;
cursor: pointer;
.icon-sousuo{
font-size: 2rem;
color: #FFFFFF;
}
}
}
}
.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 > td{
border: none;
background: transparent;
}
.ant-table-tbody > tr{
&:hover > td{
background: #FFFFFF;
}
}
.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: #343579;
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>

View File

@@ -6,7 +6,7 @@
</div> </div>
<div class="upgrade-content-wire"></div> <div class="upgrade-content-wire"></div>
<div class="upgrade-content-text">System upgrading</div> <div class="upgrade-content-text">System upgrading</div>
<div class="upgrade-content-textab">The system update will begin at January 26th and is expected to be completed by January 27th.</div> <div class="upgrade-content-textab">The system update will begin at January 26th and is expected to be completed by January 28th.</div>
</div> </div>
</div> </div>
</template> </template>