Compare commits
10 Commits
dabbc6b63a
...
bfa17e422d
Author | SHA1 | Date | |
---|---|---|---|
|
bfa17e422d | ||
|
e25f872589 | ||
83b834d2fc | |||
1b2c16fcdb | |||
475ec35ec5 | |||
1328da9616 | |||
92b9ec7da7 | |||
c1af47db81 | |||
15afbcd612 | |||
02c3b3db0d |
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 13:45:56
|
||||
* @LastEditTime: 2024-04-11 11:02:53
|
||||
* @LastEditTime: 2024-04-15 09:28:21
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -13,6 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { position } from '@antv/x6-common/lib/dom/position';
|
||||
import * as echarts from 'echarts';
|
||||
// import resize from './../mixins/resize'
|
||||
// import NotMsg from './../components/NotMsg'
|
||||
@ -49,29 +50,45 @@ export default {
|
||||
mounted() {
|
||||
this.chartData = [
|
||||
{
|
||||
name: '细长泡',
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
},
|
||||
{
|
||||
name: '长泡',
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
},
|
||||
{
|
||||
name: '开口泡',
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
},
|
||||
{
|
||||
name: '结石',
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
}
|
||||
]
|
||||
this.updateChart()
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
getEqualNewlineString(params, length) {
|
||||
let text = ''
|
||||
let count = Math.ceil(params.length / length) // 向上取整数
|
||||
// 一行展示length个
|
||||
if (count > 1) {
|
||||
for (let z = 1; z <= count; z++) {
|
||||
text += params.substr((z - 1) * length, length)
|
||||
if (z < count) {
|
||||
text += '\n'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
text += params.substr(0, length)
|
||||
}
|
||||
return text
|
||||
},
|
||||
updateChart() {
|
||||
console.log('update')
|
||||
let num = 0
|
||||
@ -127,27 +144,38 @@ export default {
|
||||
},
|
||||
series:[{
|
||||
name: 'ISRA缺陷检测',
|
||||
type: 'pie',
|
||||
type: 'pie',
|
||||
// position:outerHeight,
|
||||
center: ['50%', '40%'],
|
||||
radius: ['45%', '70%'],
|
||||
avoidLabelOverlap: true,
|
||||
label: {
|
||||
show: true,
|
||||
label: {
|
||||
show: true,
|
||||
normal: {
|
||||
alignTo: 'labelLine',
|
||||
margin: 10,
|
||||
edgeDistance: 10,
|
||||
lineHeight: 16,
|
||||
// 各分区的提示内容
|
||||
// params: 即下面传入的data数组,通过自定义函数,展示你想要的内容和格式
|
||||
formatter: function (params) {
|
||||
console.log(params);
|
||||
return params.value + " | " + params.percent.toFixed(0) + "%" + "\n\n" + params.name;
|
||||
return ;
|
||||
},
|
||||
formatter: (params) => {
|
||||
//调用自定义显示格式
|
||||
return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%" + "\n" + params.name,10);
|
||||
},
|
||||
textStyle: { // 提示文字的样式
|
||||
// color: '#595959',
|
||||
fontSize: 24.48
|
||||
fontSize: 16
|
||||
}
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: true,
|
||||
show: true,
|
||||
length: 25,
|
||||
length2: 10,
|
||||
},
|
||||
data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({
|
||||
name:item.name,
|
||||
|
@ -201,7 +201,7 @@
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
|
||||
<div v-if="this.$auth.hasPermiAnd(['base:material-product-bom-det:query', 'extend:process-flow:query'])">
|
||||
<div v-if="$auth.hasPermiAnd(['base:material-product-bom-det:query', 'extend:process-flow:query'])">
|
||||
<div class="card" style="padding-bottom: 16px;">
|
||||
<div class="boxTitle">
|
||||
<span class="blueTitle"></span>
|
||||
|
@ -56,14 +56,14 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="attr-list" v-if="idAttrShow && this.$auth.hasPermiAnd(['base:material-product-bom:query', 'base:material-product-bom-det:query'])">
|
||||
<div class="attr-list" v-if="idAttrShow && $auth.hasPermiAnd(['base:material-product-bom:query', 'base:material-product-bom-det:query'])">
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
BOM明细
|
||||
</small-title>
|
||||
|
||||
<div v-if="!isdetail && this.$auth.hasPermi('base:material-product-bom:create')" class="action_btn">
|
||||
<div v-if="!isdetail && $auth.hasPermi('base:material-product-bom:create')" class="action_btn">
|
||||
<template>
|
||||
<span style="display: inline-block;">
|
||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
||||
|
@ -116,7 +116,7 @@ export default {
|
||||
},
|
||||
selectObj(val) {
|
||||
this.form.bindObjectId = val[val.length - 1];
|
||||
this.form.bindObjectType = val.length - 1;
|
||||
this.form.bindObjectType = val.length;
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
@ -152,4 +152,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -216,10 +216,10 @@ export default {
|
||||
getEnergyLimit(id).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data;
|
||||
this.form.plcParamId = res.data.plcParamId || '';
|
||||
this.form.tableName = this.form.tableName
|
||||
? this.form.tableName + ''
|
||||
: '';
|
||||
this.form.plcParamId = res.data.plcParamId || '';
|
||||
this.form.method = this.form.method ? this.form.method + '' : '';
|
||||
this.form.limitType = this.form.limitType
|
||||
? this.form.limitType + ''
|
||||
@ -231,6 +231,9 @@ export default {
|
||||
if (this.form.type === 2) {
|
||||
this.getDetailList();
|
||||
}
|
||||
if (this.form.energyTypeId) {
|
||||
this.getTableNameList(this.form.energyTypeId);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -103,6 +103,7 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
|
||||
{
|
||||
type: this.$auth.hasPermi('monitoring:energy-statistics:create')
|
||||
? 'separate'
|
||||
|
@ -280,7 +280,7 @@ export default {
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-group:update')
|
||||
this.$auth.hasPermi('base:order-group:query')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
@ -483,4 +483,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -103,7 +103,6 @@ export default {
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
|
||||
tableProps: [
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
|
@ -91,13 +91,13 @@
|
||||
pageSize: 10,
|
||||
},
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:core-equipment-attr:update') // ('se:firefight-attr:update') // TODO 此处需用firefight-attr权限还是core-equipment-attr 权限?
|
||||
this.$auth.hasPermi('base:core-equipment-attr:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:core-equipment-attr:delete') // ('se:firefight-attr:delete')
|
||||
this.$auth.hasPermi('base:core-equipment-attr:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -142,19 +142,29 @@ export default {
|
||||
return {
|
||||
searchBarKeys: ['name', 'code'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`se:firefight:update`)
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:query',
|
||||
'base:core-equipment-attr:query',
|
||||
])
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:firefight:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:update',
|
||||
'base:core-worker:query',
|
||||
'base:core-equipment:query',
|
||||
'base:core-equipment-attr:create',
|
||||
'base:core-equipment-attr:query',
|
||||
'base:core-equipment-attr:delete',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:firefight:delete')
|
||||
this.$auth.hasPermi('base:core-equipment:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -205,17 +215,32 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type:
|
||||
this.$auth.hasPermi('base:core-equipment:export') ||
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:create',
|
||||
'base:core-worker:query',
|
||||
])
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:firefight:export') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('base:core-equipment:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'primary',
|
||||
},
|
||||
//
|
||||
{
|
||||
type: this.$auth.hasPermi('se:firefight:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:create',
|
||||
'base:core-worker:query',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
plain: true,
|
||||
|
@ -142,19 +142,29 @@ export default {
|
||||
return {
|
||||
searchBarKeys: ['name', 'code'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`se:manage:update`)
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:query',
|
||||
'base:core-equipment-attr:query',
|
||||
])
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:manage:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:update',
|
||||
'base:core-worker:query',
|
||||
'base:core-equipment:query',
|
||||
'base:core-equipment-attr:create',
|
||||
'base:core-equipment-attr:query',
|
||||
'base:core-equipment-attr:delete',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:manage:delete')
|
||||
this.$auth.hasPermi('base:core-equipment:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -204,10 +214,17 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type:
|
||||
this.$auth.hasPermi('base:core-equipment:export') ||
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:create',
|
||||
'base:core-worker:query',
|
||||
])
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:manage:export')
|
||||
type: this.$auth.hasPermi('base:core-equipment:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
@ -216,7 +233,10 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:manage:create')
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:create',
|
||||
'base:core-worker:query',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
|
@ -141,19 +141,30 @@ export default {
|
||||
return {
|
||||
searchBarKeys: ['name', 'code'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`se:safety:update`)
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:query',
|
||||
'base:core-equipment-attr:query',
|
||||
])
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:safety:update')
|
||||
//
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:update',
|
||||
'base:core-worker:query',
|
||||
'base:core-equipment:query',
|
||||
'base:core-equipment-attr:create',
|
||||
'base:core-equipment-attr:query',
|
||||
'base:core-equipment-attr:delete',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:safety:delete')
|
||||
this.$auth.hasPermi('base:core-equipment:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -203,10 +214,17 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type:
|
||||
this.$auth.hasPermi('base:core-equipment:export') ||
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:create',
|
||||
'base:core-worker:query',
|
||||
])
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:safety:export')
|
||||
type: this.$auth.hasPermi('base:core-equipment:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
@ -215,7 +233,10 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:safety:create')
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'base:core-equipment:create',
|
||||
'base:core-worker:query',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
|
@ -103,6 +103,7 @@
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
v-if="$auth.hasPermi('equipment:check:update')"
|
||||
content="确认"
|
||||
placement="top">
|
||||
<el-button
|
||||
@ -114,8 +115,13 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- line -->
|
||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<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
|
||||
@ -126,8 +132,35 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- line -->
|
||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<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
|
||||
@ -138,8 +171,13 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- line -->
|
||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<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
|
||||
|
@ -26,7 +26,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="180"
|
||||
:width="128"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
@ -78,20 +78,29 @@ export default {
|
||||
addOrEditTitle: '',
|
||||
searchBarKeys: ['name'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('se:check:add-item')
|
||||
this.$auth.hasPermiAnd([
|
||||
'equipment:check:create',
|
||||
'equipment:check:query',
|
||||
'equipment:check:update',
|
||||
'equipment:check:delete',
|
||||
])
|
||||
? {
|
||||
type: 'add',
|
||||
btnName: '添加',
|
||||
showTip: '添加巡检',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:check:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'equipment:check:update',
|
||||
'equipment:check:query',
|
||||
'base:core-department:query',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:check:delete')
|
||||
this.$auth.hasPermi('equipment:check:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -164,10 +173,20 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:check:create',
|
||||
'base:core-department:query',
|
||||
])
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:check:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:check:create',
|
||||
'base:core-department:query',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
plain: true,
|
||||
|
@ -155,10 +155,25 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type:
|
||||
this.$auth.hasPermiAnd([
|
||||
'equipment:check:create',
|
||||
'base:core-worker:query',
|
||||
'base:group-classes:query',
|
||||
'base:core-department:query',
|
||||
]) ||
|
||||
this.$auth.hasPermi('equipment:check:export') ||
|
||||
this.$auth.hasPermi('equipment:check:update')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:check-unconfirm:create')
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:check:create',
|
||||
'base:core-worker:query',
|
||||
'base:group-classes:query',
|
||||
'base:core-department:query',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
@ -167,18 +182,14 @@ export default {
|
||||
color: 'success',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:check-unconfirm:export')
|
||||
? 'button'
|
||||
: '',
|
||||
type: this.$auth.hasPermi('equipment:check:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'warning',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:check-unconfirm:confirm-all')
|
||||
? 'button'
|
||||
: '',
|
||||
type: this.$auth.hasPermi('equipment:check:update') ? 'button' : '',
|
||||
btnName: '批量确认',
|
||||
name: 'batch-confirm',
|
||||
plain: true,
|
||||
|
@ -71,7 +71,7 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
searchBarKeys: ['name', 'actualCheckTime'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('se:check-record:detail')
|
||||
this.$auth.hasPermi('equipment:check:query')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
@ -147,10 +147,10 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('equipment:check:export') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:check-record:export') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('equipment:check:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
|
@ -122,20 +122,22 @@ export default {
|
||||
minWidth: 158,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'opt2',
|
||||
label: '保养内容',
|
||||
entryText: '详情',
|
||||
subcomponent: TableBtn,
|
||||
width: 100,
|
||||
},
|
||||
this.$auth.hasPermi('equipment:plan-config:query')
|
||||
? {
|
||||
prop: 'opt2',
|
||||
label: '保养内容',
|
||||
entryText: '详情',
|
||||
subcomponent: TableBtn,
|
||||
width: 100,
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
prop: 'remainDays',
|
||||
label: '距离下次保养剩余时间(天)',
|
||||
subcomponent: RemainBox,
|
||||
minWidth: 210,
|
||||
},
|
||||
],
|
||||
].filter(v => v),
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
@ -151,10 +153,12 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('equipment:plan-config:export')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:maintain-plan:export')
|
||||
type: this.$auth.hasPermi('equipment:plan-config:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
|
@ -83,19 +83,31 @@ export default {
|
||||
return {
|
||||
searchBarKeys: ['planName'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('se:maintain:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'equipment:plan-config:query',
|
||||
'equipment:plan-config:create',
|
||||
'equipment:plan-config:update',
|
||||
'equipment:plan-config:delete',
|
||||
'base:core-equipment:query',
|
||||
])
|
||||
? {
|
||||
type: 'addContent',
|
||||
btnName: '添加内容',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:maintain: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: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:maintain:delete')
|
||||
this.$auth.hasPermi('equipment:plan-config:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -166,10 +178,24 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: '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('se:maintain: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',
|
||||
plain: true,
|
||||
|
@ -212,7 +212,7 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.loadEquipments();
|
||||
// this.loadEquipments();
|
||||
},
|
||||
methods: {
|
||||
/** 确认是否关闭 */
|
||||
|
@ -100,26 +100,26 @@ export default {
|
||||
return {
|
||||
recordDetailVisible: false,
|
||||
searchBarKeys: ['maintainPlanId', 'startTime', 'special'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('se:maintain-record:update')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:maintain-record:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:maintain-record:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
// tableBtn: [
|
||||
// this.$auth.hasPermi('se:maintain-record:update')
|
||||
// ? {
|
||||
// type: 'detail',
|
||||
// btnName: '详情',
|
||||
// }
|
||||
// : undefined,
|
||||
// this.$auth.hasPermi('se:maintain-record:update')
|
||||
// ? {
|
||||
// type: 'edit',
|
||||
// btnName: '修改',
|
||||
// }
|
||||
// : undefined,
|
||||
// this.$auth.hasPermi('se:maintain-record:delete')
|
||||
// ? {
|
||||
// type: 'delete',
|
||||
// btnName: '删除',
|
||||
// }
|
||||
// : undefined,
|
||||
// ].filter((v) => v),
|
||||
tableProps: [
|
||||
{
|
||||
prop: 'maintainOrderNumber',
|
||||
@ -182,14 +182,16 @@ export default {
|
||||
filter: (val) =>
|
||||
val != null ? ['-', '计划型', '非计划型'][val] : '-',
|
||||
},
|
||||
{
|
||||
prop: '_detail',
|
||||
label: '详情',
|
||||
entryText: '详情',
|
||||
minWidth: 60,
|
||||
subcomponent: TableBtn,
|
||||
},
|
||||
],
|
||||
this.$auth.hasPermi('equipment:maintain-record:query')
|
||||
? {
|
||||
prop: '_detail',
|
||||
label: '详情',
|
||||
entryText: '详情',
|
||||
minWidth: 60,
|
||||
subcomponent: TableBtn,
|
||||
}
|
||||
: '',
|
||||
].filter((v) => v),
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
@ -222,10 +224,12 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:maintain-record:export')
|
||||
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
|
@ -88,19 +88,19 @@ export default {
|
||||
'specialType',
|
||||
],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('se:repair:finish')
|
||||
this.$auth.hasPermi('equipment:repair:finish')
|
||||
? {
|
||||
type: 'finish',
|
||||
btnName: '完成',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:repair:update')
|
||||
this.$auth.hasPermi('equipment:repair:query')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('se:repair:delete')
|
||||
this.$auth.hasPermi('equipment:repair:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -212,17 +212,31 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: '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('se:repair:export') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:repair:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:repair:create',
|
||||
'base:core-worker:query',
|
||||
'system:user:list',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
plain: true,
|
||||
|
@ -147,10 +147,25 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: '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('se:maintain-record-pre:create')
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:maintain-record:create',
|
||||
'base:core-worker:query',
|
||||
'base:core-production-line:query',
|
||||
'base:core-department:query',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
@ -159,7 +174,7 @@ export default {
|
||||
color: 'success',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:maintain-record-pre:confirm-all')
|
||||
type: this.$auth.hasPermi('equipment:maintain-record:update')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '批量确认',
|
||||
@ -168,7 +183,7 @@ export default {
|
||||
plain: true,
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('se:maintain-record-pre:export')
|
||||
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
|
@ -144,7 +144,7 @@
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
v-if="$auth.hasPermi('se:maintain-record-pre:confirm')"
|
||||
v-if="$auth.hasPermi('equipment:maintain-record:update')"
|
||||
content="确认"
|
||||
placement="top">
|
||||
<el-button
|
||||
@ -158,11 +158,11 @@
|
||||
<!-- line -->
|
||||
<span
|
||||
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
|
||||
v-if="$auth.hasPermi('se:maintain-record-pre:update')">
|
||||
v-if="$auth.hasPermi('equipment:maintain-record:query')">
|
||||
|
|
||||
</span>
|
||||
<el-tooltip
|
||||
v-if="$auth.hasPermi('se:maintain-record-pre:update')"
|
||||
v-if="$auth.hasPermi('equipment:maintain-record:query')"
|
||||
content="查看详情"
|
||||
placement="top">
|
||||
<el-button
|
||||
@ -175,11 +175,29 @@
|
||||
<!-- line -->
|
||||
<span
|
||||
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
|
||||
v-if="$auth.hasPermi('se:maintain-record-pre:update')">
|
||||
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',
|
||||
])
|
||||
">
|
||||
|
|
||||
</span>
|
||||
<el-tooltip
|
||||
v-if="$auth.hasPermi('se:maintain-record-pre:update')"
|
||||
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
|
||||
@ -190,8 +208,13 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- line -->
|
||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<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
|
||||
|
Loading…
Reference in New Issue
Block a user