lxh vor 3 Tagen
Ursprung
Commit
9ab820e093

+ 1 - 1
common/service/config.service.js

@@ -19,7 +19,7 @@ let staticDomainURL = BASE_URL + "/sys/common/static";
 const configService = {
   apiUrl: uni.getStorageSync("apiUrl"),
   apiUrlP: "http://10.246.167.205",
-  // apiUrlP: 'http://182.92.126.35:6006',
+  // apiUrlP: 'http://182.92.126.35',
   staticDomainURL: staticDomainURL,
 };
 

+ 2 - 2
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "瓦斯巡检",
+    "name" : "智能通风",
     "appid" : "__UNI__2000523",
     "description" : "",
     "versionName" : "2.2.22",
@@ -110,7 +110,7 @@
         }
     },
     "h5" : {
-        "title" : "瓦斯巡检",
+        "title" : "智能通风",
         "domain" : "myhjdc.cn",
         "router" : {
             "mode" : "history"

+ 20 - 17
package.json

@@ -1,18 +1,21 @@
 {
-    "id": "helang-compress",
-    "name": "图片压缩 - 可以自定义压缩尺寸和压缩质量",
-    "displayName": "图片压缩 - 可以自定义压缩尺寸和压缩质量",
-    "version": "1.1.5",
-    "description": "简单实用的图片压缩插件,对大体积图片的压缩率显著。能大大的提高图片上传速度。",
-    "keywords": [
-        "图片",
-        "压缩",
-        "批量压缩"
-    ],
-    "dcloudext": {
-        "category": [
-            "前端组件",
-            "通用组件"
-        ]
-    }
-}
+  "id": "helang-compress",
+  "name": "图片压缩 - 可以自定义压缩尺寸和压缩质量",
+  "displayName": "图片压缩 - 可以自定义压缩尺寸和压缩质量",
+  "version": "1.1.5",
+  "description": "简单实用的图片压缩插件,对大体积图片的压缩率显著。能大大的提高图片上传速度。",
+  "keywords": [
+    "图片",
+    "压缩",
+    "批量压缩"
+  ],
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ]
+  },
+  "dependencies": {
+    "formdata-polyfill": "^4.0.10"
+  }
+}

+ 23 - 33
pages/gasreport/components/gasImgIdentify.vue

@@ -37,7 +37,8 @@
         </view>
 
         <!-- 新增弹窗 -->
-        <view v-if="isShowAdd" :style="{ padding: imageSrcView ? '295px 0px 10px 0px' : '54px 0px 10px 0px' }"
+        <view v-if="isShowAdd"
+            :style="{ padding: imageSrcView ? '295px 0px 10px 0px' : imageSrc ? '330px 0px 10px 0px' : saveImg ? '330px 0px 10px 0px' : '54px 0px 10px 0px' }"
             :class="statusShow == 'edit' ? 'bot-gas-list1' : 'bot-gas-list'">
             <view class="top-dialog-area">
                 <view class="dialog-item">
