|
@@ -47,12 +47,9 @@ function onOcEdit(row: any) {
|
|
|
|
|
|
|
|
function onOcDel(row: any) {
|
|
function onOcDel(row: any) {
|
|
|
ElMessageBox.confirm(`确认删除「${row.ocName}」吗?`, '确认信息').then(async () => {
|
|
ElMessageBox.confirm(`确认删除「${row.ocName}」吗?`, '确认信息').then(async () => {
|
|
|
- await deleteOcById(row.ocId)
|
|
|
|
|
|
|
+ const { msg } = await deleteOcById(row.ocId)
|
|
|
|
|
+ ElMessage.success(msg)
|
|
|
await getDataList()
|
|
await getDataList()
|
|
|
- ElMessage.success({
|
|
|
|
|
- message: '删除成功',
|
|
|
|
|
- center: true,
|
|
|
|
|
- })
|
|
|
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -71,22 +68,21 @@ function onAdminEdit(row: any) {
|
|
|
|
|
|
|
|
// 状态变更
|
|
// 状态变更
|
|
|
const onStatusChange = async (status: number, row: { ocId: number }) => {
|
|
const onStatusChange = async (status: number, row: { ocId: number }) => {
|
|
|
- await updateStatus(row.ocId, status)
|
|
|
|
|
|
|
+ const { msg } = await updateStatus(row.ocId, status)
|
|
|
|
|
+ ElMessage.success(msg)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// license状态变更
|
|
// license状态变更
|
|
|
const onLicStatusChange = async (status: number, row: { ocId: number }) => {
|
|
const onLicStatusChange = async (status: number, row: { ocId: number }) => {
|
|
|
- await updateLicStatus(row.ocId, status)
|
|
|
|
|
|
|
+ const { msg } = await updateLicStatus(row.ocId, status)
|
|
|
|
|
+ ElMessage.success(msg)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function onPasswordReset(row: { ocId: number; adminId: number; adminName: string }) {
|
|
function onPasswordReset(row: { ocId: number; adminId: number; adminName: string }) {
|
|
|
ElMessageBox.confirm(`确认删除「${row.adminName}」吗?`, '确认信息').then(async () => {
|
|
ElMessageBox.confirm(`确认删除「${row.adminName}」吗?`, '确认信息').then(async () => {
|
|
|
const { ocId, adminId } = row
|
|
const { ocId, adminId } = row
|
|
|
- await resetAdminPwd(ocId, adminId)
|
|
|
|
|
- ElMessage.success({
|
|
|
|
|
- message: '删除成功',
|
|
|
|
|
- center: true,
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const { msg } = await resetAdminPwd(ocId, adminId)
|
|
|
|
|
+ ElMessage.success(msg)
|
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -161,14 +157,14 @@ function onPasswordReset(row: { ocId: number; adminId: number; adminName: string
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div v-if="scope.row.isFixed !== 1">
|
|
<div v-if="scope.row.isFixed !== 1">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- v-model="scope.row.status"
|
|
|
|
|
|
|
+ v-model="scope.row.ifLic"
|
|
|
:active-value="1"
|
|
:active-value="1"
|
|
|
- :inactive-value="2"
|
|
|
|
|
|
|
+ :inactive-value="0"
|
|
|
:loading="scope.row.loading"
|
|
:loading="scope.row.loading"
|
|
|
inline-prompt
|
|
inline-prompt
|
|
|
active-text="启用"
|
|
active-text="启用"
|
|
|
inactive-text="禁用"
|
|
inactive-text="禁用"
|
|
|
- @change="(status) => onStatusChange(scope.row.status, scope.row)"
|
|
|
|
|
|
|
+ @change="(status) => onLicStatusChange(scope.row.status, scope.row)"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -178,14 +174,14 @@ function onPasswordReset(row: { ocId: number; adminId: number; adminName: string
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div v-if="scope.row.isFixed !== 1">
|
|
<div v-if="scope.row.isFixed !== 1">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- v-model="scope.row.licStatus"
|
|
|
|
|
|
|
+ v-model="scope.row.status"
|
|
|
:active-value="1"
|
|
:active-value="1"
|
|
|
- :inactive-value="2"
|
|
|
|
|
|
|
+ :inactive-value="0"
|
|
|
:loading="scope.row.loading"
|
|
:loading="scope.row.loading"
|
|
|
inline-prompt
|
|
inline-prompt
|
|
|
active-text="启用"
|
|
active-text="启用"
|
|
|
inactive-text="禁用"
|
|
inactive-text="禁用"
|
|
|
- @change="(status) => onLicStatusChange(scope.row.status, scope.row)"
|
|
|
|
|
|
|
+ @change="(status) => onStatusChange(scope.row.status, scope.row)"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|