+
添加
@@ -116,16 +116,16 @@ import { parseTime } from '../../core/mixins/code-filter';
import attrAdd from './attr-add';
import { publicFormatter } from '@/utils/dict';
-const tableBtn = [
- {
- type: 'edit',
- btnName: '编辑',
- },
- {
- type: 'delete',
- btnName: '删除',
- },
-];
+// const tableBtn = [
+// {
+// type: 'edit',
+// btnName: '编辑',
+// },
+// {
+// type: 'delete',
+// btnName: '删除',
+// },
+// ];
const tableProps = [
{
prop: 'createTime',
@@ -160,7 +160,24 @@ export default {
components: { SmallTitle, attrAdd },
data() {
return {
- tableBtn,
+ tableBtn: [
+ this.$auth.hasPermiAnd([
+ 'base:material-product-bom:update',
+ 'base:material-product-bom-det:create',
+ 'base:material-product-bom-det:update'
+ ]) ?
+ {
+ type: 'edit',
+ btnName: '编辑',
+ }
+ : undefined,
+ this.$auth.hasPermi('base:material-product-bom:delete') ?
+ {
+ type: 'delete',
+ btnName: '删除',
+ }
+ : undefined,
+ ],
tableProps,
addOrUpdateVisible: false,
urlOptions: {
diff --git a/src/views/base/materialProductBom/index.vue b/src/views/base/materialProductBom/index.vue
index 412ce542..35d64e98 100644
--- a/src/views/base/materialProductBom/index.vue
+++ b/src/views/base/materialProductBom/index.vue
@@ -110,7 +110,7 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('base:material:create') ? 'separate' : '',
},
{
type: this.$auth.hasPermi('base:material:create') ? 'button' : '',
diff --git a/src/views/core/base/factory/index.vue b/src/views/core/base/factory/index.vue
index d8867ac6..82260443 100644
--- a/src/views/core/base/factory/index.vue
+++ b/src/views/core/base/factory/index.vue
@@ -125,7 +125,7 @@ export default {
// name: 'reset',
// },
{
- type: 'separate',
+ type: this.$auth.hasPermi('base:core-factory:create') ? 'separate' : '',
},
{
type: this.$auth.hasPermi('base:core-factory:create') ? 'button' : '',
diff --git a/src/views/equipment/base/config/AlarmGroup/index.vue b/src/views/equipment/base/config/AlarmGroup/index.vue
index 92ad250b..2224a242 100644
--- a/src/views/equipment/base/config/AlarmGroup/index.vue
+++ b/src/views/equipment/base/config/AlarmGroup/index.vue
@@ -244,7 +244,8 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:alarm-group:create')
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:alarm-group:create')
diff --git a/src/views/equipment/base/config/BindGroup/index.vue b/src/views/equipment/base/config/BindGroup/index.vue
index 11120e61..ccf6189f 100644
--- a/src/views/equipment/base/config/BindGroup/index.vue
+++ b/src/views/equipment/base/config/BindGroup/index.vue
@@ -201,7 +201,8 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:bind-group:create')
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:bind-group:create')
diff --git a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue
index e28bd072..6a2a2d0b 100644
--- a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue
+++ b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue
@@ -158,14 +158,14 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
- { prop: 'productionLine', label: '产线', width: 120, showOverflowtooltip: true },
- { prop: 'workshopSection', label: '工段', width: 120, showOverflowtooltip: true },
- { prop: 'equipmentName', label: '设备名', width: 120, showOverflowtooltip: true },
- { prop: 'equipmentCode', label: '设备编码', width: 200, showOverflowtooltip: true },
- { prop: 'plcCode', label: '关联表编码', width: 220, showOverflowtooltip: true },
- { prop: 'plcTableName', label: '关联表名', width: 150, showOverflowtooltip: true },
- { prop: 'plcName', label: '标识名称', width: 150, showOverflowtooltip: true },
- { prop: 'bindingParameters', label: '绑定参数数量', width: 120, showOverflowtooltip: true },
+ { prop: 'productionLine', label: '产线', minWidth: 120, showOverflowtooltip: true },
+ { prop: 'workshopSection', label: '工段', minWidth: 120, showOverflowtooltip: true },
+ { prop: 'equipmentName', label: '设备名', minWidth: 120, showOverflowtooltip: true },
+ { prop: 'equipmentCode', label: '设备编码', minWidth: 200, showOverflowtooltip: true },
+ { prop: 'plcCode', label: '关联表编码', minWidth: 220, showOverflowtooltip: true },
+ { prop: 'plcTableName', label: '关联表名', minWidth: 150, showOverflowtooltip: true },
+ { prop: 'plcName', label: '标识名称', minWidth: 150, showOverflowtooltip: true },
+ { prop: 'bindingParameters', label: '绑定参数数量', minWidth: 120, showOverflowtooltip: true },
// {
// _action: 'params-bind',
// label: '查看绑定',
@@ -217,7 +217,8 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:collection-config:create')
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:collection-config:create')
diff --git a/src/views/equipment/base/config/DataCollection/TableConfig.vue b/src/views/equipment/base/config/DataCollection/TableConfig.vue
index 54f9dd7d..c692d44f 100644
--- a/src/views/equipment/base/config/DataCollection/TableConfig.vue
+++ b/src/views/equipment/base/config/DataCollection/TableConfig.vue
@@ -160,13 +160,12 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('base:equipment-plc:create')
+ ? 'separate' : '',
},
{
- // type: this.$auth.hasPermi('equipment:realtime-table-config:create')
- // ? 'button'
- // : '',
- type: 'button',
+ type: this.$auth.hasPermi('base:equipment-plc:create')
+ ? 'button' : '',
btnName: '新增',
name: 'add',
plain: true,
@@ -194,7 +193,7 @@ export default {
input: true,
label: '编码',
prop: 'code',
- url: '/base/equipment-group/getCode',
+ url: '/base/energy-plc/getCode',
rules: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
},
],
diff --git a/src/views/equipment/base/inspection/Confirm/index.vue b/src/views/equipment/base/inspection/Confirm/index.vue
index 33c68869..60063042 100644
--- a/src/views/equipment/base/inspection/Confirm/index.vue
+++ b/src/views/equipment/base/inspection/Confirm/index.vue
@@ -101,7 +101,10 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: (this.$auth.hasPermi('equipment:inspection-confirm:create') ||
+ this.$auth.hasPermi('equipment:inspection-confirm:confirm') ||
+ this.$auth.hasPermi('equipment:inspection-confirm:export'))
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:inspection-confirm:create')
diff --git a/src/views/equipment/base/inspection/Record/index.vue b/src/views/equipment/base/inspection/Record/index.vue
index 18901579..8c472c7c 100644
--- a/src/views/equipment/base/inspection/Record/index.vue
+++ b/src/views/equipment/base/inspection/Record/index.vue
@@ -166,7 +166,8 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:check-record:export')
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:check-record:export')
diff --git a/src/views/equipment/base/inspection/Settings/index.vue b/src/views/equipment/base/inspection/Settings/index.vue
index f051c0c7..c8ad3527 100644
--- a/src/views/equipment/base/inspection/Settings/index.vue
+++ b/src/views/equipment/base/inspection/Settings/index.vue
@@ -157,7 +157,8 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:check-setting:create')
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:check-setting:create')
diff --git a/src/views/equipment/base/maintain/Confirm/WaitingListTable.vue b/src/views/equipment/base/maintain/Confirm/WaitingListTable.vue
index 77745cee..acd36e6a 100644
--- a/src/views/equipment/base/maintain/Confirm/WaitingListTable.vue
+++ b/src/views/equipment/base/maintain/Confirm/WaitingListTable.vue
@@ -37,11 +37,11 @@
-
+
{{ scope.row.planName || '---' }}
@@ -67,7 +67,7 @@
@@ -76,7 +76,7 @@
@@ -85,7 +85,7 @@
@@ -94,7 +94,7 @@
@@ -103,7 +103,7 @@
diff --git a/src/views/equipment/base/maintain/Confirm/index.vue b/src/views/equipment/base/maintain/Confirm/index.vue
index 515135bb..75da259c 100644
--- a/src/views/equipment/base/maintain/Confirm/index.vue
+++ b/src/views/equipment/base/maintain/Confirm/index.vue
@@ -157,7 +157,7 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: (this.$auth.hasPermi('equipment:maintain-confirm:confirm') || this.$auth.hasPermi('equipment:maintain-confirm:confirm') || this.$auth.hasPermi('equipment:maintain-confirm:export')) ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:maintain-confirm:create')
diff --git a/src/views/equipment/base/maintain/Monitor/index.vue b/src/views/equipment/base/maintain/Monitor/index.vue
index c8b129e4..f9ba889e 100644
--- a/src/views/equipment/base/maintain/Monitor/index.vue
+++ b/src/views/equipment/base/maintain/Monitor/index.vue
@@ -131,7 +131,7 @@ export default {
// width: 180,
// filter: parseTime(createTime),
// },
- { prop: 'code', label: '保养计划单号', width: 150, showOverflowtooltip: true },
+ { prop: 'code', label: '保养计划单号', minWidth: 150, showOverflowtooltip: true },
{ prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true },
{ prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true },
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
@@ -190,7 +190,8 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:maintain-monitor:export')
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:maintain-monitor:export')
diff --git a/src/views/equipment/base/maintain/PlanConfig/index.vue b/src/views/equipment/base/maintain/PlanConfig/index.vue
index bcd1bf0b..8d79aa00 100644
--- a/src/views/equipment/base/maintain/PlanConfig/index.vue
+++ b/src/views/equipment/base/maintain/PlanConfig/index.vue
@@ -65,57 +65,57 @@ const tableProps = [
{
prop: 'name',
label: '保养计划名称',
- width: 120,
+ minWidth: 120,
showOverflowtooltip: true
},
{
prop: 'departmentName',
label: '部门',
- width: 120,
+ minWidth: 120,
showOverflowtooltip: true
},
{
prop: 'lineName',
label: '产线名',
- width: 120,
+ minWidth: 120,
showOverflowtooltip: true
},
{
prop: 'maintenancePeriod',
label: '保养频率(天/次)',
- width: 150,
+ minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'firstMaintenanceTime',
label: '首次保养时间',
filter: parseTime,
- width: 150,
+ minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'maintainDuration',
label: '保养时长',
- width: 120,
+ minWidth: 120,
showOverflowtooltip: true
},
{
prop: 'maintainer',
label: '计划保养人员',
- width: 150,
+ minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'confirmTimeLimit',
label: '确认时限',
filter: toDay,
- width: 130,
+ minWidth: 130,
showOverflowtooltip: true
},
{
prop: 'remark',
label: '备注',
- width: 150,
+ minWidth: 150,
showOverflowtooltip: true
}
];
@@ -172,7 +172,7 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:plan-config:create') ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:plan-config:create') ? 'button' : '',
diff --git a/src/views/equipment/base/maintain/Record/index.vue b/src/views/equipment/base/maintain/Record/index.vue
index 718ffca9..4cef847e 100644
--- a/src/views/equipment/base/maintain/Record/index.vue
+++ b/src/views/equipment/base/maintain/Record/index.vue
@@ -131,21 +131,21 @@ export default {
// width: 180,
// filter: timeFilter,
// },
- { prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true },
- { prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true },
- { prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true },
- { prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true },
- { prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
- { prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
- { prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
- { prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
+ { prop: 'maintainOrderNumber', label: '设备保养单号', minWidth: 170, showOverflowtooltip: true },
+ { prop: 'planName', label: '保养计划名称', minWidth: 150, showOverflowtooltip: true },
+ { prop: 'departmentName', label: '部门', minWidth: 120, showOverflowtooltip: true },
+ { prop: 'lineName', label: '产线名', minWidth: 120, showOverflowtooltip: true },
+ { prop: 'planStartTime', label: '计划开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
+ { prop: 'planEndTime', label: '计划结束时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
+ { prop: 'startTime', label: '实际开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
+ { prop: 'endTime', label: '实际结束时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
// { prop: 'equipmentName', label: '设备名称' },
// { prop: 'maintainWorker', label: '保养人员' },
{
prop: 'relatePlan',
label: '保养计划类型',
filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
- width: 170,
+ minWidth: 170,
showOverflowtooltip: true
},
{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
@@ -198,7 +198,8 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('equipment:maintain-record:export')
+ ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:maintain-record:export')
diff --git a/src/views/equipment/base/repair/index.vue b/src/views/equipment/base/repair/index.vue
index 905a89fa..692279c2 100644
--- a/src/views/equipment/base/repair/index.vue
+++ b/src/views/equipment/base/repair/index.vue
@@ -173,7 +173,7 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: (this.$auth.hasPermi('equipment:repair:export') || this.$auth.hasPermi('equipment:repair:create')) ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',