<template>
  <view class="content">
    <view class="card">
      <u-cell-group :border="false">
        <u-cell>
          <view slot="title" class="title">申请单位：</view>
          <view slot="value">{{ form.APPLY_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">申请办理人：</view>
          <view slot="value">{{ form.APPLY_USER_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">作业编号：</view>
          <view slot="value">{{ form.JOB_NUMBER }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">申请日期：</view>
          <view slot="value">{{ form.APPLICATION_DATE }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">作业类型：</view>
          <view slot="value">{{ form.JOB_TYPE_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火部位：</view>
          <view slot="value">{{ form.HOT_WORK_POSITION }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火方法：</view>
          <view slot="value">{{ form.HOT_WORK_METHOD_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火等级：</view>
          <view slot="value">{{ form.HOT_WORK_LEVEL_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火负责人确认部门：</view>
          <view slot="value">{{ form.CHARGECONFIRM_DEPT_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火负责人确认负责人：</view>
          <view slot="value">{{ form.CHARGECONFIRM_USER_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火开始时间：</view>
          <view slot="value">{{ form.HOT_WORK_TIME_START }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火结束时间：</view>
          <view slot="value">{{ form.HOT_WORK_TIME_END }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">作业地点：</view>
          <view slot="value">
            <view>经度：{{form.WORK_LONGITUDE}}</view>
            <view>纬度：{{form.WORK_LATITUDE}}</view>
          </view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">作业内容：</view>
          <view slot="value">{{ form.JOB_CONTENT }}</view>
        </u-cell>

        <u-cell>
          <view slot="title" class="title">现场负责人部门：</view>
          <view slot="value">{{ form.SITE_LEADER_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">现场负责人：</view>
          <view slot="value">{{ form.SITE_LEADER_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">现场负责人电话：</view>
          <view slot="value">{{ form.SITE_LEADER_PHONE }}</view>
        </u-cell>


        <u-cell>
          <view slot="title" class="title">动火操作人：</view>
          <view slot="label" class="mt-10">
            <uni-table border stripe emptyText="暂无更多数据">
              <uni-tr></uni-tr>
              <uni-tr v-for="item in form.HOT_WORK_OPERATOR_NAME" :key="item">
                <uni-td>{{ item }}</uni-td>
              </uni-tr>
            </uni-table>
          </view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火监火人：：</view>
          <view slot="value">{{ form.SUPERVISOR_OF_HOT_WORK_UNIT }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火单位(部门)：</view>
          <view slot="value">{{ form.HOT_WORK_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火单位(部门)负责人：</view>
          <view slot="value">{{ form.HOT_WORK_USER_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火单位(部门)负责人电话：</view>
          <view slot="value">{{ form.HOT_WORK_USER_PHONE }}</view>
        </u-cell>


        <u-cell>
          <view slot="title" class="title">现场管辖单位(部门)：：</view>
          <view slot="value">{{ form.UNIT_LEADER_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">现场管辖单位(部门)负责人：</view>
          <view slot="value">{{ form.UNIT_LEADER_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">现场管辖单位(部门)负责人电话：</view>
          <view slot="value">{{ form.UNIT_LEADER_PHONE }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火许可证签发单位：</view>
          <view slot="value">{{ form.ISSUING_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火许可证签发负责人：</view>
          <view slot="value">{{ form.ISSUING_USER_NAME }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">动火许可证签发负责人电话：</view>
          <view slot="value">{{ form.ISSUING_USER_PHONE }}</view>
        </u-cell>
        <u-cell>
        <u-cell v-if="form.PROJECT_UNIT_LEADER_DEPARTMENT_NAME">
          <view slot="title" class="title">项目发包单位负责人部门：</view>
          <view slot="value">{{ form.PROJECT_UNIT_LEADER_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell v-if="form.PROJECT_UNIT_LEADER_NAME">
          <view slot="title" class="title">项目发包单位负责人：</view>
          <view slot="value">{{ form.PROJECT_UNIT_LEADER_NAME }}</view>
        </u-cell>
        <u-cell v-if="form.PROJECT_UNIT_LEADER_PHONE">
          <view slot="title" class="title">项目发包单位负责人电话：</view>
          <view slot="value">{{ form.PROJECT_UNIT_LEADER_PHONE }}</view>
        </u-cell>


          <view slot="title" class="title">是否安全总监审批：</view>
          <view slot="value">{{ form.IS_SAFETY_DIRECTOR==1?'是':'否' }}</view>
        </u-cell>
        <u-cell v-if="form.IS_SAFETY_DIRECTOR==1">
          <view slot="title" class="title">安全总监单位：</view>
          <view slot="value">{{ form.SAFETY_DIRECTOR_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell v-if="form.IS_SAFETY_DIRECTOR==1">
          <view slot="title" class="title">安全总监：</view>
          <view slot="value">{{ form.SAFETY_DIRECTOR_USER_NAME }}</view>
        </u-cell>
        <u-cell v-if="form.IS_SAFETY_DIRECTOR==1">
          <view slot="title" class="title">安全总监电话：</view>
          <view slot="value">{{ form.SAFETY_DIRECTOR_PHONE }}</view>
        </u-cell>
        <u-cell>
          <view slot="title" class="title">是否需要气体检测：</view>
          <view slot="value">{{ form.IS_GAS_TESTING==1?'是':'否' }}</view>
        </u-cell>
        <u-cell v-if="form.IS_GAS_TESTING==1">
          <view slot="title" class="title">气体检测人员单位：</view>
          <view slot="value">{{ form.GAS_TESTING_DEPARTMENT_NAME }}</view>
        </u-cell>
        <u-cell v-if="form.IS_GAS_TESTING==1">
          <view slot="title" class="title">气体检测人员：</view>
          <view slot="value">{{ form.GAS_TESTING_USER_NAME }}</view>
        </u-cell>
        <u-cell v-if="form.IS_GAS_TESTING==1">
          <view slot="title" class="title">气体检测人员电话：</view>
          <view slot="value">{{ form.GAS_TESTING_USER_PHONE }}</view>
        </u-cell>
      </u-cell-group>
    </view>
  </view>
</template>

<script>
	import {
		getHotWorkGoEdit,
	} from "../../../api";
export default {
  data() {
    return {
      form: {},
      HOTWORKAPPLICATION_ID:''
    }
  },
  onLoad(event) {
    this.HOTWORKAPPLICATION_ID = event.HOTWORKAPPLICATION_ID
	this.getDate()
  },
  methods:{
	async getDate(){
	  let resData = await getHotWorkGoEdit({HOTWORKAPPLICATION_ID:this.HOTWORKAPPLICATION_ID});
	  this.form = resData.pd
	  let HOT_WORK_OPERATOR_NAME = resData.pd.HOT_WORK_OPERATOR_NAME
	  this.$set(this.form, 'HOT_WORK_OPERATOR_NAME', HOT_WORK_OPERATOR_NAME.substring(0, HOT_WORK_OPERATOR_NAME.length - 1).split(','))
	  // this.form.HOT_WORK_OPERATOR_NAME = HOT_WORK_OPERATOR_NAME.substring(0, HOT_WORK_OPERATOR_NAME.length - 1).split(',');

	}
  }
}
</script>

<style scoped>

</style>
