Просмотр исходного кода

[Feat 0000]风门svg接入 瓦斯日报样式优化

bobo04052021@163.com 8 часов назад
Родитель
Сommit
cc3f40693e

+ 73 - 0
.dsh-check/scan-that.mjs

@@ -0,0 +1,73 @@
+import fs from "node:fs";
+
+const file = process.argv[2];
+const src = fs.readFileSync(file, "utf8");
+const start = src.indexOf("<script>") + "<script>".length;
+const end = src.indexOf("</script>", start);
+let body = src.slice(start, end);
+
+// 定位 methods 块
+const methodsAt = body.indexOf("methods: {");
+if (methodsAt < 0) {
+  console.log("未找到 methods 块");
+  process.exit(0);
+}
+
+let i = body.indexOf("{", methodsAt);
+let depth = 0;
+const methodsBodyStart = i + 1;
+let methodsBodyEnd = -1;
+for (; i < body.length; i += 1) {
+  const ch = body[i];
+  if (ch === "{") depth += 1;
+  else if (ch === "}") {
+    depth -= 1;
+    if (depth === 0) {
+      methodsBodyEnd = i;
+      break;
+    }
+  }
+}
+body = body.slice(methodsBodyStart, methodsBodyEnd);
+
+// 逐个方法(methods 内第一层)
+const methods = [];
+let k = 0;
+while (k < body.length) {
+  // 跳过分隔与注释
+  const rest = body.slice(k);
+  const header = /^\s*(?:[A-Za-z_$][\w$]*\s*\([^)]*\)\s*\{|async\s+[A-Za-z_$][\w$]*\s*\([^)]*\)\s*\{)/.exec(rest);
+  if (!header) {
+    k += 1;
+    continue;
+  }
+  const nameMatch = /([A-Za-z_$][\w$]*)\s*\(/.exec(header[0]);
+  const name = nameMatch ? nameMatch[1] : "(anon)";
+  const bodyStart = k + header[0].length;
+  let d = 1;
+  let j = bodyStart;
+  for (; j < body.length; j += 1) {
+    if (body[j] === "{") d += 1;
+    else if (body[j] === "}") {
+      d -= 1;
+      if (d === 0) break;
+    }
+  }
+  methods.push({ name, text: body.slice(bodyStart, j) });
+  k = j + 1;
+}
+
+const bad = [];
+methods.forEach(({ name, text }) => {
+  const usesThat = /(^|[^.\w$])that\s*\./.test(text);
+  const declaresThat = /(?:const|let|var)\s+that\s*=/.test(text);
+  if (usesThat && !declaresThat) bad.push(name);
+});
+
+console.log(`共扫描 ${methods.length} 个方法`);
+if (bad.length === 0) {
+  console.log("没有「用了 that 但未定义」的方法");
+} else {
+  console.log(`有问题的方法(${bad.length}): ${bad.join(", ")}`);
+  process.exitCode = 1;
+}

+ 26 - 20
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "智能通风",
-    "appid" : "__UNI__8193760",
+    "appid" : "__UNI__2000523",
     "description" : "",
     "versionName" : "2.2.22",
     "versionCode" : 1,
@@ -91,7 +91,13 @@
                         "appkey_android" : "87f4d2a4a0c42e0c86cf312c8b8154e8"
                     }
                 },
-                "push" : {}
+                "push" : {
+                    "unipush" : {
+                        "version" : "2",
+                        "offline" : true,
+                        "hms" : {}
+                    }
+                }
             },
             "splashscreen" : {
                 "iosStyle" : "default",
@@ -105,27 +111,27 @@
                     "xxxhdpi" : "unpackage/res/icons/192x192.png"
                 },
                 "ios" : {
-                    "appstore" : "",
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
                     "ipad" : {
-                        "app" : "",
-                        "app@2x" : "",
-                        "notification" : "",
-                        "notification@2x" : "",
-                        "proapp@2x" : "",
-                        "settings" : "",
-                        "settings@2x" : "",
-                        "spotlight" : "",
-                        "spotlight@2x" : ""
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
                     },
                     "iphone" : {
-                        "app@2x" : "",
-                        "app@3x" : "",
-                        "notification@2x" : "",
-                        "notification@3x" : "",
-                        "settings@2x" : "",
-                        "settings@3x" : "",
-                        "spotlight@2x" : "",
-                        "spotlight@3x" : ""
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
                     }
                 }
             }

