diff --git a/src/api/modules/mapCommon.ts b/src/api/modules/mapCommon.ts index 372b268..730fed7 100644 --- a/src/api/modules/mapCommon.ts +++ b/src/api/modules/mapCommon.ts @@ -22,6 +22,10 @@ export const updateSystemConfig = (params: any) => { export const baseMapPage = (params: any) => { return http.post(BASEURL + `/base/baseMap/page`, params); }; +// 底图图层列表 +export const baseMapList = (params: any) => { + return http.post(BASEURL + `/base/baseMap/list`, params); +}; // 底图图层新增 export const baseMapAdd = (params: any) => { return http.post(BASEURL + `/base/baseMap/add`, params); @@ -38,3 +42,28 @@ export const baseMapEdit = (params: any) => { export const baseMapDelete = (params: any) => { return http.post(BASEURL + `/base/baseMap/delete`, params); }; + +// 白膜图层分页列表 +export const albugineaMapPage = (params: any) => { + return http.post(BASEURL + `/base/tilesetLayer/page`, params); +}; +// 白膜图层列表 +export const albugineaMapList = (params: any) => { + return http.post(BASEURL + `/base/tilesetLayer/list`, params); +}; +// 白膜图层新增 +export const albugineaMapAdd = (params: any) => { + return http.post(BASEURL + `/base/tilesetLayer/add`, params); +}; +// 白膜图层详细信息 +export const albugineaMapDetails = (params: any) => { + return http.post(BASEURL + `/base/tilesetLayer/queryById`, params); +}; +// 白膜图层编辑 +export const albugineaMapEdit = (params: any) => { + return http.post(BASEURL + `/base/tilesetLayer/edit`, params); +}; +// 白膜图层删除 +export const albugineaMapDelete = (params: any) => { + return http.post(BASEURL + `/base/tilesetLayer/delete`, params); +}; diff --git a/src/components/testMap/index.vue b/src/components/testMap/index.vue index 6ae3798..aaac50d 100644 --- a/src/components/testMap/index.vue +++ b/src/components/testMap/index.vue @@ -1,7 +1,7 @@ @@ -43,8 +53,11 @@ import { useRouter } from "vue-router"; import { User } from "@/api/interface"; import { ColumnProps } from "@/components/ProTable/interface"; import ProTable from "@/components/ProTable/index.vue"; -import { getGovermentTreeList } from "@/api/modules/jxjview"; import operateDialog from "./components/operateDialog.vue"; +import { Delete } from "@element-plus/icons-vue"; +import { useHandleData } from "@/hooks/useHandleData"; +import { albugineaMapPage, albugineaMapDelete } from "@/api/modules/mapCommon"; +import { jxj_User } from "@/api/types"; const relativeId = ref(""); const operateVisible = ref(false); const treeProps = ref({ children: "children", hasChildren: "hasChildren" }); @@ -59,19 +72,18 @@ const formData = ref({}); // 表格配置项 const columns: ColumnProps[] = [ { - prop: "governmentName", - label: "ID", - search: { el: "input" } + prop: "id", + label: "ID" }, // 多级 prop - { prop: "createTime", label: "名称" }, - { prop: "governmentTel", label: "是否启用" }, - { prop: "state", label: "飞到该白膜" }, - { prop: "diffDay", label: "白膜颜色" }, - { prop: "authProject", label: "开启打光效果" }, - { prop: "authProject", label: "创建时间" }, - { prop: "authProject", label: "更新时间" }, - { prop: "operation", label: "操作", fixed: "right", width: 260 } + { prop: "name", label: "名称", search: { el: "input" } }, + { prop: "show", label: "是否启用" }, + { prop: "flyTo", label: "飞到该白膜" }, + { prop: "color", label: "白膜颜色" }, + // { prop: "authProject", label: "开启打光效果" }, + { prop: "createTime", label: "创建时间" }, + { prop: "updateTime", label: "更新时间" }, + { prop: "operation", label: "操作", fixed: "right", width: 160 } ]; // const AuthIdData = ref([]); @@ -79,10 +91,26 @@ const columns: ColumnProps[] = [ const initParam = reactive({ // type: 1 }); + +// 刷新列表数据 +const requestTable = () => { + proTable.value.getTableList(); +}; +// 删除白膜图层 +const handleDeleteItem = async (params: jxj_User.ResUserList) => { + await useHandleData(albugineaMapDelete, { id: params.id }, `删除【${params.name}】`); + proTable.value.getTableList(); +}; +// 编辑 +const handleEditItem = (row: any) => { + operateVisible.value = true; + title.value = "编辑白膜图层"; + relativeId.value = row.id; +}; // 添加数据按钮 const handleAddItem = () => { operateVisible.value = true; - title.value = "新增市级政务"; + title.value = "新增白膜图层"; formData.value = reactive({}); }; // dataCallback 是对于返回的表格数据做处理,如果你后台返回的数据不是 list && total && pageNum && pageSize 这些字段,那么你可以在这里进行处理成这些字段 @@ -101,48 +129,22 @@ const dataCallback = (data: any) => { // 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList" const getTableList = (params: any) => { let newParams = JSON.parse(JSON.stringify(params)); - return getGovermentTreeList(newParams); + return albugineaMapPage(newParams); }; onMounted(async () => {}); diff --git a/src/views/jxjview/layerManagement/components/operateDialog.vue b/src/views/jxjview/layerManagement/components/operateDialog.vue index 8707cc5..77a481e 100644 --- a/src/views/jxjview/layerManagement/components/operateDialog.vue +++ b/src/views/jxjview/layerManagement/components/operateDialog.vue @@ -126,7 +126,7 @@ - + diff --git a/src/views/jxjview/layerManagement/index.vue b/src/views/jxjview/layerManagement/index.vue index deab623..adfe4a2 100644 --- a/src/views/jxjview/layerManagement/index.vue +++ b/src/views/jxjview/layerManagement/index.vue @@ -51,11 +51,10 @@ import { ref, reactive, onMounted } from "vue"; import { ColumnProps } from "@/components/ProTable/interface"; import ProTable from "@/components/ProTable/index.vue"; import operateDialog from "./components/operateDialog.vue"; -import { baseMapPage } from "@/api/modules/mapCommon"; import { Delete } from "@element-plus/icons-vue"; import { useHandleData } from "@/hooks/useHandleData"; import { jxj_User } from "@/api/types"; -import { baseMapDelete } from "@/api/modules/mapCommon"; +import { baseMapPage, baseMapDelete } from "@/api/modules/mapCommon"; const relativeId = ref(""); const operateVisible = ref(false); const treeProps = ref({ children: "children", hasChildren: "hasChildren" });