Browse Source

微信端接口联调

wuhongbo 1 year ago
parent
commit
e8a372fa90
47 changed files with 6794 additions and 6429 deletions
  1. 3 3
      BJYSYBZ_C/src/views/components/HeaderCompBJ.vue
  2. 7 0
      YSGZYBZ_WXAPP/pages.json
  3. 5 12
      YSGZYBZ_WXAPP/pages/login/index.vue
  4. 4 21
      YSGZYBZ_WXAPP/pages/main/index.vue
  5. 17 0
      YSGZYBZ_WXAPP/pages/nocheckDetail/index.scss
  6. 247 47
      YSGZYBZ_WXAPP/pages/nocheckDetail/index.vue
  7. 1 1
      YSGZYBZ_WXAPP/pages/received/index.scss
  8. 40 44
      YSGZYBZ_WXAPP/pages/received/index.vue
  9. 94 0
      YSGZYBZ_WXAPP/pages/receivedDetail/index.scss
  10. 112 43
      YSGZYBZ_WXAPP/pages/receivedDetail/index.vue
  11. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  12. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  13. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/components/SlideCard/SlideCard.js.map
  14. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/components/navigationBar/navigationBar.js.map
  15. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/index.js.map
  16. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/main/index.js.map
  17. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/nocheckDetail/index.js.map
  18. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/received/index.js.map
  19. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/receivedDetail/index.js.map
  20. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map
  21. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map
  22. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js.map
  23. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.js.map
  24. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.js.map
  25. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  26. 1 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/app.json
  27. 5546 5882
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/common/vendor.js
  28. 11 11
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/components/SlideCard/SlideCard.js
  29. 11 11
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/components/navigationBar/navigationBar.js
  30. 24 46
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/main/index.js
  31. 252 52
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/nocheckDetail/index.js
  32. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/nocheckDetail/index.wxml
  33. 14 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/nocheckDetail/index.wxss
  34. 40 44
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/received/index.js
  35. 0 1
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/received/index.wxml
  36. 1 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/received/index.wxss
  37. 96 27
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/receivedDetail/index.js
  38. 0 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/receivedDetail/index.wxml
  39. 78 0
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/receivedDetail/index.wxss
  40. 12 12
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js
  41. 11 11
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js
  42. 12 12
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js
  43. 11 11
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.js
  44. 94 4
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.js
  45. 5 95
      YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
  46. 5 0
      YSGZYBZ_WXAPP/utils/config.js
  47. 40 39
      YSGZYBZ_WXAPP/utils/https.js

+ 3 - 3
BJYSYBZ_C/src/views/components/HeaderCompBJ.vue

@@ -21,7 +21,7 @@
             <div class="ttl">
               <img src="@/assets/images/logo.png" />
               <span class="title">{{ bjTitle }}</span>
-              <span class="line"></span>
+              <!-- <span class="line"></span> -->
               <span class="subtitle">{{ bjSTitle }}</span>
             </div>
             <div class="tts">- 滨江区 -</div>
