Pārlūkot izejas kodu

二维图层管理三维图层管理

sujunling 2 gadi atpakaļ
vecāks
revīzija
ddc30d0502

+ 44 - 1
src/api/twoAndThree/menu.ts

@@ -8,6 +8,9 @@ enum Api {
   UpdateLayer2d = '/xld-2And3/updateLayer2d',
   SaveOneLayer2d = '/xld-2And3/saveOneLayer2d',
   RemoveLayer2d = '/xld-2And3/removeLayer2d',
+  UpdateLayer3d = '/xld-2And3/updateLayer3d',
+  SaveOneLayer3d = '/xld-2And3/saveOneLayer3d',
+  RemoveLayer3d = '/xld-2And3/removeLayer3d',
   GetMenuList = '/xld-2And3/findAllMenu',
   RemoveMenu = '/xld-2And3/removeMenu',
   SysAdminMenuList = '/admin/me/menus',
@@ -56,7 +59,7 @@ export function updateLayer2d(params, _id) {
 
 
 /**
- * @description: 跟新二维图层信息
+ * @description: 保存二维图层信息
  */
 export function saveOneLayer2d(params) {
   return defHttp.post({
@@ -81,7 +84,47 @@ export function removeLayer2d(params) {
   });
 }
 
+/**
+ * @description: 跟新三维图层信息
+ */
+export function updateLayer3d(params, _id) {
+  console.log(params);
+  return defHttp.post({
+    url: Api.UpdateLayer3d,
+    ...locationType,
+    data: {
+      id: _id,
+      data: params
+    },
+  });
+}
+
+
+/**
+ * @description: 保存三维图层信息
+ */
+export function saveOneLayer3d(params) {
+  return defHttp.post({
+    url: Api.SaveOneLayer3d,
+    ...locationType,
+    data: {
+      layer: params
+    },
+  });
+}
 
+/**
+ * @description: 删除三维图层
+ */
+export function removeLayer3d(params) {
+  return defHttp.post({
+    url: Api.RemoveLayer3d,
+    ...locationType,
+    data: {
+      id: params
+    },
+  });
+}
 
 /**
  * @description: 跟新按钮状态

+ 13 - 12
src/views/dataAdmin/assembly/index.vue

@@ -31,19 +31,20 @@
             onClick: handleEdit.bind(null, record),
           },
           {
-            label: '提交审核',
+            label: '编辑',
             icon: '' /**clarity:note-edit-line*/,
-            // ifShow: record.servicealiasname,
+            color: 'warning',
             disabled: record.bussid ? true : false,
-            // ifShow: record.servicealiasname,
-            onClick: sendApprove.bind(null, record),
+            onClick: handleEdit.bind(null, record),
           },
           {
-            label: '编辑',
-            icon: '' /**clarity:note-edit-line*/,
+            label: '提交审核',
             color: 'warning',
+            icon: '' /**clarity:note-edit-line*/,
+            // ifShow: record.servicealiasname,
             disabled: record.bussid ? true : false,
-            onClick: handleEdit.bind(null, record),
+            // ifShow: record.servicealiasname,
+            onClick: sendApprove.bind(null, record),
           },
           {
             label: '删除',
@@ -72,11 +73,11 @@
         </Tag>
       </template>
       <template #status="{ record }">
-        <Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : '#05B069'};`">
+        <Tag :style="`color:${record.nodename && !record.status ? 'red' : '#05B069'};`">
           {{
-            record.nodename === '' && record.status === 0 ? '未提交' : record.status === 0
-            ? '待审核' : record.status === 1 ? '审核通过' : record.status === 2
-              ? '审核不通过' : record.status === 3 ? '被驳回' : '未提交'
+            !record.nodename && !record.status && !record.bussid ? '未提交' : record.nodename && !record.status &&
+              record.bussid
+            ? '审核不通过' : record.status ? '审核通过' : !record.nodename && !record.status && !record.bussid ? '待审核' : ''
           }}
         </Tag>
       </template>
@@ -121,7 +122,7 @@ export default defineComponent({
       bordered: true,
       showIndexColumn: true,
       actionColumn: {
-        width: 240,
+        width: 250,
         title: '操作',
         dataIndex: 'action',
         slots: { customRender: 'action' },

+ 4 - 2
src/views/dataAdmin/dataAdmin/fileResourceUpload/index.vue

@@ -47,13 +47,15 @@
               //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
               //icon: 'clarity:note-edit-line',
               color: 'warning',
+              disabled: record.nodename ? true : false,
               onClick: handleEdit.bind(null, record),
             },
             {
-              label: '审核',
+              label: '提交审核',
               //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
               //icon: 'clarity:note-edit-line',
               color: 'warning',
+              disabled: record.nodename ? true : false,
               onClick: handleCheck.bind(null, record),
             },
             {
@@ -154,7 +156,7 @@ export default defineComponent({
       showIndexColumn: true,
       // 表格操作栏
       actionColumn: {
-        width: 220,
+        width: 250,
         title: '操作',
         dataIndex: 'action',
         slots: { customRender: 'action' },

+ 49 - 59
src/views/dataAdmin/dataAdmin/mapUpload/index.vue

@@ -1,21 +1,12 @@
 <template>
   <div class="p-4">
-    <BasicTable
-      :rowSelection="{ type: 'checkbox' }"
-      @register="registerTable"
-      :clickToRowSelect="false"
-    >
+    <BasicTable :rowSelection="{ type: 'checkbox' }" @register="registerTable" :clickToRowSelect="false">
       <template #toolbar>
         <Authority>
           <a-button type="primary" @click="handleCreate">新增地图</a-button>
         </Authority>
         <Authority>
-          <Popconfirm
-            title="您确定要批量删除数据"
-            ok-text="确定"
-            cancel-text="取消"
-            @confirm="handleDeleteOrBatchDelete(null)"
-          >
+          <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
             <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
           </Popconfirm>
         </Authority>
@@ -25,43 +16,43 @@
           @change="(checked: boolean) => statusChange(checked, record)" />
       </template> -->
       <template #action="{ record }">
-        <TableAction
-          :actions="[
-            {
-              label: '浏览',
-              icon: '' /**clarity:note-edit-line*/,
-              onClick: handleViewMap.bind(null, record),
+        <TableAction :actions="[
+          {
+            label: '浏览',
+            icon: '' /**clarity:note-edit-line*/,
+            onClick: handleViewMap.bind(null, record),
+          },
+          {
+            label: '查看',
+            icon: '' /**clarity:note-edit-line*/,
+            onClick: handleView.bind(null, record),
+          },
+          {
+            label: '编辑',
+            icon: '' /**clarity:note-edit-line*/,
+            color: 'warning',
+            disabled: record.nodename ? true : false,
+            onClick: handleEdit.bind(null, record),
+          },
+          {
+            label: '提交审核',
+            icon: '',
+            color: 'warning',
+            // ifShow: record.nodename === '',
+            disabled: record.nodename ? true : false,
+            onClick: handleExam.bind(null, record),
+          },
+          {
+            label: '删除',
+            icon: '' /**ant-design:delete-outlined'*/,
+            color: 'error',
+            ifShow: record.roleType != RoleEnum.SYS_ADMIN,
+            popConfirm: {
+              title: '是否确认删除',
+              confirm: handleDelete.bind(null, record),
             },
-            {
-              label: '查看',
-              icon: '' /**clarity:note-edit-line*/,
-              onClick: handleView.bind(null, record),
-            },
-            {
-              label: '编辑',
-              icon: '' /**clarity:note-edit-line*/,
-              color: 'warning',
-              onClick: handleEdit.bind(null, record),
-            },
-            {
-              label: '审核',
-              icon: '',
-              color: 'warning',
-              ifShow: record.nodename === '',
-              onClick: handleExam.bind(null, record),
-            },
-            {
-              label: '删除',
-              icon: '' /**ant-design:delete-outlined'*/,
-              color: 'error',
-              ifShow: record.roleType != RoleEnum.SYS_ADMIN,
-              popConfirm: {
-                title: '是否确认删除',
-                confirm: handleDelete.bind(null, record),
-              },
-            },
-          ]"
-        />
+          },
+        ]" />
       </template>
       <template #pdate="{ record }">
         <Tag :color="'red'">
@@ -72,15 +63,15 @@
         <Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : '#05B069'};`">
           {{
             record.status === 0
-              ? '审核中'
-              : record.status === 1
+            ? '审核中'
+            : record.status === 1
               ? '审核通过'
               : record.status === 2
-              ? '审核不通过'
-              : record.status === 3
-              ? '被驳回'
-              : record.status === '' 
-              ? '未提交' : '未提交'
+                ? '审核不通过'
+                : record.status === 3
+                  ? '被驳回'
+                  : record.status === ''
+                    ? '未提交' : '未提交'
           }}
         </Tag>
       </template>
@@ -134,8 +125,7 @@ export default defineComponent({
       formData.append('args[]', session.getItem('tokenV2'));
       formData.append(
         'args[]',
-        `{"type":"MR","fields":{"DATA":["serviceid","servicename","servicetype","servicealiasname"],"METADATA":["publisher ","publishdate"]},"pageIndex":1,"pageSize":10, "tagValue":"${
-          tagValue.value || ''
+        `{"type":"MR","fields":{"DATA":["serviceid","servicename","servicetype","servicealiasname"],"METADATA":["publisher ","publishdate"]},"pageIndex":1,"pageSize":10, "tagValue":"${tagValue.value || ''
         }" }`
       );
       return new Promise((resolve) => {
@@ -159,7 +149,7 @@ export default defineComponent({
       bordered: true,
       showIndexColumn: true,
       actionColumn: {
-        width: 220,
+        width: 250,
         title: '操作',
         dataIndex: 'action',
         slots: { customRender: 'action' },
@@ -224,7 +214,7 @@ export default defineComponent({
     }
 
     function handleExam(record: Recordable) {
-      console.log('审核信息',record)
+      console.log('审核信息', record)
     }
 
     function handleViewMap(record: Recordable) {
@@ -275,7 +265,7 @@ export default defineComponent({
         reload();
       }
     };
-    onBeforeMount(async () => {});
+    onBeforeMount(async () => { });
 
     return {
       moment,

+ 11 - 11
src/views/dataAdmin/dataAdmin/mapUpload/map.data.ts

@@ -72,22 +72,22 @@ export const columns: BasicColumn[] = [
     dataIndex: 'crs',
     width: 120,
   },
-  {
-    title: '资源标签',
-    dataIndex: 'service',
-    width: 120,
-  },
+  // {
+  //   title: '资源标签',
+  //   dataIndex: 'service',
+  //   width: 120,
+  // },
   {
     title: '发布人',
     dataIndex: 'publisher',
     width: 100,
   },
-  {
-    title: '发布时间',
-    dataIndex: 'publishdate',
-    width: 90,
-    slots: { customRender: 'pdate' },
-  },
+  // {
+  //   title: '发布时间',
+  //   dataIndex: 'publishdate',
+  //   width: 90,
+  //   slots: { customRender: 'pdate' },
+  // },
   {
     title: '当前环节',
     dataIndex: 'nodename',

+ 5 - 3
src/views/dataAdmin/dataAdmin/sceneResourceUpload/index.vue

@@ -44,13 +44,15 @@
               //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
               icon: '', //'clarity:note-edit-line',
               color: 'warning',
+              disabled: record.nodename ? true : false,
               onClick: handleEdit.bind(null, record),
             },
             {
-              label: '审核',
+              label: '提交审核',
               icon: '',
               color: 'warning',
-              ifShow: record.nodename === '',
+              // ifShow: record.nodename === '',
+              disabled: record.nodename ? true : false,
               onClick: handleExam.bind(null, record),
             },
             {
@@ -165,7 +167,7 @@ export default defineComponent({
       showIndexColumn: true,
       // 表格操作栏
       actionColumn: {
-        width: 220,
+        width: 250,
         title: '操作',
         dataIndex: 'action',
         slots: { customRender: 'action' },

+ 1 - 1
src/views/resource/examine/check.vue

@@ -93,7 +93,7 @@ export default defineComponent({
         if (res) {
           closeModal();
           emit('success');
-          createMessage.success(unref(isUpdate) ? '编辑成功' : '新增成功');
+          createMessage.success(unref(isUpdate) ? '修改状态成功' : '修改状态成功');
         }
       } finally {
         setTimeout(() => {

+ 79 - 0
src/views/systemAdmin/system/mapTools/layer3d/Modal.vue

@@ -0,0 +1,79 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerDrawer" showFooter :title="getTitle" width="40%" @ok="handleSubmit">
+    <BasicForm @register="registerForm" />
+  </BasicModal>
+</template>
+<script lang="ts">
+import { defineComponent, ref, computed, unref } from 'vue';
+import { BasicForm, useForm } from '/@/components/Form/index';
+import { formSchema } from './config.data';
+import { BasicModal, useModalInner } from '/@/components/Modal';
+import { updateLayer3d, saveOneLayer3d } from '/@/api/twoAndThree/menu';
+
+export default defineComponent({
+  name: 'MenuDrawer',
+  components: { BasicForm, BasicModal },
+  emits: ['success', 'register'],
+  setup(_, { emit }) {
+    const isUpdate = ref(true);
+    var _id = null;
+
+    const [registerForm, { resetFields, setFieldsValue, updateSchema, validate }] = useForm({
+      labelWidth: 100,
+      schemas: formSchema,
+      showActionButtonGroup: false,
+      baseColProps: { lg: 24, md: 24 },
+    });
+
+    //默认传递页面数据
+    const [registerDrawer, { setModalProps, closeModal }] = useModalInner(async (data) => {
+      resetFields();
+      setModalProps({ confirmLoading: false });
+      isUpdate.value = !!data?.isUpdate;
+
+      //如果是编辑操作,设置页面数据
+      if (unref(isUpdate)) {
+        console.log("编辑:", data)
+        //为表单赋值
+        if (data.record.view) data.record.view = JSON.stringify(data.record.view)
+        if (data.record.subdomains) data.record.subdomains = JSON.stringify(data.record.subdomains)
+        _id = data.record._id;
+        setFieldsValue({
+          ...data.record,
+        });
+      }
+    });
+
+    //得到页面标题
+    const getTitle = computed(() => !unref(isUpdate) ? '创建图层' : '编辑图层');
+
+    //提交按钮
+    async function handleSubmit() {
+      try {
+        const values = await validate();
+        setModalProps({ confirmLoading: true });
+        console.log("values:", values)
+
+        if (values.view) values.view = JSON.parse(values.view);
+        if (values.subdomains) values.subdomains = JSON.parse(values.subdomains);
+        if (values.name) values.title = values.name;
+
+
+        if (unref(isUpdate)) {
+          // updateMenu
+          await updateLayer3d(values, unref(isUpdate) ? _id : null);
+        } else {
+          // saveMenu
+          await saveOneLayer3d(values);
+        }
+        closeModal(); //关闭侧框
+        emit('success');
+      } finally {
+        setModalProps({ confirmLoading: false });
+      }
+    }
+
+    return { registerDrawer, registerForm, getTitle, handleSubmit };
+  },
+});
+</script>

+ 135 - 0
src/views/systemAdmin/system/mapTools/layer3d/config.data.ts

@@ -0,0 +1,135 @@
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { h } from 'vue';
+import { Tag } from 'ant-design-vue';
+import { Icon } from '/@/components/Icon';
+import { useI18n } from '/@/hooks/web/useI18n';
+const { t } = useI18n();
+
+//二维图层管理表格列
+export const columns = [
+    {
+        title: '底图名称',
+        dataIndex: 'name',
+    },
+    {
+        title: '底图标识',
+        dataIndex: 'id',
+    },
+    {
+        title: '底图类型',
+        dataIndex: 'type',
+    },
+    {
+        title: '坐标编码',
+        dataIndex: 'epsg',
+    },
+    {
+        title: '底图地址',
+        dataIndex: 'url',
+    },
+    {
+        title: '显示隐藏',
+        dataIndex: 'show',
+        slots: { customRender: 'show' },
+    },
+    // {
+    //     title: '层级范围',
+    //     dataIndex: 'level',
+    //     slots: { customRender: 'level' },
+    // }
+
+    // {
+    //     title: '审核状态',
+    //     dataIndex: 'status',
+    //     width: 110,
+    //     slots: { customRender: 'status' },
+    //   },
+];
+
+
+//----------------------------------新增、编辑----------------------------------------------------------
+export const formSchema: FormSchema[] = [
+    {
+        field: 'name',
+        label: '底图名称',
+        component: 'Input',
+        required: true,
+        componentProps: {
+            maxLength: 255,
+        },
+    },
+    {
+        field: 'id',
+        label: '底图标识',
+        component: 'Input',
+        required: true,
+        componentProps: {
+            maxLength: 255,
+        },
+    },
+    {
+        field: 'index',
+        label: '图层层级',
+        component: 'Input',
+        componentProps: {
+            maxLength: 255,
+        },
+    },
+    {
+        field: 'show',
+        label: '显示隐藏',
+        component: 'RadioButtonGroup',
+        defaultValue: true,
+        componentProps: {
+            options: [
+                { label: '显示', value: true },
+                { label: '隐藏', value: false },
+            ],
+        },
+    },
+    {
+        field: 'type',
+        label: '底图类型',
+        required: true,
+        component: 'Select',
+        defaultValue: 'S3M',
+        componentProps: {
+            options: [
+                { label: '超图模型', value: 'S3M' },
+                { label: '通用倾斜', value: '3DTITLE' },
+            ],
+        },
+        colProps: { span: 6 },
+    },
+    {
+        field: 'subdomains',
+        label: '地图子域',
+        component: 'Input',
+        componentProps: {
+            maxLength: 255,
+        },
+    },
+    {
+        field: 'url',
+        label: '底图地址',
+        component: 'InputTextArea',
+        required: true,
+        colProps: { span: 24 },
+        componentProps: {
+            rows: 8,
+            maxLength: 255,
+        },
+    },
+    {
+        field: 'view',
+        label: '观察视角',
+        component: 'InputTextArea',
+        colProps: { span: 24 },
+        componentProps: {
+            rows: 6,
+            maxLength: 255,
+        },
+    },
+
+];

+ 80 - 339
src/views/systemAdmin/system/mapTools/layer3d/index.vue

@@ -1,17 +1,20 @@
 <template>
-    <div class="layer3d p-4">
-        <div class="layer3d-body">
+    <div class="layer2d p-4">
+        <div class="layer2d-body">
             <BasicTable @register="registerTable">
                 <template #toolbar>
-                    <Button type="primary" @click="openDialog(null)">
+                    <Button type="primary" @click="handleCreate(null)">
                         新增图层
                     </Button>
-                    <Button type="primary" danger :disabled="hasSelected" @click="delAllData">
+                    <!-- <Button type="primary" danger :disabled="hasSelected" @click="delAllData">
                         批量删除
-                    </Button>
+                    </Button> -->
+                </template>
+                <template #level="{ record }">
+                    <div>{{ record.minimumLevel }}-{{ record.maximumLevel }}</div>
                 </template>
-                <template #flyTo="{ record }">
-                    <div>{{ record.flyTo ? '是' : '否' }}</div>
+                <template #show="{ record }">
+                    <div>{{ record.show ? '显示' : '隐藏' }}</div>
                 </template>
                 <template #func="{ record }">
                     <TableAction :actions="[
@@ -35,6 +38,8 @@
                 </template>
             </BasicTable>
         </div>
+        <!-- 弹出框 -->
+        <Modal @register="registerDrawer" @success="handleSuccess" />
     </div>
 </template>
 
@@ -43,348 +48,33 @@ import { defineComponent, onMounted, watch, ref, reactive, toRefs, computed } fr
 // 导入表格组件,表格事件
 import { BasicTable, useTable, TableAction } from '/@/components/Table';
 import { Button } from 'ant-design-vue';
-
-import { message, Modal } from 'ant-design-vue';
+import { message, notification } from 'ant-design-vue';
 import moment from 'moment'
 import { session } from '/@/utils/Memory';
 import { get3dLayers } from '/@/api/sys/mapTools';
+import { removeLayer3d } from '/@/api/twoAndThree/menu';
+import { columns } from "./config.data";
+// 加载自定义侧边弹出框 组件
+import { useModal } from '/@/components/Modal';
+// 导入子页面【新增、修改】
+import Modal from './Modal.vue';
+import { isArray } from '/@/utils/is';
+
 
 export default defineComponent({
-    components: { BasicTable, TableAction, Button },
+    components: { BasicTable, TableAction, Button, Modal },
     name: "tools",
     setup() {
-        const toolsData = [
-            {
-                group: "常用工具",
-                isQuick: false,
-                label: "全图",
-                option: {},
-                idx: 0,
-                id: "418d4040-df24-4f44-a718-2d4c1729532a",
-                tip: "显示全图范围",
-                icon: "at-icon-quantu",
-                action: "zoomfull"
-            },
-            {
-                "group": "常用工具",
-                "isQuick": false,
-                "label": "环境设置",
-                "option": {},
-                "idx": 1,
-                "id": "418d4040-df24-4f44-a718-2d4c1720032a",
-                "tip": "环境设置",
-                "icon": "at-icon-quanjingtu",
-                "action": "envConfig"
-            },
-            {
-                "action": "lookdown3D",
-                "label": "俯视",
-                "option": {},
-                "icon": "at-icon-fushi",
-                "idx": 2,
-                "group": "常用工具",
-                "isQuick": true,
-                "id": "7a3e12c5-e39b-4466-bbf7-c7f38e691ca7",
-                "tip": "俯视看图,仰角-90°"
-            },
-            {
-                "idx": 3,
-                "icon": "at-icon-zhengbei",
-                "isQuick": false,
-                "action": "looknorth3D",
-                "label": "正北",
-                "tip": "朝正北看图,方位角为0°",
-                "option": {},
-                "id": "3f4bc0ec-20fa-4ec5-856a-48b7ec1997f0",
-                "group": "常用工具"
-            },
-            {
-                "label": "量长度",
-                "option": {
-                    "measureType": "length"
-                },
-                "idx": 16,
-                "icon": "at-icon-liangchangdu",
-                "isQuick": false,
-                "id": "1b136e85-159d-4d01-90f8-3f1e8b545898",
-                "action": "MeasureAction",
-                "group": "测量/多屏",
-                "tip": "测量长度"
-            },
-            {
-                "tip": "测量高度",
-                "icon": "at-icon-lianggaodu",
-                "label": "量高度",
-                "group": "测量/多屏",
-                "option": {
-                    "measureType": "height"
-                },
-                "idx": 17,
-                "isQuick": false,
-                "action": "MeasureAction",
-                "id": "2a894bf2-7d7e-44fc-ba6e-219135a57741"
-            },
-            {
-                "icon": "at-icon-liangmianji",
-                "tip": "测量面积",
-                "isQuick": false,
-                "label": "量面积",
-                "idx": 18,
-                "group": "测量/多屏",
-                "option": {
-                    "measureType": "area"
-                },
-                "id": "e2a2050f-3822-4bbe-83fa-34991790e058",
-                "action": "MeasureAction"
-            },
-            {
-                "group": "测量/多屏",
-                "label": "双屏",
-                "isQuick": true,
-                "idx": 19,
-                "tip": "两屏对比",
-                "icon": "at-icon-liangping",
-                "id": "d34d9973-2841-4c4b-8d1b-161b41ce57c9",
-                "option": {
-                    "screenNum": 2
-                },
-                "action": "AttachedMapAction"
-            },
-            {
-                "option": {
-                    "screenNum": 3
-                },
-                "tip": "三屏对比",
-                "action": "AttachedMapAction",
-                "idx": 20,
-                "group": "测量/多屏",
-                "label": "三屏",
-                "id": "0bedfcc9-91a1-4e57-939c-af1506097a94",
-                "icon": "at-icon-sanping",
-                "isQuick": false
-            },
-            {
-                "group": "测量/多屏",
-                "icon": "at-icon-siping",
-                "id": "4c56a30b-e82f-4d03-b09c-5c73911e11b7",
-                "label": "四屏",
-                "option": {
-                    "screenNum": 4
-                },
-                "isQuick": false,
-                "tip": "四屏对比",
-                "action": "AttachedMapAction",
-                "idx": 21
-            },
-            {
-                "id": "4342fbea-6e6e-4e9b-ac1e-730b8abc02b6",
-                "idx": 22,
-                "action": "DrawAction",
-                "group": "绘制工具",
-                "option": {
-                    "drawType": "point"
-                },
-                "tip": "绘制点",
-                "isQuick": false,
-                "label": "绘点",
-                "icon": "at-icon-huizhidian"
-            },
-            {
-                "idx": 23,
-                "icon": "at-icon-huizhixian",
-                "isQuick": false,
-                "label": "绘线",
-                "tip": "绘制线",
-                "id": "0f3e694b-df62-4fa0-96d1-1a1dfbc1ec14",
-                "action": "DrawAction",
-                "option": {
-                    "drawType": "polyline"
-                },
-                "group": "绘制工具"
-            },
-            {
-                "action": "DrawAction",
-                "isQuick": true,
-                "option": {
-                    "drawType": "polygon"
-                },
-                "idx": 24,
-                "group": "绘制工具",
-                "label": "绘面",
-                "tip": "绘制多边形",
-                "icon": "at-icon-huizhimian1",
-                "id": "34498b42-a0a6-4388-b099-e0b7ac8515db"
-            },
-            {
-                "group": "绘制工具",
-                "icon": "at-icon-huizhijuxing",
-                "option": {
-                    "drawType": "extent"
-                },
-                "tip": "绘制矩形",
-                "isQuick": false,
-                "idx": 25,
-                "action": "DrawAction",
-                "label": "绘矩形",
-                "id": "c00f16b2-29b2-4f5a-90b5-f27185785456"
-            },
-            {
-                "icon": "at-icon-huizhiyuan",
-                "label": "绘圆",
-                "isQuick": false,
-                "idx": 26,
-                "option": {
-                    "drawType": "circle"
-                },
-                "id": "4057f545-219d-4e1a-a6d9-4c0145123cfe",
-                "tip": "绘制圆形",
-                "action": "DrawAction",
-                "group": "绘制工具"
-            },
-            {
-                "id": "fd585e8d-a9e8-4de9-b13a-de17350459ec",
-                "option": {},
-                "label": "出图",
-                "isQuick": false,
-                "icon": "at-icon-tupian",
-                "tip": "导出当前地图为图片",
-                "idx": 32,
-                "group": "其他工具",
-                "action": "ExportImgAction"
-            },
-            {
-                "option": {},
-                "id": "a05acc83-4859-49fe-a12d-02bf154cc7ee",
-                "tip": "打印当前地图",
-                "action": "PrintAction",
-                "group": "其他工具",
-                "idx": 33,
-                "isQuick": false,
-                "label": "打印",
-                "icon": "at-icon-dayin"
-            },
-            {
-                "group": "其他工具",
-                "option": {},
-                "icon": "at-icon-huanchongfenxi",
-                "action": "BufferPointAction",
-                "tip": "缓冲绘制图形进行分析",
-                "id": "551f5ca2-a39e-43f8-8a0b-9db1ed36efa8",
-                "label": "点缓冲",
-                "idx": 35,
-                "isQuick": false
-            },
-            {
-                "group": "其他工具",
-                "option": {},
-                "icon": "at-icon-minus",
-                "action": "BufferLineAction",
-                "tip": "缓冲绘制图形进行分析",
-                "id": "551f5ca2-a39e-43f8-8a0b-9db1ed36efa4",
-                "label": "线缓冲",
-                "idx": 35,
-                "isQuick": false
-            },
-            {
-                "group": "其他工具",
-                "option": {},
-                "icon": "at-icon-icon_duobianxing",
-                "action": "BufferPolygonAction",
-                "tip": "缓冲绘制图形进行分析",
-                "id": "551f5ca2-a39e-43f8-8a0b-9db1ed36efb4",
-                "label": "面缓冲",
-                "idx": 35,
-                "isQuick": false
-            },
-            {
-                "isQuick": true,
-                "id": "6d51001d-a5e4-4aa8-a977-0694724b916a",
-                "option": {},
-                "group": "其他工具",
-                "tip": "清除缓冲分析",
-                "icon": "at-icon-qingchu1",
-                "idx": 36,
-                "action": "ClearBufferAction",
-                "label": "清除缓冲"
-            },
-            {
-                "isQuick": true,
-                "id": "6d51001d-a5e4-4aa8-a977-0694724b916a",
-                "option": {},
-                "group": "常用工具",
-                "tip": "清除所有绘制",
-                "icon": "at-icon-qingchu1",
-                "idx": 37,
-                "action": "ClearDrawAction",
-                "label": "清除"
-            },
-            {
-                "option": {
-                    "data": [
-                        {
-                            "wkid": "EPSG:4525",
-                            "name": "国家2000高斯投影3°分带37°带"
-                        }
-                    ]
-                },
-                "label": "定位",
-                "isQuick": false,
-                "id": "b4940bbe-ca14-497c-b51f-726744db787b",
-                "tip": "定位到输入的位置",
-                "icon": "at-icon-dingwei",
-                "group": "常用工具",
-                "action": "MapToPointAction",
-                "idx": 38
-            }
-        ]
-        const columns = [
-            {
-                title: '图层',
-                dataIndex: 'title',
-                key: 'title',
-                align: 'center'
-            },
-            {
-                title: 'id',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
-            {
-                title: '类型',
-                dataIndex: 'type',
-                key: 'type',
-                align: 'center'
-            },
-            {
-                title: '地址',
-                dataIndex: 'url',
-                key: 'url',
-                align: 'center'
-            },
-            {
-                title: '快速定位',
-                dataIndex: 'flyTo',
-                align: 'center',
-                slots: { customRender: 'flyTo' },
-            }
-        ]
-        const handleEdit = () => {
-
-        }
-        const handleDelete = () => {
+        const [registerDrawer, { openModal }] = useModal(); //使用弹出框
 
-        }
-        const delAllData = () => {
-
-        }
         const getAllData = () => {
             return new Promise((resolve) => {
                 get3dLayers().then(res => {
                     if (res.code === 200 && res.data.length) {
                         resolve(res.data)
                     } else {
-                        message.error('暂无图层数据')
+                        message.error('暂无图层数据!')
+                        resolve(false)
                     }
                 })
             })
@@ -401,7 +91,7 @@ export default defineComponent({
         ] = useTable({
             title: '图层列表', //'菜单列表'
             api: getAllData, //加载数据
-            // dataSource: toolsData,
+            // dataSource: getAllData,
             columns: columns,
             useSearchForm: false,     //开启搜索区域
             bordered: true,
@@ -428,7 +118,58 @@ export default defineComponent({
                 type: 'checkbox',
             },
         });
+
+        /**
+         * 操作成功,重新加载页面
+         */
+        function handleSuccess() {
+            reload();
+        }
+
+        /**
+         * 打开新增菜单
+         */
+        function handleCreate() {
+            openModal(true, {
+                isUpdate: false,
+            });
+        }
+
+        /**
+         * 打开 编辑菜单
+         * @param record
+         */
+        function handleEdit(record) {
+            openModal(true, {
+                record,
+                isUpdate: true,
+            });
+        }
+
+        /**
+         * 执行 删除操作
+         * @param record
+         */
+        async function handleDelete(record) {
+            try {
+                let ids = isArray(record._id) ? record._id : record._id;
+                await removeLayer3d(ids);
+                notification.success({
+                    message: '成功',
+                    description: '删除三维图层成功!',
+                    duration: 2,
+                });
+                await reload();
+            } catch (e) {
+                return Promise.reject(e);
+            }
+        }
+
+
+
         return {
+            handleSuccess,
+            registerDrawer,
             hasSelected,
             registerTable,
             reload,
@@ -437,14 +178,14 @@ export default defineComponent({
             setSelectedRowKeys,
             handleEdit,
             handleDelete,
-            delAllData
+            handleCreate,
         }
     }
 })
 </script>
 <style lang="less" scoped>
-.layer3d {
-    .layer3d-body {
+.layer2d {
+    .layer2d-body {
         width: 100%;
         height: 100%;
         padding: 0 20px;