zhaozp 3 жил өмнө
parent
commit
32b9be385b

+ 89 - 98
package-lock.json

@@ -2997,6 +2997,16 @@
           "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
           "dev": true
         },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
         "cacache": {
           "version": "13.0.1",
           "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
@@ -3023,6 +3033,34 @@
             "unique-filename": "^1.1.1"
           }
         },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
         "find-cache-dir": {
           "version": "3.3.1",
           "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz?cache=0&sync_timestamp=1583734806517&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-cache-dir%2Fdownload%2Ffind-cache-dir-3.3.1.tgz",
@@ -3060,6 +3098,13 @@
             "slash": "^2.0.0"
           }
         },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
         "hash-sum": {
           "version": "2.0.0",
           "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz",
@@ -3072,6 +3117,28 @@
           "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=",
           "dev": true
         },
+        "json5": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
+          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
         "locate-path": {
           "version": "5.0.0",
           "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz?cache=0&sync_timestamp=1597082033698&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flocate-path%2Fdownload%2Flocate-path-5.0.0.tgz",
@@ -3156,6 +3223,16 @@
             "minipass": "^3.1.1"
           }
         },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
         "terser-webpack-plugin": {
           "version": "2.3.8",
           "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1610194262897&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
@@ -3172,6 +3249,18 @@
             "terser": "^4.6.12",
             "webpack-sources": "^1.4.3"
           }
+        },
+        "vue-loader-v16": {
+          "version": "npm:vue-loader@16.2.0",
+          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
+          "integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chalk": "^4.1.0",
+            "hash-sum": "^2.0.0",
+            "loader-utils": "^2.0.0"
+          }
         }
       }
     },
@@ -15748,104 +15837,6 @@
         "vue-style-loader": "^4.1.0"
       }
     },
