<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">

      <el-form-item label="专家姓名" prop="fName">
        <el-input
          v-model="queryParams.fName"
          placeholder="请输入专家姓名"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>

      <el-form-item label="身份证号" prop="fIdNo">
        <el-input
          v-model="queryParams.fIdNo"
          placeholder="请输入身份证号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>

      <el-form-item label="数据来源" prop="fSource">
        <el-select v-model="queryParams.fSource" placeholder="请选择数据来源" clearable size="small">
          <el-option
            v-for="dict in fSourceOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="人员编码" prop="fCode">
        <el-input
          v-model="queryParams.fCode"
          placeholder="请输入人员编码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>

      <el-form-item label="是否省级专家" prop="fThisProvinceFlag">
        <el-select v-model="queryParams.fThisProvinceFlag" placeholder="请选择是否省级专家" clearable size="small">
          <el-option
            v-for="dict in fThisProvinceFlagOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>

      <el-form-item label="是否有效" prop="fValidType">
        <el-select v-model="queryParams.fValidType" placeholder="请选择是否有效" clearable size="small">
          <el-option
            v-for="dict in fValidTypeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>

      <el-form-item label="燃气种类" prop="fGasType">
        <el-select v-model="queryParams.fGasType" placeholder="请选择燃气种类" clearable size="small">
          <el-option
            v-for="dict in fGasTypeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>

      <el-form-item label="申报状态" prop="fRepStatus">
        <el-select v-model="queryParams.fRepStatus" placeholder="请选择申报状态" clearable size="small">
          <el-option
            v-for="dict in repStatusOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>

     <!-- <el-form-item label="申报时间" prop="fRepDate">
        <el-input
          v-model="queryParams.fRepDate"
          placeholder="请输入申报时间"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>-->
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['specialist:info:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['specialist:info:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['specialist:info:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
		      :loading="exportLoading"
          @click="handleExport"
          v-hasPermi="['specialist:info:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="专家姓名" align="center" prop="fName" />
      <el-table-column label="人员编码" align="center" prop="fCode" :show-overflow-tooltip="true"/>
      <el-table-column label="身份证号" align="center" prop="fIdNo" :show-overflow-tooltip="true"/>
      <el-table-column label="性别" align="center" prop="fSex" :formatter="fSexFormat" />
      <el-table-column label="数据来源" align="center" prop="fSource" :formatter="fSourceFormat" />
      <el-table-column label="联系电话" align="center" prop="fPhone" width="120"/>
      <el-table-column label="燃气种类" align="center" prop="fGasType" :formatter="fGasTypeFormat" :show-overflow-tooltip="true"/>
      <el-table-column label="所在地区" align="center" prop="fArea" :show-overflow-tooltip="true"/>
      <el-table-column label="照片" align="center" prop="fPicture">
        <template slot-scope="scope">
          <el-image
            :src="scope.row.fPicture"
            :preview-src-list="[scope.row.fPicture]"
            v-if="scope.row.fPicture != '' && scope.row.fPicture != null"
            :z-index=5000 style="width: auto;height: auto;"
          ></el-image>
          <span v-else>-</span>
        </template>
      </el-table-column>
      <el-table-column label="是否省级专家" align="center" prop="fThisProvinceFlag">
        <template slot-scope="scope">
          <span v-if="scope.row.fThisProvinceFlag != '' && scope.row.fThisProvinceFlag != null">{{ fThisProvinceFlagFormat(scope.row) }}</span>
          <span v-else>-</span>
        </template>
      </el-table-column>
      <el-table-column label="是否有效" align="center" prop="fValidType">
        <template slot-scope="scope">
          <span v-if="scope.row.fValidType != null">{{ fValidTypeFormat(scope.row) }}</span>
          <span v-else>-</span>
        </template>
      </el-table-column>
      <el-table-column label="申报状态" align="center" prop="fRepStatus" :formatter="fRepStatusFormat"/>
      <el-table-column label="申报时间" align="center" prop="fRepDate" width="150">
        <template slot-scope="scope">
          <span v-if="scope.row.fRepDate != null">{{ scope.row.fRepDate }}</span>
          <span v-else>-</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-document"
            @click="handleDetail(scope.row)"
            v-hasPermi="['specialist:info:query']"
          >详情</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['specialist:info:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['specialist:info:remove']"
          >删除</el-button>
          <el-button
            size="mini"
            type="text"
            @click="handleReport(scope.row)"
            v-if="scope.row.fRepStatus == 2"
            v-hasPermi="['specialist:info:report']"
          >申报</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改行业专家库-专家申报对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body destroy-on-close :close-on-click-modal="false">
      <el-form ref="form" :model="form" :rules="rules" label-width="160px">
        <el-row class="el-row-table">
          <el-col :span="12">
            <el-form-item label="专家姓名" prop="fName">
              <el-input v-model="form.fName" placeholder="请输入专家姓名" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="身份证号" prop="fIdNo">
              <el-input :maxlength="18" v-model="form.fIdNo" placeholder="请输入身份证号" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="性别" prop="fSex">
              <el-select
                v-model="form.fSex"
                placeholder="请选择性别"
                style="width: 100%"
              >
                <el-option
                  v-for="dict in fSexOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="数据限定" prop="fDeptCode">
              <el-input v-model="form.fDeptCode" placeholder="请输入数据限定" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="数据来源" prop="fSource">
              <el-select
                v-model="form.fSource"
                placeholder="请选择数据来源"
                style="width: 100%"
              >
                <el-option
                  v-for="dict in fSourceOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="人员编码" prop="fCode">
              <el-input v-model="form.fCode" placeholder="请输入人员编码" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="出生日期" prop="fBirthday">
              <el-date-picker
                style="width: 100%"
                v-model="form.fBirthday"
                type="date"
                placeholder="选择出生日期">
              </el-date-picker>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="邮箱" prop="fEmail">
              <el-input v-model="form.fEmail" placeholder="请输入邮箱" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="联系电话" prop="fPhone">
              <el-input :maxlength="11" v-model="form.fPhone" placeholder="请输入联系电话" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="文化程度" prop="fEducation">
              <el-input v-model="form.fEducation" placeholder="请输入文化程度" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="毕业院校" prop="fGraduationSchool">
              <el-input v-model="form.fGraduationSchool" placeholder="请输入毕业院校" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="所属专业" prop="fMajor">
              <el-input v-model="form.fMajor" placeholder="请输入所属专业" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="毕业时间" prop="fGraduationTime">
              <el-input v-model="form.fGraduationTime" placeholder="请输入毕业时间" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="工作单位编码" prop="fEntUuid">
              <el-input v-model="form.fEntUuid" placeholder="请输入工作单位编码" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="工作单位名称" prop="fWorkUnit">
              <el-input v-model="form.fWorkUnit" placeholder="请输入工作单位名称" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="参加工作时间" prop="fWorkTime">
              <el-date-picker
                style="width: 100%"
                v-model="form.fWorkTime"
                type="date"
                placeholder="选择参加工作时间">
              </el-date-picker>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="所在部门" prop="fDepartment">
              <el-input v-model="form.fDepartment" placeholder="请输入所在部门" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="职务" prop="fDuties">
              <el-input v-model="form.fDuties" placeholder="请输入职务" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="专业技术职称" prop="fMajorTitle">
              <el-input v-model="form.fMajorTitle" placeholder="请输入专业技术职称" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="现从事专业" prop="fMajorNow">
              <el-input v-model="form.fMajorNow" placeholder="请输入现从事专业" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="从事专业工作年限" prop="fMajorLife">
              <el-input v-model="form.fMajorLife" placeholder="请输入从事专业工作年限" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="燃气种类" prop="fGasType">
              <el-select
                v-model="form.fGasType"
                placeholder="请选择燃气种类"
                multiple
                style="width: 100%"
              >
                <el-option
                  v-for="dict in fGasTypeOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                />
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="擅长工作领域" prop="fGoodArea">
              <el-input v-model="form.fGoodArea" placeholder="请输入擅长工作领域" />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="相关经历" prop="fLearningWorkExperience">
              <el-input v-model="form.fLearningWorkExperience" placeholder="请输入相关学习工作经历及工作业绩" />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="所在地区" prop="fArea">
              <el-input v-model="form.fArea" placeholder="请输入所在地区" />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="市局燃气主管部门意见" prop="fCRecord">
              <el-input type="textarea" v-model="form.fCRecord" placeholder="请输入市局燃气主管部门意见" />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="省级燃气主管部门意见" prop="fPRecord">
              <el-input type="textarea" v-model="form.fPRecord" placeholder="请输入省级燃气主管部门意见" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="是否省级专家" prop="fThisProvinceFlag">
              <el-select
                v-model="form.fThisProvinceFlag"
                placeholder="请选择是否省级专家"
                style="width: 100%"
              >
                <el-option
                  v-for="dict in fThisProvinceFlagOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="是否有效" prop="fValidType">
              <el-select
                v-model="form.fValidType"
                placeholder="请选择是否有效"
                style="width: 100%"
              >
                <el-option
                  v-for="dict in fValidTypeOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="parseInt(dict.dictValue)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="照片">
              <imageUpload v-model="form.fPicture"/>
            </el-form-item>
          </el-col>

        </el-row>

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 详情 -->
    <DetailInfo ref="detail"/>
  </div>
</template>

<script>
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor, reportProAppInfo } from "@/api/specialist/info";
import ImageUpload from '@/components/ImageUpload';
import DetailInfo from "./components/DetailInfo";
export default {
  name: "Infor",
  components: {
    ImageUpload,
    DetailInfo
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      // 选中数组
      ids: [],
      names: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 行业专家库-专家申报表格数据
      inforList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 数据来源-G政府：E企业字典
      fSourceOptions: [],
      // 性别：1-男性，2-女性字典
      fSexOptions: [],
      // 从事行业燃气种类
      fGasTypeOptions: [],
      // 是否省级专家 1 是，0 不是字典
      fThisProvinceFlagOptions: [],
      // 是否有效：0 有效，1 无效字典
      fValidTypeOptions: [],
      //1 已上报，2 未上报，3 已通过，4未通过
      repStatusOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        fDeptCode: null,
        fSource: null,
        fCode: null,
        fName: null,
        fIdNo: null,
        fSex: null,
        fBirthday: null,
        fEmail: null,
        fPhone: null,
        fEducation: null,
        fGraduationSchool: null,
        fMajor: null,
        fGraduationTime: null,
        fEntUuid: null,
        fWorkUnit: null,
        fWorkTime: null,
        fDepartment: null,
        fDuties: null,
        fMajorTitle: null,
        fMajorNow: null,
        fMajorLife: null,
        fGasType: null,
        fGoodArea: null,
        fLearningWorkExperience: null,
        fArea: null,
        fDeleteFlag: null,
        fCRecord: null,
        fPRecord: null,
        fPicture: null,
        fUpdateTime: null,
        fThisProvinceFlag: null,
        fValidType: null,
        fRepStatus: null,
        fRepDate: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        fDeptCode: [
          { required: true, message: "数据限定不能为空", trigger: "blur" }
        ],
        fSource: [
          { required: true, message: "数据来源不能为空", trigger: "change" }
        ],
        fCode: [
          { required: true, message: "人员编码不能为空", trigger: "blur" }
        ],
        fName: [
          { required: true, message: "专家姓名不能为空", trigger: "blur" }
        ],
        fIdNo: [
          { required: true, message: "身份证号不能为空", trigger: "blur" },
          {
            pattern: /(^\d{15}$)|(^\d{17}([0-9]|X)$)/,
            message: '身份证号格式有误！',
            trigger: 'blur'
          }
        ],
        fPhone: [
          { required: true, message: "联系电话不能为空", trigger: "blur" },
          {
            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
            message: '手机号格式有误！',
            trigger: 'blur'
          }
        ],
        fEmail: [
          {
            pattern: /^[\w\.-]+@[a-zA-Z\d\.-]+\.[a-zA-Z]{2,}$/,
            message: '邮箱格式有误！',
            trigger: 'blur'
          }
        ],
        fMajor: [
          { required: true, message: "所属专业不能为空", trigger: "blur" }
        ],
        fMajorTitle: [
          { required: true, message: "专业技术职称不能为空", trigger: "blur" }
        ],
        fMajorNow: [
          { required: true, message: "现从事专业不能为空", trigger: "blur" }
        ],
        fMajorLife: [
          { required: true, message: "从事专业工作年限不能为空", trigger: "blur" }
        ],
        fGasType: [
          { required: true, message: "请选择燃气种类", trigger: "change" }
        ],
        fGoodArea: [
          { required: true, message: "擅长工作领域不能为空", trigger: "blur" }
        ],
        fArea: [
          { required: true, message: "所在地区不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
    this.getDicts("t_special_data_source").then(response => {
      this.fSourceOptions = response.data;
    });
    this.getDicts("t_sex").then(response => {
      this.fSexOptions = response.data;
    });
    this.getDicts("t_gas_type").then(response => {
      this.fGasTypeOptions = response.data;
    });
    this.getDicts("t_province_mark").then(response => {
      this.fThisProvinceFlagOptions = response.data;
    });
    this.getDicts("t_valid_type").then(response => {
      this.fValidTypeOptions = response.data;
    });
    this.getDicts("t_rep_status").then(response => {
        this.repStatusOptions = response.data;
    });
  },
  methods: {
    /** 查询行业专家库-专家申报列表 */
    getList() {
      this.loading = true;
      listInfor(this.queryParams).then(response => {
        this.inforList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 数据来源-G政府：E企业字典翻译
    fSourceFormat(row, column) {
      return this.selectDictLabel(this.fSourceOptions, row.fSource);
    },
    // 性别：1-男性，2-女性字典翻译
    fSexFormat(row, column) {
      return this.selectDictLabel(this.fSexOptions, row.fSex);
    },
    // 从事行业燃气种类
    fGasTypeFormat(row, column) {
      return this.selectDictLabels(this.fGasTypeOptions, row.fGasType);
    },
    // 是否省级专家 1 是，0 不是字典翻译
    fThisProvinceFlagFormat(row, column) {
      return this.selectDictLabel(this.fThisProvinceFlagOptions, row.fThisProvinceFlag);
    },
    // 是否有效：0 有效，1 无效字典翻译
    fValidTypeFormat(row, column) {
      return this.selectDictLabel(this.fValidTypeOptions, row.fValidType);
    },
    fRepStatusFormat(row, column) {
      return this.selectDictLabel(this.repStatusOptions, row.fRepStatus);
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        fProAppInforId: null,
        fDeptCode: null,
        fSource: null,
        fCode: null,
        fName: null,
        fIdNo: null,
        fSex: null,
        fBirthday: null,
        fEmail: null,
        fPhone: null,
        fEducation: null,
        fGraduationSchool: null,
        fMajor: null,
        fGraduationTime: null,
        fEntUuid: null,
        fWorkUnit: null,
        fWorkTime: null,
        fDepartment: null,
        fDuties: null,
        fMajorTitle: null,
        fMajorNow: null,
        fMajorLife: null,
        fGasType: [],
        fGoodArea: null,
        fLearningWorkExperience: null,
        fArea: null,
        fDeleteFlag: null,
        fCRecord: null,
        fPRecord: null,
        fPicture: null,
        fUpdateTime: null,
        fThisProvinceFlag: null,
        fValidType: null,
        fRepStatus: null,
        fRepDate: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.fProAppInforId);
      this.names = selection.map(item => item.fName);
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加专家申报";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const fProAppInforId = row.fProAppInforId || this.ids
      getInfor(fProAppInforId).then(response => {
        this.form = response.data;
        this.form.fGasType = this.form.fGasType.split(",");
        this.open = true;
        this.title = "修改专家申报";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.form.fGasType = this.form.fGasType.join(",");
          if (this.form.fProAppInforId != null) {
            updateInfor(this.form).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addInfor(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const fProAppInforIds = row.fProAppInforId || this.ids;
      const names = row.fName || this.names;
      this.$confirm('是否确认删除专家申报姓名为"' + names + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return delInfor(fProAppInforIds);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有专家申报数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.exportLoading = true;
          return exportInfor(queryParams);
        }).then(response => {
          this.download(response.msg);
          this.exportLoading = false;
        }).catch(() => {});
    },
    //详情
    handleDetail(row){
      this.$refs.detail.getDetailInfo(row.fProAppInforId);
    },
    //申报
    handleReport(row){
      this.$confirm('是否确认申报行业专家姓名为"'+ row.fName +'"的数据?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function() {
        return reportProAppInfo({ fProAppInforId : row.fProAppInforId});
      }).then(() => {
          this.getList();
          this.msgSuccess("行业专家申报成功");
      }).catch(() => {});

    }
  }
};
</script>
