<template>
  <div class="indicatorDetail">
    <el-form :model="dialogForm" ref="addForm" label-width="110px" label-position="left">
      <el-form-item label="指标名称" prop="jddr_name">
        <el-input readonly v-model="dialogForm.jddr_name"></el-input>
      </el-form-item>
      <el-form-item label="指标内容" prop="jddr_content">
        <el-input readonly v-model="dialogForm.jddr_content" type="textarea" rows="5"></el-input>
      </el-form-item>
      <el-form-item label="指标说明" prop="jddr_brief">
        <el-input readonly v-model="dialogForm.jddr_brief" type="textarea" rows="5"></el-input>
      </el-form-item>
      <el-form-item label="指标分数" prop="jddr_score">
        <el-input readonly v-model="dialogForm.jddr_score" type="number" :min="0"></el-input>
      </el-form-item>
      <el-form-item label="附件数量" prop="jddr_fjsl">
        <el-input readonly v-model="dialogForm.jddr_fjsl" type="number" :min="0"></el-input>
      </el-form-item>
      <el-form-item label="计划起始时间" prop="jddr_start_date">
        <el-date-picker readonly v-model="time" type="daterange" style="width: 100%;" />
      </el-form-item>
      <el-form-item label="责任部门" prop="jddr_uo_name">
        <el-input readonly v-model="dialogForm.jddr_uo_name"></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { rwzbDetail } from "./api";
export default {
  data() {
    return {
      dialogForm: {},
      time: [],
    }
  },
  props: ["currentId"],
  watch: {
    currentId: {
      immediate: true,
      handler(val) {
        this.initDetailInfo(val);
      }
    }
  },
  methods: {
    async initDetailInfo(id) {
      let res = await rwzbDetail({ jddr_id: id });
      this.dialogForm = res.one_info;
      this.time = [this.dialogForm.jddr_start_date, this.dialogForm.jddr_end_date];
    },
  }
}
</script>

<style>
</style>