基础数据-镀种维护-新增排序/权限

dev-scheduling
ysn 1 month ago
parent 6e8b12e2a6
commit 1b21e9d7d0
  1. 49
      src/views/processManagement/platingTypeInfo.vue

@ -18,12 +18,14 @@
@row-save="rowSave"
@row-update="rowUpdate"
:before-open="beforeOpen"
@sort-change="sortChange"
:permission="permissionList"
>
<template #menu-left> </template>
<template #menu-right="{ size }">
<span style="display: inline-flex; margin-right: 12px">
<el-button type="primary" @click="handleImport">导入</el-button>
<el-button type="primary" v-if="permission.platingTypeInfo_import" @click="handleImport">导入</el-button>
</span>
</template>
<template #bcId="{ row }">
@ -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;

Loading…
Cancel
Save