<!--
 * @Author: zhp
 * @Date: 2023-07-14 13:44:46
 * @LastEditTime: 2023-07-14 13:59:46
 * @LastEditors: zhp
 * @Description: 
-->
<template>
  <div>
    <el-drawer :title="$t('customerquality.knowledgeBase')" :visible.sync="drawer" size="50%">
      <div>
        <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
          :limit="listQuery.limit" :table-data="tableData">
          <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
            @clickBtn="handleClick" />
        </base-table>
        <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
          @pagination="getDataList" />
      </div>
    </el-drawer>
  </div>
</template>

<script>
import basicPage from "@/mixins/basic-page"
// import basicSearch from "@/mixins/basic-search"
// import projectTypeSearch from "./components/projectTypeSearch.vue"
import customerquality from '@/filters/customerquality'
// import qmsKnowledgeBaseAdd from "./components/qmsKnowledgeBase-add.vue"
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
  {
    prop: "requirementListName",
    label: i18n.t('customerquality.requirementListName'),
  },
  {
    prop: "uploadFiles",
    label: i18n.t('customerquality.uploadFiles'),
  },
  {
    prop: "categoryName",
    label: i18n.t('customerquality.category'),
  }
];
const tableBtn = [
  {
    type: "edit",
    btnName: i18n.t('edit'),
  },
  {
    type: "delete",
    btnName: i18n.t('delete'),
  },
  {
    type: "configuration",
    btnName: i18n.t('delete'),
  }
];
export default {
  mixins: [basicPage],
    data() {
      return {
        urlOptions: {
          getDataListURL: "/customerquality/qmsKnowledgeBaseRequirementList/page",
          deleteURL: "/customerquality/qmsKnowledgeBase",
          exportURL: '/customerquality/qmsKnowledgeBase/export'
        },
        tableBtn,
        
        tableProps,
        tableData: [],
        drawer: false,
        listQuery: {
          limit: 10,
          page:1,
        }
      }
  },
    methods: {
      init(id) {
        this.listQuery.knowledgeBaseId = id || ""
        // this.dataForm.dictTypeId = dictTypeId || "";
        this.drawer = true
        this.$nextTick(() => {
        });
      },
      handleClick(){
        
      }
    },
  }
</script>

<style lang="scss" scoped>

</style>
