Просмотр исходного кода

Merge branch 'master' of http://192.168.0.115:3000/tangning/4dkk_mp

tangning 3 лет назад
Родитель
Сommit
cbdcf26c78

+ 56 - 1
src/api/operate/index.ts

@@ -17,6 +17,11 @@ enum Api {
   sceneDelete = '/newV4/service/manage/scene/delete',
   sceneDownload = '/newV4/service/manage/scene/downScene',
   sceneCopy = '/newV4/service/manage/scene/copy',
+  checkDownLoad = '/newV4/service/manage/scene/checkDownLoad',
+  downloadProcess = '/newV4/service/manage/scene/downloadProcess',
+  rebuildScene = '/newV4/service/manage/scene/rebuildScene',
+  overallList = '/newV4/service/manage/overall/list',
+  overallDelete = '/newV4/service/manage/overall/delete',
 }
 
 /**
@@ -44,6 +49,26 @@ export const operateSceneList = (params: operateList) =>
       ignoreCancelToken: true,
     },
   });
+export const overallList = (params: overallList) =>
+  defHttp.post<Result>({
+    url: Api.overallList,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
+export const overallDelete = (params: overallList) =>
+  defHttp.post<Result>({
+    url: Api.overallDelete,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 export const sceneMove = (params: sceneMoveParams) =>
   defHttp.post<Result>({
     url: Api.sceneMove,
@@ -54,6 +79,16 @@ export const sceneMove = (params: sceneMoveParams) =>
       ignoreCancelToken: true,
     },
   });
+export const rebuildScene = (params: sceneControlParams) =>
+  defHttp.get<Result>({
+    url: Api.rebuildScene,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 export const sceneDelete = (params: sceneControlParams) =>
   defHttp.post<Result>({
     url: Api.sceneDelete,
@@ -64,8 +99,18 @@ export const sceneDelete = (params: sceneControlParams) =>
       ignoreCancelToken: true,
     },
   });
+export const checkDownLoad = (params: sceneControlParams) =>
+  defHttp.get<Result>({
+    url: Api.checkDownLoad,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 export const sceneDownload = (params: sceneControlParams) =>
-  defHttp.post<Result>({
+  defHttp.get<Result>({
     url: Api.sceneDownload,
     params: params,
     // data: params,
@@ -74,6 +119,16 @@ export const sceneDownload = (params: sceneControlParams) =>
       ignoreCancelToken: true,
     },
   });
+export const downloadProcess = (params: sceneControlParams) =>
+  defHttp.get<Result>({
+    url: Api.downloadProcess,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 export const sceneCopy = (params: sceneControlParams) =>
   defHttp.post<Result>({
     url: Api.sceneCopy,

+ 8 - 0
src/api/operate/model.ts

@@ -11,6 +11,14 @@ export interface operateList {
   pageNum?: number;
   pageSize?: number;
 }
+export interface overallList {
+  searchKey: string;
+  pageNum?: number;
+  pageSize?: number;
+}
+export interface overallDelete {
+  id: string;
+}
 export interface sceneMoveParams {
   snCode: string;
   num: string;

+ 3 - 0
src/locales/lang/zh-CN/routes/dashboard.ts

@@ -55,4 +55,7 @@ export default {
   liteScene: '四维双目lite',
   sxz: '随心装方案管理',
   viewKankan: '全景看看作品管理',
+  customer: '客户管理',
+  customerDevice: '客户设备',
+  customerScene: '客户场景',
 };

+ 37 - 0
src/router/routes/modules/customer.ts

@@ -0,0 +1,37 @@
+import type { AppRouteRecordRaw } from '/@/router/types';
+import { t } from '/@/hooks/web/useI18n';
+import { LAYOUT } from '/@/router/constant';
+
+export const customer: AppRouteRecordRaw = {
+  path: '/customer',
+  name: 'Customer',
+  redirect: '/customer/device',
+  component: LAYOUT,
+  meta: {
+    title: t('routes.dashboard.customer'),
+    icon: 'raphael:customer',
+    orderNo: 102,
+    // hideChildrenInMenu: true,
+  },
+  children: [
+    {
+      path: 'device',
+      name: 'Device',
+      component: () => import('/@/views/customer/device.vue'),
+      meta: {
+        title: t('routes.dashboard.customerDevice'),
+        // icon: 'la:file-invoice-dollar',
+      },
+    },
+    {
+      path: 'scene',
+      name: 'Scene',
+      component: () => import('/@/views/customer/scene.vue'),
+      meta: {
+        title: t('routes.dashboard.customerScene'),
+        // icon: 'la:file-invoice-dollar',
+      },
+    },
+  ],
+};
+export default customer;

+ 4 - 4
src/router/routes/modules/operate.ts

@@ -19,7 +19,7 @@ const order: AppRouteModule = {
       name: 'News',
       // component: () => import('/@/views/dashboard/test/index.vue'),
       component: () => import('/@/views/operate/newsList.vue'),
-        meta: {
+      meta: {
         title: t('routes.dashboard.operateNews'),
         icon: 'carbon:notification-new',
         hideChildrenInMenu: true,
@@ -30,7 +30,7 @@ const order: AppRouteModule = {
       name: 'Recruit',
       component: () => import('/@/views/operate/recruitList.vue'),
       // component: () => import('/@/views/system/account/index.vue'),
-        meta: {
+      meta: {
         title: t('routes.dashboard.operateRecruit'),
         icon: 'ci:add-to-queue',
         hideChildrenInMenu: true,
@@ -41,7 +41,7 @@ const order: AppRouteModule = {
       name: 'Message',
       component: () => import('/@/views/operate/messageList.vue'),
       // component: () => import('/@/views/system/account/index.vue'),
-        meta: {
+      meta: {
         title: t('routes.dashboard.operateMessage'),
         icon: 'bx:list-ul',
         hideChildrenInMenu: true,
@@ -50,4 +50,4 @@ const order: AppRouteModule = {
   ],
 };
 
-export default order;
+export default order;

+ 5 - 5
src/router/routes/modules/order.ts

@@ -11,7 +11,7 @@ const order: AppRouteModule = {
   meta: {
     icon: 'bi:columns',
     title: t('routes.dashboard.orderList'),
-    orderNo: 102,
+    orderNo: 108,
   },
   children: [
     {
@@ -19,7 +19,7 @@ const order: AppRouteModule = {
       name: 'Camera',
       // component: () => import('/@/views/dashboard/test/index.vue'),
       component: () => import('/@/views/order/cameraList.vue'),
-        meta: {
+      meta: {
         title: t('routes.dashboard.orderCamera'),
         icon: 'codicon:device-camera',
         hideChildrenInMenu: true,
@@ -30,7 +30,7 @@ const order: AppRouteModule = {
       name: 'Equity',
       component: () => import('/@/views/order/equityList.vue'),
       // component: () => import('/@/views/system/account/index.vue'),
-        meta: {
+      meta: {
         title: t('routes.dashboard.orderEquity'),
         icon: 'icon-park-twotone:vip-one',
         hideChildrenInMenu: true,
@@ -41,7 +41,7 @@ const order: AppRouteModule = {
       name: 'Download',
       component: () => import('/@/views/order/downloadList.vue'),
       // component: () => import('/@/views/system/account/index.vue'),
-        meta: {
+      meta: {
         title: t('routes.dashboard.orderDownload'),
         icon: 'eva:download-fill',
         hideChildrenInMenu: true,
@@ -50,4 +50,4 @@ const order: AppRouteModule = {
   ],
 };
 
-export default order;
+export default order;

+ 38 - 38
src/router/routes/modules/productOperation.ts

@@ -22,44 +22,44 @@ export const productOperation: AppRouteRecordRaw = {
         title: t('routes.dashboard.cameraScene'),
         // icon: 'la:file-invoice-dollar',
       },
-      children: [
-        {
-          path: 'laserScene',
-          name: 'LaserScene',
-          component: () => import('/@/views/productOperation/sceneManager/laserScene.vue'),
-          meta: {
-            title: t('routes.dashboard.laserScene'),
-            // icon: 'la:file-invoice-dollar',
-          },
-        },
-        // {
-        //   path: 'liteScene',
-        //   name: 'LiteScene',
-        //   component: () => import('/@/views/productOperation/sceneManager/liteScene.vue'),
-        //   meta: {
-        //     title: t('routes.dashboard.liteScene'),
-        //     // icon: 'la:file-invoice-dollar',
-        //   },
-        // },
-        {
-          path: 'kankanScene',
-          name: 'KankanScene',
-          component: () => import('/@/views/productOperation/sceneManager/kankanScene.vue'),
-          meta: {
-            title: t('routes.dashboard.kankanScene'),
-            // icon: 'la:file-invoice-dollar',
-          },
-        },
-        {
-          path: 'minionScene',
-          name: 'MinionScene',
-          component: () => import('/@/views/productOperation/sceneManager/minionScene.vue'),
-          meta: {
-            title: t('routes.dashboard.MinionScene'),
-            // icon: 'la:file-invoice-dollar',
-          },
-        },
-      ],
+      // children: [
+      //   {
+      //     path: 'laserScene',
+      //     name: 'LaserScene',
+      //     component: () => import('/@/views/productOperation/sceneManager/laserScene.vue'),
+      //     meta: {
+      //       title: t('routes.dashboard.laserScene'),
+      //       // icon: 'la:file-invoice-dollar',
+      //     },
+      //   },
+      //   // {
+      //   //   path: 'liteScene',
+      //   //   name: 'LiteScene',
+      //   //   component: () => import('/@/views/productOperation/sceneManager/liteScene.vue'),
+      //   //   meta: {
+      //   //     title: t('routes.dashboard.liteScene'),
+      //   //     // icon: 'la:file-invoice-dollar',
+      //   //   },
+      //   // },
+      //   {
+      //     path: 'kankanScene',
+      //     name: 'KankanScene',
+      //     component: () => import('/@/views/productOperation/sceneManager/kankanScene.vue'),
+      //     meta: {
+      //       title: t('routes.dashboard.kankanScene'),
+      //       // icon: 'la:file-invoice-dollar',
+      //     },
+      //   },
+      //   {
+      //     path: 'minionScene',
+      //     name: 'MinionScene',
+      //     component: () => import('/@/views/productOperation/sceneManager/minionScene.vue'),
+      //     meta: {
+      //       title: t('routes.dashboard.MinionScene'),
+      //       // icon: 'la:file-invoice-dollar',
+      //     },
+      //   },
+      // ],
     },
     {
       path: 'sxz',

+ 30 - 83
src/views/productOperation/sceneManager/laserScene.vue

@@ -8,27 +8,8 @@
         stopButtonPropagation
         :actions="[
           {
-            label: '迁移',
-            icon: 'bx:move-horizontal',
-            popConfirm: {
-              title: '是否迁移?',
-              confirm: handleMove.bind(null, record),
-            },
-          },
-          {
-            label: '下载',
-            icon: 'carbon:download',
-            color: 'success',
-            onClick: handleDownload.bind(null, record),
-          },
-          {
-            label: '重算',
-            icon: 'bx:reset',
-            color: 'warning',
-            popConfirm: {
-              title: '是否重算?',
-              confirm: handleReset.bind(null, record),
-            },
+            label: '同屏',
+            icon: 'akar-icons:double-check',
           },
           {
             label: '删除',
@@ -88,15 +69,6 @@
           title: '场景标题',
           dataIndex: 'sceneName',
           width: 150,
-          // customRender: ({ record }) => {
-          //   return (
-          //     record.createTime &&
-          //     h(Time, {
-          //       value: record.createTime,
-          //       mode: 'datetime',
-          //     })
-          //   );
-          // },
         },
         {
           title: '场景码',
@@ -104,53 +76,24 @@
           ellipsis: false,
           width: 80,
         },
-        {
-          title: '拍摄时间',
-          dataIndex: 'createTime',
-          width: 180,
-          customRender: ({ record }) => {
-            return (
-              record.createTime &&
-              h(Time, {
-                value: record.createTime,
-                mode: 'datetime',
-              })
-            );
-          },
-        },
-        {
-          title: '计算完成时间',
-          dataIndex: 'amount',
-          width: 180,
-          customRender: ({ record }) => {
-            return (
-              record.createTime &&
-              h(Time, {
-                value: record.createTime,
-                mode: 'datetime',
-              })
-            );
-          },
-        },
+
         {
           title: 'sn码',
           dataIndex: 'snCode',
           width: 180,
         },
         {
-          title: '场景大小',
+          title: '方案标题',
+          dataIndex: 'sceneSize',
+          width: 80,
+        },
+        {
+          title: '发布状态',
           dataIndex: 'sceneSize',
           width: 80,
-          customRender: ({ record }) => {
-            return h(
-              'span',
-              { class: 'sceneSize' },
-              Math.ceil(record.sceneSize / 1024 / 1024) + 'M',
-            );
-          },
         },
         {
-          title: '是否复制',
+          title: '是否精品',
           dataIndex: 'isCopy',
           width: 80,
           customRender: ({ record }) => {
@@ -158,7 +101,7 @@
           },
         },
         {
-          title: '复制时间',
+          title: '创建时间',
           dataIndex: 'copyTime',
           width: 180,
           customRender: ({ record }) => {
@@ -171,27 +114,31 @@
           },
         },
         {
-          title: '绑定账号',
-          dataIndex: 'userName',
-          width: 100,
-        },
-        {
-          title: '浏览量',
-          dataIndex: 'viewCount',
-          width: 80,
+          title: '最新编辑时间',
+          dataIndex: 'copyTime',
+          width: 180,
+          customRender: ({ record }) => {
+            return record.copyTime
+              ? h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })
+              : '-';
+          },
         },
         {
-          title: '状态',
-          dataIndex: 'statusString',
-          width: 80,
+          title: '用户账号',
+          dataIndex: 'userName',
+          width: 100,
         },
+
         {
           title: '操作',
           dataIndex: 'action',
           slots: { customRender: 'action' },
           ifShow: true,
           fixed: 'right',
-          width: 280,
+          width: 110,
         },
       ];
       const searchForm: Partial<FormProps> = {
@@ -211,7 +158,7 @@
           },
           {
             field: 'snCode',
-            label: 'sn码',
+            label: '方案名称',
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -223,7 +170,7 @@
           },
           {
             field: 'userName',
-            label: '绑定账号',
+            label: '用户账号',
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -240,7 +187,7 @@
         title: '四维深时场景列表',
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
-        searchInfo: { type: 2 },
+        searchInfo: { type: 1 },
         useSearchForm: true,
         formConfig: searchForm,
         showTableSetting: true,

+ 92 - 96
src/views/productOperation/sceneManager/minionScene.vue

@@ -8,27 +8,18 @@
         stopButtonPropagation
         :actions="[
           {
-            label: '迁移',
-            icon: 'bx:move-horizontal',
-            onClick: handleDelete.bind(null, record),
-          },
-          {
-            label: '下载',
-            icon: 'carbon:download',
-            color: 'success',
-            onClick: handleDelete.bind(null, record),
-          },
-          {
-            label: '重算',
-            icon: 'bx:reset',
-            color: 'warning',
-            onClick: handleDelete.bind(null, record),
+            label: '同屏',
+            icon: 'akar-icons:double-check',
           },
           {
             label: '删除',
             icon: 'ic:outline-delete-outline',
             color: 'error',
-            onClick: handleDelete.bind(null, record),
+            popConfirm: {
+              title: '是否删除?',
+              confirm: handleDelete.bind(null, record),
+              placement: 'topLeft',
+            },
           },
         ]"
       />
@@ -36,7 +27,7 @@
   </BasicTable>
 </template>
 <script lang="ts">
-  import { defineComponent, h } from 'vue';
+  import { defineComponent, h, reactive, toRefs } from 'vue';
   import {
     BasicTable,
     useTable,
@@ -51,8 +42,15 @@
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { Switch } from 'ant-design-vue';
-  import { operateSceneList } from '/@/api/operate';
-
+  import {
+    operateSceneList,
+    sceneMove,
+    sceneDelete,
+    sceneReset,
+    sceneDownload,
+    sceneCopy,
+  } from '/@/api/operate';
+  import { message } from 'ant-design-vue';
   export default defineComponent({
     components: {
       BasicTable,
@@ -65,20 +63,12 @@
     setup() {
       const { t } = useI18n();
       const { createMessage, createConfirm } = useMessage();
+
       const columns: BasicColumn[] = [
         {
           title: '场景标题',
           dataIndex: 'sceneName',
           width: 150,
-          // customRender: ({ record }) => {
-          //   return (
-          //     record.createTime &&
-          //     h(Time, {
-          //       value: record.createTime,
-          //       mode: 'datetime',
-          //     })
-          //   );
-          // },
         },
         {
           title: '场景码',
@@ -86,53 +76,24 @@
           ellipsis: false,
           width: 80,
         },
+
         {
-          title: '拍摄时间',
-          dataIndex: 'createTime',
-          width: 180,
-          customRender: ({ record }) => {
-            return (
-              record.createTime &&
-              h(Time, {
-                value: record.createTime,
-                mode: 'datetime',
-              })
-            );
-          },
-        },
-        {
-          title: '计算完成时间',
-          dataIndex: 'amount',
+          title: 'sn码',
+          dataIndex: 'snCode',
           width: 180,
-          customRender: ({ record }) => {
-            return (
-              record.createTime &&
-              h(Time, {
-                value: record.createTime,
-                mode: 'datetime',
-              })
-            );
-          },
         },
         {
-          title: 'sn码',
-          dataIndex: 'snCode',
+          title: '方案标题',
+          dataIndex: 'sceneSize',
           width: 80,
         },
         {
-          title: '场景大小',
+          title: '发布状态',
           dataIndex: 'sceneSize',
           width: 80,
-          customRender: ({ record }) => {
-            return h(
-              'span',
-              { class: 'sceneSize' },
-              Math.ceil(record.sceneSize / 1024 / 1024) + 'M',
-            );
-          },
         },
         {
-          title: '是否复制',
+          title: '是否精品',
           dataIndex: 'isCopy',
           width: 80,
           customRender: ({ record }) => {
@@ -140,7 +101,7 @@
           },
         },
         {
-          title: '复制时间',
+          title: '创建时间',
           dataIndex: 'copyTime',
           width: 180,
           customRender: ({ record }) => {
@@ -153,27 +114,31 @@
           },
         },
         {
-          title: '绑定账号',
-          dataIndex: 'userName',
-          width: 100,
-        },
-        {
-          title: '浏览量',
-          dataIndex: 'viewCount',
-          width: 80,
+          title: '最新编辑时间',
+          dataIndex: 'copyTime',
+          width: 180,
+          customRender: ({ record }) => {
+            return record.copyTime
+              ? h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })
+              : '-';
+          },
         },
         {
-          title: '状态',
-          dataIndex: 'statusString',
-          width: 80,
+          title: '用户账号',
+          dataIndex: 'userName',
+          width: 100,
         },
+
         {
           title: '操作',
           dataIndex: 'action',
           slots: { customRender: 'action' },
           ifShow: true,
           fixed: 'right',
-          width: 280,
+          width: 110,
         },
       ];
       const searchForm: Partial<FormProps> = {
@@ -193,7 +158,7 @@
           },
           {
             field: 'snCode',
-            label: 'sn码',
+            label: '方案名称',
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -205,7 +170,7 @@
           },
           {
             field: 'userName',
-            label: '绑定账号',
+            label: '用户账号',
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -217,9 +182,9 @@
           },
         ],
       };
-      const [registerTable] = useTable({
+      const [registerTable, { reload }] = useTable({
         api: operateSceneList,
-        title: '四维看见场景列表',
+        title: '四维深时场景列表',
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
         searchInfo: { type: 1 },
@@ -235,27 +200,58 @@
         },
         canResize: false,
       });
-      function handleDelete(record: Recordable) {
-        console.log('点击了删除', record);
+      async function handleDelete(record: Recordable) {
+        console.log('handleDelete', record);
+
+        sceneDelete({ num: record.num })
+          .then(() => {
+            message.success({
+              content: '删除成功',
+            });
+
+            reload();
+          })
+          .catch(() => {
+            message.success({
+              content: '删除失败',
+            });
+          });
       }
-      function handleOpen(record: Recordable) {
-        console.log('点击了启用', record);
+      async function handleMove(record: Recordable) {
+        sceneMove({ snCode: record.snCode, num: record.num })
+          .then(() => {
+            message.success({
+              content: '迁移成功',
+            });
+          })
+          .catch(() => {
+            message.success({
+              content: '迁移失败',
+            });
+          });
       }
-      function exportExcel() {
-        createConfirm({
-          iconType: 'warning',
-          title: () => h('span', '温馨提示'),
-          content: () => h('span', '确定当前标签下的订单记录?'),
-          onOk: async () => {
-            // await DownExport();
-          },
-        });
+      function handleDownload(record: Recordable) {
+        console.log('handleDownload', record);
+      }
+      function handleReset(record: Recordable) {
+        console.log('handleReset', record);
       }
+      // function exportExcel() {
+      //   createConfirm({
+      //     iconType: 'warning',
+      //     title: () => h('span', '温馨提示'),
+      //     content: () => h('span', '确定当前标签下的订单记录?'),
+      //     onOk: async () => {
+      //       // await DownExport();
+      //     },
+      //   });
+      // }
       return {
         registerTable,
         handleDelete,
-        handleOpen,
-        exportExcel,
+        handleMove,
+        handleDownload,
+        handleReset,
       };
     },
   });

+ 18 - 18
src/views/product/AddModal.vue

@@ -8,9 +8,9 @@
     @ok="handleSubmit"
   >
     <div class="pt-2px pr-3px">
-      <BasicForm @register="registerForm" :model="model" >
+      <BasicForm @register="registerForm" :model="model">
         <template #text="{ model, field }">
-          {{ model[field]  }}
+          {{ model[field] }}
         </template>
       </BasicForm>
     </div>
@@ -34,8 +34,8 @@
     setup(props, { emit }) {
       const modelRef = ref({});
       const fileFlow = reactive({
-        file:null
-      })
+        file: null,
+      });
       const { createMessage } = useMessage();
       const schemas: FormSchema[] = [
         {
@@ -62,9 +62,9 @@
               // @ts-ignore
               validator: async (rule, value) => {
                 if (!value) {
-                  return Promise.reject(t('common.inputText')+t('routes.product.version'));
+                  return Promise.reject(t('common.inputText') + t('routes.product.version'));
                 }
-                if(/.*[\u4e00-\u9fa5]+.*$/.test(value)){
+                if (/.*[\u4e00-\u9fa5]+.*$/.test(value)) {
                   /* eslint-disable-next-line */
                   return Promise.reject('不支持中文字符');
                 }
