浏览代码

fix:"优化部分页面"

soobin 1 周之前
父节点
当前提交
10a4b68bc0

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "shenze-vue3-app",
-  "version": "1.5.813",
+  "version": "1.5.816",
   "private": true,
   "scripts": {
     "start": "vue-cli-service serve",

+ 2 - 2
public/version.json

@@ -1,5 +1,5 @@
 {
-  "version": "1.5.813",
-  "timestamp": "2025-08-13T08:56:02.372",
+  "version": "1.5.814",
+  "timestamp": "2025-08-13T11:47:59.373",
   "commitHash": "dev-build"
 }

+ 0 - 15
src/service/device/index.js

@@ -1,14 +1,6 @@
 import axios from "../../utils/axios";
 import { stringToUrl } from "@/common/js/utils";
 
-// 获取设备列表
-export function getDeviceList(params) {
-  return axios.post(
-    `/SZWL-SERVER/tEquipment/findList?${stringToUrl(params)}`,
-    params
-  );
-}
-
 // 获取机器列表
 export function getMachineList(params) {
   return axios.post(`/SZWL-SERVER/tEquipment/list`, params);
@@ -284,13 +276,6 @@ export function updateDevicePassword(params) {
 export function pushLogo(params) {
   return axios.post(`/SZWL-SERVER/tEquipment/pushLogo`, params);
 }
-// 日志下载
-export function downloadLog(params) {
-  return axios.get(
-    `/SZWL-SERVER/tEquipment/downloadLog?${stringToUrl(params)}`,
-    { responseType: "blob", timeout: 12000 }
-  );
-}
 
 // 获取DIY花型列表信息
 export function selectDIYFlowers(params) {

+ 0 - 1
src/views/device/index.vue

@@ -594,7 +594,6 @@ import {
 import sHeader from "../../components/SimpleHeader";
 import { getLoginUser, Format_calcuDecial } from "../../common/js/utils";
 import {
-  // getDeviceList,
   eliminate,
   Api_getReplenishment,
   changeSleepDesc,

+ 6 - 8
src/views/device/jam/index.vue

@@ -3,14 +3,12 @@
     <s-header :name="$t('remote.C30')" :noback="false" />
 
     <!-- 设备名称标题 -->
-    <div class="device-card">
-        <div class="device-header">
-          <van-icon name="desktop-o" class="icon" />
-          <h3 class="device-name">
-            {{ equipmentName }}
-          </h3>
-        </div>
-      </div>
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
+    </div>
 
     <!-- 果酱抽取卡片 -->
     <div class="settings-card">

+ 1 - 2
src/views/device/openDoor.vue

@@ -265,14 +265,13 @@ export default {
     };
 
     const materialChg = (isMaterialUse) => {
-      console.log(deviceDetal.value.equimentType);
       showConfirmDialog({
         title: t("device.openRemind"),
         message: t("device.openRemindMaterial"),
       }).then(async () => {
         const { data } = await changeMaterial({
           equipmentId: deviceDetal.value.id,
-          isMaterialUse: isMaterialUse ? "1" : "0",
+          isMaterialUse: isMaterialUse,
         });
         if (data.code === "00000") {
           showToast(t("device.sentSuccessfully"));

+ 5 - 7
src/views/device/payInfo/index.vue

@@ -4,13 +4,11 @@
     <s-header :name="$t('remote.C32')" :noback="false" />
 
     <!-- 设备名称标题 -->
-    <div class="device-card">
-      <div class="device-header">
-        <van-icon name="desktop-o" class="icon" />
-        <h3 class="device-name">
-          {{ equipmentName }}
-        </h3>
-      </div>
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
     </div>
 
     <!-- 商户信息表单 -->

+ 5 - 7
src/views/device/payment/index.vue

@@ -3,13 +3,11 @@
     <s-header :name="$t('remote.C28')" :noback="false" />
 
     <!-- 设备名称标题 -->
-    <div class="device-card">
-      <div class="device-header">
-        <van-icon name="desktop-o" class="icon" />
-        <h3 class="device-name">
-          {{ equipmentName }}
-        </h3>
-      </div>
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
     </div>
 
     <!-- 支付方式列表 -->

+ 6 - 8
src/views/device/tax/index.vue

@@ -3,13 +3,11 @@
     <s-header :name="$t('remote.C29')" :noback="false" />
 
     <!-- 设备名称标题 -->
-    <div class="device-card">
-      <div class="device-header">
-        <van-icon name="desktop-o" class="icon" />
-        <h3 class="device-name">
-          {{ equipmentName }}
-        </h3>
-      </div>
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
     </div>
 
     <!-- 税收设置卡片 -->
@@ -176,7 +174,7 @@ export default {
     margin: 12px 16px;
     border-radius: 8px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-    
+
     .icon {
       font-size: 18px;
       color: #4d6add;

+ 6 - 45
src/views/device/viewLogs/index.vue

@@ -49,7 +49,7 @@
       </div>
 
       <!-- 新增通道选择 -->
-      <div class="channel-selector">
+      <!-- <div class="channel-selector">
         <van-radio-group v-model="channelType" direction="horizontal">
           <van-radio name="1" icon-size="16px" class="channel-option">
             默认通道
@@ -58,7 +58,7 @@
             新通道
           </van-radio>
         </van-radio-group>
-      </div>
+      </div> -->
 
       <!-- 操作按钮 -->
       <div class="action-buttons">
@@ -103,13 +103,11 @@
 import { onMounted, computed, ref } from "vue";
 import sHeader from "@/components/SimpleHeader.vue";
 import {
-  downloadLog,
   getDeviceDetal,
-  uploadLog,
+  // uploadLog,
   newUploadLog,
   queryLog,
 } from "@/service/device";
-import { $M_ExportFile } from "@/common/js/utils";
 import { showFailToast, showToast } from "vant";
 import { useRoute } from "vue-router";
 import dateUtil from "@/utils/dateUtil";
@@ -147,7 +145,7 @@ export default {
     });
 
     // 上传通道
-    const channelType = ref("1");
+    // const channelType = ref("1");
 
     // 初始化页面获取列表
     onMounted(async () => {
@@ -177,40 +175,6 @@ export default {
       }
     };
 
-    const downloadBtn = async () => {
-      const pattern = /^\d{4}-\d{2}-\d{2}$/;
-      if (logsTime.value == null) {
-        showToast("请选择日期");
-        return;
-      }
-      if (!pattern.test(logsTime.value)) {
-        showToast("日期格式有误");
-        return;
-      }
-      const formattedDate = logsTime.value.replace(/-/g, "");
-      downloading.value = true;
-      try {
-        const { headers, data } = await downloadLog({
-          equipmentId: deviceId,
-          day: formattedDate,
-        });
-        console.log("请求成功", headers, data);
-        $M_ExportFile(data, headers);
-      } catch (error) {
-        if (error.code === "ECONNABORTED") {
-          // 处理请求超时的错误
-          console.error("请求超时:", error);
-          showFailToast("请求超时");
-        } else {
-          // 处理其他请求错误
-          console.error("请求失败:", error);
-          showFailToast("请求失败");
-        }
-      } finally {
-        downloading.value = false;
-      }
-    };
-
     const uploadLogBtn = async () => {
       const pattern = /^\d{4}-\d{2}-\d{2}$/;
       if (logsTime.value == "") {
@@ -222,9 +186,7 @@ export default {
         return;
       }
       const formattedDate = logsTime.value.replace(/-/g, "");
-      const { data } = await (channelType.value == "1"
-        ? uploadLog
-        : newUploadLog)({
+      const { data } = await newUploadLog({
         equipmentId: deviceId,
         day: formattedDate,
       });
@@ -296,7 +258,6 @@ export default {
 
     return {
       deviceDetail,
-      downloadBtn,
       chooseTime,
       selectTime,
       showPicker,
@@ -309,7 +270,7 @@ export default {
       queryLogBtn,
       fileName,
       message,
-      channelType,
+      // channelType,
       equipmentName,
     };
   },