maxiaoxiao 7 ماه پیش
والد
کامیت
695261cef2
1فایلهای تغییر یافته به همراه131 افزوده شده و 0 حذف شده
  1. 131 0
      src/views/basicGeographic/components/list.vue

+ 131 - 0
src/views/basicGeographic/components/list.vue

@@ -0,0 +1,131 @@
+<template>
+  <div class="list" v-drag v-show="isshow">
+    <div class="sm-panel-header">
+      <span>{{ obj.label }}实体列表</span>
+      <span class="closeBtn" :class="`el-icon-s-${fold ? '' : 'un'}fold`" @click="fold = !fold"></span>
+      <span class="closeBtn" @click="isshow = false">&times;</span>
+    </div>
+    <div>
+      <custom-form ref="formRef" :model="model" :config="formConfig">
+        <template #action>
+          <el-button size="mini" type="" @click="getTableData">查询</el-button>
+          <el-button size="mini" @click="reset()">重置</el-button>
+        </template>
+      </custom-form>
+      <customForm></customForm>
+      <!-- :check="true" @selectChange="selectChange" -->
+      <tablePage class="tablePage" :cloumn="cloumn" :table="table" ref="tableDialogRef" @currentChange="searchFun">
+        <!-- <template #state="{ row }"></template> -->
+        <template #action="{ row }">
+          <span class="usable" @click="fly(row)">定位</span>
+          <span class="usable" @click="detail(row)">详情</span>
+          <span class="usable" @click="graph(row)">关系</span>
+        </template>
+      </tablePage>
+    </div>
+  </div>
+
+
+</template>
+
+<script>
+import Clipboard from "clipboard";
+import tablePage from "@/components/mapView/tablePage.vue";
+import customForm from "@/components/mapView/custom-form.vue";
+import { stateMap, FormConfig, TableHeader } from "./config";
+import { getList } from "@/api/basicGeographic.js";
+export default {
+  components: {
+    tablePage,
+    customForm,
+
+  },
+  props: {},
+  data() {
+    return {
+      isshow: false,
+      obj: {},
+      model: {
+        id: '',
+        entityname: "",
+        entityid: "",
+        pageNum: 1,
+        pageSize: 10,
+      },
+      formConfig: FormConfig,
+      cloumn: TableHeader,
+      optionList: stateMap,
+      table: { data: [], total: 0 },
+    };
+  },
+  methods: {
+    show(data) {
+      this.isshow = true
+      this.obj = data
+      console.log(this.obj)
+      this.reset()
+    },
+
+    searchFun(page) {
+      this.getTableData(page);
+    },
+    async getTableData(page = { pageIndex: 1, size: 10 }) {
+      this.model.pageNum = page.pageIndex;
+      this.model.pageSize = page.size;
+      // this.model.startTime = this.model.sj ? this.model.sj[0] : "";
+      // this.model.endTime = this.model.sj ? this.model.sj[1] : "";
+      let res = await getList(this.model);
+      this.table = { data: res.rows, total: res.total };
+    },
+    reset() {
+      this.model = {
+        id: this.obj.id,
+        entityname: "",
+        entityid: "",
+        pageNum: 1,
+        pageSize: 10,
+      };
+      this.searchFun();
+    },
+    // 详情
+    detail(row) {
+      this.$emit("click", row, 'infoto');
+    },
+    fly(row) {
+      this.$emit("click", row, 'fly');
+    },
+    graph(row) {
+      this.$emit("graph", row,);
+    },
+    revoke(row) {
+      if (row.state == 1) this.$refs.addEdtModal.Init("withdraw", row);
+    },
+    copyText(text) {
+      this.$copyText(text).then(
+        () => {
+          this.$message.success("复制成功");
+        },
+        () => {
+          this.$message.error("该浏览器不支持自动复制");
+        }
+      );
+    },
+    closeMdel() {
+      this.searchFun();
+    },
+  },
+  computed: {},
+  watch: {},
+  mounted() {
+
+  },
+};
+</script>
+<style lang="scss" scoped></style>
+<style lang="scss">
+.list {
+  .el-form-item {
+    margin-bottom: 0px !important
+  }
+}
+</style>