<template>
  <div class="p25">
    <div class="border-grey-bottom">
      <h3>{{ detailMsg.ddrw_name }}</h3>
      <div class="d-flex mt15 text-lightdark">
        <div class="mr20">
          <span class="text-black">督导类型：</span>{{ detailMsg.dd_lx }}
        </div>
        <div class="mr20">
          <span class="text-black">督导对象：</span>{{ detailMsg.dd_dx }}
        </div>
        <div class="mr20"><span class="text-black">附件数: </span>不限</div>
        <div class="mr20">
          <span class="text-black">责任人：</span>{{ detailMsg.dd_zrr }}
        </div>
        <div class="mr20">
          <span class="text-black">责任部门：</span>{{ detailMsg.dd_zrbm }}
        </div>
      </div>
      <div class="d-flex mt15 text-lightdark">
        <div class="mr20">
          <span class="text-black">任务开始时间:</span>{{ detailMsg.ddrw_kssj }}
        </div>
        <div class="mr20">
          <span class="text-black">任务结束时间:</span>{{ detailMsg.ddrw_jssj }}
        </div>
      </div>
      <p class="text-lightdark">{{ detailMsg.ddrw_content }}</p>
    </div>
    <el-table
      :data="detailMsg.tableData"
      tooltip-effect="dark"
      v-loading="loading"
      style="width: 100%"
    >
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-form label-position="left" inline class="demo-table-expand">
            <el-form-item label="佐证材料:">
              <span>{{ props.row.ddrw_zzcl }}</span>
            </el-form-item>
          </el-form>
        </template>
      </el-table-column>
      <el-table-column label="序号" align="center" type="index" width="50">
      </el-table-column>
      <el-table-column
        label="指标名称"
        show-overflow-tooltip
        prop="ddrw_name"
      ></el-table-column>
      <el-table-column
        label="指标内容"
        show-overflow-tooltip
        prop="ddlx_zbnr"
      ></el-table-column>
      <el-table-column
        label="指标分值"
        prop="ddlx_zbfz"
      ></el-table-column>
      <el-table-column
        label="责任部门"
        show-overflow-tooltip
        prop="ddjh_zrbm"
      ></el-table-column>
      <el-table-column
        label="任务内容"
        show-overflow-tooltip
        prop="ddqk_content"
      ></el-table-column>
      <el-table-column
        label="自评"
        show-overflow-tooltip
        prop="ddqk_zp"
      ></el-table-column>
      <el-table-column label="自评分" prop="ddqk_zpf"></el-table-column>

      <el-table-column
        label="附件完成情况"
        prop="ddqk_name"
      ></el-table-column>
      <el-table-column label="状态" >
        <template slot-scope="scope">
          <div v-if="scope.row.ddrw_zt == '1'">待审核</div>
          <div v-if="scope.row.ddrw_zt == '2'">进行中</div>
          <div v-if="scope.row.ddrw_zt == '2'">已审核</div>
        </template>
      </el-table-column>
      <el-table-column show-overflow-tooltip label="审核意见" >
        <template slot-scope="scope">
          <div v-if="scope.row.ddqk_shyj">{{ scope.row.ddqk_shyj }}</div>
          <div v-else>--</div>
        </template>
      </el-table-column>
      <el-table-column label="审核分数" >
        <template slot-scope="scope">
          <div v-if="scope.row.ddqk_shfs">{{ scope.row.ddqk_shfs }}</div>
          <div v-else>--</div>
        </template>
      </el-table-column>
      <el-table-column label="审核人" prop="ddrw_shr" >
        <template slot-scope="scope">
          <div v-if="scope.row.ddrw_shr">{{ scope.row.ddrw_shr }}</div>
          <div v-else>--</div>
        </template>
      </el-table-column>
      <el-table-column label="操作" show-overflow-tooltip >
        <template slot-scope="scope">
          <el-button type="text" @click="auditData(scope.row)">审核 </el-button>
        </template></el-table-column
      >
    </el-table>
  </div>
</template>
<script>
import { rwfk_detail } from './api.js';
export default {
  name: "index",
  data() {
    return {
      loading: false,
      detailMsg: {
        ddrw_name: "任务名称名称名称名称名称名称名称",
        dd_lx: "",
        dd_dx: "",
        dd_zrr: "",
        dd_zzbm: "",
        ddrw_kssj: "",
        ddrw_jssj: "",
        ddrw_content:
          "任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容",
        tableData: [
          {
            id: "1",
          },
        ],
      },
    };
  },
  methods: {
    getDetail() {
      let data = {
        // site: 'jnmf',
        jddx_id: this.$route.params.id,
      }
      rwfk_detail(data).then(res => {
  console.log(res);
})
    }
  },
  mounted() {
    this.getDetail();
  },
};
</script>
<style lang="scss" scoped>
.wight {
  font-weight: 500;
}
</style>