device_operate_frm.html 56.1 KB
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 1009 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
<!DOCTYPE html>
<html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
      <meta name="referrer" content="no-referrer">
      <title>操作命令_frm</title>
      <link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/api.css"/>
      <link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/aui.css"/>
      <link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/home.css"/>
      <link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/element.css"/>
      <link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/style.css"/>

      <style>
        html,
        body{
          background-color: #F4F6F9;
        }
        .el-collapse-item__wrap{
          height: auto;
        }
      </style>
  </head>
  <body>
    <div id="app" ontouchstart="" οnmοuseοver="">
      <template>
        <div class="store01001-operate-param-title" style="height: auto;">
          <div style="margin-left:15px;margin-right:15.5px;">
            <div class="aui-row aui-row-flex store01001-operate-top-14">
              <div class="aui-col aui-col-span-1" style="margin-top: 1rem;">
                <div class="store01001-operate-title-sign"></div>
              </div>
              <div class="aui-col aui-col-span-23">
                <span class="store01001-operate-device-name" id="device_imei">设备编号:{{ api.pageParam.imei }}</span>
              </div>
            </div>
            <el-tabs v-model="activeName" @tab-click="handleClick" stretch>
              <el-tab-pane label="参数设置" name="first">
              </el-tab-pane>
              <el-tab-pane label="使能控制" name="second"></el-tab-pane>
              <el-tab-pane label="定时合分闸" name="third"></el-tab-pane>
              <el-tab-pane v-if="func_temp" label="环境温度" name="fourth"></el-tab-pane>
            </el-tabs>
          </div>
        </div>

        <div v-if="opener===1" class="store01001-operate-info-panel">
          <div class="store01001-operate-info-inside-panel">
            <div v-for="(list, i) in setParamList">
              <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="showAmount(list)">
                <div class="aui-col aui-col-span-15 aui-row-flex-start">
                  <span class="store01001-operate-param-obj">{{ list.paramTitle }}</span>
                </div>
                <div class="aui-col aui-col-span-5 aui-row-flex-end">
                  <span style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;">{{ list.paramValue }}</span>
                </div>
                <div class="aui-col aui-col-span-3 aui-row-flex-start">
                  <span v-if="!list.doing" class="store01001-operate-num-value store01001-operate-num-unit">{{ list.paramUnit }}</span>
                  <span v-else class="store01001-operate-num-value store01001-operate-num-unit aui-loading"></span>
                </div>
                <div class="aui-col aui-col-span-1 aui-row-flex-end">
                  <i v-if="!list.doing" class="aui-iconfont aui-icon-right icon-right" style="color:#AEB8CE;margin-top: 0.1rem;"></i>
                </div>
              </div>
              <div class="panel-line store01001-operate-margin-top-21"></div>
            </div>
            <!-- 输入量(DI1)功能整定 -->
            <div>
              <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="showDlList(1)">
                <div class="aui-col aui-col-span-15 aui-row-flex-start">
                  <span class="store01001-operate-param-obj">输入量(DI1)功能整定</span>
                </div>
                <div class="aui-col aui-col-span-7 aui-row-flex-end">
                  <span style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;"> {{ di1_str | diFilter }} </span>
                </div>
                <div class="aui-col aui-col-span-2 aui-row-flex-end">
                  <i style="border-left: 5px solid transparent;border-right: 5px solid transparent;border-top: 5px solid #999;margin-top: 0.5rem;"></i>
                </div>
              </div>
              <div class="panel-line store01001-operate-margin-top-21"></div>
            </div>
            <!-- 输入量(DI2)功能整定 -->
            <div>
              <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="showDlList(2)">
                <div class="aui-col aui-col-span-15 aui-row-flex-start">
                  <span class="store01001-operate-param-obj">输入量(DI2)功能整定</span>
                </div>
                <div class="aui-col aui-col-span-7 aui-row-flex-end">
                  <span style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;"> {{ di2_str | diFilter }} </span>
                </div>
                <div class="aui-col aui-col-span-2 aui-row-flex-end">
                  <i style="border-left: 5px solid transparent;border-right: 5px solid transparent;border-top: 5px solid #999;margin-top: 0.5rem;"></i>
                </div>
              </div>
              <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>
            </div>
          </div>
        </div>

        <div v-if="opener===2" class="store01001-operate-info-panel">
          <div class="store01001-operate-info-inside-panel">
            <div style="height: 10px;"></div>
            <el-row>
              <el-col :span=2>
                <div style="height: 4px;"></div>
                <img src="http://iot.uccc.cc:9090/product/03001/icon_alert.png" style="height: 12px;width: 12px;">
              </el-col>
              <el-col :span=22>
                <textarea style="font-size:12px;font-family:PingFang SC;font-weight:500;color:rgba(254,187,53,1);">提示:使能打开时,设备执行跳闸动作;使能关闭时,设备执行报警通知。</textarea>
              </el-col>
            </el-row>
            <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 10px;"></div>
            <div v-for="(list, i) in snParamList">
              <div v-if="list.show">
                <div class="aui-row aui-row-flex store01001-operate-padding-top-21">
                  <div class="aui-col aui-col-span-15 aui-row-flex-start">
                    <span class="store01001-operate-param-obj">{{ list.paramTitle }}</span>
                  </div>
                  <div class="aui-col aui-col-span-9 aui-row-flex-end">
                    <div class="aui-list-item-input" @click="switchChange(list)">
                      <input :id="'select_'+ list.order" v-if="list.status" type="checkbox"  class="aui-switch" checked >
                      <input :id="'select_'+ list.order" v-else type="checkbox" class="aui-switch" >
                    </div>
                  </div>
                </div>
                <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>
              </div>
            </div>
          </div>
        </div>
        <div v-if="opener===3" class="store01001-operate-info-panel">
          <div style="height: 10px;"></div>
          <div class="store01001-operate-info-inside-panel">
            <div class="store01001-operate-param-obj" style="background-color: #FFFFFF;">第一组定时分合闸</div>
            <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 5px;"></div>

            <div> <!-- 第一组定时分闸使能 -->
              <div class="aui-row aui-row-flex store01001-operate-padding-top-21">
                <div class="aui-col aui-col-span-15 aui-row-flex-start">
                  <span class="store01001-operate-param-obj">{{ snParamList[11].paramTitle }}</span>
                </div>
                <div class="aui-col aui-col-span-9 aui-row-flex-end">
                  <div class="aui-list-item-input" @click="switchChange(snParamList[11])">
                    <input :id="'select_'+ snParamList[11].order" v-if="snParamList[11].status" type="checkbox"  class="aui-switch" checked >
                    <input :id="'select_'+ snParamList[11].order" v-else type="checkbox" class="aui-switch" >
                  </div>
                </div>
              </div>
              <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>

              <div v-if="snParamList[11].status">
                <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="changeTiming(snParamList[11])">
                  <div class="aui-col aui-col-span-15 aui-row-flex-start">
                    <span class="store01001-operate-param-obj">定时分闸时间</span>
                    <!-- <span v-if="snParamList[11].order === 5" class="store01001-operate-param-obj">44定时分闸时间</span> -->
                  </div>
                  <div class="aui-col aui-col-span-7 aui-row-flex-end">
                    <span :id="'select_time_'+ snParamList[11].order" style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;"> {{ fz_time | dateFilter }} </span>
                  </div>
                  <div class="aui-col aui-col-span-2 aui-row-flex-end">
                    <i style="border-left: 5px solid transparent;border-right: 5px solid transparent;border-top: 5px solid #999;margin-top: 0.5rem;"></i>
                  </div>
                </div>
                <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>
              </div>
            </div>

            <div> <!-- 第一组定时合闸使能 -->
              <div class="aui-row aui-row-flex store01001-operate-padding-top-21">
                <div class="aui-col aui-col-span-15 aui-row-flex-start">
                  <span class="store01001-operate-param-obj">{{ snParamList[10].paramTitle }}</span>
                </div>
                <div class="aui-col aui-col-span-9 aui-row-flex-end">
                  <div class="aui-list-item-input" @click="switchChange(snParamList[10])">
                    <input :id="'select_'+ snParamList[10].order" v-if="snParamList[10].status" type="checkbox"  class="aui-switch" checked >
                    <input :id="'select_'+ snParamList[10].order" v-else type="checkbox" class="aui-switch" >
                  </div>
                </div>
              </div>
              <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>

              <div v-if="snParamList[10].status">
                <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="changeTiming(snParamList[10])">
                  <div class="aui-col aui-col-span-15 aui-row-flex-start">
                    <span v-if="snParamList[10].order === 5" class="store01001-operate-param-obj">定时合闸时间</span>
                  </div>
                  <div class="aui-col aui-col-span-7 aui-row-flex-end">
                    <span :id="'select_time_'+ snParamList[10].order" style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;"> {{ hz_time | dateFilter }} </span>
                  </div>
                  <div class="aui-col aui-col-span-2 aui-row-flex-end">
                    <i style="border-left: 5px solid transparent;border-right: 5px solid transparent;border-top: 5px solid #999;margin-top: 0.5rem;"></i>
                  </div>
                </div>
                <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>
              </div>
            </div>


          </div>
        </div>
        <!-- <div style="height:21px;"></div> -->

        <div v-if="opener===3 && dsVisable" class="store01001-operate-info-panel" style="background-color:#F4F6F9;">
          <el-collapse v-model="activeName2" v-for="(info,i) in fiveTimes" accordion>
            <el-collapse-item :name=i>
              <template slot="title">
                <span class="store01001-operate-param-obj" style="padding-left: 13px;font-size: 15px;">{{ info.name }}</span>
              </template>
              <div class="store01001-operate-info-inside-panel">
                <div v-for="(list, i) in info.list">
                  <div v-if="list.show2">
                    <div class="aui-row aui-row-flex store01001-operate-padding-top-21">
                      <div class="aui-col aui-col-span-15 aui-row-flex-start">
                        <span class="store01001-operate-param-obj">{{ list.name }}</span>
                      </div>
                      <div class="aui-col aui-col-span-9 aui-row-flex-end">
                        <div class="aui-list-item-input" @click="switchChange4FiveTimes(list)">
                          <input :id="'select2_'+ list.order1 + '_' + list.order" v-if="list.status" type="checkbox"  class="aui-switch" checked >
                          <input :id="'select2_'+ list.order1 + '_' + list.order" v-else type="checkbox" class="aui-switch" >
                        </div>
                      </div>
                    </div>
                    <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>

                    <div v-if="list.status">
                      <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="changeTiming1(list)">
                        <div class="aui-col aui-col-span-15 aui-row-flex-start">
                          <span v-if="list.order1 === 4" class="store01001-operate-param-obj">定时合闸时间</span>
                          <span v-if="list.order1 === 5" class="store01001-operate-param-obj">定时分闸时间</span>
                        </div>
                        <div class="aui-col aui-col-span-7 aui-row-flex-end">
                          <span v-if="list.order1 === 4" :id="'select2_time_'+ list.order" style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;"> {{ list.hz_time | dateFilter }} </span>
                          <span v-if="list.order1 === 5" :id="'select2_time_'+ list.order" style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;"> {{ list.fz_time | dateFilter }} </span>
                        </div>
                        <div class="aui-col aui-col-span-2 aui-row-flex-end">
                          <i style="border-left: 5px solid transparent;border-right: 5px solid transparent;border-top: 5px solid #999;margin-top: 0.5rem;"></i>
                        </div>
                      </div>
                      <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>
                    </div>
                  </div>
                </div>
              </div>
            </el-collapse-item>
            <div style="height: 10px;"></div>
          </el-collapse>
        </div>

        <div v-if="opener===4" class="store01001-operate-info-panel">
            <div class="store01001-operate-info-inside-panel">
                <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="showAmount(list)">
                  <div class="aui-col aui-col-span-15 aui-row-flex-start">
                    <span class="store01001-operate-param-obj">环境温度</span>
                  </div>
                  <div class="aui-col aui-col-span-8 aui-row-flex-end">
                    <span style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;font-size:16px;">{{ r_envir_temp }}℃</span>
                  </div>
                </div>
                <div class="panel-line store01001-operate-margin-top-21"></div>
            </div>
          </div>
          <div v-if="opener===4" class="store01001-operate-info-panel">
            <div class="store01001-operate-info-inside-panel">
              <div style="height: 5px;"></div>
              <div class="aui-row aui-row-flex">
                  <div class="aui-col aui-col-span-2 aui-row-flex-start">
                    <div style="height: 5px;"></div>
                    <img src="http://iot.uccc.cc:9090/product/03001/icon_alert.png" style="height: 12px;width: 12px;">
                  </div>
                  <div class="aui-col aui-col-span-22 aui-row-flex-end">
                      <span style="font-size:12px;font-family:PingFang SC;font-weight:500;color:rgba(254,187,53,1);">提示:通过设置环境温度值来控制空开的分合闸动作,温度值为当前环境测量温度!(如:温度上限值超过30℃时,空开执行合闸动作,空调上电;温度下限值低于20℃时,空开执行分闸动作,空调断电。设置成自动模式!)。</span>
                  </div>
              </div>

              <div class="aui-row aui-row-flex store01001-operate-padding-top-21">
                <div class="aui-col aui-col-span-15 aui-row-flex-start">
                  <span class="store01001-operate-param-obj">环境温度使能</span>
                </div>
                <div class="aui-col aui-col-span-9 aui-row-flex-end">
                  <div class="aui-list-item-input" @click="switchChangeTemp()">
                    <input id="select_temp" v-if="tempFlags.环境温度.value" type="checkbox"  class="aui-switch" checked >
                    <input id="select_temp" v-else type="checkbox" class="aui-switch" >
                  </div>
                </div>
              </div>
              <div v-if="tempFlags.环境温度.value" v-for="(list, i) in setTempList">
                <div class="aui-row aui-row-flex store01001-operate-padding-top-21" @click="showAmount(list)">
                  <div class="aui-col aui-col-span-15 aui-row-flex-start">
                    <span class="store01001-operate-param-obj">{{ list.paramTitle }}</span>
                  </div>
                  <div class="aui-col aui-col-span-5 aui-row-flex-end">
                    <span style="height:1.26rem;margin-right:-0.2rem;text-align:right;font-family:DINPro-Medium;font-weight:500;color:rgba(91,127,248,1);font-size:16px;">{{ list.paramValue }}</span>
                  </div>
                  <div class="aui-col aui-col-span-3 aui-row-flex-start">
                    <span v-if="!list.doing" class="store01001-operate-num-value store01001-operate-num-unit">{{ list.paramUnit }}</span>
                    <span v-else class="store01001-operate-num-value store01001-operate-num-unit aui-loading"></span>
                  </div>
                  <div class="aui-col aui-col-span-1 aui-row-flex-end">
                    <i v-if="!list.doing" class="aui-iconfont aui-icon-right icon-right" style="color:#AEB8CE;margin-top: 0.1rem;"></i>
                  </div>
                </div>
                <div class="panel-line store01001-operate-margin-top-21"></div>
              </div>
              <div class="panel-line store01001-operate-margin-top-21" style="margin-top: 30px;"></div>
            </div>
          </div>
        <div style="height: 20px;"></div>
      </template>
    </div>
  </body>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/api.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/aui-tab.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/jquery-3.3.1.min.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/vue.min.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/element.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/fastclick.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/moment.min.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/common.js"></script>
  <script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/ctrl.js"></script>
  <script type="text/javascript">
      var vm,
          that;
      var tabTypeList = {
          "first": 1,
          "second": 2,
          "third": 3,
          "fourth": 4,
      }
      var di_s = {
                  '0000': '无功能',
                  '0001': '门磁功能',
                  '0010': '防雷失效功能',
                  '0011': '分闸功能',
                  '0100': '合闸功能'
                }
      apiready = function(){
        api.parseTapmode();
          //---------初始化vue
          vm = new Vue({
            el: '#app',
            data: {
              imei: api.pageParam.imei,
              productId: api.pageParam.productId,
              user_id: api.getPrefs({sync: true,key: 'userID'}),
              userId: api.getPrefs({sync: true,key: 'userID'}),
              token: api.getPrefs({sync: true,key: 'userToken'}),
              activeName: "first",
              activeName2: 'first',
              opener: 1,
              setParamList: [
                {paramSign: "rw_ssdlzdbs", paramTitle: "瞬时短路倍数", paramValue: "", paramUnit: "", min: 0, max: 10, closable: true, doing: false},
                {paramSign: "rw_dysdlzdbs", paramTitle: "短延时短路倍数", paramValue: "", paramUnit: "", min: 0, max: 10, closable: true, doing: false},
                {paramSign: "rw_fault_gdyzd", paramTitle: "过电压动作值", paramValue: "", paramUnit: "V", min: 0, max: 300, closable: true, doing: false},
                {paramSign: "rw_fault_qdyzd", paramTitle: "欠电压动作值", paramValue: "", paramUnit: "V", min: 0, max: 200, closable: true, doing: false},
                {paramSign: "rw_fault_gzdlzd", paramTitle: "过载电流动作值", paramValue: "", paramUnit: "A", min: 0, max: 80, closable: true, doing: false},
                {paramSign: "rw_gztimezd", paramTitle: "过载时间动作值", paramValue: "", paramUnit: "s", min: 0, max: 30, closable: false, doing: false},
                // {paramSign: "rw_fault_loudiandlzd", paramTitle: "漏电电流动作值", paramValue: "", paramUnit: "mA", min: 0, max: 500, closable: true, doing: false},
                {paramSign: "rw_fault_wenduzdz", paramTitle: "超温动作值", paramValue: "", paramUnit: "℃", min: 50, max: 150, closable: true, doing: false},
                {paramSign: "rw_chz_delay_time", paramTitle: "重合闸延时时间", paramValue: "", paramUnit: "s", min: 1, max: 9999, closable: false, doing: false},
                {paramSign: "rw_chzbs_time", paramTitle: "重合闸闭锁时间", paramValue: "", paramUnit: "s", min: 1, max: 9999, closable: false, doing: false},
                {paramSign: "rw_lhaction_zd_val", paramTitle: "拉弧动作值", paramValue: "", paramUnit: "A", min: 0, max: 9999, closable: true, doing: false},
                {paramSign: "rw_lhaction_delay_time", paramTitle: "拉弧动作延时时间", paramValue: "", paramUnit: "s", min: 1, max: 9999, closable: false, doing: false},
              ],
              snParamList: [
                {paramTitle: "瞬时保护动作使能", status: false,order: 15, show: true, show2: false},
                {paramTitle: "短延时保护动作使能", status: false,order: 14, show: true, show2: false},
                {paramTitle: "过载保护动作使能", status: false,order: 13, show: true, show2: false},
                {paramTitle: "漏电保护动作使能", status: false,order: 12, show: false, show2: false},
                {paramTitle: "过电压保护动作使能", status: false,order: 11, show: true, show2: false},
                {paramTitle: "欠电压保护动作使能", status: false,order: 10, show: true, show2: false},
                {paramTitle: "超温保护动作使能", status: false,order: 9, show: true, show2: false},
                {paramTitle: "拉弧保护动作使能", status: false,order: 8, show: true, show2: false},
                {paramTitle: "DI1开关动作使能", status: false,order: 7, show: true, show2: false},
                {paramTitle: "DI2开关动作使能", status: false,order: 6, show: true, show2: false},
                {paramTitle: "定时合闸使能", status: false,order: 5, show: false, show2: true},
                {paramTitle: "定时分闸使能", status: false,order: 4, show: false, show2: true},
                {paramTitle: "预付费功能", status: false,order: 3, show: false, show2: false},
                {paramTitle: "过负载动作使能", status: false,order: 2, show: false, show2: false},
                {paramTitle: "缺相保护动作使能", status: false,order: 1, show: false, show2: false},
                {paramTitle: "16位", status: false,order: 0, show: false, show2: false},
              ],
              fiveTimes:[
              {name:"第二组定时分合闸", list:[
                { name:"定时分闸使能", value : true , order : 14, order1:5, status: false, show2: true, fz_time: '', sign: 'rw_time_1_open'},
                { name:"定时合闸使能", value : true , order : 15, order1:4, status: false, show2: true, hz_time: '', sign: 'rw_time_1_close'},
              ]},
              {name:"第三组定时分合闸",list:[
                { name:"定时分闸使能", value : true , order : 12, order1:5, status: false, show2: true, fz_time: '', sign: 'rw_time_2_open'},
                { name:"定时合闸使能", value : true , order : 13, order1:4, status: false, show2: true, hz_time: '', sign: 'rw_time_2_close'},
              ]},
              {name:"第四组定时分合闸", list:[
                { name:"定时分闸使能", value : true , order : 10, order1:5, status: false, show2: true, fz_time: '', sign: 'rw_time_3_open'},
                { name:"定时合闸使能", value : true , order : 11, order1:4, status: false, show2: true, hz_time: '', sign: 'rw_time_3_close'},
              ]},
              {name:"第五组定时分合闸", list:[
                { name:"定时分闸使能", value : true , order : 8, order1:5, status: false, show2: true, fz_time: '', sign: 'rw_time_4_open'},
                { name:"定时合闸使能", value : true , order : 9, order1:4, status: false, show2: true, hz_time: '', sign: 'rw_time_4_close'},
              ]},
              ],
              tempFlags:{"环境温度" : { value : true , order : 15}},
              di1_str : '0000',
              di2_str : '0000',
              diDoing : false,
              value: true,
              // hz_time : moment('01:00:00', 'HH:mm:ss'),
              // fz_time : moment('00:00:00', 'HH:mm:ss'),
              hz_time : '',
              fz_time : '',
              dsVisable: false,
              infoTemp_ : null,
              func_temp: false,
              r_envir_temp: 0, //当前温度
              setTempList: [
                {paramSign: "rw_envir_temp_up", paramTitle: "环境温度设置上限值", paramValue: "", paramUnit: "℃", min: 16, max: 40, closable: false, doing: false},
                {paramSign: "rw_envir_temp_down", paramTitle: "环境温度设置下限值", paramValue: "", paramUnit: "℃", min: 16, max: 40, closable: false, doing: false},
              ]
            },
            filters: {
              diFilter(v) {
                return di_s[v]
              },
              dateFilter(date) {
                if (date != '') {
                  return date.format('HH:mm')
                }else {
                  return date
                }

              },
            },
            created() {
              that = this
              this.initFirstPage()
              api.addEventListener({
                name: 'pageDownEvent'
              }, function(ret, err){
                setTimeout(() => {
                  api.pageDown(function(ret, err) {
                    if (!ret.scrolled) {
                    }
                  });
                }, 500);
              });
            },
            methods: {
              handleClick(tab, event) {
                this.opener = tabTypeList[tab.name]
                switch (this.opener) {
                  case 1:
                    this.initFirstPage()
                    break;
                  case 2:
                    this.initSecondPage()
                    break;
                  case 3:
                    this.initThirdPage()
                    break;
                  case 4:
                    this.initFourthPage()
                    break;
                  default:
                    break;
                }
              },
              async initFirstPage() {
                let params = {
                  imei: this.imei,
                  userId: this.userId,
                  token: this.token
                }
                let lastInfoRes = await get_device_infos_by_imei(params)
                let lastInfo = lastInfoRes.data.device.store03001
                this.infoTemp_ = lastInfo
                for (var v1 in lastInfo) {
                  this.setParamList.forEach(d => {
                    if (v1 === d.paramSign) {
                      d.paramValue = lastInfo[v1]
                    }
                  });
                }
                let di_flag = parseInt(lastInfo.rw_srldignzd).toString(2).padStart(16,'0')
                //Bit0~7  Bit8~15: 00 没有配置任何功能;01 门磁功能;02 防雷失效功能;03 分闸功能;04 合闸功能
                this.di1_str = di_flag.substr(12,4)
                this.di2_str = di_flag. substr(4,4)
                if(lastInfo.r_func_choice.substr(12,1) === '1') {
                  this.func_temp = true
                }
              },
              async initSecondPage() {
                let params = {
                  imei: this.imei,
                  userId: this.userId,
                  token: this.token
                }
                let lastInfoRes = await get_device_infos_by_imei(params)
                let lastInfo = lastInfoRes.data.device.store03001
                this.fillFlag(lastInfo.rw_bhaction_flag)
              },
              async initThirdPage() {
                let params = {
                  imei: this.imei,
                  userId: this.userId,
                  token: this.token
                }
                let lastInfoRes = await get_device_infos_by_imei(params)
                let lastInfo = lastInfoRes.data.device.store03001
                this.fillFlag(lastInfo.rw_bhaction_flag)
                this.fz_time = moment(`${lastInfo.rw_dsfzsfzd.substr(0,2)}:${lastInfo.rw_dsfzsfzd.substr(2,2)}`, 'HH:mm')
                this.hz_time = moment(`${lastInfo.rw_dshzsfzd.substr(0,2)}:${lastInfo.rw_dshzsfzd.substr(2,2)}`, 'HH:mm')
                //lastInfoRes.data.device.version = '2016'
                if (lastInfoRes.data.device.version && parseInt(lastInfoRes.data.device.version) >= 2015 && parseInt(lastInfoRes.data.device.version) <= 2025) {
                  this.dsVisable = true
                  this.timesFlag(lastInfo.rw_time,lastInfo)
                  console.log("current:" + lastInfo.rw_time);
                }
                console.log(this.dsVisable);
              },
              async initFourthPage() {
                let params = {
                  imei: this.imei,
                  userId: this.userId,
                  token: this.token
                }
                let lastInfoRes = await get_device_infos_by_imei(params)
                let lastInfo = lastInfoRes.data.device.store03001
                let flag = lastInfo.rw_envir_temp_sign
                console.log(flag)
                this.tempFlags["环境温度"].value =  flag.substr(15,1) === '1' ? true : false
                this.r_envir_temp = lastInfo.r_envir_temp
                this.setTempList[0].paramValue = lastInfo.rw_envir_temp_up
                this.setTempList[1].paramValue = lastInfo.rw_envir_temp_down
              },
              async showAmount(list) {
                if (list.doing) {
                  api.alert({
                    title: '系统繁忙',
                    msg: '正在操作'+ list.paramTitle +',请稍后再试!'
                  });
                  return;
                }
                let closeTitle = ''
                if (list.closable) {
                  closeTitle = ' 0关闭'
                }
                var dialogBox = api.require('dialogBox');
                dialogBox.amount({
                    texts: {
                        title: list.paramTitle + '(参数范围:' + list.min + '~' + list.max + list.paramUnit + closeTitle + ')' ,
                        default: list.paramValue,
                        leftBtnTitle: '取消',
                        rightBtnTitle: '完成'
                    },
                    tapClose: true,
                    styles: {
                        bg: '#fff',
                        corner: 6,
                        w: 300,
                        h: 200,
                        title: {
                            marginT: 20,
                            size: 14,
                            color: '#000'
                        },
                        input: {
                            w: 150,
                            h: 44,
                            marginT: 15,
                            size: 14,
                            color: '#000'
                        },
                        dividingLine: {
                            marginT: 10,
                            width: 0.5,
                            color: '#696969'
                        },
                        left: {
                          marginB: 7,
                          marginL: 20,
                          w: 130,
                          h: 35,
                          corner: 10,
                          bg: '#5B7FF8',
                          color: '#FFFFFF',
                          size: 12
                        },
                        right: {
                            marginB: 7,
                            marginL: 10,
                            w: 130,
                            h: 35,
                            corner: 10,
                            bg: '#5B7FF8',
                            color: '#FFFFFF',
                            size: 12
                        }
                    }
                },async function(ret) {
                  var dialogBox = api.require('dialogBox');
                  if (ret.eventType == 'left') {
                    dialogBox.close({dialogName: 'amount'});
                  }else if (ret.eventType == 'right') {
                    let value_ = Number(ret.amount)

                    //可关闭但未
                    if (list.closable && value_ != 0 && (value_ < list.min || value_ > list.max)) {
                      api.alert({title: '提示',msg: '参数有误!'});
                      return;
                    }
                    if (!list.closable && (value_ < list.min || value_ > list.max)) {
                      api.alert({title: '提示',msg: '参数有误!'});
                      return;
                    }
                    let json_ = {}
                    eval('json_.'+list.paramSign+'=' + value_)
                    let params = {
                      user_id: that.user_id,
                      imei: that.imei,
                      type: that.productId,
                      command: 'set',
                      // control_name: ''
                      request_body: json_
                    }
                    dialogBox.close({dialogName: 'amount'});
                    that.setParamList.forEach((d,i) => { //锁定设置操作
                      if (d.paramSign === list.paramSign) {
                        d.doing = true
                      }
                    });
                    let setCmdReq = await post_normal_set_device(params,that.token)
                    console.log(JSON.stringify(params));
                    that.setParamList.forEach((d,i) => {  //解锁设置操作
                      if (d.paramSign === list.paramSign) {
                        d.doing = false
                      }
                    });
                    if (setCmdReq.data.upRet) {
                      let upRet = JSON.parse(setCmdReq.data.upRet)
                      if (setCmdReq.code == 0 && setCmdReq.msg == '操作成功' && upRet.rescode == 200) {
                        api.toast({msg: '设置' + list.paramTitle + '成功',duration: 2000,location: 'bottom'});
                      }else {
                        api.toast({msg: '设置' + list.paramTitle + '失败',duration: 2000,location: 'bottom'});
                      }
                    }
                    // 射完立马get一下
                    params.command = 'get'
                    eval('params.request_body = ["' + list.paramSign + '"]')
                    console.log(JSON.stringify(params));
                    let getCmdReq = await post_normal_set_device(params,that.token)
                    console.log(JSON.stringify(getCmdReq));
                    that.initFirstPage()
                    that.initFourthPage()
                  }
                });
              },
              showDlList(v) {
                if (this.diDoing) {
                  api.alert({
                    title: '系统繁忙',
                    msg: '正在操作Dl输入量,请稍后再试!'
                  });
                  return;
                }
                let title_ = v === 1 ? '输入量(DI1)功能整定' : '输入量(DI2)功能整定'
                let buttonV = ['0000','0001','0010','0011','0100']
                let params = {
                                user_id: this.user_id,
                                imei: this.imei,
                                type: this.productId,
                                command: 'set',
                                request_body: {rw_srldignzd: ''}
                              }
                api.actionSheet({
                    title: title_,
                    cancelTitle: '取消',
                    buttons: ['无功能', '门磁功能', '防雷失效功能','分闸功能','合闸功能']
                },async function(ret, err) {
                    var index = ret.buttonIndex;
                    let oldDi1 = that.di1_str
                    let oldDi2 = that.di2_str
                    if (index<=5) { //取消按钮忽略
                      if (v === 1) {
                        that.di1_str = buttonV[index-1]

                      }else if (v === 2) {
                        that.di2_str = buttonV[index-1]
                      }
                      let dlValue = that.di2_str.padStart(8,'0') + that.di1_str.padStart(8,'0')
                      params.request_body.rw_srldignzd = parseInt(dlValue,2).toString()
                      that.diDoing = true
                      let setCmdReq = await post_normal_set_device(params,that.token)
                      console.log(JSON.stringify(setCmdReq));
                      that.diDoing = false
                      if (setCmdReq.data.upRet) {
                        let upRet = JSON.parse(setCmdReq.data.upRet)
                        if (setCmdReq.code == 0 && setCmdReq.msg == '操作成功' && upRet.rescode === 200) {
                          api.toast({msg: '设置成功',duration: 2000,location: 'bottom'});
                          console.log(JSON.stringify('----111'));
                        }else {
                          that.di1_str = oldDi1
                          that.di2_str = oldDi2
                          api.toast({msg: '设置失败',duration: 2000,location: 'bottom'});
                        }
                      }
                      console.log(JSON.stringify('----222'));
                      // 射完立马get一下
                      params.command = 'get'
                      console.log(JSON.stringify('----'));
                      params.request_body = ["rw_srldignzd"]
                      console.log(JSON.stringify('----'));
                      let getCmdReq = await post_normal_set_device(params,that.token)
                      console.log(JSON.stringify(getCmdReq));
                      that.initFirstPage()
                    }
                });
              },
              fillFlag(flag){
                let flagArr = flag.split('')
                for (let i = flagArr.length-1; i >= 0; i--) {
                  let e = flagArr[i];
                  this.snParamList.forEach(d => {
                    if (d.order === i) {
                      d.status = e === '1' ? true : false
                    }
                  });
                }
              },
              timesFlag(flag, lastInfos) {
                // console.log(JSON.stringify(flag));//0000000011111111
                let flagArr = flag.split('')
                for (let i = flagArr.length-1; i >= 0; i--) {
                  let e = flagArr[i];
                  this.fiveTimes.forEach(d => {
                    d.list.forEach(d_list => {
                      if (d_list.order === i) {
                        d_list.status = e === '1' ? true : false
                      }
                    });
                  });
                }

                if (lastInfos.rw_time_1_open) { //第二组定时器分闸时分  open:分闸 close:合闸
                  this.fiveTimes[0].list[0].fz_time = moment(`${lastInfos.rw_time_1_open.substr(0,2)}:${lastInfos.rw_time_1_open.substr(2,2)}:00`, 'HH:mm:ss')
                }
                if (lastInfos.rw_time_1_close) { //第二组定时器合闸时分  open:分闸 close:合闸
                  this.fiveTimes[0].list[1].hz_time  = moment(`${lastInfos.rw_time_1_close.substr(0,2)}:${lastInfos.rw_time_1_close.substr(2,2)}:00`, 'HH:mm:ss')
                }
                if (lastInfos.rw_time_2_open) { //第三组定时器分闸时分  open:分闸 close:合闸
                  this.fiveTimes[1].list[0].fz_time = moment(`${lastInfos.rw_time_2_open.substr(0,2)}:${lastInfos.rw_time_2_open.substr(2,2)}:00`, 'HH:mm:ss')
                }
                if (lastInfos.rw_time_2_close) { //第三组定时器合闸时分  open:分闸 close:合闸
                  this.fiveTimes[1].list[1].hz_time = moment(`${lastInfos.rw_time_2_close.substr(0,2)}:${lastInfos.rw_time_2_close.substr(2,2)}:00`, 'HH:mm:ss')
                }
                if (lastInfos.rw_time_3_open) { //第四组定时器分闸时分  open:分闸 close:合闸
                  this.fiveTimes[2].list[0].fz_time = moment(`${lastInfos.rw_time_3_open.substr(0,2)}:${lastInfos.rw_time_3_open.substr(2,2)}:00`, 'HH:mm:ss')
                }
                if (lastInfos.rw_time_3_close) { //第四组定时器合闸时分  open:分闸 close:合闸
                  this.fiveTimes[2].list[1].hz_time = moment(`${lastInfos.rw_time_3_close.substr(0,2)}:${lastInfos.rw_time_3_close.substr(2,2)}:00`, 'HH:mm:ss')
                }
                if (lastInfos.rw_time_4_open) { //第五组定时器分闸时分  open:分闸 close:合闸
                  this.fiveTimes[3].list[0].fz_time = moment(`${lastInfos.rw_time_4_open.substr(0,2)}:${lastInfos.rw_time_4_open.substr(2,2)}:00`, 'HH:mm:ss')
                }
                if (lastInfos.rw_time_4_close) { //第五组定时器合闸时分  open:分闸 close:合闸
                  this.fiveTimes[3].list[1].hz_time = moment(`${lastInfos.rw_time_4_close.substr(0,2)}:${lastInfos.rw_time_4_close.substr(2,2)}:00`, 'HH:mm:ss')
                }
              },
              async switchChange(list) {
                let snValue_ = ''
                let result_ = ''
                for (let i = this.snParamList.length-1; i >= 0; i--) {
                  let e = this.snParamList[i];
                  if (e.order === list.order) {
                    if($api.byId('select_' + list.order).checked){
                      console.log(list.paramTitle + '---选中');
                      e.status = true
                    }else {
                      console.log(list.paramTitle + '---未选中');
                      e.status = false
                    }
                    result_ = e.status ? '开启' : '关闭'
                  }
                  let singleV_ = e.status ? '1' : '0'
                  snValue_ += singleV_
                }
                let params = {
                                user_id: this.user_id,
                                imei: this.imei,
                                type: this.productId,
                                command: 'set',
                                request_body: {rw_bhaction_flag: parseInt(snValue_,2).toString()}
                              }
                api.showProgress({
                  style: 'default',
                  animationType: 'fade',
                  title: '加载中...',
                  text: '',
                  modal: true
                });
                let setCmdReq = await post_normal_set_device(params,that.token)
                if (setCmdReq.data.upRet) {
                  let upRet = JSON.parse(setCmdReq.data.upRet)
                  if (setCmdReq.code == 0 && setCmdReq.msg == '操作成功' && upRet.rescode == 200) {
                    api.toast({msg: '控制' + list.paramTitle + result_ + '成功',duration: 2000,location: 'bottom'});
                  }else {
                    // that.di1_str = oldDi1
                    // that.di2_str = oldDi2
                    api.toast({msg: '控制' + list.paramTitle + result_ + '失败',duration: 2000,location: 'bottom'});
                  }
                }
                // 射完立马get一下
                params.command = 'get'
                params.request_body = ['rw_bhaction_flag']
                console.log(JSON.stringify(params));
                let getCmdReq = await post_normal_set_device(params,that.token)
                console.log(JSON.stringify(getCmdReq));
                api.hideProgress();
                this.initSecondPage()
              },
              changeTiming1(list) {
                let date_,
                    title_;
                if (list.order1 === 4) {
                  date_ = this.fz_time.format("HH:mm")
                  title_ = '设置定时分闸时间'
                }else if (list.order1 === 5) {
                  date_ = this.hz_time.format("HH:mm")
                  title_ = '设置定时合闸时间'
                }
                api.openPicker({
                    type: 'time',
                    date: date_,
                    title: title_,
                },async function(ret, err) {
                  if (ret) {
                    let timeV_
                    if (ret.hour<10) {
                      timeV_ = '0' + ret.hour
                    }else {
                      timeV_ = '' + ret.hour
                    }
                    if (ret.minute<10) {
                      timeV_ = timeV_ + '0' + ret.minute
                    }else {
                      timeV_ = '' + timeV_ + ret.minute
                    }
                    let json_
                    eval("json_ = {" + list.sign + ":" + timeV_ + "}")
                    let params = {
                      user_id: that.user_id,
                      imei: that.imei,
                      type: that.productId,
                      command: 'set',
                      request_body: json_
                    }
                    api.showProgress({
                      style: 'default',
                      animationType: 'fade',
                      title: '加载中...',
                      text: '',
                      modal: true
                    });
                    let setCmdReq = await post_normal_set_device(params,that.token)
                    console.log(JSON.stringify(setCmdReq));
                    if (setCmdReq.data.upRet) {
                      let upRet = JSON.parse(setCmdReq.data.upRet)
                      if (setCmdReq.code == 0 && setCmdReq.msg == '操作成功' && upRet.rescode == 200) {
                        api.toast({msg: '设置时间成功',duration: 2000,location: 'bottom'});
                      }else {
                        api.toast({msg: '设置时间失败',duration: 2000,location: 'bottom'});
                      }
                    }
                    // 射完立马get一下
                    params.command = 'get'
                    // if (list.order === 4) {
                    //   params.request_body = ["rw_dsfzsfzd"]
                    // }else if (list.order === 5) {
                    //   params.request_body = ["rw_dshzsfzd"]
                    // }
                    eval('params.request_body = ["' + list.sign + '"]')
                    let getCmdReq = await post_normal_set_device(params,that.token)
                    console.log(JSON.stringify(getCmdReq));
                    api.hideProgress();
                    that.initThirdPage()
                  }
                });
              },
              changeTiming(list) {
                let date_,
                    title_;
                if (list.order === 4) {
                  date_ = this.fz_time.format("HH:mm")
                  title_ = '设置定时分闸时间'
                }else if (list.order === 5) {
                  date_ = this.hz_time.format("HH:mm")
                  title_ = '设置定时合闸时间'
                }
                api.openPicker({
                    type: 'time',
                    date: date_,
                    title: title_,
                },async function(ret, err) {
                  if (ret) {
                    let timeV_
                    if (ret.hour<10) {
                      timeV_ = '0' + ret.hour
                    }else {
                      timeV_ = '' + ret.hour
                    }
                    if (ret.minute<10) {
                      timeV_ = timeV_ + '0' + ret.minute
                    }else {
                      timeV_ = '' + timeV_ + ret.minute
                    }
                    console.log(JSON.stringify(timeV_));
                    let json_
                    if (list.order === 4) {
                      json_ = {rw_dsfzsfzd: timeV_}
                    }else if (list.order === 5) {
                      json_ = {rw_dshzsfzd: timeV_}
                    }
                    let params = {
                      user_id: that.user_id,
                      imei: that.imei,
                      type: that.productId,
                      command: 'set',
                      // control_name: ''
                      request_body: json_
                    }
                    api.showProgress({
                      style: 'default',
                      animationType: 'fade',
                      title: '加载中...',
                      text: '',
                      modal: true
                    });
                    let setCmdReq = await post_normal_set_device(params,that.token)
                    console.log(JSON.stringify(setCmdReq));
                    if (setCmdReq.data.upRet) {
                      let upRet = JSON.parse(setCmdReq.data.upRet)
                      if (setCmdReq.code == 0 && setCmdReq.msg == '操作成功' && upRet.rescode == 200) {
                        api.toast({msg: '设置' + list.paramTitle + '成功',duration: 2000,location: 'bottom'});
                      }else {
                        api.toast({msg: '设置' + list.paramTitle + '失败',duration: 2000,location: 'bottom'});
                      }
                    }
                    // 射完立马get一下
                    params.command = 'get'
                    if (list.order === 4) {
                      params.request_body = ["rw_dsfzsfzd"]
                    }else if (list.order === 5) {
                      params.request_body = ["rw_dshzsfzd"]
                    }
                    console.log(JSON.stringify(params));
                    let getCmdReq = await post_normal_set_device(params,that.token)
                    console.log(JSON.stringify(getCmdReq));
                    api.hideProgress();
                    that.initThirdPage()
                  }
                });
              },
              async switchChange4FiveTimes(list) {
                let snValue_ = ''
                let result_ = ''
                for (let i = this.fiveTimes.length-1; i >= 0; i--) {
                  let d = this.fiveTimes[i];
                  for (let j = 0; j < d.list.length; j++) {
                    const d_list = d.list[j];
                    if (d_list.order === list.order) {
                      if($api.byId('select2_' + list.order1 + '_' + list.order).checked){
                        console.log(list.name + '---选中');
                        d_list.status = true
                      }else {
                        console.log(list.name + '---未选中');
                        d_list.status = false
                      }
                      result_ = d_list.status ? '开启' : '关闭'
                    }
                    let singleV_ = d_list.status ? '1' : '0'
                    snValue_ += singleV_
                  }
                }
                snValue_ = '00000000'+snValue_
                let params = {
                  user_id: this.user_id,
                  imei: this.imei,
                  type: this.productId,
                  command: 'set',
                  request_body: {rw_time: parseInt(snValue_,2).toString()}
                }
                api.showProgress({
                  style: 'default',
                  animationType: 'fade',
                  title: '加载中...',
                  text: '',
                  modal: true
                });
                let setCmdReq = await post_normal_set_device(params,that.token)
                if (setCmdReq.data.upRet) {
                  let upRet = JSON.parse(setCmdReq.data.upRet)
                  if (setCmdReq.code == 0 && setCmdReq.msg == '操作成功' && upRet.rescode == 200) {
                    api.toast({msg: '控制' + list.name + result_ + '成功',duration: 2000,location: 'bottom'});
                  }else {
                    api.toast({msg: '控制' + list.name + result_ + '失败',duration: 2000,location: 'bottom'});
                  }
                }
                // 射完立马get一下
                params.command = 'get'
                params.request_body = ['rw_time']
                let getCmdReq = await post_normal_set_device(params,that.token)
                api.hideProgress();
                this.initThirdPage()
              },
              //单独设置环境温度使能
              async switchChangeTemp() {
                let res = ''
                let rw_envir_temp_sign = ''
                for(let key in this.tempFlags){
                  if(this.tempFlags[key].value === true){
                    res = '关闭'
                    rw_envir_temp_sign = '0' + rw_envir_temp_sign
                  }else{
                    res = '开启'
                    rw_envir_temp_sign = '1' + rw_envir_temp_sign
                  }
                }
                let params = {
                  user_id: this.user_id,
                  imei: this.imei,
                  type: this.productId,
                  command: 'set',
                  request_body: {rw_envir_temp_sign: parseInt(rw_envir_temp_sign,2).toString()}
                }
                api.showProgress({
                  style: 'default',
                  animationType: 'fade',
                  title: '加载中...',
                  text: '',
                  modal: true
                });
                let setCmdReq = await post_normal_set_device(params,that.token)
                if (setCmdReq.data.upRet) {
                  let upRet = JSON.parse(setCmdReq.data.upRet)
                  if (setCmdReq.code == 0 && setCmdReq.msg == '操作成功' && upRet.rescode == 200) {
                    api.toast({msg: res + '环境温度使能成功',duration: 2000,location: 'bottom'});
                  }else {
                    api.toast({msg: res + '控制环境温度使能失败',duration: 2000,location: 'bottom'});
                  }
                }
                // 射完立马get一下
                params.command = 'get'
                params.request_body = ['rw_envir_temp_sign']
                let getCmdReq = await post_normal_set_device(params,that.token)
                api.hideProgress();
                this.initFourthPage()
              }
            }
          })
      };
  </script>
</html>