index.vue 24.9 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
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
      <el-form-item label="单位名称" prop="contractorName">
        <el-input
          v-model="queryParams.contractorName"
          placeholder="请输入承包商单位名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="承包商评定" prop="contractorEvaluate">
        <el-select v-model="queryParams.contractorEvaluate" placeholder="请选择承包商评定" clearable size="small">
          <el-option
            v-for="dict in evaluateOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="承包商状态" prop="status">
        <el-select v-model="queryParams.status" placeholder="请选择承包商状态" clearable size="small">
          <el-option
            v-for="dict in statusOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          ></el-option>
        </el-select>
      </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>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="contractorInfoList">
      <el-table-column label="单位名称" align="center" prop="contractorName" />
王晓倩's avatar
王晓倩 committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
      <el-table-column label="主要负责人" align="center" prop="keyPerson" >
        <template slot-scope="scope">
          <span v-if="scope.row.keyPerson != null && scope.row.keyPerson != ''">{{scope.row.keyPerson}}</span>
          <span v-else>
            -
          </span>
        </template>
      </el-table-column>
      <el-table-column label="主要负责人手机" align="center" prop="keyPersonPhone" >
        <template slot-scope="scope">
          <span v-if="scope.row.keyPersonPhone != null && scope.row.keyPersonPhone != ''">{{scope.row.keyPersonPhone}}</span>
          <span v-else>
            -
          </span>
        </template>
      </el-table-column>
耿迪迪's avatar
耿迪迪 committed
70 71 72
      <el-table-column label="单位资质" align="center" prop="certificateUrl" style="text-align:center;">
        <template slot-scope="scope">
          <span v-if="scope.row.certificateUrl != null && scope.row.certificateUrl != ''">
王晓倩's avatar
王晓倩 committed
73 74
            <img :src="scope.row.certificateUrl" style="width: 20%;vertical-align:middle;cursor:pointer;" @click="showPicture(scope.row)"/>
            <el-image :ref="'a'+scope.row.id" :src="scope.row.certificateUrl" v-show="false" :preview-src-list="[scope.row.certificateUrl]" v-if="scope.row.certificateUrl != '' && scope.row.certificateUrl != null"></el-image>
耿迪迪's avatar
耿迪迪 committed
75 76 77 78 79 80 81 82 83 84
          </span>
          <span v-else>
            -
          </span>
        </template>
      </el-table-column>
      <el-table-column label="承包商评定" align="center" prop="contractorEvaluate" :formatter="evaluateFormat" />
      <el-table-column label="承包商状态" align="center" prop="status" :formatter="statusFormat" />
      <el-table-column label="操作" align="center" width="300">
        <template slot-scope="scope">
85 86 87 88 89 90
          <el-button
            size="mini"
            type="text"
            icon="el-icon-document-copy"
            @click="detailInfo(scope.row)"
          >详情</el-button>
