Browse Source

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

tangning 3 năm trước cách đây
mục cha
commit
1adab1ef29

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

@@ -29,9 +29,9 @@ export default {
   scenesRoom: '房间管理',
   devices: '设备管理',
   product: '产品管理',
-  firmware:'固件管理',
-  sdk:'Space Target SDK',
-  app:'App管理',
+  firmware: '固件管理',
+  sdk: 'Space Target SDK',
+  app: 'App管理',
   productRef: '商品属性',
   productList: '商品列表',
   productCategory: '商品分类',
@@ -53,4 +53,6 @@ export default {
   MinionScene: '四维看见',
   laserScene: '四维双目深时',
   liteScene: '四维双目lite',
+  sxz: '随心装方案管理',
+  viewKankan: '全景看看作品管理',
 };

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

@@ -61,6 +61,24 @@ export const productOperation: AppRouteRecordRaw = {
         },
       ],
     },
+    {
+      path: 'sxz',
+      name: 'Sxz',
+      component: () => import('/@/views/productOperation/sxz.vue'),
+      meta: {
+        title: t('routes.dashboard.sxz'),
+        // icon: 'la:file-invoice-dollar',
+      },
+    },
+    {
+      path: 'viewKankan',
+      name: 'ViewKankan',
+      component: () => import('/@/views/productOperation/viewKankan.vue'),
+      meta: {
+        title: t('routes.dashboard.viewKankan'),
+        // icon: 'la:file-invoice-dollar',
+      },
+    },
   ],
 };
 export default productOperation;

+ 1 - 1
src/views/productOperation/sceneManager/laserScene.vue

@@ -240,7 +240,7 @@
         title: '四维深时场景列表',
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
-        searchInfo: { type: 1 },
+        searchInfo: { type: 2 },
         useSearchForm: true,
         formConfig: searchForm,
         showTableSetting: true,

+ 258 - 0
src/views/productOperation/sxz.vue

@@ -0,0 +1,258 @@
+<template>
+  <BasicTable @register="registerTable">
+    <template #toolbar>
+      <!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
+    </template>
+    <template #action="{ record }">
+      <TableAction
+        stopButtonPropagation
+        :actions="[
+          {
+            label: '同屏',
+            icon: 'akar-icons:double-check',
+          },
+          {
+            label: '删除',
+            icon: 'ic:outline-delete-outline',
+            color: 'error',
+            popConfirm: {
+              title: '是否删除?',
+              confirm: handleDelete.bind(null, record),
+              placement: 'topLeft',
+            },
+          },
+        ]"
+      />
+    </template>
+  </BasicTable>
+</template>
+<script lang="ts">
+  import { defineComponent, h, reactive, toRefs } 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,
+    sceneMove,
+    sceneDelete,
+    sceneReset,
+    sceneDownload,
+    sceneCopy,
+  } from '/@/api/operate';
+  import { message } from 'ant-design-vue';
+  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,
+        },
+        {
+          title: '场景码',
+          dataIndex: 'num',
+          ellipsis: false,
+          width: 80,
+        },
+
+        {
+          title: 'sn码',
+          dataIndex: 'snCode',
+          width: 180,
+        },
+        {
+          title: '方案标题',
+          dataIndex: 'sceneSize',
+          width: 80,
+        },
+        {
+          title: '发布状态',
+          dataIndex: 'sceneSize',
+          width: 80,
+        },
+        {
+          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: 'copyTime',
+          width: 180,
+          customRender: ({ record }) => {
+            return record.copyTime
+              ? h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })
+              : '-';
+          },
+        },
+        {
+          title: '用户账号',
+          dataIndex: 'userName',
+          width: 100,
+        },
+
+        {
+          title: '操作',
+          dataIndex: 'action',
+          slots: { customRender: 'action' },
+          ifShow: true,
+          fixed: 'right',
+          width: 110,
+        },
+      ];
+      const searchForm: Partial<FormProps> = {
+        labelWidth: 100,
+        schemas: [
+          {
+            field: 'sceneName',
+            label: '场景标题',
+            component: 'Input',
+            componentProps: {
+              maxLength: 100,
+            },
+            colProps: {
+              xl: 7,
+              xxl: 7,
+            },
+          },
+          {
+            field: 'snCode',
+            label: '方案名称',
+            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, { reload }] = useTable({
+        api: operateSceneList,
+        title: '四维深时场景列表',
+        // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
+        columns: columns,
+        searchInfo: { type: 1 },
+        useSearchForm: true,
+        formConfig: searchForm,
+        showTableSetting: true,
+        rowKey: 'num',
+        fetchSetting: {
+          pageField: 'pageNum',
+          sizeField: 'pageSize',
+          listField: 'list',
+          totalField: 'total',
+        },
+        canResize: false,
+      });
+      async function handleDelete(record: Recordable) {
+        console.log('handleDelete', record);
+
+        sceneDelete({ num: record.num })
+          .then(() => {
+            message.success({
+              content: '删除成功',
+            });
+
+            reload();
+          })
+          .catch(() => {
+            message.success({
+              content: '删除失败',
+            });
+          });
+      }
+      async function handleMove(record: Recordable) {
+        sceneMove({ snCode: record.snCode, num: record.num })
+          .then(() => {
+            message.success({
+              content: '迁移成功',
+            });
+          })
+          .catch(() => {
+            message.success({
+              content: '迁移失败',
+            });
+          });
+      }
+      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,
+        handleMove,
+        handleDownload,
+        handleReset,
+      };
+    },
+  });
+</script>

