projects/mesxc-dy #330

Merged
juzi merged 2 commits from projects/mesxc-dy into projects/mesxc-test 2024-04-12 11:10:02 +08:00
16 changed files with 224 additions and 73 deletions

View File

@ -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'

View File

@ -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: [

View File

@ -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: '新增',

View File

@ -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',

View File

@ -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',

View File

@ -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: '删除',

View File

@ -91,7 +91,7 @@
<!-- btns -->
<el-table-column width="188" label="操作">
<template slot-scope="scope">
<el-tooltip content="确认" placement="top">
<el-tooltip v-if="$auth.hasPermi('equipment:check:update')" content="确认" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -101,8 +101,8 @@
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="查看详情" placement="top">
<span v-if="$auth.hasPermi('equipment:check:query')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip v-if="$auth.hasPermi('equipment:check:query')" content="查看详情" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -111,8 +111,26 @@
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="编辑" placement="top">
<span v-if="$auth.hasPermiAnd([
'equipment:check:update',
'base:core-worker:query',
'base:group-classes:query',
'base:core-department:query',
'equipment:check:query',
'equipment:check:create',
'equipment:check:delete',
'base:core-equipment:query'
])" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip v-if="$auth.hasPermiAnd([
'equipment:check:update',
'base:core-worker:query',
'base:group-classes:query',
'base:core-department:query',
'equipment:check:query',
'equipment:check:create',
'equipment:check:delete',
'base:core-equipment:query'
])" content="编辑" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -121,8 +139,8 @@
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="删除" placement="top">
<span v-if="$auth.hasPermi('equipment:check:delete')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip v-if="$auth.hasPermi('equipment:check:delete')" content="删除" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"

View File