@@ -92,7 +92,7 @@
               validator: async (rule, value) => {
                 const regPos = /.*[\u4e00-\u9fa5]+.*$/; // 非中文
                 if (!value) {
-                  return Promise.reject(t('common.inputText')+t('routes.product.minVersion'));
+                  return Promise.reject(t('common.inputText') + t('routes.product.minVersion'));
                 }
                 if (regPos.test(value)) {
                   /* eslint-disable-next-line */
@@ -130,12 +130,12 @@
             api: uploadApi,
             maxNumber: 1,
             maxSize: 1000,
-            fileFlow:true,
+            fileFlow: true,
             accept: ['4dage'],
             afterFetch: function (data) {
-              console.log('uploadApi',data)
+              console.log('uploadApi', data);
               Reflect.set(data, 'url', data.file);
-              fileFlow.file = data.file
+              fileFlow.file = data.file;
               return data;
             },
           },
@@ -217,22 +217,22 @@
         }
       }
       function onDataReceive(data) {
-        modelRef.value = data
+        modelRef.value = data;
         resetFields();
         setFieldsValue({
-          type:renderOwnTypeLabel(Number(data)),
+          type: renderOwnTypeLabel(Number(data)),
         });
       }
       const handleSubmit = async () => {
         try {
           const params = await validate();
           const apiData = {
-            data:{
-            ...params as any,
-            type:modelRef.value,
-            file:fileFlow.file,
-            }
-          }
+            data: {
+              ...(params as any),
+              type: modelRef.value,
+              file: fileFlow.file,
+            },
+          };
           console.log('res', apiData);
           const res = await AddAndUpload(apiData);
           console.log('res', res);

+ 356 - 71
src/views/productOperation/cameraScene.vue

@@ -1,35 +1,88 @@
 <template>
-  <BasicTable @register="registerTable">
-    <template #toolbar>
-      <a-button type="primary" @click="exportExcel"> 导出</a-button>
-    </template>
-    <template #bodyCell="{ column, record }">
-      <template v-if="column.key === 'action'">
-        <TableAction
-          stopButtonPropagation
-          :actions="[
-            {
-              label: '删除',
-              icon: 'ic:outline-delete-outline',
-              onClick: handleDelete.bind(null, record),
-            },
-          ]"
-          :dropDownActions="[
-            {
-              label: '启用',
-              popConfirm: {
-                title: '是否启用?',
-                confirm: handleOpen.bind(null, record),
+  <PageWrapper contentBackground>
+    <template #footer>
+      <a-tabs v-model:activeKey="tableType" @change="changeTable">
+        <a-tab-pane :key="0" tab="四维看看" />
+        <a-tab-pane :key="1" tab="四维看见" />
+        <a-tab-pane :key="2" tab="四维双目深时" />
+        <a-tab-pane :key="3" tab="四维双目Lite" /> </a-tabs
+    ></template>
+    <div class="desc-wrap-BasicTable">
+      <BasicTable @register="registerTable">
+        <template #toolbar>
+          <!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
+        </template>
+
+        <template #action="{ record }">
+          <TableAction
+            stopButtonPropagation
+            :actions="[
+              {
+                label: '迁移',
+                icon: 'bx:move-horizontal',
+
+                onClick: handleMove.bind(null, record),
               },
-            },
-          ]"
-        />
-      </template>
-    </template>
-  </BasicTable>
+              {
+                label: '下载',
+                disabled:
+                  (record.payStatus - 0 != 1 && record.status - 0 == 0) ||
+                  (record.payStatus - 0 != 1 && record.status - 0 == -1),
+                icon: 'carbon:download',
+                onClick: handleDownload.bind(null, record),
+              },
+              {
+                label: '重算',
+                disabled: record.payStatus != 1 && record.status - 0 == 0,
+                icon: 'bx:reset',
+                popConfirm: {
+                  title: '是否重算?',
+                  confirm: handleReset.bind(null, record),
+                },
+              },
+              {
+                label: '复制',
+                disabled:
+                  (record.payStatus != 1 && record.status - 0 == 0) ||
+                  (record.payStatus != 1 && record.status - 0 == -1),
+                icon: 'akar-icons:copy',
+                //onClick: handleCopy.bind(null, record),
+                popConfirm: {
+                  title: '是否复制?',
+                  confirm: handleCopy.bind(null, record),
+                },
+              },
+              {
+                label: '删除',
+                icon: 'ic:outline-delete-outline',
+                color: 'error',
+                //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 @register="registerMoveModal" />
+  </PageWrapper>
 </template>
 <script lang="ts">
-  import { defineComponent, h } from 'vue';
+  import { defineComponent, h, reactive, toRefs, ref } from 'vue';
   import {
     BasicTable,
     useTable,
@@ -39,30 +92,59 @@
     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 } from 'ant-design-vue';
+  import { Descriptions, Tabs, Progress } from 'ant-design-vue';
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useMessage } from '/@/hooks/web/useMessage';
-  import { Switch } from 'ant-design-vue';
-  import { DownList, DownExport } from '/@/api/order';
-
+  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 { func } from 'vue-types';
   export default defineComponent({
     components: {
+      DownLoadModal,
+      MoveModal,
       BasicTable,
       TableAction,
       PageWrapper,
-      TableImg,
       [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 tableType = ref<Recordable>(0); //0看看 、1看见、2深时
       const columns: BasicColumn[] = [
         {
-          title: '时间',
-          dataIndex: 'createTime',
+          title: '场景标题',
+          dataIndex: 'sceneName',
           width: 150,
+        },
+        {
+          title: '场景码',
+          dataIndex: 'num',
+          ellipsis: false,
+          width: 80,
+        },
+        {
+          title: '拍摄时间',
+          dataIndex: 'createTime',
+          width: 180,
           customRender: ({ record }) => {
             return (
               record.createTime &&
@@ -74,32 +156,97 @@
           },
         },
         {
-          title: '订单号',
-          dataIndex: 'orderSn',
-          ellipsis: false,
+          title: '计算完成时间',
+          dataIndex: 'amount',
+          width: 180,
+          customRender: ({ record }) => {
+            return (
+              record.createTime &&
+              h(Time, {
+                value: record.createTime,
+                mode: 'datetime',
+              })
+            );
+          },
+        },
+        {
+          title: 'sn码',
+          dataIndex: 'snCode',
           width: 180,
         },
         {
-          title: '用户名',
-          dataIndex: 'userName',
+          title: '场景大小',
+          dataIndex: 'sceneSize',
           width: 80,
+          customRender: ({ record }) => {
+            return h(
+              'span',
+              { class: 'sceneSize' },
+              Math.ceil(record.sceneSize / 1024 / 1024) + 'M',
+            );
+          },
         },
         {
-          title: '订单金额',
-          dataIndex: 'amount',
+          title: '是否复制',
+          dataIndex: 'isCopy',
           width: 80,
+          customRender: ({ record }) => {
+            return record.isCopy ? '是' : '否';
+          },
+        },
+        {
+          title: '复制时间',
+          dataIndex: 'copyTime',
+          width: 180,
+          customRender: ({ record }) => {
+            return record.copyTime
+              ? h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })
+              : '-';
+          },
         },
         {
-          title: '支付方式',
-          dataIndex: 'payType',
-          // slots: { customRender: 'orderType' },
+          title: '绑定账号',
+          dataIndex: 'userName',
+          width: 100,
+        },
+        {
+          title: '浏览量',
+          dataIndex: 'viewCount',
           width: 80,
         },
         {
-          title: '订单状态',
-          dataIndex: 'payStatus',
-          // slots: { customRender: 'orderStatus' },
+          title: '状态',
+          dataIndex: 'statusString',
           width: 80,
+          customRender: ({ record }) => {
+            let str;
+            switch (record.status - 0) {
+              case 0:
+                str = '计算中';
+                break;
+              case 1:
+                str = '计算成功';
+                break;
+              case -2:
+                str = '计算成功';
+                break;
+              case -1:
+                str = '计算失败';
+                break;
+            }
+            return record.payStatus == 1 ? '封存' : str;
+          },
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          slots: { customRender: 'action' },
+          ifShow: true,
+          fixed: 'right',
+          width: 350,
         },
       ];
       const searchForm: Partial<FormProps> = {
@@ -107,8 +254,8 @@
         schemas: [
           {
             field: 'sceneName',
-            label: '开票申请时间',
-            component: 'RangePicker',
+            label: '场景标题',
+            component: 'Input',
             componentProps: {
               maxLength: 100,
             },
@@ -118,9 +265,9 @@
             },
           },
           {
-            field: 'sceneName',
-            label: '支付时间',
-            component: 'RangePicker',
+            field: 'snCode',
+            label: 'sn码',
+            component: 'Input',
             componentProps: {
               maxLength: 100,
             },
@@ -130,8 +277,8 @@
             },
           },
           {
-            field: 'sceneName',
-            label: '订单号',
+            field: 'userName',
+            label: '绑定账号',
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -143,15 +290,21 @@
           },
         ],
       };
-      const [registerTable] = useTable({
-        api: DownList,
-        title: '发票列表',
+      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,
-        rowKey: 'id',
+        rowKey: 'num',
         fetchSetting: {
           pageField: 'pageNum',
           sizeField: 'pageSize',
@@ -160,28 +313,160 @@
         },
         canResize: false,
       });
-      function handleDelete(record: Recordable) {
-        console.log('点击了删除', record);
-      }
-      function handleOpen(record: Recordable) {
-        console.log('点击了启用', record);
+      function changeTable(val: string) {
+        reload();
       }
-      function exportExcel() {
+      async function handleCopy(record: Recordable) {
         createConfirm({
-          iconType: 'warning',
-          title: () => h('span', '温馨提示'),
-          content: () => h('span', '确定当前标签下的订单记录?'),
+          title: '复制场景',
+          content: '复制场景,场景归属在原相机下。<br/>确定要复制场景吗?',
           onOk: async () => {
-            await DownExport();
+            sceneCopy({ num: record.num })
+              .then(() => {
+                message.success({
+                  content: '删除成功',
+                });
+              })
+              .catch(() => {
+                message.success({
+                  content: '删除失败',
+                });
+              });
           },
         });
       }
+      async function handleDelete(record: Recordable) {
+        console.log('handleDelete', record);
+        // createConfirm({
+        //   title: '删除',
+        //   content: '确定要删除场景吗?',
+        //   onOk: async () => {
+        sceneDelete({ num: record.num })
+          .then(() => {
+            message.success({
+              content: '删除成功',
+            });
+
+            reload();
+          })
+          .catch(() => {
+            message.success({
+              content: '删除失败',
+            });
+          });
+        //   },
+        // });
+      }
+      async function handleMove(record: Recordable) {
+        openMoveModal(true, {
+          ...record,
+        });
+        // sceneMove({ snCode: record.snCode, num: record.num })
+        //   .then(() => {
+        //     message.success({
+        //       content: '迁移成功',
+        //     });
+        //   })
+        //   .catch(() => {
+        //     message.success({
+        //       content: '迁移失败',
+        //     });
+        //   });
+      }
+      let timer: null = ref(null);
+      const downloadOption = ref<Object>({});
+      const canDownload = ref<boolean>(true);
+      function handleDownload(record: Recordable) {
+        console.log('handleDownload', record);
+
+        checkDownLoad({ num: record.num }).then((res) => {
+          console.log(res);
+          if (res.downloadStatus == 0) {
+            // 未下载过,需要打包
+            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.percent >= 100) {
+                      canDownload.value = false;
+                      afterClose();
+                    }
+                    downloadOption.value = res;
+                    console.log(res);
+                  });
+                }, 1000);
+              }
+            });
+          } else {
+          }
+        });
+      }
+      function afterClose() {
+        clearInterval(timer.value);
+        timer.value = null;
+      }
+      function handleReset(record: Recordable) {
+        console.log('handleReset', record);
+        rebuildScene({ num: record.num })
+          .then(() => {
+            message.success({
+              content: '操作成功',
+            });
+            reload();
+          })
+          .catch(() => {});
+      }
+
       return {
         registerTable,
         handleDelete,
-        handleOpen,
-        exportExcel,
+        handleCopy,
+        handleMove,
+        handleDownload,
+        handleReset,
+        tableType,
+        changeTable,
+        t,
+        openDownModal,
+        registerDownModal,
+        registerMoveModal,
+        afterClose,
+        timer,
+        canDownload,
+        downloadOption,
+        cancelDownload,
       };
     },
   });
 </script>