+ 232 - 0
src/views/productOperation/viewKankan.vue

@@ -0,0 +1,232 @@
+<template>
+  <BasicTable @register="registerTable">
+    <template #toolbar>
+      <!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
+    </template>
+    <template #action="{ record }">
+      <TableAction
+        stopButtonPropagation
+        :actions="[
+          {
+            label: '删除',
+            icon: 'ic:outline-delete-outline',
+            color: 'error',
+            popConfirm: {
+              title: '是否删除?',
+              confirm: handleDelete.bind(null, record),
+              placement: 'topLeft',
+            },
+          },
+        ]"
+      />
+    </template>
+  </BasicTable>
+</template>
+<script lang="ts">
+  import { defineComponent, h, reactive, toRefs } 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,
+    sceneMove,
+    sceneDelete,
+    sceneReset,
+    sceneDownload,
+    sceneCopy,
+  } from '/@/api/operate';
+  import { message } from 'ant-design-vue';
+  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,
+        },
+        {
+          title: '作品码',
+          dataIndex: 'num',
+          ellipsis: false,
+          width: 80,
+        },
+        {
+          title: '用户账号',
+          dataIndex: 'userName',
+          width: 100,
+        },
+
+        {
+          title: '创建时间',
+          dataIndex: 'copyTime',
+          width: 180,
+          customRender: ({ record }) => {
+            return record.copyTime
+              ? h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })
+              : '-';
+          },
+        },
+        {
+          title: '最新编辑时间',
+          dataIndex: 'copyTime',
+          width: 180,
+          customRender: ({ record }) => {
+            return record.copyTime
+              ? h(Time, {
+                  value: record.copyTime,
+                  mode: 'datetime',
+                })
+              : '-';
+          },
+        },
+        {
+          title: '是否加密',
+          dataIndex: 'isCopy',
+          width: 80,
+          customRender: ({ record }) => {
+            return record.isCopy ? '是' : '否';
+          },
+        },
+        {
+          title: '浏览量',
+          dataIndex: 'isCopy',
+          width: 80,
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          slots: { customRender: 'action' },
+          ifShow: true,
+          fixed: 'right',
+          width: 50,
+        },
+      ];
+      const searchForm: Partial<FormProps> = {
+        labelWidth: 100,
+        schemas: [
+          {
+            field: 'sceneName',
+            label: '作品标题',
+            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, { reload }] = useTable({
+        api: operateSceneList,
+        title: '四维深时场景列表',
+        // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
+        columns: columns,
+        searchInfo: { type: 1 },
+        useSearchForm: true,
+        formConfig: searchForm,
+        showTableSetting: true,
+        rowKey: 'num',
+        fetchSetting: {
+          pageField: 'pageNum',
+          sizeField: 'pageSize',
+          listField: 'list',
+          totalField: 'total',
+        },
+        canResize: false,
+      });
+      async function handleDelete(record: Recordable) {
+        console.log('handleDelete', record);
+
+        sceneDelete({ num: record.num })
+          .then(() => {
+            message.success({
+              content: '删除成功',
+            });
+
+            reload();
+          })
+          .catch(() => {
+            message.success({
+              content: '删除失败',
+            });
+          });
+      }
+      async function handleMove(record: Recordable) {
+        sceneMove({ snCode: record.snCode, num: record.num })
+          .then(() => {
+            message.success({
+              content: '迁移成功',
+            });
+          })
+          .catch(() => {
+            message.success({
+              content: '迁移失败',
+            });
+          });
+      }
+      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,
+        handleMove,
+        handleDownload,
+        handleReset,
+      };
+    },
+  });
+</script>