凉纪 2 rokov pred
rodič
commit
787a20b9fb

+ 8 - 0
src/App.vue

@@ -13,11 +13,19 @@ html,body,div,h1,h2,h3,h4,h5,p{
   margin: 0;
   padding: 0;
   box-sizing: border-box;
+  user-select: none;
+  -moz-user-select:none; /* Firefox私有属性 */
+  -webkit-user-select:none; /* WebKit内核私有属性 */
+  -ms-user-select:none; /* IE私有属性(IE10及以后) */
 }
 #app {
   font-family: Avenir, Helvetica, Arial, sans-serif;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
   font-size: 25px;
+  user-select: none;
+  -moz-user-select:none; /* Firefox私有属性 */
+  -webkit-user-select:none; /* WebKit内核私有属性 */
+  -ms-user-select:none; /* IE私有属性(IE10及以后) */
 }
 </style>

+ 1 - 1
src/assets/svg/NFC扫描.svg → src/assets/svg/NFC.svg

@@ -3,7 +3,7 @@
 <svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 	 viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
 <style type="text/css">
-	.st0{fill:#333333;}
+	.st0{fill:#ffa500;}
 </style>
 <title>无线电波</title>
 <g id="icon">

+ 10 - 4
src/components/selectCell/index.vue

@@ -20,7 +20,7 @@ import {getDict} from "@/api/toConsult";
 export default {
   props:{
     value:{
-      type: Object,
+      type: [String,Number],
       default: null,
     },
     dict:{
@@ -50,8 +50,14 @@ export default {
           this.selected = null;
           this.label = null;
         }else{
-          this.selected = val;
-          this.label = val.dictLabel;
+          this.columns.forEach(v=>{
+            if(v.dictValue === val){
+              this.selected = v;
+              this.label = v.dictLabel;
+            }
+          })
+          // this.selected = val;
+          // this.label = val.dictLabel;
         }
       },
       immediate: true
@@ -73,7 +79,7 @@ export default {
       this.selected = val;
       this.label = val.dictLabel;
       this.showPicker = false;
-      this.$emit('change',this.selected)
+      this.$emit('change',this.selected.dictValue)
     },
     clickItem(){
       this.showPicker = true;

+ 41 - 7
src/components/upload/index.vue

@@ -1,6 +1,7 @@
 <template>
     <div>
         <van-uploader
+          ref="uploader"
           v-bind="$attrs"
           v-model="fileList"
           :before-read="beforeRead"
@@ -16,6 +17,9 @@ import ImageCompressor from "js-image-compressor";
 import config from '@/config/index';
 export default {
     props:{
+      value:{
+        type: Array,
+      },
       //最大上传数量
       maxCount:{
         type: Number,
@@ -26,6 +30,7 @@ export default {
         type: Number,
         default: 5,
       },
+
     },
     data() {
       return {
@@ -36,7 +41,26 @@ export default {
     mounted() {
 
     },
-
+    watch:{
+      value:{
+        handler(val){
+          this.fileList = val.map(v=>{
+            console.log( window.origin ,' window.origin ')
+            let imgUrl =
+              process.env.NODE_ENV === "development"
+                ?  config.baseUrl + v.imgPath
+                : window.origin + v.imgPath;
+            return {
+              name: v.name,
+              url:  imgUrl,
+              path:v.imgPath,
+            }
+          })
+        },
+        deep:true,
+        immediate:true
+      }
+    },
     methods: {
       //上传前压缩
       beforeRead(file){
@@ -64,9 +88,13 @@ export default {
              });
         });
       },
+      chooseFile(){
+        console.log('子组件1111')
+        this.$refs.uploader.chooseFile()
+      },
       //上传到服务器
       afterRead(fileObj){
-        
+
         console.log(fileObj,'flie');
         let formData = new FormData();
         formData.append("file", fileObj.file);
@@ -79,21 +107,27 @@ export default {
               : window.origin + res.data.url;
           let arr = [];
           let emitList=[]
-          console.log(imgUrl);
-          
-          arr.push({ name: res.data.name, url: imgUrl });
-          emitList.push(res.data.url)
+          console.log(imgUrl,'imgUrl');
+
+          arr.push({ name: res.data.name, url: imgUrl,imgPath:res.data.url});
+          //emitList.push(res.data.url)
           this.fileList = arr;
+          console.log(this.fileList,arr,'tttttttt')
           //emit完整图片URL路径
-          this.$emit("input",emitList);
+          this.$emit("input",arr);
           // //非完整图片URL路径
           // this.$emit("imgUrl", res.data.url);
         }).catch((err) => {
           /*上传失败*/
+          console.log(this.fileList,'this.fileList')
           //this.$refs.imageUpload.handleRemove(fileObj.file);
         });
       },
     },
+    model:{
+      prop:'value',
+      event:'input'
+    }
 };
 </script>
 <style lang="scss" scoped>

+ 1 - 1
src/config/env.development.js

@@ -2,7 +2,7 @@
 module.exports = {
   title: 'soc-app-dev',
   baseUrl: 'http://localhost:9018', // 项目地址
-  baseApi: '/yuanjingchao', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
+  baseApi: '/jwx', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
   APPID: 'xxx',
   APPSECRET: 'xxx',
   $cdn: 'https://www.sunniejs.cn/static'  //静态资源

+ 6 - 0
src/utils/globalMixins.js

@@ -22,6 +22,12 @@ export default {
 
   },
   methods: {
+    //时间范围模板:2020-01-01~2020-01-02
+    rangDate(start,end,a){
+      if(!start || !end) return '暂无';
+      !a && (a = '~')
+      return  `${start}${a}${end}`;
+    },
     //根据字典类型获取字典值
     getDictHandler(dictType,callBack) {
       getDict( dictType ).then(res => {

+ 773 - 0
src/views/menu/LZRegister/api.js

@@ -28,3 +28,776 @@ export function saveTaskData(data) {
 
 
 
+export const json = {
+  "msg": "操作成功",
+  "code": 200,
+  "data": {
+    "taskarealist": [
+      {
+        "areaid": "1698144329750966274",
+        "areaname": "地下车库",
+        "nfclist": [],
+        "checklist": [
+          {
+            "itemid": 1698145269681934300,
+            "itemname": "地下车库防盗事项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144329750966274",
+                "areaname": "地下车库",
+                "itemid": 1698145269681934300,
+                "itemname": "地下车库防盗事项",
+                "pointid": "1698145269681934337",
+                "resvalue": 0,
+                "pointname": "地下车库防盗内容1",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282244",
+                "resTime": null,
+                "businessType": 0,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144329750966274",
+                "areaname": "地下车库",
+                "itemid": 1698145269681934300,
+                "itemname": "地下车库防盗事项",
+                "pointid": "1698145269681934338",
+                "resvalue": 0,
+                "pointname": "地下车库防盗内容2",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282245",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          },
+          {
+            "itemid": 1698145054342172700,
+            "itemname": "地下车库防火",
+            "checkitemlist": [
+              {
+                "areaid": "1698144329750966274",
+                "areaname": "地下车库",
+                "itemid": 1698145054342172700,
+                "itemname": "地下车库防火",
+                "pointid": "1698145054480584705",
+                "resvalue": 0,
+                "pointname": "地下车库防火履职内容",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282241",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144329750966274",
+                "areaname": "地下车库",
+                "itemid": 1698145054342172700,
+                "itemname": "地下车库防火",
+                "pointid": "1698145054480584706",
+                "resvalue": 0,
+                "pointname": "地下车库防火履职内容2",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282242",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144329750966274",
+                "areaname": "地下车库",
+                "itemid": 1698145054342172700,
+                "itemname": "地下车库防火",
+                "pointid": "1698145054551887873",
+                "resvalue": 0,
+                "pointname": "地下车库防火履职内容3",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282243",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144737084993538",
+        "areaname": "文件室",
+        "nfclist": [],
+        "checklist": [
+          {
+            "itemid": 1698146034345496600,
+            "itemname": "文件室防火项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144737084993538",
+                "areaname": "文件室",
+                "itemid": 1698146034345496600,
+                "itemname": "文件室防火项",
+                "pointid": "1698146034420994050",
+                "resvalue": 0,
+                "pointname": "文件室防火内容1",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282251",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144737084993538",
+                "areaname": "文件室",
+                "itemid": 1698146034345496600,
+                "itemname": "文件室防火项",
+                "pointid": "1698146034420994051",
+                "resvalue": 0,
+                "pointname": "文件室防火内容2",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282252",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144115199733762",
+        "areaname": "大厅",
+        "nfclist": [
+          {
+            "nfcdataid": "1698289156501196801",
+            "checkId": "1698157177336229890",
+            "checkName": "大厅采集点",
+            "nfccdoe": "NF4564534",
+            "status": 0,
+            "pointId": "1698145599043850242",
+            "areaId": "1698144115199733762",
+            "nfcid": "1698157595877437442",
+            "nfcScanStatus": null,
+            "scanMethod": null,
+            "img": null
+          }
+        ],
+        "checklist": [
+          {
+            "itemid": 1698145599043850200,
+            "itemname": "大厅防盗事项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144115199733762",
+                "areaname": "大厅",
+                "itemid": 1698145599043850200,
+                "itemname": "大厅防盗事项",
+                "pointid": "1698145599043850242",
+                "resvalue": 0,
+                "pointname": "大厅防盗内容1",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282246",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [
+                  {
+                    "nfcdataid": "1698289156501196801",
+                    "checkId": "1698157177336229890",
+                    "checkName": "大厅采集点",
+                    "nfccdoe": "NF4564534",
+                    "status": 0,
+                    "pointId": "1698145599043850242",
+                    "areaId": "1698144115199733762",
+                    "nfcid": "1698157595877437442",
+                    "nfcScanStatus": null,
+                    "scanMethod": null,
+                    "img": null
+                  }
+                ],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144115199733762",
+                "areaname": "大厅",
+                "itemid": 1698145599043850200,
+                "itemname": "大厅防盗事项",
+                "pointid": "1698145599043850243",
+                "resvalue": 0,
+                "pointname": "大厅防盗内容2",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282247",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144115199733762",
+                "areaname": "大厅",
+                "itemid": 1698145599043850200,
+                "itemname": "大厅防盗事项",
+                "pointid": "1698145599043850244",
+                "resvalue": 0,
+                "pointname": "大厅防盗防区状态检查",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": [
+                  {
+                    "id": null,
+                    "resumptionDataId": 1698289156438282200,
+                    "resumptionId": 1698152682002768000,
+                    "protectionId": 1698171729142554600,
+                    "protectionName": "大厅防区1",
+                    "protectionStatus": "0",
+                    "protectionTime": "2023-09-03T11:12:27.000+08:00"
+                  },
+                  {
+                    "id": null,
+                    "resumptionDataId": 1698289156438282200,
+                    "resumptionId": 1698152682002768000,
+                    "protectionId": 1698171772339691500,
+                    "protectionName": "大厅防区2",
+                    "protectionStatus": "1",
+                    "protectionTime": "2023-09-03T11:12:25.000+08:00"
+                  }
+                ],
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282248",
+                "resTime": null,
+                "businessType": 1,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144503097356290",
+        "areaname": "餐厅",
+        "nfclist": [],
+        "checklist": [
+          {
+            "itemid": 1698146873604755500,
+            "itemname": "餐厅防火项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144503097356290",
+                "areaname": "餐厅",
+                "itemid": 1698146873604755500,
+                "itemname": "餐厅防火项",
+                "pointid": "1698146873604755458",
+                "resvalue": 0,
+                "pointname": "餐厅防火内容1",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282256",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144503097356290",
+                "areaname": "餐厅",
+                "itemid": 1698146873604755500,
+                "itemname": "餐厅防火项",
+                "pointid": "1698146873663475714",
+                "resvalue": 0,
+                "pointname": "餐厅防火内容2",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282257",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144443668262913",
+        "areaname": "厨房",
+        "nfclist": [],
+        "checklist": [
+          {
+            "itemid": 1698146638040060000,
+            "itemname": "厨房防火检查项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144443668262913",
+                "areaname": "厨房",
+                "itemid": 1698146638040060000,
+                "itemname": "厨房防火检查项",
+                "pointid": "1698146638040059906",
+                "resvalue": 0,
+                "pointname": "厨房防火履职内容1",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282254",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144443668262913",
+                "areaname": "厨房",
+                "itemid": 1698146638040060000,
+                "itemname": "厨房防火检查项",
+                "pointid": "1698146638040059907",
+                "resvalue": 0,
+                "pointname": "厨房防火履职内容2",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282255",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144648190914562",
+        "areaname": "一楼办公区",
+        "nfclist": [],
+        "checklist": [
+          {
+            "itemid": 1698147175129075700,
+            "itemname": "楼办公区履职项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144648190914562",
+                "areaname": "一楼办公区",
+                "itemid": 1698147175129075700,
+                "itemname": "楼办公区履职项",
+                "pointid": "1698147175183601665",
+                "resvalue": 0,
+                "pointname": "一楼办公区防火项内容1",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282258",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144648190914562",
+                "areaname": "一楼办公区",
+                "itemid": 1698147175129075700,
+                "itemname": "楼办公区履职项",
+                "pointid": "1698147175183601666",
+                "resvalue": 0,
+                "pointname": "楼办公区防盗项",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282259",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144159936180225",
+        "areaname": "接待室",
+        "nfclist": [],
+        "checklist": [
+          {
+            "itemid": 1698146247000903700,
+            "itemname": "接待室防火项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144159936180225",
+                "areaname": "接待室",
+                "itemid": 1698146247000903700,
+                "itemname": "接待室防火项",
+                "pointid": "1698146247063818241",
+                "resvalue": 0,
+                "pointname": "接待室防火",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282253",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144217020657665",
+        "areaname": "大门",
+        "nfclist": [
+          {
+            "nfcdataid": "1698289156501196802",
+            "checkId": "1698157443791974402",
+            "checkName": "后大门采集点",
+            "nfccdoe": "64534534",
+            "status": 0,
+            "pointId": "1698158477981442050",
+            "areaId": "1698144217020657665",
+            "nfcid": "1698157746641694721",
+            "nfcScanStatus": 1,
+            "scanMethod": 0,
+            "img": ""
+          },
+          {
+            "nfcdataid": "1698289156501196803",
+            "checkId": "1698157353513775105",
+            "checkName": "大门采集点",
+            "nfccdoe": "ABC4534",
+            "status": 0,
+            "pointId": "1698158477981442050",
+            "areaId": "1698144217020657665",
+            "nfcid": "1698157669047070722",
+            "nfcScanStatus": 1,
+            "scanMethod": 1,
+            "img": "/statatisc/abc/1.jpg"
+          }
+        ],
+        "checklist": [
+          {
+            "itemid": 1698158477981442000,
+            "itemname": "大门安防",
+            "checkitemlist": [
+              {
+                "areaid": "1698144217020657665",
+                "areaname": "大门",
+                "itemid": 1698158477981442000,
+                "itemname": "大门安防",
+                "pointid": "1698158477981442050",
+                "resvalue": 1,
+                "pointname": "前大门内容",
+                "resstatus": 1,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282260",
+                "resTime": "1970-01-20 22:28:53",
+                "businessType": null,
+                "submitBy": 1,
+                "resremark": "有问题",
+                "submitTime": "2023-09-03T17:24:52.000+08:00",
+                "pointnfclist": [
+                  {
+                    "nfcdataid": "1698289156501196802",
+                    "checkId": "1698157443791974402",
+                    "checkName": "后大门采集点",
+                    "nfccdoe": "64534534",
+                    "status": 0,
+                    "pointId": "1698158477981442050",
+                    "areaId": "1698144217020657665",
+                    "nfcid": "1698157746641694721",
+                    "nfcScanStatus": 1,
+                    "scanMethod": 0,
+                    "img": ""
+                  },
+                  {
+                    "nfcdataid": "1698289156501196803",
+                    "checkId": "1698157353513775105",
+                    "checkName": "大门采集点",
+                    "nfccdoe": "ABC4534",
+                    "status": 0,
+                    "pointId": "1698158477981442050",
+                    "areaId": "1698144217020657665",
+                    "nfcid": "1698157669047070722",
+                    "nfcScanStatus": 1,
+                    "scanMethod": 1,
+                    "img": "/statatisc/abc/1.jpg"
+                  }
+                ],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144217020657665",
+                "areaname": "大门",
+                "itemid": 1698158477981442000,
+                "itemname": "大门安防",
+                "pointid": "1698158477981442051",
+                "resvalue": 1,
+                "pointname": "后大门",
+                "resstatus": 1,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282261",
+                "resTime": "1970-01-20 22:28:53",
+                "businessType": null,
+                "submitBy": 1,
+                "resremark": "有问题",
+                "submitTime": "2023-09-03T17:24:52.000+08:00",
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "areaid": "1698144556910276610",
+        "areaname": "库房",
+        "nfclist": [],
+        "checklist": [
+          {
+            "itemid": 1698145797119856600,
+            "itemname": "仓库防火项",
+            "checkitemlist": [
+              {
+                "areaid": "1698144556910276610",
+                "areaname": "库房",
+                "itemid": 1698145797119856600,
+                "itemname": "仓库防火项",
+                "pointid": "1698145797119856641",
+                "resvalue": 0,
+                "pointname": "仓库防火内容1",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282249",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              },
+              {
+                "areaid": "1698144556910276610",
+                "areaname": "库房",
+                "itemid": 1698145797119856600,
+                "itemname": "仓库防火项",
+                "pointid": "1698145797119856642",
+                "resvalue": 0,
+                "pointname": "仓库防火内容2",
+                "resstatus": 0,
+                "timeType": 0,
+                "pointnum": 0,
+                "pointScan": 1,
+                "protectionVo": null,
+                "imgData": [],
+                "required": 1,
+                "planId": 316,
+                "pointdataid": "1698289156438282250",
+                "resTime": null,
+                "businessType": null,
+                "submitBy": null,
+                "resremark": null,
+                "submitTime": null,
+                "pointnfclist": [],
+                "rectificationDeadline": null
+              }
+            ]
+          }
+        ]
+      }
+    ],
+    "taskObj": {
+      "id": "1698152682002767873",
+      "title": "省联社每日履职内容",
+      "planstarttime": "00:00:00",
+      "planendtime": "23:59:59",
+      "year": 2023,
+      "quarter": 3,
+      "status": 2,
+      "submitBy": "1",
+      "submitTime": "2023-09-03 17:24:52"
+    },
+    "nfcScaning": "0",
+    "nfcScanY": 0,
+    "nfcScanN": 3,
+    "areaScanY": 0,
+    "areaScanN": 9
+  }
+}

+ 221 - 67
src/views/menu/LZRegister/edit.vue

@@ -2,12 +2,13 @@
   <div class="lz-edit">
     <nav-bar></nav-bar>
     <div class="page-container">
+      <!--   基本信息   -->
       <div class="card" v-if="taskInfo">
         <van-panel :title="taskInfo.title"  :status="getDicts(taskInfo.status,'resumption_status')">
-          <van-cell title="日期时间" :value="taskInfo.planstarttime+'~'+taskInfo.planendtime" />
+          <van-cell title="日期时间" :value="rangDate(taskInfo.planstarttime,taskInfo.planendtime)" />
           <van-collapse :border="false" v-model="activeNames">
             <van-collapse-item title="履职内容" :name="1">
-              <van-cell title="检查内容:" value="1" />
+              <van-cell title="检查内容:" :value="allCheckNum" />
               <van-cell title="NFC:"  >
                 <template #extra>
                   <p class="flex-box">
@@ -28,6 +29,7 @@
           </van-collapse>
         </van-panel>
       </div>
+      <!--   检查区域   -->
       <div class="card">
         <van-panel title="巡检区域" v-if="areaList">
           <div style="padding: 10px;">
@@ -40,89 +42,124 @@
                 </div>
               </van-col>
             </van-row>
-            <van-cell title="检查内容:" value="内容" />
-            <van-cell :value="NFCNum" is-link>
+            <van-cell title="检查内容:" :value="checkNum" />
+            <van-cell>
               <template #title>
                 <span>NFC:</span>
               </template>
-
-<!--              <template #right-icon>-->
-<!--                <van-icon name="search" class="search-icon" />-->
-<!--              </template>-->
+              <template #extra>
+                <span style="display: inline-block;margin-right: 10px;color:#969799;">{{NFCNum}}</span>
+                <van-icon :name="require('../../../assets/svg/NFC.svg')" class="nfc-icon" @click="clickNFC"/>
+              </template>
 
             </van-cell>
+            <van-cell v-show="nfcImage.length > 0" :border="false" >
+              <uploader ref="imageUpload" v-model="nfcImage" multiple :maxCount="1" :deletable="false"/>
+            </van-cell>
           </div>
         </van-panel>
       </div>
 
-<!--      <div class="card" v-for="v in checkList" :key="v.itemid">-->
-<!--        <van-cell :title="v.itemname" >-->
-<!--          <template #label>-->
-<!--            <van-collapse v-model="activeNames" >-->
-<!--              <van-collapse-item v-for="(item,index) in v.checkitemlist" :title="item.pointname" :name="index" :key="item.itemid">-->
-<!--                <van-cell :border="false" title="入侵报警撤防时间:">-->
-<!--                  <template #right-icon>-->
-<!--                    <van-switch-->
-<!--                      v-model="v.checked"-->
-<!--                      inactive-color="#4fc08d"-->
-<!--                      active-color="orange"-->
-<!--                      size="20" />-->
-<!--                  </template>-->
-<!--                </van-cell>-->
-<!--                <van-cell-group v-show="v.checked">-->
-<!--                  <date-cell title="现金区"  v-model="date2"/>-->
-<!--                  <date-cell title="客户区" date-type="date" v-model="date1"/>-->
-<!--                  <date-cell title="整改期限" dateType="date" />-->
-<!--                  <select-cell title="测试" v-model="sss" :dict="'sys_business_type'" is-link/>-->
-<!--                </van-cell-group>-->
-<!--              </van-collapse-item>-->
-<!--            </van-collapse>-->
-<!--          </template>-->
-<!--        </van-cell>-->
+      <!--   检查事项   -->
+<!--      <div class="card" v-if="selectArea" v-for="v in checkList" :key="v.itemid">-->
+<!--        <van-panel  :title="v.itemname">-->
+<!--          <van-collapse v-model="activeNames" v-for="(item,index) in v.checkitemlist" :key="item.pointdataid">-->
+<!--            <van-collapse-item :title="item.pointname" :name="index" >-->
+<!--              <van-cell :border="false" title="是否异常">-->
+<!--                <template #right-icon>-->
+<!--                  <van-switch-->
+<!--                    v-model="item.resvalue"-->
+<!--                    inactive-color="#4fc08d"-->
+<!--                    active-color="orange"-->
+<!--                    size="20" />-->
+<!--                </template>-->
+<!--              </van-cell>-->
+<!--              <van-cell-group v-show="item.resvalue">-->
+<!--                <van-field-->
+<!--                  v-model="item.resremark"-->
+<!--                  rows="1"-->
+<!--                  autosize-->
+<!--                  label="情况描述:"-->
+<!--                  type="textarea"-->
+<!--                  placeholder="请输入"/>-->
+<!--                <div class="upload-box" >-->
+<!--                  <uploader v-model="item.imgData" multiple />-->
+<!--                </div>-->
+<!--                <select-cell title="整改期限" v-model="item.rectificationDeadline"  :dict="'rectification_deadline'" is-link/>-->
+<!--              </van-cell-group>-->
+<!--              <date-cell v-if="item.businessType === 1" v-for="(val,ind) in item.protectionVo" :title="val.protectionName"  v-model="val.statusUpdateTime" :key="val.id" date-type="datetime" />-->
+<!--            </van-collapse-item  >-->
+<!--          </van-collapse >-->
+<!--        </van-panel>-->
 <!--      </div>-->
 
 
+      <!--  检查项目2    -->
       <div class="card" v-if="selectArea">
         <van-collapse v-model="activeNames" v-for="v in checkList" :key="v.itemid">
           <van-collapse-item :title="v.itemname" name="1" >
             <div v-for="(item,index) in v.checkitemlist" :key="item.pointdataid">
-              <van-cell :border="false" :title="item.pointname">
+              <van-cell :title="item.pointname">
                 <template #right-icon>
                   <van-switch
-                    v-model="v.resvalue"
+                    v-model="item.resvalue"
+                    :active-value="1"
+                    :inactive-value="0"
                     inactive-color="#4fc08d"
                     active-color="orange"
+                    @change="switchChange(item)"
                     size="20" />
                 </template>
               </van-cell>
-              <van-cell-group v-show="v.resvalue">
+              <van-cell-group v-show="item.resvalue">
                 <van-field
-                  v-model="v.resremark"
+                  v-model="item.resremark"
                   rows="1"
                   autosize
                   label="情况描述:"
                   type="textarea"
                   placeholder="请输入"/>
-                <div class="upload-box">
-                  <uploader v-model="v.img" multiple />
+                <div class="upload-box" >
+                  <uploader v-model="item.imgData" multiple />
                 </div>
-                <select-cell title="整改期限" v-model="v.rectificationDeadline"  :dict="'rectification_deadline'" is-link/>
+                <select-cell title="整改期限" v-model="item.rectificationDeadline"  :dict="'rectification_deadline'" is-link/>
               </van-cell-group>
-              <date-cell v-if="item.businessType === 1" v-for="(val,ind) in item.protectionVo" :title="val.name"  v-model="val.statusUpdateTime" :key="val.id" date-type="datetime" />
+              <date-cell v-if="item.businessType === 1" v-for="(val,ind) in item.protectionVo" :title="val.protectionName"  v-model="val.statusUpdateTime" :key="val.id" date-type="datetime" />
             </div>
           </van-collapse-item>
-
         </van-collapse>
       </div >
 
       <p class="warning-msg">需要完成所有区域的履职内容才能提交内容</p>
-      <div class="flex-box">
+
+      <div class="flex-box" v-if="getDicts(taskInfo.status,'resumption_status') === '未开始' || '进行中' ">
         <van-button type="default" style="width: 28%;" plain  @click="goBack">取消</van-button>
         <van-button type="info" style="width: 28%;" plain hairline @click="saveData">保存</van-button>
         <van-button type="info" style="width: 28%;"  @click="submitData">提交</van-button>
       </div>
     </div>
 
+    <!--  nfc弹窗  -->
+    <transition name="van-fade">
+      <van-popup v-model="visible" get-container="#app" lock-scroll>
+        <div class="nfc-panel">
+           <div>
+              <p class="top-text">将手机背部靠近NFC标签扫描</p>
+              <div class="bottom-box">
+                <div>
+                  <img :src="require('../../../assets/img/icon/NFC扫描-01.png')" />
+                  <span>NFC</span>
+                </div>
+                <div>
+                  <img :src="require('../../../assets/img/icon/camera.png')" />
+                  <span @click="nfcTakePhotos">拍照</span>
+                </div>
+              </div>
+            </div>
+        </div>
+      </van-popup>
+    </transition>
+
   </div>
 </template>
 
@@ -131,7 +168,8 @@ import NavBar from '@/components/NavBar';
 import SelectCell from '@/components/selectCell';
 import DateCell from '@/components/dateCell';
 import Uploader from '@/components/upload';
-import {taskDetails,saveTaskData} from "@/views/menu/LZRegister/api";
+import {taskDetails,saveTaskData,json} from "@/views/menu/LZRegister/api";
+import {formatDate} from "@/filters/filter";
 export default {
   components:{NavBar,SelectCell,DateCell,Uploader},
   data(){
@@ -153,6 +191,16 @@ export default {
       checkItemList:[],
       //nfc扫描数量
       NFCNum:0,
+      //所有检查项数量
+      allCheckNum:0,
+      //区域下检查项数量
+      checkNum:0,
+      //nfc弹窗
+      visible:false,
+      //nfc图片
+      nfcImage:[
+        { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
+      ]
     }
   },
   mounted() {
@@ -170,12 +218,15 @@ export default {
     },
   },
   methods:{
+    //初始化数据
     getData() {
       let data = {
         dateTime:new Date(),
         taskId:this.$route.query.id,
       }
       taskDetails(data).then(res=>{
+        res = json;
+        console.log(res,'res')
         let {areaScanN,areaScanY,nfcScanN,nfcScanY} = res.data;
         this.taskInfo = {
           areaScanN,
@@ -184,16 +235,65 @@ export default {
           nfcScanY,
           ...res.data.taskObj
         }
-
         this.taskInfo.nfcScaning = res.data.nfcScaning;
         this.areaList = res.data.taskarealist;
         this.activeArea(this.areaList[0],0);
+        this.getAllCheckItemNum();
         console.log(res)
       })
     },
+    //保存数据
+    saveData(){
+      let pointdata = [];
+      this.areaList.forEach(area=>{
+        console.log(area,'area')
+        area.checklist.forEach(item=>{
+         item.checkitemlist.forEach(checkItem=>{
+            checkItem.protections = checkItem.protectionVo;
+            checkItem.resRemark = checkItem.resremark;
+            checkItem.resStatus = checkItem.resstatus;
+            checkItem.areaId = checkItem.areaid;
+            checkItem.id = checkItem.pointdataid;
+            checkItem.pointId = checkItem.pointid;
+            checkItem.resValue = checkItem.resvalue;
+            checkItem.resumptionId = this.$route.query.id;
+            pointdata.push(checkItem);
+          })
+
+        })
+      })
+      console.log(pointdata,'pointdata')
+      let data = {
+        dateTime:new Date(),
+        isSubmit:0,
+        resumptionId:this.$route.query.id,
+        year: this.taskInfo.year,
+        quarter: this.taskInfo.quarter,
+        nfcData:[],
+        pointdata,
+      }
+      console.log(data,'555')
+      saveTaskData(data).then(res=>{
+        this.$toast('提交成功');
+        this.$router.go(-1);
+      })
+    },
+    //获取所有检查项数量
+    getAllCheckItemNum(){
+      let num = 0;
+      this.areaList.forEach(v=>{
+        v.checklist.forEach(item=>{
+          num += item.checkitemlist.length;
+        })
+      });
+      this.allCheckNum = num;
+      console.log(num,'num1111')
+    },
+    //点击区域
     clickArea(area,index){
       this.activeArea(area,index);
     },
+    //选中区域时数据变更
     activeArea(area,index){
       this.$nextTick(()=>{
         let doms = document.getElementsByClassName('check-area');
@@ -205,23 +305,32 @@ export default {
       })
       this.selectArea = area;
       this.checkList = area.checklist;
-      this.NFCList = area.nfclist;
+      //this.NFCList = area.nfclist;
+      this.getCheckItemNum();
+      this.getNFCItemNum();
     },
-    submitData(){
-      let data = {
-        taskId:this.$route.query.id,
-        taskAreaId:this.selectArea.taskareaid,
-        taskAreaName:this.selectArea.areaname,
-        taskAreaStatus:this.selectArea.status,
-        taskAreaRemark:this.selectArea.remark,
-        taskAreaCheckList:this.checkList,
-      }
-      saveTaskData(data).then(res=>{
-        this.$toast('提交成功');
-        this.$router.go(-1);
+    //获取当前区域检查项数量
+    getCheckItemNum(){
+      let num = 0;
+      this.selectArea.checklist.forEach(v=>{
+        num += v.checkitemlist.length;
+      });
+      this.checkNum = num;
+      console.log(num,'num')
+    },
+    //获取当前区域nfc数量
+    getNFCItemNum(){
+      let num = 0;
+      this.selectArea.nfclist.forEach(v=>{
+        if(v.status === 0 ){
+          num++;
+        }
       })
+      this.NFCNum = num;
+      console.log(num,'num111')
     },
-    saveData(){
+    //提交数据
+    submitData(){
       let data = {
         taskId:this.$route.query.id,
         taskAreaId:this.selectArea.taskareaid,
@@ -229,16 +338,23 @@ export default {
         taskAreaStatus:this.selectArea.status,
         taskAreaRemark:this.selectArea.remark,
         taskAreaCheckList:this.checkList,
+        isSubmit:1
       }
       saveTaskData(data).then(res=>{
         this.$toast('提交成功');
         this.$router.go(-1);
       })
     },
+
+    //返回
     goBack(){
       this.$router.go(-1);
       this.clearData();
     },
+    clickNFC(){
+      this.visible = true;
+    },
+    //清空数据
     clearData(){
       this.areaList = [];
       this.taskInfo= [];
@@ -248,9 +364,15 @@ export default {
       this.checkItemList = [];
       this.NFCNum = 0;
     },
-    openTime(){
-
+    nfcTakePhotos(){
+      let uploader = this.$refs.imageUpload;
+      console.log(uploader,'uploader')
+      uploader.chooseFile();
     },
+    switchChange(item){
+      console.log(item,'666')
+      item.resTime = formatDate(new Date());
+    }
   }
 }
 </script>
@@ -290,17 +412,16 @@ export default {
     align-items: center;
     box-shadow: 0 2px 6px #ddd;
   }
+  .nfc-icon{
+    font-size: 50px;
+    font-weight: 600;
+    color:orange;
+    fill:orange;
+  }
   .custom-title {
     align-self: center;
     vertical-align: middle;
   }
-
-  .search-icon {
-    font-size: 26px;
-    font-weight: 600;
-    line-height: inherit;
-    color: orange;
-  }
   .upload-box{
     margin: 30px;
   }
@@ -314,4 +435,37 @@ export default {
     color: #fff;
     background-color: #1989fa;
   }
+  .nfc-panel{
+    width: 400px;
+    background:url('../../../assets/img/NFCphone.png') center no-repeat;
+    background-size: 50%;
+    >div{
+      padding: 30px;
+    }
+  }
+  .top-text{
+    text-align: center;
+    font-size: 26px;
+  }
+  .bottom-box{
+    margin-top: 270px;
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    >div{
+      display: flex;
+      flex-direction: column;
+      &:active{
+        opacity: .5;
+      }
+      >img{
+        width: 70px;
+        height: 70px;
+      }
+      >span{
+        text-align: center;
+        font-size: 25px;
+      }
+    }
+  }
 </style>

+ 15 - 7
src/views/menu/LZRegister/index.vue

@@ -11,7 +11,8 @@
           <van-tabs >
             <van-tab title="待完成">
               <template #title>待完成 {{dayList.unfinished.length}} </template>
-              <van-cell-group>
+              <van-empty description="暂无数据" v-if="!dayList.unfinished.length"/>
+              <van-cell-group  v-else>
                 <van-cell
                   v-for="v in dayList.unfinished"
                   :key="v.id"
@@ -25,7 +26,8 @@
             </van-tab>
             <van-tab title="未完成">
               <template #title>未完成 {{dayList.proceed.length}} </template>
-              <van-cell-group>
+              <van-empty description="暂无数据" v-if="!dayList.proceed.length"/>
+              <van-cell-group v-else>
                 <van-cell
                   v-for="v in dayList.proceed"
                   :key="v.id"
@@ -39,7 +41,8 @@
             </van-tab>
             <van-tab title="已完成">
               <template #title>已完成 {{dayList.finished.length}} </template>
-              <van-cell-group>
+              <van-empty description="暂无数据" v-if="!dayList.finished.length"/>
+              <van-cell-group v-else>
                 <van-cell
                   v-for="v in dayList.finished"
                   :key="v.id"
@@ -60,7 +63,8 @@
           <van-tabs >
             <van-tab title="待完成">
               <template #title>待完成 {{otherList.unfinished.length}} </template>
-              <van-cell-group>
+              <van-empty description="暂无数据" v-if="!otherList.unfinished.length"/>
+              <van-cell-group v-else>
                 <van-cell
                   v-for="v in otherList.unfinished"
                   :key="v.id"
@@ -74,7 +78,8 @@
             </van-tab>
             <van-tab title="未完成">
               <template #title>未完成 {{otherList.proceed.length}} </template>
-              <van-cell-group>
+              <van-empty description="暂无数据" v-if="!otherList.proceed.length"/>
+              <van-cell-group v-else>
                 <van-cell
                   v-for="v in otherList.proceed"
                   :key="v.id"
@@ -88,7 +93,8 @@
             </van-tab>
             <van-tab title="已完成">
               <template #title>已完成 {{otherList.finished.length}} </template>
-              <van-cell-group>
+              <van-empty description="暂无数据" v-if="!otherList.finished.length"/>
+              <van-cell-group v-else>
                 <van-cell
                   v-for="v in otherList.finished"
                   :key="v.id"
@@ -210,8 +216,10 @@ export default {
 </script>
 <style lang="scss">
 .lvzhi{
+  .van-empty{
+    background-color: #fff;
+  }
   .van-cell-group{
-    min-height: 400px;
     background-color: #fff;
   }
 }

+ 1 - 1
vue.config.js

@@ -85,7 +85,7 @@ module.exports = defineConfig({
         }
       },
       '/jwx': {
-        target: "http://localhost:8080",
+        target: "http://10.87.11.152:8080",
         // ws:true,
         changOrigin:true,
         pathRewrite:{