@@ -87,8 +87,8 @@ export default {
   props: {},
   mounted() {
     if (this.$route.fullPath.indexOf('manage-list') > 0) {
-      this.bjTitle = '滨江未利用地';
-      this.bjSTitle = '地块管理';
+      this.bjTitle = '滨江区地块管理';
+      this.bjSTitle = '';
     }
     this.syUserName = localStorage.getItem('ybz_syUser');
     this.$vm.$on('updateStorage', () => {

+ 7 - 0
YSGZYBZ_WXAPP/pages.json

@@ -1,5 +1,12 @@
 {
   "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+    {
+      "path": "pages/login/index",
+      "style": {
+        "navigationBarTitleText": "地块管护",
+        "navigationStyle": "custom"
+      }
+    },
     {
       "path": "pages/main/index",
       "style": {

+ 5 - 12
YSGZYBZ_WXAPP/pages/login/index.vue

@@ -25,6 +25,7 @@ export default {
   },
   mounted() {
     const a = uni.getStorageSync('userInfo');
+    console.log('loca',a);
     if (a) {
       uni.navigateTo({
         url: '/pages/main/index',
@@ -33,8 +34,6 @@ export default {
   },
   methods: {
     getPhoneNumber(e) {
-      console.log(e);
-      console.log(e.detail.code);
       if (e.detail.code) {
         let params = {
           code: e.detail.code,
@@ -44,13 +43,11 @@ export default {
           method: 'GET',
           data: params,
         }).then((result) => {
-          console.log(result);
           if (result.data) {
-            console.log(result);
-            // uni.setStorageSync('userInfo', result.data);
-            // uni.navigateTo({
-            //   url: '/pages/main/index',
-            // });
+            uni.setStorageSync('userInfo', result.data);
+            uni.navigateTo({
+              url: '/pages/main/index',
+            });
           } else {
             uni.showToast({
               title: '该用户无权访问此系统',
@@ -61,10 +58,6 @@ export default {
         });
       } else {
       }
-      uni.setStorageSync('userInfo', result.data);
-      uni.navigateTo({
-        url: '/pages/main/index',
-      });
     },
   },
 };

+ 4 - 21
YSGZYBZ_WXAPP/pages/main/index.vue

@@ -7,37 +7,20 @@
 
 <script>
 import navigationBar from '../../components/navigationBar/navigationBar.vue';
-import received from "../received/index.vue";
+import received from '../received/index.vue';
 import httpAjax from '@/utils/https.js';
 /**
  * @description 待签收
  **/
 export default {
   name: 'main',
-  components: { navigationBar,received },
+  components: { navigationBar, received },
   data() {
     return {};
   },
   onLoad(option) {},
-  mounted() {
-    this.initDkxx();
-  },
-  methods: {
-    initDkxx() {
-      let params = {
-        mobile: '18271132843',
-      };
-      // let params = new FormData()
-      // params.append('mobile','18271132843')
-      httpAjax({
-        url: 'app/xc/getXcryByMobile',
-        method: 'GET',
-        data: params,
-      }).then((result) => {
-        console.log(result);
-      });
-    },
-  },
+  mounted() {},
+  methods: {},
 };
 </script>
 

+ 17 - 0
YSGZYBZ_WXAPP/pages/nocheckDetail/index.scss

@@ -135,6 +135,23 @@
             }
           }
 
+          .szfw {
+            height: 80px;
+
+            .title {
+              line-height: 80px;
+            }
+
+            .val {
+              line-height: 26px;
+              display: flex;
+              align-items: center;
+              text {
+                line-height: 26px;
+              }
+            }
+          }
+
         }
       }
     }

+ 247 - 47
YSGZYBZ_WXAPP/pages/nocheckDetail/index.vue

@@ -7,35 +7,37 @@
         <view class="content">
           <view class="item">
             <text class="title">地块编号</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.dkbh }}</text>
           </view>
           <view class="item">
             <text class="title">面积(亩)</text>
-            <text class="val">{{ detailData.mj }}</text>
+            <text class="val">{{ objs.mj }}</text>
           </view>
           <view class="item">
             <text class="title">地块位置</text>
-            <text class="val">{{ detailData.dkwz }}</text>
+            <text class="val">{{ objs.dkwz }}</text>
           </view>
           <view class="item">
             <text class="title">地块现状</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.dkxz }}</text>
           </view>
           <view class="item">
             <text class="title">管地单位</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.gddw }}</text>
           </view>
           <view class="item">
             <text class="title">联系人</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.lxr }}</text>
           </view>
           <view class="item">
             <text class="title">联系电话</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.lxdh }}</text>
           </view>
-          <view class="item">
+          <view class="item szfw">
             <text class="title">四至范围</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">
+              <text>{{ objs.szfw }}</text>
+            </text>
           </view>
         </view>
       </view>
@@ -50,7 +52,7 @@
                 id=""
                 cols="30"
                 rows="10"
-                v-model="baseFormData.description"
+                v-model="baseFormData.xzms"
                 placeholder="请输入现状描述"
               ></textarea>
             </view>
