| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleDetail(row)">查看详情</el-button> |
| | | <el-button type="text" @click="cancelById(row)" v-permissions="['business:ywpatroltask:delete']">取消</el-button> |
| | | <el-button v-if="row.status == 0" type="text" class="red" @click="cancelById(row)" v-permissions="['business:ywpatroltask:delete']">取消</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import TaskDetail from './components/taskDetail' |
| | | import { cancelById } from '@/api/Inspection/ywPatrolTask' |
| | | import { Message } from 'element-ui' |
| | | export default { |
| | | name: 'YwPatrolTask', |
| | | extends: BaseTable, |
| | |
| | | this.$refs.TaskDetailRef.id = row.id |
| | | this.$refs.TaskDetailRef.getDetail() |
| | | }, |
| | | cancelById() { |
| | | |
| | | cancelById(row) { |
| | | this.$confirm('确定取消当前任务, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | cancelById(row.id).then(res => { |
| | | Message.success('取消成功') |
| | | this.search() |
| | | }) |
| | | }) |
| | | // |
| | | }, |
| | | } |
| | | } |