不等比缩放

This commit is contained in:
X1627315083
2024-05-28 11:22:16 +08:00
parent 89b485048b
commit 6b4c52c645
7 changed files with 68 additions and 24 deletions

View File

@@ -34,6 +34,7 @@
<div class="admin_table_content" ref="historyTable"> <div class="admin_table_content" ref="historyTable">
<a-table <a-table
@resizeColumn="handleResizeColumn"
:columns="columns" :columns="columns"
:data-source="dataList" :data-source="dataList"
:scroll="{ y: historyTableHeight }" :scroll="{ y: historyTableHeight }"
@@ -146,6 +147,10 @@ export default defineComponent({
title: 'Create Time', title: 'Create Time',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
// width: 150,
// minWidth: 100,
// maxWidth: 200,
// resizable: true,
dataIndex: "createTime", dataIndex: "createTime",
key: "createTime", key: "createTime",
}, },
@@ -153,6 +158,10 @@ export default defineComponent({
title: 'Occupation', title: 'Occupation',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
// width: 150,
// minWidth: 100,
// maxWidth: 200,
// resizable: true,
dataIndex: "occupation", dataIndex: "occupation",
key: "occupation", key: "occupation",
}, },
@@ -160,6 +169,8 @@ export default defineComponent({
title: 'Trial Order Id', title: 'Trial Order Id',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
// width: 150,
// resizable: true,
dataIndex: "trialOrderId", dataIndex: "trialOrderId",
key: "trialOrderId", key: "trialOrderId",
}, },
@@ -202,6 +213,9 @@ export default defineComponent({
pageSize: 10, pageSize: 10,
total: 0, total: 0,
historyTableHeight: 0, historyTableHeight: 0,
handleResizeColumn: (w:any, col:any) => {
col.width = w;
},
}; };
}, },
mounted() { mounted() {

View File

@@ -9,6 +9,7 @@
:data-source="dataList" :data-source="dataList"
:scroll="{ y: historyTableHeight}" :scroll="{ y: historyTableHeight}"
@change="changePage" @change="changePage"
@resizeColumn="handleResizeColumn"
:pagination="{ :pagination="{
showSizeChanger: true, showSizeChanger: true,
current: currentPage, current: currentPage,
@@ -30,27 +31,28 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue"; import { defineComponent, ref, createVNode, computed } from "vue";
import { Https } from "@/tool/https"; import { Https } from "@/tool/https";
import type { TableColumnsType } from 'ant-design-vue';
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie"; import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
export default defineComponent({ export default defineComponent({
components: { components: {
}, },
setup() { setup() {
let renameData: any = ref({}); //修改名字选中的数据 let renameData: any = ref({}); //修改名字选中的数据
const columns: any = computed(() => { const columns: any = ref<TableColumnsType>([
return [
{ {
title: 'Email', title: 'Email',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 30, width: 50,
dataIndex: "email", dataIndex: "email",
key: "email", key: "email",
fixed: 'left',
}, },
{ {
title: 'User Id', title: 'User Id',
align: "center", align: "center",
width: 30, width: 50,
dataIndex: "id", dataIndex: "id",
key: "id", key: "id",
}, },
@@ -58,7 +60,8 @@ export default defineComponent({
title: 'User Name', title: 'User Name',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 30, width: 50,
dataIndex: "userName", dataIndex: "userName",
key: "userName", key: "userName",
}, },
@@ -66,14 +69,16 @@ export default defineComponent({
title: 'Given Name', title: 'Given Name',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 30, width: 50,
dataIndex: "givenName", dataIndex: "givenName",
key: "givenName", key: "givenName",
}, },
{ {
title: 'Create Time', title: 'Create Time',
align: "center", align: "center",
width: 30, width: 50,
dataIndex: "createTime", dataIndex: "createTime",
key: "createTime", key: "createTime",
}, },
@@ -81,7 +86,8 @@ export default defineComponent({
title: 'Title', title: 'Title',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 30, width: 50,
//
dataIndex: "title", dataIndex: "title",
key: "title", key: "title",
}, },
@@ -89,14 +95,12 @@ export default defineComponent({
title: 'Country', title: 'Country',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 30,
dataIndex: "country", dataIndex: "country",
key: "country", key: "country",
fixed: 'right',
}, },
]; ]
}); );
let dataList: any = ref([]); let dataList: any = ref([]);
let userInfo: any = {}; let userInfo: any = {};
return { return {
@@ -104,6 +108,11 @@ export default defineComponent({
dataList, dataList,
renameData, renameData,
userInfo, userInfo,
handleResizeColumn: (w:any, col:any) => {
console.log(col,w);
col.width = w;
},
}; };
}, },
data() { data() {

View File

@@ -81,6 +81,7 @@ export default defineComponent({
title: 'Email', title: 'Email',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 100, width: 100,
dataIndex: "email", dataIndex: "email",
key: "email", key: "email",
@@ -90,6 +91,7 @@ export default defineComponent({
align: "center", align: "center",
width: 70, width: 70,
dataIndex: "updateTime", dataIndex: "updateTime",
key: "updateTime", key: "updateTime",
// customRender: (record: any) => { // customRender: (record: any) => {
// let time = formatTime( // let time = formatTime(
@@ -103,6 +105,7 @@ export default defineComponent({
title: 'State', title: 'State',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 70, width: 70,
dataIndex: "status", dataIndex: "status",
key: "status", key: "status",
@@ -122,6 +125,7 @@ export default defineComponent({
title: 'Address', title: 'Address',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 70, width: 70,
dataIndex: "country", dataIndex: "country",
key: "country", key: "country",
@@ -130,6 +134,7 @@ export default defineComponent({
title: 'Surname', title: 'Surname',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 70, width: 70,
dataIndex: "surname", dataIndex: "surname",
key: "surname", key: "surname",
@@ -138,6 +143,7 @@ export default defineComponent({
title: 'Name', title: 'Name',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 70, width: 70,
dataIndex: "userName", dataIndex: "userName",
key: "userName", key: "userName",
@@ -150,6 +156,7 @@ export default defineComponent({
width: 70, width: 70,
// slots:{customRender:'action'} // slots:{customRender:'action'}
Operations: true, Operations: true,
}, },
]; ];
}); });

View File

@@ -278,6 +278,7 @@ export default defineComponent({
watch:{ watch:{
designItemDetail:{ designItemDetail:{
handler: async function(newVal,oldVal) { handler: async function(newVal,oldVal) {
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail)) let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.ifSubmit = designItemDetail.ifSubmit?designItemDetail.ifSubmit:false this.ifSubmit = designItemDetail.ifSubmit?designItemDetail.ifSubmit:false
if(newVal.clothes.length == 0){ if(newVal.clothes.length == 0){
@@ -866,10 +867,11 @@ export default defineComponent({
// if(this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1] && !this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1].id){ // if(this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1] && !this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1].id){
// this.designItemDetail.clothes.split(this.designItemDetail.clothes.legnth-1,1) // this.designItemDetail.clothes.split(this.designItemDetail.clothes.legnth-1,1)
// } // }
if(data.clothes[data.clothes.legnth-1] && !data.clothes[data.clothes.legnth-1].id){ if(data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1] && !data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1].id){
data.clothes.split(data.clothes.legnth-1,1) data.designSingleItemDTOList.split(data.designSingleItemDTOList.legnth-1,1)
} }
this.store.commit("setDesignItemDetail", designItemDetail); this.store.commit("setDesignItemDetail", designItemDetail);
console.log(123);
this.store.commit("setDesignPreviewData", data); this.store.commit("setDesignPreviewData", data);
this.setRevocation(designItemDetail,data) this.setRevocation(designItemDetail,data)
this.deleteItemShow = false this.deleteItemShow = false

View File

@@ -131,6 +131,7 @@ export default {
jsContent7:"友情提示", jsContent7:"友情提示",
jsContent5:"我们很高兴让您体验AiDA 3.0。请注意,部分服务在试用期间可能会受到限制。如果您已经准备好全身心投入并享受完整的体验,我们诚挚地邀请您订阅。只需访问", jsContent5:"我们很高兴让您体验AiDA 3.0。请注意,部分服务在试用期间可能会受到限制。如果您已经准备好全身心投入并享受完整的体验,我们诚挚地邀请您订阅。只需访问",
jsContent6:" 就可以开始订阅。感谢您试用我们的服务!", jsContent6:" 就可以开始订阅。感谢您试用我们的服务!",
jsContent9:"是否清除当前收集?",
}, },
LibraryPage:{ LibraryPage:{
Organize:'整理', Organize:'整理',

View File

@@ -132,6 +132,7 @@ export default {
jsContent7:"Friendly Reminder", jsContent7:"Friendly Reminder",
jsContent5:"We're delighted to have you experience AiDA 3.0. Please be aware that some services may be limited during the trial period. If you're ready to fully dive in and enjoy the complete experience, we warmly invite you to subscribe. Just visit ", jsContent5:"We're delighted to have you experience AiDA 3.0. Please be aware that some services may be limited during the trial period. If you're ready to fully dive in and enjoy the complete experience, we warmly invite you to subscribe. Just visit ",
jsContent6:" to get started. Thank you for trying our services!", jsContent6:" to get started. Thank you for trying our services!",
jsContent9:"Whether to clear the current collection?",
}, },
LibraryPage:{ LibraryPage:{
Organize:'Organize', Organize:'Organize',

View File

@@ -27,9 +27,9 @@
<!-- 有图状态 start--> <!-- 有图状态 start-->
<div class="home_left_info" v-show="isHaveReviewCollection"> <div class="home_left_info" v-show="isHaveReviewCollection">
<div class="left_info_top"> <div class="left_info_top">
<div class="button_second" @click="startNewCollection()"> <!-- <div class="button_second" @click="startNewCollection()">
{{ $t('HomeView.Start') }} {{ $t('HomeView.Start') }}
</div> </div> -->
<div class="button_first button_margin" @click="recollection()"> <div class="button_first button_margin" @click="recollection()">
{{ $t('HomeView.Edit') }} {{ $t('HomeView.Edit') }}
</div> </div>
@@ -237,7 +237,7 @@ import { useStore } from "vuex";
import { Https } from "@/tool/https"; import { Https } from "@/tool/https";
import { rgbToHsv, dataURLtoBlob } from "@/tool/util"; import { rgbToHsv, dataURLtoBlob } from "@/tool/util";
import { openGuide,driverObj__ } from "@/tool/guide"; import { openGuide,driverObj__ } from "@/tool/guide";
import { LoadingOutlined } from "@ant-design/icons-vue"; import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
// import JSZip, { forEach } from "jszip"; // import JSZip, { forEach } from "jszip";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie"; import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
@@ -560,12 +560,22 @@ export default defineComponent({
}, },
resetCollection(){ resetCollection(){
this.store.commit("clearAllData"); let _this = this
this.store.commit("clearAllCollection"); Modal.confirm({
this.store.commit("setAllBoardDataChoose",{}); title: this.t('HomeView.jsContent9'),
this.store.commit("clearShowSketchboard",{}); icon: createVNode(ExclamationCircleOutlined),
this.isHaveReviewCollection = false okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
_this.store.commit("clearAllData");
_this.store.commit("clearAllCollection");
_this.store.commit("setAllBoardDataChoose",{});
_this.store.commit("clearShowSketchboard",{});
_this.isHaveReviewCollection = false
}
});
}, },
//完成设计 //完成设计
finishCollection() { finishCollection() {