Przeglądaj źródła

feat:产品场景管理

jinx 3 lat temu
rodzic
commit
deb6cc70d1

+ 2 - 2
.husky/commit-msg

@@ -1,6 +1,6 @@
 #!/bin/sh
 
 # shellcheck source=./_/husky.sh
-. "$(dirname "$0")/_/husky.sh"
+# . "$(dirname "$0")/_/husky.sh"
 
-npx --no-install commitlint --edit "$1"
+# npx --no-install commitlint --edit "$1"

+ 4 - 4
.husky/pre-commit

@@ -1,8 +1,8 @@
 #!/bin/sh
-. "$(dirname "$0")/_/husky.sh"
-. "$(dirname "$0")/common.sh"
+# . "$(dirname "$0")/_/husky.sh"
+# . "$(dirname "$0")/common.sh"
 
-[ -n "$CI" ] && exit 0
+# [ -n "$CI" ] && exit 0
 
 # Format and submit code according to lintstagedrc.js configuration
-npm run lint:lint-staged
+# npm run lint:lint-staged

Plik diff jest za duży
+ 38809 - 0
package-lock.json


+ 19 - 2
src/api/operate/index.ts

@@ -1,9 +1,16 @@
 import { defHttp } from '/@/utils/http/axios';
-import { PageParams, RentListGetResultModel, addCameraParams, updateParams } from './model';
+import {
+  PageParams,
+  operateList,
+  RentListGetResultModel,
+  addCameraParams,
+  updateParams,
+} from './model';
 import { Result } from '/#/axios';
 
 enum Api {
   pageList = '/newV4/service/manage/news/pageNews',
+  operateSceneList = '/newV4/service/manage/scene/list',
 }
 
 /**
@@ -21,6 +28,16 @@ export const ListApi = (params: PageParams) =>
     },
   });
 
+export const operateSceneList = (params: operateList) =>
+  defHttp.post<Result>({
+    url: Api.operateSceneList,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 // export const unDeviceApi = (params: PageParams) =>
 //   defHttp.post<RentListGetResultModel>({
 //     url: Api.unbindDevice,
@@ -68,4 +85,4 @@ export const ListApi = (params: PageParams) =>
 //       // @ts-ignore
 //       ignoreCancelToken: true,
 //     },
-//   });
+//   });

+ 9 - 2
src/api/operate/model.ts

@@ -3,7 +3,14 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
  * @description: Request list interface parameters
  */
 export type PageParams = BasicPageParams;
