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;