驾校联调
This commit is contained in:
@@ -33,18 +33,18 @@
|
||||
v-model="row.status"
|
||||
:active-value="0"
|
||||
:inactive-value="1"
|
||||
:disabled="checkPermi(['school:school:update'])"
|
||||
:disabled="!checkPermi(['school:school:update'])"
|
||||
@change="changeStatus(row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="" />
|
||||
<el-table-column label="创建时间" prop="createTime" :formatter="dateFormatter" />
|
||||
<el-table-column fixed="right" label="操作" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm(update, row)"
|
||||
@click="openForm(update, row.schoolId)"
|
||||
v-hasPermi="['school:school:update']"
|
||||
>
|
||||
修改
|
||||
@@ -52,7 +52,7 @@
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(row.id)"
|
||||
@click="handleDelete(row.schoolId)"
|
||||
v-hasPermi="['school:school:delete']"
|
||||
>
|
||||
删除
|
||||
@@ -75,8 +75,11 @@
|
||||
import DialogSchool from './Comp/DialogSchool.vue'
|
||||
import * as api from '@/api/school/sch'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const searchForm = ref({
|
||||
schoolName: '',
|
||||
@@ -119,12 +122,12 @@ function openForm(type, row = null) {
|
||||
schoolDialog.value.open(type, row)
|
||||
}
|
||||
|
||||
async function handleDelete(row) {
|
||||
async function handleDelete(id) {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await api.deleteSchool(row.id)
|
||||
await api.deleteSchool(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
|
||||
Reference in New Issue
Block a user