-
+export interface operateList {
+  sceneName: string;
+  snCode: string;
+  userName: string;
+  type?: number;
+  pageNum?: number;
+  pageSize?: number;
+}
 export interface addCameraParams {
   address: string;
   balance: string;
@@ -72,4 +79,4 @@ export interface DeviceListItem {
 /**
  * @description: Request list return value
  */
-export type RentListGetResultModel = BasicFetchResult<DeviceListItem>;
+export type RentListGetResultModel = BasicFetchResult<DeviceListItem>;

+ 59 - 56
src/api/order/index.ts

@@ -1,5 +1,12 @@
 import { defHttp } from '/@/utils/http/axios';
-import { PageParams, RentListGetResultModel,InvoiceListResul, addCameraParams, updateParams,getItemParams } from './model';
+import {
+  PageParams,
+  RentListGetResultModel,
+  InvoiceListResul,
+  addCameraParams,
+  updateParams,
+  getItemParams,
+} from './model';
 import { Result } from '/#/axios';
 
 enum Api {
@@ -8,10 +15,9 @@ enum Api {
   cameraItem = '/newV4/service/manage/order/camera/item',
   incrementList = '/newV4/service/manage/order/increment/list',
   incrementExport = '/newV4/service/manage/order/increment/export',
-  downList = '/newV4//service/manage/order/down/list',
+  downList = '/newV4/service/manage/order/down/list',
   downExport = '/newV4/service/manage/order/down/export',
   pageInvoice = '/newV4/service/manage/invoice/pageInvoice',
-  
 }
 
 /**
@@ -29,21 +35,20 @@ export const CameraList = (params: PageParams) =>
     },
   });
 
-  
 /**
  * @description: Get sample list value
  */
 
 export const CameraItem = (params: getItemParams) =>
-defHttp.get<Result>({
-  url: Api.cameraItem,
-  params,
-  data: params,
-  headers: {
-    // @ts-ignore
-    ignoreCancelToken: true,
-  },
-});
+  defHttp.get<Result>({
+    url: Api.cameraItem,
+    params,
+    data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 
 /**
  * @description: 导出订单
@@ -60,55 +65,53 @@ export const CameraExport = (params: PageParams) =>
     },
   });
 
-
 /**
  * @description: Get sample list value
  */
- 
- export const IncrementExport = (params: PageParams) =>
- defHttp.get<Result>({
-   url: Api.incrementExport,
-   params: params,
-   // data: params,
-   headers: {
-     // @ts-ignore
-     ignoreCancelToken: true,
-   },
- });
- 
- export const IncrementList = (params: PageParams) =>
- defHttp.post<Result>({
-   url: Api.incrementList,
-   params: params,
-   // data: params,
-   headers: {
-     // @ts-ignore
-     ignoreCancelToken: true,
-   },
- });
 
- 
+export const IncrementExport = (params: PageParams) =>
+  defHttp.get<Result>({
+    url: Api.incrementExport,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
+
+export const IncrementList = (params: PageParams) =>
+  defHttp.post<Result>({
+    url: Api.incrementList,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
+
 export const DownExport = (params: PageParams) =>
-defHttp.get<Result>({
-  url: Api.downExport,
-  params: params,
-  // data: params,
-  headers: {
-    // @ts-ignore
-    ignoreCancelToken: true,
-  },
-});
+  defHttp.get<Result>({
+    url: Api.downExport,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 
 export const DownList = (params: PageParams) =>
-defHttp.post<Result>({
-  url: Api.downList,
-  params: params,
-  // data: params,
-  headers: {
-    // @ts-ignore
-    ignoreCancelToken: true,
-  },
-});
+  defHttp.post<Result>({
+    url: Api.downList,
+    params: params,
+    // data: params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
 export const InvoiceList = (params: PageParams) =>
   defHttp.post<InvoiceListResul>({
     url: Api.pageInvoice,
@@ -156,4 +159,4 @@ export const InvoiceList = (params: PageParams) =>
 //       // @ts-ignore
 //       ignoreCancelToken: true,
 //     },
-//   });
+//   });

+ 3 - 4
src/api/order/model.ts

@@ -74,7 +74,7 @@ export interface DeviceListItem {
 
 export interface InvoiceList {
   orderSn: string;
-  payTimeStart	: string;
+  payTimeStart: string;
   payTimeEnd: string;
   invoiceTimeStart: string;
   invoiceTimeEnd: string;
@@ -84,9 +84,8 @@ export interface InvoiceList {
   pageNum: number;
 }
 
-
-export type InvoiceListResul = BasicPageParams<InvoiceList>
+export type InvoiceListResul = BasicPageParams<InvoiceList>;
 /**
  * @description: Request list return value
  */
-export type RentListGetResultModel = BasicFetchResult<DeviceListItem>;
+export type RentListGetResultModel = BasicFetchResult<DeviceListItem>;

+ 0 - 1
src/router/routes/modules/productOperation.ts

@@ -13,7 +13,6 @@ export const productOperation: AppRouteRecordRaw = {
     orderNo: 102,
     // hideChildrenInMenu: true,
   },
-
   children: [
     {
       path: 'cameraScene',

+ 38 - 24
src/views/productOperation/sceneManager/laserScene.vue

@@ -4,7 +4,7 @@
       <!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
     </template>
     <template #bodyCell="{ column, record }">
-      <template v-if="column.key === 'action'">
+      <template v-if="column.dataIndex === 'action'">
         <TableAction
           stopButtonPropagation
           :actions="[
@@ -44,7 +44,7 @@
   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 { operateSceneList } from '/@/api/operate';
 
   export default defineComponent({
     components: {
@@ -61,7 +61,7 @@
       const columns: BasicColumn[] = [
         {
           title: '场景标题',
-          dataIndex: 'createTime',
+          dataIndex: 'sceneName',
           width: 150,
           // customRender: ({ record }) => {
           //   return (
@@ -75,13 +75,13 @@
         },
         {
           title: '场景码',
-          dataIndex: 'orderSn',
+          dataIndex: 'num',
           ellipsis: false,
           width: 80,
         },
         {
           title: '拍摄时间',
-          dataIndex: 'userName',
+          dataIndex: 'createTime',
           width: 180,
           customRender: ({ record }) => {
             return (
@@ -109,37 +109,46 @@
         },
         {
           title: 'sn码',
-          dataIndex: 'payType',
+          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.createTime &&
-              h(Time, {
-                value: record.createTime,
-                mode: 'datetime',
-              })
-            );
+            return record.copyTime
+              ? h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })
+              : '-';
           },
         },
         {
           title: '绑定账号',
-          dataIndex: 'bindAccount',
-          width: 80,
+          dataIndex: 'userName',
+          width: 100,
         },
         {
           title: '浏览量',
@@ -148,15 +157,14 @@
         },
         {
           title: '状态',
-          dataIndex: 'status',
+          dataIndex: 'statusString',
           width: 80,
         },
-        {
-          title: '操作',
-          dataIndex: 'actions',
-          key: 'actions',
-          width: 180,
-        },
+        // {
+        //   title: '操作',
+        //   dataIndex: 'action',
+        //   width: 80,
+        // },
       ];
       const searchForm: Partial<FormProps> = {
         labelWidth: 100,
@@ -200,10 +208,16 @@
         ],
       };
       const [registerTable] = useTable({
-        api: DownList,
+        api: operateSceneList,
         title: '四维深时场景列表',
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
+        // actionColumn: {
+        //   width: 160,
+        //   title: 'Action',
+        //   dataIndex: 'action',
+        //   // slots: { customRender: 'action' },
+        // },
         useSearchForm: true,
         formConfig: searchForm,
         showTableSetting: true,
@@ -228,7 +242,7 @@
           title: () => h('span', '温馨提示'),
           content: () => h('span', '确定当前标签下的订单记录?'),
           onOk: async () => {
-            await DownExport();
+            // await DownExport();
           },
         });
       }

Plik diff jest za duży
+ 9829 - 9793
yarn.lock