张佳燕 hai 1 ano
pai
achega
212659325d

+ 1 - 1
public/config.js

@@ -1,5 +1,5 @@
 window.g = {
 window.g = {
   ApiUrl: 'https://tx.hz-hanghui.com:8088/yx-fyzd', //塘栖
   ApiUrl: 'https://tx.hz-hanghui.com:8088/yx-fyzd', //塘栖
-  // ApiUrl: 'http://192.168.11.17:9100/yx-fyzd', //塘栖本地
+  // ApiUrl: 'http://192.168.11.17:9200/yx-fyzd', //塘栖本地
 
 
 }
 }

+ 55 - 0
src/api/user_manage.js

@@ -472,3 +472,58 @@ export function getParentInfo(UserWhitelistId) {
     params: {UserWhitelistId},
     params: {UserWhitelistId},
   });
   });
 }
 }
+
+
+
+// 常客的批量编辑
+export function batchEditUserWhitelist(data) {
+  return request({
+    url: "/admin/userWhitelis/batchEditUserWhitelist",
+    method: "post",
+    // headers: {
+    //   "Content-Type": "multipart/form-data",
+    // },
+    data,
+  });
+}
+// ---------------进出预警记录--------------------
+// 预警记录-分页列表
+export function doGetWaringServerLog(data) {
+  return request({
+    url: "/admin/face/doGetWaringServerLog",
+    method: "post",
+    data,
+  });
+}
+// 预警记录excel-导出
+export function doGetWaringServerLogExcel(data) {
+  return request({
+    url: "/admin/face/doGetWaringServerLogExcel",
+    method: "post",
+    data,
+  });
+}
+// 预警记录-确认
+export function warningSure(data) {
+  return request({
+    url: "/admin/face/warningSure",
+    method: "post",
+    data,
+  });
+}
+// 预警记录-删除
+export function warningDelete(waringLogId) {
+  return request({
+    url: "/admin/face/warningDelete",
+    method: "post",
+    data:{waringLogId},
+  });
+}
+// 预警记录-拉黑
+export function warningBlack(waringLogId) {
+  return request({
+    url: "/admin/face/warningBlack",
+    method: "post",
+    data:{waringLogId},
+  });
+}

+ 7 - 0
src/layout/components/Sidebar/SidebarItem.vue

@@ -89,6 +89,7 @@ export default {
       isOpenExam: this.$store.getters.isOpenExam,
       isOpenExam: this.$store.getters.isOpenExam,
       buildingCheckType: this.$store.getters.buildingCheckType,
       buildingCheckType: this.$store.getters.buildingCheckType,
       enterpriseName: this.$store.getters.enterpriseName,
       enterpriseName: this.$store.getters.enterpriseName,
+      isOpenInoutWarning: this.$store.getters.isOpenInoutWarning,
     };
     };
   },
   },
   created() {},
   created() {},
@@ -208,6 +209,12 @@ export default {
         item.path === "/exam_list"
         item.path === "/exam_list"
       ) {
       ) {
         return false;
         return false;
+      } else if (
+        // 是否开启进出异常预警
+        !this.isOpenInoutWarning &&
+        item.path === "/anomaly_warning"
+      ) {
+        return false;
       } else {
       } else {
         return true;
         return true;
       }
       }

+ 12 - 0
src/router/index.js

@@ -140,6 +140,18 @@ export const constantRoutes = [
     ]
     ]
   },
   },
 
 
+  {
+    path: '/anomaly_warning',
+    component: Layout,
+    children: [
+      {
+        path: 'index',
+        name: 'anomaly_warning',
+        component: () => import('@/views/anomaly_warning/index'),
+        meta: { title: '进出异常预警', role: [5, 99], icon: 'el-icon-warning' }
+      }
+    ]
+  },
   {
   {
     path: '/white_list',
     path: '/white_list',
     component: Layout,
     component: Layout,

+ 1 - 0
src/store/getters.js

@@ -37,6 +37,7 @@ const getters = {
   buildingCheckType:state=>state.user.buildingCheckType,
   buildingCheckType:state=>state.user.buildingCheckType,
   enterpriseName:state=>state.user.enterpriseName,
   enterpriseName:state=>state.user.enterpriseName,
   tenantEnterpriseName:state=>state.user.tenantEnterpriseName,
   tenantEnterpriseName:state=>state.user.tenantEnterpriseName,
+  isOpenInoutWarning:state=>state.user.isOpenInoutWarning,
 
 
 }
 }
 export default getters
 export default getters

+ 5 - 1
src/store/modules/user.js

@@ -41,7 +41,7 @@ const getDefaultState = () => {
     // bg:'',
     // bg:'',
     tenantEnterpriseName:null,//上级名称-显示使用
     tenantEnterpriseName:null,//上级名称-显示使用
     enterpriseName:null,//下级名称-显示使用
     enterpriseName:null,//下级名称-显示使用
-
+    isOpenInoutWarning:false,
   }
   }
 }
 }
 
 
@@ -147,6 +147,9 @@ const mutations = {
   SET_ENTERPRISENAME: (state, enterpriseName) => {
   SET_ENTERPRISENAME: (state, enterpriseName) => {
     state.enterpriseName = enterpriseName
     state.enterpriseName = enterpriseName
   },
   },
+  SET_INOUTWARNING: (state, isOpenInoutWarning) => {
+    state.isOpenInoutWarning = isOpenInoutWarning
+  },
   // SET_TITLE: (state, title) => {
   // SET_TITLE: (state, title) => {
   //   state.title = title
   //   state.title = title
   // },
   // },
@@ -248,6 +251,7 @@ const actions = {
         commit('SET_BUILDINGCHECKTYPE', data.buildingCheckType)
         commit('SET_BUILDINGCHECKTYPE', data.buildingCheckType)
         commit('SET_ENTERPRISENAME', data.enterpriseName)
         commit('SET_ENTERPRISENAME', data.enterpriseName)
         commit('SET_TENANTENTERPRISENAME', data.tenantEnterpriseName)
         commit('SET_TENANTENTERPRISENAME', data.tenantEnterpriseName)
+        commit('SET_INOUTWARNING', data.isOpenInoutWarning)
         resolve(data)
         resolve(data)
       }).catch(error => {
       }).catch(error => {
         reject(error)
         reject(error)

+ 23 - 0
src/utils/steakPhoto.js

@@ -1,5 +1,8 @@
 import {getPageList} from "@/api/ordinary_user";
 import {getPageList} from "@/api/ordinary_user";
 import {doGetFaceServerLog} from "@/api/old_api_pengwenbing";
 import {doGetFaceServerLog} from "@/api/old_api_pengwenbing";
+import {
+  doGetWaringServerLog,
+} from "@/api/user_manage";
 
 
 //批量导出图片-下载图片blob数据
 //批量导出图片-下载图片blob数据
 function getBlob(url) {
 function getBlob(url) {
@@ -91,6 +94,26 @@ export function downloadPhotosPassRecords(page,number) {
     doSteak()
     doSteak()
   })
   })
 }
 }
+//批量导出图片-进出异常预警-操作入口
+export function downloadPhotosWarningPassRecords(page,number) {
+  let data = JSON.parse(JSON.stringify(page))
+  data.pageSize = number
+  data.pageNum = 1
+  doGetWaringServerLog(data).then(res => {
+    let list = res.data.list;
+    let index = 0;
+    function doSteak() {
+      setTimeout(() => {
+        if(index < list.length) {
+          steakPhoto(list[index].photo, `${list[index].name}-${list[index].cardid}-${list[index].phone}-${list[index].faceTime}`);
+          ++index;
+          doSteak()
+        }
+      },500)
+    }
+    doSteak()
+  })
+}
 
 
 
 
 
 