@@ -95,60 +97,258 @@ export default {
   },
   data() {
     return {
+      lat: '',
+      lat2: '',
+      long: '',
+      long2: '',
+      lat3: '',
+      long3: '',
+      queryParams: {
+        xcryId: '',
+        xzms: '',
+        xcryName: '',
+        xcryMobile: '',
+        dksyh: '',
+        imgList: [
+          {
+            fileId: '',
+            lng: '',
+            lat: '',
+          },
+        ],
+      },
+      objs: {},
       fileList: [],
-      distance: 0,
+      fileImgList: [],
       imageStyles: {
         width: 64,
         height: 64,
       },
-      canvasW: 0,
-      canvasH: 0,
-      typeList: [
-        {
-          value: 0,
-          text: '不存在盗采',
-        },
-        {
-          value: 1,
-          text: '正发生盗采',
-        },
-        {
-          value: 2,
-          text: '已盗采',
-        },
-      ],
+
       baseFormData: {
         lawBreakType: '',
-        description: '',
+        xzms: '',
       },
-      covers: [],
-      warningId: '',
-      fileLists: [],
-      detailData: {
-        dkbh: 'CH-52',
-        mj: '81.30',
-        dkwz: '11',
-      },
-      lat: '',
-      lat2: '',
-      long: '',
-      long2: '',
-      lat3: '',
-      long3: '',
-      fileImgList: [],
-      isAudioPlay: false,
     };
   },
   onReady() {
     uni.showTabBar();
   },
   onLoad(option) {
-    const idStr = option['idStr'];
-    this.warningId = idStr;
-    this.getLocationApi2();
+    const idStr = JSON.parse(option['obj']);
+    this.objs = idStr;
+    console.log(this.objs);
   },
   beforeDestroy() {},
   methods: {
+    saveWarning() {
+      //上报
+      if (this.baseFormData.xzms === '') {
+        uni.showToast({
+          title: '现状描述不能为空',
+          icon: 'none',
+          duration: 1500,
+        });
+        return;
+      }
+      this.relationFileById(this.fileList);
+    },
+    relationFileById(fileObj) {
+      //文件上传
+      let _that = this;
+      // let sendData = fileObj;
+      let files = [];
+      console.log(fileObj);
+      let sendData = {
+        xcryId: uni.getStorageSync('userInfo').id,
+        xzms: this.baseFormData.xzms,
+        xcryName: uni.getStorageSync('userInfo').xcry,
+        xcryMobile: uni.getStorageSync('userInfo').lxdh,
+        dksyh: this.objs.dksyh,
+        imgList: [],
+      };
+      fileObj.forEach((item) => {
+        let obj = {
+          fileId: item.fileId,
+          lat: item.lat,
+          lng: item.lng,
+        };
+        files.push(obj);
+      });
+      sendData.imgList = files;
+      console.log(sendData);
+
+      httpAjax({
+        url: 'app/xc/addXcjl',
+        method: 'POST',
+        data: sendData,
+      })
+        .then((result) => {
+          if (result.data) {
+            uni.showModal({
+              title: '提示',
+              content: '上报成功,是否返回首页',
+              success: function (res) {
+                if (res.confirm) {
+                  uni.navigateTo({
+                    url: '/pages/main/index?index=2',
+                  });
+                } else if (res.cancel) {
+                }
+              },
+            });
+          }
+        })
+        .catch((err) => {
+          console.error('');
+        });
+    },
+    selectFileChange(file) {
+      console.log(file);
+      const that = this;
+      const tempFilePath = file.tempFilePaths[0];
+      uni.getImageInfo({
+        src: tempFilePath,
+        success: function (image) {
+          const context = uni.createCanvasContext('Canvas');
+          const fileName = file['tempFiles'][0]['name'];
+          that.setFileImgList(fileName, tempFilePath);
+          that.fileUploadAjax(tempFilePath);
+          // setTimeout(function () {
+          //   context.fillRect(0, 0, image.width, image.height);
+          //   context.drawImage(
+          //     file.tempFilePaths[0],
+          //     0,
+          //     0,
+          //     image.width,
+          //     image.height,
+          //   );
+          //   context.setFontSize(20);
+          //   context.setFillStyle('rgba(150, 150, 150, 0.6)');
+          //   const latText = that.lat2;
+          //   const lngText = that.long2;
+          //   context.fillText(
+          //     that.getDateTimeByNow(),
+          //     image.width - 320,
+          //     image.height - 20,
+          //   );
+          //   context.fillText(
+          //     `${latText},${lngText}`,
+          //     image.width - 250,
+          //     image.height - 50,
+          //   );
+          //   context.draw(false, () => {
+          //     setTimeout(() => {
+          //       uni.canvasToTempFilePath({
+          //         canvasId: 'Canvas',
+          //         success: (path) => {
+          //           console.log(path['tempFilePath']);
+          //           that.setFileImgList(fileName, path['tempFilePath']);
+          //           that.fileUploadAjax(path['tempFilePath']);
+          //         },
+          //       });
+          //     }, 200);
+          //   });
+          // }, 500);
+        },
+      });
+    },
+    getDateTimeByNow() {
+      const dateObj = new Date();
+      const year = dateObj.getFullYear();
+      const month = dateObj.getMonth() + 1;
+      const date = dateObj.getDate();
+
+      const hour = dateObj.getHours();
+      const min = dateObj.getMinutes();
+      const sec = dateObj.getSeconds();
+
+      const monthStr = month < 10 ? `0${month}` : month;
+      const dateStr = date < 10 ? `0${date}` : date;
+      const hourStr = hour < 10 ? `0${hour}` : hour;
+      const minStr = min < 10 ? `0${min}` : min;
+      const secStr = sec < 10 ? `0${sec}` : sec;
+      return `${year}年${monthStr}月${dateStr}日 ${hourStr}时${minStr}分${secStr}秒`;
+    },
+    setFileImgList(name, url) {
+      console.log(this.fileImgList);
+      const extnames = name.match(/\.(jpg|jpeg|png|GIF|JPG|PNG)$/);
+      const extname = extnames[0];
+      this.fileImgList.push({
+        name,
+        url,
+        extname,
+      });
+    },
+    fileUploadAjax(tempFile) {
+      const formData = new FormData();
+      formData.appendFile('file', tempFile);
+      const sendData = formData.getData();
+      let header = {
+        'content-type': sendData.contentType,
+      };
+      const that = this;
+      httpAjax({
+        url: 'api/oss/upload',
+        method: 'POST',
+        header,
+        data: sendData.buffer,
+      }).then((result) => {
+        const data = result['data'];
+        that.getLocationApi(data);
+        // that.updateWaterMark(data['path']);
+      });
+    },
+    //拍摄时获取设备的经纬度
+    getLocationApi(data) {
+      let _that = this;
+      wx.authorize({
+        scope: 'scope.userLocation',
+        success: (res) => {
+          wx.getLocation({
+            success: (res) => {
+              console.log(res);
+              _that.lat = res.latitude;
+              _that.long = res.longitude;
+              data.lat = res.latitude;
+              data.lng = res.longitude;
+              data.fileId = data.id;
+              data.warningId = _that.warningId;
+              _that.fileList.push(data);
+              console.log(_that.fileList);
+            },
+            fail: (err) => {
+              console.log('获取当前初始位置失败', err);
+            },
+          });
+        },
+        fail: (err) => {
+          console.log('获取授权失败', err);
+          this.handleOpenSetting();
+        },
+      });
+    },
+    // updateWaterMark(path) {
+    //   console.log(path);
+    //   let _that = this;
+    //   let sendData = {
+    //     lat2: this.lat2,
+    //     long2: this.long2,
+    //     path: path,
+    //   };
+    //   console.log(sendData);
+    //   // httpAjax({
+    //   //   url: 'app-api/mining/app/save',
+    //   //   method: 'POST',
+    //   //   data: sendData,
+    //   // })
+    //   //   .then((result) => {
+    //   //     const data = result['data'];
+    //   //   })
+    //   //   .catch((err) => {
+    //   //     console.error('');
+    //   //   });
+    // },
     toBackHandle() {
       uni.navigateBack();
     },

+ 1 - 1
YSGZYBZ_WXAPP/pages/received/index.scss

@@ -53,7 +53,7 @@
 
     .scroll-view_H {
       height: calc(50vh - 70px);
-
+      overflow-y: auto;
       .cardBox {
         width: 100%;
         background: #FFFFFF;

+ 40 - 44
YSGZYBZ_WXAPP/pages/received/index.vue

@@ -15,45 +15,45 @@
         <view class="titleBox">
           <view class="search">
             <input
+              v-model="dkbhModel"
               placeholder-class="address"
               class="input"
               type="text"
               placeholder="请输入地块编号"
             />
           </view>
-          <view class="searchBtn">
+          <view class="searchBtn" @click="queryClick()">
             <image class="icon" src="../../static/images/search.png"></image>
           </view>
         </view>
-        <scroll-view
-          scroll-y="true"
-          class="scroll-view_H"
-          :scroll-top="scrollTop"
-          lower-threshold="50"
-          @scrolltolower="scrollHandle"
-        >
-          <view class="cardBox" v-for="(item, index) in listData" :key="index">
+        <scroll-view scroll-y="true" class="scroll-view_H" lower-threshold="50">
+          <view
+            class="cardBox"
+            @click="cardBoxClick(item, index)"
+            v-for="(item, index) in listData"
+            :key="index"
+          >
             <view class="cardBoxTitle">
               <view class="titleOne">
                 <view class="x1">{{ index + 1 }}</view>
-                <view class="x2">{{ item.name }}</view>
+                <view class="x2">{{ item.dkbh }}</view>
               </view>
               <view class="citys">
                 <image class="icon" src="../../static/images/citys.png"></image>
-                <view class="x1">{{ item.city }}</view>
+                <view class="x1">{{ item.dkwz }}</view>
               </view>
             </view>
             <div class="cardBoxContent">
               <view class="x1"> 管地单位:{{ item.gddw }} </view>
-              <view class="x1"> 地块面积:{{ item.dkmj }} 亩 </view>
+              <view class="x1"> 地块面积:{{ item.mj }} 亩 </view>
               <view class="x1"> 上次巡查时间:{{ item.xcsj }} </view>
             </div>
             <div class="cardBoxBtns">
-              <view class="btn btn1" @click="toDetailHandle(item)">
+              <view class="btn btn1" @click.stop="toDetailHandle(item)">
                 <image class="icon" src="../../static/images/xcxq.png"></image>
                 <view class="x1">详情</view>
               </view>
-              <view class="btn btn1" @click="toDetailHandle1(item)">
+              <view class="btn btn1" @click.stop="toDetailHandle1(item)">
                 <image
                   class="icon"
                   src="../../static/images/xuncha.png"
@@ -81,23 +81,15 @@ export default {
   },
   data() {
     return {
-      scale: 7.3,
+      dkbhModel: '',
+      scale: 12,
       id: 0, // 使用 marker点击事件 需要填写id
       title: 'map',
-      latitude: 28.867118,
-      longitude: 120.42512,
+      latitude: 30.131,
+      longitude: 120.19308,
       covers: [],
       count: 0,
-      listData: [
-        {
-          name: 'PY-110',
-          city: '滨江区-西兴街道',
-          gddw: '滨江环境公司',
-          dkmj: '256.32',
-          xcsj: '2023-10-25 09:25:23',
-          id: '1',
-        },
-      ],
+      listData: [],
       scrollTop: 0,
       pageNo: 1, //当前页
       pageSize: 10, //每页显示多少条
@@ -107,10 +99,16 @@ export default {
     };
   },
   mounted() {
-    // this.queryWarningPage();
+    this.queryWarningPage();
     this.mapObj = uni.createMapContext('map');
   },
   methods: {
+    cardBoxClick(item,index) {
+      console.log(111);
+    },
+    queryClick() {
+      this.queryWarningPage();
+    },
     location(val) {
       const sendData = {
         id: val.id,
@@ -142,12 +140,12 @@ export default {
     },
     toDetailHandle(item) {
       uni.navigateTo({
-        url: `/pages/receivedDetail/index?idStr=${item['id']}`,
+        url: `/pages/receivedDetail/index?obj=${JSON.stringify(item)}`,
       });
     },
     toDetailHandle1(item) {
       uni.navigateTo({
-        url: `/pages/nocheckDetail/index?idStr=${item['id']}`,
+        url: `/pages/nocheckDetail/index?obj=${JSON.stringify(item)}`,
       });
     },
     scrollHandle() {
@@ -159,26 +157,24 @@ export default {
     queryWarningPage() {
       if (!this.isRequest) return;
       const sendData = {
-        pageNo: this.pageNo,
-        pageSize: this.pageSize,
-        taskStatus: 1,
-        startTime: '2022-01-01 00:00:00',
-        endTime: '2050-01-01 23:59:59',
-        assignorIds: uni.getStorageSync('userInfo').id,
+        dkbh: this.dkbhModel,
+        xcryId: uni.getStorageSync('userInfo').id,
       };
       httpAjax({
-        url: 'app-api/mining/app/page',
+        url: 'app/xc/getXcryDkList',
         method: 'GET',
         data: sendData,
       })
         .then((result) => {
-          const data = result['data'];
-          if (data) {
-            this.listData = this.listData.concat(data['list']);
-            this.count = data['total'];
-            if (data['total'] <= this.pageSize) {
-              this.isRequest = false;
-            }
+          if (result.data) {
+            this.listData = result.data;
+            this.listData.forEach((item) => {
+              for (let key in item) {
+                if (item[key] == null) {
+                  item[key] = '';
+                }
+              }
+            });
           }
         })
         .catch((err) => {

+ 94 - 0
YSGZYBZ_WXAPP/pages/receivedDetail/index.scss

@@ -11,7 +11,10 @@
       padding: 10px;
 
       &.checkResultBox {
+
         >.content {
+          margin-top: 10px;
+
           >.formGroup {
             padding: 8px 5px;
             font-size: 14px;
@@ -75,6 +78,8 @@
               }
             }
           }
+
+
         }
 
         >.btn {
@@ -135,8 +140,97 @@
             }
           }
 
+          .szfw {
+            height: 80px;
+
+            .title {
+              line-height: 80px;
+            }
+
+            .val {
+              line-height: 26px;
+              display: flex;
+              align-items: center;
+
+              text {
+                line-height: 26px;
+              }
+            }
+          }
+
         }
       }
     }
   }
+}
+
+.cooapseHeader {
+  width: 100%;
+  background-color: #fff;
+}
+
+.uni-collapse-item__title {
+  display: flex !important;
+  align-items: center !important;
+  justify-content: space-between !important;
+  height: 40px !important;
+  border: 1px solid #E8EBF0;
+  padding-left: 10px;
+  margin-bottom: 0;
+}
+
+.collapse-content {
+  width: 100%;
+  border: 1px solid #E8EBF0;
+  padding: 10px;
+  box-sizing: border-box;
+
+  .li {
+    width: 100%;
+    height: 28px;
+    display: flex;
+    align-items: center;
+
+    view {
+      border: 1px solid #E8EBF0;
+      box-sizing: border-box;
+    }
+
+    .x1 {
+      width: 100px;
+      height: 100%;
+      background-color: #F9F9F9;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin-right: 0 !important;
+    }
+
+    .x2 {
+      width: calc(100% - 100px);
+      height: 100%;
+      background-color: #fff;
+      display: flex;
+      align-items: center;
+      padding-left: 10px;
+
+    }
+  }
+
+  .xcms {
+    height: 50px;
+  }
+
+  .xczp {
+    height: 60px;
+    .x2{
+      display: flex;
+      align-items: center;
+      image{
+        max-width: 50px;
+        max-height: 50px;
+        margin: 0 4px;
+      }
+    }
+  }
 }

+ 112 - 43
YSGZYBZ_WXAPP/pages/receivedDetail/index.vue

@@ -7,35 +7,37 @@
         <view class="content">
           <view class="item">
             <text class="title">地块编号</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.dkbh }}</text>
           </view>
           <view class="item">
             <text class="title">面积(亩)</text>
-            <text class="val">{{ detailData.mj }}</text>
+            <text class="val">{{ objs.mj }}</text>
           </view>
           <view class="item">
             <text class="title">地块位置</text>
-            <text class="val">{{ detailData.dkwz }}</text>
+            <text class="val">{{ objs.dkwz }}</text>
           </view>
           <view class="item">
             <text class="title">地块现状</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.dkxz }}</text>
           </view>
           <view class="item">
             <text class="title">管地单位</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.gddw }}</text>
           </view>
           <view class="item">
             <text class="title">联系人</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.lxr }}</text>
           </view>
           <view class="item">
             <text class="title">联系电话</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">{{ objs.lxdh }}</text>
           </view>
