浏览代码

公共表格

maxiaoxiao 11 月之前
父节点
当前提交
023fe32854
共有 3 个文件被更改,包括 94 次插入1 次删除
  1. 0 1
      src/components/3DAnalysis/ClippingPlanes/index.vue
  2. 87 0
      src/components/mapView/tablePage.vue
  3. 7 0
      src/router/index.js

+ 0 - 1
src/components/3DAnalysis/ClippingPlanes/index.vue

@@ -75,7 +75,6 @@
 import { moveHandler, pickPoint } from "@/utils/MapHelper/help.js";
 let pos = {};
 let box = null;
-let startClip = false;
 let boxPosition = null;
 let layers = [];
 export default {

+ 87 - 0
src/components/mapView/tablePage.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="cont-table">
+    <!-- :image="nonedataImg"  -->
+    <el-empty description=" " v-if="props.table.data.length == 0" />
+    <el-table
+      :data="props.table.data"
+      v-else
+      style="width: 100%"
+      :show-overflow-tooltip="true"
+      header-row-class-name="datatable"
+      row-class-name="datarow"
+      fit
+    >
+      <el-table-column
+        v-for="(item, index) in props.cloumn"
+        :prop="item.prop"
+        :label="item.label"
+        :key="index"
+        show-overflow-tooltip
+        :width="item.width || null"
+      >
+        <template #default="scope">
+          <slot
+            v-if="item.slot"
+            :name="item.slot ? item.slot : ''"
+            v-bind="scope"
+          ></slot>
+          <span v-else>{{ scope.row[item.prop] || "-" }}</span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="tabs-pagation" v-if="props.table.data.length">
+      <div class="font">共{{ props.table.total }}条记录</div>
+      <!-- <el-pagination class="tabone-pagination" background layout="prev, pager, next" :current-page="pageNum"
+            :pager-count="5" :page-size="5" :total="props.table.total" @current-change="changePage" /> -->
+      <el-pagination
+        :current-page="pageNum"
+        :page-size="pageSize"
+        :small="false"
+        :disabled="false"
+        :background="true"
+        layout="prev, pager, next, jumper,sizes"
+        :page-sizes="[10, 15, 20, 30, 50]"
+        :total="props.table.total"
+        @size-change="handleSizeChange"
+        @current-change="changePage"
+      />
+    </div>
+  </div>
+</template>
+  <script lang="ts" setup>
+import { ref } from "vue";
+
+const emit = defineEmits(["search"]);
+
+type Props = {
+  cloumn: any;
+  table: any;
+};
+const props = withDefaults(defineProps<Props>(), {});
+
+// 搜索
+const searchFun = () => {
+  emit("search", {
+    pageIndex: pageNum.value,
+    size: pageSize.value,
+  });
+};
+
+let pageNum = ref(1);
+let pageSize = ref(10);
+
+// 修改当前页数
+const changePage = (v: number) => {
+  pageNum.value = v;
+  searchFun();
+};
+const handleSizeChange = (v: number) => {
+  pageSize.value = v;
+  searchFun();
+};
+
+// searchFun()
+</script>
+  <style lang="scss">
+//@import url(../assets/styles/tabs.scss);
+</style>

+ 7 - 0
src/router/index.js

@@ -101,6 +101,13 @@ export const constantRoutes = [{
             import('@/views/farmlandProtection/index.vue'),
         hidden: true
     },
+    {
+        path: '/myApplication',
+        component: () =>
+            import('@/views/ResourceShare/myApplication/index.vue'),
+        hidden: true
+    },
+
 
 
     ]