From 260badfb06dd27573d1002dfad7cd0d5c48c6d0c Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 09 十月 2025 15:28:54 +0800
Subject: [PATCH] 界面优化
---
components/mold.vue | 90 +++++++++++++++++++++++----------------------
1 files changed, 46 insertions(+), 44 deletions(-)
diff --git a/components/mold.vue b/components/mold.vue
index bc477b1..c75f939 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -104,9 +104,9 @@
export default {
data() {
return {
- pageIndex: 1,
- pageSize: 20,
- total: 0,
+ pageIndex: 1,
+ pageSize: 18,
+ total: 0,
toolList: [],
selectedToolNo: '',
toolName: '',
@@ -121,50 +121,50 @@
]
};
},
- computed: {
- totalPages() {
- return Math.ceil(this.total / this.pageSize) || 1;
- }
- },
+ computed: {
+ totalPages() {
+ return Math.ceil(this.total / this.pageSize) || 1;
+ }
+ },
methods: {
- async fetchTools(searchKey) {
- const res = await this.$post({
- url: '/MesCutterLedger/QueryTools',
- data: JSON.stringify({
- searchKey,
- pageIndex: this.pageIndex,
- pageSize: this.pageSize
- }),
- headers: { 'Content-Type': 'application/json' }
- });
- if (res.status === 0) {
- this.filteredTools = res.data.tbBillList.map(t => ({
- no: t.cutterId || t.no,
- name: t.cutterName || t.name,
- model: t.cutterModel || t.model
- }));
- this.total = res.data.total || 0; // 鍋囪鍚庣杩斿洖鎬绘暟
- } else {
- this.$showMessage(res.message || '鏌ヨ澶辫触');
- }
+ async fetchTools(searchKey) {
+ const res = await this.$post({
+ url: '/MesCutterLedger/QueryTools',
+ data: JSON.stringify({
+ searchKey,
+ pageIndex: this.pageIndex,
+ pageSize: this.pageSize
+ }),
+ headers: { 'Content-Type': 'application/json' }
+ });
+ if (res.status === 0) {
+ this.filteredTools = res.data.tbBillList.map(t => ({
+ no: t.cutterId || t.no,
+ name: t.cutterName || t.name,
+ model: t.cutterModel || t.model
+ }));
+ this.total = res.data.total || 0; // 鍋囪鍚庣杩斿洖鎬绘暟
+ } else {
+ this.$showMessage(res.message || '鏌ヨ澶辫触');
+ }
},
//缈婚〉
- async prevPage() {
- if (this.pageIndex > 1) {
- this.pageIndex--;
- await this.fetchTools(this.searchKey);
- }
- },
- async nextPage() {
- if (this.pageIndex < this.totalPages) {
- this.pageIndex++;
- await this.fetchTools(this.searchKey);
- }
- },
- async searchTool() {
- this.pageIndex = 1; // 鎼滅储鏃堕噸缃埌绗竴椤�
- await this.fetchTools(this.searchKey);
- },
+ async prevPage() {
+ if (this.pageIndex > 1) {
+ this.pageIndex--;
+ await this.fetchTools(this.searchKey);
+ }
+ },
+ async nextPage() {
+ if (this.pageIndex < this.totalPages) {
+ this.pageIndex++;
+ await this.fetchTools(this.searchKey);
+ }
+ },
+ async searchTool() {
+ this.pageIndex = 1; // 鎼滅储鏃堕噸缃埌绗竴椤�
+ await this.fetchTools(this.searchKey);
+ },
selectTool(tool) {
this.selectedToolNo = tool.no;
this.toolName = tool.name;
@@ -289,6 +289,8 @@
display: flex;
flex-wrap: wrap;
margin: 1vh 0;
+ max-height: 40vh;
+ overflow-y: auto;
}
.tool-btn {
--
Gitblit v1.9.3