|
@@ -75,8 +75,10 @@
|
|
|
<script>
|
|
<script>
|
|
|
import MaintenanceSearch from './components/maintenance-search.vue';
|
|
import MaintenanceSearch from './components/maintenance-search.vue';
|
|
|
import DetailDialog from './components/detailDialog.vue';
|
|
import DetailDialog from './components/detailDialog.vue';
|
|
|
- import { pageRoles } from '@/api/system/role';
|
|
|
|
|
|
|
+ import { getPlanList , removePlan } from '@/api/maintenance/repair_report';
|
|
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ mixins: [dictMixins],
|
|
|
components: {
|
|
components: {
|
|
|
MaintenanceSearch,
|
|
MaintenanceSearch,
|
|
|
DetailDialog
|
|
DetailDialog
|
|
@@ -102,50 +104,31 @@
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'groupId',
|
|
|
|
|
|
|
+ prop: 'name',
|
|
|
label: '计划名称',
|
|
label: '计划名称',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'enable',
|
|
|
|
|
- label: '计划规则',
|
|
|
|
|
|
|
+ prop: 'number',
|
|
|
|
|
+ label: '报修设备数量',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- slot: 'enable',
|
|
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'name',
|
|
|
|
|
- label: '设备分类',
|
|
|
|
|
|
|
+ prop: 'planStatus',
|
|
|
|
|
+ label: '状态',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'cycle',
|
|
|
|
|
- label: '设备性质',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ return this.getDictValue('维修计划状态', _row.planStatus);
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- prop: 'auto',
|
|
|
|
|
- label: '状态',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'status',
|
|
|
|
|
- label: '审批人',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
- prop: 'creater',
|
|
|
|
|
|
|
+ prop: 'executor',
|
|
|
label: '创建人',
|
|
label: '创建人',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
@@ -153,7 +136,7 @@
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'createTime',
|
|
prop: 'createTime',
|
|
|
- label: '生成时间',
|
|
|
|
|
|
|
+ label: '创建时间',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
minWidth: 110,
|
|
@@ -184,10 +167,13 @@
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ created () {
|
|
|
|
|
+ this.requestDict('维修计划状态')
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where, order }) {
|
|
datasource({ page, limit, where, order }) {
|
|
|
- return pageRoles({ pageNum: page, size: limit, ...where });
|
|
|
|
|
|
|
+ return getPlanList({ pageNum: page, size: limit, ...where });
|
|
|
},
|
|
},
|
|
|
async changeEnable(row) {
|
|
async changeEnable(row) {
|
|
|
const res = await putRoles(row);
|
|
const res = await putRoles(row);
|
|
@@ -222,7 +208,10 @@
|
|
|
},
|
|
},
|
|
|
// 撤销
|
|
// 撤销
|
|
|
cancel(row){
|
|
cancel(row){
|
|
|
-
|
|
|
|
|
|
|
+ removePlan([row.id]).then(res=>{
|
|
|
|
|
+ this.$message.success('撤销成功!')
|
|
|
|
|
+ this.reload()
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|