Bladeren bron

Merge branch 'V0.0.4' of http://10.87.21.221:8000/jzyd_yyds/soc_app into V0.0.4

coys 1 jaar geleden
bovenliggende
commit
d3c635ece8

+ 41 - 43
package-lock.json

@@ -2094,49 +2094,6 @@
         "webpack-merge": "^5.7.3",
         "webpack-virtual-modules": "^0.4.2",
         "whatwg-fetch": "^3.6.2"
-      },
-      "dependencies": {
-        "@vue/vue-loader-v15": {
-          "version": "npm:vue-loader@15.11.1",
-          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
-          "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
-          "dev": true,
-          "requires": {
-            "@vue/component-compiler-utils": "^3.1.0",
-            "hash-sum": "^1.0.2",
-            "loader-utils": "^1.1.0",
-            "vue-hot-reload-api": "^2.3.0",
-            "vue-style-loader": "^4.1.0"
-          },
-          "dependencies": {
-            "hash-sum": {
-              "version": "1.0.2",
-              "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
-              "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
-              "dev": true
-            }
-          }
-        },
-        "json5": {
-          "version": "1.0.2",
-          "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
-          "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
-          "dev": true,
-          "requires": {
-            "minimist": "^1.2.0"
-          }
-        },
-        "loader-utils": {
-          "version": "1.4.2",
-          "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
-          "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
-          "dev": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^1.0.1"
-          }
-        }
       }
     },
     "@vue/cli-shared-utils": {
@@ -2301,6 +2258,47 @@
         }
       }
     },
+    "@vue/vue-loader-v15": {
+      "version": "npm:vue-loader@15.11.1",
+      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
+      "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
+      "dev": true,
+      "requires": {
+        "@vue/component-compiler-utils": "^3.1.0",
+        "hash-sum": "^1.0.2",
+        "loader-utils": "^1.1.0",
+        "vue-hot-reload-api": "^2.3.0",
+        "vue-style-loader": "^4.1.0"
+      },
+      "dependencies": {
+        "hash-sum": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
+          "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
+          "dev": true
+        },
+        "json5": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
+          "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.0"
+          }
+        },
+        "loader-utils": {
+          "version": "1.4.2",
+          "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
+          "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+          "dev": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^1.0.1"
+          }
+        }
+      }
+    },
     "@vue/web-component-wrapper": {
       "version": "1.3.0",
       "resolved": "https://registry.npmmirror.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz",

+ 23 - 6
src/views/menu/resumption/detail.vue

@@ -540,8 +540,13 @@ export default {
       this.validateArea(areaId)
     },
     validateArea(areaId) {
-      let total = 0
-      let yes = 0
+      //检查项数量
+      let total = 0;
+      //完成检查项数量
+      let yes = 0;
+      //完成NFC扫描的数量
+      let nfc_num = 0;
+      let nfc_no = 0;
       this.checks.forEach(item => {
         let pointList = item.points
         pointList.forEach(point => {
@@ -551,12 +556,24 @@ export default {
               yes++
             }
           }
-        })
-      })
+        });
+        this.nfcs.forEach(nfc => {
+          if(areaId === nfc.areaId){
+              nfc_num++;
+              if(nfc.status === 0){
+                nfc_no++;
+              }
+          }
+        });
+      });
+
+      // 0:未开始,2:进行中,1已完成
       let areaStatus = '0'
