index.vue 28.3 KB
Newer Older
耿迪迪's avatar
耿迪迪 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
<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"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
		      :loading="exportLoading"
141
          @click="handleExport"
耿迪迪's avatar
耿迪迪 committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
        >导出</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)"
          >详情</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >删除</el-button>
          <el-button
            size="mini"
            type="text"
            @click="handleReport(scope.row)"
            v-if="scope.row.fRepStatus == 2"
          >申报</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>

xulihui's avatar
xulihui committed
258
<!--          <el-col :span="12">
耿迪迪's avatar
耿迪迪 committed
259 260 261
            <el-form-item label="数据限定" prop="fDeptCode">
              <el-input v-model="form.fDeptCode" placeholder="请输入数据限定" />
            </el-form-item>
xulihui's avatar
xulihui committed
262
          </el-col>-->
耿迪迪's avatar
耿迪迪 committed
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382

          <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">
xulihui's avatar
xulihui committed
383
              <el-input-number
384 385 386
                  :style="{width: '320px'}"
                  controls-position="right"
                  :min="0"
xulihui's avatar
xulihui committed
387
                  v-model="form.fMajorLife"
388
                  placeholder="请输入从事专业工作年限" />
耿迪迪's avatar
耿迪迪 committed
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536
            </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: [],
537
      //1 已上报,2 未上报
耿迪迪's avatar
耿迪迪 committed
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
      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: {
xulihui's avatar
xulihui committed
582
        /*fDeptCode: [
耿迪迪's avatar
耿迪迪 committed
583
          { required: true, message: "数据限定不能为空", trigger: "blur" }
xulihui's avatar
xulihui committed
584
        ],*/
耿迪迪's avatar
耿迪迪 committed
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657
        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;
    });
658
    this.getDicts("t_expert_rep_status").then(response => {
耿迪迪's avatar
耿迪迪 committed
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699
        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();
    },
700
    filterNum(value){
xulihui's avatar
xulihui committed
701
      this.form.fMajorLife = Math.abs(this.value)    //去除中文输入下的负号和 this.value是字符时00开头等乱输
702
    },
耿迪迪's avatar
耿迪迪 committed
703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849
    // 表单重置
    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>
850 851 852 853 854 855

<style>

.el-input-number .el-input__inner{
  text-align: left;
}
xulihui's avatar
xulihui committed
856
</style>