|
|
|
@ -27,7 +27,7 @@ const [registerUpdateModal, { openModal: openUpdateModal }] = useModal() |
|
|
|
const [registerTable, { getForm, reload, getDataSource, updateTableDataRecord }] = useTable({ |
|
|
|
title: '实例列表', |
|
|
|
api: getInstantPage, |
|
|
|
rowKey: 'id', |
|
|
|
rowKey: 'mpId', |
|
|
|
immediate: true, |
|
|
|
columns, |
|
|
|
formConfig: { |
|
|
|
@ -52,7 +52,7 @@ const [registerTable, { getForm, reload, getDataSource, updateTableDataRecord }] |
|
|
|
|
|
|
|
function handleDetail(record) { |
|
|
|
console.log(record) |
|
|
|
router.push(`/run/instant/detail?id=${record.id}`) |
|
|
|
router.push(`/run/instant/detail?mpId=${record.mpId}`) |
|
|
|
} |
|
|
|
|
|
|
|
async function updateStatus(record) { |
|
|
|
@ -72,7 +72,7 @@ function handleEdit(record: Recordable) { |
|
|
|
openUpdateModal(true, { record, isUpdate: true }) |
|
|
|
} |
|
|
|
async function handleDelete(record: Recordable) { |
|
|
|
await deleteInstant(record.id) |
|
|
|
await deleteInstant(record.mpId) |
|
|
|
createMessage.success(t('common.delSuccessText')) |
|
|
|
reload() |
|
|
|
} |
|
|
|
@ -140,7 +140,7 @@ async function getNow() { |
|
|
|
} |
|
|
|
|
|
|
|
function handleWarnConfig(record: Recordable) { |
|
|
|
router.push(`/run/instant/warn/config?id=${record.id}`) |
|
|
|
router.push(`/run/instant/warn/config?mpId=${record.mpId}`) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
@ -217,7 +217,7 @@ function handleWarnConfig(record: Recordable) { |
|
|
|
<!-- </template>--> |
|
|
|
<template #status="{ record }"> |
|
|
|
<Switch |
|
|
|
v-model:checked="record.status" :checked-value="1" :un-checked-value="0" checked-children="开" |
|
|
|
v-model:checked="record.instantStatus" :checked-value="1" :un-checked-value="0" checked-children="开" |
|
|
|
un-checked-children="关" @change="updateStatus(record)" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
|