index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="">
  3. <MapView></MapView>
  4. <van-list id="checklist" v-model="loading" :immediate-check="false" :error.sync="error" error-text="请求失败,点击重新加载"
  5. finished-text="没有更多了~" @load="getList">
  6. <view class="list-item" v-for="(item, key) in tableData" :key="key" @click="goDetail(item)">
  7. <div class="nameTitle">{{ item.name }}</div>
  8. <div>{{ item.dkbh }}</div>
  9. <div>监测面积:{{ item.dkmj }}</div>
  10. <div>核查截止日期:{{ item.jsdw }}</div>
  11. <div @click="navigation">导航</div>
  12. <div @click="upload">上传</div>
  13. <view class="status">{{ item.status }}</view>
  14. </view>
  15. </van-list>
  16. </view>
  17. </template>
  18. <script>
  19. // import MapView from "../../static/MapView.vue";
  20. import MapView from "./MapView.vue";
  21. import {
  22. listDkjbxx
  23. } from "@/api/dkjbxx.js";
  24. import {
  25. handleNavigation
  26. } from "./mapto.js";
  27. import {
  28. chooseImage,
  29. chooseVideo,
  30. chooseMedia
  31. } from "@/utils/choose.js";
  32. export default {
  33. name: "check",
  34. components: {
  35. MapView,
  36. },
  37. data() {
  38. return {
  39. queryParams: {
  40. pageNum: 1,
  41. pageSize: 10,
  42. time: ["", ""],
  43. startTime: "",
  44. endTime: "",
  45. auditflowList: [],
  46. dkmjbs: "",
  47. dkmj: "",
  48. descValue: "dkmj",
  49. dkbh: "",
  50. xzqdm: null,
  51. },
  52. loading: false,
  53. tableData: [{}],
  54. };
  55. },
  56. mounted() {},
  57. onShow(options) {
  58. uni.getStorage({
  59. key: "my_param",
  60. success: (res) => {
  61. this.queryParams.id = res.data.id;
  62. console.log("获取的参数是:", res.data);
  63. this.getList();
  64. },
  65. });
  66. },
  67. unmounted() {},
  68. methods: {
  69. getList() {
  70. listDkjbxx(this.queryParams).then((response) => {
  71. this.tableData = response.rows;
  72. this.total = response.total;
  73. // this.open = true;
  74. // this.title = "修改监管批次数据";
  75. // this.initVectorLayer("mapDiv");
  76. // this.initVectorLayer("mapCon1");
  77. // this.initVectorLayer("mapCon2");
  78. // this.addGeoJson("mapDiv");
  79. // this.addGeoJson("mapCon1");
  80. // this.addGeoJson("mapCon2");
  81. });
  82. },
  83. navigation() {
  84. console.log("s-xsx");
  85. handleNavigation({
  86. latitude: 39.9042,
  87. longitude: 116.4074,
  88. name: "地址名称",
  89. address: "地址详情",
  90. selfLocation: {},
  91. });
  92. },
  93. upload() {
  94. console.log(uni, '---', uni.chooseMedia)
  95. chooseMedia()
  96. }
  97. },
  98. };
  99. </script>
  100. <style scoped>
  101. #checklist {
  102. width: 100%;
  103. height: 50vh;
  104. }
  105. </style>