<template>
  <div class="page-container executeResult-infoPage">
    <div class="page-top-title-box">
      <p class="page-top-title-name-p">执行结果</p>
      <p class="page-top-title-out-p" @click="backPage">返回</p>
    </div>
    <div class="content-box scrollbar-box">
      <el-form class="add-form-box">
        <div class="text-max-box">
          <p>管控名称：</p>
          <p>{{newData.name}}</p>
        </div>
        <div class="text-max-box">
          <p>管控描述：</p>
          <p>{{newData.manageDes}}</p>
        </div>
        <div class="text-max-box">
          <p>二级单位：</p>
          <p>{{newData.deptName}}</p>
        </div>
        <div class="text-max-box">
          <p>安全分类：</p>
          <p>{{newData.typeName}}</p>
        </div>
        <div class="text-max-box">
          <p>安全分级：</p>
          <p>{{newData.levelName}}</p>
        </div>
        <div class="text-max-box">
          <p>状态：</p>
          <p :class="newData.status == 1?'colorA':'colorB'">{{newData.status == 1?'已执行':'未执行'}}</p>
        </div>
        <div class="text-max-box" v-if="newData.status == 1">
          <p>执行人：</p>
          <p>{{newData.executionUser}}</p>
        </div>
        <div class="text-max-box" v-if="newData.status == 1">
          <p>执行时间：</p>
          <p>{{parseTime(newData.executionTime,"{y}-{m}-{d} {h}:{i}")}}</p>
        </div>
        <div class="text-max-box" v-if="newData.status == 1">
          <p>执行备注：</p>
          <p>{{newData.remark}}</p>
        </div>
      </el-form>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'infoPage',
    props:{
      propsData:{},
    },
    data(){
      return{
        newData:{},
      }
    },
    created(){

    },
    mounted(){
      if(this.propsData.id){
        this.$set(this,'newData',this.propsData);
      }
    },
    methods:{
      // 返回按钮
      backPage(){
        this.$parent.tableButton(6);
      },
    },
  }
</script>

<style scoped lang="scss">
  .executeResult-infoPage{
    .content-box{
      flex:1;
      display: flex;
      padding:20px;
      .text-max-box{
        display: flex;
        p{
          font-size: 16px;
          line-height:40px;
        }
        p:nth-child(1){
          width:120px;
          text-align: right;
        }
        p:nth-child(2){
          width:1200px;
          line-height:20px;
          padding:10px 0;
        }
        .colorA{
          color:#0183FA;
        }
        .colorB{
          color: #c88400;
        }
      }
    }
  }
</style>