+ 624 - 0
src/views/anomaly_warning/index.vue

@@ -0,0 +1,624 @@
+<template>
+  <div class="app-container" v-loading="downloadLoading">
+    <!--搜索区-->
+    <el-input
+      v-model="page.data.name"
+      placeholder="请输入姓名"
+      class="margin-left input"
+    ></el-input>
+    <el-input
+      v-model="page.data.phone"
+      placeholder="请输入手机号"
+      class="margin-left input"
+    ></el-input>
+    <el-input
+      v-model="page.data.idNumber"
+      placeholder="请输入身份证号"
+      class="margin-left input"
+    ></el-input>
+    <el-input
+      v-model="page.data.cardIdEx"
+      placeholder="请输入卡号"
+      class="margin-left input"
+    ></el-input>
+    <el-select
+      filterable
+      clearable
+      v-model="page.data.deviceSn"
+      placeholder="请选择设备编号"
+      class="margin-left input"
+    >
+      <el-option
+        v-for="item in machine_list"
+        :key="item.sn"
+        :label="item.sn"
+        :value="item.sn"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      filterable
+      clearable
+      v-model="page.data.deviceSn"
+      placeholder="请选择设备地点"
+      class="margin-left input"
+    >
+      <el-option
+        v-for="item in machine_list"
+        :key="item.sn"
+        :label="item.name"
+        :value="item.sn"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      filterable
+      clearable
+      v-model="page.data.pass"
+      placeholder="请选择进出门"
+      class="margin-left input"
+    >
+      <el-option
+        v-for="item in into_door_list"
+        :key="item.id"
+        :label="item.name"
+        :value="item.id"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      filterable
+      clearable
+      v-model="page.data.verifyType"
+      placeholder="请选择验证类型"
+      class="margin-left input"
+    >
+      <el-option
+        v-for="item in authentication_type_list"
+        :key="item.id"
+        :label="item.name"
+        :value="item.id"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      filterable
+      clearable
+      v-model="page.data.rightno"
+      placeholder="请选择人员类型"
+      class="margin-left input"
+    >
+      <el-option
+        v-for="item in Personnel_type_list"
+        :key="item.id"
+        :label="item.name"
+        :value="item.id"
+      >
+      </el-option>
+    </el-select>
+    <el-date-picker
+      v-model="page.data.startTime"
+      type="datetime"
+      placeholder="选择通行开始时间"
+      value-format="yyyy-MM-dd HH:mm:ss"
+      class="margin-left"
+    >
+    </el-date-picker>
+    <el-date-picker
+      v-model="page.data.endTime"
+      type="datetime"
+      placeholder="选择通行结束时间"
+      value-format="yyyy-MM-dd HH:mm:ss"
+      class="margin-left"
+    >
+    </el-date-picker>
+    <el-button
+      type="primary"
+      icon="el-icon-search"
+      class="margin-left"
+      @click="fetchData"
+      >搜索</el-button
+    >
+    <el-tooltip
+      class="item"
+      effect="dark"
+      content="最大支持导出50000条数据!"
+      placement="top-start"
+    >
+      <el-button
+        type="primary"
+        icon="el-icon-download"
+        class="margin-left"
+        @click="download"
+        v-if="isOut === 1"
+        >导出记录</el-button
+      >
+    </el-tooltip>
+
+    <el-tooltip
+      class="item"
+      effect="dark"
+      content="最大支持导出500条数据!"
+      placement="top-start"
+    >
+      <el-button
+        type="primary"
+        icon="el-icon-download"
+        class="margin-left"
+        @click="steakPhoto(500)"
+        v-if="isOut === 1"
+        >导出照片</el-button
+      >
+    </el-tooltip>
+    <el-button
+      type="primary"
+      :icon="!isUpdate ? 'el-icon-refresh-left' : 'el-icon-loading'"
+      class="margin-left"
+      @click="isUpdate ? stopUpdate() : autoUpdate()"
+      >{{ !isUpdate ? "打开自动刷新" : "关闭自动刷新" }}</el-button
+    >
+    <!--主表格-->
+    <el-table
+      class="table"
+      ref="table_form"
+      v-loading="listLoading"
+      :data="list"
+      element-loading-text="Loading"
+      border
+      fit
+      highlight-current-row
+    >
+      <el-table-column label="序号" align="center" width="80px">
+        <template slot-scope="scope">
+          {{ indexMethod(scope.$index) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="设备编号" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.deviceSn | matchNull }}
+        </template>
+      </el-table-column>
+      <el-table-column label="设备地点" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.faceDeviceName | matchNull }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备类型" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.faceDeviceTypeName | matchNull }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="用户姓名" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.name | matchNull }}
+        </template>
+      </el-table-column>
+      <el-table-column label="现场照片" align="center">
+        <template slot-scope="scope">
+          <el-image
+            style="width: 100px; height: 100px"
+            :src="scope.row.photo"
+            :preview-src-list="[scope.row.photo]"
+          >
+          </el-image>
+        </template>
+      </el-table-column>
+      <el-table-column label="证件号" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.cardid }}
+        </template>
+      </el-table-column>
+      <el-table-column label="卡号" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.cardIdEx }}
+        </template>
+      </el-table-column>
+      <el-table-column label="手机号码" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.phone }}
+        </template>
+      </el-table-column>
+      <el-table-column label="进/出" align="center">
+        <template slot-scope="scope">
+          <el-tag type="success" effect="light" v-if="scope.row.outType === 0"
+            >通用</el-tag
+          >
+          <el-tag
+            type="primary"
+            effect="plain"
+            v-else-if="scope.row.outType === 1"
+            >进门</el-tag
+          >
+          <el-tag
+            type="primary"
+            effect="dark"
+            v-else-if="scope.row.outType === 2"
+            >出门</el-tag
+          >
+          <el-tag v-else>其它</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="验证类型" align="center">
+        <template slot-scope="scope">
+          <el-tag type="primary" plain v-if="scope.row.verifyType === 0"
+            >人脸</el-tag
+          >
+          <el-tag type="primary" plain v-else-if="scope.row.verifyType === 1"
+            >IC卡</el-tag
+          >
+          <el-tag type="primary" plain v-else-if="scope.row.verifyType === 2"
+            >身份证</el-tag
+          >
+          <el-tag type="primary" plain v-else-if="scope.row.verifyType === 3"
+            >二维码</el-tag
+          >
+          <el-tag type="primary" plain v-else-if="scope.row.verifyType === 4"
+            >远程</el-tag
+          >
+          <el-tag type="primary" plain v-else-if="scope.row.verifyType === 6"
+            >IC卡+人脸</el-tag
+          >
+          <el-tag v-else>其它</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="人员类型" align="center">
+        <template slot-scope="scope">
+          <el-tag type="" effect="plain" v-if="scope.row.rightno === 104"
+            >访客</el-tag
+          >
+          <el-tag
+            type="success"
+            effect="plain"
+            v-else-if="scope.row.rightno === 105"
+            >员工</el-tag
+          >
+          <el-tag
+            type="info"
+            effect="plain"
+            v-else-if="scope.row.rightno === 101"
+            >黑名单</el-tag
+          >
+          <el-tag type="info" effect="plain" v-else>未知</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="通行时间" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.faceTime }}
+        </template>
+      </el-table-column>
+      <el-table-column label="预警原因" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.warningMsg }}
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.remark }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="操作区"
+        align="center"
+        fixed="right"
+        width="220px"
+      >
+        <template slot-scope="scope">
+          <el-button
+            v-if="!scope.row.isSure"
+            type="primary"
+            size="small"
+            @click="clickSure(scope.row.waringLogId)"
+            >确认</el-button
+          >
+          <el-button
+            type="danger"
+            size="small"
+            @click="deleteItem(scope.row.waringLogId, 1)"
+            >删除</el-button
+          >
+          <el-button
+            v-if="!scope.row.isBlack"
+            type="danger"
+            size="small"
+            @click="deleteItem(scope.row.waringLogId, 2)"
+            >拉黑</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!--分页栏-->
+    <pagination
+      :total="total"
+      :page.sync="page.pageNum"
+      :limit.sync="page.pageSize"
+      @pagination="fetchData"
+    />
+    <el-dialog
+      title="确认情况"
+      width="400px"
+      :visible.sync="sureVisible"
+      destroy-on-close
+    >
+      <el-form
+        :model="sure_form"
+        ref="sure_form"
+        label-width="60px"
+        label-position="left"
+      >
+        <el-form-item label="备注" prop="remark" class="form-item-style">
+          <el-input
+            v-model="sure_form.remark"
+            placeholder="请输入备注信息"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="sureFun"> 确定 </el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import detailsDialog from "@/components/DialogDetails/index.vue";
+
+import {
+  doGetFaceServerLog,
+  downloadFaceLog,
+  getFaceDeviceList,
+  getMachineCompanyListSearch,
+  getMachineTypeListSearch,
+} from "@/api/old_api_pengwenbing";
+import Pagination from "@/components/Pagination";
+import { checkRole } from "@/utils/checkRole";
+import {
+  getArea,
+  getCity,
+  getProvince,
+  getUserListSearch,
+  getContext,
+  getContextByFaceLog,
+  getUserListFrom,
+  getContextById,
+} from "@/api/user_manage";
+import { parseTime } from "@/utils";
+import { downloadPhotosWarningPassRecords } from "@/utils/steakPhoto"; // secondary package based on el-pagination
+import {
+  doGetWaringServerLog,
+  doGetWaringServerLogExcel,
+  warningSure,
+  warningDelete,
+  warningBlack,
+} from "@/api/user_manage";
+
+export default {
+  components: { Pagination, detailsDialog },
+  filters: {
+    matchNull(str) {
+      if (!str) {
+        return "未记录";
+      } else {
+        return str;
+      }
+    },
+    aAecimal(str) {
+      return (str = str.slice(0, 4));
+    },
+  },
+  data() {
+    return {
+      // 主表格&主表格加载状态
+      list: [],
+      listLoading: true,
+      downloadLoading: false, //导出加载
+      // 分页参数
+      page: {
+        data: {
+          name: null,
+          idNumber: null,
+          phone: null,
+          cardIdEx: null,
+          deviceSn: null,
+          startTime: "",
+          endTime: "",
+          pass: null,
+          verifyType: null,
+          rightno: null,
+          contents: null, //自定义字段
+        },
+        pageNum: 1,
+        pageSize: 10,
+      },
+      total: 0,
+      // 账号列表_搜索
+      user_list: [],
+      // 设备列表_搜索
+      machine_list: [],
+      // 进出门_搜索
+      into_door_list: [
+        { id: 0, name: "不限" },
+        { id: 1, name: "进门" },
+        { id: 2, name: "出门" },
+      ],
+      // 验证类型
+      authentication_type_list: [
+        { id: 0, name: "人脸" },
+        // { id: "1", name: "IC卡" },
+        { id: 2, name: "身份证" },
+        { id: "3", name: "二维码" },
+      ],
+      // 人员类型
+      Personnel_type_list: [
+        { id: 104, name: "访客" },
+        { id: 105, name: "员工" },
+        { id: 301, name: "预约人员" },
+      ],
+      // 是否可以导出
+      isOut: this.$store.getters.isOut,
+      // 是否打开自动更新
+      isUpdate: "",
+      row: {},
+      // 确认情况
+      sureVisible: false,
+      sure_form: {
+        remark: null,
+      },
+    };
+  },
+  created() {
+    this.page_copy = JSON.parse(JSON.stringify(this.page));
+    this.fetchData();
+    this.matchAutoUpdate();
+    this.getUserListSearch();
+    this.getFaceDeviceList();
+  },
+  beforeDestroy() {
+    var isUpdate = localStorage.getItem("isUpdateWarning");
+    if (isUpdate) {
+      clearInterval(isUpdate);
+    }
+  },
+  computed: {},
+  methods: {
+    // 查询权限
+    checkRole,
+    // 获取列表数据
+    fetchData(isUpdate = false) {
+      this.listLoading = true;
+      doGetWaringServerLog(this.page).then((res) => {
+        this.list = res.data.list;
+        this.total = res.data.total;
+        this.listLoading = false;
+      });
+    },
+    clickSure(id) {
+      this.sure_form.waringLogId = id;
+      this.sure_form.remark = null;
+      this.sureVisible = true;
+    },
+    sureFun() {
+      warningSure(this.sure_form).then((res) => {
+        this.sureVisible = false;
+        this.fetchData();
+        this.$message({
+          type: "success",
+          message: "确认成功!",
+        });
+      });
+    },
+    // 删除/拉黑
+    deleteItem(id, type) {
+      this.$confirm(`确定要${type == 1 ? "删除" : "拉黑"}此人员吗?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      }).then(async () => {
+        let res;
+        if (type == 1) {
+          res = await warningDelete(id);
+        } else {
+          res = await warningBlack(id);
+        }
+        if (res.code == 200) {
+          this.fetchData();
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+        }
+      });
+    },
+    // 获取设备列表-搜索
+    getFaceDeviceList() {
+      getFaceDeviceList().then((res) => {
+        this.machine_list = res.data;
+      });
+    },
+    // 获取账号列表数据_搜索
+    getUserListSearch() {
+      getUserListSearch().then((res) => {
+        this.user_list = res.data;
+      });
+    },
+    // 导出记录
+    download() {
+      this.$prompt("请输入导出密码", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        closeOnClickModal: false,
+      })
+        .then(({ value }) => {
+          if (value == "Nqj##361") {
+            this.$message({
+              type: "success",
+              message: "密码正确,正在下载...",
+            });
+            this.downloadLoading = true;
+            doGetWaringServerLogExcel(this.page.data).then((res) => {
+              window.location.href = res;
+              this.downloadLoading = false;
+            });
+          } else {
+            this.$message({
+              type: "error",
+              message: "您输入的密码不正确",
+            });
+          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消导出",
+          });
+        });
+    },
+    //批量导出图片-带参数导出入口-BETA $1 查询参数  $2多少条
+    steakPhoto(number) {
+      downloadPhotosWarningPassRecords(this.page, number);
+    },
+    // 打开自动更新
+    autoUpdate() {
+      this.isUpdate = setInterval(() => {
+        this.fetchData(true);
+      }, 1000*60*5);
+      localStorage.setItem("isUpdateWarning", this.isUpdate);
+    },
+    // 关闭自动更新
+    stopUpdate() {
+      clearInterval(this.isUpdate);
+      localStorage.setItem("isUpdateWarning", "");
+      this.isUpdate = "";
+    },
+    // 检测上次自动更新状态
+    matchAutoUpdate() {
+      var isUpdate = localStorage.getItem("isUpdateWarning");
+      if (isUpdate) {
+        clearInterval(isUpdate);
+        this.autoUpdate();
+      }
+    },
+    // 返回列表序号
+    indexMethod(index) {
+      return (this.page.pageNum - 1) * this.page.pageSize + index + 1;
+    },
+  },
+};
+</script>
+<style scoped>
+.table {
+  margin-top: 15px;
+}
+.flex {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+}
+.margin-left {
+  margin: 10px 0 0 10px;
+}
+.input {
+  width: 150px;
+}
+</style>

+ 94 - 49
src/views/basic_setup/index.vue

@@ -63,7 +63,51 @@
           </el-radio-group>
           </el-radio-group>
         </el-form-item>
         </el-form-item>
       </div>
       </div>
-      <div class="flex" v-if="user_form.type === 5">
+
+
+      <div class="flex" v-if="user_form.placeType != 1">
+        <el-form-item
+          label="员工有效期(天)"
+          prop="userWhitelistEffectiveTime"
+          class="item-margin-bottom"
+        >
+          <el-tooltip
+            class="item"
+            effect="dark"
+            :manual="false"
+            content="单位:天"
+            placement="bottom"
+          >
+            <el-input-number
+              size="mini"
+              :precision="1"
+              v-model="user_form.userWhitelistEffectiveTime"
+              :min="0"
+            ></el-input-number>
+          </el-tooltip>
+        </el-form-item>
+        <el-form-item
+          label="访客有效期(天)"
+          prop="userVisiterEffectiveTime"
+          class="item-margin-bottom"
+        >
+          <el-tooltip
+            class="item"
+            effect="dark"
+            :manual="false"
+            content="单位:天"
+            placement="bottom"
+          >
+            <el-input-number
+              size="mini"
+              :precision="1"
+              v-model="user_form.userVisiterEffectiveTime"
+              :min="0"
+            ></el-input-number>
+          </el-tooltip>
+        </el-form-item>
+      </div>
+       <div class="flex" v-if="user_form.type === 5">
         <el-form-item
         <el-form-item
           label="常访客配置"
           label="常访客配置"
           prop="isHideImportant"
           prop="isHideImportant"
@@ -91,7 +135,7 @@
             </el-tooltip>
             </el-tooltip>
           </el-checkbox-group>
           </el-checkbox-group>
         </el-form-item>
         </el-form-item>
-        <el-form-item
+        <!-- <el-form-item
           label="设备核酸时间(小时)"
           label="设备核酸时间(小时)"
           prop="nucleicExpirationTime"
           prop="nucleicExpirationTime"
           class="item-margin-bottom"
           class="item-margin-bottom"
@@ -109,7 +153,7 @@
               :min="0"
               :min="0"
             ></el-input-number>
             ></el-input-number>
           </el-tooltip>
           </el-tooltip>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
         <el-form-item
           v-if="user_form.placeType === 1 && user_form.type == 5"
           v-if="user_form.placeType === 1 && user_form.type == 5"
           label="不可预约年龄段"
           label="不可预约年龄段"
@@ -144,49 +188,6 @@
           </el-tooltip>
           </el-tooltip>
         </el-form-item>
         </el-form-item>
       </div>
       </div>
-
-      <div class="flex" v-if="user_form.placeType != 1">
-        <el-form-item
-          label="员工有效期(天)"
-          prop="userWhitelistEffectiveTime"
-          class="item-margin-bottom"
-        >
-          <el-tooltip
-            class="item"
-            effect="dark"
-            :manual="false"
-            content="单位:天"
-            placement="bottom"
-          >
-            <el-input-number
-              size="mini"
-              :precision="1"
-              v-model="user_form.userWhitelistEffectiveTime"
-              :min="0"
-            ></el-input-number>
-          </el-tooltip>
-        </el-form-item>
-        <el-form-item
-          label="访客有效期(天)"
-          prop="userVisiterEffectiveTime"
-          class="item-margin-bottom"
-        >
-          <el-tooltip
-            class="item"
-            effect="dark"
-            :manual="false"
-            content="单位:天"
-            placement="bottom"
-          >
-            <el-input-number
-              size="mini"
-              :precision="1"
-              v-model="user_form.userVisiterEffectiveTime"
-              :min="0"
-            ></el-input-number>
-          </el-tooltip>
-        </el-form-item>
-      </div>
       <div class="flex">
       <div class="flex">
         <el-form-item
         <el-form-item
           v-if="user_form.placeType === 0 && user_form.type === 5"
           v-if="user_form.placeType === 0 && user_form.type === 5"
@@ -319,6 +320,37 @@
           />
           />
         </el-form-item>
         </el-form-item>
       </div>
       </div>
+
+      <div v-if="user_form.type === 5 && isOpenInoutWarning">
+        <div class="title">
+          <div class="line"></div>
+          <span>进出异常预警配置</span>
+        </div>
+        <div style="font-size: 14px">
+          在
+          <el-input-number
+            size="mini"
+            v-model="user_form.adminInoutWarnConfigDTO.hour"
+            :min="1"
+          ></el-input-number>
+          小时内,某人员
+           <el-select v-model="user_form.adminInoutWarnConfigDTO.pass" placeholder="请选择通道">
+            <el-option
+              v-for="item in passage_list"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+          通道大于等于 <el-input-number
+            size="mini"
+            v-model="user_form.adminInoutWarnConfigDTO.num"
+            :min="1"
+          ></el-input-number
+          > 次,则预警
+        </div>
+      </div>
       <!-- 设备显示配置 -->
       <!-- 设备显示配置 -->
       <div v-if="user_form.type === 5">
       <div v-if="user_form.type === 5">
         <div class="title">
         <div class="title">
@@ -662,7 +694,7 @@ export default {
   data() {
   data() {
     return {
     return {
       isOpenExam: this.$store.getters.isOpenExam,
       isOpenExam: this.$store.getters.isOpenExam,
-      // placeType: this.$store.getters.placeType,
+      isOpenInoutWarning: this.$store.getters.isOpenInoutWarning,
       // 对话框参数
       // 对话框参数
       user_form: {
       user_form: {
         placeType: null, // 场所类型  0通用1预约2楼宇
         placeType: null, // 场所类型  0通用1预约2楼宇
@@ -706,7 +738,12 @@ export default {
         // 支付宝小程序单机二维码标题
         // 支付宝小程序单机二维码标题
         zfbMiniEthTitle: null,
         zfbMiniEthTitle: null,
         // 支付宝小程序联机二维码标题
         // 支付宝小程序联机二维码标题
-        zfbMiniVguangTitle: null
+        zfbMiniVguangTitle: null,
+        adminInoutWarnConfigDTO:{
+          hour: 1,
+          pass: null,
+          num: 1,
+        },
       },
       },
 
 
       // 验证规则
       // 验证规则
@@ -810,7 +847,13 @@ export default {
       // 打卡方式-通用 的区域选中列表
       // 打卡方式-通用 的区域选中列表
       checkWayOfSelectedPlatformAreaList: [],
       checkWayOfSelectedPlatformAreaList: [],
       // 提交状态
       // 提交状态
-      submitLoading: false
+      submitLoading: false,
+       //通道
+      passage_list: [
+        { id: 1, name: "进" },
+        { id: 2, name: "出" },
+        { id: 0, name: "进出" },
+      ],
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -981,6 +1024,8 @@ export default {
               message: "修改成功!"
               message: "修改成功!"
             })
             })
             this.getInfo()
             this.getInfo()
+          }).catch(()=>{
+            this.submitLoading = false
           })
           })
         }
         }
       })
       })

+ 0 - 56
src/views/pass_records/components/ysgz_pass_records.vue

@@ -445,31 +445,6 @@
           <el-tag type="info" effect="plain" v-else>未知</el-tag>
           <el-tag type="info" effect="plain" v-else>未知</el-tag>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <!-- <el-table-column label="认证类型" align="center">
-        <template slot-scope="scope">
-          <el-tag effect="plain" type="success" v-if="scope.row.pushType === 0"
-            >小程序</el-tag
-          >
-          <el-tag
-            effect="plain"
-            v-else-if="scope.row.pushType ===1"
-            >初次添加</el-tag
-          >
-          <el-tag
-            effect="plain"
-            type="primary"
-            v-else-if="scope.row.pushType ===2"
-            >人工录入</el-tag
-          >
-           <el-tag
-            effect="plain"
-            type="warning"
-            v-else-if="scope.row.pushType ===3"
-            >访客机</el-tag
-          >
-          <el-tag effect="plain" type="info" v-else>其他</el-tag>
-        </template>
-      </el-table-column> -->
       <el-table-column label="通行时间" align="center">
       <el-table-column label="通行时间" align="center">
         <template slot-scope="scope">
         <template slot-scope="scope">
           {{ scope.row.faceTime }}
           {{ scope.row.faceTime }}
@@ -516,9 +491,6 @@
         width="100px"
         width="100px"
       >
       >
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <!-- <el-button type="warning" size="small" @click="searchClose(scope.row)"
-            >密接</el-button
-          > -->
           <el-button
           <el-button
             type="primary"
             type="primary"
             size="small"
             size="small"
@@ -853,34 +825,6 @@ export default {
         this.autoUpdate();
         this.autoUpdate();
       }
       }
     },
     },
-    // 查询密切接触
-    searchClose(row) {
-      this.$prompt("请输入前后通行间隔时间(分钟)", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        inputPattern: /^[1-9]{1}[\d]*$/,
-        inputErrorMessage: "只能填写大于0的数字哦~",
-        closeOnClickModal: false,
-      })
-        .then(({ value }) => {
-          var time = Date.parse(new Date(row.faceTime));
-          var startTime = time - value * 60 * 1000;
-          var endTime = time + value * 60 * 1000;
-          startTime = parseTime(startTime, "{y}-{m}-{d} {h}:{i}:{s}");
-          endTime = parseTime(endTime, "{y}-{m}-{d} {h}:{i}:{s}");
-          this.page = JSON.parse(JSON.stringify(this.page_copy));
-          this.page.data.deviceSn = row.deviceSn;
-          this.page.data.startTime = startTime;
-          this.page.data.endTime = endTime;
-          this.fetchData();
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消查询",
-          });
-        });
-    },
     // 返回列表序号
     // 返回列表序号
     indexMethod(index) {
     indexMethod(index) {
       return (this.page.pageNum - 1) * this.page.pageSize + index + 1;
       return (this.page.pageNum - 1) * this.page.pageSize + index + 1;

+ 24 - 19
src/views/user_manage/index.vue

@@ -356,7 +356,7 @@
     <el-dialog
     <el-dialog
       :title="dialogTitle[dialogType]"
       :title="dialogTitle[dialogType]"
       :visible.sync="dialogVisible"
       :visible.sync="dialogVisible"
-      width="1200px"
+      width="1100px"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
     >
     >
       <el-form
       <el-form
@@ -944,6 +944,16 @@
                 </el-radio-group>
                 </el-radio-group>
               </el-form-item>
               </el-form-item>
             </div>
             </div>
+            <el-form-item
+                label="是否开启进出预警"
+                prop="isOpenInoutWarning"
+                class="form-item-style item-margin-bottom"
+              >
+                <el-radio-group v-model="user_form.isOpenInoutWarning">
+                  <el-radio :label="false">否</el-radio>
+                  <el-radio :label="true">是</el-radio>
+                </el-radio-group>
+              </el-form-item>
             <div class="flex" v-if="user_form.placeType==2">
             <div class="flex" v-if="user_form.placeType==2">
               <el-form-item
               <el-form-item
                 label="审核配置"
                 label="审核配置"
@@ -1337,7 +1347,7 @@
                 label-width="78px"
                 label-width="78px"
                 :label="`推送地址${index+1}`"
                 :label="`推送地址${index+1}`"
                 class="form-item-style"
                 class="form-item-style"
-                style="width: 390px;flex:none;"
+                style="width: 400px;flex:none;"
                 :prop="`clockWayPushInterfaceAddresses.${index}.interfAddr`"
                 :prop="`clockWayPushInterfaceAddresses.${index}.interfAddr`"
               >
               >
                 <el-input
                 <el-input
@@ -1373,14 +1383,11 @@
               </el-form-item>
               </el-form-item>
               <el-form-item
               <el-form-item
                 label-width="78px"
                 label-width="78px"
-                label-position="right"
-                label="绑定区域"
                 class="form-item-style"
                 class="form-item-style"
-                style="margin-left:13px;width:309px;flex:none;"
+                style="margin-left:10px;width:309px;flex:none;"
                 :prop="`clockWayPushInterfaceAddresses.${index}.zoneId`"
                 :prop="`clockWayPushInterfaceAddresses.${index}.zoneId`"
-                :rules="{ required: true, type: 'number', message: '绑定区域不能为空', trigger: ['change', 'blur'], validator: zoneRule }"
               >
               >
-                <!-- <div slot="label" style="text-align: right;">绑定区域</div> -->
+                <div slot="label" style="text-align: right;">绑定区域</div>
                 <el-select
                 <el-select
                   v-model="clockWayItem.zoneId"
                   v-model="clockWayItem.zoneId"
                   filterable
                   filterable
@@ -2110,6 +2117,7 @@ export default {
         orgOutId:null,
         orgOutId:null,
         tenantEnterpriseName:'楼宇',//上级名称-显示使用
         tenantEnterpriseName:'楼宇',//上级名称-显示使用
         enterpriseName:'企业',//下级名称-显示使用
         enterpriseName:'企业',//下级名称-显示使用
+        isOpenInoutWarning:false,
       },
       },
       user_form_copy: {},
       user_form_copy: {},
       scene_list: [
       scene_list: [
@@ -2398,7 +2406,10 @@ export default {
         ],
         ],
         orgOutId: [
         orgOutId: [
           { required: true, message: "请输入", trigger: "blur" },
           { required: true, message: "请输入", trigger: "blur" },
-        ]
+        ],
+        isOpenInoutWarning: [
+          { required: true, message: "请选择", trigger: "blur" },
+        ],
       },
       },
       // 批量导入结果返回
       // 批量导入结果返回
       resultVisible: false,
       resultVisible: false,
@@ -2515,12 +2526,6 @@ export default {
       }
       }
       return callback("推送字段不能为空!");
       return callback("推送字段不能为空!");
     },
     },
-    zoneRule(rule, value, callback) {
-      if (value != null && value != undefined) {
-        return callback();
-      }
-      return callback("绑定区域不能为空!");
-    },
     // 获取区域列表
     // 获取区域列表
     getPlatformList(adminId) {
     getPlatformList(adminId) {
       getAreaList({ adminId }).then((res) => {
       getAreaList({ adminId }).then((res) => {
@@ -2791,7 +2796,7 @@ export default {
             this.user_form.clockWayPushInterfaceAddresses =
             this.user_form.clockWayPushInterfaceAddresses =
               this.user_form.clockWayPushInterfaceAddresses.filter((item) => {
               this.user_form.clockWayPushInterfaceAddresses.filter((item) => {
                 return (
                 return (
-                  // item.interfAddr !== null &&
+                  item.interfAddr !== null &&
                   item.punchReportFields !== null &&
                   item.punchReportFields !== null &&
                   item.punchReportFields.length > 0 &&
                   item.punchReportFields.length > 0 &&
                   item.zoneId !== null
                   item.zoneId !== null
@@ -2803,7 +2808,7 @@ export default {
               this.user_form.clockWayPushInterfaceAddresses =
               this.user_form.clockWayPushInterfaceAddresses =
                 this.user_form.clockWayPushInterfaceAddresses.map((item) => {
                 this.user_form.clockWayPushInterfaceAddresses.map((item) => {
                   return {
                   return {
-                    interfAddr: item.interfAddr || null,
+                    interfAddr: item.interfAddr,
                     zoneId: item.zoneId,
                     zoneId: item.zoneId,
                     punchReportFields:
                     punchReportFields:
                       item.punchReportFields && item.punchReportFields > 0
                       item.punchReportFields && item.punchReportFields > 0
@@ -2895,7 +2900,7 @@ export default {
               punchReportFields = item.punchReportFields;
               punchReportFields = item.punchReportFields;
             }
             }
             return {
             return {
-              interfAddr: item.interfAddr || null,
+              interfAddr: item.interfAddr,
               zoneId: item.zoneId,
               zoneId: item.zoneId,
               punchReportFields,
               punchReportFields,
             };
             };
@@ -2968,7 +2973,7 @@ export default {
             this.user_form.clockWayPushInterfaceAddresses =
             this.user_form.clockWayPushInterfaceAddresses =
               this.user_form.clockWayPushInterfaceAddresses.filter((item) => {
               this.user_form.clockWayPushInterfaceAddresses.filter((item) => {
                 return (
                 return (
-                  // item.interfAddr !== null &&
+                  item.interfAddr !== null &&
                   item.punchReportFields !== null &&
                   item.punchReportFields !== null &&
                   item.punchReportFields.length > 0 &&
                   item.punchReportFields.length > 0 &&
                   item.zoneId !== null
                   item.zoneId !== null
@@ -2980,7 +2985,7 @@ export default {
               this.user_form.clockWayPushInterfaceAddresses =
               this.user_form.clockWayPushInterfaceAddresses =
                 this.user_form.clockWayPushInterfaceAddresses.map((item) => {
                 this.user_form.clockWayPushInterfaceAddresses.map((item) => {
                   return {
                   return {
-                    interfAddr: item.interfAddr || null,
+                    interfAddr: item.interfAddr,
                     zoneId: item.zoneId,
                     zoneId: item.zoneId,
                     punchReportFields:
                     punchReportFields:
                       item.punchReportFields &&
                       item.punchReportFields &&

+ 10 - 7
src/views/visitee_list/modal/UploadModal.vue

@@ -188,15 +188,18 @@ export default {
         if (item['楼层'] && item['显示标题']) {
         if (item['楼层'] && item['显示标题']) {
           // 组装数据上传
           // 组装数据上传
           const data = JSON.parse(JSON.stringify(this.form))
           const data = JSON.parse(JSON.stringify(this.form))
-          data.name = item['姓名'] ? item['姓名'].trim() : null
-          data.phone = item['手机号'] ? item['手机号'].trim() : null
-          data.idNumber = item['身份证号'] ? item['身份证号'].trim() : null
-          data.company = item['单位名称'] ? item['单位名称'].trim() : null
-          data.unitName = item['部门'] ? item['部门'].trim() : null
+          console.log(data);
+          data.name = item['姓名'] ? item['姓名'] : null
+          console.log(item);
+          console.log(item['手机号']);
+          data.phone = item['手机号'] ? item['手机号'] : null
+          data.idNumber = item['身份证号'] ? item['身份证号'] : null
+          data.company = item['单位名称'] ? item['单位名称'] : null
+          data.unitName = item['部门'] ? item['部门'] : null
           data.floor = item['楼层']
           data.floor = item['楼层']
-          data.room = item['房间号'] ? item['房间号'].trim() : null
+          data.room = item['房间号'] ? item['房间号'] : null
           data.showTitle = item['显示标题']
           data.showTitle = item['显示标题']
-          data.zoneNames = item['区域'] ? item['区域'].trim() : null
+          data.zoneNames = item['区域'] ? item['区域'] : null
           delete data.correctList
           delete data.correctList
 
 
           let hasValidate = true
           let hasValidate = true

+ 269 - 121
src/views/white_list/index.vue

@@ -18,10 +18,11 @@
       >
       >
       <a href="javascript:;" class="file"
       <a href="javascript:;" class="file"
         >批量导入白名单<input
         >批量导入白名单<input
+
           type="file"
           type="file"
           name="file"
           name="file"
           ref="file"
           ref="file"
-          @change="upload($event)"
+          @change="uploadFun($event)"
       /></a>
       /></a>
       <!-- <input type="file" @change="impexcel(this)" /> -->
       <!-- <input type="file" @change="impexcel(this)" /> -->
       <el-button
       <el-button
@@ -190,21 +191,39 @@
       >
       >
       </el-option>
       </el-option>
     </el-select>
     </el-select>
-<el-select
-      filterable
-      clearable
-      v-model="page.data.warehousingStatus"
-      placeholder="请选择入库状态"
-      class="margin-left input"
-    >
-      <el-option
-        v-for="item in putStorage"
-        :key="item.id"
-        :label="item.name"
-        :value="item.id"
+    <template v-if="placeType == 3">
+      <el-select
+        filterable
+        clearable
+        v-model="page.data.warehousingStatus"
+        placeholder="请选择入库状态"
+        class="margin-left input"
       >
       >
-      </el-option>
-    </el-select>
+        <el-option
+          v-for="item in putStorage"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        >
+        </el-option>
+      </el-select>
+      <el-select
+        filterable
+        clearable
+        v-model="page.data.personnelType"
+        placeholder="请选择人员类型"
+        class="margin-left input"
+      >
+        <el-option
+          v-for="item in userTypeList"
+          :key="item.code"
+          :label="item.desc"
+          :value="item.code"
+        >
+        </el-option>
+      </el-select>
+    </template>
+
     <!-- <el-date-picker
     <!-- <el-date-picker
       v-model="page.data.startTime"
       v-model="page.data.startTime"
       type="datetime"
       type="datetime"
@@ -283,7 +302,7 @@
     >
     >
       <el-button
       <el-button
         type="primary"
         type="primary"
-        icon="el-icon-download"
+        icon="el-icon-dEditownload"
         class="margin-left"
         class="margin-left"
         @click="exportRecord"
         @click="exportRecord"
         v-if="isOut === 1"
         v-if="isOut === 1"
@@ -299,13 +318,13 @@
       v-if="checkRole([5]) && placeType != 2"
       v-if="checkRole([5]) && placeType != 2"
       >删除所有人员</el-button
       >删除所有人员</el-button
     >
     >
-    <a v-if="checkRole([5])" href="javascript:;" class="file"
-      >批量编辑<input
-        type="file"
-        name="file"
-        ref="file"
-        @change="batchEditor($event)"
-    /></a>
+    <el-button
+      v-if="checkRole([5])"
+      type="primary"
+      class="margin-left"
+      @click="batchEditVisible = true"
+      >批量编辑</el-button
+    >
     <!--主表格-->
     <!--主表格-->
     <el-table
     <el-table
       class="table"
       class="table"
@@ -981,41 +1000,6 @@
         </el-button>
         </el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
-    <!--错误返回-->
-    <el-dialog
-      title="提示"
-      center
-      :visible.sync="resultVisible"
-      destroy-on-close
-    >
-      <el-table
-        class="table"
-        ref="table_form_result"
-        v-loading="false"
-        :data="result_list"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        height="500"
-      >
-        <el-table-column label="错误序号" align="center" width="100px">
-          <template slot-scope="scope">
-            {{ scope.$index + 1 }}
-          </template>
-        </el-table-column>
-        <el-table-column label="错误描述" align="center">
-          <template slot-scope="scope">
-            {{ scope.row | matchNull }}
-          </template>
-        </el-table-column>
-      </el-table>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="resultVisible = false">
-          我已知晓
-        </el-button>
-      </div>
-    </el-dialog>
     <!-- 详情对话框 -->
     <!-- 详情对话框 -->
     <detailsDialog
     <detailsDialog
       :detailsList="detailsList"
       :detailsList="detailsList"
@@ -1157,6 +1141,56 @@
         ></BatchUpload>
         ></BatchUpload>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
+    <!-- 批量编辑-弹框 -->
+    <el-dialog
+      class="batchVisible"
+      title="批量编辑"
+      :visible.sync="batchEditVisible"
+      :close-on-click-modal="false"
+      @close="closeBatch"
+    >
+      <p class="text-color">
+        在“比对唯一参数”里选择一项作为更新文件里的数据和后台数据进行寻找匹配的标准参数值。上传excel更新文件后,根据选择的比对唯一参数寻找匹配对应的后台数据,更新文件里填写的内容在匹配上对应的后台数据后将覆盖更新,没填写的内容将不进行覆盖更新。
+      </p>
+      <el-form
+        :model="batch_edit_form"
+        :rules="batch_edit_rules"
+        ref="batch_edit_form"
+        label-width="120px"
+        label-position="left"
+      >
+        <el-form-item
+          label="对比唯一参数"
+          prop="uniqueCode"
+          class="form-item-style"
+        >
+          <el-radio-group v-model="batch_edit_form.uniqueCode">
+            <el-radio :label="1">身份证号</el-radio>
+            <el-radio :label="2">手机号</el-radio>
+            <el-radio :label="3">卡号</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="上传Excel文件" prop="file">
+          <a href="javascript:;" class="file file1">
+            上传文件
+            <input
+              type="file"
+              name="file"
+              ref="file"
+              @change="batchEditUpload($event)"
+            />
+          </a>
+          <span style="margin-left: 8px">
+            {{ batch_edit_form.file ? batch_edit_form.fileName : "" }}</span
+          >
+        </el-form-item>
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBatch"> 取消 </el-button>
+        <el-button type="primary" @click="batchEditFun"> 确定 </el-button>
+      </div>
+    </el-dialog>
     <!--操作人-->
     <!--操作人-->
     <el-dialog
     <el-dialog
       title="操作人"
       title="操作人"
@@ -1165,10 +1199,10 @@
       destroy-on-close
       destroy-on-close
     >
     >
       <div class="content-operator" v-if="operatorData">
       <div class="content-operator" v-if="operatorData">
-        <div>UID:{{operatorData.zfbUserId}}</div>
-        <div>姓名:{{operatorData.username}}</div>
-        <div>手机号:{{operatorData.phone | desensitization( 3, 7)}}</div>
-        <div>证件号:{{operatorData.idNumber| desensitization( 6,14)}}</div>
+        <div>UID:{{ operatorData.zfbUserId }}</div>
+        <div>姓名:{{ operatorData.username }}</div>
+        <div>手机号:{{ operatorData.phone | desensitization(3, 7) }}</div>
+        <div>证件号:{{ operatorData.idNumber | desensitization(6, 14) }}</div>
       </div>
       </div>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="operatorVisible = false">
         <el-button type="primary" @click="operatorVisible = false">
@@ -1211,6 +1245,7 @@ import {
   queryEnterpriseAccount,
   queryEnterpriseAccount,
   getUserWhitePersonnelTypeEnum,
   getUserWhitePersonnelTypeEnum,
   getParentInfo,
   getParentInfo,
+  batchEditUserWhitelist,
 } from "@/api/user_manage";
 } from "@/api/user_manage";
 import { reIssue } from "@/api/old_api_pengwenbing";
 import { reIssue } from "@/api/old_api_pengwenbing";
 import { downloadPhotosWhiteList } from "@/utils/steakPhoto";
 import { downloadPhotosWhiteList } from "@/utils/steakPhoto";
@@ -1324,7 +1359,7 @@ export default {
           pushType: null, //推送类型
           pushType: null, //推送类型
           endTime: null,
           endTime: null,
           startTime: null,
           startTime: null,
-          warehousingStatus:null,
+          warehousingStatus: null,
         },
         },
         pageNum: 1,
         pageNum: 1,
         pageSize: 10,
         pageSize: 10,
@@ -1402,9 +1437,6 @@ export default {
       userTypeList: [],
       userTypeList: [],
       // 是否显示提示
       // 是否显示提示
       showTooltip: false,
       showTooltip: false,
-      // 批量导入结果返回
-      resultVisible: false,
-      result_list: [],
       doUpload: "",
       doUpload: "",
       // 详情
       // 详情
       dialogTableVisible: false,
       dialogTableVisible: false,
@@ -1460,10 +1492,21 @@ export default {
       uploadFileName: "", //文件夹名称
       uploadFileName: "", //文件夹名称
       temporaryAreaList: [], //私有区域临时数据
       temporaryAreaList: [], //私有区域临时数据
       operatorData: null, //操作人
       operatorData: null, //操作人
-      putStorage:[
-        {id:0,name:'关闭'},
-        {id:1,name:'开通'},
+      putStorage: [
+        { id: 0, name: "关闭" },
+        { id: 1, name: "开通" },
       ],
       ],
+      // 批量编辑
+      batchEditVisible: false,
+      batch_edit_form: {
+        uniqueCode: null,
+        fileName: null,
+        file: null,
+      },
+      batch_edit_rules: {
+        uniqueCode: [{ required: true, message: "请选择", trigger: "blur" }],
+        file: [{ required: true, message: "请选择", trigger: "blur" }],
+      },
     };
     };
   },
   },
   created() {
   created() {
@@ -1825,10 +1868,40 @@ export default {
         document.body.removeChild(eleLink);
         document.body.removeChild(eleLink);
       });
       });
     },
     },
+    closeBatch() {
+      (this.batch_edit_form = {
+        uniqueCode: null,
+        fileName: null,
+        file: null,
+      }),
+        (this.batchEditVisible = false);
+    },
+    batchEditUpload(e) {
+      this.batch_edit_form.fileName = e.target.files[0].name;
+      this.batch_edit_form.file = e.currentTarget.files;
+    },
+    // 批量编辑
+    batchEditFun(e) {
+      this.$refs["batch_edit_form"].validate((valid) => {
+        if (valid) {
+          this.batchEditVisible = false;
+          this.uploadFun(
+            this.batch_edit_form.file,
+            "batchEdit",
+            this.batch_edit_form.uniqueCode
+          );
+        }
+      });
+    },
     // 批量导入
     // 批量导入
-    async upload(e) {
+    async uploadFun(e, type, uniqueCode) {
       this.loading = true;
       this.loading = true;
-      var files = e.currentTarget.files;
+      let files;
+      if (type) {
+        files = e;
+      } else {
+        files = e.currentTarget.files;
+      }
       if (!files.length) {
       if (!files.length) {
         return;
         return;
       }
       }
@@ -1846,10 +1919,11 @@ export default {
       this.loading = false;
       this.loading = false;
       this.allNumber = data.length;
       this.allNumber = data.length;
       this.drawerVisible = true;
       this.drawerVisible = true;
-      this.doUploadAddUserInfo(0, data);
+      this.doUploadAddUserInfo(0, data, type, uniqueCode);
+      e.target.value=""
     },
     },
     // 递归调用校验数据并请求
     // 递归调用校验数据并请求
-    async doUploadAddUserInfo(i, data) {
+    async doUploadAddUserInfo(i, data, type, uniqueCode) {
       if (i > data.length - 1) {
       if (i > data.length - 1) {
         this.hasCompleted = true;
         this.hasCompleted = true;
         this.fetchData();
         this.fetchData();
@@ -1871,6 +1945,19 @@ export default {
       form.phone = data[i]["手机号"];
       form.phone = data[i]["手机号"];
       form.idNumber = data[i]["身份证号"];
       form.idNumber = data[i]["身份证号"];
       form.startTime = data[i]["开始有效期"];
       form.startTime = data[i]["开始有效期"];
+      form.personnelType1 = data[i]["人员类型"];
+      if (form.personnelType1) {
+        switch (form.personnelType1) {
+          case "学生":
+            form.personnelType = 1;
+            break;
+          case "教职工":
+            form.personnelType = 2;
+            break;
+          default:
+            break;
+        }
+      }
       if (form.startTime) {
       if (form.startTime) {
         form.startTime.toString().trim();
         form.startTime.toString().trim();
       }
       }
@@ -1886,20 +1973,37 @@ export default {
       }
       }
       form.inputType = 1;
       form.inputType = 1;
       form.pushType = 1;
       form.pushType = 1;
-      await this.isPassFun(form, i).then(async (res) => {
-        let timeout = 0;
-        if (res.isOk) {
-          await this.addUserInfo(data, form, i);
-        } else {
-          this.getFileList1(data, i, res, form);
-          timeout = 0;
-        }
-        this.hasDealNumber = i + 1;
-        this.waitDealNumber = data.length - (i + 1);
-        setTimeout(() => {
-          this.doUploadAddUserInfo(++i, data);
-        }, timeout);
-      });
+      if (type) {
+        await this.isPassBatchEditFun(form, i, uniqueCode).then(async (res) => {
+          let timeout = 0;
+          if (res.isOk) {
+            await this.batchEditUserWhitelist(data, form, i, uniqueCode);
+          } else {
+            this.getFileList1(data, i, res, form);
+            timeout = 0;
+          }
+          this.hasDealNumber = i + 1;
+          this.waitDealNumber = data.length - (i + 1);
+          setTimeout(() => {
+            this.doUploadAddUserInfo(++i, data);
+          }, timeout);
+        });
+      } else {
+        await this.isPassFun(form, i).then(async (res) => {
+          let timeout = 0;
+          if (res.isOk) {
+            await this.addUserInfo(data, form, i);
+          } else {
+            this.getFileList1(data, i, res, form);
+            timeout = 0;
+          }
+          this.hasDealNumber = i + 1;
+          this.waitDealNumber = data.length - (i + 1);
+          setTimeout(() => {
+            this.doUploadAddUserInfo(++i, data);
+          }, timeout);
+        });
+      }
     },
     },
     // 校验模板数据内容
     // 校验模板数据内容
     async isPassFun(form, i) {
     async isPassFun(form, i) {
@@ -1910,6 +2014,11 @@ export default {
           err: "",
           err: "",
         },
         },
       };
       };
+      if (!form.personnelType && this.placeType == 3) {
+        isPass.incorrect.err = "人员类型为必填项";
+        isPass.isOk = false;
+        return isPass;
+      }
       if (!form.name) {
       if (!form.name) {
         isPass.incorrect.err = "姓名为必填项";
         isPass.incorrect.err = "姓名为必填项";
         isPass.isOk = false;
         isPass.isOk = false;
@@ -2052,6 +2161,66 @@ export default {
         resolve(isPass);
         resolve(isPass);
       });
       });
     },
     },
+    // 校验批量编辑模板数据内容
+    async isPassBatchEditFun(form, i) {
+      let isPass = {
+        isOk: true,
+        incorrect: {
+          name: `第${i + 1}行`,
+          err: "",
+        },
+      };
+      switch (this.batch_edit_form.uniqueCode) {
+        case 1:
+          if (!form.idNumber) {
+            isPass.isOk = false;
+            isPass.incorrect.err = "身份证号为必填";
+            return isPass;
+          }
+          if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(form.idNumber)) {
+            isPass.isOk = false;
+            isPass.incorrect.err = "身份证长度或格式有误";
+            return isPass;
+          }
+          break;
+        case 2:
+          if (!form.phone) {
+            isPass.isOk = false;
+            isPass.incorrect.err = "手机号为必填";
+            return isPass;
+          }
+          if (form.phone && !/^[0-9]*$/.test(form.phone)) {
+            isPass.isOk = false;
+            isPass.incorrect.err = "手机号只能由数字组成";
+            return isPass;
+          }
+          break;
+        case 3:
+          if (!form.cardIdEx) {
+            isPass.isOk = false;
+            isPass.incorrect.err = "卡号为必填";
+            return isPass;
+          }
+          break;
+        default:
+          break;
+      }
+      if (form.adminName) {
+        let index = this.enterprise_list.findIndex((item) => {
+          return item.username === form.adminName;
+        });
+        if (index > -1) {
+          form.adminId = this.enterprise_list[index].adminId;
+        } else {
+          isPass.isOk = false;
+          isPass.incorrect.err = "账号名称有误";
+          return isPass;
+        }
+      }
+      return new Promise((resolve) => {
+        resolve(isPass);
+      });
+    },
     // 批量导入-调用添加员工接口
     // 批量导入-调用添加员工接口
     async addUserInfo(data, form, i) {
     async addUserInfo(data, form, i) {
       await insert(form)
       await insert(form)
@@ -2061,45 +2230,24 @@ export default {
           this.makeScrollDown();
           this.makeScrollDown();
         });
         });
     },
     },
+    // 常客的批量编辑
+    async batchEditUserWhitelist(data, form, i, uniqueCode) {
+      console.log(uniqueCode);
+      form.uniqueCode = uniqueCode;
+      await batchEditUserWhitelist(form)
+        .then((res) => {})
+        .catch((err) => {
+          this.batchUploadResultList.push({ name: `第${i + 1}行`, err: err });
+          this.makeScrollDown();
+        });
+    },
     // 批量导入-推入错误信息
     // 批量导入-推入错误信息
     getFileList1(data, i, isPass) {
     getFileList1(data, i, isPass) {
       // this.initAddress(this.user_form.contents);
       // this.initAddress(this.user_form.contents);
       this.batchUploadResultList.push(isPass.incorrect);
       this.batchUploadResultList.push(isPass.incorrect);
       this.makeScrollDown();
       this.makeScrollDown();
     },
     },
-    // 批量编辑
-    batchEditor(e) {
-      var files = e.currentTarget.files;
-      if (!files.length) {
-        return;
-      }
-      const loading = this.$loading({
-        lock: true,
-        text: "拼命导入中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      var formData = new FormData(); // 必需声明一个FormData对象
-      formData.append("file", files[0]);
-      editUserWhitelistExcel(formData)
-        .then((res) => {
-          loading.close();
-          this.fetchData();
-          if (res.data.length > 0) {
-            this.resultVisible = true;
-            this.result_list = res.data;
-          } else {
-            this.$message({
-              type: "success",
-              message: "导入成功!",
-            });
-          }
-        })
-        .catch((err) => {
-          loading.close();
-          this.fetchData();
-        });
-    },
+
     // 点击批量注册人员
     // 点击批量注册人员
     clickBulkRegistration() {
     clickBulkRegistration() {
       this.batchVisible = true;
       this.batchVisible = true;
@@ -2237,7 +2385,7 @@ export default {
       let excel_url = window.URL.createObjectURL(blob);
       let excel_url = window.URL.createObjectURL(blob);
       let link = document.createElement("a");
       let link = document.createElement("a");
       link.href = excel_url;
       link.href = excel_url;
-      link.download = "批量注册结果错误名单.xls";
+      link.download = "错误名单列表.xls";
       document.body.appendChild(link);
       document.body.appendChild(link);
       link.click();
       link.click();
       document.body.removeChild(link);
       document.body.removeChild(link);