+
添加
@@ -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' : '',
From 862fe20760b891562b6757d1470aae043f100cad Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Fri, 12 Apr 2024 08:56:32 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=83=BD=E6=BA=90bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 36 ++++++-------------
.env.prod | 9 +----
.env.stage | 9 ++---
.../energy/analysis/trendAnalysis/index.vue | 14 +++++---
.../energy/monitoring/energyLimit/index.vue | 3 +-
5 files changed, 25 insertions(+), 46 deletions(-)
diff --git a/.env.dev b/.env.dev
index 882a92fe..25e4022b 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,10 +1,3 @@
-###
- # @Author: Do not edit
- # @Date: 2023-08-29 09:40:39
- # @LastEditTime: 2024-04-10 16:58:06
- # @LastEditors: zhp
- # @Description:
-###
# 开发环境配置
ENV = 'development'
@@ -12,27 +5,18 @@ ENV = 'development'
VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
-# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
-# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
-# VUE_APP_BASE_API = 'http://192.168.1.20:48080'
-# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
-# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
-# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
-# VUE_APP_BASE_API = 'http://192.168.4.173:9001'
-# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
-# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
-# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
-# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
-# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
-VUE_APP_BASE_API = 'http://192.168.1.78:48082'
-# socket地址
-# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
-# VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
-VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
-VUE_APP_Socket_Dcs_API = 'ws://192.168.0.33:8080'
+VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# 积木报表指向地址
-VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
+VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
+
+# socket地址(现场)
+# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
+# socket地址(公司线上)
+VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
+# socket dcs地址(只有现场)
+VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
+
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
diff --git a/.env.prod b/.env.prod
index 0148da16..3d67235d 100644
--- a/.env.prod
+++ b/.env.prod
@@ -1,11 +1,4 @@
-###
- # @Author: zhp
- # @Date: 2023-11-07 19:11:40
- # @LastEditTime: 2023-11-16 16:40:59
- # @LastEditors: zhp
- # @Description:
-###
-# 生产环境配置
+# 生产环境配置(许昌现场)
ENV = 'production'
# 页面标题
diff --git a/.env.stage b/.env.stage
index 1e29f627..c56a3a79 100644
--- a/.env.stage
+++ b/.env.stage
@@ -1,4 +1,4 @@
-# 生产环境配置
+# 公司线上环境(33服务器)
ENV = 'production'
# 页面标题
@@ -7,15 +7,12 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/生产环境
VUE_APP_BASE_API = '/prod-api'
-# dcs地址
-VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
-# socket地址
-VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
-
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
# socket地址
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
+# dcs地址(只有现场的)
+VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# 根据服务器或域名修改
diff --git a/src/views/energy/analysis/trendAnalysis/index.vue b/src/views/energy/analysis/trendAnalysis/index.vue
index d42b7b55..a40aaea7 100644
--- a/src/views/energy/analysis/trendAnalysis/index.vue
+++ b/src/views/energy/analysis/trendAnalysis/index.vue
@@ -57,10 +57,14 @@ export default {
let listObj = { useNum: '消耗量' }; // 数据
for (let i = 0; i < arr.length; i++) {
let obj = {};
- let fName = arr[i].time.slice(0, 4);
- let lName = arr[i].time.slice(4, 6);
+ if (this.timeDim === '3') {
+ let fName = arr[i].time.slice(0, 4);
+ let lName = arr[i].time.slice(4, 6);
+ obj.label = fName + ' 第 ' + lName + ' 周';
+ } else {
+ obj.label = arr[i].time;
+ }
obj.prop = arr[i].time;
- obj.label = fName + ' 第 ' + lName + ' 周';
obj.minWidth = 100;
tempX.push(obj);
listObj[arr[i].time] = arr[i].useNum || null;
@@ -97,10 +101,10 @@ export default {
},
};
-
\ No newline at end of file
+
diff --git a/src/views/energy/monitoring/energyLimit/index.vue b/src/views/energy/monitoring/energyLimit/index.vue
index 008f9bf6..4067d6fd 100644
--- a/src/views/energy/monitoring/energyLimit/index.vue
+++ b/src/views/energy/monitoring/energyLimit/index.vue
@@ -266,8 +266,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
+ console.log(row);
this.$modal
- .confirm('是否确认删除监控对象为"' + row.objName + '"的数据项?')
+ .confirm('是否确认删除第"' + row._pageIndex + '"条数据项?')
.then(function () {
return deleteEnergyLimit(row.id);
})
From b41dc9593c81ec677dc0d3463eaf0c584e318ad3 Mon Sep 17 00:00:00 2001
From: helloDy <1615073571@qq.com>
Date: Fri, 12 Apr 2024 11:05:11 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=9D=83=E9=99=9022?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 8 ++---
.../equipment/base/alarm/Record/index.vue | 16 ++++++++--
.../base/config/AlarmGroup/index.vue | 23 +++++++++----
.../equipment/base/config/BindGroup/index.vue | 26 +++++++++++----
.../DataCollection/CollectionConfig.vue | 27 +++++++++++-----
.../config/DataCollection/TableConfig.vue | 7 ++--
.../inspection/Confirm/WaitingListTable.vue | 32 +++++++++++++++----
.../base/inspection/Confirm/index.vue | 22 +++++++++----
.../base/inspection/Record/index.vue | 6 ++--
.../base/inspection/Settings/index.vue | 25 ++++++++++++---
.../maintain/Confirm/WaitingListTable.vue | 30 ++++++++++++-----
.../equipment/base/maintain/Confirm/index.vue | 18 ++++++++---
.../equipment/base/maintain/Monitor/index.vue | 7 ++--
.../base/maintain/PlanConfig/index.vue | 32 ++++++++++++++++---
.../equipment/base/maintain/Record/index.vue | 3 +-
src/views/equipment/base/repair/index.vue | 15 +++++++--
16 files changed, 224 insertions(+), 73 deletions(-)
diff --git a/.env.dev b/.env.dev
index 882a92fe..c7978c40 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,8 +1,8 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
- # @LastEditTime: 2024-04-10 16:58:06
- # @LastEditors: zhp
+ # @LastEditTime: 2024-04-11 17:04:05
+ # @LastEditors: DY
# @Description:
###
# 开发环境配置
@@ -20,11 +20,11 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:9001'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
-# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
+VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
-VUE_APP_BASE_API = 'http://192.168.1.78:48082'
+# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# socket地址
# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
# VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
diff --git a/src/views/equipment/base/alarm/Record/index.vue b/src/views/equipment/base/alarm/Record/index.vue
index 9c154511..977910fb 100644
--- a/src/views/equipment/base/alarm/Record/index.vue
+++ b/src/views/equipment/base/alarm/Record/index.vue
@@ -130,8 +130,20 @@ export default {
{ prop: 'createTime', label: '报警时间', filter: timeFilter, width: 150, showOverflowtooltip: true },
{ prop: 'alarmCode', label: '设备报警码', width: 180, showOverflowtooltip: true },
{ prop: 'alarmContent', label: '报警内容', width: 150, showOverflowtooltip: true },
- { prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
- { prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn },
+ this.$auth.hasPermiAnd([
+ 'monitoring:equipment-alarm-log:query',
+ 'base:equipment-alarm-hand:query'
+ ]) ?
+ { prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn } : undefined,
+ this.$auth.hasPermiAnd([
+ 'monitoring:equipment-alarm-log:query',
+ 'base:equipment-alarm-hand:query',
+ 'base:core-worker:query',
+ 'base:equipment-alarm-hand:create',
+ 'base:equipment-alarm-hand:update',
+ 'monitoring:equipment-alarm-log:update'
+ ]) ?
+ { prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn } : undefined,
// { prop: 'remark', label: '备注' },
],
searchBarFormConfig: [
diff --git a/src/views/equipment/base/config/AlarmGroup/index.vue b/src/views/equipment/base/config/AlarmGroup/index.vue
index 2224a242..6861407a 100644
--- a/src/views/equipment/base/config/AlarmGroup/index.vue
+++ b/src/views/equipment/base/config/AlarmGroup/index.vue
@@ -122,19 +122,30 @@ export default {
editMode: '',
searchBarKeys: ['name', 'code'],
tableBtn: [
- this.$auth.hasPermi('equipment:alarm-group:update')
- ? {
+ this.$auth.hasPermiAnd([
+ 'base:equipment-group:query',
+ 'base:equipment-group-alarm:query'
+ ])
+ ? {
type: 'detail',
btnName: '查看报警',
}
: undefined,
- this.$auth.hasPermi('equipment:alarm-group:update')
+ this.$auth.hasPermiAnd([
+ 'base:equipment-group:update',
+ 'base:equipment-group:query',
+ 'base:equipment-group-alarm:create',
+ 'base:equipment-group-alarm:delete',
+ 'base:equipment-group-alarm:update',
+ 'base:equipment-group-alarm:query',
+ 'base:equipment-group-alarm:query'
+ ])
? {
type: 'edit',
btnName: '修改',
}
: undefined,
- this.$auth.hasPermi('equipment:alarm-group:delete')
+ this.$auth.hasPermi('base:equipment-group:delete')
? {
type: 'delete',
btnName: '删除',
@@ -244,11 +255,11 @@ export default {
color: 'primary',
},
{
- type: this.$auth.hasPermi('equipment:alarm-group:create')
+ type: this.$auth.hasPermi('base:equipment-group:create')
? 'separate' : '',
},
{
- type: this.$auth.hasPermi('equipment:alarm-group:create')
+ type: this.$auth.hasPermi('base:equipment-group:create')
? 'button'
: '',
btnName: '新增',
diff --git a/src/views/equipment/base/config/BindGroup/index.vue b/src/views/equipment/base/config/BindGroup/index.vue
index ccf6189f..3023d94d 100644
--- a/src/views/equipment/base/config/BindGroup/index.vue
+++ b/src/views/equipment/base/config/BindGroup/index.vue
@@ -123,13 +123,23 @@ export default {
return {
searchBarKeys: ['groupId', 'equipmentName'],
tableBtn: [
- this.$auth.hasPermi('equipment:bind-group:update')
+ this.$auth.hasPermiAnd([
+ 'base:equipment-group-alarm:query',
+ 'base:core-equipment:query'
+ ])
? {
type: 'detail',
btnName: '查看报警',
}
: undefined,
- this.$auth.hasPermi('equipment:bind-group:update')
+ this.$auth.hasPermiAnd([
+ 'equipment:bind-group:update',
+ 'base:core-equipment:query',
+ 'base:equipment-group-alarm:create',
+ 'base:equipment-group-alarm:update',
+ 'base:equipment-group-alarm:delete',
+ 'base:equipment-group-alarm:query'
+ ])
? {
type: 'edit',
btnName: '修改',
@@ -201,12 +211,16 @@ export default {
color: 'primary',
},
{
- type: this.$auth.hasPermi('equipment:bind-group:create')
- ? 'separate' : '',
+ type: this.$auth.hasPermiAnd([
+ 'equipment:bind-group:create',
+ 'base:core-equipment:query'
+ ]) ? 'separate' : '',
},
{
- type: this.$auth.hasPermi('equipment:bind-group:create')
- ? 'button'
+ type: this.$auth.hasPermiAnd([
+ 'equipment:bind-group:create',
+ 'base:core-equipment:query'
+ ]) ? 'button'
: '',
btnName: '新增',
name: 'add',
diff --git a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue
index 6a2a2d0b..1f5a635b 100644
--- a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue
+++ b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue
@@ -140,17 +140,28 @@ export default {
// tableBtn: [
// ].filter((v) => v),
tableBtn: [
- {
- type: 'detail',
- btnName: '参数绑定',
- },
- this.$auth.hasPermi('equipment:collection-config:update')
+ this.$auth.hasPermiAnd([
+ 'base:equipment-plc-connect:query',
+ 'base:equipment-plc-param:query'
+ ])
+ ? {
+ type: 'detail',
+ btnName: '参数绑定',
+ } : undefined,
+ this.$auth.hasPermiAnd([
+ 'base:equipment-plc-connect:update',
+ 'base:equipment-plc-connect:query',
+ 'base:equipment-plc-param:create',
+ 'base:equipment-plc-param:update',
+ 'base:equipment-plc-param:delete',
+ 'base:equipment-plc-param:query'
+ ])
? {
type: 'edit',
btnName: '修改',
}
: undefined,
- this.$auth.hasPermi('equipment:collection-config:delete')
+ this.$auth.hasPermi('base:equipment-plc-connect:delete')
? {
type: 'delete',
btnName: '删除',
@@ -217,11 +228,11 @@ export default {
color: 'primary',
},
{
- type: this.$auth.hasPermi('equipment:collection-config:create')
+ type: this.$auth.hasPermi('base:equipment-plc-connect:create')
? 'separate' : '',
},
{
- type: this.$auth.hasPermi('equipment:collection-config:create')
+ type: this.$auth.hasPermi('base:equipment-plc-connect:create')
? 'button'
: '',
// type: 'button',
diff --git a/src/views/equipment/base/config/DataCollection/TableConfig.vue b/src/views/equipment/base/config/DataCollection/TableConfig.vue
index c692d44f..012647a1 100644
--- a/src/views/equipment/base/config/DataCollection/TableConfig.vue
+++ b/src/views/equipment/base/config/DataCollection/TableConfig.vue
@@ -108,13 +108,16 @@ export default {
tableKey: Math.random(),
searchBarKeys: ['name', 'plcTableName'],
tableBtn: [
- this.$auth.hasPermi('equipment:realtime-table-config:update')
+ this.$auth.hasPermiAnd([
+ 'base:equipment-plc:update',
+ 'base:equipment-plc:query'
+ ])
? {
type: 'edit',
btnName: '修改',
}
: undefined,
- this.$auth.hasPermi('equipment:realtime-table-config:delete')
+ this.$auth.hasPermi('base:equipment-plc:delete')
? {
type: 'delete',
btnName: '删除',
diff --git a/src/views/equipment/base/inspection/Confirm/WaitingListTable.vue b/src/views/equipment/base/inspection/Confirm/WaitingListTable.vue
index 2d3387dd..fccfce40 100644
--- a/src/views/equipment/base/inspection/Confirm/WaitingListTable.vue
+++ b/src/views/equipment/base/inspection/Confirm/WaitingListTable.vue
@@ -91,7 +91,7 @@
-
+
- |
-
+ |
+
- |
-
+ |
+
- |
-
+ |
+
-
+
- |
-
+ |
+
- |
-
+
- |
-
+ |
+
@@ -138,13 +138,25 @@ export default {
planName: undefined
},
tableBtn: [
- this.$auth.hasPermi(`equipment:plan-config:add`)
+ this.$auth.hasPermiAnd([
+ 'equipment:plan-config:query',
+ 'equipment:plan-config:create',
+ 'equipment:plan-config:update',
+ 'equipment:plan-config:delete',
+ 'base:core-equipment:query'
+ ])
? {
type: 'add',
btnName: '添加内容',
}
: undefined,
- this.$auth.hasPermi(`equipment:plan-config:update`)
+ this.$auth.hasPermiAnd([
+ 'equipment:plan-config:update',
+ 'equipment:plan-config:query',
+ 'base:core-worker:query',
+ 'base:core-production-line:query',
+ 'base:core-department:query'
+ ])
? {
type: 'edit',
btnName: '编辑',
@@ -172,10 +184,20 @@ export default {
color: 'primary',
},
{
- type: this.$auth.hasPermi('equipment:plan-config:create') ? 'separate' : '',
+ type: this.$auth.hasPermiAnd([
+ 'equipment:plan-config:create',
+ 'base:core-worker:query',
+ 'base:core-production-line:query',
+ 'base:core-department:query'
+ ]) ? 'separate' : '',
},
{
- type: this.$auth.hasPermi('equipment:plan-config:create') ? 'button' : '',
+ type: this.$auth.hasPermiAnd([
+ 'equipment:plan-config:create',
+ 'base:core-worker:query',
+ 'base:core-production-line:query',
+ 'base:core-department:query'
+ ]) ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
diff --git a/src/views/equipment/base/maintain/Record/index.vue b/src/views/equipment/base/maintain/Record/index.vue
index 4cef847e..37a6a636 100644
--- a/src/views/equipment/base/maintain/Record/index.vue
+++ b/src/views/equipment/base/maintain/Record/index.vue
@@ -148,7 +148,8 @@ export default {
minWidth: 170,
showOverflowtooltip: true
},
- { prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
+ this.$auth.hasPermi('equipment:maintain-record:query') ?
+ { prop: 'opt', label: '详情', name: '详情', subcomponent: btn } : undefined
// { prop: 'maintainDuration', label: '计划保养用时(h)' },
// { prop: 'timeUsed', label: '实际保养用时(h)' },
// { prop: 'remark', label: '备注' },
diff --git a/src/views/equipment/base/repair/index.vue b/src/views/equipment/base/repair/index.vue
index 692279c2..fb2598f9 100644
--- a/src/views/equipment/base/repair/index.vue
+++ b/src/views/equipment/base/repair/index.vue
@@ -71,7 +71,7 @@ export default {
addOrUpdateVisible: false,
searchBarKeys: ['maintenanceResult', 'createTime', 'equipmentId'],
tableBtn: [
- this.$auth.hasPermi('equipment:repair:update')
+ this.$auth.hasPermi('equipment:repair:query')
? {
type: 'detail',
btnName: '详情',
@@ -173,7 +173,12 @@ export default {
color: 'primary',
},
{
- type: (this.$auth.hasPermi('equipment:repair:export') || this.$auth.hasPermi('equipment:repair:create')) ? 'separate' : '',
+ type: (this.$auth.hasPermi('equipment:repair:export') ||
+ this.$auth.hasPermiAnd([
+ 'equipment:repair:create',
+ 'base:core-worker:query',
+ 'system:user:list'
+ ])) ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
@@ -183,7 +188,11 @@ export default {
color: 'primary',
},
{
- type: this.$auth.hasPermi('equipment:repair:create') ? 'button' : '',
+ type: this.$auth.hasPermiAnd([
+ 'equipment:repair:create',
+ 'base:core-worker:query',
+ 'system:user:list'
+ ]) ? 'button' : '',
btnName: '新增',
name: 'add',
plain: true,