+ 2 - 2
pages/filecenter/filecenter.vue

@@ -686,7 +686,7 @@ export default {
         }
         if (response.data.code != 200) {
           this.loadFailed = true;
-          uni.showToast({ title: "文件列表加载失败", icon: "none" });
+          // uni.showToast({ title: "文件列表加载失败", icon: "none" });
           return;
         }
         const result = response.data.result || {};
@@ -702,7 +702,7 @@ export default {
       } catch (error) {
         if (seq === this.requestSeq) {
           this.loadFailed = true;
-          uni.showToast({ title: "文件列表加载失败", icon: "none" });
+          // uni.showToast({ title: "文件列表加载失败", icon: "none" });
         }
       } finally {
         if (seq === this.requestSeq) {

+ 152 - 127
pages/gasreport/components/Recognition.vue

@@ -1,18 +1,42 @@
 <template>
-    <view class="Recognition">
-        <u-list :height="666">
-            <u-list-item v-for="(item, index) in listData" :key="index">
-                <u-cell  :title="`${item.deviceName} (${item.checkNum == '1' ? '第一次' :
-                    item.checkNum == '2' ? '第二次' : ''})`" @click="getSbClick(item)">
-                    <u-avatar slot="icon" shape="square" size="35" :src="item.img"
-                        customStyle="margin: -3px 5px -3px 0"></u-avatar>
-                    <view slot="value" style="display: flex;align-items: center;margin-left: 20px;">
-                        <text :class="item.status=='2' ? 'fail-text' : 'suc-text'">{{ item.status=='0' ? '处理中' : item.status=='1' ? '识别成功' : item.status=='2' ? '识别失败' : '' }}</text>
-                    </view>
-                </u-cell>
-            </u-list-item>
-        </u-list>
-    </view>
+  <view class="Recognition">
+    <u-list :height="666">
+      <u-list-item v-for="(item, index) in listData" :key="index">
+        <u-cell
+          :title="`${item.deviceName} (${
+            item.checkNum == '1'
+              ? '第一次'
+              : item.checkNum == '2'
+              ? '第二次'
+              : ''
+          })`"
+          @click="getSbClick(item)"
+        >
+          <u-avatar
+            slot="icon"
+            shape="square"
+            size="35"
+            :src="item.img"
+            customStyle="margin: -3px 5px -3px 0"
+          ></u-avatar>
+          <view
+            slot="value"
+            style="display: flex; align-items: center; margin-left: 20px"
+          >
+            <text :class="item.status == '2' ? 'fail-text' : 'suc-text'">{{
+              item.status == "0"
+                ? "处理中"
+                : item.status == "1"
+                ? "识别成功"
+                : item.status == "2"
+                ? "识别失败"
+                : ""
+            }}</text>
+          </view>
+        </u-cell>
+      </u-list-item>
+    </u-list>
+  </view>
 </template>
 
 <script>
@@ -20,136 +44,137 @@ import api from "@/api/api";
 import configService from "@/common/service/config.service.js";
 
 export default {
-    name: 'Recognition',
-    components: {},
-    props: {
-        recognitionData: {
-            type: Array,
-            default: () => {
-                return []
-            }
-        }
+  name: "Recognition",
+  components: {},
+  props: {
+    recognitionData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
     },
+  },
 
-    data() {
-        return {
-            listData: [],
-           sbData:[],//识别数据
-           sbParamData:{}
-        }
+  data() {
+    return {
+      listData: [],
+      sbData: [], //识别数据
+      sbParamData: {},
+    };
+  },
+  computed: {
+    username: function () {
+      return uni.getStorageSync("login_user_info")["realname"];
     },
-    computed: {
-        username: function () {
-            return uni.getStorageSync("login_user_info")["realname"];
-        },
-        searchTime: function () {
-            return uni.getStorageSync('searchTime')
-        },
+    searchTime: function () {
+      return uni.getStorageSync("searchTime");
     },
-    watch: {
-        recognitionData: {
-            handler(newV, oldV) {
-                if (newV && newV.length != 0) {
-                    this.listData = newV
-                    this.processArray(this.listData)
-                }
-            },
-            immediate: true
+  },
+  watch: {
+    recognitionData: {
+      handler(newV, oldV) {
+        if (newV && newV.length != 0) {
+          this.listData = newV;
+          this.processArray(this.listData);
         }
-
+      },
+      immediate: true,
     },
-    mounted() {
-
+  },
+  mounted() {},
+  methods: {
+    async processArray(array) {
+      let that = this;
+      for (const obj of array) {
+        let findIndex = that.listData.findIndex(
+          (v) => v.deviceId == obj.deviceId
+        );
+        //0:处理中,1:识别成功,2:识别失败
+        that.listData[findIndex].status = "0";
+        const result = await that.processObject(obj);
+        that.$set(that.listData, findIndex, {
+          ...obj,
+          status: result[0].status,
+        });
+        that.sbData = that.listData.map((el) => {
+          return {
+            ...el,
+            sbList: result,
+          };
+        });
+      }
+      uni.hideLoading();
     },
-    methods: {
-        async processArray(array) {
-            let that = this
-            for (const obj of array) {
-                let findIndex=that.listData.findIndex(v=>v.deviceId==obj.deviceId)
-                //0:处理中,1:识别成功,2:识别失败
-               that.listData[findIndex].status='0'
-                const result = await that.processObject(obj);
-                that.$set(that.listData,findIndex,{...obj,status:result[0].status})
-                that.sbData=that.listData.map(el=>{
-                    return {
-                        ...el,
-                        sbList:result
-                    }
-                })
-            }
-              uni.hideLoading()
-        },
 
-        async processObject(obj) {
-             let that = this;
-             let list=[]
-            // 模拟异步操作,例如网络请求
-            return new Promise(resolve => setTimeout(() => {
-               
-                let jcNum = obj.deviceName.indexOf("第三次") != -1 ? 3 : null;
-                let apiUrlImg = `${configService.apiUrlP}:6008`;
-                uni.uploadFile({
-                    url: `${apiUrlImg}/gasIdentify`,
-                    filePath: uni.getStorageSync(obj.deviceId),
-                    name: "img",
-                    formData: {
-                        user: that.username,
-                        order: obj.classType_dictText,
-                        reportdate: that.searchTime,
-                        checkorder: jcNum ? jcNum : Number(obj.checkNum),
-                        checkpath: obj.deviceName,
-                        imgpath:  uni.getStorageSync(obj.deviceId),
-                    },
-                    success: (res) => {
-                        if (res) {
-                            that.indexList = JSON.parse(res.data).data || [];
-                           list=that.indexList.map(el=>{
-                            return {
-                                ...el,
-                                status:'1',
-                                
-                            }
-                           })
-                             resolve(list)
-                            // that.deviceId = that.deviceID;
-                        }
-                    },
-                    fail: (error) => {
-                        list.push({status:'2'})
-                          resolve(list)
-                    },
+    async processObject(obj) {
+      let that = this;
+      let list = [];
+      // 模拟异步操作,例如网络请求
+      return new Promise((resolve) =>
+        setTimeout(() => {
+          let apiUrlImg = `${configService.apiUrlP}:6008`;
+          uni.uploadFile({
+            url: `${apiUrlImg}/gasIdentifyDs`,
+            filePath: uni.getStorageSync(obj.deviceId),
+            name: "img",
+            formData: {
+              user: that.username,
+              order: obj.classType_dictText,
+              reportdate: that.searchTime,
+              checkpath: obj.deviceName,
+              imgpath: uni.getStorageSync(obj.deviceId),
+            },
+            success: (res) => {
+              if (res) {
+                that.indexList = JSON.parse(res.data).data || [];
+                list = that.indexList.map((el) => {
+                  return {
+                    ...el,
+                    status: "1",
+                  };
                 });
-            }, 1000));
-        },
-        //识别跳转
-        getSbClick(item){
-            this.sbParamData=this.sbData.filter(v=>v.deviceId==item.deviceId)[0]
-            console.log(this.sbParamData,'sbParam------')
-            //跳转填报页面
-            this.$emit('getRepport',this.sbParamData)
-        }
-
-    }
+                resolve(list);
+                // that.deviceId = that.deviceID;
+              }
+            },
+            fail: (error) => {
+              list.push({ status: "2" });
+              resolve(list);
+            },
+          });
+        }, 1000)
+      );
+    },
+    //识别跳转
+    getSbClick(item) {
+      this.sbParamData = this.sbData.filter(
+        (v) => v.deviceId == item.deviceId
+      )[0];
+      console.log(this.sbParamData, "sbParam------");
+      //跳转填报页面
+      this.$emit("getRepport", this.sbParamData);
+    },
+  },
 };
 </script>
 
 <style lang="scss" scoped>
 .Recognition {
-    position: relative;
-    width: 100%;
-    background-color: #fff;
+  position: relative;
+  width: 100%;
+  background-color: #fff;
 
-    .suc-text{
-        font-size: 12px;
-        color: rgb(118, 236, 88);
-    }
-    .fail-text{
-         font-size: 12px;
-        color: rgb(240, 20, 4);
-    }
+  .suc-text {
+    font-size: 12px;
+    color: rgb(118, 236, 88);
+  }
+  .fail-text {
+    font-size: 12px;
+    color: rgb(240, 20, 4);
+  }
 }
 
 ::v-deep .u-slot-title {
-    display: flex;
+  display: flex;
 }
 </style>

+ 32 - 18
pages/gasreport/components/gasImgIdentify.vue

@@ -292,7 +292,7 @@
 import api from "@/api/api";
 import moment from "moment";
 import configService from "@/common/service/config.service.js";
-// import { RHFselcet } from "@/uni_modules/fz-media-selcet";
+import { RHFselcet } from "@/uni_modules/fz-media-selcet";
 import helangCompress from "@/components/helang-compress/helang-compress";
 export default {
   name: "gasFill",
@@ -957,17 +957,15 @@ export default {
           that.imageSrc = res;
           // 压缩成功回调
           that.loading = true;
-          let jcNum = that.deviceName.indexOf("第三次") != -1 ? 3 : null;
           let apiUrlImg = `${configService.apiUrlP}:6008`;
           uni.uploadFile({
-            url: `${apiUrlImg}/gasIdentify`,
+            url: `${apiUrlImg}/gasIdentifyDs`,
             filePath: that.imageSrc,
             name: "img",
             formData: {
               user: that.username,
               order: that.classType,
               reportdate: that.searchTime,
-              checkorder: jcNum ? jcNum : Number(that.checkNum),
               checkpath: that.deviceName,
               imgpath: that.imageSrc,
             },
@@ -1408,17 +1406,15 @@ export default {
     getIdentyfe() {
       let that = this;
       that.loading = true;
-      let jcNum = that.deviceName.indexOf("第三次") != -1 ? 3 : null;
       let apiUrlImg = `${configService.apiUrlP}:6008`;
       uni.uploadFile({
-        url: `${apiUrlImg}/gasIdentify`,
+        url: `${apiUrlImg}/gasIdentifyDs`,
         filePath: that.saveImg,
         name: "img",
         formData: {
           user: that.username,
           order: that.classType,
           reportdate: that.searchTime,
-          checkorder: jcNum ? jcNum : Number(that.checkNum),
           checkpath: that.deviceName,
           imgpath: that.saveImg,
         },
@@ -3336,8 +3332,11 @@ export default {
 <style lang="scss" scoped>
 .gas-fill {
   position: relative;
+  display: flex;
+  flex-direction: column;
   width: 100%;
   height: 100%;
+  box-sizing: border-box;
 
   .top-title {
     height: 28px;
@@ -3440,7 +3439,10 @@ export default {
   }
 
   .top-gas-list {
-    position: fixed;
+    /* 不再用 fixed:脱离文档流后宽度只能按屏幕算,会比下面的内容列宽很多;
+       回到文档流后宽度直接跟随父容器,与下方表单左右对齐 */
+    position: relative;
+    flex: 0 0 auto;
     display: flex;
     flex-direction: column;
     align-items: center;
@@ -3449,26 +3451,33 @@ export default {
     box-sizing: border-box;
     background-color: #fff;
     margin-bottom: 2px;
-    z-index: 999;
+
+    /* 预览图与“图片选取”按钮保持同宽(都按面板内容宽度撑满) */
+    .u-button,
+    .imgView {
+      align-self: stretch;
+      width: 100%;
+      box-sizing: border-box;
+    }
   }
 
-  .bot-gas-list {
+  .bot-gas-list,
+  .bot-gas-list1 {
+    /* 顶部面板不再悬浮,表单区占满剩余高度并内部滚动;
+       模版里为固定面板预留的大上内边距在这里覆盖掉 */
+    flex: 1 1 auto;
+    min-height: 0;
     width: 100%;
-    height: 100%;
-    padding: 10px;
+    height: auto !important;
+    padding-top: 0 !important;
     box-sizing: border-box;
     background-color: #fff;
     overflow-y: auto;
+    -webkit-overflow-scrolling: touch;
   }
 
   .bot-gas-list1 {
-    width: 100%;
-    height: 100%;
-    // padding: 10px;
     margin-bottom: 2px;
-    box-sizing: border-box;
-    background-color: #fff;
-    overflow-y: auto;
   }
 
   .dialog-btn {
@@ -3539,6 +3548,11 @@ export default {
   .imgView {
     width: 100%;
     overflow: hidden;
+
+    image {
+      display: block;
+      width: 100%;
+    }
   }
 }
 

+ 223 - 1
pages/gasreport/components/taskBoardAddress.vue

@@ -232,7 +232,229 @@ export default {
           .then((response) => {
             if (response.data.code == 200) {
               console.log(response, "地点列表---");
-              that.indexList = response.data.result.records || [];
+              // that.indexList = response.data.result.records || [];
+              that.indexList = [
+                {
+                  id: "2117091338227367937",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338189619201",
+                  deviceName: "12406胶运顺槽掘进工作面风流",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "1",
+                  checkReg: "12406胶运顺槽掘进工作面",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 1,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338294476802",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338248339458",
+                  deviceName: "12406胶运顺槽掘进工作面回风流",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "1",
+                  checkReg: "12406胶运顺槽掘进工作面",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 2,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338349002753",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338319642626",
+                  deviceName: "22煤新建南回风井下部",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "0",
+                  checkReg: "22煤系统",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 3,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338420305922",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338390945794",
+                  deviceName: "22煤新建南进风井下部",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "0",
+                  checkReg: "22煤系统",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 4,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338470637569",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338449666050",
+                  deviceName: "22煤北翼辅运顶头",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "0",
+                  checkReg: "22煤系统",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 5,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338529357825",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338499997698",
+                  deviceName: "22煤北翼集中辅运巷2联",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "0",
+                  checkReg: "22煤北翼集中主、辅运巷",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 6,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338571300865",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338550329346",
+                  deviceName: "22煤北翼集中辅运巷6联水仓",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "0",
+                  checkReg: "22煤北翼集中主、辅运巷",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 7,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338630021122",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338604855298",
+                  deviceName: "12404综采工作面进风流",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "0",
+                  checkReg: "12404综采工作面",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 8,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338692935682",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338667769858",
+                  deviceName: "12404综采工作面风流",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "1",
+                  checkReg: "12404综采工作面",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 9,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+                {
+                  id: "2117091338747461634",
+                  taskTime: "2026-11-02",
+                  deviceId: "2117091338722295809",
+                  deviceName: "12404综采工作面回风隅角",
+                  checkNum: "1",
+                  taskId: "2117091338147676162",
+                  checkState: "0",
+                  isSensor: "1",
+                  checkReg: "12404综采工作面",
+                  checkPerson: null,
+                  sysOrgCode: "A02A02",
+                  orgCode: null,
+                  createBy: "admin",
+                  createTime: "2026-11-02 11:08:03",
+                  updateBy: null,
+                  updateTime: null,
+                  orderNum: 10,
+                  taskName: "夜班瓦检10.1 (1)",
+                  classType: "night",
+                  classType_dictText: "晚班",
+                },
+              ];
               if (that.indexList.length != 0) {
                 that.indexList.forEach((el) => {
                   if (uni.getStorageSync(el.deviceId)) {

+ 196 - 73
pages/home/detail/autodoor/autodoor.vue

@@ -45,7 +45,19 @@
         <view v-show="detailTab === 0">
           <!-- 控制按钮 -->
           <view class="flcard control-card" v-if="TabCur == 'gate'">
-            <view class="btn-row">
+            <view class="btn-row" v-if="ndoorcount == 1">
+              <view
+                class="ctrl-btn"
+                @click="showPasswordDialog('frontGateOpen_S')"
+                >打开风门</view
+              >
+              <view
+                class="ctrl-btn"
+                @click="showPasswordDialog('frontGateClose_S')"
+                >关闭风门</view
+              >
+            </view>
+            <view class="btn-row" v-else-if="ndoorcount == 2">
               <view
                 class="ctrl-btn"
                 @click="showPasswordDialog('frontGateOpen_S')"
@@ -67,16 +79,16 @@
                 >关闭后门</view
               >
             </view>
-            <view class="btn-row btn-row-second">
+            <view class="btn-row btn-row-second" v-if="ndoorcount == 2">
               <view
                 class="ctrl-btn ctrl-btn-wide"
-                @click="showPasswordDialog('sameTimeOpen')"
-                >打开前后门</view
+                @click="showPasswordDialog('sameTimeClose')"
+                >全部关闭</view
               >
               <view
                 class="ctrl-btn ctrl-btn-wide"
-                @click="showPasswordDialog('sameTimeClose')"
-                >关闭前后门</view
+                @click="showPasswordDialog('sameTimeOpen')"
+                >全部打开</view
               >
               <view class="mode-group">
                 <text class="mode-label">控制模式:</text>
@@ -128,14 +140,25 @@
           </view>
 
           <view class="flcard deviceback" v-if="TabCur == 'gate'">
-            <doorAnimate
+            <!-- 一道和两道自动风门分别使用对应的 SVG 动画 -->
+            <autodoorDandao
+              v-if="ndoorcount == 1"
+              :main-open="isGateOpen(frontGateStatus)"
+            ></autodoorDandao>
+            <autodoorShuangdao
+              v-else-if="ndoorcount == 2"
+              :front-open="isGateOpen(frontGateStatus)"
+              :rear-open="isGateOpen(rearGateStatus)"
+            ></autodoorShuangdao>
+            <!-- <doorAnimate
+              v-else
               :gatestate1="frontGateStatus"
               :gatestate2="midGateStatus"
               :gatestate3="rearGateStatus"
               :height="height"
               :doorcount="ndoorcount"
             >
-            </doorAnimate>
+            </doorAnimate> -->
           </view>
           <view class="flcard deviceback" v-if="isWindrect">
             <windrectAnimate
@@ -342,47 +365,65 @@
         </view>
       </view>
     </view>
-    <u-popup :show="show" mode="bottom" :safeAreaInsetBottom="false">
-      <div class="containers">
-        <view class="passWordName">
+    <u-popup
+      :show="show"
+      mode="center"
+      :round="16"
+      :closeOnClickOverlay="true"
+      @close="cancelPassword"
+    >
+      <view class="password-modal">
+        <view class="password-modal-header">
+          <text class="password-modal-title">{{
+            TabCur == "window" ? "风窗面积设置" : "设备控制验证"
+          }}</text>
+        </view>
+        <view class="password-modal-divider"></view>
+        <view class="password-modal-body">
+          <view class="password-field" v-if="TabCur == 'window'">
+            <text class="password-field-label">风窗面积</text>
+            <u-input
+              class="password-input"
+              v-model="windowArea"
+              type="text"
+              border="surround"
+              placeholder="请输入风窗面积"
+              :customStyle="{
+                backgroundColor: '#ffffff',
+                borderRadius: '12rpx',
+              }"
+            ></u-input>
+          </view>
+          <view class="password-field">
+            <text class="password-field-label">操作密码</text>
+            <u-input
+              class="password-input"
+              v-model="password"
+              type="password"
+              border="surround"
+              placeholder="请输入操作密码"
+              confirmType="done"
+              :customStyle="{
+                backgroundColor: '#ffffff',
+                borderRadius: '12rpx',
+              }"
+            ></u-input>
+          </view>
+        </view>
+        <view class="password-modal-footer">
           <view
-            class="title"
-            style="margin-top: 15px"
-            v-if="this.TabCur == 'window'"
-            >风窗面积</view
+            class="password-modal-btn password-modal-btn-plain"
+            @tap="cancelPassword"
           >
-          <u-input
-            class="passArea"
-            style="margin-top: 15px; border-color: #2a94ff"
-            v-model="windowArea"
-            type="text"
-            v-if="this.TabCur == 'window'"
-          ></u-input>
-        </view>
-        <view class="passWordInput">
-          <view style="margin-top: 15px" class="title">输入密码</view>
-          <u-input
-            style="margin-top: 15px; border-color: #2a94ff"
-            v-model="password"
-            type="password"
-          ></u-input>
+            <text>取消</text>
+          </view>
+          <view
+            class="password-modal-btn password-modal-btn-primary"
+            @tap="confirmPassword"
+          >
+            <text>确认</text>
+          </view>
         </view>
-      </div>
-      <view class="btns">
-        <u-button
-          style="margin: 20px"
-          type="primary"
-          @click="confirmPassword()"
-          color="linear-gradient(to right, rgb(53, 138, 254), rgb(38, 171, 244))"
-          >确认</u-button
-        >
-        <u-button
-          style="margin: 20px"
-          type="primary"
-          :plain="true"
-          @click="cancelPassword()"
-          >取消</u-button
-        >
       </view>
     </u-popup>
   </view>
@@ -392,6 +433,8 @@
 import api from "@/api/api";
 import initDictOptions from "@/common/util/dictUtil.js";
 import doorAnimate from "../doorAnimate/doorAnimate.vue";
+import autodoorDandao from "../doorAnimate/autodoor-dandao.vue";
+import autodoorShuangdao from "../doorAnimate/autodoor-shuangdao.vue";
 import windowAnimate from "../windowAnimate/windowAnimate.vue";
 import windrectAnimate from "../windrectAnimate/windrectAnimate.vue";
 import fanlocalAnimate from "../fanlocalAnimate/fanlocalAnimate2.vue";
@@ -456,6 +499,7 @@ export default {
       detailTab: 0, // 0实时 1历史 2操作记录
       controlMode: "local", // 控制模式展示:就地/远程
       deviceTypeHis: "", //历史数据设备类型
+      controlTimers: [], //控制成功后的补充刷新定时器
     };
   },
   onLoad(query) {
@@ -481,6 +525,8 @@ export default {
   },
   components: {
     doorAnimate,
+    autodoorDandao,
+    autodoorShuangdao,
     windowAnimate,
     windrectAnimate,
     fanlocalAnimate,
@@ -505,6 +551,9 @@ export default {
     stopTimer() {
       // 停止定时器
       clearInterval(this.timer);
+      // 清掉控制成功后的补充刷新
+      (this.controlTimers || []).forEach((timer) => clearTimeout(timer));
+      this.controlTimers = [];
     },
     // 返回上一个页面
     backPage() {
@@ -513,6 +562,13 @@ export default {
         delta: 1,
       });
     },
+    // 门状态是否打开(与图片动画的判定保持一致)
+    isGateOpen(state) {
+      const val = String(state === undefined || state === null ? "" : state)
+        .trim()
+        .toLowerCase();
+      return val === "1" || val === "开启" || val === "打开" || val === "true";
+    },
 
     getShowColum() {
       new Promise((resolve, reject) => {
@@ -583,24 +639,24 @@ export default {
                 this.getVideoUrlById(this.cameras);
                 this.isFirstRequest = false; // 设置为 false,表示已经请求过数据
               }
-              if (this.tableData["frontGateClose"] == "1") {
-                this.tableData.frontGateOpen = "关闭";
-              } else if (this.tableData["frontGateClose"] == "0") {
+              if (this.tableData["frontGateOpen"] == "1") {
                 this.tableData.frontGateOpen = "打开";
+              } else if (this.tableData["frontGateOpen"] == "0") {
+                this.tableData.frontGateOpen = "关闭";
               } else {
                 this.tableData.frontGateOpen = "关闭";
               }
-              if (this.tableData["midGateClose"] == "1") {
-                this.tableData.midGateOpen = "关闭";
-              } else if (this.tableData["midGateClose"] == "0") {
+              if (this.tableData["midGateOpen"] == "1") {
                 this.tableData.midGateOpen = "打开";
+              } else if (this.tableData["midGateOpen"] == "0") {
+                this.tableData.midGateOpen = "关闭";
               } else {
                 this.tableData.midGateOpen = "关闭";
               }
-              if (this.tableData["rearGateClose"] == "1") {
-                this.tableData.rearGateOpen = "关闭";
-              } else if (this.tableData["rearGateClose"] == "0") {
+              if (this.tableData["rearGateOpen"] == "1") {
                 this.tableData.rearGateOpen = "打开";
+              } else if (this.tableData["rearGateOpen"] == "0") {
+                this.tableData.rearGateOpen = "关闭";
               } else {
                 this.tableData.rearGateOpen = "关闭";
               }
@@ -709,8 +765,8 @@ export default {
           .controlDevice(params)
           .then((response) => {
             if (response.data.code == 200) {
-              this.getDeviceInfo(IDString);
-              // console.log("操作成功");
+              // 控制成功后按设备最新状态刷新,SVG 动画会跟随新状态播放开/关过程
+              this.refreshAfterControl(IDString);
             } else {
               resolve(response);
             }
@@ -720,9 +776,20 @@ export default {
           });
       });
     },
+    // 控制成功后设备状态通常有延迟,立即刷新并补几次,让动画尽快跟上真实状态
+    refreshAfterControl(IDString) {
+      this.getDeviceInfo(IDString);
+      [800, 1800, 3200].forEach((delay) => {
+        const timer = setTimeout(() => {
+          this.getDeviceInfo(IDString);
+        }, delay);
+        this.controlTimers.push(timer);
+      });
+    },
     // 显示密码输入弹窗
     showPasswordDialog(controlCode) {
       this.paramcode = controlCode;
+      this.password = "";
       this.show = true;
     },
     // 取消密码输入
@@ -1309,34 +1376,90 @@ div.window_new_5 {
   transform-origin: center center;
 }
 
-.btns {
+.password-modal {
+  width: 620rpx;
+  max-width: calc(100vw - 64rpx);
+  padding-bottom: 28rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+  border: 1rpx solid #ffffff;
+  border-radius: 16rpx;
+  background: #f9f9fb;
+}
+
+.password-modal-header {
   display: flex;
+  align-items: center;
+  padding: 28rpx 28rpx 20rpx;
+}
+
+.password-modal-title {
+  color: #1a1a1a;
+  font-size: 32rpx;
+  font-weight: 700;
 }
 
-.containers {
-  background-color: #fff;
+.password-modal-divider {
+  height: 1rpx;
+  margin: 0 24rpx;
+  background: #eef0f4;
 }
 
-.passWordName {
-  margin: 20px;
+.password-modal-body {
   display: flex;
-  flex-direction: row;
-  justify-content: space-around;
+  flex-direction: column;
+  gap: 20rpx;
+  padding: 24rpx 28rpx 28rpx;
+}
+
+.password-field {
+  display: flex;
+  flex-direction: column;
+  gap: 10rpx;
+}
+
+.password-field-label {
+  color: #5b6270;
+  font-size: 24rpx;
+  font-weight: 500;
+}
+
+.password-input {
+  width: 100%;
+  box-sizing: border-box;
 }
 
-.title {
-  margin-right: 20px;
-  line-height: 40px;
+::v-deep .password-input.u-border::after {
+  border-color: #d8e2f5;
 }
 
-.passWordInput {
-  margin: 20px;
+.password-modal-footer {
   display: flex;
-  flex-direction: row;
-  justify-content: space-around;
+  align-items: center;
+  gap: 20rpx;
+  padding: 0 28rpx;
+}
+
+.password-modal-btn {
+  display: flex;
+  flex: 1;
+  align-items: center;
+  justify-content: center;
+  height: 64rpx;
+  box-sizing: border-box;
+  border-radius: 8rpx;
+  font-size: 28rpx;
+  font-weight: 500;
 }
 
-.passArea {
-  border-color: red;
+.password-modal-btn-plain {
+  color: #0065f8;
+  border: 1rpx solid #0065f8;
+  background: #ffffff;
+}
+
+.password-modal-btn-primary {
+  color: #ffffff;
+  background: #0065f8;
 }
 </style>

Разница между файлами не показана из-за своего большого размера
+ 282 - 0
pages/home/detail/doorAnimate/autodoor-dandao.vue


Разница между файлами не показана из-за своего большого размера
+ 525 - 0
pages/home/detail/doorAnimate/autodoor-shuangdao.vue


Некоторые файлы не были показаны из-за большого количества измененных файлов