liuyg
2021-08-26 6073ccf22f887e3424058b57b3286e87b4fe8af9
保安证二维码  后端反base64
3 files modified
37 ■■■■ changed files
package.json 1 ●●●● patch | view | raw | blame | history
src/api/performance/performance.js 2 ●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuardDetail.vue 34 ●●●● patch | view | raw | blame | history
package.json
@@ -29,7 +29,6 @@
    "vue": "^2.6.10",
    "vue-axios": "^2.1.2",
    "vue-i18n": "^8.7.0",
    "vue-qr": "^2.5.0",
    "vue-router": "^3.0.1",
    "vue2-countdown": "^1.0.8",
    "vuex": "^3.1.1"
src/api/performance/performance.js
@@ -2,7 +2,7 @@
export const getER = (securityNumber) => {
    return request({
        url: '/api//qrCode/getQrCode',
        url: '/api//qrCode/getQrCodeBase64',
        method: 'get',
        params: {
            securityNumber
src/views/securityGuard/securityGuardDetail.vue
@@ -38,11 +38,11 @@
              <img :src="obj0.myPicture" alt="" v-else />
            </div>
            <div class="imgs">
              <!-- <div v-if="obj0.myPicture">暂无二维码</div> -->
              <!-- <img :src="obj0.myPicture" alt="" v-else/> -->
              <div v-if="erweima == ''">暂无二维码</div>
              <img :src="erweima" alt="" v-else />
              <!-- <img src="/img/register/ewm.png" alt="" /> -->
              <!-- logoSrc="/img/register/ewm.png" -->
              <vue-qr :text="goToUrl" :size="200"></vue-qr>
              <!-- <vue-qr :text="goToUrl" :size="200"></vue-qr> -->
            </div>
            <!-- <img src="/img/mock/card/card-1.jpg" alt="" /> -->
@@ -97,7 +97,7 @@
  getER,
} from "@/api/performance/performance";
import vueQr from "vue-qr";
// import vueQr from "vue-qr";
export default {
  data() {
@@ -191,11 +191,12 @@
        align: "center",
        column: trackRecordColumn,
      },
      erweima: "",
    };
  },
  components: {
    vueQr,
  },
  // components: {
  //   vueQr,
  // },
  computed: {
    ids1() {
      let ids1 = [];
@@ -204,12 +205,12 @@
      });
      return ids1.join(",");
    },
    goToUrl() {
      var url =
        "http://s16s652780.51mypc.cn/securityInfo/securityInfo.html?securityNumber=" +
        this.obj0.securitynumber;
      return url;
    },
    // goToUrl() {
    //   var url =
    //     "http://s16s652780.51mypc.cn/securityInfo/securityInfo.html?securityNumber=" +
    //     this.obj0.securitynumber;
    //   return url;
    // },
  },
  methods: {
    Print() {
@@ -237,9 +238,10 @@
        this.getPerformancePageInfo();
        this.loading2 = false;
      } else if (column.prop == "tab4") {
        // getER(this.obj0.securitynumber).then((res) => {
        //   console.log(res);
        // });
        getER(this.obj0.securitynumber).then((res) => {
          this.erweima = res.data;
          console.log(res.data);
        });
      }
    },
    //查询当前保安员的从业记录信息