index.vue 46.9 KB
Newer Older
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 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 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 372 373 374 375 376 377 378 379 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 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 537 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 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 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 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 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 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="任务标题" prop="workTitle">
        <el-input
          v-model="queryParams.workTitle"
          placeholder="请输入任务标题"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="任务类型" prop="workType">
        <el-select v-model="queryParams.workType" placeholder="请选择任务类型" clearable size="small">
          <el-option label="入户安检" value="1" />
          <el-option label="巡检" value="2" />
          <!--<el-option label="报警巡查" value="3" />-->
          <!--<el-option label="其他" value="4" />-->
        </el-select>
      </el-form-item>
      <el-form-item label="任务状态" prop="workStatus">
        <el-select v-model="queryParams.workStatus" placeholder="请选择任务状态" clearable size="small">
          <el-option label="派发中" value="0" />
          <el-option label="已接单" value="1" />
          <el-option label="已反馈" value="2" />
          <el-option label="已归档" value="3" />
        </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"
          v-if="roleType != 'inpector'"
        >新增</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-if="roleType != 'inpector'"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
      <!--<el-table-column type="selection" width="55" align="center" />-->
      <el-table-column label="任务标题" align="center" prop="workTitle">
        <template slot-scope="scope">
          <span style="margin-left: 10px;display: inline-block">{{ scope.row.workTitle }}</span>
          <el-popover
            placement="right"
            title="督办信息"
            width="350"
            trigger="click"
            v-if="null!=scope.row.supervisorInfoList">
            <div class="timeline">
              <el-timeline>
                <el-timeline-item
                  v-for="(activity, index) in scope.row.supervisorInfoList"
                  :key="index"
                  :timestamp="activity.createTime">
                  {{activity.supervisorContent}}
                </el-timeline-item>
              </el-timeline>
            </div>
            <!--<el-button slot="reference">click 激活</el-button>-->
            <div style="display:inline-block;position:relative" slot="reference">
              <img src="@/assets/image/start.svg" style="position:absolute;top:-15px;left:0;width: 20px;height: 20px"/>
            </div>
          </el-popover>
        </template>
      </el-table-column>
      <el-table-column label="任务类型" align="center" prop="workType">
        <template slot-scope="scope">
          <span v-if="scope.row.workType == 1">入户安检</span>
          <span v-if="scope.row.workType == 2">巡检</span>
         <!-- <span v-if="scope.row.workType == 3">报警巡查</span>-->
          <!--<span v-if="scope.row.workType == 4">其他</span>-->
        </template>
      </el-table-column>
     <!-- <el-table-column label="任务内容" align="center" prop="workContent" />-->
      <el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
      <el-table-column label="创建单位" align="center" prop="workCreateEnterpriseName" />
      <el-table-column label="执行单位" align="center" prop="workAssignEnterproseName" />
      <el-table-column label="执行人" align="center" prop="workAssignMan" />
      <el-table-column label="任务状态" align="center" prop="workStatus">
        <template slot-scope="scope">
          <span v-if="scope.row.workStatus == 0" style="color: #ff7272">派发中</span>
          <span v-if="scope.row.workStatus == 1" style="color: #ffba00">已接单</span>
          <span v-if="scope.row.workStatus == 2" style="color: #1890ff">已反馈</span>
          <span v-if="scope.row.workStatus == 3" style="color: #30B46B">已归档</span>
        </template>
      </el-table-column>>
      <!--<el-table-column label="巡检时间" align="center" prop="inspectionDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="巡检路线" align="center" prop="inspectionRoute" />-->
      <!--<el-table-column label="问题描述" align="center" prop="problemDescription" />
      <el-table-column label="问题图片" align="center" prop="pictureUrl" style="text-align:center;">
        <template slot-scope="scope">
          <img :src="scope.row.iconUrl" style="width: 20%;vertical-align:middle;cursor:pointer;" @click="showPicture(scope.row)"/>
          <el-image :ref="'a'+scope.row.workId" :src="scope.row.iconUrl" v-show="false" :preview-src-list="[scope.row.iconUrl]" v-if="scope.row.iconUrl != '' && scope.row.iconUrl != null"></el-image>
        </template>
      </el-table-column>-->
      <!--<el-table-column label="图片路径" align="center" prop="iconUrl" />-->
     <!-- <el-table-column label="整改方案" align="center" prop="rectificationPlan" />
      <el-table-column label="整改结果" align="center" prop="rectificationResult" />-->
      <!--<el-table-column label="责任单位" align="center" prop="responsibleUnit" />
      <el-table-column label="责任人员" align="center" prop="responsiblePerson" />-->
      <el-table-column label="截止日期" align="center" prop="expiryDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="150%">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="workDetail(scope.row)"
            key="detail"
          >详情</el-button>
          <el-button v-if="('zhengfu'== roleType || (('enterprise'== roleType ||  'doubleRole' == roleType) && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId))&& scope.row.workStatus == '0'" key="edit"
            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)"
            v-if="('zhengfu'== roleType || (('enterprise'== roleType ||  'doubleRole' == roleType) && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId))&& scope.row.workStatus == '0'"
            key="detele"
          >删除</el-button>
          <el-button v-if="'inpector'!= roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null) && scope.row.workStatus == '0' && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId"
                     size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="workIssue(scope.row)"
                     key="work"
          >任务下发</el-button>
          <el-button v-if=" ('inpector'== roleType || 'doubleRole' == roleType) && (scope.row.workAssignManId == $store.state.user.userId) && scope.row.workStatus == '0'"
                     size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="takingOrder(scope.row)"
                     key="recieve"
          >接单</el-button>
          <el-button v-if="'zhengfu'!= roleType && (scope.row.workStatus == '0' || scope.row.workStatus == '1')"
                     size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="feedbookWork(scope.row)"
                     key="feedbook"
          >反馈</el-button>
          <el-button v-if="scope.row.workStatus == '2' && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId"
                     size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="sortWork(scope.row)"
                     key="sort"
          >归档</el-button>
          <el-button v-if="'zhengfu'!= roleType && scope.row.workStatus != '3'"
                     size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="hiddenFeed(scope.row)"
                     key="hidden"
          >隐患反馈</el-button>
          <el-button v-if="'zhengfu'== roleType && scope.row.workStatus != '2' && scope.row.workStatus != '3' && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId"
                     size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="supervisor(scope.row)"
                     key="supervisor"
          >督办</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" @closed="dialogClose" @open="dialogOpen" :close-on-click-modal="false">
    <el-form ref="form" :model="form" :rules="rules" label-width="120px">
      <el-row>
        <el-col :span="11">
          <el-form-item label="任务标题" prop="workTitle">
            <el-input v-model="form.workTitle" placeholder="请输入任务标题" :disabled="isDetail"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="任务类型" prop="workType">
            <el-select v-model="form.workType" placeholder="请选择任务类型" style="width: 100%" :disabled="isDetail">
              <el-option label="入户安检" value="1" />
              <el-option label="巡检" value="2" />
              <!--<el-option label="报警巡查" value="3" />-->
              <!--<el-option label="其他" value="4" />-->
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="23">
          <el-form-item label="任务内容" prop="workContent">
              <!--<editor v-model="form.workContent" :min-height="192" :readOnly="!s"/>-->
            <editor v-if="isOpen" v-model="form.workContent" :min-height="192" :readOnly="isDetail"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="11">
          <el-form-item label="执行单位" prop="workAssignEnterproseId">
            <!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入执行单位名称" />-->
            <el-select v-model="form.workAssignEnterproseId" placeholder="请选择执行单位名称" style="width: 100%" @change="selectworkAssignEnterprose($event)" :disabled="isDetail || isEnterproser">
              <el-option
                v-for="item in enterprises"
                :key="item.enterpriseId"
                :label="item.enterpriseName"
                :value="item.enterpriseId"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="执行人" prop="workAssignMan">
            <!--<el-input v-model="form.workAssignManId" placeholder="请输入执行人" />-->
            <el-select v-model="form.workAssignManId" placeholder="请输入执行人" style="width: 100%" @change="selectInspection($event,'edit')" :disabled="isDetail" clearable>
              <el-option
                v-for="item in inspectors"
                :key="item.userId "
                :label="item.nickName"
                :value="item.userId "
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="11" v-show="isDetail">
          <el-form-item label="创建单位" prop="workCreateEnterpriseName">
            <el-input v-model="form.workCreateEnterpriseName" placeholder="请输入创建单位名称" :disabled="isDetail"/>
          </el-form-item>
        </el-col>
        <!--<el-col :span="12">-->
          <!--<el-form-item label="巡检时间" prop="inspectionDate" v-show="form.workType=='2'">-->
            <!--<el-date-picker clearable size="small"-->
                            <!--v-model="form.inspectionDate"-->
                            <!--type="date"-->
                            <!--value-format="yyyy-MM-dd HH:mm:ss"-->
                            <!--placeholder="选择巡检时间" style="width: 100%" :disabled="isDetail">-->
            <!--</el-date-picker>-->
          <!--</el-form-item>-->
        <!--</el-col>-->
      </el-row>
      <el-row v-if="isDetail   && form.workStatus >1">
        <el-col :span="23">
          <el-form-item label="巡线范围" prop="inspectionRoute">
            <el-input v-model="form.inspectionRoute" type="textarea" placeholder="请输入巡检路线" :disabled="isDetail" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row v-if="isDetail   && form.workStatus >1">
        <el-col :span="23">
          <el-form-item label="处理结果" prop="problemDescription" >
            <el-input v-model="form.problemDescription" type="textarea" placeholder="请输入问题描述" :disabled="isDetail"/>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="23">
          <el-form-item label="反馈图片" prop="iconUrl" v-show="isDetail && (form.workStatus =='2' || form.workStatus =='3') && form.iconUrl !='' && form.iconUrl != null">
            <!--<MyFileUpload
              listType="picture-card"
              @resFun="getFileInfo"
              @remove="listRemove"
              :fileArr="fileList"
              :readOnly= "isDetail"
            />
            <el-input v-show="false" disabled v-model="form.iconUrl"></el-input>-->
            <div style="width: 20%;" v-for="item in imageArr">
              <el-image :src="item" :preview-src-list="[item]" style="width: auto;height: auto;" :z-index= "3000"></el-image>
            </div>

          </el-form-item>
        </el-col>
      </el-row>
      <el-row  v-if="isDetail  && form.workStatus >1" >
        <el-col :span="23" >
          <el-form-item label="整改方案" prop="rectificationPlan" v-show="form.workType=='1' ">
            <el-input v-model="form.rectificationPlan" type="textarea" placeholder="请输入整改方案" :disabled="isDetail"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row v-if="isDetail   && form.workStatus >1" >
        <el-col :span="23" >
         <el-form-item label="整改结果" prop="rectificationResult" v-show="form.workType =='1'">
           <el-input v-model="form.rectificationResult" type="textarea" placeholder="请输入整改结果" :disabled="isDetail"/>
         </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="11">
          <el-form-item label="责任单位" prop="responsibleUnit">
            <el-input v-model="form.responsibleUnit" placeholder="请输入责任单位" :disabled="isDetail"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="责任人员" prop="responsiblePerson">
            <el-input v-model="form.responsiblePerson" placeholder="请输入责任人员" :disabled="isDetail"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="截止日期" prop="expiryDate">
            <el-date-picker clearable size="small"
                            v-model="form.expiryDate"
                            type="datetime"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            placeholder="选择截止日期" style="width: 100%" :disabled="isDetail">
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>

    </el-form>
    <div v-if="supervisorList.length > 0 && isDetail">
      <div class="hiddenInfo">督办信息</div>
      <el-timeline ref="timeline">
        <el-timeline-item
          v-for="(activity, index) in supervisorList"
          :key="index"
          :timestamp="activity.createTime"
          v-show='index>1?false:true'>
          <el-card>
            {{activity.supervisorContent}}
          </el-card>
        </el-timeline-item>
      </el-timeline>
      <div style="width: 95%;position: relative;" @click="changeDisplay()" v-if="supervisorList.length >2">
        <!-- <el-button type="primary"> -->
        <i class="el-icon-arrow-down" v-if="isDisplay==false"
           style="margin-left: 100px;color: #909399;font-size: 14px;">
          <span style="text-decoration:underline">显示全部</span>
        </i>
        <i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;">
          <span style="text-decoration:underline">收起</span>
        </i>
        <!-- </el-button> -->

      </div>
    </div>
    <div v-if="hiddenInfoList.length > 0">
      <div class="hiddenInfo">隐患信息</div>
      <HiddenTrouble
        :hiddenList="hiddenInfoList"/>
    </div>
      <div v-if="isDetail" id="getposmap"></div>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="submitForm" v-show="!isDetail"> </el-button>
      <el-button @click="cancel"> </el-button>
    </div>
  </el-dialog>
    <!-- 任务下发 -->
    <el-dialog :title="title" :visible.sync="workOpen" width="900px" append-to-body>
      <el-form ref="workForm" :model="workForm" :rules="workRules" label-width="80px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="任务标题" prop="workTitle">
             <!-- <el-input v-model="workForm.workTitle" placeholder="请输入任务标题"/>-->
              <span>{{ workForm.workTitle }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="任务类型" prop="workType">
              <span v-if="workForm.workType == '1'">入户安检</span>
              <span v-if="workForm.workType == '2'">巡检</span>
              <!--<span v-if="workForm.workType == '3'">报警巡查</span>-->
              <!--<span v-if="workForm.workType == '4'">其他</span>-->
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="执行单位" prop="workAssignEnterproseId">
              <!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入执行单位名称" />-->
              <el-select v-model="workForm.workAssignEnterproseId" placeholder="请选择执行单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isEnterproser">
                <el-option
                  v-for="item in enterprises"
                  :key="item.enterpriseId"
                  :label="item.enterpriseName"
                  :value="item.enterpriseId"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="执行人" prop="workAssignMan">
              <!--<el-input v-model="form.workAssignManId" placeholder="请输入执行人" />-->
              <el-select v-model="workForm.workAssignManId" placeholder="请输入执行人" style="width: 350px" @change="selectInspection($event,'work')">
                <el-option
                  v-for="item in inspectors"
                  :key="item.userId "
                  :label="item.nickName"
                  :value="item.userId "
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitWorkForm"> </el-button>
        <el-button @click="cancelWorkForm"> </el-button>
      </div>
    </el-dialog>
    <!-- 反馈 -->
    <el-dialog :title="title" :visible.sync="feedBookOpen" width="900px" append-to-body @close="cancelFeedBook">
      <el-form ref="feedBookForm" :model="feedBookForm" :rules="feedBookForm.workType==1?feedBookRules2:feedBookRules" label-width="80px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="任务标题" prop="workTitle">
              <!--<el-input v-model="feedBookForm.workTitle" placeholder="请输入任务标题"/>-->
              <span>{{feedBookForm.workTitle}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="任务类型" prop="workType">
              <span v-if="feedBookForm.workType == '1'">入户安检</span>
              <span v-if="feedBookForm.workType == '2'">巡检</span>
             <!-- <span v-if="feedBookForm.workType == '3'">报警巡查</span>-->
              <span v-if="feedBookForm.workType == '4'">其他</span>
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item label="整改方案" prop="rectificationPlan" v-if="feedBookForm.workType=='1'">
          <el-input v-model="feedBookForm.rectificationPlan" type="textarea" placeholder="请输入整改方案" />
        </el-form-item>
        <el-form-item label="整改结果" prop="rectificationPlan" v-if="feedBookForm.workType=='1'">
          <el-input v-model="feedBookForm.rectificationResult" type="textarea" placeholder="请输入整改方案" />
        </el-form-item>
        <el-form-item label="反馈图片" prop="iconUrl">
          <MyFileUpload
            listType="picture-card"
            @resFun="getFileInfo"
            @remove="listRemove"
            :fileArr="fileList"
          />
          <el-input v-show="false" disabled v-model="feedBookForm.iconUrl"></el-input>
        </el-form-item>
        <el-form-item label="巡线范围" prop="inspectionRoute">
          <el-input v-model="feedBookForm.inspectionRoute" type="textarea" placeholder="巡线范围" />
        </el-form-item>
         <el-form-item label="处理结果" prop="problemDescription">
           <el-input v-model="feedBookForm.problemDescription" type="textarea" placeholder="处理结果" />
         </el-form-item>
        <el-form-item label="隐患信息" prop="hiddenInfo">
          <HiddenTrouble
            :hiddenList="feedBookForm.hiddenList"
            :workId="feedBookForm.workId"
            :isView="false"/>
        </el-form-item>

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFeedBookForm"> </el-button>
        <el-button @click="cancelFeedBook"> </el-button>
      </div>
    </el-dialog>
    <!-- 隐患反馈信息 -->
    <el-dialog :title="title" :visible.sync="hiddenFeedOpen" width="900px" append-to-body @close="cancelHiddenFeedForm">
      <el-form ref="hiddenFeedForm" :model="hiddenFeedForm" :rules="hiddenFeedRules" label-width="80px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="任务标题" prop="workTitle">
              <span>{{hiddenFeedForm.workTitle}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="任务类型" prop="workType">
              <span v-if="hiddenFeedForm.workType == '1'">入户安检</span>
              <span v-if="hiddenFeedForm.workType == '2'">巡检</span>
              <!-- <span v-if="feedBookForm.workType == '3'">报警巡查</span>-->
              <span v-if="hiddenFeedForm.workType == '4'">其他</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="隐患信息" prop="hiddenInfo">
          <HiddenFeedTrouble
            :workId="hiddenFeedForm.workId"
            :isView="false"
             ref="hiddenChild"
            v-if="hiddenFeedOpen"/>
        </el-form-item>

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitHiddenFeedForm"> </el-button>
        <el-button @click="cancelHiddenFeedForm"> </el-button>
      </div>
    </el-dialog>
    <!-- 督办 -->
    <el-dialog :title="title" :visible.sync="supervisorOpen" width="900px" append-to-body @close="cancelSupervisor">
      <el-form ref="supervisorForm" :model="supervisorForm" :rules="supervisorRules" label-width="80px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="任务标题" prop="workTitle">
              <!--<el-input v-model="feedBookForm.workTitle" placeholder="请输入任务标题"/>-->
              <span>{{supervisorForm.workTitle}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="任务类型" prop="workType">
              <span v-if="supervisorForm.workType == '1'">入户安检</span>
              <span v-if="supervisorForm.workType == '2'">巡检</span>
              <span v-if="supervisorForm.workType == '4'">其他</span>
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item label="督办意见" prop="supervisorContent">
          <el-input v-model="supervisorForm.supervisorContent" type="textarea" placeholder="督办意见" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitSupervisorForm"> </el-button>
        <el-button @click="cancelSupervisor"> </el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder } from "@/api/operationMonitor/order";
import { hiddenTroubleList } from "@/api/operationMonitor/hiddenTrouble"
import { addSupervisorInfo, supervisorInfoList } from "@/api/operationMonitor/supervisor"
import Editor from '@/components/Editor';
import MyFileUpload from '@/components/MyFileUpload';
import { enterpriseLists } from "@/api/regulation/info";
import { getInspectionUsers } from "@/api/system/user";
import ScrollPane from "../../../layout/components/TagsView/ScrollPane";
import HiddenTrouble from "./components/HiddenTrouble";
import HiddenFeedTrouble from "./components/HiddenFeedTrouble";
import { EditorMap } from "@/utils/mapClass/getPath2.js";
export default {
  name: "Order",
  components: {
    ScrollPane,
    Editor,
    MyFileUpload,
    HiddenTrouble,
    HiddenFeedTrouble
  },
  data() {
    const validateHiddenFeedInfo = (rule, value, callback) => {
      if (this.$refs.hiddenChild.checkChildData()) {
        callback(new Error("隐患信息不能为空!"));
      } else {
        callback();
      }
    };
    return {
      isOpen:false,
      imageArr:[],
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      detailDialogVisible: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 燃气任务表格数据
      orderList: [
        {activities:[]}
      ],
      // 弹出层标题
      title: "",
      map:null,
      // 是否显示弹出层
      open: false,
      //企业选项
      enterprises: [],
      //巡检员
      inspectors:[],
      // 上传文件列表
      fileList: [],
      //详情
      isDetail: false,
      //是否为企业用户
      isEnterproser: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        createType:0,
        workTitle: null,
        workType: null,
        workContent: null,
        workCreateEnterpriseName: null,
        workCreateEnterpriseId: null,
        workAssignEnterproseName: null,
        workAssignEnterproseId: null,
        workAssignManId: null,
        workAssignMan: null,
        workStatus: null,
        inspectionDate: null,
        inspectionRoute: null,
        problemDescription: null,
        iconUrl: null,
        rectificationPlan: null,
        rectificationResult: null,
        responsibleUnit: null,
        responsiblePerson: null,
        expiryDate: null,
        isDel: null,
        remarks: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        workTitle: [
          { required: true, message: "任务标题", trigger: "blur" }
        ],
        workType: [
          { required: true, message: "任务类型", trigger: "blur" }
        ],
        workContent: [
          { required: true, message: "任务内容", trigger: "blur" }
        ],
        workAssignEnterproseId: [
          { required: true, message: "执行单位", trigger: "blur" }
        ],
        expiryDate: [
          { required: true, message: "截止时间", trigger: "blur" }
        ]
      },
      //任务下发表单校验
      workRules: {
        workAssignEnterproseId: [
          { required: true, message: "执行单位", trigger: "blur" }
        ],
        workAssignMan: [
          { required: true, message: "执行人", trigger: "blur" }
        ]
      },
      //反馈校验
      feedBookRules: {
        iconUrl: [
          { required: true, message: "反馈图片", trigger: "change" }
        ],
        inspectionRoute:[
          { required: true, message: "巡线范围", trigger: "blur" }
        ],
        rectificationResult:[
          { required: true, message: "反馈信息", trigger: "blur" }
        ]
      },
      //反馈校验
      feedBookRules2: {
        iconUrl: [
          { required: true, message: "反馈图片", trigger: "change" }
        ],
        inspectionRoute:[
          { required: true, message: "巡线范围", trigger: "blur" }
        ],
        rectificationResult:[
          { required: true, message: "反馈信息", trigger: "blur" }
        ],
        rectificationPlan:[
          { required: true, message: "整改方案", trigger: "blur" }
        ],
        rectificationResult:[
          { required: true, message: "整改结果", trigger: "blur" }
        ]
      },
      roleType: "zhengfu",
      workForm:{},
      workOpen: false,
      feedBookForm: {
        iconUrl: "",
        hiddenList:[]
      },
      feedBookOpen: false,
      //详情隐患信息
      hiddenInfoList:[],
      hiddenFeedOpen:false,
      hiddenFeedForm:{
        hiddenList:[]
      },
      //反馈校验
      hiddenFeedRules: {
        hiddenInfo: [
          { type: "array", validator: validateHiddenFeedInfo, required: true }
        ]
      },
      //督办form
      supervisorForm: {},
      //督办弹框
      supervisorOpen: false,
      //督办校验
      supervisorRules:{
        supervisorContent: [
          { required: true, message: "督办内容", trigger: "blur" }
        ]
      },
      supervisorList:[],
      isDisplay: false,
      showAndHide: false
    };
  },
  created() {
    window.func=()=>{
      this.isDetail =!this.isDetail;
    }
    this.getList();
    let enterpriseId = this.$store.state.user.enterpriseId;
    let post = this.$store.state.user.posts.find(item => item.postCode === "se");
    if(-2 != enterpriseId){
      if(post && this.$store.state.user.posts.length <=1){
        this.roleType = "inpector";
      }else if(post && this.$store.state.user.posts.length >1){
        this.roleType = "doubleRole";
      }else{
        this.roleType = "enterprise";
      }
    }

  },
  methods: {

    dialogClose(){
      this.isOpen=false;
    },
    dialogOpen(){
      this.isOpen=true;
    },
    /** 查询燃气任务列表 */
    getList() {
      this.loading = true;
      listOrder(this.queryParams).then(response => {
        this.orderList = response.rows;
       /* const param = response.rows;
        param.forEach(item =>{
          this.supervisorData(item);
        })
        this.orderList = param;
        console.log(this.orderList,"fdsfdsfdfdsfd========")*/
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        workId: null,
        workTitle: null,
        workType: null,
        workContent: null,
        workCreateEnterpriseName: null,
        workCreateEnterpriseId: null,
        workAssignEnterproseName: null,
        workAssignEnterproseId: null,
        workAssignManId: null,
        workAssignMan: null,
        workStatus: "0",
        inspectionDate: null,
        inspectionRoute: null,
        problemDescription: null,
        iconUrl: null,
        rectificationPlan: null,
        rectificationResult: null,
        responsibleUnit: null,
        responsiblePerson: null,
        expiryDate: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        isDel: null,
        remarks: 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.workId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.isDetail = false;
      this.title = "添加巡检巡查任务";
      this.getEnterpriseLists();
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const workId = row.workId || this.ids
      this.isDetail = false;
      getOrder(workId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改燃气任务";
        this.getHiddenInfos({workId : workId});
        this.getEnterpriseLists();
        this.getInspectionUserList(response.data.workAssignEnterproseId);
      });

    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.workId != null) {
            updateOrder(this.form).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addOrder(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const workIds = row.workId || this.ids;
      this.$confirm('是否确认删除燃气任务名称为"' + row.workTitle + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          //return delOrder(workIds);
          updateOrder({workId: workIds,isDel: '1'})
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有燃气任务数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.exportLoading = true;
          return exportOrder(queryParams);
        }).then(response => {
          this.download(response.msg);
          this.exportLoading = false;
        }).catch(() => {});
    },
    getFileInfo(res){
      this.feedBookForm.iconUrl = res.url;
      //this.$set(this.feedBookForm,'iconUrl',res.url)
    },
    listRemove(e) {
      this.form.iconUrl = "";
      this.fileList = [];
    },
    showPicture(row){
      this.$refs['a'+row.workId].showViewer = true;
    },
    //执行单位
    getEnterpriseLists(){
      const param = {};
      this.judgeOperateType(param);
      console.log(param)
      enterpriseLists(param).then(response => {
         this.enterprises = response.rows;
      });
    },
    //根据用户角色和操作类型设置执行人是否可选
    judgeOperateType(param){
      if(this.roleType != "zhengfu"){
        param.enterpriseId = this.$store.state.user.enterpriseId;
        if(this.title == "添加巡检巡查任务"){
          this.form.workAssignEnterproseId = this.$store.state.user.enterpriseId;
          this.isEnterproser = true;
        }
        if(this.title == "任务下发"){
          this.isEnterproser = true;
        }
        this.getInspectionUserList(this.$store.state.user.enterpriseId);
      }
    },
    //获取巡检员
    getInspectionUserList(enterpriseId){
      getInspectionUsers(enterpriseId,"se").then(response =>{
        this.inspectors = response.data;
      })
    },
    //选择执行单位
    selectworkAssignEnterprose(enterpriseId){
      this.form.workAssignManId = "";
      this.workForm.workAssignManId = "";
      this.workForm.workAssignMan="";
      this.form.workAssignMan = "";
      this.getInspectionUserList(enterpriseId);
      let enterpriseName = this.enterprises.find(val=>val.enterpriseId == enterpriseId).enterpriseName;
      this.form.workAssignEnterproseName = enterpriseName;
    },
    //获取执行人
    selectInspection(userId,type){
      if(userId){
        let nickName = this.inspectors.find(val=>val.userId == userId).nickName;
        if("edit" == type){
          this.form.workAssignMan = nickName;
        }else{
          this.workForm.workAssignMan = nickName;
        }
      }else{
        if("edit" == type){
          this.form.workAssignMan = "";
        }else{
          this.workForm.workAssignMan = "";
        }
      }
    },
    /*//选择任务类型
    selectWorkType(workType){
      if("2" == workType){
        this.inspectorInfoIsShow = true;
      }else{
        this.inspectorInfoIsShow = false;
      }
    },*/
    //详情
    workDetail(row){
      getOrder(row.workId).then(response => {
        this.isDetail=true;
        this.open = true;
        this.title = "燃气任务详情";
        this.form = response.data;
        this.imageArr = this.form.iconUrl!=null&&this.form.iconUrl.length>1?this.form.iconUrl.split(","):[];
        /*if(this.form.workStatus == '2' || this.form.workStatus == '3'){
          const param = {};
          param.workId = this.form.workId;

        }*/
        //查询隐患信息
        this.getHiddenInfos({workId : this.form.workId});
        this.getEnterpriseLists();
        this.getInspectionUserList(response.data.workAssignEnterproseId);
        this.supervisorData(this.form.workId);
1009
        console.log("response.data = " + response.data)
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229
        this.init(response.data.locationList);
        //[[117.979221,39.805144],[117.979221,39.825144]]
      });
    },
    //任务下发
    workIssue(row){
      this.title = "任务下发";
      this.workForm = {};
      this.workForm.workId = row.workId;
      this.workForm.workTitle = row.workTitle;
      this.workForm.workType = row.workType;
      if(row.workAssignEnterproseId){
        this.workForm.workAssignEnterproseId = row.workAssignEnterproseId;
        this.workForm.workAssignEnterproseName = row.workAssignEnterproseName;
      }
     /* if(row.workAssignManId){
        this.workForm.workAssignManId =  row.workAssignManId;
        this.workForm.workAssignMan = row.workAssignMan;
      }*/
      //this.workForm = row;
      //this.workForm.workStatus = '1';
      this.workOpen = true;
      this.getEnterpriseLists();
      this.getInspectionUserList(row.workAssignEnterproseId);
    },
    //接单
    takingOrder(row){
      this.$confirm('是否确认接单?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
        this.workForm = {};
        this.workForm.workId = row.workId;
        this.workForm.workStatus = '1';
        if (this.workForm.workId != null) {
          updateOrder(this.workForm);
        }
      }).then(response => {
        this.getList();
        this.msgSuccess("接单成功");
      }).catch(() => {});
    },
    //反馈
    feedbookWork(row){
      this.title = "反馈信息";
      this.feedBookOpen = true;
      //this.feedBookForm = {};
      this.feedBookForm.workId = row.workId;
      this.feedBookForm.workTitle = row.workTitle;
      this.feedBookForm.workType = row.workType;
      /*if(row.iconUrl){
        this.feedBookForm.iconUrl = row.iconUrl;
      }*/
      /*if(row.rectificationPlan){
        this.feedBookForm.rectificationPlan =  row.rectificationPlan;
      }
      if(row.rectificationResult){
        this.feedBookForm.rectificationResult =  row.rectificationResult;
      }*/
      //this.feedBookForm = row;
      this.getEnterpriseLists();
    },
    //归档
    sortWork(row){
      this.$confirm('是否确认归档?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.workForm = {};
      this.workForm.workId = row.workId;
      this.workForm.workStatus = '3';
      if (this.workForm.workId != null) {
        updateOrder(this.workForm);
      }
      }).then(response => {
        this.getList();
        this.msgSuccess("归档成功");
      }).catch(() => {});
    },
    //任务下发提交
    submitWorkForm() {
      this.$refs["workForm"].validate(valid => {
        if (valid) {
          if (this.workForm.workId != null) {
            updateOrder(this.workForm).then(response => {
              this.msgSuccess("任务下发成功");
              this.workOpen = false;
              this.getList();
            });
          }
        }
      });
    },
    //任务下发取消
    cancelWorkForm(){
      this.workOpen = false;
      this.workForm = {};
    },
    //反馈提交
    submitFeedBookForm(){
      this.$refs["feedBookForm"].validate(valid => {
        if (valid) {
          if (this.feedBookForm.workId != null) {
            this.feedBookForm.workStatus = '2';
            /*const param ={...this.feedBookForm};
            param.workStatus = '2';*/
            updateOrder(this.feedBookForm).then(response => {
              if(response.code = 200){
                this.msgSuccess("反馈成功");
                this.feedBookOpen = false;
                this.getList();
              }
              /*if(!this.feedBookOpen){
                this.getList();
              }*/
              //this.getList();
            });
          }
        }
      });
    },
    //反馈取消
    cancelFeedBook(){
      this.feedBookOpen = false;
      this.feedBookForm = {};
      this.fileList = [];
    },
    //获取隐患信息
    getHiddenInfos(param){
      hiddenTroubleList(param).then(res =>{
        this.hiddenInfoList = res.data;
        /*this.hiddenInfoList.forEach(item=>{
          item.reportPersonName = item.reportPerson;
        })*/
      });
    },
    //隐患信息反馈
    hiddenFeed(row){
      this.title = "隐患反馈信息";
      this.hiddenFeedOpen = true;
      this.hiddenFeedForm.workId = row.workId;
      this.hiddenFeedForm.workTitle = row.workTitle;
      this.hiddenFeedForm.workType = row.workType;
    },
    //隐患反馈提交
    submitHiddenFeedForm(){
      this.$refs["hiddenFeedForm"].validate(valid => {
        if (valid) {
          this.msgSuccess("隐患信息反馈成功");
          this.hiddenFeedOpen = false;
          this.getList();
        }
      });
    },
    //隐患反馈取消
    cancelHiddenFeedForm(){
      this.hiddenFeedOpen = false;
      this.hiddenFeedForm = {};
      this.fileList = [];
    },
    //督办
    supervisor(row){
      this.title = "任务督办";
      this.supervisorOpen = true;
      this.supervisorForm.workId = row.workId;
      this.supervisorForm.workTitle = row.workTitle;
      this.supervisorForm.workType = row.workType;
    },
    //督办提交
    submitSupervisorForm(){
      this.$refs["supervisorForm"].validate(valid => {
        if (valid) {
          this.supervisorForm.createBy = this.$store.state.user.userId;
          addSupervisorInfo(this.supervisorForm).then(res =>{
            this.msgSuccess("督办成功");
            this.supervisorOpen = false;
            this.getList();
          });
        }
      });
    },
    //督办取消
    cancelSupervisor(){
      this.supervisorOpen = false;
      this.supervisorForm = {};
    },
    //查询督办时间线
    supervisorData(workId){
      supervisorInfoList({workId: workId}).then(res =>{
          this.supervisorList = res.data;
      });
    },
    // 点击按钮显示隐藏
    changeDisplay() {
      this.isDisplay = !this.isDisplay
      let $timeline = this.$refs.timeline;
      if (!this.showAndHide) {
        for (let i = 0; i < $timeline.$children.length; i++) {
          if (i > 1) {
            $timeline.$children[i].$el.style.display = "block";
          }
        }
        this.showAndHide = true;
      } else {
        for (let i = 0; i < $timeline.$children.length; i++) {
          if (i > 1) {
            $timeline.$children[i].$el.style.display = "none";
          }
        }
        this.showAndHide = false;
      }


      //$timeline.toggleRowExpansion(row,true)
    },
    init(pipePath) {
      this.$nextTick(() => {
        const path = eval(this.$store.state.user.systemSetting.map_center);
1230
      console.log("path111111",path);
1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272
      this.map = new EditorMap("getposmap", {center:path}, this);
        console.log(pipePath)
        if (pipePath!=null && pipePath.length > 0) {
          this.map.addPipeLine({ path: pipePath });
        }
    });
    },
  }
};
</script>
<style lang="scss" scoped>
  .hiddenInfo{
    font-weight: 700;
    font-size: 18px;
    margin-left: 12px;
    margin-bottom: 9px;
  }
  .timeline{
    width: 330px;
    height: 240px;
    padding: 15px;
    overflow-y: auto;
    &::-webkit-scrollbar {
      width: 5px;
      background:  #dfe4ed;
      position: absolute;
      top: 0;
    }
    &::-webkit-scrollbar-thumb {
      /*滚动条里面小方块*/
      // border-radius: 10px;
      // box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
      background: #cccccc;
      border-radius: 5px;
    }
  }
  #getposmap {
    width: 85%;
    height: 400px;
    margin-left: 8%;
  }
</style>