-          <view class="item">
+          <view class="item szfw">
             <text class="title">四至范围</text>
-            <text class="val">{{ detailData.dkbh }}</text>
+            <text class="val">
+              <text>{{ objs.szfw }}</text>
+            </text>
           </view>
         </view>
       </view>
@@ -47,33 +49,54 @@
             v-model="accordionVal"
             @change="collapseChange"
           >
-            <uni-collapse-item titleBorder="none">
+            <uni-collapse-item
+              titleBorder="none"
+              v-for="(item, index) in collapseList"
+              :key="index"
+            >
               <template v-slot:title>
-                <view>11111</view>
+                <view class="cooapseHeader">巡查时间:{{ item.xcsj }}</view>
               </template>
-              <view class="content">
-                <text class="text">折叠内容主体,可自定义内容及样式</text>
-              </view>
-            </uni-collapse-item>
-            <uni-collapse-item title="手风琴效果">
-              <view class="content">
-                <text class="text"
-                  >手风琴效果同时只会保留一个组件的打开状态,其余组件会自动关闭。</text
-                >
-              </view>
-            </uni-collapse-item>
-            <uni-collapse-item title="手风琴效果">
-              <view class="content">
-                <text class="text"
-                  >手风琴效果同时只会保留一个组件的打开状态,其余组件会自动关闭。</text
-                >
-              </view>
-            </uni-collapse-item>
-            <uni-collapse-item title="手风琴效果">
-              <view class="content">
-                <text class="text"
-                  >手风琴效果同时只会保留一个组件的打开状态,其余组件会自动关闭。</text
-                >
+              <view class="collapse-content">
+                <view class="li">
+                  <view class="x1">
+                    <text>巡查人员</text>
+                  </view>
+                  <view class="x2">
+                    <text>{{ item.xcryName }}</text>
+                  </view>
+                </view>
+                <view class="li">
+                  <view class="x1">
+                    <text>联系电话</text>
+                  </view>
+                  <view class="x2">
+                    <text>{{ item.xcryMobile }}</text>
+                  </view>
+                </view>
+                <view class="li xcms">
+                  <view class="x1">
+                    <text>现场描述</text>
+                  </view>
+                  <view class="x2">
+                    <text>{{ item.xzms }}</text>
+                  </view>
+                </view>
+                <view class="li xczp">
+                  <view class="x1">
+                    <text>现场照片</text>
+                  </view>
+                  <view class="x2">
+                    <image
+                      @click="previewImg(l.fileurl, index)"
+                      v-for="(l, i) in item.imgList"
+                      :key="i"
+                      :src="l.fileurl"
+                      alt=""
+                    >
+                    </image>
+                  </view>
+                </view>
               </view>
             </uni-collapse-item>
           </uni-collapse>
