Compare commits

...

6 Commits

Author SHA1 Message Date
helloDy
8f11c2f47c Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-04-12 11:05:44 +08:00
helloDy
b41dc9593c 权限22 2024-04-12 11:05:11 +08:00
1ed409a98e Merge pull request 'projects/mesxc-zhp' (#329) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #329
2024-04-11 16:55:43 +08:00
68e738cf12 Merge pull request 'projects/mesxc-dy' (#328) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #328
2024-04-11 16:55:03 +08:00
‘937886381’
4866198a98 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-11 16:54:49 +08:00
‘937886381’
49df8a72bd 修改bug 2024-04-11 16:54:22 +08:00
19 changed files with 231 additions and 80 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

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-11-07 14:10:18
* @LastEditTime: 2024-04-09 09:17:02
* @LastEditTime: 2024-04-11 16:16:05
* @LastEditors: zhp
* @Description:
*/
@ -18,14 +18,14 @@ export function getStatisticalDataPage(query) {
export function getWorkOrderList(query) {
return request({
url: 'base/quality-inspection-record/listbyfilter',
url: 'base/core-work-order/listbyfilter',
method: 'get',
params: query,
})
}
export function getProductList(query) {
return request({
url: 'base/statistical-data/listAll',
url: 'base/core-product/listAll',
method: 'get',
params: query,
})

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,

View File

@ -219,7 +219,7 @@ export default {
},
{
type: this.$auth.hasPermi(
'monitoring:device-parameters:query'
'monitoring:equipment:query'
)
? 'button'
: '',

View File

@ -261,7 +261,7 @@ export default {
// },
{
type: this.$auth.hasPermi(
'monitoring:equipment-traceability:query'
'analysis:equipment:query'
)
? 'button'
: '',
@ -271,14 +271,14 @@ export default {
},
{
type: this.$auth.hasPermi(
'monitoring:equipment-traceability:export'
'analysis:equipment:export'
)
? 'separate'
: '',
},
{
type: this.$auth.hasPermi(
'monitoring:equipment-traceability:export'
'analysis:equipment:export'
)
? 'button'
: '',