index.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view class="">
  3. <MapView calss="mapview"></MapView>
  4. <van-list class="checklist" v-model="loading" :immediate-check="false" :error.sync="error"
  5. error-text="请求失败,点击重新加载" 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.jsdw }}</div>
  9. <div>结束时间:{{ item.jsdw }}</div>
  10. <div>核查图斑:{{ item.spotsnumber || 0 }}个</div>
  11. <div>核查人员:{{ item.jsdw }}</div>
  12. <div @click="navigation">导航</div>
  13. <div @click="upload">上传</div>
  14. <view class="status">{{ item.status }}</view>
  15. </view>
  16. </van-list>
  17. </view>
  18. </template>
  19. <script>
  20. import MapView from "./MapView.vue";
  21. import {
  22. listPcsjXQList
  23. } from "@/api/apis.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. jcbh: "", //监测编号
  41. pageNum: 1,
  42. pageSize: 10,
  43. pcsjid: "",
  44. },
  45. loading: false,
  46. tableData: [{}],
  47. };
  48. },
  49. mounted() {},
  50. onShow(options) {
  51. uni.getStorage({
  52. key: "my_param",
  53. success: (res) => {
  54. this.queryParams.id = res.data.id;
  55. console.log("获取的参数是:", res.data);
  56. // this.getList();
  57. },
  58. });
  59. },
  60. unmounted() {},
  61. methods: {
  62. getList() {
  63. listPcsjXQList(this.queryParams).then((response) => {
  64. this.tableData = response.rows;
  65. this.total = response.total;
  66. // this.open = true;
  67. // this.title = "修改监管批次数据";
  68. // this.initVectorLayer("mapDiv");
  69. // this.initVectorLayer("mapCon1");
  70. // this.initVectorLayer("mapCon2");
  71. // this.addGeoJson("mapDiv");
  72. // this.addGeoJson("mapCon1");
  73. // this.addGeoJson("mapCon2");
  74. });
  75. },
  76. navigation() {
  77. console.log("s-xsx");
  78. handleNavigation({
  79. latitude: 39.9042,
  80. longitude: 116.4074,
  81. name: "地址名称",
  82. address: "地址详情",
  83. selfLocation: {},
  84. });
  85. },
  86. upload() {
  87. console.log(uni, '---', uni.chooseMedia)
  88. chooseMedia()
  89. }
  90. },
  91. };
  92. </script>
  93. <style scoped>
  94. .checklist {
  95. width: 100%;
  96. height: 50vh;
  97. }
  98. </style>