1
PC-20250623MANY\Administrator
2025-09-20 9d7de030d38f8d71fdf54ddfe26e46e71f17e9c0
src/views/account/components/fnv.vue
@@ -1,14 +1,14 @@
<template>
  <el-form ref="fnvform" :model="form" label-width="auto" :rules="rules">
    <el-form-item :label="$t('hj195')" prop="name">
      <el-input v-model="form.name" :disabled="isActive"></el-input>
      <el-input v-model="form.realName" :disabled="isActive"></el-input>
    </el-form-item>
    <el-form-item :label="$t('it1')" prop="auRadio">
      <el-radio-group v-model="form.auRadio" disabled>
        <el-radio label="1">{{ $t("dl1") }}</el-radio>
        <el-radio label="2">{{ $t("pa1") }}</el-radio>
        <el-radio label="3">{{ $t("ot1") }}</el-radio>
    <el-form-item :label="$t('it1')" prop="realType">
      <el-radio-group v-model="form.realType" :disabled="isActive">
        <el-radio :label="1">{{ $t("dl1") }}</el-radio>
        <el-radio :label="2">{{ $t("pa1") }}</el-radio>
        <el-radio :label="3">{{ $t("身份證件") }}</el-radio>
      </el-radio-group>
    </el-form-item>
@@ -50,7 +50,7 @@
      <el-upload
        :with-credentials="true"
        class="avatar-uploader"
        :action="admin + 'user/upload.do'"
        :action="admin + '/user/upload.do'"
        list-type="picture-card"
        name="upload_file"
        :show-file-list="false"
@@ -90,16 +90,16 @@
  data() {
    return {
      form: {
        name: "",
        auRadio: "1",
        realName: "",
        realType: 1,
        idCard: "",
        vaildNumber: "",
        img1key: "",
        img2key: "",
      },
      rules: {
        name: [{ required: true, message: this.$t("请输入") }],
        auRadio: [
        realName: [{ required: true, message: this.$t("请输入") }],
        realType: [
          { required: true, message: this.$t("請選擇"), trigger: "change" },
        ],
        idCard: [{ required: true, message: this.$t("请输入") }],
@@ -120,9 +120,10 @@
    },
  },
  mounted() {
    this.form.name = this.userInfo.realName;
    this.form.realName = this.userInfo.realName;
    this.form.idCard = this.userInfo.idCard;
    this.form.vaildNumber = this.userInfo.vaildNumber;
    this.form.realType = this.userInfo.realType;
    this.form.img1key = this.userInfo.img1Key;
    this.form.img2key = this.userInfo.img2Key;
  },
@@ -156,14 +157,14 @@
    },
    beforeAvatarUpload2(file) {
      this.imgStatus2 = true;
      const isLt10M = file.size / 1024 / 1024 < 10;
      if (!isLt10M) {
        this.$message.error(this.$t("hj205"));
        return false;
      } else {
        this.form.img2key = URL.createObjectURL(file);
        compress(file, function (val) {});
      }
      // const isLt10M = file.size / 1024 / 1024 < 10;
      // if (!isLt10M) {
      //   this.$message.error(this.$t("hj205"));
      //   return false;
      // } else {
      //   this.form.img2key = URL.createObjectURL(file);
      //   compress(file, function (val) {});
      // }
    },
    handleError2() {
      this.imgStatus2 = false;