耿迪迪's avatar
耿迪迪 committed
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 141 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
          <el-button
            v-if="scope.row.status == '0'"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
          >修改</el-button>
          <el-button
            v-if="scope.row.status == '0'"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleApproval(scope.row)"
          >审核</el-button>
          <el-button
            v-if="scope.row.status != '2'"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleBlacklist(scope.row)"
          >加入黑名单</el-button>
          <el-button
            v-if="scope.row.status == '2'"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleBlacklist(scope.row)"
          >移出黑名单</el-button>
          <el-button
            v-if="scope.row.status == '0'"
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >删除</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="800px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-row>
          <el-col :span="23">
            <el-form-item label="单位名称" prop="contractorName">
              <el-input v-model="form.contractorName" placeholder="请输入承包商单位名称" :disabled="readOnly" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="法定代表人" prop="legalPerson">
              <el-input v-model="form.legalPerson" placeholder="请输入法定代表人" :disabled="readOnly" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="法定代表人手机" prop="legalPersonPhone">
              <el-input v-model="form.legalPersonPhone" placeholder="请输入法定代表人手机" :disabled="readOnly" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="主要负责人" prop="keyPerson">
              <el-input v-model="form.keyPerson" placeholder="请输入主要负责人" :disabled="readOnly" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="主要负责人手机" prop="keyPersonPhone">
              <el-input v-model="form.keyPersonPhone" placeholder="请输入主要负责人手机" :disabled="readOnly" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="安全负责人" prop="safetyPerson">
              <el-input v-model="form.safetyPerson" placeholder="请输入安全负责人" :disabled="readOnly" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="安全负责人手机" prop="safetyPersonPhone">
              <el-input v-model="form.safetyPersonPhone" placeholder="请输入安全负责人手机" :disabled="readOnly" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="单位资质名称" prop="certificateName">
              <el-input v-model="form.certificateName" placeholder="请输入单位资质证照名称" :disabled="readOnly" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="单位资质证照" v-if="!readOnly" prop="certificateUrl">
              <MyFileUpload
                listType="picture-card"
                @resFun="getFileInfo"
                @remove="listRemove"
                :fileArr="fileList"
              />
              <el-input v-show="false" disabled v-model="form.certificateUrl"></el-input>
            </el-form-item>
            <el-form-item label="单位资质证照" v-if="readOnly" prop="certificateUrl">
              <img :src="form.certificateUrl" style="width: 20%;vertical-align:middle;cursor:pointer;" @click="showPicture(form)"/>
              <el-image :zIndex="9999" :ref="'a'+form.id" :src="form.certificateUrl" v-show="false" :preview-src-list="[form.certificateUrl]" v-if="form.certificateUrl != '' && form.certificateUrl != null"></el-image>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="团队信息记录" prop="teamInformation">
              <el-input type="textarea" v-model="form.teamInformation" placeholder="请输入团队信息记录" :disabled="readOnly" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="违章记录" prop="violationRecords">
              <el-input v-model="form.violationRecords" type="textarea" placeholder="请输入违章记录" :disabled="readOnly" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="承包商评定" prop="contractorEvaluate">
              <el-radio-group v-model="form.contractorEvaluate" :disabled="readOnly">
                <el-radio label="1"></el-radio>
                <el-radio label="2"></el-radio>
                <el-radio label="3"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item v-show="operate" label="审核" prop="status">
              <el-radio v-model="form.status" label="1">通过</el-radio>
              <el-radio v-model="form.status" label="0">驳回</el-radio>
            </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>
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 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

    <!-- 详情承包商信息对话框 -->
    <el-dialog title="信息详情" :visible.sync="openDetail" width="800px" append-to-body>
      <el-form label-width="120px">
        <el-row>
          <el-col :span="23">
            <el-form-item label="单位名称:" prop="contractorName">
              <span>{{ form.contractorName }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="法定代表人:" prop="legalPerson">
              <span>{{ form.legalPerson }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="法定代表人手机:" prop="legalPersonPhone">
              <span>{{ form.legalPerson }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="主要负责人:" prop="keyPerson">
              <span>{{ form.keyPerson }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="主要负责人手机:" prop="keyPersonPhone">
              <span>{{ form.keyPersonPhone }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="安全负责人:" prop="safetyPerson">
              <span>{{ form.safetyPerson }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="安全负责人手机:" prop="safetyPersonPhone">
              <span>{{ form.safetyPersonPhone }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="单位资质名称:" prop="certificateName">
              <span>{{ form.certificateName }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="单位资质证照" prop="certificateUrl">
              <img :src="form.certificateUrl" style="width: 20%;vertical-align:middle;cursor:pointer;" @click="showPicture(form)"/>
              <el-image :zIndex="9999" :ref="'a'+form.id" :src="form.certificateUrl" v-show="false" :preview-src-list="[form.certificateUrl]" v-if="form.certificateUrl != '' && form.certificateUrl != null"></el-image>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="团队信息记录" prop="teamInformation">
              <span>{{ form.teamInformation }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="违章记录" prop="violationRecords">
              <el-table class="breakTable" v-loading="loading" :data="breakRulesPersonRecords" height="250px">
                <el-table-column label="承包商" align="center" prop="contractId" :formatter="contractorFormate" width="180"/>
                <el-table-column label="人员姓名" align="center" prop="breakRulesPersonName" />
                <el-table-column label="违规时间" align="center" prop="breakTime" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.breakTime, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="违规照片" align="center" prop="breakPicUrl" >
                  <template slot-scope="scope">
                    <el-image style="height: 30px;width: 30px" size="small" :preview-src-list="[scope.row.breakPicUrl]" :src="scope.row.breakPicUrl" ></el-image>
                  </template>
                </el-table-column>
                <el-table-column label="违规说明" align="center" prop="breakDescription"  min-width="100" :show-overflow-tooltip="true"/>
                <el-table-column label="电子签名" align="center" prop="signature" >
                  <template slot-scope="scope">
                    <el-image style="height: 30px;width: 30px" size="small" :preview-src-list="[scope.row.signature]" :src="scope.row.signature" ></el-image>
                  </template>
                </el-table-column>
                <el-table-column label="上报人" align="center" prop="reportPerson" :formatter="reportPersonFormate"/>
                <el-table-column label="上报时间" align="center" prop="reportTime" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
                  </template>
                </el-table-column>
              </el-table>
              <pagination
                v-show="total>0"
                :total="total"
                :page.sync="pageNum"
                :limit.sync="pageSize"
                @pagination="breakPersonRecords"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="23">
            <el-form-item label="承包商评定" prop="contractorEvaluate">
              <el-radio-group v-model="form.contractorEvaluate" disabled>
                <el-radio label="1"></el-radio>
                <el-radio label="2"></el-radio>
                <el-radio label="3"></el-radio>
              </el-radio-group>
            </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="openDetail = false"> </el-button>
      </div>
    </el-dialog>
耿迪迪's avatar
耿迪迪 committed
372 373 374 375 376
  </div>
</template>

<script>
import MyFileUpload from '@/components/MyFileUpload';
377 378 379
import { listContractorInfo, getContractorInfo, delContractorInfo, addContractorInfo, updateContractorInfo, exportContractorInfo,listAll } from "@/api/contractor/contractorInfo";
import { listRecord } from "@/api/contractor/breakRulesPersonRecord";
import { getAllUserName } from "@/api/system/user"
耿迪迪's avatar
耿迪迪 committed
380 381 382 383 384 385 386 387 388 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

export default {
  name: "ContractorInfo",
  components: {
    MyFileUpload
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 承包商信息表格数据
      contractorInfoList: [],
      evaluateOptions: [],
      statusOptions: [],
      // 文件列表
      fileList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      operate: false,
      readOnly: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        contractorName: null,
        certificateName: null,
        certificateUrl: null,
        teamInformation: null,
        contractorEvaluate: null,
        violationRecords: null,
        legalPerson: null,
        legalPersonPhone: null,
        keyPerson: null,
        keyPersonPhone: null,
        safetyPerson: null,
        safetyPersonPhone: null,
        status: null,
        isDel: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        contractorName: [
          { required: true, message: "请输入单位名称", trigger: "blur" }
        ],
440 441 442 443 444 445 446 447 448 449 450
      },
      openDetail:false,
      breakRulesPersonRecords: [],
      //承包商信息
      contractorInfos:[],
      userInfo:[],
      // 总条数
      total: 0,
      pageNum: 1,
      pageSize: 10,
      contractId:""
耿迪迪's avatar
耿迪迪 committed
451 452 453 454 455 456 457 458 459 460
    };
  },
  created() {
    this.getList();
    this.getDicts("t_contractor_evaluate").then(response => {
      this.evaluateOptions = response.data;
    });
    this.getDicts("t_contractor_status").then(response => {
      this.statusOptions = response.data;
    });
461 462
    this.contractorInfo();
    this.userInfos();
耿迪迪's avatar
耿迪迪 committed
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
  },
  methods: {
    // 承包商评定
    evaluateFormat(row, column) {
      return this.selectDictLabel(this.evaluateOptions, row.contractorEvaluate);
    },
    // 承包商状态
    statusFormat(row, column) {
      return this.selectDictLabel(this.statusOptions, row.status);
    },
    /** 查询承包商信息列表 */
    getList() {
      this.loading = true;
      listContractorInfo(this.queryParams).then(response => {
        this.contractorInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
      this.fileList = [];
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        contractorName: null,
        certificateName: null,
        certificateUrl: null,
        teamInformation: null,
        contractorEvaluate: null,
        violationRecords: null,
        legalPerson: null,
        legalPersonPhone: null,
        keyPerson: null,
        keyPersonPhone: null,
        safetyPerson: null,
        safetyPersonPhone: null,
        status: null,
        isDel: null,
        createTime: null,
        updateTime: null
      };
      this.resetForm("form");
      this.fileList = [];
lizhichao's avatar
lizhichao committed
511
      this.operate = false;
耿迪迪's avatar
耿迪迪 committed
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 537 538 539 540 541 542 543 544 545
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.readOnly=false;
      this.reset();
      this.open = true;
      this.title = "添加承包商信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.readOnly=false;
      this.reset();
      const id = row.id || this.ids
      getContractorInfo(id).then(response => {
        this.form = response.data;
        if (this.form.certificateUrl) {
          this.fileList.push({
            url: this.form.certificateUrl,
          });
        }
        this.open = true;
        this.title = "修改承包商信息";
      });
    },
546 547 548 549 550 551 552 553 554 555 556 557 558 559
    detailInfo(row){
      const id = row.id || this.ids
      getContractorInfo(id).then(response => {
        this.form = response.data;
        if (this.form.certificateUrl) {
          this.fileList.push({
            url: this.form.certificateUrl,
          });
        }
        this.openDetail = true;
        this.contractId = id;
        this.breakPersonRecords();
      });
    },
耿迪迪's avatar
耿迪迪 committed
560 561 562 563 564 565 566 567 568
    /** 审核按钮操作 */
    handleApproval(row) {
      this.readOnly = true;
      this.reset();
      getContractorInfo(row.id).then(response => {
        this.form = response.data;
        this.form.status = '1';
        this.operate = true;
        this.open = true;
lizhichao's avatar
lizhichao committed
569
        this.title = "审批承包商信用信息";
耿迪迪's avatar
耿迪迪 committed
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 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
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            if(this.operate){
              updateContractorInfo(this.form).then(response => {
                this.msgSuccess("审核成功");
                this.open = false;
                this.operate = false;
                this.readOnly = false;
                this.getList();
              });
            } else {
              updateContractorInfo(this.form).then(response => {
                this.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              });
            }
          } else {
            addContractorInfo(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 加入黑名单按钮操作 */
    handleBlacklist(row) {
      // const ids = row.id || this.ids;
      var confirm = '';
      if(row.status != '2'){
        confirm = '是否确认将"' + row.contractorName + '"加入黑名单?';
      } else {
        confirm = '是否确认将"' + row.contractorName + '"移出黑名单?';
      }
      this.$confirm(confirm, "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
        if(row.status != '2'){
          row.status = '2';
        } else {
          row.status = '0';
        }
          return updateContractorInfo(row);
        }).then(() => {
          this.getList();
          this.msgSuccess("操作成功");
        }).catch(() => {});
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      // const ids = row.id || this.ids;
      this.$confirm('是否确认删除"' + row.certificateName + '"的承包商信息?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          row.isDel = "1";
          return updateContractorInfo(row);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(() => {});
    },
    getFileInfo(res){
      this.form.certificateUrl = res.url;
      //this.$set(this.feedBookForm,'iconUrl',res.url)
    },
    listRemove(e) {
      this.form.certificateUrl = "";
      this.fileList = [];
    },
    showPicture(row){
      this.$refs['a'+row.id].showViewer = true;
      console.log("===",row.id);
    },
654 655 656 657 658 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
    breakPersonRecords(){
      listRecord({contractId : this.contractId,pageNum:this.pageNum,pageSize:this.pageSize}).then(res =>{
        if(res.code == 200){
          this.breakRulesPersonRecords = res.rows;
          this.total = res.total;
        }
      })
    },
    //承包商信息
    contractorInfo(){
      listAll().then(res =>{
          if(res.code == 200){
          this.contractorInfos = res.data;
        }
      })
    },
    //承包商名称
    contractorFormate(row){
      const contrator = this.contractorInfos.find(contractor => contractor.id == row.contractId);
      return contrator?contrator.contractorName:"";
    },
    userInfos(){
        getAllUserName().then(res =>{
          if(res.code == 200){
          this.userInfo = res.data;
        }
      })
    },
    //上报人信息
    reportPersonFormate(row){
      const user = this.userInfo.find(user =>user.userId == row.reportPerson);
      return user?user.nickName:"";
    },
耿迪迪's avatar
耿迪迪 committed
687 688 689
  }
};
</script>
690 691 692 693 694 695 696 697 698 699 700 701
<style lang="scss">
  // 滚动条的宽度
  .breakTable .el-table__body-wrapper::-webkit-scrollbar {
    width: 8px; // 横向滚动条
    height: 8px; // 纵向滚动条 必写
  }
  // 滚动条的滑块
  .breakTable .el-table__body-wrapper::-webkit-scrollbar-thumb {
     background-color: #ddd;
     border-radius: 3px;
   }
</style>