Explorar o código

feat: 实例化

jinx %!s(int64=3) %!d(string=hai) anos
pai
achega
3e15944069

+ 22 - 0
src/api/operate/index.ts

@@ -20,6 +20,8 @@ enum Api {
   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',
 }
 
 /**
@@ -47,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,

+ 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;

+ 9 - 15
src/views/productOperation/cameraScene.vue

@@ -25,13 +25,15 @@
               },
               {
                 label: '下载',
-                disabled: record.status - 0 == 0 || record.status - 0 == -1,
+                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.status - 0 == 0,
+                disabled: record.payStatus != 1 && record.status - 0 == 0,
                 icon: 'bx:reset',
                 popConfirm: {
                   title: '是否重算?',
@@ -40,13 +42,14 @@
               },
               {
                 label: '复制',
-                disabled: record.status - 0 == 0 || record.status - 0 == -1,
+                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),
-                  placement: 'topLeft',
                 },
               },
               {
@@ -57,7 +60,7 @@
                 popConfirm: {
                   title: '是否删除?',
                   confirm: handleDelete.bind(null, record),
-                  placement: 'topLeft',
+                  placement: 'topRight',
                 },
               },
             ]"
@@ -420,16 +423,7 @@
           })
           .catch(() => {});
       }
-      // function exportExcel() {
-      //   createConfirm({
-      //     iconType: 'warning',
-      //     title: () => h('span', '温馨提示'),
-      //     content: () => h('span', '确定当前标签下的订单记录?'),
-      //     onOk: async () => {
-      //       // await DownExport();
-      //     },
-      //   });
-      // }
+
       return {
         registerTable,
         handleDelete,

+ 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: '删除成功',