liuyg
2021-12-10 b8154654b1f83b94f62874a0462b0cd2d5db7cd5
src/views/qiandao/forms.vue
@@ -5,6 +5,7 @@
      ref="form"
      v-model="obj"
      :option="option"
      res="formss"
      @reset-change="emptytChange"
    >
      <!-- @submit="submit" -->
@@ -35,7 +36,33 @@
import { mapGetters } from "vuex";
export default {
  computed: {
    ...mapGetters(["userInfo", "cardInfor", "haveCardid", "useZhiWen"]),
    ...mapGetters([
      "userInfo",
      "cardInfor",
      "haveCardid",
      "useZhiWen",
      "isClears",
    ]),
  },
  watch: {
    isClears() {
      if (this.isClears) {
        this.obj = {
          name: "",
          national: "",
          certAddress: "",
          sex: "",
          imgs: "",
          yxqend: "",
          yxqstart: "",
          birthday: "",
          id: "",
          qfjg: "",
        };
        this.emptytChange();
        this.$store.commit("setIsClears", false);
      }
    },
  },
  mounted() {
    // console.log(CertCtl);
@@ -91,6 +118,8 @@
        // mockBtn: true,
        // submitText: "完成",
        // printBtn: true,
        // emptyBtn: false,
        size: "small",
        labelWidth: 70,
        submitBtn: false,
        disabled: true,
@@ -171,6 +200,11 @@
              //回显相关数据
              // console.log(resultObj, 123);
              const data = resultObj.resultContent;
              // 判断是否是重新读卡
              // if (that.obj.id == data.certNumber) {
              //   //同一张身份证-不更新数据
              //   return;
              // }
              //赋值数据
              that.obj = {
                name: data.partyName,
@@ -214,6 +248,7 @@
                id: data.certNumber,
                qfjg: data.certOrg,
              };
              // console.log("应用数据");
              that.$store.commit("setCardInfor", that.obj);
              that.$store.commit("setCardidState", true);
            } else if (resultObj.resultFlag == "-1") {
@@ -222,6 +257,9 @@
              } else {
                // console.log(resultObj.errorMsg);
                //无卡片提醒
                that.obj = {
                  id: "",
                };
              }
            } else if (resultObj.resultFlag == "-2") {
              console.log(resultObj.errorMsg);
@@ -240,7 +278,7 @@
        clear: true,
      };
      this.useZhiWen("setZhiwenData", zhiwen);
      this.$message.success("清空身份证数据");
      // this.$message.success("清空身份证数据");
    },
    // useZhiWen: function (fn, vals) {
    //   //读取指纹实例
@@ -257,13 +295,14 @@
</script>
<style lang="scss" scoped>
.zhiwenMain {
  width: 100%;
  height: 220px;
  width: 180px;
  height: 247px;
  // border: 1px solid rgba($color: #d3d3d3, $alpha: 1);
}
.formsss {
  height: 100% !important;
  // overflow-x: hidden;
  // border: 1px solid rgb(0, 255, 64);
  // overflow-y: scroll;
}
.imgss {