-      if (total === yes && this.areaNoList.length === 0) {
+      if (total === yes &&  nfc_no === 0) {
+        //检查项完成检查,nfc完成扫描,或者没有nfc扫描
         areaStatus = '1'
-      } else if (yes === 0 && this.areaNoList.length === this.NFCnums) {
+      } else if (yes === 0 && nfc_no === nfc_num  ) {
+        //检查项完成检查项为0,nfc也没动
         areaStatus = '0'
       } else {
         areaStatus = '2'

+ 19 - 4
src/views/menu/securityCheckRegister/add.vue

@@ -33,12 +33,12 @@
           <p class="legend">检查项目 <span v-if="enable" @click="addCheck">添加检查内容</span></p>
           <!--  搜索框  -->
           <van-search v-model="itemName" class="van-hairline--top" placeholder="请输入检查项名称" />
-          <van-collapse v-model="activeNames" v-for="v in resultList" :key="v.itemId">
-            <van-collapse-item :title="v.itemName" :name="v.itemName">
+          <van-collapse v-model="activeNames" v-for="(v,i) in resultList" :key="v.itemId">
+            <van-collapse-item :title="`${i+1}.${v.itemName}`" :name="v.itemName">
               <div v-for="(item, index) in v.pointList" :key="item.pointId" class="collapse-box" :class="{'van-hairline--bottom':item.status}">
-                <van-cell :border="Boolean(item.status)">
+                <van-cell :border="true">
                   <template #title>
-                    <pre>{{ item.pointName }}</pre>
+                    <pre> <span>{{`${i+1}-${index+1}`}}.</span> {{ item.pointName }}</pre>
                   </template>
                   <template #right-icon>
                     <span v-if="item.nfcList && item.nfcList.length">
@@ -546,6 +546,21 @@ export default {
   }
 }
 </script>
+<style lang="scss">
+.register-edit{
+  .van-collapse-item__content{
+    padding:0 20px;
+  }
+}
+.collapse-box{
+  .van-cell{
+    padding:20px 30px;
+    &:last-child{
+      border-bottom: none;
+    }
+  }
+}
+</style>
 <style lang="scss" scoped>
 .register-edit {
   height: 100%;

+ 4 - 4
src/views/menu/securityCheckRegister/detail.vue

@@ -21,12 +21,12 @@
       <div class="card">
           <!--  搜索框  -->
           <van-search v-model="itemName" class="van-hairline--top" placeholder="请输入检查项名称" />
-          <van-collapse v-model="activeNames" v-for="v in resultList" :key="v.itemId">
-            <van-collapse-item :title="v.itemName" :name="v.itemName">
+          <van-collapse v-model="activeNames" v-for="(v,i) in resultList" :key="v.itemId">
+            <van-collapse-item :title="`${i+1}.${v.itemName}`" :name="v.itemName">
               <div v-for="(item, index) in v.pointList" :key="item.pointId" class="collapse-box" :class="{'van-hairline--bottom':item.status}">
-                <van-cell :border="Boolean(item.status)">
+                <van-cell :border="true">
                   <template #title>
-                    <pre>{{ item.pointName }}</pre>
+                    <pre> <span>{{`${i+1}-${index+1}`}}.</span> {{ item.pointName }}</pre>
                   </template>
                   <template #right-icon>
                     <span v-if="item.nfcList && item.nfcList.length">

+ 3 - 3
src/views/menu/securityCheckRegister/index.vue

@@ -33,7 +33,7 @@
               <van-cell :title="v.taskName" :border="false" :label="rangDate(formatDate(v.planStartTime,'DATE'),formatDate(v.planEndTime,'DATE'))" ></van-cell>
               <div class="collapse-title">
                 <div :class="{'active':v.active==2}" @click.stop="changeList(v,2)">
-                  <p> {{v.uncompleted.length}}</p>
+                  <p>{{v.uncompleted.length}}</p>
                   <p>未检查</p>
                 </div>
                 <div :class="{'active':v.active==1}" @click.stop="changeList(v,1)">
@@ -136,11 +136,11 @@ export default {
   methods: {
     formatDate,
     clickItem(item){
-      if(item.status == 3){
+      if(item.status == 3 || item.status == 4){
         this.$router.push(
           {
            path:'/securityDetail',
-           query:{id:item.taskId,enable:1}
+           query:{id:item.taskId,enable:0}
           }
         )
       }else {