|
|
@@ -61,11 +61,11 @@
|
|
|
disabled: record.status != -2,
|
|
|
onClick: handleCopy.bind(null, record),
|
|
|
},
|
|
|
- //{
|
|
|
- // label: t('routes.scenes.jointVisit'),
|
|
|
- // ifShow: record.isUpgrade != 1,
|
|
|
- // onClick: handleLivestream.bind(null, record),
|
|
|
- //},
|
|
|
+ {
|
|
|
+ label: t('routes.scenes.creatobj'),
|
|
|
+ ifShow: record.status == -2 && tableType == 2,
|
|
|
+ onClick: handleGenerate.bind(null, record),
|
|
|
+ },
|
|
|
{
|
|
|
// icon: 'dashicons:editor-kitchensink',
|
|
|
color: 'error',
|
|
|
@@ -106,7 +106,7 @@
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import { Tabs } from 'ant-design-vue';
|
|
|
- // import { uploadApi } from '/@/api/sys/upload';
|
|
|
+ import { sceneDetail, buildSceneObj } from '/@/api/lastApi/index';
|
|
|
// import { Progress } from 'ant-design-vue';
|
|
|
// import { h } from 'vue';
|
|
|
// addDownloadNumApi,
|
|
|
@@ -287,6 +287,33 @@
|
|
|
return T;
|
|
|
},
|
|
|
});
|
|
|
+ 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}`));
|
|
|
+ }
|
|
|
+ }
|
|
|
function handleLivestream(item) {
|
|
|
let url = item.webSite;
|
|
|
let page = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.html'));
|
|
|
@@ -373,6 +400,7 @@
|
|
|
registerTable,
|
|
|
createMessage,
|
|
|
t,
|
|
|
+ handleGenerate,
|
|
|
openSceneEditor,
|
|
|
handleDownloadScene,
|
|
|
handleDelete,
|