+<style lang="less" scoped>
+  // .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;
+    }
+  }
+</style>

+ 77 - 0
src/views/productOperation/modal/DownLoadModal.vue

@@ -0,0 +1,77 @@
+<template>
+  <BasicModal
+    v-bind="$attrs"
+    @register="register"
+    title="场景下载"
+    :minHeight="0"
+    @visible-change="handleVisibleChange"
+    @cancel="hundleCancel"
+    @ok="handleSubmit"
+  >
+    <div class="pt-2px pr-3px">
+      <div class="warp">
+        <p>正在打包场景离线数据{{ downloadPercent }}</p>
+        <span>{{ modelRef.sceneName }}.zip</span>
+        <Progress :percent="downloadOption.percent" />
+      </div>
+    </div>
+  </BasicModal>
+</template>
+<script lang="ts">
+  import { defineComponent, ref, nextTick, onMounted, reactive } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { useI18n } from '/@/hooks/web/useI18n';
+  import { Progress } from 'ant-design-vue';
+  const { t } = useI18n();
+
+  export default defineComponent({
+    components: { BasicModal, Progress },
+    props: {
+      userData: { type: Object },
+      downloadOption: { type: Object },
+    },
+    emits: ['update', 'register', 'cancelDownload'],
+    setup(props, { emit }) {
+      const modelRef = ref({});
+
+      const { createMessage } = useMessage();
+
+      onMounted(() => {});
+      let addListFunc = () => {};
+      const [register, { closeModal }] = useModalInner((data) => {
+        // data && onDataReceive(data);
+        modelRef.value = data;
+      });
+
+      const handleSubmit = async () => {
+        console.log(props.downloadOption);
+        if (props.downloadOption.url) {
+          window.open(props.downloadOption.url);
+        }
+      };
+      const hundleCancel = async () => {
+        emit('cancelDownload');
+      };
+
+      return {
+        register,
+        modelRef,
+        handleSubmit,
+        hundleCancel,
+        addListFunc,
+        t,
+      };
+    },
+  });
+</script>
+<style lang="less" scoped>
+  .pt-2px {
+  }
+  .warp {
+    display: flex;
+    align-items: flex-start;
+    justify-content: flex-start;
+    flex-flow: column;
+  }
+</style>

