上传
This commit is contained in:
@@ -190,8 +190,10 @@
|
||||
<el-table-column label="启用" width="100">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.showInMap"
|
||||
:disabled="checkPermi(['school:place:update'])"
|
||||
v-model="scope.row.status"
|
||||
:active-value="0"
|
||||
:inactive-value="1"
|
||||
:disabled="!checkPermi(['school:place:update'])"
|
||||
@change="changePlaceStatus(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
@@ -531,11 +533,21 @@ function closePlaceList() {
|
||||
fullScreenPlaceList.value = false
|
||||
}
|
||||
|
||||
async function changePlaceStatus() {
|
||||
// const resp = await updatePlace(item);
|
||||
// if (resp.code == 200) {
|
||||
resetMarkers()
|
||||
// }
|
||||
async function changePlaceStatus(row) {
|
||||
try {
|
||||
// 修改状态的二次确认
|
||||
const text = row.status == 0 ? '启用' : '停用'
|
||||
await message.confirm('确认要"' + text + '""' + row.name + '"场地吗?')
|
||||
// 发起修改状态
|
||||
await PlaceApi.updatePlaceStatus({ placeId: row.placeId, status: row.status })
|
||||
message.success('修改成功')
|
||||
// 刷新列表
|
||||
// await getList()
|
||||
resetMarkers()
|
||||
} catch {
|
||||
// 取消后,进行恢复按钮
|
||||
row.status = row.status == 0 ? 1 : 0
|
||||
}
|
||||
}
|
||||
|
||||
// const isRanging = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user