@@ -87,7 +110,7 @@
 import navigationBar from '../../components/navigationBar/navigationBar.vue';
 import httpAjax from '@/utils/https.js';
 import CustomMixins from '@/mixins/CustomMixins.js';
-
+import config from '@/utils/config';
 const FormData = require('@/utils/formData/formData.js');
 
 export default {
@@ -97,25 +120,71 @@ export default {
   },
   data() {
     return {
+      objs: {},
+      collapseList: [],
       accordionVal: '',
       warningId: '',
-      detailData: {
-        dkbh: 'CH-52',
-        mj: '81.30',
-        dkwz: '11',
-      },
     };
   },
   onReady() {
     uni.showTabBar();
   },
   onLoad(option) {
-    const idStr = option['idStr'];
-    this.warningId = idStr;
-    this.getLocationApi2();
+    const idStr = JSON.parse(option['obj']);
+    this.objs = idStr;
+    this.initList();
   },
   beforeDestroy() {},
   methods: {
+    previewImg(current, index) {
+      const urls = this.collapseList[index].imgList.map((item) => {
+        return item.fileurl;
+      });
+      uni.previewImage({
+        current,
+        urls,
+      });
+    },
+    initList() {
+      const sendData = {
+        dksyh: this.objs.dksyh,
+      };
+      httpAjax({
+        url: 'app/xc/getXcjlListByDksyh',
+        method: 'GET',
+        data: sendData,
+      })
+        .then((result) => {
+          if (result.data) {
+            this.initImgs(result.data);
+          }
+        })
+        .catch((err) => {
+          console.error('');
+        });
+    },
+    initImgs(data) {
+      let that = this;
+      let fileList = JSON.parse(JSON.stringify(data));
+
+      fileList.forEach((item) => {
+        item.imgList.forEach((l) => {
+          that.getOSSFileById(l.fileId).then((res) => {
+            let s = new Uint8Array(res[1].data);
+            let sd = uni.arrayBufferToBase64(s);
+            l.fileurl = 'data:image/png;base64,' + sd;
+          });
+        });
+      });
+      this.collapseList = fileList;
+    },
+
+    getOSSFileById(fileId) {
+      return uni.request({
+        url: config.baseUrl + 'api/oss/download?id' + '=' + fileId,
+        responseType: 'arraybuffer',
+      });
+    },
     collapseChange() {},
     toBackHandle() {
       uni.navigateBack();

File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/components/SlideCard/SlideCard.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/components/navigationBar/navigationBar.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/index.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/main/index.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/nocheckDetail/index.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/received/index.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/pages/receivedDetail/index.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.js.map


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map


+ 1 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/app.json

@@ -1,5 +1,6 @@
 {
   "pages": [
+    "pages/login/index",
     "pages/main/index",
     "pages/receivedDetail/index",
     "pages/nocheckDetail/index"

File diff suppressed because it is too large
+ 5546 - 5882
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/common/vendor.js


File diff suppressed because it is too large
+ 11 - 11
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/components/SlideCard/SlideCard.js


File diff suppressed because it is too large
+ 11 - 11
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/components/navigationBar/navigationBar.js


File diff suppressed because it is too large
+ 24 - 46
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/main/index.js


File diff suppressed because it is too large
+ 252 - 52
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/nocheckDetail/index.js


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/nocheckDetail/index.wxml


+ 14 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/nocheckDetail/index.wxss

@@ -143,4 +143,18 @@
   border: 1px solid #E8EBF0;
   border-bottom: 0;
 }
+.nocheckBox .container > view.warningBox .content .szfw {
+  height: 80px;
+}
+.nocheckBox .container > view.warningBox .content .szfw .title {
+  line-height: 80px;
+}
+.nocheckBox .container > view.warningBox .content .szfw .val {
+  line-height: 26px;
+  display: flex;
+  align-items: center;
+}
+.nocheckBox .container > view.warningBox .content .szfw .val text {
+  line-height: 26px;
+}
 

File diff suppressed because it is too large
+ 40 - 44
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/received/index.js


File diff suppressed because it is too large
+ 0 - 1
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/received/index.wxml


+ 1 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/received/index.wxss

@@ -72,6 +72,7 @@
 }
 .receivedBox .container .scroll-view_H {
   height: calc(50vh - 70px);
+  overflow-y: auto;
 }
 .receivedBox .container .scroll-view_H .cardBox {
   width: 100%;

File diff suppressed because it is too large
+ 96 - 27
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/receivedDetail/index.js


File diff suppressed because it is too large
+ 0 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/receivedDetail/index.wxml


+ 78 - 0
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/pages/receivedDetail/index.wxss

@@ -37,6 +37,9 @@
   background-color: #fff;
   padding: 10px;
 }
+.nocheckBox .container > view.checkResultBox > .content {
+  margin-top: 10px;
+}
 .nocheckBox .container > view.checkResultBox > .content > .formGroup {
   padding: 8px 5px;
   font-size: 14px;
@@ -143,4 +146,79 @@
   border: 1px solid #E8EBF0;
   border-bottom: 0;
 }
+.nocheckBox .container > view.warningBox .content .szfw {
+  height: 80px;
+}
+.nocheckBox .container > view.warningBox .content .szfw .title {
+  line-height: 80px;
+}
+.nocheckBox .container > view.warningBox .content .szfw .val {
+  line-height: 26px;
+  display: flex;
+  align-items: center;
+}
+.nocheckBox .container > view.warningBox .content .szfw .val text {
+  line-height: 26px;
+}
+.cooapseHeader {
+  width: 100%;
+  background-color: #fff;
+}
+.uni-collapse-item__title {
+  display: flex !important;
+  align-items: center !important;
+  justify-content: space-between !important;
+  height: 40px !important;
+  border: 1px solid #E8EBF0;
+  padding-left: 10px;
+  margin-bottom: 0;
+}
+.collapse-content {
+  width: 100%;
+  border: 1px solid #E8EBF0;
+  padding: 10px;
+  box-sizing: border-box;
+}
+.collapse-content .li {
+  width: 100%;
+  height: 28px;
+  display: flex;
+  align-items: center;
+}
+.collapse-content .li view {
+  border: 1px solid #E8EBF0;
+  box-sizing: border-box;
+}
+.collapse-content .li .x1 {
+  width: 100px;
+  height: 100%;
+  background-color: #F9F9F9;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-right: 0 !important;
+}
+.collapse-content .li .x2 {
+  width: calc(100% - 100px);
+  height: 100%;
+  background-color: #fff;
+  display: flex;
+  align-items: center;
+  padding-left: 10px;
+}
+.collapse-content .xcms {
+  height: 50px;
+}
+.collapse-content .xczp {
+  height: 60px;
+}
+.collapse-content .xczp .x2 {
+  display: flex;
+  align-items: center;
+}
+.collapse-content .xczp .x2 image {
+  max-width: 50px;
+  max-height: 50px;
+  margin: 0 4px;
+}
 

File diff suppressed because it is too large
+ 12 - 12
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js


File diff suppressed because it is too large
+ 11 - 11
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js


File diff suppressed because it is too large
+ 12 - 12
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js


File diff suppressed because it is too large
+ 11 - 11
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.js


File diff suppressed because it is too large
+ 94 - 4
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.js


File diff suppressed because it is too large
+ 5 - 95
YSGZYBZ_WXAPP/unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js


+ 5 - 0
YSGZYBZ_WXAPP/utils/config.js

@@ -0,0 +1,5 @@
+const config = {
+  baseUrl: "http://10.10.9.71:7089/ysgzybz/",
+}
+
+export default config

+ 40 - 39
YSGZYBZ_WXAPP/utils/https.js

@@ -1,49 +1,50 @@
 // 区分开发环境和生产环境  接口地址
-let baseUrl = 'http://10.10.9.71:7089/ysgzybz/';
+import config from './config'
+let baseUrl = config.baseUrl;
 // let baseUrl = 'http://60.191.110.205:19099/';
 // let baseUrl = 'https://ksfdc.zjugis.com:19099/';
 
 
 
 function https(config) {
-	 //显示loading
-	 wx.showLoading({
-		 title: '正在请求中'
-	 }); 
-	 //设置请求头
-	 if(!config.header) {
-		 config.header = {
-			
-		 }
-	 }
-	 if(!config.header['content-type']){
-		 config.header['content-type'] = 'application/json';
-	 }
-	 config.url = baseUrl + config.url;   // 请求地址
-	 let promise = new Promise(function(resolve, reject) {
-		 uni.request(config).then(res => {
-			 wx.hideLoading()      //隐藏loading
-			 if (res[0]) {
-				 uni.showToast({
-					 title: "数据获取失败",
-					 icon: "none",
-					 duration: 1500
-				 })
-				 reject(false);
-			 } else {
-				 let data = res[1].data; 
-				 if (data.code == 1) {
-					 resolve(data);
-				 } else {
-					 resolve(data);
-				 }
-			 }
-		 }).catch(error => {
-			 wx.hideLoading()      //隐藏loading
-			 reject(error);
-		 })
-	 })
-	 return promise
+  //显示loading
+  wx.showLoading({
+    title: '正在请求中'
+  });
+  //设置请求头
+  if (!config.header) {
+    config.header = {
+
+    }
+  }
+  if (!config.header['content-type']) {
+    config.header['content-type'] = 'application/json';
+  }
+  config.url = baseUrl + config.url;   // 请求地址
+  let promise = new Promise(function (resolve, reject) {
+    uni.request(config).then(res => {
+      wx.hideLoading()      //隐藏loading
+      if (res[0]) {
+        uni.showToast({
+          title: "数据获取失败",
+          icon: "none",
+          duration: 1500
+        })
+        reject(false);
+      } else {
+        let data = res[1].data;
+        if (data.code == 1) {
+          resolve(data);
+        } else {
+          resolve(data);
+        }
+      }
+    }).catch(error => {
+      wx.hideLoading()      //隐藏loading
+      reject(error);
+    })
+  })
+  return promise
 }
 
 export default https;

Some files were not shown because too many files changed in this diff