|
@@ -38,12 +38,12 @@
|
|
|
label: t('routes.scenes.jointVisit'),
|
|
|
onClick: handleLivestream.bind(null, record),
|
|
|
},
|
|
|
- // {
|
|
|
- // // icon: 'dashicons:editor-kitchensink',
|
|
|
- // color: 'error',
|
|
|
- // label: t('routes.scenes.makeLiveCover'),
|
|
|
- // onClick: openSceneEditor.bind(null, record),
|
|
|
- // },
|
|
|
+ {
|
|
|
+ // icon: 'dashicons:editor-kitchensink',
|
|
|
+ color: 'error',
|
|
|
+ label: t('routes.scenes.delete'),
|
|
|
+ onClick: handleDelete.bind(null, record),
|
|
|
+ },
|
|
|
// {
|
|
|
// // icon: 'dashicons:editor-kitchensink',
|
|
|
// color: 'error',
|
|
@@ -80,6 +80,7 @@
|
|
|
downloadSceneDataAPi,
|
|
|
addDownloadNumApi,
|
|
|
checkDownloadApi,
|
|
|
+ DeleteApi,
|
|
|
} from '/@/api/scene/list';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
import {
|
|
@@ -167,7 +168,7 @@
|
|
|
title: t('common.operation'),
|
|
|
dataIndex: '',
|
|
|
slots: { customRender: 'action' },
|
|
|
- width: isJA.value ? 350 : 220,
|
|
|
+ width: isJA.value ? 410 : 260,
|
|
|
fixed: 'right',
|
|
|
},
|
|
|
];
|
|
@@ -214,7 +215,7 @@
|
|
|
],
|
|
|
};
|
|
|
// { getForm }
|
|
|
- const [registerTable] = useTable({
|
|
|
+ const [registerTable, { reload }] = useTable({
|
|
|
title: t('routes.scenes.sceneList'),
|
|
|
api: ListApi,
|
|
|
columns: columns,
|
|
@@ -258,7 +259,12 @@
|
|
|
console.log('error', error);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ async function handleDelete(record: Recordable) {
|
|
|
+ console.log('DeleteApi', record);
|
|
|
+ await DeleteApi(record.num);
|
|
|
+ createMessage.success(t('common.optSuccess'));
|
|
|
+ reload();
|
|
|
+ }
|
|
|
async function handleDownloadScene(record: Recordable) {
|
|
|
await addDownloadNumApi({
|
|
|
sceneNum: record.num,
|
|
@@ -287,6 +293,7 @@
|
|
|
t,
|
|
|
openSceneEditor,
|
|
|
handleDownloadScene,
|
|
|
+ handleDelete,
|
|
|
handleLivestream,
|
|
|
registerDownloadModal,
|
|
|
};
|