|
@@ -107,12 +107,24 @@
|
|
|
confirm: handleDownloadScene.bind(null, record),
|
|
confirm: handleDownloadScene.bind(null, record),
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ tooltip: t('routes.scenes.migrate'),
|
|
|
|
|
+ disabled: record.status != -2,
|
|
|
|
|
+ ifShow: record.isDel,
|
|
|
|
|
+ icon: 'carbon:migrate',
|
|
|
|
|
+ onClick: handleMigrate.bind(null, record),
|
|
|
|
|
+ },
|
|
|
]"
|
|
]"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
</BasicTable>
|
|
</BasicTable>
|
|
|
<DownloadModal @register="registerDownloadModal" />
|
|
<DownloadModal @register="registerDownloadModal" />
|
|
|
<AssistantModal @register="registerAssistantModal" @success="reload" />
|
|
<AssistantModal @register="registerAssistantModal" @success="reload" />
|
|
|
|
|
+ <MigrateModal
|
|
|
|
|
+ @register="registerMigrateModal"
|
|
|
|
|
+ @success="handleMigrateSuccess"
|
|
|
|
|
+ @cancel="handleMigrateCancel"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</PageWrapper>
|
|
</PageWrapper>
|
|
|
</template>
|
|
</template>
|
|
@@ -131,12 +143,7 @@
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import { Tabs } from 'ant-design-vue';
|
|
import { Tabs } from 'ant-design-vue';
|
|
|
- // import { sceneDetail, buildSceneObj } from '/@/api/lastApi/index';
|
|
|
|
|
- // import { Progress } from 'ant-design-vue';
|
|
|
|
|
- // import { h } from 'vue';
|
|
|
|
|
- // addDownloadNumApi,
|
|
|
|
|
- // checkDownloadApi,
|
|
|
|
|
- // generateSceneEditTokenApi,
|
|
|
|
|
|
|
+
|
|
|
import {
|
|
import {
|
|
|
ListApi,
|
|
ListApi,
|
|
|
downloadSceneDataAPi,
|
|
downloadSceneDataAPi,
|
|
@@ -163,6 +170,7 @@
|
|
|
import { SceneDownloadParam } from '/@/api/scene/model';
|
|
import { SceneDownloadParam } from '/@/api/scene/model';
|
|
|
import { RoleEnum } from '/@/enums/roleEnum';
|
|
import { RoleEnum } from '/@/enums/roleEnum';
|
|
|
import { onMounted } from 'vue';
|
|
import { onMounted } from 'vue';
|
|
|
|
|
+ import MigrateModal from './migrateModal.vue';
|
|
|
|
|
|
|
|
const localeStore = useLocaleStore();
|
|
const localeStore = useLocaleStore();
|
|
|
console.log('localeStore', localeStore);
|
|
console.log('localeStore', localeStore);
|
|
@@ -178,6 +186,7 @@
|
|
|
DownloadModal,
|
|
DownloadModal,
|
|
|
AssistantModal,
|
|
AssistantModal,
|
|
|
PageWrapper,
|
|
PageWrapper,
|
|
|
|
|
+ MigrateModal,
|
|
|
[Tabs.name]: Tabs,
|
|
[Tabs.name]: Tabs,
|
|
|
[Tabs.TabPane.name]: Tabs.TabPane,
|
|
[Tabs.TabPane.name]: Tabs.TabPane,
|
|
|
},
|
|
},
|
|
@@ -196,6 +205,7 @@
|
|
|
const { createMessage, createConfirm } = useMessage();
|
|
const { createMessage, createConfirm } = useMessage();
|
|
|
const [registerDownloadModal, { openModal: openDownloadModal }] = useModal();
|
|
const [registerDownloadModal, { openModal: openDownloadModal }] = useModal();
|
|
|
const [registerAssistantModal, { openModal: openAssistantModal }] = useModal();
|
|
const [registerAssistantModal, { openModal: openAssistantModal }] = useModal();
|
|
|
|
|
+ const [registerMigrateModal, { openModal: openMigrateModal }] = useModal();
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
|
const tableType = ref<Number>(0); //0看看 、1看见、2深时
|
|
const tableType = ref<Number>(0); //0看看 、1看见、2深时
|
|
@@ -483,8 +493,8 @@
|
|
|
if (keys.length > 0) {
|
|
if (keys.length > 0) {
|
|
|
createConfirm({
|
|
createConfirm({
|
|
|
iconType: 'warning',
|
|
iconType: 'warning',
|
|
|
- title: () => h('span', '批量归档'),
|
|
|
|
|
- content: () => h('span', '是否确定?'),
|
|
|
|
|
|
|
+ title: () => h('span', t('routes.archive.patchArchive')),
|
|
|
|
|
+ content: () => h('span', t('common.isConfirm')),
|
|
|
onOk: async () => {
|
|
onOk: async () => {
|
|
|
try {
|
|
try {
|
|
|
await patchcoldStorageApi({
|
|
await patchcoldStorageApi({
|
|
@@ -512,6 +522,23 @@
|
|
|
tableHeight.value = window.innerHeight - 390;
|
|
tableHeight.value = window.innerHeight - 390;
|
|
|
// reload();
|
|
// reload();
|
|
|
});
|
|
});
|
|
|
|
|
+ const handleMigrate = (record: Recordable) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ console.log('record', record);
|
|
|
|
|
+ openMigrateModal(true, {
|
|
|
|
|
+ tableType: tableType.value,
|
|
|
|
|
+ sceneNum: [record.num],
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.log('error', error);
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ const handleMigrateSuccess = () => {
|
|
|
|
|
+ reload();
|
|
|
|
|
+ };
|
|
|
|
|
+ const handleMigrateCancel = () => {
|
|
|
|
|
+ reload();
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
reload,
|
|
reload,
|
|
@@ -537,6 +564,10 @@
|
|
|
isPatchAuth,
|
|
isPatchAuth,
|
|
|
handleFetchSuccess,
|
|
handleFetchSuccess,
|
|
|
tableHeight,
|
|
tableHeight,
|
|
|
|
|
+ registerMigrateModal,
|
|
|
|
|
+ handleMigrate,
|
|
|
|
|
+ handleMigrateSuccess,
|
|
|
|
|
+ handleMigrateCancel,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|