<template>
  <div>
    <div style="display: inline-block;">
      <span>状态：</span>
      <el-select
        v-model="status"
        style="width:150px;margin-left: 10px;"
        @change="select()"
      >
        <el-option
          v-for="item in statesnum"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option> </el-select
      >&nbsp;&nbsp;
      <div style="position: relative;display: inline-block;">
        <span>手机号：</span>
        <el-input
          style="width: 200px;"
          @keydown.enter.native="select"
          placeholder="请输入手机号"
          v-model="phone"
        >
        </el-input
        >&nbsp;&nbsp;
      </div>
      <div style="position: relative;display: inline-block;">
        <span>姓名：</span>
        <el-input
          style="width: 200px;"
          @keydown.enter.native="select"
          placeholder="请输入姓名"
          v-model="userName"
        >
        </el-input
        >&nbsp;&nbsp;
      </div>
      <span>骑手所在站点：</span>
      <el-select
        @change="select()"
        :clearable="true"
        v-model="stationName"
        placeholder="请选择骑手所在站点"
      >
        <el-option
          :label="i.stationName"
          :value="i.id"
          :key="i.id"
          v-for="i in stationData"
        ></el-option>
      </el-select>
      <el-button
        style="margin-left:15px;"
        size="mini"
        type="primary"
        icon="document"
        @click="select"
        >查询
      </el-button>
      <el-button
        style="margin-left:15px;"
        size="mini"
        type="primary"
        icon="document"
        @click="cleans"
        >重置
      </el-button>
      <!-- <el-button style='margin:0 0 20px 20px;' v-if="isAuth('autonym:tongguo')" size="mini" type="primary"
				icon="document" @click="passClick()" :disabled="checkBoxData.length <= 0">通过</el-button> -->
    </div>
    <el-table v-loading="tableDataLoading" :data="tableData.list">
      <el-table-column prop="id" label="编号" width="80">
        <template slot-scope="scope">
          <span>{{ scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="userName" label="姓名">
        <template slot-scope="scope">
          <span
            style="color: #4f9dec;cursor: pointer;"
            @click="updates(scope.row)"
            >{{ scope.row.userName ? scope.row.userName : "未绑定" }}</span
          >
        </template>
      </el-table-column>
      <el-table-column prop="phone" label="电话" width="150"> </el-table-column>
      <!-- <el-table-column prop="address" label="地址" width="160">
			</el-table-column> -->
      <el-table-column prop="identityCardNumber" label="身份证号" width="150">
      </el-table-column>

      <el-table-column prop="identityCardFront" label="身份证正面">
        <template slot-scope="scope">
          <div
            v-if="
              scope.row.identityCardFront == null ||
                scope.row.identityCardFront == ''
            "
          >
            暂无图片
          </div>
          <div
            v-else-if="scope.row.identityCardFront.includes(',')"
            style="display:flex;flex-wrap: wrap;"
          >
            <div
              v-for="item in scope.row.identityCardFront.split(',')"
              style="margin: 2px;"
            >
              <!-- <el-popover placement="top-start" title="" trigger="hover"> -->
              <img
                style="width: 50px; height: 50px"
                :src="item"
                alt=""
                slot="reference"
                v-viewer
              />
              <!-- <img style="width: 300px; height: 300px" :src="item" alt="">
							</el-popover> -->
            </div>
          </div>
          <div v-else>
            <!-- <el-popover placement="top-start" title="" trigger="hover"> -->
            <img
              style="width: 50px; height: 50px"
              :src="scope.row.identityCardFront"
              alt=""
              slot="reference"
              v-viewer
            />
            <!-- <img style="width: 300px; height: 300px" :src="scope.row.identityCardFront" alt="">
						</el-popover> -->
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="identityCardVerso" label="身份证反面">
        <template slot-scope="scope">
          <div
            v-if="
              scope.row.identityCardVerso == null ||
                scope.row.identityCardVerso == ''
            "
          >
            暂无图片
          </div>
          <div
            v-else-if="scope.row.identityCardVerso.includes(',')"
            style="display:flex;flex-wrap: wrap;"
          >
            <div
              v-for="item in scope.row.identityCardVerso.split(',')"
              style="margin: 2px;"
            >
              <!-- <el-popover placement="top-start" title="" trigger="hover"> -->
              <img
                style="width: 50px; height: 50px"
                :src="item"
                alt=""
                slot="reference"
                v-viewer
              />
              <!-- <img style="width: 300px; height: 300px" :src="item" alt="">
							</el-popover> -->
            </div>
          </div>
          <div v-else>
            <!-- <el-popover placement="top-start" title="" trigger="hover"> -->
            <img
              style="width: 50px; height: 50px"
              :src="scope.row.identityCardVerso"
              alt=""
              slot="reference"
              v-viewer
            />
            <!-- <img style="width: 300px; height: 300px" :src="scope.row.identityCardVerso" alt="">
						</el-popover> -->
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="selfIdentityCard" label="手持身份证照片">
        <template slot-scope="scope">
          <div
            v-if="
              scope.row.selfIdentityCard == null ||
                scope.row.selfIdentityCard == ''
            "
          >
            暂无图片
          </div>
          <div
            v-else-if="scope.row.selfIdentityCard.includes(',')"
            style="display:flex;flex-wrap: wrap;"
          >
            <div
              v-for="item in scope.row.selfIdentityCard.split(',')"
              style="margin: 2px;"
            >
              <!-- <el-popover placement="top-start" title="" trigger="hover"> -->
              <img
                style="width: 50px; height: 50px"
                :src="item"
                alt=""
                slot="reference"
                v-viewer
              />
              <!-- <img style="width: 300px; height: 300px" :src="item" alt="">
							</el-popover> -->
            </div>
          </div>
          <div v-else>
            <!-- <el-popover placement="top-start" title="" trigger="hover"> -->
            <img
              style="width: 50px; height: 50px"
              :src="scope.row.selfIdentityCard"
              alt=""
              slot="reference"
              v-viewer
            />
            <!-- <img style="width: 300px; height: 300px" :src="scope.row.selfIdentityCard" alt="">
						</el-popover> -->
          </div>
        </template>
      </el-table-column>
      <el-table-column
        prop="checkCertificationMessage"
        label="审核内容"
        width="160"
      >
      </el-table-column>

      <el-table-column prop="auditTime" label="认证时间" width="170">
      </el-table-column>
      <el-table-column prop="stationName" label="骑手所在站点" width="170">
      </el-table-column>
      <el-table-column prop="createTime" label="创建时间" width="170">
      </el-table-column>
      <el-table-column fixed="right" prop="status" label="状态" width="120">
        <template slot-scope="scope">
          <span v-if="scope.row.checkCertification == '0'">待审核</span>
          <span v-if="scope.row.checkCertification == '1'">审核成功</span>
          <span v-if="scope.row.checkCertification == '2'">已拒绝</span>
        </template>
      </el-table-column>
      <el-table-column fixed="right" label="操作" width="320">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="primary"
            :disabled="
              !isAuth('autonym:jujue') || scope.row.checkCertification !== '0'
            "
            @click="refuseClick(scope.row)"
          >
            拒绝
          </el-button>
          <el-button
            size="mini"
            type="primary"
            :disabled="
              !isAuth('autonym:tongguo') || scope.row.checkCertification !== '0'
            "
            @click="passClicks(scope.row)"
            >通过
          </el-button>

          <el-button
            size="mini"
            type="primary"
            :disabled="
              !isAuth('autonym:bianji') || scope.row.checkCertification !== '1'
            "
            @click="editClicks(scope.row)"
            >编辑
          </el-button>

          <el-button
            size="mini"
            type="primary"
            :disabled="
              !isAuth('autonym:tixian') || scope.row.checkCertification !== '1'
            "
            @click="infoClicks(scope.row)"
            >提现信息
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <div style="text-align: center;margin-top: 10px;">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="limit"
        :current-page="page"
        layout="total,sizes, prev, pager, next,jumper"
        :total="tableData.totalCount"
      >
      </el-pagination>
    </div>
    <!-- 任务拒绝弹框 -->
    <el-dialog title="拒绝" :visible.sync="dialogFormVisible" center>
      <div style="margin-bottom: 10px;">
        <span
          style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;"
          >拒绝理由：</span
        >
        <el-input
          style="width:50%;"
          v-model="content"
          type="textarea"
          :rows="4"
          placeholder="请输入拒绝理由"
        >
        </el-input>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="refuseto()">确 定</el-button>
      </div>
    </el-dialog>

    <!-- 编辑实名认证 -->
    <el-dialog
      title="编辑"
      custom-class="edit"
      :visible.sync="editVisible"
      :close-on-click-modal="false"
      center
    >
      <el-form
        :model="ruleForm"
        :rules="rules"
        ref="ruleForm"
        label-width="120px"
        class="demo-ruleForm"
      >
        <el-form-item label="姓名" prop="name">
          <el-input style="width: 250px;" v-model="ruleForm.name"></el-input>
        </el-form-item>
        <el-form-item label="手机号" prop="phone">
          <el-input style="width: 250px;" v-model="ruleForm.phone"></el-input>
        </el-form-item>
        <el-form-item label="身份证号" prop="idCard">
          <el-input style="width: 250px;" v-model="ruleForm.idCard"></el-input>
        </el-form-item>
        <el-form-item label="骑手所在站点" prop="station">
          <el-select
            style="width: 250px;"
            v-model="ruleForm.station"
            placeholder="请选择骑手所在站点"
          >
            <el-option
              :label="i.stationName"
              :value="i.id"
              :key="i.id"
              v-for="i in stationData"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="身份证正面照片" prop="frontPhoto">
          <div class="cardphoto">
            <img
              v-viewer
              v-if="ruleForm.frontPhoto"
              :src="ruleForm.frontPhoto"
              alt=""
            />
            <el-upload
              :action="Tupiantou"
              list-type="picture-card"
              :on-success="handleUploadSuccess"
              :on-change="handleChange"
              :on-remove="handleRemove"
              :before-upload="beforeAvatarUpload"
            >
              <!-- :auto-upload="false" -->
              <i class="el-icon-plus"></i>
            </el-upload>
          </div>
        </el-form-item>
        <el-form-item label="身份证反面照片" prop="versoPhoto">
          <div class="cardphoto">
            <img
              v-viewer
              v-if="ruleForm.versoPhoto"
              :src="ruleForm.versoPhoto"
              alt=""
            />
            <el-upload
              :action="Tupiantou"
              list-type="picture-card"
              :on-success="handleUploadSuccess2"
              :on-change="handleChange2"
              :on-remove="handleRemove2"
              :before-upload="beforeAvatarUpload"
            >
              <i class="el-icon-plus"></i>
            </el-upload>
          </div>
        </el-form-item>
        <el-form-item label="手持身份证照片" prop="handPhoto">
          <div class="cardphoto">
            <img
              v-viewer
              v-if="ruleForm.handPhoto"
              :src="ruleForm.handPhoto"
              alt=""
            />
            <el-upload
              :action="Tupiantou"
              list-type="picture-card"
              :on-success="handleUploadSuccess3"
              :on-change="handleChange3"
              :on-remove="handleRemove3"
              :before-upload="beforeAvatarUpload"
              class="cardphoto"
            >
              <i class="el-icon-plus"></i>
            </el-upload>
          </div>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="submitEdit('ruleForm')"
            >确定</el-button
          >
          <el-button @click="cancelEdit('ruleForm')">取消</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>

    <!-- 提现信息 -->
    <el-dialog
      title="提现信息"
      custom-class="info"
      :visible.sync="infoVisible"
      :close-on-click-modal="false"
      center
    >
      <el-form
        :model="infoRuleForm"
        :rules="infoRules"
        ref="infoRuleForm"
        label-width="120px"
        class="demo-ruleForm"
      >
        <el-form-item label="银行卡号" prop="cardNumber">
          <el-input style="width: 250px;" v-model="infoRuleForm.cardNumber"></el-input>
        </el-form-item>
        <el-form-item label="开户行" prop="bank">
          <el-input style="width: 250px;" v-model="infoRuleForm.bank"></el-input>
        </el-form-item>
        <el-form-item label="开户人姓名" prop="name">
          <el-input style="width: 250px;" v-model="infoRuleForm.name"></el-input>
        </el-form-item>
        <el-form-item label="开户人商户号" prop="mchId">
          <el-input style="width: 250px;" v-model="infoRuleForm.mchId"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="submitInfo('infoRuleForm')"
            >确定</el-button
          >
          <el-button @click="cancelInfo('infoRuleForm')">取消</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      limit: 10,
      page: 1,
      content: "",
      status: -1,
      statesnum: [
        {
          value: -1,
          label: "全部"
        },
        {
          value: 0,
          label: "待审核"
        },
        {
          value: 1,
          label: "审核成功"
        },
        {
          value: 2,
          label: "拒绝"
        }
      ],
      stationName: "",
      phone: "",
      userName: "",
      activeName: "first",
      tableDataLoading: false,
      dialogFormVisible: false,
      tableData: [],
      checkBoxData: [], //多选框选择的值
      helpTakeId: "",
      stationData: [], // 骑手站点数据

      editVisible: false, // 编辑弹窗
      ruleForm: {
        userId: "",
        name: "",
        phone: "",
        idCard: "",
        station: "",
        frontPhoto: "",
        handPhoto: "",
        versoPhoto: ""
      },
      rules: {
        name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
        phone: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
        idCard: [
          {
            required: true,
            message: "身份证号不能为空",
            trigger: "blur"
          }
        ],
        station: [
          {
            required: true,
            message: "骑手所在站点不能为空",
            trigger: "blur"
          }
        ]
        // frontPhoto: [
        //   {
        //     required: true,
        //     message: "身份证正面照片不能为空",
        //     trigger: "change"
        //   }
        // ],
        // versoPhoto: [
        //   {
        //     required: true,
        //     message: "身份证反面照片不能为空",
        //     trigger: "change"
        //   }
        // ],
        // handPhoto: [
        //   {
        //     required: true,
        //     message: "手持身份证照片不能为空",
        //     trigger: "change"
        //   }
        // ]
      },

      infoVisible:false,// 提现信息
      infoRuleForm: {
        userId:"",
        id:'',
        cardNumber: "",
        bank: "",
        name: "",
        mchId:"",
      },
      infoRules: {
        cardNumber: [{ required: true, message: "银行卡号不能为空", trigger: "blur" }],
        bank: [{ required: true, message: "开户行不能为空", trigger: "blur" }],
        name: [{ required: true, message: "开户人姓名不能为空", trigger: "blur" }],
        // mchId: [{ required: true, message: "开户人商户号不能为空", trigger: "blur" }],
      },
    };
  },
  methods: {
    // 多选
    changeFun(val) {
      this.checkBoxData = val;
    },
    // 详情跳转
    updates(row) {
      this.$router.push({
        path: "/userDetail",
        query: {
          userId: row.userId
        }
      });
    },
    handleSizeChange(val) {
      this.limit = val;
      this.dataSelect();
    },
    handleCurrentChange(val) {
      this.page = val;
      this.dataSelect();
    },
    //任务通过
    passClick(id) {
      this.status = 1;
      this.content = "同意";
      var ids = id
        ? [id]
        : this.checkBoxData.map(item => {
            return item.id;
          });
      this.$http({
        url: this.$http.adornUrl(
          `student/auditStudentAuthentication/${ids}/${this.status}/${this.content}`
        ),
        method: "post",
        data: this.$http.adornData({})
      }).then(({ data }) => {
        if (data.code == 0) {
          this.$message({
            message: "操作成功",
            type: "success",
            duration: 1500,
            onClose: () => {
              this.content = "";
              this.status = -1;
              this.dataSelect();
            }
          });
        } else {
          this.$message({
            message: data.msg,
            type: "error",
            duration: 1500,
            onClose: () => {
              this.content = "";
              this.status = -1;
              this.dataSelect();
            }
          });
        }
      });
    },
    //单条任务通过
    passClicks(row) {
      this.status = 1;
      this.content = "同意";
      this.$http({
        url: this.$http.adornUrl(`admin/dataCentre/checkCertification`),
        method: "post",
        params: this.$http.adornParams({
          userId: row.userId,
          checkCertification: this.status,
          checkCertificationMessage: "审核通过"
        })
      }).then(({ data }) => {
        if (data.code == 0) {
          this.$message({
            message: "操作成功",
            type: "success",
            duration: 1500,
            onClose: () => {
              this.content = "";
              this.status = -1;
              this.dataSelect();
            }
          });
        } else {
          this.$message({
            message: data.msg,
            type: "error",
            duration: 1500,
            onClose: () => {
              this.content = "";
              this.status = -1;
              this.dataSelect();
            }
          });
        }
      });
    },
    //任务拒绝
    refuseClick(rows) {
      this.status = 2;
      this.helpTakeId = rows.userId;
      this.content = "";
      this.dialogFormVisible = true;
    },
    refuseto() {
      if (this.content == "") {
        this.$notify({
          title: "提示",
          duration: 1800,
          message: "请输入拒绝理由",
          type: "warning"
        });
        return;
      }
      this.$http({
        url: this.$http.adornUrl(`admin/dataCentre/checkCertification`),
        method: "post",
        params: this.$http.adornParams({
          userId: this.helpTakeId,
          checkCertification: this.status,
          checkCertificationMessage: this.content
        })
      }).then(({ data }) => {
        this.dialogFormVisible = false;
        this.$message({
          message: "操作成功",
          type: "success",
          duration: 1500,
          onClose: () => {
            this.content = "";
            this.status = -1;
            this.dataSelect();
          }
        });
      });
    },
    // 查询
    select() {
      this.page = 1;
      this.limit = 10;
      this.dataSelect();
    },
    // 重置
    cleans() {
      this.status = -1;
      this.userName = "";
      this.phone = "";
      this.dataSelect();
    },
    // 获取派单数据列表
    dataSelect() {
      this.tableDataLoading = true;
      this.$http({
        url: this.$http.adornUrl("admin/dataCentre/findAllCertification"),
        method: "get",
        params: this.$http.adornParams({
          page: this.page,
          limit: this.limit,
          phone: this.phone,
          userName: this.userName,
          checkCertification: this.status,
          riderStationId: this.stationName
        })
      }).then(({ data }) => {
        console.log(data, "实名认证");

        this.tableDataLoading = false;
        let returnData = data.data;
        this.tableData = returnData;
      });
    },

    // 编辑实名认证
    editClicks(row) {
      console.log(row);
      this.ruleForm.userId = row.userId;
      this.ruleForm.name = row.userName;
      this.ruleForm.phone = row.phone;
      this.ruleForm.idCard = row.identityCardNumber;
      this.ruleForm.station = row.riderStationId;
      this.ruleForm.frontPhoto = row.identityCardFront;
      this.ruleForm.versoPhoto = row.identityCardVerso;
      this.ruleForm.handPhoto = row.selfIdentityCard;
      this.editVisible = true;
    },

    //上传成功  图片上传 start(----------------------------------------------------------)
    handleUploadSuccess(file, fileList) {
      console.log(file, "Success");
      this.ruleForm.frontPhoto = file.data;
    },
    async handleChange(file, fileList) {
      console.log(file, "上传的图片");
    },

    handleRemove(file, fileList) {
      console.log(file, "Remove");
    },
    beforeAvatarUpload(file) {
      return this.$processImage(this, file, false);
    },
    // 图片上传 start(----------------------------------------------------------)

    //上传成功  图片上传 start(----------------------------------------------------------)
    handleUploadSuccess2(file, fileList) {
      console.log(file, "Success");
      this.ruleForm.versoPhoto = file.data;
    },
    handleChange2(file, fileList) {
      console.log(file, "change");
    },
    handleRemove2(file, fileList) {
      console.log(file, "Remove");
    },
    // 图片上传 start(----------------------------------------------------------)

    //上传成功  图片上传 start(----------------------------------------------------------)
    handleUploadSuccess3(file, fileList) {
      console.log(file, "Success");
      this.ruleForm.handPhoto = file.data;
    },
    handleChange3(file, fileList) {
      console.log(file, "change");
    },
    handleRemove3(file, fileList) {
      console.log(file, "Remove");
    },
    // 图片上传 start(----------------------------------------------------------)

    submitEdit(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          this.$http({
            url: this.$http.adornUrl("admin/dataCentre/updateCertification"),
            method: "post",
            data: this.$http.adornData({
              userId: this.ruleForm.userId, //用户id
              userName: this.ruleForm.name, //用户名
              phone: this.ruleForm.phone, //手机号
              identityCardNumber: this.ruleForm.idCard, //证件号码
              riderStationId: this.ruleForm.station, //站点id
              identityCardFront: this.ruleForm.frontPhoto, //身份证正面图片
              identityCardVerso: this.ruleForm.versoPhoto, //身份证反面图片
              selfIdentityCard: this.ruleForm.handPhoto //手持身份证正面图片
            })
          }).then(({ data }) => {
            console.log(data, "编辑");
            if (data.code == 0) {
              this.$message({
                message: "编辑成功",
                type: "success",
                duration: 1000,
                onClose: () => {
                  this.dataSelect();
                }
              });
              this.editVisible = false;
            } else {
              this.$message({
                message: data.msg,
                type: "warning",
                duration: 1500,
                onClose: () => {}
              });
            }
          });
        } else {
          return false;
        }
      });
    },
    cancelEdit(formName) {
      this.$refs[formName].resetFields();
      this.ruleForm.userId = "";
      this.ruleForm.name = "";
      this.ruleForm.phone = "";
      this.ruleForm.idCard = "";
      this.ruleForm.station = "";
      this.ruleForm.frontPhoto = "";
      this.ruleForm.versoPhoto = "";
      this.ruleForm.handPhoto = "";
      this.editVisible = false;
    },
    // 站点下拉框
    stationList() {
      this.$http({
        url: this.$http.adornUrl("admin/riderStation/stationList"),
        method: "get",
        params: this.$http.adornParams({})
      }).then(({ data }) => {
        console.log(data, "站点下拉框");
        this.stationData = data.data;
      });
    },

    // 提现信息
    infoClicks(rows){
      this.infoVisible=true
      this.infoRuleForm.cardNumber = "";
      this.infoRuleForm.bank = "";
      this.infoRuleForm.name = "";
      this.infoRuleForm.id = "";
      this.infoRuleForm.userId = rows.userId
      this.$http({
        url: this.$http.adornUrl("rider/bank/getUserId"),
        method: "get",
        params: this.$http.adornParams({
          userId: rows.userId
        })
      }).then(({ data }) => {
        console.log(data, "提现信息");
        if(data.data){
          this.infoRuleForm.cardNumber = data.data.cardNo
          this.infoRuleForm.bank = data.data.bankName
          this.infoRuleForm.name = data.data.realName
          this.infoRuleForm.mchId = data.data.mchId
          this.infoRuleForm.id = data.data.id
        }
      });
      this.$nextTick(()=>{
        this.$refs.infoRuleForm.resetFields();
      })
    },
    submitInfo(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          let agData={
              "userId": this.infoRuleForm.userId, //骑手id
              "cardNo": this.infoRuleForm.cardNumber, //卡号
              "openBank": this.infoRuleForm.bank, //开户行
              "realName": this.infoRuleForm.name, //户主名称
              "bankName": this.infoRuleForm.bank, //银行名称
              "mchId": this.infoRuleForm.mchId //银行名称
          }
          if(this.infoRuleForm.id){
            agData.id=this.infoRuleForm.id
          }
          this.$http({
            url: this.$http.adornUrl("rider/bank/update"),
            method: "post",
            data: this.$http.adornData(agData)
          }).then(({ data }) => {
            console.log(data, "操作");
            if (data.code == 0) {
              this.$message({
                message: "操作成功",
                type: "success",
                duration: 1000,
                onClose: () => {
                  this.dataSelect();
                }
              });
              this.infoVisible=false
            } else {
              this.$message({
                message: data.msg,
                type: "warning",
                duration: 1500,
                onClose: () => {}
              });
            }
          });
        } else {
          return false;
        }
      });
    },
    cancelInfo(formName) {
      this.$refs[formName].resetFields();
      this.infoRuleForm.cardNumber = "";
      this.infoRuleForm.bank = "";
      this.infoRuleForm.name = "";
      this.infoVisible=false
    },
  },
  mounted() {
    this.dataSelect();
    this.stationList();
  }
};
</script>

<style>
.edit {
  width: 550px;
}
.el-form-item__content {
  /* border: 1px solid red; */
  img {
    width: 148px;
    height: 148px;
    margin-right: 8px;
    border-radius: 6px;
  }
  .cardphoto {
    display: flex;
    .el-upload-list--picture-card {
      display: none;
    }
  }
}
.info {
  width: 500px;
}

.viewer-container{
  z-index: 999999;
}
</style>