+ 146 - 0
src/views/productOperation/modal/MoveModal.vue

@@ -0,0 +1,146 @@
+<template>
+  <BasicModal
+    v-bind="$attrs"
+    @register="register"
+    title="新增相机"
+    @visible-change="handleVisibleChange"
+    @cancel="resetFields"
+    @ok="handleSubmit"
+    :min-height="0"
+  >
+    <div class="pt-2px pr-3px">
+      <BasicForm @register="registerForm" :model="model">
+        <template #text="{ model, field }">
+          {{ model[field] }}
+        </template>
+      </BasicForm>
+    </div>
+  </BasicModal>
+</template>
+<script lang="ts">
+  import { defineComponent, ref, nextTick, onMounted, reactive } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { sceneMove } from '/@/api/operate';
+  import { useI18n } from '/@/hooks/web/useI18n';
+
+  const { t } = useI18n();
+  export default defineComponent({
+    components: { BasicModal, BasicForm },
+    props: {
+      userData: { type: Object },
+    },
+    emits: ['update', 'register'],
+    setup(props, { emit }) {
+      const modelRef = ref({});
+      const fileFlow = reactive({
+        file: null,
+      });
+      const { createMessage } = useMessage();
+      const schemas: FormSchema[] = [
+        {
+          field: 'type',
+          component: 'Input',
+          // defaultValue: '场景标题',
+          label: '场景标题',
+          slot: 'text',
+          colProps: {
+            span: 24,
+          },
+          // required: true,
+        },
+        {
+          field: 'snCode',
+          component: 'Input',
+          label: '迁移至',
+
+          required: true,
+          colProps: {
+            span: 24,
+          },
+          rules: [
+            {
+              required: true,
+              // @ts-ignore
+              validator: async (rule, value) => {
+                if (!value) {
+                  return Promise.reject('请输入相机sn码');
+                }
+                if (/.*[\u4e00-\u9fa5]+.*$/.test(value)) {
+                  /* eslint-disable-next-line */
+                  return Promise.reject('不支持中文字符');
+                }
+                return Promise.resolve();
+              },
+              trigger: 'change',
+            },
+          ],
+          componentProps: {
+            placeholder: '请输入相机sn码',
+            maxLength: 15,
+            onChange: (data) => {
+              console.log('data', data);
+            },
+          },
+        },
+      ];
+      const [registerForm, { validate, resetFields, setFieldsValue }] = useForm({
+        labelWidth: 120,
+        schemas,
+        showActionButtonGroup: false,
+        actionColOptions: {
+          span: 24,
+        },
+      });
+      onMounted(() => {});
+      let addListFunc = () => {};
+      const [register, { closeModal }] = useModalInner((data) => {
+        console.log(data);
+        data && onDataReceive(data);
+      });
+
+      function onDataReceive(data) {
+        modelRef.value = data;
+        resetFields();
+        setFieldsValue({
+          type: data.sceneName,
+        });
+      }
+      const handleSubmit = async () => {
+        try {
+          const params = await validate();
+          const apiData = {
+            snCode: params.snCode,
+            num: modelRef.value.num,
+          };
+          console.log('res', apiData, params);
+          const res = await sceneMove(apiData);
+          console.log('res', res);
+          closeModal();
+          resetFields();
+          createMessage.success('场景迁移成功。');
+          emit('update');
+        } catch (error) {
+          console.log('not passing', error);
+        }
+      };
+      function handleVisibleChange(v) {
+        // console.log(v);
+        // v && props.userData && nextTick(() => onDataReceive(props.userData));
+      }
+      return {
+        register,
+        schemas,
+        registerForm,
+        model: modelRef,
+        fileFlow,
+        handleVisibleChange,
+        handleSubmit,
+        addListFunc,
+        resetFields,
+        t,
+      };
+    },
+  });
+</script>

