liuyg
2021-11-23 1546789fd0ff0e90fb0f4519ecba72d8a932c91d
+未安装驱动  提示安装
3 files modified
58 ■■■■ changed files
public/zhiwenDemo/app.css 6 ●●●● patch | view | raw | blame | history
src/views/qiandao/forms.vue 49 ●●●● patch | view | raw | blame | history
src/views/qiandao/tables.vue 3 ●●●● patch | view | raw | blame | history
public/zhiwenDemo/app.css
@@ -87,7 +87,7 @@
    color: #606266;
}
#connect_server {
    width: 66px;
    width: 65px;
    height: 35px;
    border: none;
    font-size: 16px;
@@ -99,7 +99,7 @@
    display: none;
}
#closeG {
    width: 66px;
    width: 65px;
    height: 40px;
    border: none;
    background-color: #e6a23c;
@@ -110,7 +110,7 @@
    left: 13px;
}
#onceGgin {
    width: 60px;
    width: 65px;
    height: 31px;
    font-size: 12px;
    border: none;
src/views/qiandao/forms.vue
@@ -45,12 +45,34 @@
      this.cardShebei = CertCtl.connect();
      //如果result为空,代表读卡插件未启动
      if (this.cardShebei == "") {
        console.log("未启动读卡插件!");
        console.log("未启动读卡插件!1");
        this.$confirm(
          "未安装身份证设备驱动,请安装后重试!点击确定开始刷新页面,点击取消需手动刷新?",
          "提示",
          {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }
        )
          .then(() => {
            location.reload();
          })
          .catch(() => {
            // this.$message({
            //   type: 'info',
            //   message: '已取消删除'
            // });
          });
        this.noone = true;
        return;
      } else {
        //result页面回显
        console.log("ok!");
      }
    } catch (e) {}
    } catch (e) {
      // console.log(e, "未启动读卡插件!2");
    }
    if (this.intTime) {
      clearInterval(this.intTime);
@@ -64,6 +86,7 @@
      cardShebei: "",
      intTime: "", //自动获取身份证;
      obj: {},
      noone: false,
      option: {
        // mockBtn: true,
        // submitText: "完成",
@@ -131,12 +154,16 @@
  methods: {
    setIntervals: function () {
      let that = this;
      if (this.noone) {
        console.log("请安装驱动!");
        return;
      }
      this.intTime = setInterval(function () {
        if (!that.haveCardid) {
          //定时读卡
          let result = CertCtl.readCert();
          if (result == "") {
            console.log("未启动读卡插件!");
            console.log("未启动读卡插件!3");
          } else {
            var resultObj = eval("(" + result + ")");
            //resultFlag为0代表读卡成功
@@ -149,15 +176,21 @@
                name: data.partyName,
                national: data.nation,
                certAddress: data.certAddress,
                // sex:
                //   data.certType == 0
                //     ? "未知"
                //     : data.certType == 1
                //     ? "男"
                //     : data.certType == 2
                //     ? "女"
                //     : data.certType == 9
                //     ? "未说明"
                //     : "未能识别",
                sex:
                  data.certType == 0
                    ? "未知"
                    ? "女"
                    : data.certType == 1
                    ? "男"
                    : data.certType == 2
                    ? "女"
                    : data.certType == 9
                    ? "未说明"
                    : "未能识别",
                imgs: "data:image/bmp;base64," + data.identityPic,
                yxqend:
src/views/qiandao/tables.vue
@@ -164,6 +164,7 @@
    //   }
    // },
    rowUps(row, msg) {
      row["cell"] = "2";
      let zhiwenData = this.useZhiWen("outZhiwenData");
      let card = this.cardInfor;
      // console.log(card);
@@ -363,7 +364,7 @@
        //   // console.log(values, 2);
        this.data = [];
        this.page.total = 0;
        // return;
        return;
      }
      getList(page.currentPage, page.pageSize, values).then((res) => {
        // console.log(res);