@ -101,13 +101,23 @@ export default {
color: 'primary',
},
{
type: (this.$auth.hasPermi('equipment:inspection-confirm:create') ||
this.$auth.hasPermi('equipment:inspection-confirm:confirm') ||
this.$auth.hasPermi('equipment:inspection-confirm:export'))
type: (this.$auth.hasPermiAnd([
'equipment:check:create',
'base:core-worker:query',
'base:group-classes:query',
'base:core-department:query'
]) ||
this.$auth.hasPermi('equipment:check:update') ||
this.$auth.hasPermi('equipment:check:export'))
? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:inspection-confirm:create')
type: this.$auth.hasPermiAnd([
'equipment:check:create',
'base:core-worker:query',
'base:group-classes:query',
'base:core-department:query'
])
? 'button'
: '',
btnName: '新增',
@ -116,7 +126,7 @@ export default {
color: 'success',
},
{
type: this.$auth.hasPermi('equipment:inspection-confirm:confirm')
type: this.$auth.hasPermi('equipment:check:update')
? 'button'
: '',
btnName: '批量确认',
@ -125,7 +135,7 @@ export default {
plain: true,
},
{
type: this.$auth.hasPermi('equipment:inspection-confirm:export')
type: this.$auth.hasPermi('equipment:check:export')
? 'button'
: '',
btnName: '导出',

View File

@ -100,7 +100,7 @@ export default {
addContent: false,
searchBarKeys: ['name', 'actualCheckTime'],
tableBtn: [
this.$auth.hasPermi('equipment:check-record:detail')
this.$auth.hasPermi('equipment:check:query')
? {
type: 'detail',
btnName: '详情',
@ -166,11 +166,11 @@ export default {
color: 'primary',
},
{
type: this.$auth.hasPermi('equipment:check-record:export')
type: this.$auth.hasPermi('equipment:check:export')
? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:check-record:export')
type: this.$auth.hasPermi('equipment:check:export')
? 'button'
: '',
btnName: '导出',

View File

@ -68,14 +68,23 @@ export default {
addOrEditTitle: '',
searchBarKeys: ['equipmentId', 'name'],
tableBtn: [
this.$auth.hasPermi('equipment:check-setting:addInsp')
this.$auth.hasPermiAnd([
'equipment:check:create',
'equipment:check:query',
'equipment:check:update',
'equipment:check:delete'
])
? {
type: 'add',
btnName: '添加',
showTip: '添加巡检',
}
: undefined,
this.$auth.hasPermi('equipment:check-setting:update')
this.$auth.hasPermiAnd([
'equipment:check:update',
'equipment:check:query',
'base:core-department:query'
])
? {
type: 'edit',
btnName: '修改',
@ -87,7 +96,7 @@ export default {
// btnName: '',
// }
// : undefined,
this.$auth.hasPermi('equipment:check-setting:delete')
this.$auth.hasPermi('equipment:check:delete')
? {
type: 'delete',
btnName: '删除',
@ -157,11 +166,17 @@ export default {
color: 'primary',
},
{
type: this.$auth.hasPermi('equipment:check-setting:create')
type: this.$auth.hasPermiAnd([
'equipment:check:create',
'base:core-department:query'
])
? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:check-setting:create')
type: this.$auth.hasPermiAnd([
'equipment:check:create',
'base:core-department:query'
])
? 'button'
: '',
btnName: '新增',

View File

@ -118,7 +118,7 @@
<!-- btns -->
<el-table-column width="188" label="操作">
<template slot-scope="scope">
<el-tooltip content="确认" placement="top">
<el-tooltip v-if="$auth.hasPermi('equipment:maintain-record:update')" content="确认" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -128,8 +128,8 @@
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="查看详情" placement="top">
<span v-if="$auth.hasPermi('equipment:maintain-record:query')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip v-if="$auth.hasPermi('equipment:maintain-record:query')" content="查看详情" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -138,18 +138,32 @@
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="编辑" placement="top">
<!-- <span v-if="$auth.hasPermiAnd([
'equipment:maintain-record:update',
'base:core-production-line:query',
'base:core-department:query',
'equipment:maintain-record:create',
'equipment:maintain-record:query',
'equipment:maintain-record:delete'
])" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip v-if="$auth.hasPermiAnd([
'equipment:maintain-record:update',
'base:core-production-line:query',
'base:core-department:query',
'equipment:maintain-record:create',
'equipment:maintain-record:query',
'equipment:maintain-record:delete'
])" content="编辑" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="$emit('edit', scope.row)">
<i class="iconfont icon-edit primary-color" />
</el-button>
</el-tooltip>
</el-tooltip> -->
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="删除" placement="top">
<span v-if="$auth.hasPermi('equipment:maintain-record:delete')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip v-if="$auth.hasPermi('equipment:maintain-record:delete')" content="删除" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"

View File

@ -157,10 +157,20 @@ export default {
color: 'primary',
},
{
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.hasPermiAnd([
'equipment:maintain-record:create',
'base:core-worker:query',
'base:core-production-line:query',
'base:core-department:query'
]) || this.$auth.hasPermi('equipment:maintain-record:update') || this.$auth.hasPermi('equipment:maintain-record:export')) ? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:maintain-confirm:create')
type: this.$auth.hasPermiAnd([
'equipment:maintain-record:create',
'base:core-worker:query',
'base:core-production-line:query',
'base:core-department:query'
])
? 'button'
: '',
btnName: '新增',
@ -169,7 +179,7 @@ export default {
color: 'success',
},
{
type: this.$auth.hasPermi('equipment:maintain-confirm:confirm')
type: this.$auth.hasPermi('equipment:maintain-record:update')
? 'button'
: '',
btnName: '批量确认',
@ -178,7 +188,7 @@ export default {
plain: true,
},
{
type: this.$auth.hasPermi('equipment:maintain-confirm:export')
type: this.$auth.hasPermi('equipment:maintain-record:export')
? 'button'
: '',
btnName: '导出',

View File

@ -160,7 +160,8 @@ export default {
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
// },
// { prop: 'opt1', label: '', name: '', subcomponent: btn },
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn, width: 100 },
this.$auth.hasPermi('equipment:plan-config:query') ?
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn, width: 100 } : undefined,
{
prop: 'remainDays',
label: '距离下次保养剩余时间(天)',
@ -190,11 +191,11 @@ export default {
color: 'primary',
},
{
type: this.$auth.hasPermi('equipment:maintain-monitor:export')
type: this.$auth.hasPermi('equipment:plan-config:export')
? 'separate' : '',
},
{
type: this.$auth.hasPermi('equipment:maintain-monitor:export')
type: this.$auth.hasPermi('equipment:plan-config:export')
? 'button'
: '',
btnName: '导出',

View File

@ -14,7 +14,7 @@
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
:width="180"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
@ -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',

View File

@ -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: '' },

View File

@ -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,