tangning %!s(int64=2) %!d(string=hai) anos
pai
achega
4abde4207a

+ 2 - 1
.vscode/settings.json

@@ -138,5 +138,6 @@
     "brotli",
     "tailwindcss",
     "sider"
-  ]
+  ],
+  "vue-i18n.i18nPaths": "src\\locales,src\\locales\\lang,dist\\resource\\tinymce\\langs,public\\resource\\tinymce\\langs"
 }

+ 42 - 39
src/locales/lang/en/routes/scene.ts

@@ -1,42 +1,45 @@
 export default {
-  tableType:{
-    0:'4DKanKan',
-    1:'4DMinion',
-    2:'4DMega',
-    3:'4DKanKan Lite',
+  tableType: {
+    0: '4DKanKan',
+    1: '4DMinion',
+    2: '4DMega',
+    3: '4DKanKan Lite',
   },
-  transfer:'transfer',
-  copy:'copy',
-  down:'download',
-  canlenDown:'Cancel Download',
-  sceneName:'Scene Title',
-  num:'Scene Code',
-  createTime:'Shooting Time',
-  amount:'Calculation Completion Time',
-  snCode:'SN',
-  sceneSize:'Scene Size',
-  userName:'Bound account',
-  viewCount:'Views',
-  status:'Status',
-  copyTime:'Scene Copied Time',
-  isCopy:'Copied scene',
-  statusType:{
-    '0':'In calculation',
-    '1':'Calculation succeeded',
-    '-2':'Calculation succeeded',
-    '-1':'Calculation failed',
-    '-3':'Sealing',
+  transfer: 'transfer',
+  copy: 'copy',
+  down: 'download',
+  canlenDown: 'Cancel Download',
+  sceneName: 'Scene Title',
+  num: 'Scene Code',
+  createTime: 'Shooting Time',
+  amount: 'Calculation Completion Time',
+  snCode: 'SN',
+  sceneSize: 'Scene Size',
+  userName: 'Bound account',
+  viewCount: 'Views',
+  status: 'Status',
+  copyTime: 'Scene Copied Time',
+  isCopy: 'Copied scene',
+  statusType: {
+    '0': 'In calculation',
+    '1': 'Calculation succeeded',
+    '-2': 'Calculation succeeded',
+    '-1': 'Calculation failed',
+    '-3': 'Sealing',
   },
-  copyTipsTitle:'Copy Scene',
-  copyTipsText:'Copy the scene, and the scene belongs to the original camera<br/>Are you sure you want to copy the scene?',
-  copySccuse:'Copy succeeded',
-  deleteSccuse:'Deletion succeeded',
-  downErr:'Download failed',
-  transferSccuse:'Scenario migration succeeded.',
-  transferTitle:'Migration Scenario',
-  toSnCode:'Migrate to',
-  rules:{
-    snCode:'Please enter the SN code of the camera',
-    snCode1:'Chinese characters are not supported',
-  }
-};
+  copyTipsTitle: 'Copy Scene',
+  copyTipsText:
+    'Copy the scene, and the scene belongs to the original camera<br/>Are you sure you want to copy the scene?',
+  copySccuse: 'Copy succeeded',
+  deleteSccuse: 'Deletion succeeded',
+  downErr: 'Download failed',
+  transferSccuse: 'Scenario migration succeeded.',
+  transferTitle: 'Migration Scenario',
+  toSnCode: 'Migrate to',
+  reset: 'rerun',
+  resetTips: 'Recalculate?',
+  rules: {
+    snCode: 'Please enter the SN code of the camera',
+    snCode1: 'Chinese characters are not supported',
+  },
+};

+ 41 - 39
src/locales/lang/zh-CN/routes/scene.ts

@@ -1,42 +1,44 @@
 export default {
-  tableType:{
-    0:'四维看看',
-    1:'四维看见',
-    2:'四维深时',
-    3:'四维双目Lite',
+  tableType: {
+    0: '四维看看',
+    1: '四维看见',
+    2: '四维深时',
+    3: '四维双目Lite',
   },
-  transfer:'迁移',
-  copy:'复制',
-  down:'下载',
-  canlenDown:'取消下载',
-  sceneName:'场景标题',
-  num:'场景码',
-  createTime:'拍摄时间',
-  amount:'计算完成时间',
-  snCode:'SN码',
-  sceneSize:'场景大小',
-  userName:'绑定账号',
-  viewCount:'浏览量',
-  copyTime:'复制时间',
-  isCopy:'是否复制',
-  status:'状态',
-  statusType:{
-    '0':'计算中',
-    '1':'计算成功',
-    '-2':'计算成功',
-    '-1':'计算失败',
-    '-3':'封存',
+  transfer: '迁移',
+  copy: '复制',
+  down: '下载',
+  canlenDown: '取消下载',
+  sceneName: '场景标题',
+  num: '场景码',
+  createTime: '拍摄时间',
+  amount: '计算完成时间',
+  snCode: 'SN码',
+  sceneSize: '场景大小',
+  userName: '绑定账号',
+  viewCount: '浏览量',
+  copyTime: '复制时间',
+  isCopy: '是否复制',
+  status: '状态',
+  statusType: {
+    '0': '计算中',
+    '1': '计算成功',
+    '-2': '计算成功',
+    '-1': '计算失败',
+    '-3': '封存',
   },
-  copyTipsTitle:'复制场景',
-  copyTipsText:'复制场景,场景归属在原相机下。<br/>确定要复制场景吗?',
-  copySccuse:'复制成功',
-  deleteSccuse:'删除成功',
-  downErr:'下载失败',
-  transferSccuse:'场景迁移成功。',
-  transferTitle:'迁移场景',
-  toSnCode:'迁移至',
-  rules:{
-    snCode:'请输入相机SN码',
-    snCode1:'不支持中文字符',
-  }
-};
+  copyTipsTitle: '复制场景',
+  copyTipsText: '复制场景,场景归属在原相机下。<br/>确定要复制场景吗?',
+  copySccuse: '复制成功',
+  deleteSccuse: '删除成功',
+  downErr: '下载失败',
+  transferSccuse: '场景迁移成功。',
+  transferTitle: '迁移场景',
+  toSnCode: '迁移至',
+  reset: '重算',
+  resetTips: '是否重算?',
+  rules: {
+    snCode: '请输入相机SN码',
+    snCode1: '不支持中文字符',
+  },
+};

+ 385 - 377
src/views/scene/list.vue

@@ -35,6 +35,14 @@
                 disabled: !(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
                 onClick: handleCopy.bind(null, record),
               },
+              {
+                label: t('routes.scene.reset'),
+                disabled: record.status == 0 || (record.status == -2 && record.payStatus != 1),
+                popConfirm: {
+                  title: t('routes.scene.resetTips'),
+                  confirm: handleReset.bind(null, record),
+                },
+              },
             ]"
           />
         </template>
@@ -54,416 +62,416 @@
   </PageWrapper>
 </template>
 <script lang="ts">
-import { defineComponent, h, reactive, toRefs, ref } from 'vue';
-import {
-  BasicTable,
-  useTable,
-  TableAction,
-  BasicColumn,
-  TableImg,
-  FormProps,
-} from '/@/components/Table';
-import { PageWrapper } from '/@/components/Page';
-import DownLoadModal from './modal/DownLoadModal.vue';
-import MoveModal from './modal/MoveModal.vue';
-import { Time } from '/@/components/Time';
-import { Descriptions, Tabs, Progress } from 'ant-design-vue';
-import { useI18n } from '/@/hooks/web/useI18n';
-import { useMessage } from '/@/hooks/web/useMessage';
-import { useModal } from '/@/components/Modal';
-import {
-  operateSceneList,
-  sceneMove,
-  sceneDelete,
-  sceneReset,
-  sceneDownload,
-  checkDownLoad,
-  downloadProcess,
-  sceneCopy,
-  rebuildScene,
-} from '/@/api/operate';
-import { message } from 'ant-design-vue';
-import { usePermissionStore } from '/@/store/modules/permission';
-import { func } from 'vue-types';
-export default defineComponent({
-  components: {
-    DownLoadModal,
-    MoveModal,
+  import { defineComponent, h, reactive, toRefs, ref } from 'vue';
+  import {
     BasicTable,
+    useTable,
     TableAction,
-    PageWrapper,
-    [Descriptions.name]: Descriptions,
-    [Descriptions.Item.name]: Descriptions.Item,
+    BasicColumn,
+    TableImg,
+    FormProps,
+  } from '/@/components/Table';
+  import { PageWrapper } from '/@/components/Page';
+  import DownLoadModal from './modal/DownLoadModal.vue';
+  import MoveModal from './modal/MoveModal.vue';
+  import { Time } from '/@/components/Time';
+  import { Descriptions, Tabs, Progress } from 'ant-design-vue';
+  import { useI18n } from '/@/hooks/web/useI18n';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { useModal } from '/@/components/Modal';
+  import {
+    operateSceneList,
+    sceneMove,
+    sceneDelete,
+    sceneReset,
+    sceneDownload,
+    checkDownLoad,
+    downloadProcess,
+    sceneCopy,
+    rebuildScene,
+  } from '/@/api/operate';
+  import { message } from 'ant-design-vue';
+  import { usePermissionStore } from '/@/store/modules/permission';
+  import { func } from 'vue-types';
+  export default defineComponent({
+    components: {
+      DownLoadModal,
+      MoveModal,
+      BasicTable,
+      TableAction,
+      PageWrapper,
+      [Descriptions.name]: Descriptions,
+      [Descriptions.Item.name]: Descriptions.Item,
 
-    [Tabs.name]: Tabs,
-    [Tabs.TabPane.name]: Tabs.TabPane,
-  },
-  setup() {
-    const { t } = useI18n();
-    const { createMessage, createConfirm } = useMessage();
-    const permissionStore = usePermissionStore();
-    const { getCheckPerm } = permissionStore;
-    const tableType = ref<Recordable>(0); //0看看 、1看见、2深时
-    const columns: BasicColumn[] = [
-      {
-        title: t('routes.scene.sceneName'),
-        dataIndex: 'sceneName',
-        slots: { customRender: 'href' },
-        width: 150,
-      },
-      {
-        title: t('routes.scene.num'),
-        dataIndex: 'num',
-        ellipsis: true,
-        width: 180,
-      },
-      {
-        title: t('routes.scene.createTime'),
-        dataIndex: 'createTime',
-        width: 180,
-        customRender: ({ record }) => {
-          return (
-            record.createTime &&
-            h(Time, {
-              value: record.createTime,
-              mode: 'datetime',
-            })
-          );
-        },
-      },
-      {
-        title: t('routes.scene.amount'),
-        dataIndex: 'amount',
-        width: 210,
-        customRender: ({ record }) => {
-          return (
-            (record.algorithmTime &&
-              h(Time, {
-                value: record.algorithmTime,
-                mode: 'datetime',
-              })) ||
-            '-'
-          );
-        },
-      },
-      {
-        title: t('routes.scene.snCode'),
-        dataIndex: 'snCode',
-        width: 180,
-      },
-      {
-        title: t('routes.scene.sceneSize'),
-        dataIndex: 'sceneSize',
-        width: 120,
-        customRender: ({ record }) => {
-          return record.sceneSize && record.sceneSize != 0
-            ? h('span', { class: 'sceneSize' }, Math.ceil(record.sceneSize / 1024 / 1024) + 'M')
-            : '-';
+      [Tabs.name]: Tabs,
+      [Tabs.TabPane.name]: Tabs.TabPane,
+    },
+    setup() {
+      const { t } = useI18n();
+      const { createMessage, createConfirm } = useMessage();
+      const permissionStore = usePermissionStore();
+      const { getCheckPerm } = permissionStore;
+      const tableType = ref<Recordable>(0); //0看看 、1看见、2深时
+      const columns: BasicColumn[] = [
+        {
+          title: t('routes.scene.sceneName'),
+          dataIndex: 'sceneName',
+          slots: { customRender: 'href' },
+          width: 150,
         },
-      },
-      {
-        title: t('routes.scene.isCopy'),
-        dataIndex: 'isCopy',
-        width: 130,
-        customRender: ({ record }) => {
-          return record.isCopy ? t('common.yes') : t('common.no');
+        {
+          title: t('routes.scene.num'),
+          dataIndex: 'num',
+          ellipsis: true,
+          width: 180,
         },
-      },
-      {
-        title: t('routes.scene.copyTime'),
-        dataIndex: 'copyTime',
-        width: 140,
-        customRender: ({ record }) => {
-          return (
-            (record.copyTime &&
+        {
+          title: t('routes.scene.createTime'),
+          dataIndex: 'createTime',
+          width: 180,
+          customRender: ({ record }) => {
+            return (
+              record.createTime &&
               h(Time, {
-                value: record.copyTime,
+                value: record.createTime,
                 mode: 'datetime',
-              })) ||
-            '-'
-          );
-        },
-      },
-      {
-        title: t('routes.scene.userName'),
-        dataIndex: 'userName',
-        width: 140,
-      },
-      {
-        title: t('routes.scene.viewCount'),
-        dataIndex: 'viewCount',
-        width: 80,
-      },
-      {
-        title: t('routes.scene.status'),
-        dataIndex: 'status',
-        width: 80,
-        customRender: ({ record }) => {
-          let str;
-          switch (record.status - 0) {
-            case 0:
-              str = t('routes.scene.statusType.0');
-              break;
-            case 1:
-              str = t('routes.scene.statusType.1');
-              break;
-            case -2:
-              str = t('routes.scene.statusType.-2');
-              break;
-            case -1:
-              str = t('routes.scene.statusType.-1');
-              break;
-          }
-          return record.payStatus == -2 ? t('routes.scene.statusType.-3') : str;
+              })
+            );
+          },
         },
-      },
-      {
-        title: t('common.operating'),
-        dataIndex: 'action',
-        slots: { customRender: 'action' },
-        ifShow: true,
-        fixed: 'right',
-        flag: 'ACTION',
-        width: 120,
-      },
-    ];
-    const searchForm: Partial<FormProps> = {
-      labelWidth: 130,
-      autoAdvancedLine: 1,
-      actionColOptions: {
-        span: 24,
-      },
-      schemas: [
         {
-          field: 'sceneName',
-          label: t('routes.scene.sceneName'),
-          component: 'Input',
-          componentProps: {
-            maxLength: 100,
-          },
-          colProps: {
-            xl: 7,
-            xxl: 7,
+          title: t('routes.scene.amount'),
+          dataIndex: 'amount',
+          width: 210,
+          customRender: ({ record }) => {
+            return (
+              (record.algorithmTime &&
+                h(Time, {
+                  value: record.algorithmTime,
+                  mode: 'datetime',
+                })) ||
+              '-'
+            );
           },
         },
         {
-          label: t('routes.scene.num'),
-          field: 'num',
-          component: 'Input',
-          componentProps: {
-            maxLength: 100,
-          },
-          colProps: {
-            xl: 7,
-            xxl: 7,
-          },
+          title: t('routes.scene.snCode'),
+          dataIndex: 'snCode',
+          width: 180,
         },
         {
-          field: 'snCode',
-          label: t('routes.scene.snCode'),
-          component: 'Input',
-          componentProps: {
-            maxLength: 100,
+          title: t('routes.scene.sceneSize'),
+          dataIndex: 'sceneSize',
+          width: 120,
+          customRender: ({ record }) => {
+            return record.sceneSize && record.sceneSize != 0
+              ? h('span', { class: 'sceneSize' }, Math.ceil(record.sceneSize / 1024 / 1024) + 'M')
+              : '-';
           },
-          colProps: {
-            xl: 7,
-            xxl: 7,
+        },
+        {
+          title: t('routes.scene.isCopy'),
+          dataIndex: 'isCopy',
+          width: 130,
+          customRender: ({ record }) => {
+            return record.isCopy ? t('common.yes') : t('common.no');
           },
         },
         {
-          field: 'userName',
-          label: t('routes.scene.userName'),
-          component: 'Input',
-          componentProps: {
-            maxLength: 100,
+          title: t('routes.scene.copyTime'),
+          dataIndex: 'copyTime',
+          width: 140,
+          customRender: ({ record }) => {
+            return (
+              (record.copyTime &&
+                h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })) ||
+              '-'
+            );
           },
-          colProps: {
-            xl: 7,
-            xxl: 7,
+        },
+        {
+          title: t('routes.scene.userName'),
+          dataIndex: 'userName',
+          width: 140,
+        },
+        {
+          title: t('routes.scene.viewCount'),
+          dataIndex: 'viewCount',
+          width: 80,
+        },
+        {
+          title: t('routes.scene.status'),
+          dataIndex: 'status',
+          width: 80,
+          customRender: ({ record }) => {
+            let str;
+            switch (record.status - 0) {
+              case 0:
+                str = t('routes.scene.statusType.0');
+                break;
+              case 1:
+                str = t('routes.scene.statusType.1');
+                break;
+              case -2:
+                str = t('routes.scene.statusType.-2');
+                break;
+              case -1:
+                str = t('routes.scene.statusType.-1');
+                break;
+            }
+            return record.payStatus == -2 ? t('routes.scene.statusType.-3') : str;
           },
         },
         {
-          field: 'timeList',
-          label: t('routes.scene.createTime'),
-          component: 'RangePicker',
-          componentProps: {
-            maxLength: 100,
-            valueFormat: 'YYYY-MM-DD',
-            format: 'YYYY-MM-DD',
+          title: t('common.operating'),
+          dataIndex: 'action',
+          slots: { customRender: 'action' },
+          ifShow: true,
+          fixed: 'right',
+          flag: 'ACTION',
+          width: 120,
+        },
+      ];
+      const searchForm: Partial<FormProps> = {
+        labelWidth: 130,
+        autoAdvancedLine: 1,
+        actionColOptions: {
+          span: 24,
+        },
+        schemas: [
+          {
+            field: 'sceneName',
+            label: t('routes.scene.sceneName'),
+            component: 'Input',
+            componentProps: {
+              maxLength: 100,
+            },
+            colProps: {
+              xl: 7,
+              xxl: 7,
+            },
           },
-          colProps: {
-            xl: 7,
-            xxl: 7,
+          {
+            label: t('routes.scene.num'),
+            field: 'num',
+            component: 'Input',
+            componentProps: {
+              maxLength: 100,
+            },
+            colProps: {
+              xl: 7,
+              xxl: 7,
+            },
           },
+          {
+            field: 'snCode',
+            label: t('routes.scene.snCode'),
+            component: 'Input',
+            componentProps: {
+              maxLength: 100,
+            },
+            colProps: {
+              xl: 7,
+              xxl: 7,
+            },
+          },
+          {
+            field: 'userName',
+            label: t('routes.scene.userName'),
+            component: 'Input',
+            componentProps: {
+              maxLength: 100,
+            },
+            colProps: {
+              xl: 7,
+              xxl: 7,
+            },
+          },
+          {
+            field: 'timeList',
+            label: t('routes.scene.createTime'),
+            component: 'RangePicker',
+            componentProps: {
+              maxLength: 100,
+              valueFormat: 'YYYY-MM-DD',
+              format: 'YYYY-MM-DD',
+            },
+            colProps: {
+              xl: 7,
+              xxl: 7,
+            },
+          },
+        ],
+      };
+      function cancelDownload() {
+        downloadOption.value = {};
+      }
+      const [registerDownModal, { openModal: openDownModal }] = useModal();
+      const [registerMoveModal, { openModal: openMoveModal }] = useModal();
+      const [registerTable, { reload }] = useTable({
+        api: operateSceneList,
+        // title: `场景列表`,
+        // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
+        columns: columns,
+        searchInfo: { type: tableType },
+        useSearchForm: true,
+        formConfig: searchForm,
+        showTableSetting: true,
+        showIndexColumn: false,
+        rowKey: 'num',
+        fetchSetting: {
+          pageField: 'pageNum',
+          sizeField: 'pageSize',
+          listField: 'list',
+          totalField: 'total',
         },
-      ],
-    };
-    function cancelDownload() {
-      downloadOption.value = {};
-    }
-    const [registerDownModal, { openModal: openDownModal }] = useModal();
-    const [registerMoveModal, { openModal: openMoveModal }] = useModal();
-    const [registerTable, { reload }] = useTable({
-      api: operateSceneList,
-      // title: `场景列表`,
-      // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
-      columns: columns,
-      searchInfo: { type: tableType },
-      useSearchForm: true,
-      formConfig: searchForm,
-      showTableSetting: true,
-      showIndexColumn: false,
-      rowKey: 'num',
-      fetchSetting: {
-        pageField: 'pageNum',
-        sizeField: 'pageSize',
-        listField: 'list',
-        totalField: 'total',
-      },
-      canResize: true,
-    });
-    function changeTable(val: string) {
-      tableType.value = val;
-      reload();
-    }
-    async function handleCopy(record: Recordable) {
-      createConfirm({
-        title: t('routes.scene.copyTipsTitle'),
-        content: t('routes.scene.copyTipsText'),
-        onOk: async () => {
-          sceneCopy({ num: record.num }).then(() => {
-            message.success({
-              content: t('routes.scene.copySccuse'),
-            });
-            reload();
-          });
-        },
+        canResize: true,
       });
-    }
-    async function handleDelete(record: Recordable) {
-      console.log('handleDelete', record);
-      // createConfirm({
-      //   title: '删除',
-      //   content: '确定要删除场景吗?',
-      //   onOk: async () => {
-      sceneDelete({ num: record.num }).then(() => {
-        message.success({
-          content: t('routes.scene.deleteSccuse'),
-        });
+      function changeTable(val: string) {
+        tableType.value = val;
         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) {
-      console.log('handleDownload', record, canDownload.value);
-      canDownload.value = true;
-      checkDownLoad({ num: record.num }).then((res) => {
-        console.log(res);
-        if (res.downloadStatus != 3) {
-          // 未下载过,需要打包
-          sceneDownload({ num: record.num }).then((res) => {
-            console.log(res);
-            openDownModal(true, {
-              ...record,
+      }
+      async function handleCopy(record: Recordable) {
+        createConfirm({
+          title: t('routes.scene.copyTipsTitle'),
+          content: t('routes.scene.copyTipsText'),
+          onOk: async () => {
+            sceneCopy({ num: record.num }).then(() => {
+              message.success({
+                content: t('routes.scene.copySccuse'),
+              });
+              reload();
             });
-            if (res.downloadStatus == 1) {
-              if (timer.value) {
-                afterClose();
+          },
+        });
+      }
+      async function handleDelete(record: Recordable) {
+        console.log('handleDelete', record);
+        // createConfirm({
+        //   title: '删除',
+        //   content: '确定要删除场景吗?',
+        //   onOk: async () => {
+        sceneDelete({ num: record.num }).then(() => {
+          message.success({
+            content: t('routes.scene.deleteSccuse'),
+          });
+          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) {
+        console.log('handleDownload', record, canDownload.value);
+        canDownload.value = true;
+        checkDownLoad({ num: record.num }).then((res) => {
+          console.log(res);
+          if (res.downloadStatus != 3) {
+            // 未下载过,需要打包
+            sceneDownload({ num: record.num }).then((res) => {
+              console.log(res);
+              openDownModal(true, {
+                ...record,
+              });
+              if (res.downloadStatus == 1) {
+                if (timer.value) {
+                  afterClose();
+                }
+                timer.value = setInterval(() => {
+                  downloadProcess({ num: record.num }).then((res) => {
+                    if (res.status == '1003') {
+                      createMessage.error(t('routes.scene.downErr'));
+                      afterClose();
+                      return;
+                    }
+                    if (res.percent >= 100) {
+                      canDownload.value = false;
+                      afterClose();
+                    }
+                    downloadOption.value = res;
+                    console.log(res);
+                  });
+                }, 1000);
               }
-              timer.value = setInterval(() => {
-                downloadProcess({ num: record.num }).then((res) => {
-                  if (res.status == '1003') {
-                    createMessage.error(t('routes.scene.downErr'));
-                    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) {
+        console.log('handleReset', record);
+        rebuildScene({ num: record.num }).then(() => {
+          message.success({
+            content: t('common.optSuccess'),
           });
-        } else {
-          canDownload.value = false;
-          window.open(res.downloadUrl);
-        }
-      });
-    }
-    function afterClose() {
-      clearInterval(timer.value);
-      timer.value = null;
-    }
-    function handleReset(record: Recordable) {
-      console.log('handleReset', record);
-      rebuildScene({ num: record.num }).then(() => {
-        message.success({
-          content: t('common.optSuccess'),
+          reload();
         });
-        reload();
-      });
-    }
-    function getTypeCheckPerm(val) {
-      let myType = tableType.value;
-      return getCheckPerm(val) || getCheckPerm(`${val}-${myType}`);
-    }
-    return {
-      registerTable,
-      handleDelete,
-      handleCopy,
-      handleMove,
-      handleDownload,
-      handleReset,
-      tableType,
-      changeTable,
-      reload,
-      t,
-      openDownModal,
-      registerDownModal,
-      registerMoveModal,
-      afterClose,
-      timer,
-      canDownload,
-      downloadOption,
-      cancelDownload,
-      getTypeCheckPerm,
-    };
-  },
-});
+      }
+      function getTypeCheckPerm(val) {
+        let myType = tableType.value;
+        return getCheckPerm(val) || getCheckPerm(`${val}-${myType}`);
+      }
+      return {
+        registerTable,
+        handleDelete,
+        handleCopy,
+        handleMove,
+        handleDownload,
+        handleReset,
+        tableType,
+        changeTable,
+        reload,
+        t,
+        openDownModal,
+        registerDownModal,
+        registerMoveModal,
+        afterClose,
+        timer,
+        canDownload,
+        downloadOption,
+        cancelDownload,
+        getTypeCheckPerm,
+      };
+    },
+  });
 </script>
 <style lang="less" scoped>
-// .tableHeader {
-//   height: 50px;
-//   display: flex;
-//   align-items: center;
+  // .tableHeader {
+  //   height: 50px;
+  //   display: flex;
+  //   align-items: center;
 
-//   .item {
-//     font-size: 14px;
-//     color: #666;
-//     margin-right: 10px;
-//     cursor: pointer;
-//     &.active {
-//       font-weight: bold;
-//       color: #222;
-//     }
-//   }
-// }
-.desc-wrap-BasicTable {
-  background-color: #f0f2f5;
-  .vben-basic-table-form-container {
-    padding: 0;
+  //   .item {
+  //     font-size: 14px;
+  //     color: #666;
+  //     margin-right: 10px;
+  //     cursor: pointer;
+  //     &.active {
+  //       font-weight: bold;
+  //       color: #222;
+  //     }
+  //   }
+  // }
+  .desc-wrap-BasicTable {
+    background-color: #f0f2f5;
+    .vben-basic-table-form-container {
+      padding: 0;
+    }
   }
-}
 </style>