|
@@ -144,7 +144,9 @@
|
|
|
<template>
|
|
|
<a @click="handleView(record)">查看</a>
|
|
|
<a-divider type="vertical"/>
|
|
|
- <a @click="handleViewCheckJob(record)">保养任务</a>
|
|
|
+ <!-- <a @click="handleViewCheckJob(record)">保养任务</a>-->
|
|
|
+ <a v-if="record.isGet==1" @click="handleViewCheckJob(record)">保养任务</a>
|
|
|
+ <a v-if="record.isGet==0" @click="addBYTask(record)">生成保养任务</a>
|
|
|
<a-divider type="vertical"/>
|
|
|
<a v-if="($auth('check-spot-standards-edit')||$auth('check-polling-standards-edit'))" @click="handleEdit(record)">修改</a>
|
|
|
<a-divider type="vertical"/>
|
|
@@ -177,7 +179,8 @@ import {
|
|
|
deleteCheckStandards,
|
|
|
updateCheckStandardNo,
|
|
|
fetchCheckStandard,
|
|
|
- exportCheckStandard
|
|
|
+ exportCheckStandard,
|
|
|
+ addBYTask
|
|
|
} from '@/api/check/checkstandard'
|
|
|
import DetailStandardCheckJob from '@/views/check/checkjob/modules/DetailStandardCheckJob'
|
|
|
import { fetchSbTypeTree } from '@/api/sb/type'
|
|
@@ -357,6 +360,11 @@ export default {
|
|
|
this.tableOption()
|
|
|
},
|
|
|
methods: {
|
|
|
+ addBYTask (record) {
|
|
|
+ addBYTask({ id: record.id }).then(res => {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ })
|
|
|
+ },
|
|
|
tableOption () {
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|