<template>
  <view >
    <view class="wui-form-list">
      <view class="cu-form-group bb-default" >
        <view class="title">申请单位：</view>
        {{pd.APPLY_DEPARTMENT_NAME}}
      </view>

      <view class="cu-form-group bb-default" >
        <view class="title">申请人：</view>
        {{pd.APPLY_USER_NAME}}
      </view>

      <view class="cu-form-group bb-default">
        <view class="title">编号：</view>
        {{pd.CHECK_NO}}
      </view>

      <view class="cu-form-group bb-default">
        <view class="title">作业内容：</view>
        {{pd.WORK_CONTENT}}
      </view>

      <view class="cu-form-group bb-default">
        <view class="title">作业地点：</view>
        {{pd.WORK_PLACE}}
      </view>

      <view  v-if="pd.WORK_START_DATE" class="cu-form-group bb-default">
        <view class="title">作业开始时间：</view>
        {{pd.WORK_START_DATE}}
      </view>
      <view  v-if="pd.WORK_END_DATE" class="cu-form-group bb-default">
        <view class="title">作业结束时间：</view>
        {{pd.WORK_END_DATE}}
      </view>
      <view class="cu-form-group bb-default">
        <view class="title">电源接入点及许可用电功率：</view>
        {{pd.ALLOW_POWER}}
      </view>
      <view class="cu-form-group bb-default">
        <view class="title">用电设备名称及额定功率：</view>
        {{pd.RATED_POWER}}
      </view>
      <view class="cu-form-group bb-default">
        <view class="title">工作电压：</view>
        {{pd.WORK_VOLTAGE}}
      </view>
      <view class="cu-form-group bb-default">
        <view class="title">电工证号：</view>
        {{pd.CARD_NO}}
      </view>

      <view class="cu-form-group bb-default">
        <view class="title">负责人电工号：</view>
        {{pd.LEADER_CARD_NO}}
      </view>
      <view class="cu-form-group bb-default">
        <view class="title">关联的其他特殊作业及安全作业票编号：</view>
        {{pd.SPECIAL_WORK}}
      </view>

      <view class="cu-form-group bb-default">
        <view class="title">风险辨识结果：</view>
        {{pd.RISK_IDENTIFICATION}}
      </view>

      <view class="cu-form-group bb-default">
        <text class="title">分析人：</text>
        <text>{{pd.ANALYZE_USER_NAME}}</text>
        <button class="cu-btn bg-green sm" @click="$noMultipleClicks(goToDetail,pd.ELECTRICITY_ID)">分析详情</button>
      </view>
    </view>

    <view class="wui-form-list" style="padding-top: 20upx;" v-if="showMeasures && measuresList.length > 0">
      <view class="wui-title" style="margin-left: 20upx;">
        <text class="text-semi">安全防护措施</text>
      </view>
      <view class="wui-table" style="padding: 0 20upx;">
        <uni-table name='measuresList' border stripe emptyText="暂无更多数据" >
          <!-- 表头行 -->
          <uni-tr>
            <uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
            <uni-th align="center" style="font-weight: bold;width: 100px">操作</uni-th>
          </uni-tr>
          <uni-tr v-for="(item,index) in measuresList" :key="item.BUS_ELECTRICITY_MEASURES_ID">
            <uni-td>
              <view style="margin-bottom: 20upx;">
                {{item.PROTECTIVE_MEASURES}}
                <view v-if="item.SIGN_PATH" class="cu-item">
                  <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
                    <image :src="baseImgPath + item.SIGN_PATH" :data-index="index" @click="ViewShowImage(baseImgPath + item.SIGN_PATH)"
                           mode="" style="width: 50upx;height: 50upx;"></image>
                    <text> {{item.SIGN_TIME}}</text>
                  </view>
                </view>
              </view>
            </uni-td>
            <uni-td align="center">
              <view class="group" v-if="item.STATUS=='-1'">
                <text class="wui-pl10">不涉及</text>
              </view>
              <view class="group" v-if="item.STATUS=='1'">
                <text class="wui-pl10">涉&nbsp;&nbsp;&nbsp;&nbsp;及</text>
              </view>
              <view v-if="item.IMG_PATH">
                <view class="imgs" v-for="img in item.IMG_PATH.split(',')" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
                  <image :src="baseImgPath + img" :data-index="index" @click="ViewShowImage(baseImgPath + img)"
                         mode="" style="width: 50upx;height: 50upx;"></image>
                </view>
              </view>
            </uni-td>
          </uni-tr>
        </uni-table>
      </view>
    </view>

    <view class="wui-form-list" style="padding-top: 20upx;" v-if="showMeasures && signs.MEASURES_CONFIRM">
      <view class="wui-title" style="margin-left: 20upx;">
        <text class="text-semi">其他安全防护措施</text>
      </view>
      <view class="wui-table" style="padding: 0 20upx;">
        <uni-table border stripe emptyText="暂无更多数据" >
          <uni-tr>
            <uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
            <uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
          </uni-tr>
          <uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_ELECTRICITY_MEASURES_ID">
            <uni-td>
              <view style="margin-bottom: 20upx;">
                {{item.DESCR}}
              </view>
            </uni-td>
            <uni-td align="center">
              <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
                <image :src="baseImgPath + item.SIGN_PATH[0]" :data-index="index" @click="ViewShowImage(baseImgPath + item.SIGN_PATH[0])"
                       mode="" style="width: 50upx;height: 50upx;"></image>
              </view>
            </uni-td>
          </uni-tr>
        </uni-table>
      </view>
    </view>

    <view class="wui-form-list">
      <view v-if="signs.GUARDIAN">
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">监护人</view>
            {{pd.GUARDIAN_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.GUARDIAN[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.GUARDIAN[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.GUARDIAN[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.GUARDIAN[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
      <view v-if="signs.CONFESS">
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">安全交底人</view>
            {{pd.CONFESS_USER_NAME}}
          </view>
          <view v-if="signs.CONFESS[0].IMG_PATH" style="display: flex;align-items: flex-end;padding: 0 30upx">
            <view v-for="(item,index) in signs.CONFESS[0].IMG_PATH" :key="index" style="margin-right:20upx">
              <view class="imgs">
                <image :src="baseImgPath +  signs.CONFESS[0].IMG_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFESS[0].IMG_PATH[index])"
                       mode="" style="width: 50upx;height: 50upx;"></image>
              </view>
            </view>
          </view>
          <view class="cu-item" v-for="(item,index) in signs.CONFESS[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.CONFESS[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFESS[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.CONFESS[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
      <view v-if="signs.ACCEPT_CONFESS">
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">接受交底人</view>
            {{pd.ACCEPT_CONFESS_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.ACCEPT_CONFESS[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.ACCEPT_CONFESS[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.ACCEPT_CONFESS[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.ACCEPT_CONFESS[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
    </view>

    <view class="wui-form-list">
      <view v-if="signs.CONFIRM">
        <view class="cu-form-textarea" style="border: none;">
          <view class="cu-form-title">作业负责人意见</view>
          <textarea maxlength="255" disabled="disabled" v-model="signs.CONFIRM[0].DESCR"></textarea>
        </view>
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">作业负责人</view>
            {{pd.CONFIRM_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.CONFIRM[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.CONFIRM[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFIRM[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.CONFIRM[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
      <view v-if="signs.LEADER">
        <view class="cu-form-textarea" style="border: none;">
          <view class="cu-form-title">所在单位意见</view>
          <textarea maxlength="255" disabled="disabled" v-model="signs.LEADER[0].DESCR"></textarea>
        </view>
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">所在单位负责人</view>
            {{pd.LEADER_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.LEADER[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.LEADER[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.LEADER[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.LEADER[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
      <view v-if="signs.AUDIT">
        <view class="cu-form-textarea" style="border: none;">
          <view class="cu-form-title">安全管理部门意见</view>
          <textarea maxlength="255" disabled="disabled" v-model="signs.AUDIT[0].DESCR"></textarea>
        </view>
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">安全管理部门负责人</view>
            {{pd.AUDIT_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.AUDIT[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.AUDIT[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.AUDIT[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.AUDIT[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>

      <view v-if="signs.APPROVE">
        <view class="cu-form-textarea" style="border: none;">
          <view class="cu-form-title">动火审批人意见</view>
          <textarea maxlength="255" disabled="disabled" v-model="signs.APPROVE[0].DESCR"></textarea>
        </view>
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">动火审批人</view>
            {{pd.APPROVE_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.APPROVE[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.APPROVE[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.APPROVE[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.APPROVE[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>

      <view v-if="signs.MONITOR">
        <view class="cu-form-textarea" style="border: none;">
          <view class="cu-form-title">动火前在岗班长意见</view>
          <textarea maxlength="255" disabled="disabled" v-model="signs.MONITOR[0].DESCR"></textarea>
        </view>
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">动火前在岗班长</view>
            {{pd.MONITOR_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.MONITOR[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.MONITOR[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.MONITOR[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.MONITOR[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
      <view v-if="signs.WORK_START">
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">作业开始负责人</view>
            {{pd.WORK_START_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.WORK_START[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.WORK_START[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.WORK_START[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.WORK_START[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>

      <view v-if="signs.WORK_END">
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">作业结束负责人</view>
            {{pd.WORK_END_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.WORK_END[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.WORK_END[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.WORK_END[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.WORK_END[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
      <view v-if="signs.ACCEPT">
        <view class="cu-form-textarea" style="border: none;">
          <view class="cu-form-title">完工验收</view>
          <textarea maxlength="255" disabled="disabled" v-model="signs.ACCEPT[0].DESCR"></textarea>
        </view>
        <view style="border-bottom: 1px solid #eeeeee;  border-top: 1px solid #eeeeee">
          <view class="cu-form-group" >
            <view class="title">验收部门负责人</view>
            {{pd.ACCEPT_USER_NAME}}
          </view>
          <view class="cu-item" v-for="(item,index) in signs.ACCEPT[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid  #e3e3e3">
            <view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
              <image :src="baseImgPath + signs.ACCEPT[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.ACCEPT[0].SIGN_PATH[index])"
                     mode="" style="width: 200upx;height: 200upx;"></image>
              <text> {{signs.ACCEPT[0].SIGN_TIME[index]}}</text>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import {
  basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
} from '@/common/tool.js';
import tkiTree from "@/components/select-tree/select-tree.vue"
import writingBoard from "@/components/writing-board/writing-board.vue"
import gcoord from '@/common/gcoord.js'
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
import OtherSelect from '@/components/other-select/index.vue';
export default {
  components: {
    tkiTree,ruiDatePicker,writingBoard,OtherSelect
  },
  props: {
    electricityId: {
      type: String,
      default: ""
    },
    showMeasures: {
      type: Boolean,
      default: true
    },
  },
  data() {
    return {
      baseImgPath:baseImgPath,
      buttonloading: false,
      isUps:false,
      msg:'add',
      noClick:true,
      treeNode:[],//部门下拉数据
      levelList:[
        {id:'特级',name:'特级'},
        {id:'一级',name:'一级'},
        {id:'二级',name:'二级'},
      ],
      levelindex:-1,
      files: [],
      files1: [],
      analyzeUserList:[],
      analyzeindex:-1,
      confirmUserList:[],
      workuserindex:-1,
      confessUserList: [],
      confessindex:-1,
      acceptconfessUserList:[],
      acceptconfessindex:-1,
      workUserList:[],
      workstartindex:-1,
      workstartUserList:[],
      workendindex:-1,
      workendUserList:[],
      confirmindex:-1,
      guardianUserList:[],
      guardianindex:-1,
      leaderUserList:[],
      leaderindex:-1,
      auditUserList:[],
      auditindex:-1,
      approveUserList:[],
      approveindex:-1,
      monitorUserList:[],
      monitorindex:-1,
      acceptUserList:[],
      acceptindex:-1,
      pd:{},// 数据
      signs:{},
      measuresList:[],
      rules:[
        // {name:'CHECK_NO',message:'请输入编号'},
        {name:'WORK_CONTENT',message:'请输入作业内容'},
        {name:'WORK_PLACE',message:'请输入动火地点及动火部位'},
        {name:'WORK_LEVEL',message:'请选择动火级别'},
        {name:'WORK_FUNCTION',message:'请输入动火方式'},
        // {name:'WORK_START_DATE',message:'请选择工作开始时间'},
        // {name:'WORK_END_DATE',message:'请选择工作结束时间'},
        // {name:'WORK_MANAGER',message:'请输入作业负责人'},
        {name:'WORK_USER',message:'请输入动火人及证书编号'},
        // {name:'SPECIAL_WORK',message:'请输入关联的其他特殊作业及安全作业票编号'},
        {name:'RISK_IDENTIFICATION',message:'请输入风险辨识结果'},
        // {name:'CONFESS_USER',message:'请输入安全交底人'},
        // {name:'EDUCATE_USER',message:'请输入安全教育人'},
        // {name:'ACCEPT_EDUCATE_USER',message:'请输入接受交底、教育人'},
        // {name:'TRIAL_USER',message:'请输入动火措施初审人'},
        {name:'ANALYZE_USER_ID',message:'请选择分析人'},
        {name:'CONFIRM_USER_ID',message:'请选择作业负责人'},
        // {name:'GUARDIAN_USER_ID',message:'请选择监护人'},
        {name:'LEADER_USER_ID',message:'请选择动火点车间负责人'},
        // {name:'AUDIT_USER_ID',message:'请选择安全管理部门负责人'},
        // {name:'APPROVE_USER_ID',message:'请选择动火审批人'},
        {name:'MONITOR_USER_ID',message:'请选择验票班长'},
        {name:'ACCEPT_USER_ID',message:'请选择验收部门负责人'},
        {name:'GUARDIAN_USER_ID',message:'请选择监护人'},
        {name:'CONFESS_USER_ID',message:'请选择安全交底人'},
        {name:'ACCEPT_CONFESS_USER_ID',message:'请选择接受交底人'},
      ],
      todayDate:'',
      otherAssignments:false,
      otherIdentification:false,

    }
  },
  mounted(){
    console.log(this.electricityId)
    this.todayDate =  formatDate(new Date(), 'yyyy-MM-dd hh:mm');
    this.pd.ELECTRICITY_ID = this.electricityId;
    this.getData();
  },
  methods: {
    //跳转事件
    goToDetail(e) {
      uni.navigateTo({
        url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
      });
    },
    getCode(){
      uni.request({
        url: basePath + '/app/electricity/getCode',
        method: 'POST',
        dataType: 'json',
        header: {
          'Content-type': 'application/x-www-form-urlencoded'
        },
        data: {
          CORPINFO_ID: loginUser.CORPINFO_ID,
        },
        success: (res) => {
          this.pd.CHECK_NO = res.data.code;
        }
      })
    },
    getData() {
      var _this = this;
      uni.showLoading({
        title: '请稍候'
      })
      uni.request({
        url: basePath + '/app/electricity/findById',
        method: 'POST',
        header: {
          'Content-type': 'application/x-www-form-urlencoded'
        },
        data: {
          ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
          CORPINFO_ID:loginUser.CORPINFO_ID,
          USER_ID:loginUser.USER_ID,
        },
        success: (res) => {
          if ("success" == res.data.result) {
            uni.hideLoading();
            _this.pd = res.data.pd; //参数map
            this.getSigns()
            this.getMeasures()
          } else if ("exception" == data.result) {
            uni.showToast({
              title: '错误',
              duration: 2000
            });
          }
        }
      });
    },

    getSigns(){
      var _this = this;
      uni.showLoading({
        title: '请稍候'
      })
      uni.request({
        url: basePath + '/app/electricity/listSignFinished',
        method: 'POST',
        header: {
          'Content-type': 'application/x-www-form-urlencoded'
        },
        data: {
          ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
        },
        success: (res) => {
          if ("success" == res.data.result) {
            uni.hideLoading();
            _this.signs = res.data.signs; //参数map
          } else if ("exception" == data.result) {
            uni.showToast({
              title: '错误',
              duration: 2000
            });
          }
        }
      });
    },

    getMeasures(){
      var _this = this;
      uni.showLoading({
        title: '请稍候'
      })
      uni.request({
        url: basePath + '/app/electricity/listSignFinishMeasures',
        method: 'POST',
        header: {
          'Content-type': 'application/x-www-form-urlencoded'
        },
        data: {
          ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
        },
        success: (res) => {
          if ("success" == res.data.result) {
            uni.hideLoading();
            _this.measuresList = res.data.finishMeasuresList; //参数map
          } else if ("exception" == data.result) {
            uni.showToast({
              title: '错误',
              duration: 2000
            });
          }
        }
      });
    },

    ViewShowImage(url) {
      let files = [];
      files.push(url)
      uni.previewImage({
        urls: files,
        current: 0
      });
    },
    ViewShowImage1(url) {
      let files1 = [];
      files1.push(url)
      uni.previewImage({
        urls: files1,
        current: 0
      });
    },
  }
}
</script>

<style>

</style>