-    "vue-loader-v16": {
-      "version": "npm:vue-loader@16.2.0",
-      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
-      "integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "chalk": "^4.1.0",
-        "hash-sum": "^2.0.0",
-        "loader-utils": "^2.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.1",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
-          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "hash-sum": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz",
-          "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
-          "dev": true,
-          "optional": true
-        },
-        "json5": {
-          "version": "2.2.0",
-          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
-          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minimist": "^1.2.5"
-          }
-        },
-        "loader-utils": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
-          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
     "vue-style-loader": {
       "version": "4.1.3",
       "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz?cache=0&sync_timestamp=1614758618345&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-style-loader%2Fdownload%2Fvue-style-loader-4.1.3.tgz",

+ 3 - 3
src/common/request.js

@@ -1,16 +1,16 @@
 /*
  * @Author: your name
  * @Date: 2021-06-07 20:26:31
- * @LastEditTime: 2021-06-16 19:37:37
+ * @LastEditTime: 2021-06-17 10:01:55
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \ld-pad\src\common\request.js
  */
 // const baseUrl = 'http://39.100.230.190'
 // const baseUrl = 'http://8.140.188.124'
-// const baseUrl = 'http://172.18.0.24:40046'
+const baseUrl = 'http://172.18.0.24:40046'
 // const baseUrl =  'http://172.18.1.227:40046'
-const baseUrl =  'https://s2t.jihengcc.cn/'
+// const baseUrl =  'https://s2t.jihengcc.cn/'
 // const baseUrl = ''
 
 // import { showLoading,hideLoading } from './loading.js'

+ 1 - 1
src/pages.json

@@ -23,7 +23,7 @@
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "智云本特勒",
+		"navigationBarTitleText": "隆迪",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8",
 		"rpxCalcMaxDeviceWidth": 2560

+ 101 - 50
src/pages/index/index.vue

@@ -6,7 +6,7 @@
       >
         <image
           src="../../static/ld.png"
-          style="width: 70%; height: 40rpx"
+          style="width: 60%; height: 30rpx"
           mode=""
         ></image>
         <image
@@ -76,7 +76,11 @@
           >
             <view class="d-flex a-center">
               <image
-                :src="recordList(item.type)[1]"
+                :src="
+                  role === 1
+                    ? recordList(item.type)[1]
+                    : recordList(item.type)[4]
+                "
                 style="width: 29rpx; height: 24rpx"
                 mode=""
               ></image>
@@ -109,13 +113,19 @@
           >
             <view
               class="d-flex a-center u-m-b-10 f-22"
-              @click.stop="showInfo(iten.versionId, item.type, iten.name)"
+              @click.stop="
+                showInfo(iten.versionId, item.type, iten.name, iten.creatTime)
+              "
               v-for="(iten, indey) in item.recordList"
               :key="indey"
             >
               <image
                 class="d-flex flex-shrink"
-                :src="recordList(item.type)[2]"
+                :src="
+                  role === 1
+                    ? recordList(item.type)[2]
+                    : recordList(item.type)[5]
+                "
                 style="width: 21rpx; height: 30rpx"
                 mode=""
               ></image>
@@ -516,8 +526,8 @@
           <u-icon name="close-circle-fill" color="#A9A3D2" size="30"></u-icon>
         </view>
       </view>
-      <view slot="default" class="u-p-b-10 f-25">
-        <u-row class="u-m-b-20">
+      <view slot="default" class="u-p-b-10 f-20">
+        <u-row class="u-m-b-15">
           <u-col :offset="1" :span="3">
             <text>设备编号: {{ headerData.deviceNo }}</text>
           </u-col>
@@ -528,17 +538,17 @@
             <text>型号: {{ headerData.deviceType }}</text>
           </u-col>
         </u-row>
-        <u-row class="u-m-b-20">
-          <u-col :offset="1" :span="4">
+        <u-row class="u-m-b-15">
+          <u-col :offset="1" :span="3">
             责任人: <text>{{ headerData.oneName }}</text
             ><text v-if="headerData.twoName">,{{ headerData.twoName }}</text>
           </u-col>
           <u-col :span="3">
-            <text>日期: {{ headerData.month }}</text></u-col
+            <text>日期: {{ headerData.month + "月份" }}</text></u-col
           >
         </u-row>
-        <u-row class="u-m-b-20">
-          <u-col :offset="1" :span="4">
+        <u-row class="u-m-b-15">
+          <u-col :offset="1" :span="3">
             <text>编号: {{ headerData.nos }}</text>
           </u-col>
           <u-col :span="7">
@@ -577,6 +587,9 @@ import gFile from "../../static/gFile.png";
 import gItem from "../../static/g-item.png";
 import yFile from "../../static/yFile.png";
 import yItem from "../../static/y-item.png";
+import zFile from "../../static/zFile.png";
+import zItem from "../../static/zItem.png";
+
 import djButton from "../../components/dj-button.vue";
 import { mapMutations } from "vuex";
 import {
@@ -604,6 +617,7 @@ import {
   patrolScan,
   dutyPatrolScan,
 } from "@/common/api.js";
+import colorGradient from "../../uview-ui/libs/function/colorGradient";
 export default {
   components: {
     djButton,
@@ -627,6 +641,8 @@ export default {
       sjRecordId: "",
       // 当前type
       sjRecordType: 1,
+      // creatime
+      creatime: "",
       // 当前频率id
       sjRecordPlId: "",
       // 当前评率名
@@ -726,11 +742,32 @@ export default {
     recordList() {
       return function (index) {
         if (index === 1) {
-          return ["待响应点检保养表", yFile, yItem, "待巡视点检保养表"];
+          return [
+            "待响应点检保养表",
+            yFile,
+            yItem,
+            "待巡视点检保养表",
+            yFile,
+            yItem,
+          ];
         } else if (index === 2) {
-          return ["处理中点检保养表", bFile, bItem, "已巡视点检保养表"];
+          return [
+            "处理中点检保养表",
+            bFile,
+            bItem,
+            "已巡视点检保养表",
+            gFile,
+            gItem,
+          ];
         } else {
-          return ["已完成点检保养表", gFile, gItem, "异常于停用点检保养表"];
+          return [
+            "已完成点检保养表",
+            gFile,
+            gItem,
+            "异常于停用点检保养表",
+            zFile,
+            zItem,
+          ];
         }
       };
     },
@@ -830,13 +867,16 @@ export default {
         this.rightData = info;
       }
     },
-    showInfo(id, type, name) {
+    showInfo(id, type, name, creatTime) {
       // 首件: 记录当前记录表id
       this.sjRecordId = id;
       // title名
       this.recordName = name;
       // 类型
       this.fcType = type;
+      // 创建时间  (巡检人)
+      console.log(creatTime);
+      this.creatime = creatTime;
       // 角色 1检查人 0巡检人
       this.infoStatus = this.role ? 2 : 4;
       if (this.role) {
@@ -847,12 +887,13 @@ export default {
     },
     // 巡检详情
     patrolWaitInfo() {
-      this.getPatrolWaitDetails(this.fcType, this.sjRecordId);
+      this.getPatrolWaitDetails(this.fcType, this.sjRecordId, this.creatime);
     },
-    getPatrolWaitDetails(type, id) {
+    getPatrolWaitDetails(type, id, creatime) {
       patrolWaitDetails({
         status: type,
         versionId: id,
+        localDateTime: creatime,
       }).then((res) => {
         let data = res.data;
         if (res.status === "20000") {
@@ -1343,39 +1384,49 @@ export default {
       return platform;
     },
     sao() {
-      uni.scanCode({
-        onlyFromCamera: true,
-        success: function (res) {
-          console.log(res);
-          let no = res
-          if (!this.role) {
-            patrolScan({ id: no }).then((res) => {
-              if (res.status === "20000") {
-                let data = res.data;
-                this.getPatrolWaitDetails(data.status, data.versionId);
-              } else {
-                this.hintCase(res.message);
-              }
-            });
-          } else {
-            dutyPatrolScan(no).then((res) => {
-              if (res.status === "20000") {
-                let data = res.data;
-                dutyPlanInfo({
-                  versionId: data.versionId,
-                  type: data.type,
-                }).then((res) => {
-                  this.infoStatus = 2;
-                  this.procedureRes = res.data.procedureRes;
-                  this.everyId = res.data.everyId;
-                });
-              } else {
-                this.hintCase(res.message);
-              }
-            });
-          }
-        },
-      });
+      try {
+        uni.scanCode({
+          onlyFromCamera: true,
+          success: function (res) {
+            let no = res;
+            if (!this.role) {
+              patrolScan({ id: no }).then((res) => {
+                if (res.status === "20000") {
+                  let data = res.data;
+                  this.getPatrolWaitDetails(
+                    data.status,
+                    data.versionId,
+                    data.localDateTime
+                  );
+                } else {
+                  this.hintCase(res.message);
+                }
+              });
+            } else {
+              dutyPatrolScan(no).then((res) => {
+                if (res.status === "20000") {
+                  let data = res.data;
+                  dutyPlanInfo({
+                    versionId: data.versionId,
+                    type: data.type,
+                  }).then((res) => {
+                    this.infoStatus = 2;
+                    this.procedureRes = res.data.procedureRes;
+                    this.everyId = res.data.everyId;
+                  });
+                } else {
+                  this.hintCase(res.message);
+                }
+              });
+            }
+          },
+          fail: function (res) {
+            this.hintCase("调用摄像头失败");
+          },
+        });
+      } catch {
+        this.hintCase("调用摄像头失败");
+      }
     },
   },
 };

BIN
src/static/zFile.png


BIN
src/static/zItem.png