Procházet zdrojové kódy

塘栖 酒测功能

jiangsf před 1 týdnem
rodič
revize
e76cbbd4ad

+ 11 - 8
src/components/InputNumberRange/index.vue

@@ -31,7 +31,7 @@
             @change="handleInputChangeTo"
           ></el-input>
         </div>
-        <div class="iconBox" v-if="clearIcon && userInputForm && userInputTo">
+        <div class="iconBox" v-show="clearIcon && (userInputForm || userInputForm == 0) && userInputTo">
           <i class="el-icon-circle-close" @click="clearIconFunc" style="color: #C0C4CC"></i>
         </div>
       </div>
@@ -219,17 +219,17 @@ export default {
     position: relative;
   }
   .flex {
-     display: flex;
+     //display: flex;
     width: 100%;
-    justify-content: center;
-    align-items: center;
+    //justify-content: center;
+    //align-items: center;
     .center {
       margin-top: 1px;
     }
 
     .from {
       display: inline-block;
-      width: 45%;
+      width: 42%;
 
       ::v-deep{
           .el-input__inner{
@@ -245,14 +245,14 @@ export default {
 
     .center {
       display: inline-block;
-      width: 10%;
+      width: 6%;
       margin-top: 1px;
       text-align: center;
     }
 
     .to {
       display: inline-block;
-      width: 45%;
+      width: 42%;
 
       ::v-deep{
         .el-input__inner{
@@ -272,7 +272,10 @@ export default {
   }
 
   .iconBox{
-    margin-right: 10px;
+    display: inline-block;
+    width: 5%;
+    margin-right: 5%;
+    cursor: pointer
   }
 
   .is-disabled {

+ 31 - 18
src/views/pass_records/components/DetailModule.vue

@@ -43,7 +43,7 @@
         </TagCard>
         <TagCard title="通行信息" style="margin-top: 20px">
           <div v-for="(aItem, aIndex) in accessInfoFieldList" :key="`a_${aIndex}`" class="access-info-content">
-            <div v-for="(fItem, fIndex) in aItem" :key="`a_${fIndex}`" class="access-info-content-item">
+            <div v-for="(fItem, fIndex) in aItem.filter(item=>item.isShow)" :key="`a_${fIndex}`" class="access-info-content-item">
               <div class="info-title">{{ fItem.title }}</div>
               <div class="info-value">
                 <template v-if="fItem['field'] == 'outType'">
@@ -234,57 +234,72 @@ export default {
         [
           {
             title: '所属账号',
-            field: 'username'
+            field: 'username',
+            isShow: true
           }, {
             title: '应用类型',
-            field: 'appType'
+            field: 'appType',
+            isShow: true
           }
         ],
         [
           {
             title: '设备SN',
-            field: 'deviceSn'
+            field: 'deviceSn',
+            isShow: true
           }, {
             title: '设备地点',
-            field: 'deviceName'
+            field: 'deviceName',
+            isShow: true
           }, {
             title: '进/出',
-            field: 'outType'
+            field: 'outType',
+            isShow: true
           }, {
             title: '用户姓名',
-            field: 'name'
+            field: 'name',
+            isShow: true
           }, {
             title: '用户证件号',
-            field: 'cardid'
+            field: 'cardid',
+            isShow: true
           }, {
             title: '用户手机号',
-            field: 'phone'
+            field: 'phone',
+            isShow: true
           }, {
             title: '用户卡号',
-            field: 'cardidex'
+            field: 'cardidex',
+            isShow: true
           }
         ],
         [
           {
             title: '通行时间',
-            field: 'faceTime'
+            field: 'faceTime',
+            isShow: true
           }, {
             title: '识别类型',
-            field: 'verifyType'
+            field: 'verifyType',
+            isShow: true
           },
           {
             title: '是否饮酒',
-            field: 'isDrink'
+            field: 'isDrink',
+            isShow: this.$store.getters.acceptAlcohol ? this.$store.getters.acceptAlcohol : false
           }, {
             title: '酒精值',
-            field: 'alcoholValue'
+            field: 'alcoholValue',
+            isShow: this.$store.getters.acceptAlcohol ? this.$store.getters.acceptAlcohol : false
           },
           {
             title: '通行状态',
-            field: 'status'
+            field: 'status',
+            isShow: true
           }, {
             title: '无效原因',
-            field: 'reasonType'
+            field: 'reasonType',
+            isShow: true
           }
         ]
       ]
@@ -304,7 +319,6 @@ export default {
       if (!str) {
         return '-'
       } else {
-        console.log(this.reasonType_list)
         const index = (this.reasonType_list || []).findIndex(v => v.code == str)
         return index > -1 ? this.reasonType_list[index]?.desc || '' : ''
       }
@@ -313,7 +327,6 @@ export default {
       if (!str) {
         return '-'
       } else {
-        console.log(this.verifyTypeList)
         const index = (this.verifyTypeList || []).findIndex(v => v.code == str)
         return index > -1 ? this.verifyTypeList[index]?.desc || '' : ''
       }

+ 3 - 5
src/views/pass_records/components/ysgz_pass_records.vue

@@ -85,7 +85,7 @@
             :editable="false"
           />
 
-          <input-number-range v-else-if="aItem.searchType === 'inputrange' && ((aIndex > 11 && isOpenSearch) ||aIndex <=11)" :minValue="20"  :maxValue="100" :key="`aItem.searchField_${aIndex}`" v-model="page.data[aItem.searchField]" :placeholder="{startValue: '酒精值范围起始值', endValue: '酒精值范围结束值' }" :precision="0" />
+          <input-number-range v-else-if="aItem.searchType === 'inputrange' && ((aIndex > 11 && isOpenSearch) ||aIndex <=11)" :minValue="0"  :maxValue="100" :key="`aItem.searchField_${aIndex}`" v-model="page.data[aItem.searchField]" :placeholder="{startValue: '酒精值范围起始值', endValue: '酒精值范围结束值' }" :precision="0" />
         </template>
         <template v-if="isOpenSearch">
           <template v-if="checkRole([5])">
@@ -226,10 +226,10 @@
               {{ getReasonName(scope.row.reasonType) }}
             </template>
             <template v-else-if="['isDrink'].indexOf(aItem.field) > -1">
-              {{ scope.row.isDrink ? '是' : '否' }}
+              {{ scope.row.isDrink == null  ? scope.row.isDrink ? '是' : '否' : '-' }}
             </template>
             <template v-else-if="['alcoholValue'].indexOf(aItem.field) > -1">
-              {{ scope.row.alcoholValue ?  scope.row.alcoholValue + 'mg/100ml' : '-' }}
+              {{ scope.row.alcoholValue ? scope.row.alcoholValue + 'mg/100ml' : '-' }}
             </template>
             <template v-else>
               {{ scope.row[aItem.field] | matchNull }}
@@ -616,7 +616,6 @@ export default {
     }
   },
   created() {
-    console.log(this.$store.getters.acceptAlcohol)
     this.page_copy = JSON.parse(JSON.stringify(this.page))
     this.fetchData()
     this.matchAutoUpdate()
@@ -662,7 +661,6 @@ export default {
       if (!str) {
         return '-'
       } else {
-        console.log(this.searchOptions.reasonType_list)
         const index = (this.searchOptions.reasonType_list || []).findIndex(v => v.code == str)
         return index > -1 ? this.searchOptions.reasonType_list[index]?.desc || '' : ''
       }