From 6bd7d8d56d0671e1251e6ae6eef9a16ea5ce2253 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 05 十二月 2024 18:48:42 +0800
Subject: [PATCH] 开发更新
---
admin/src/views/Inspection/path.vue | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/admin/src/views/Inspection/path.vue b/admin/src/views/Inspection/path.vue
index 4854c6b..03a0a18 100644
--- a/admin/src/views/Inspection/path.vue
+++ b/admin/src/views/Inspection/path.vue
@@ -17,8 +17,8 @@
<ul class="toolbar" v-permissions="['business:ywpatrolline:create', 'business:ywpatrolline:delete']">
<li><el-button type="primary" @click="editClick()" icon="el-icon-plus"
v-permissions="['business:ywpatrolline:create']">鏂板缓</el-button></li>
- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete"
- v-permissions="['business:ywpatrolline:delete']">鍒犻櫎</el-button></li>
+ <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete"
+ v-permissions="['business:ywpatrolline:delete']">鍒犻櫎</el-button></li> -->
</ul>
<el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
@@ -26,7 +26,7 @@
<el-table-column prop="lineAmount" label="宸℃鐐规暟閲�" min-width="100px"></el-table-column>
<el-table-column prop="status" label="鐘舵��" min-width="100px">
<template v-slot="scope">
- <el-switch v-model="scope.row.status" @change="changeStatus" active-value="0" inactive-value="1">
+ <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" :inactive-value="1">
</el-switch>
</template>
</el-table-column>
@@ -53,6 +53,8 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaYwPatrolLineWindow from './components/OperaYwPatrolLineWindow'
+import { updateStatusById } from '@/api/Inspection/ywPatrolLine'
+import { Message } from 'element-ui'
export default {
name: 'YwPatrolLine',
extends: BaseTable,
@@ -85,15 +87,25 @@
this.search()
},
methods: {
- changeStatus() {
-
+ changeStatus(row) {
+ updateStatusById({
+ id: row.id,
+ status: row.status
+ }).then(res => {
+ Message.success('鏇存柊鎴愬姛')
+ this.search()
+ }, () => {
+ this.search()
+ })
},
editClick(row) {
if (row && row.id) {
this.$refs.operaYwPatrolLineWindow.open('缂栬緫宸℃绾胯矾')
+ this.$refs.operaYwPatrolLineWindow.getDetail(row)
} else {
this.$refs.operaYwPatrolLineWindow.open('鏂板缓宸℃绾胯矾')
}
+ this.$refs.operaYwPatrolLineWindow.list = []
this.$refs.operaYwPatrolLineWindow.initData()
},
--
Gitblit v1.9.3