+ 0 - 262
src/views/productOperation/sceneManager/kankanScene.vue

@@ -1,262 +0,0 @@
-<template>
-  <BasicTable @register="registerTable">
-    <template #toolbar>
-      <!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
-    </template>
-    <template #action="{ record }">
-      <TableAction
-        stopButtonPropagation
-        :actions="[
-          {
-            label: '迁移',
-            icon: 'bx:move-horizontal',
-            onClick: handleDelete.bind(null, record),
-          },
-          {
-            label: '下载',
-            icon: 'carbon:download',
-            color: 'success',
-            onClick: handleDelete.bind(null, record),
-          },
-          {
-            label: '重算',
-            icon: 'bx:reset',
-            color: 'warning',
-            onClick: handleDelete.bind(null, record),
-          },
-          {
-            label: '删除',
-            icon: 'ic:outline-delete-outline',
-            color: 'error',
-            onClick: handleDelete.bind(null, record),
-          },
-        ]"
-      />
-    </template>
-  </BasicTable>
-</template>
-<script lang="ts">
-  import { defineComponent, h } from 'vue';
-  import {
-    BasicTable,
-    useTable,
-    TableAction,
-    BasicColumn,
-    TableImg,
-    FormProps,
-  } from '/@/components/Table';
-  import { PageWrapper } from '/@/components/Page';
-  import { Time } from '/@/components/Time';
-  import { Descriptions } from 'ant-design-vue';
-  import { useI18n } from '/@/hooks/web/useI18n';
-  import { useMessage } from '/@/hooks/web/useMessage';
-  import { Switch } from 'ant-design-vue';
-  import { operateSceneList } from '/@/api/operate';
-
-  export default defineComponent({
-    components: {
-      BasicTable,
-      TableAction,
-      PageWrapper,
-      TableImg,
-      [Descriptions.name]: Descriptions,
-      [Descriptions.Item.name]: Descriptions.Item,
-    },
-    setup() {
-      const { t } = useI18n();
-      const { createMessage, createConfirm } = useMessage();
-      const columns: BasicColumn[] = [
-        {
-          title: '场景标题',
-          dataIndex: 'sceneName',
-          width: 150,
-          // customRender: ({ record }) => {
-          //   return (
-          //     record.createTime &&
-          //     h(Time, {
-          //       value: record.createTime,
-          //       mode: 'datetime',
-          //     })
-          //   );
-          // },
-        },
-        {
-          title: '场景码',
-          dataIndex: 'num',
-          ellipsis: false,
-          width: 80,
-        },
-        {
-          title: '拍摄时间',
-          dataIndex: 'createTime',
-          width: 180,
-          customRender: ({ record }) => {
-            return (
-              record.createTime &&
-              h(Time, {
-                value: record.createTime,
-                mode: 'datetime',
-              })
-            );
-          },
-        },
-        {
-          title: '计算完成时间',
-          dataIndex: 'amount',
-          width: 180,
-          customRender: ({ record }) => {
-            return (
-              record.createTime &&
-              h(Time, {
-                value: record.createTime,
-                mode: 'datetime',
-              })
-            );
-          },
-        },
-        {
-          title: 'sn码',
-          dataIndex: 'snCode',
-          width: 80,
-        },
-        {
-          title: '场景大小',
-          dataIndex: 'sceneSize',
-          width: 80,
-          customRender: ({ record }) => {
-            return h(
-              'span',
-              { class: 'sceneSize' },
-              Math.ceil(record.sceneSize / 1024 / 1024) + 'M',
-            );
-          },
-        },
-        {
-          title: '是否复制',
-          dataIndex: 'isCopy',
-          width: 80,
-          customRender: ({ record }) => {
-            return record.isCopy ? '是' : '否';
-          },
-        },
-        {
-          title: '复制时间',
-          dataIndex: 'copyTime',
-          width: 180,
-          customRender: ({ record }) => {
-            return record.copyTime
-              ? h(Time, {
-                  value: record.copyTime,
-                  mode: 'datetime',
-                })
-              : '-';
-          },
-        },
-        {
-          title: '绑定账号',
-          dataIndex: 'userName',
-          width: 100,
-        },
-        {
-          title: '浏览量',
-          dataIndex: 'viewCount',
-          width: 80,
-        },
-        {
-          title: '状态',
-          dataIndex: 'statusString',
-          width: 80,
-        },
-        {
-          title: '操作',
-          dataIndex: 'action',
-          slots: { customRender: 'action' },
-          ifShow: true,
-          fixed: 'right',
-          width: 280,
-        },
-      ];
-      const searchForm: Partial<FormProps> = {
-        labelWidth: 100,
-        schemas: [
-          {
-            field: 'sceneName',
-            label: '场景标题',
-            component: 'Input',
-            componentProps: {
-              maxLength: 100,
-            },
-            colProps: {
-              xl: 7,
-              xxl: 7,
-            },
-          },
-          {
-            field: 'snCode',
-            label: 'sn码',
-            component: 'Input',
-            componentProps: {
-              maxLength: 100,
-            },
-            colProps: {
-              xl: 7,
-              xxl: 7,
-            },
-          },
-          {
-            field: 'userName',
-            label: '绑定账号',
-            component: 'Input',
-            componentProps: {
-              maxLength: 100,
-            },
-            colProps: {
-              xl: 6,
-              xxl: 6,
-            },
-          },
-        ],
-      };
-      const [registerTable] = useTable({
-        api: operateSceneList,
-        title: '四维看看场景列表',
-        // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
-        columns: columns,
-        searchInfo: { type: 0 },
-        useSearchForm: true,
-        formConfig: searchForm,
-        showTableSetting: true,
-        rowKey: 'num',
-        fetchSetting: {
-          pageField: 'pageNum',
-          sizeField: 'pageSize',
-          listField: 'list',
-          totalField: 'total',
-        },
-        canResize: false,
-      });
-      function handleDelete(record: Recordable) {
-        console.log('点击了删除', record);
-      }
-      function handleOpen(record: Recordable) {
-        console.log('点击了启用', record);
-      }
-      function exportExcel() {
-        createConfirm({
-          iconType: 'warning',
-          title: () => h('span', '温馨提示'),
-          content: () => h('span', '确定当前标签下的订单记录?'),
-          onOk: async () => {
-            // await DownExport();
-          },
-        });
-      }
-      return {
-        registerTable,
-        handleDelete,
-        handleOpen,
-        exportExcel,
-      };
-    },
-  });
-</script>