@@ -358,7 +359,6 @@ export default {
                 quality: 0.85,
                 minSize: 640 //最小压缩尺寸,图片尺寸小于该时值不压缩,非H5平台有效。若需要忽略该设置,可设置为一个极小的值,比如负数。
             }).then((res) => {
-                console.log(res, '9900===')
                 that.imageSrc = res
                 // 压缩成功回调
                 that.loading = true
@@ -2399,40 +2399,30 @@ export default {
         getTaskImg() {
             let that = this
             let apiUrlImg = `${configService.apiUrlP}:6008`
-            let form = new FormData()
-            // form.append('reportdate', '2025-04-10')
-            // form.append('checkpath', '22106工作面')
-            // form.append('order', '中班')
-            // form.append('checkorder', 1)
-            form.append('reportdate', that.searchTime)
-            form.append('checkpath', that.deviceName)
-            form.append('order', that.classType)
-            form.append('checkorder', Number(that.checkNum))
-            let formDataStr = ''
-            form.forEach((value, key) => {
-                if (formDataStr != '') {
-                    formDataStr += '&'
-                }
-                formDataStr += encodeURIComponent(key) + '=' + encodeURIComponent(value)
-            })
+            // let formDataStr = {
+            //     reportdate: '2025-04-10',
+            //     checkpath: '22106工作面',
+            //     order: '中班',
+            //     checkorder: 1,
+            // }
+            let formDataStr = {
+                reportdate: that.searchTime,
+                checkpath: that.deviceName,
+                order: that.classType,
+                checkorder: Number(that.checkNum),
+            }
             uni.request({
                 url: `${apiUrlImg}/gasServerImg`,
                 method: 'post',
-                responseType: 'arraybuffer', // 或者 'blob'
+                responseType: 'arraybuffer', // 确保以二进制形式接收数据
                 data: formDataStr,
-                header: {
-                    'content-type': 'application/x-www-form-urlencoded'
-                },
                 success: (res) => {
-                    if (res.statusCode === 200) {
-                        let imageData = res.data; // 这里是二进制数据
-                        // 接下来你可以使用这个二进制数据来显示图片
-                        // 例如,创建一个Image对象并设置src为imageData的URL
-                        let img = new Image();
-                        let blob = new Blob([imageData]); // 如果是arraybuffer,需要转换为Blob
-                        let url = URL.createObjectURL(blob);
-                        that.imageSrcView = url;
-                        // document.body.appendChild(img); // 或者添加到你的页面中
+                    if (res.data instanceof ArrayBuffer) {
+                        let arrayBufferView = new Uint8Array(res.data);
+                        // 你可以在这里对arrayBufferView进行操作
+                        console.log(arrayBufferView);
+                        const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(arrayBufferView)
+                        that.imageSrcView = base64 || '';
                     }
                 },
                 fail: (err) => {
@@ -2455,7 +2445,7 @@ export default {
                     'checkpath': that.deviceName,
                 },
                 success: (res) => {
-                    if (res.statusCode==200) {
+                    if (res.statusCode == 200) {
                         uni.showToast({
                             title: JSON.parse(res.data).res,
                             icon: 'none' // 可选图标,'success', 'loading', 'none'
@@ -2587,7 +2577,7 @@ export default {
 
     .bot-gas-list {
         width: 100%;
-        height: calc(100% - 293px);
+        height: 100%;
         padding: 10px;
         box-sizing: border-box;
         background-color: #FFF;

+ 1 - 1
pages/gasreport/components/taskBoard.vue

@@ -52,7 +52,7 @@ export default {
             searchTime: '',//检测时间
             showCalendar: false,//控制日期选型下拉开启
             // timeRan: Number(new Date()),
-            minDate: moment().subtract(60, 'days').format('YYYY-MM-DD'),
+            minDate: moment().subtract(90, 'days').format('YYYY-MM-DD'),
             isShow: true,
             loadComponent: '',
             taskId: '',

+ 2 - 2
pages/login/login.vue

@@ -3,8 +3,8 @@
       <u-icon name="setting-fill" color="#2979ff" size="28" @click="setIp"></u-icon>
       <scroll-view scroll-y class="page" v-if="!ipShow">
         <view class="text-center" :style="[{ animation: 'show ' + 0.4 + 's 1' }]">
-          <!-- <image src="/static/desk-img/logo.png" mode='aspectFit' class="zai-logo "></image> -->
-          <image src="/static/dhz-logo.png" mode='aspectFit' class="zai-logo "></image>
+          <image src="/static/desk-img/logo.png" mode='aspectFit' class="zai-logo "></image>
+          <!-- <image src="/static/dhz-logo.png" mode='aspectFit' class="zai-logo "></image> -->
         </view>
         <view class="text-center" :style="[{ animation: 'show ' + 0.4 + 's 1' }]">
           <!-- <u-link  class="zai-title2 text-shadow " href="http://localhost:8080?ticket=234" >切换单点登录</u-link> -->