From 1b21e9d7d02d7198fea7110d9b8bb77f4b5ea318 Mon Sep 17 00:00:00 2001
From: ysn <2126564605@qq.com>
Date: Tue, 28 Apr 2026 15:41:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE-=E9=95=80?=
=?UTF-8?q?=E7=A7=8D=E7=BB=B4=E6=8A=A4-=E6=96=B0=E5=A2=9E=E6=8E=92?=
=?UTF-8?q?=E5=BA=8F/=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../processManagement/platingTypeInfo.vue | 49 ++++++++++++-------
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/src/views/processManagement/platingTypeInfo.vue b/src/views/processManagement/platingTypeInfo.vue
index 96744dc8..64579705 100644
--- a/src/views/processManagement/platingTypeInfo.vue
+++ b/src/views/processManagement/platingTypeInfo.vue
@@ -18,12 +18,14 @@
@row-save="rowSave"
@row-update="rowUpdate"
:before-open="beforeOpen"
+ @sort-change="sortChange"
+ :permission="permissionList"
>
- 导入
+ 导入
@@ -172,7 +174,7 @@ export default {
label: '配置码',
prop: 'configNo',
search: true,
- sortable: true,
+ sortable: 'custom',
width: 120,
overHidden: true,
rules: [
@@ -186,7 +188,7 @@ export default {
{
label: '镀种分类',
prop: 'bcId',
- sortable: true,
+ sortable: 'custom',
search: true,
width: 200,
type: 'select',
@@ -211,7 +213,7 @@ export default {
{
label: '镀种',
prop: 'plating',
- sortable: true,
+ sortable: 'custom',
search: true,
width: 200,
overHidden: true,
@@ -226,7 +228,7 @@ export default {
{
label: '镀层代码',
prop: 'matCode',
- sortable: true,
+ sortable: 'custom',
search: false,
width: 200,
overHidden: true,
@@ -241,7 +243,7 @@ export default {
// {
// label: "镀种小类",
// prop: "subClass",
- // sortable: true,
+ // sortable: 'custom',
// search: true,
// width: 120,
// filterable: true,
@@ -263,7 +265,7 @@ export default {
label: '材料',
prop: 'material',
width: 200,
- sortable: true,
+ sortable: 'custom',
search: true,
overHidden: true,
rules: [
@@ -277,7 +279,7 @@ export default {
{
label: '材料状态',
prop: 'matState',
- sortable: true,
+ sortable: 'custom',
search: false,
width: 200,
rules: [
@@ -291,7 +293,7 @@ export default {
{
label: '硬度',
prop: 'hardness',
- sortable: true,
+ sortable: 'custom',
search: true,
width: 120,
rules: [
@@ -305,7 +307,7 @@ export default {
{
label: '镀层代号',
prop: 'plateCode',
- sortable: true,
+ sortable: 'custom',
search: false,
width: 120,
overHidden: true,
@@ -320,7 +322,7 @@ export default {
{
label: '物料编码',
prop: 'plateGoodsCode',
- sortable: true,
+ sortable: 'custom',
search: false,
width: 120,
rules: [
@@ -334,7 +336,7 @@ export default {
{
label: '镀层厚度',
prop: 'plateThickness',
- sortable: true,
+ sortable: 'custom',
search: false,
width: 120,
rules: [
@@ -348,7 +350,7 @@ export default {
{
label: '其他要求',
prop: 'memo',
- sortable: true,
+ sortable: 'custom',
search: false,
overHidden: true,
width: 120,
@@ -364,7 +366,7 @@ export default {
label: '是否用于周期性试验',
prop: 'flagCycleTest',
type: 'switch',
- sortable: true,
+ sortable: 'custom',
search: false,
width: 200,
labelWidth: 150,
@@ -390,10 +392,9 @@ export default {
...mapGetters(['userInfo', 'permission']),
permissionList() {
return {
- addBtn: this.validData(this.permission.menu_add, false),
- viewBtn: this.validData(this.permission.menu_view, false),
- delBtn: this.validData(this.permission.menu_delete, false),
- editBtn: this.validData(this.permission.menu_edit, false),
+ addBtn: this.validData(this.permission.platingTypeInfo_add, false),
+ delBtn: this.validData(this.permission.platingTypeInfo_del, false),
+ editBtn: this.validData(this.permission.platingTypeInfo_edit, false),
};
},
ids() {
@@ -575,7 +576,17 @@ export default {
})
.catch(() => id);
},
- // 加载页面数据
+ // 排序
+ sortChange({ prop, order }) {
+ this.query.descs = undefined;
+ this.query.ascs = undefined;
+ let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs';
+ this.query[orderByFieldKey] = !prop
+ ? undefined
+ : prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
+ // // 重新加载数据
+ this.onLoad(this.page, this.query);
+ },
// 加载页面数据
async onLoad(page, params = {}) {
this.loading = true;