+ 0 - 0
src/views/productOperation/sceneManager/liteScene.vue


+ 18 - 22
src/views/productOperation/viewKankan.vue

@@ -38,14 +38,7 @@
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { Switch } from 'ant-design-vue';
-  import {
-    operateSceneList,
-    sceneMove,
-    sceneDelete,
-    sceneReset,
-    sceneDownload,
-    sceneCopy,
-  } from '/@/api/operate';
+  import { overallList, overallDelete } from '/@/api/operate';
   import { message } from 'ant-design-vue';
   export default defineComponent({
     components: {
@@ -63,29 +56,32 @@
       const columns: BasicColumn[] = [
         {
           title: '作品标题',
-          dataIndex: 'sceneName',
+          dataIndex: 'name',
           width: 150,
+          customRender: ({ record }) => {
+            return record.name ? h('span', record.name) : '-';
+          },
         },
         {
           title: '作品码',
-          dataIndex: 'num',
+          dataIndex: 'sceneCodes',
           ellipsis: false,
-          width: 80,
+          width: 180,
         },
         {
           title: '用户账号',
-          dataIndex: 'userName',
+          dataIndex: 'userId',
           width: 100,
         },
 
         {
           title: '创建时间',
-          dataIndex: 'copyTime',
+          dataIndex: 'createTime',
           width: 180,
           customRender: ({ record }) => {
-            return record.copyTime
+            return record.createTime
               ? h(Time, {
-                  value: record.copyTime,
+                  value: record.createTime,
                   mode: 'datetime',
                 })
               : '-';
@@ -93,12 +89,12 @@
         },
         {
           title: '最新编辑时间',
-          dataIndex: 'copyTime',
+          dataIndex: 'updateTime',
           width: 180,
           customRender: ({ record }) => {
-            return record.copyTime
+            return record.updateTime
               ? h(Time, {
-                  value: record.copyTime,
+                  value: record.updateTime,
                   mode: 'datetime',
                 })
               : '-';
@@ -106,7 +102,7 @@
         },
         {
           title: '是否加密',
-          dataIndex: 'isCopy',
+          dataIndex: 'status',
           width: 80,
           customRender: ({ record }) => {
             return record.isCopy ? '是' : '否';
@@ -114,7 +110,7 @@
         },
         {
           title: '浏览量',
-          dataIndex: 'isCopy',
+          dataIndex: 'visit',
           width: 80,
         },
         {
@@ -157,7 +153,7 @@
         ],
       };
       const [registerTable, { reload }] = useTable({
-        api: operateSceneList,
+        api: overallList,
         title: '四维深时场景列表',
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
@@ -177,7 +173,7 @@
       async function handleDelete(record: Recordable) {
         console.log('handleDelete', record);
 
-        sceneDelete({ num: record.num })
+        overallDelete({ id: record.id })
           .then(() => {
             message.success({
               content: '删除成功',