<!--
 * @Author: zwq
 * @Date: 2021-11-18 14:16:25
 * @LastEditors: zwq
 * @LastEditTime: 2023-06-30 16:23:19
 * @Description:
-->
<template>
<el-descriptions title="">
    <el-descriptions-item label="标题">{{ dataInfo.title }}</el-descriptions-item>
    <el-descriptions-item label="产品">{{ dataInfo.productName }}</el-descriptions-item>
    <el-descriptions-item label="发生日期">{{ dataInfo.occurrenceDate | timeFormatter }}</el-descriptions-item>
    <el-descriptions-item label="配套产品/系统">{{ dataInfo.supportProducts }}</el-descriptions-item>
    <el-descriptions-item label="启动人">{{ dataInfo.userName }}</el-descriptions-item>
    <el-descriptions-item label="8D类型">{{ eightDisciplineType[dataInfo.eightDisciplineType] }}</el-descriptions-item>
</el-descriptions>
</template>

<script>
import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter";
export default {
  data() {
    return {
        dataInfo: '',
    eightDisciplineType: {
    1: '客诉问题',
    2: '重大质量问题',
    0: '重复发生问题',
  },
    }
  },
  methods: {
    init(id) {
        console.log(codeFilter('eightDisciplineType'))
      this.$nextTick(() => {
      this.$http
        .get(`/code/startEightDiscipline/${id}`)
        .then(({ data: res }) => {
          this.dataListLoading = false;
          if (res.code !== 0) {
            this.dataInfo = '';
            return this.$message.error(res.msg);
          }
          this.dataInfo = res.data;
        })
        .catch(() => {
        })
      });
    },
  }
}
</script>
