|
|
@@ -129,7 +129,7 @@
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import { Tabs } from 'ant-design-vue';
|
|
|
- import { sceneDetail, buildSceneObj } from '/@/api/lastApi/index';
|
|
|
+ // import { sceneDetail, buildSceneObj } from '/@/api/lastApi/index';
|
|
|
// import { Progress } from 'ant-design-vue';
|
|
|
// import { h } from 'vue';
|
|
|
// addDownloadNumApi,
|
|
|
@@ -144,6 +144,7 @@
|
|
|
UpgradeToV4,
|
|
|
sceneCopy,
|
|
|
patchcoldStorageApi,
|
|
|
+ generateObjFileAPI,
|
|
|
} from '/@/api/scene/list';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
import {
|
|
|
@@ -344,31 +345,31 @@
|
|
|
},
|
|
|
});
|
|
|
async function handleGenerate(record: Recordable) {
|
|
|
- let { data } = await sceneDetail({ id: record.id });
|
|
|
- let { buildObjStatus } = data.data;
|
|
|
- let toastText =
|
|
|
- buildObjStatus == 2
|
|
|
- ? t('routes.scenes.objTips.Modifying')
|
|
|
- : buildObjStatus == 1
|
|
|
- ? t('routes.scenes.objTips.coverData')
|
|
|
- : t('routes.scenes.objTips.updateSuccess');
|
|
|
- console.log('buildObjStatus', data);
|
|
|
- if (data.code === 200) {
|
|
|
- createConfirm({
|
|
|
- iconType: 'warning',
|
|
|
- title: () => h('span', t('routes.scenes.creatobj')),
|
|
|
- content: () => h('span', toastText),
|
|
|
- onOk: async () => {
|
|
|
- if (buildObjStatus !== 2) {
|
|
|
- await buildSceneObj({ id: record.id });
|
|
|
- }
|
|
|
- createMessage.success(t('common.optSuccess'));
|
|
|
- reload();
|
|
|
- },
|
|
|
- });
|
|
|
- } else {
|
|
|
- createMessage.error(t(`apiCode.errCode${data.code}`));
|
|
|
- }
|
|
|
+ await generateObjFileAPI({ num: record.num });
|
|
|
+ createMessage.success(t('common.optSuccess'));
|
|
|
+ reload();
|
|
|
+ // let toastText =
|
|
|
+ // buildObjStatus == 2
|
|
|
+ // ? t('routes.scenes.objTips.Modifying')
|
|
|
+ // : buildObjStatus == 1
|
|
|
+ // ? t('routes.scenes.objTips.coverData')
|
|
|
+ // : t('routes.scenes.objTips.updateSuccess');
|
|
|
+ // console.log('buildObjStatus', data);
|
|
|
+ // if (data.code === 200) {
|
|
|
+ // createConfirm({
|
|
|
+ // iconType: 'warning',
|
|
|
+ // title: () => h('span', t('routes.scenes.creatobj')),
|
|
|
+ // content: () => h('span', toastText),
|
|
|
+ // onOk: async () => {
|
|
|
+ // if (buildObjStatus !== 2) {
|
|
|
+ // await buildSceneObj({ id: record.id });
|
|
|
+ // }
|
|
|
+
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // createMessage.error(t(`apiCode.errCode${data.code}`));
|
|
|
+ // }
|
|
|
}
|
|
|
function handleLivestream(item) {
|
|
|
let url = item.webSite;
|