|
@@ -1,33 +1,131 @@
|
|
<template>
|
|
<template>
|
|
- <BasicTable @register="registerTable">
|
|
|
|
- <template #toolbar>
|
|
|
|
- <!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
|
|
|
|
|
|
+ <PageWrapper contentBackground>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <a-tabs v-model:activeKey="tableType">
|
|
|
|
+ <a-tab-pane :key="0" tab="用户作品" />
|
|
|
|
+ <a-tab-pane :key="1" tab="看见全景VR" />
|
|
|
|
+ </a-tabs>
|
|
</template>
|
|
</template>
|
|
- <template #href="{ record }">
|
|
|
|
- <a v-if="record.name" target="_blank" :href="record.share">{{record.name}}</a>
|
|
|
|
|
|
+ <div class="desc-wrap-BasicTable">
|
|
|
|
+ <BasicTable v-if="tableType == 0" @register="registerTable">
|
|
|
|
+ <template #toolbar>
|
|
|
|
+ <!-- <a-button type="primary" @click="handleMoveAll"> 批量迁移</a-button> -->
|
|
|
|
+ </template>
|
|
|
|
+ <template #href="{ record }">
|
|
|
|
+ <a v-if="record.name" target="_blank" :href="record.share">{{ record.name }}</a>
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
- </template>
|
|
|
|
- <template #action="{ record }">
|
|
|
|
- <TableAction
|
|
|
|
- stopButtonPropagation
|
|
|
|
- :actions="[
|
|
|
|
- {
|
|
|
|
- label: '删除',
|
|
|
|
- color: 'error',
|
|
|
|
- ifShow:getCheckPerm('projects-delete'),
|
|
|
|
- popConfirm: {
|
|
|
|
- title: '是否删除?',
|
|
|
|
- confirm: handleDelete.bind(null, record),
|
|
|
|
- placement: 'topLeft',
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- ]"
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
- </BasicTable>
|
|
|
|
|
|
+ </template>
|
|
|
|
+ <template #action="{ record }">
|
|
|
|
+ <TableAction
|
|
|
|
+ stopButtonPropagation
|
|
|
|
+ :actions="[
|
|
|
|
+ {
|
|
|
|
+ label: '删除',
|
|
|
|
+ color: 'error',
|
|
|
|
+ ifShow: getCheckPerm('projects-delete'),
|
|
|
|
+ popConfirm: {
|
|
|
|
+ title: '是否删除?',
|
|
|
|
+ confirm: handleDelete.bind(null, record),
|
|
|
|
+ placement: 'topLeft',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </BasicTable>
|
|
|
|
+ <BasicTable v-else @register="registerTableScene" ref="tableRef">
|
|
|
|
+ <template #toolbar>
|
|
|
|
+ <a-button type="primary" @click="handleMoveAll"> 批量迁移</a-button>
|
|
|
|
+ </template>
|
|
|
|
+ <template #status="{ record }">
|
|
|
|
+ <span v-if="record.status != '-1'">{{ record.statusString }}</span>
|
|
|
|
+ <Tooltip v-else placement="right">
|
|
|
|
+ <template #title>
|
|
|
|
+ <span>失败原因:{{ record.buildErrorReason }}</span>
|
|
|
|
+ <p>
|
|
|
|
+ <span>serverPath:{{ record.dataSource }}</span>
|
|
|
|
+ </p>
|
|
|
|
+ </template>
|
|
|
|
+ <span
|
|
|
|
+ >{{ record.statusString }}
|
|
|
|
+ <Icon icon="mdi:warning-octagon-outline" />
|
|
|
|
+ </span>
|
|
|
|
+ </Tooltip>
|
|
|
|
+ </template>
|
|
|
|
+ <template #href="{ record }">
|
|
|
|
+ <a
|
|
|
|
+ v-if="record.sceneName && record.thumb"
|
|
|
|
+ target="_blank"
|
|
|
|
+ :href="record.webSite || record.thumb"
|
|
|
|
+ >{{ record.sceneName }}</a
|
|
|
|
+ >
|
|
|
|
+ <span v-else-if="record.sceneName">{{ record.sceneName }}</span>
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template #action="{ record }">
|
|
|
|
+ <TableAction
|
|
|
|
+ stopButtonPropagation
|
|
|
|
+ :actions="[
|
|
|
|
+ {
|
|
|
|
+ label: '迁移',
|
|
|
|
+ disabled: !(record.status == 1 || record.status == -2),
|
|
|
|
+ ifShow: getTypeCheckPerm('scenes-move') && tableType != 3,
|
|
|
|
+ onClick: handleMove.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '优先级',
|
|
|
|
+ ifShow: getTypeCheckPerm('scenes-move') && record.statusString == -4,
|
|
|
|
+ onClick: handlePriority.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '解冻',
|
|
|
|
+ disabled: !record.isColdStorage || !(record.status == 1 || record.status == -2),
|
|
|
|
+ ifShow: getTypeCheckPerm('scenes-thaw'),
|
|
|
|
+ onClick: handleColdStorage.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '重算',
|
|
|
|
+ disabled: record.status == 0 || (record.status == -2 && record.payStatus != 1),
|
|
|
|
+ ifShow: getTypeCheckPerm('scenes-recalculate') && tableType != 3,
|
|
|
|
+ popConfirm: {
|
|
|
|
+ title: '是否重算?',
|
|
|
|
+ confirm: handleReset.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '删除',
|
|
|
|
+ //icon: 'ic:outline-delete-outline',
|
|
|
|
+ color: 'error',
|
|
|
|
+ ifShow: getTypeCheckPerm('scenes-delete'),
|
|
|
|
+ disabled: record.status == 0,
|
|
|
|
+ //onClick: handleDelete.bind(null, record),
|
|
|
|
+ popConfirm: {
|
|
|
|
+ title: '是否删除?',
|
|
|
|
+ confirm: handleDelete.bind(null, record),
|
|
|
|
+ placement: 'topRight',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </BasicTable>
|
|
|
|
+ </div>
|
|
|
|
+ <DownLoadModal
|
|
|
|
+ :downloadOption="downloadOption"
|
|
|
|
+ @cancel="afterClose"
|
|
|
|
+ @register="registerDownModal"
|
|
|
|
+ @update="reload"
|
|
|
|
+ cancelText="取消下载"
|
|
|
|
+ okText="下载"
|
|
|
|
+ @cancelDownload="cancelDownload"
|
|
|
|
+ :okButtonProps="{ disabled: canDownload }"
|
|
|
|
+ />
|
|
|
|
+ <MoveModal @update="reload" @register="registerMoveModal" />
|
|
|
|
+ <priorityMoadl @update="reload" @register="registerPriority" />
|
|
|
|
+ </PageWrapper>
|
|
</template>
|
|
</template>
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
- import { defineComponent, h, reactive, toRefs } from 'vue';
|
|
|
|
|
|
+ import { defineComponent, h, reactive, toRefs, ref } from 'vue';
|
|
import {
|
|
import {
|
|
BasicTable,
|
|
BasicTable,
|
|
useTable,
|
|
useTable,
|
|
@@ -38,19 +136,29 @@
|
|
} from '/@/components/Table';
|
|
} from '/@/components/Table';
|
|
import { PageWrapper } from '/@/components/Page';
|
|
import { PageWrapper } from '/@/components/Page';
|
|
import { Time } from '/@/components/Time';
|
|
import { Time } from '/@/components/Time';
|
|
- import { Descriptions } from 'ant-design-vue';
|
|
|
|
|
|
+ import { Descriptions, Tabs } from 'ant-design-vue';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { Switch } from 'ant-design-vue';
|
|
import { Switch } from 'ant-design-vue';
|
|
- import { overallList, overallDelete } from '/@/api/operate';
|
|
|
|
|
|
+ import { overallList, overallDelete, cameraSceneList, sceneDelete } from '/@/api/operate';
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
|
+ import { useModal } from '/@/components/Modal';
|
|
|
|
+ import DownLoadModal from './modal/DownLoadModal.vue';
|
|
|
|
+ import MoveModal from './modal/MoveModal.vue';
|
|
|
|
+ import priorityMoadl from './modal/priorityMoadl.vue';
|
|
import { usePermissionStore } from '/@/store/modules/permission';
|
|
import { usePermissionStore } from '/@/store/modules/permission';
|
|
|
|
+ import { getSchemas, getVrColumns, getviewColumns, getviewSchemas } from './data';
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
components: {
|
|
components: {
|
|
BasicTable,
|
|
BasicTable,
|
|
TableAction,
|
|
TableAction,
|
|
PageWrapper,
|
|
PageWrapper,
|
|
|
|
+ DownLoadModal,
|
|
|
|
+ MoveModal,
|
|
|
|
+ priorityMoadl,
|
|
TableImg,
|
|
TableImg,
|
|
|
|
+ [Tabs.name]: Tabs,
|
|
|
|
+ [Tabs.TabPane.name]: Tabs.TabPane,
|
|
[Descriptions.name]: Descriptions,
|
|
[Descriptions.name]: Descriptions,
|
|
[Descriptions.Item.name]: Descriptions.Item,
|
|
[Descriptions.Item.name]: Descriptions.Item,
|
|
},
|
|
},
|
|
@@ -59,144 +167,63 @@
|
|
const { createMessage, createConfirm } = useMessage();
|
|
const { createMessage, createConfirm } = useMessage();
|
|
const permissionStore = usePermissionStore();
|
|
const permissionStore = usePermissionStore();
|
|
const { getCheckPerm } = permissionStore;
|
|
const { getCheckPerm } = permissionStore;
|
|
- const columns: BasicColumn[] = [
|
|
|
|
- {
|
|
|
|
- title: '作品标题',
|
|
|
|
- dataIndex: 'name',
|
|
|
|
- slots: { customRender: 'href' },
|
|
|
|
- width: 150,
|
|
|
|
- // customRender: ({ record }) => {
|
|
|
|
- // return record.name ? h('span', record.name) : '-';
|
|
|
|
- // },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '作品码',
|
|
|
|
- dataIndex: 'sceneCodes',
|
|
|
|
- ellipsis: true,
|
|
|
|
- width: 180,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '用户账号',
|
|
|
|
- dataIndex: 'userId',
|
|
|
|
- width: 100,
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- title: '创建时间',
|
|
|
|
- dataIndex: 'createTime',
|
|
|
|
- sorter: true,
|
|
|
|
- width: 180,
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
- return record.createTime
|
|
|
|
- ? h(Time, {
|
|
|
|
- value: record.createTime,
|
|
|
|
- mode: 'datetime',
|
|
|
|
- })
|
|
|
|
- : '-';
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '最新编辑时间',
|
|
|
|
- dataIndex: 'updateTime',
|
|
|
|
- width: 180,
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
- return record.updateTime
|
|
|
|
- ? h(Time, {
|
|
|
|
- value: record.updateTime,
|
|
|
|
- mode: 'datetime',
|
|
|
|
- })
|
|
|
|
- : '-';
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '是否加密',
|
|
|
|
- dataIndex: 'status',
|
|
|
|
- width: 80,
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
- return record.isPassword == 1 ? '是' : '否';
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '浏览量',
|
|
|
|
- dataIndex: 'visit',
|
|
|
|
- sorter: true,
|
|
|
|
- width: 80,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '操作',
|
|
|
|
- dataIndex: 'action',
|
|
|
|
- slots: { customRender: 'action' },
|
|
|
|
- ifShow: true,
|
|
|
|
- fixed: 'right',
|
|
|
|
- flag: 'ACTION',
|
|
|
|
- width: 50,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
|
|
+ const tableType = ref<Number>(0); //0看看 、1看见、2深时
|
|
|
|
+ const loading = ref(false);
|
|
const searchForm: Partial<FormProps> = {
|
|
const searchForm: Partial<FormProps> = {
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
- autoSubmitOnEnter:true,
|
|
|
|
- autoAdvancedLine:1,
|
|
|
|
|
|
+ autoSubmitOnEnter: true,
|
|
|
|
+ autoAdvancedLine: 1,
|
|
actionColOptions: {
|
|
actionColOptions: {
|
|
span: 24,
|
|
span: 24,
|
|
},
|
|
},
|
|
- schemas: [
|
|
|
|
- {
|
|
|
|
- field: 'sceneName',
|
|
|
|
- label: '作品标题',
|
|
|
|
- component: 'Input',
|
|
|
|
- componentProps: {
|
|
|
|
- maxLength: 100,
|
|
|
|
- },
|
|
|
|
- colProps: {
|
|
|
|
- xl: 7,
|
|
|
|
- xxl: 7,
|
|
|
|
- },
|
|
|
|
- },{
|
|
|
|
- field: 'sceneCodes',
|
|
|
|
- label: '作品码',
|
|
|
|
- component: 'Input',
|
|
|
|
- componentProps: {
|
|
|
|
- maxLength: 100,
|
|
|
|
- },
|
|
|
|
- colProps: {
|
|
|
|
- xl: 7,
|
|
|
|
- xxl: 7,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: 'userName',
|
|
|
|
- label: '用户账号',
|
|
|
|
- component: 'Input',
|
|
|
|
- componentProps: {
|
|
|
|
- maxLength: 100,
|
|
|
|
- },
|
|
|
|
- colProps: {
|
|
|
|
- xl: 6,
|
|
|
|
- xxl: 6,
|
|
|
|
- },
|
|
|
|
- },{
|
|
|
|
- field: 'timeList',
|
|
|
|
- label: '创建时间',
|
|
|
|
- component: 'RangePicker',
|
|
|
|
- componentProps: {
|
|
|
|
- maxLength: 100,
|
|
|
|
- minWidth:'385px',
|
|
|
|
- format: 'YYYY-MM-DD',
|
|
|
|
- valueFormat: 'YYYY-MM-DD',
|
|
|
|
- showTime: true,
|
|
|
|
- },
|
|
|
|
- colProps: {
|
|
|
|
- xl: 8,
|
|
|
|
- xxl: 8,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ schemas: getviewSchemas(),
|
|
|
|
+ };
|
|
|
|
+ const searchFormSs: Partial<FormProps> = {
|
|
|
|
+ labelWidth: 100,
|
|
|
|
+ autoSubmitOnEnter: true,
|
|
|
|
+ autoAdvancedLine: 1,
|
|
|
|
+ actionColOptions: {
|
|
|
|
+ span: 24,
|
|
|
|
+ },
|
|
|
|
+ schemas: getSchemas(),
|
|
};
|
|
};
|
|
- const [registerTable, { reload }] = useTable({
|
|
|
|
|
|
+ const [registerPriority, { openModal: openPriorityModal }] = useModal();
|
|
|
|
+ const [registerDownModal, { openModal: openDownModal }] = useModal();
|
|
|
|
+ const [registerMoveModal, { openModal: openMoveModal }] = useModal();
|
|
|
|
+ const [
|
|
|
|
+ registerTableScene,
|
|
|
|
+ { reload: reload1, setColumns, getSelectRowKeys, clearSelectedRowKeys },
|
|
|
|
+ ] = useTable({
|
|
|
|
+ api: cameraSceneList,
|
|
|
|
+ title: `全景VR列表`,
|
|
|
|
+ columns: getVrColumns(),
|
|
|
|
+ rowSelection: { type: 'checkbox' },
|
|
|
|
+ searchInfo: { type: tableType },
|
|
|
|
+ useSearchForm: true,
|
|
|
|
+ formConfig: searchFormSs,
|
|
|
|
+ showTableSetting: true,
|
|
|
|
+ beforeFetch: (T) => {
|
|
|
|
+ loading.value = true;
|
|
|
|
+ return T;
|
|
|
|
+ },
|
|
|
|
+ afterFetch: (T) => {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ return T;
|
|
|
|
+ },
|
|
|
|
+ rowKey: 'num',
|
|
|
|
+ fetchSetting: {
|
|
|
|
+ pageField: 'pageNum',
|
|
|
|
+ sizeField: 'pageSize',
|
|
|
|
+ listField: 'list',
|
|
|
|
+ totalField: 'total',
|
|
|
|
+ },
|
|
|
|
+ canResize: true,
|
|
|
|
+ });
|
|
|
|
+ const [registerTable, { reload: reload0 }] = useTable({
|
|
api: overallList,
|
|
api: overallList,
|
|
title: '作品列表',
|
|
title: '作品列表',
|
|
// titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
|
|
// titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
|
|
- columns: columns,
|
|
|
|
|
|
+ columns: getviewColumns(),
|
|
searchInfo: { type: 1 },
|
|
searchInfo: { type: 1 },
|
|
useSearchForm: true,
|
|
useSearchForm: true,
|
|
formConfig: searchForm,
|
|
formConfig: searchForm,
|
|
@@ -212,29 +239,140 @@
|
|
});
|
|
});
|
|
async function handleDelete(record: Recordable) {
|
|
async function handleDelete(record: Recordable) {
|
|
console.log('handleDelete', record);
|
|
console.log('handleDelete', record);
|
|
|
|
+ if (tableType.value == 1) {
|
|
|
|
+ sceneDelete({ num: record.num }).then(() => {
|
|
|
|
+ message.success({
|
|
|
|
+ content: '删除成功',
|
|
|
|
+ });
|
|
|
|
|
|
- overallDelete({ id: record.id })
|
|
|
|
- .then(() => {
|
|
|
|
|
|
+ reload1();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ overallDelete({ id: record.id }).then(() => {
|
|
message.success({
|
|
message.success({
|
|
content: '删除成功',
|
|
content: '删除成功',
|
|
});
|
|
});
|
|
|
|
|
|
- reload();
|
|
|
|
- })
|
|
|
|
|
|
+ reload0();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- async function handleMove(record: Recordable) {
|
|
|
|
- sceneMove({ snCode: record.snCode, num: record.num })
|
|
|
|
- .then(() => {
|
|
|
|
- message.success({
|
|
|
|
- content: '迁移成功',
|
|
|
|
|
|
+
|
|
|
|
+ function getTypeCheckPerm(val) {
|
|
|
|
+ let myType = tableType.value;
|
|
|
|
+ return getCheckPerm(val) || getCheckPerm(`${val}-${myType}`);
|
|
|
|
+ }
|
|
|
|
+ function reload() {
|
|
|
|
+ reload0();
|
|
|
|
+ reload1();
|
|
|
|
+ }
|
|
|
|
+ function handlePriority(record) {
|
|
|
|
+ openPriorityModal(true, record);
|
|
|
|
+ }
|
|
|
|
+ function handleMoveAll() {
|
|
|
|
+ let numList = getSelectRowKeys() || [];
|
|
|
|
+ if (numList.length == 0) {
|
|
|
|
+ return createMessage.error('请选择批量迁移的场景');
|
|
|
|
+ }
|
|
|
|
+ openMoveModal(true, {
|
|
|
|
+ numList,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function cancelDownload() {
|
|
|
|
+ downloadOption.value = {};
|
|
|
|
+ }
|
|
|
|
+ async function handleColdStorage(record: Recordable) {
|
|
|
|
+ createConfirm({
|
|
|
|
+ title: '删除',
|
|
|
|
+ content: '确定要解冻场景吗?',
|
|
|
|
+ onOk: async () => {
|
|
|
|
+ sceneRestStore({ num: record.num }).then(() => {
|
|
|
|
+ message.success({
|
|
|
|
+ content: '已提交解冻',
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ reload();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ async function handleCopy(record: Recordable) {
|
|
|
|
+ createConfirm({
|
|
|
|
+ title: '复制场景',
|
|
|
|
+ content: '复制场景,场景归属在原相机下。<br/>确定要复制场景吗?',
|
|
|
|
+ onOk: async () => {
|
|
|
|
+ sceneCopy({ num: record.num }).then(() => {
|
|
|
|
+ message.success({
|
|
|
|
+ content: '复制成功',
|
|
|
|
+ });
|
|
|
|
+ reload();
|
|
});
|
|
});
|
|
- })
|
|
|
|
|
|
+ },
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
+ async function handleMove(record: Recordable) {
|
|
|
|
+ openMoveModal(true, {
|
|
|
|
+ ...record,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ let timer: null = ref(null);
|
|
|
|
+ const downloadOption = ref<Object>({});
|
|
|
|
+ const canDownload = ref<boolean>(true);
|
|
function handleDownload(record: Recordable) {
|
|
function handleDownload(record: Recordable) {
|
|
- console.log('handleDownload', record);
|
|
|
|
|
|
+ let isObj = tableType.value == 5 || tableType.value == 7 ? 1 : 0;
|
|
|
|
+ let params = { num: record.num, isObj: 0 };
|
|
|
|
+ if (tableType.value == 4 || tableType.value == 5 || tableType.value == 7) {
|
|
|
|
+ params.isObj = isObj;
|
|
|
|
+ }
|
|
|
|
+ canDownload.value = true;
|
|
|
|
+ checkDownLoad(params).then((res) => {
|
|
|
|
+ if (res.downloadStatus != 3) {
|
|
|
|
+ // 未下载过,需要打包
|
|
|
|
+ sceneDownload(params).then((res) => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ openDownModal(true, {
|
|
|
|
+ ...record,
|
|
|
|
+ isObj: params.isObj,
|
|
|
|
+ });
|
|
|
|
+ if (res.downloadStatus == 1) {
|
|
|
|
+ if (timer.value) {
|
|
|
|
+ afterClose();
|
|
|
|
+ }
|
|
|
|
+ timer.value = setInterval(() => {
|
|
|
|
+ downloadProcess(params).then((res) => {
|
|
|
|
+ if (res.status == '1003') {
|
|
|
|
+ createMessage.error('下载失败');
|
|
|
|
+ afterClose();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (res.percent >= 100) {
|
|
|
|
+ canDownload.value = false;
|
|
|
|
+ afterClose();
|
|
|
|
+ }
|
|
|
|
+ downloadOption.value = res;
|
|
|
|
+ console.log(res);
|
|
|
|
+ });
|
|
|
|
+ }, 1000);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ canDownload.value = false;
|
|
|
|
+ window.open(res.downloadUrl);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function afterClose() {
|
|
|
|
+ clearInterval(timer.value);
|
|
|
|
+ timer.value = null;
|
|
}
|
|
}
|
|
function handleReset(record: Recordable) {
|
|
function handleReset(record: Recordable) {
|
|
console.log('handleReset', record);
|
|
console.log('handleReset', record);
|
|
|
|
+ rebuildScene({ num: record.num }).then(() => {
|
|
|
|
+ message.success({
|
|
|
|
+ content: '操作成功',
|
|
|
|
+ });
|
|
|
|
+ reload();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
// function exportExcel() {
|
|
// function exportExcel() {
|
|
// createConfirm({
|
|
// createConfirm({
|
|
@@ -248,11 +386,29 @@
|
|
// }
|
|
// }
|
|
return {
|
|
return {
|
|
registerTable,
|
|
registerTable,
|
|
|
|
+ registerTableScene,
|
|
handleDelete,
|
|
handleDelete,
|
|
handleMove,
|
|
handleMove,
|
|
handleDownload,
|
|
handleDownload,
|
|
handleReset,
|
|
handleReset,
|
|
getCheckPerm,
|
|
getCheckPerm,
|
|
|
|
+ getTypeCheckPerm,
|
|
|
|
+ tableType,
|
|
|
|
+ loading,
|
|
|
|
+ reload,
|
|
|
|
+ handleMoveAll,
|
|
|
|
+ handlePriority,
|
|
|
|
+ openDownModal,
|
|
|
|
+ registerDownModal,
|
|
|
|
+ registerMoveModal,
|
|
|
|
+ registerPriority,
|
|
|
|
+ afterClose,
|
|
|
|
+ timer,
|
|
|
|
+ canDownload,
|
|
|
|
+ downloadOption,
|
|
|
|
+ cancelDownload,
|
|
|
|
+ handleColdStorage,
|
|
|
|
+ handleCopy,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|