<template>
  <div class="des_bg">
    <el-descriptions :column="1" class="margin-top" style="display: flex;justify-content: center;align-items: center;">
      <el-descriptions-item label="核对结果">
        <el-tag :type="formState.improvedType && options.checkResultTagType[formState.improvedType].type">{{
          getDictLabel(options.checkResult,
                       formState.improvedType) }}</el-tag>
        <!--        <el-button v-if="formState.improvedType === '2'" type="text" style="padding: 0px;line-height: 20px;margin-left: 14px;" @click="$router.push({ name: 'ToyInfo', params: { toyId: toyBaseInfoId } })">查看关联玩具</el-button>-->
      </el-descriptions-item>
      <el-descriptions-item label="审核状态">
        <el-tag
          v-if="formState.improvedStatus !== '1'"
          :type="formState.improvedStatus && options.improveStatusTagType[formState.improvedStatus].type"
        >{{
          getDictLabel(options.improveStatus,
                       formState.improvedStatus) }}</el-tag>
        <span v-else>--</span>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>
<script>
import options from '@/utils/dict/options'
import DictType from '@/utils/dict/DictType'
import { getDictLabel } from '@/utils/dict/config'

export default {
  props: {
    formState: {
      type: Object,
      required: () => ({
        improvedType: '',
        improvedStatus: ''
      })
    }
  },
  data() {
    return {
      DictType,
      options
    }
  },
  // computed: {
  //   localValue: {
  //     get() {
  //       return this.value
  //     },
  //     set(val) {
  //       this.$emit('update:value', val)
  //     }
  //   }
  // },
  methods: {
    getDictLabel
  }
}
</script>

<style lang="scss" scoped>
::v-deep {
  .el-descriptions-item__container {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
::v-deep {
  .el-descriptions__body {
    background: rgba(0,178,128,0.05) !important;
    padding-top: 10px;
  }
  .el-descriptions-item__container {
    margin-left: 16px;
  }
}
</style>
