<template>
  <el-dialog :visible.sync="visible" :title="title" width="600">
    <table class="table-ui">
      <tr>
        <td class="tbg">类目名称</td>
        <td>{{ form.DICTIONARY_NAME }}</td>
      </tr>
      <tr>
        <td class="tbg">类别</td>
        <td>{{ form.DICTIONARY_LEVEL ? (form.DICTIONARY_LEVEL === 1 ? '标准类别' : '标准项目') : '' }}</td>
      </tr>
      <tr v-if="form.DICTIONARY_LEVEL !== 1">
        <td class="tbg">标准类别</td>
        <td>{{ form.DICTIONARY_NAMES.substr(0,form.DICTIONARY_NAMES.lastIndexOf(',')) }}</td>
      </tr>
      <tr>
        <td class="tbg">来源</td>
        <td>{{ form.DICTIONARY_SOURCE ? (form.DICTIONARY_SOURCE === 1 ? '运营添加' : '企业自建') : '' }}</td>
      </tr>
      <tr>
        <td class="tbg">排序</td>
        <td>{{ form.DICTIONARY_SORT }}</td>
      </tr>
      <!--      <tr>
        <td class="tbg">状态</td>
        <td colspan="3">{{ form.COMMON_STATUS ? (form.COMMON_STATUS === 1 ? '有效' : '停用') : '' }}</td>
      </tr>-->
    </table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="close">取 消</el-button>
    </div>
  </el-dialog>
</template>
<script>
import waves from '@/directive/waves'
export default {
  directives: { waves },
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      loading: true,
      visible: false,
      form: {
        DICTIONARY_ID: '',
        DICTIONARY_NAME: '',
        PARENT_ID: '',
        PARENT_IDS: '',
        DICTIONARY_NAMES: '',
        DICTIONARY_LEVEL: '',
        DICTIONARY_SORT: '',
        DICTIONARY_SOURCE: ''
      }
    }
  },
  created() {
  },
  methods: {
    init(e) {
      this.visible = true
      if (e) {
        this.form = e
      }
    },
    close() {
      this.visible = false
    }
  }
}

</script>

<style scoped>
.tbg{
  width: 110px !important;
}
</style>
