<template>
  <basic-page-list :desc="desc" :options="pageOptions"></basic-page-list>
</template>

<script>
import BASE_URL from '@/services/mes/api.js';


export default { 
  i18n: require("./i18n"), 
  props: {

  },
  data() {
    return {
      pageOptions: {}
    };
  },
  // 计算属性
  computed: {
    // 页面描述
    desc() {
      return this.$t("pageDesc");
    }
  }, 


  // 创建完成
  created() {
    this.optionsInit();
  },
  // 动作
  methods: {

    optionsInit() {
      // 页面数据
      var pageData = { // 页面数据变量

        keyName: 'id', // 主键字段名 
        listFieldName: 'MesCeramicsMaterialClassification',

        addPageUrl: "/MesCeramicsMaterialClassification/MesCeramicsMaterialClassificationAdd",
        editPageUrl: "/MesCeramicsMaterialClassification/MesCeramicsMaterialClassificationUpdate/",

        // 接口动作
        actions: { // Api 接口地址
        // =============================== 接口地址 自动生成 Start ===============================
					MesCeramicsMaterialClassificationList: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/list`, // 陶瓷类物料分类列表
					MesCeramicsMaterialClassificationDetail: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/detail`, // 陶瓷类物料分类详情
					MesCeramicsMaterialClassificationCreate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/create`, // 创建陶瓷类物料分类
					MesCeramicsMaterialClassificationUpdate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/update`, // 更新陶瓷类物料分类
					MesCeramicsMaterialClassificationDelete: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/detele`, // 删除陶瓷类物料分类
					MesCeramicsMaterialClassificationBatchDelete: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/batchDelete`, // 批量删除陶瓷类物料分类
					MesCeramicsMaterialClassificationBatchUpdate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/batchUpdate`, // 批量更新陶瓷类物料分类
					MesCeramicsMaterialClassificationBatchCreate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/batchCreate`, // 批量创建陶瓷类物料分类
					MesCeramicsMaterialClassificationExportExcel: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/export/excel`, // 导出陶瓷类物料分类数据到EXCEL
					MesCeramicsMaterialClassificationImportExcel: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/mes/ceramics/material/classification/import/excel`, // 批量导入EXCEL陶瓷类物料分类数据
					CeramicMaterialClassificationProcessSegmentList: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/list`, // 关联工序段物料分类列表
					CeramicMaterialClassificationProcessSegmentDetail: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/detail`, // 关联工序段物料分类详情
					CeramicMaterialClassificationProcessSegmentCreate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/create`, // 创建关联工序段物料分类
					CeramicMaterialClassificationProcessSegmentUpdate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/update`, // 更新关联工序段物料分类
					CeramicMaterialClassificationProcessSegmentDelete: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/detele`, // 删除关联工序段物料分类
					CeramicMaterialClassificationProcessSegmentBatchDelete: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/batchDelete`, // 批量删除关联工序段物料分类
					CeramicMaterialClassificationProcessSegmentBatchUpdate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/batchUpdate`, // 批量更新关联工序段物料分类
					CeramicMaterialClassificationProcessSegmentBatchCreate: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/batchCreate`, // 批量创建关联工序段物料分类
					CeramicMaterialClassificationProcessSegmentExportExcel: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/export/excel`, // 导出关联工序段物料分类数据到EXCEL
					CeramicMaterialClassificationProcessSegmentImportExcel: `${BASE_URL.BASE_URL}/MesCeramicsMaterialClassification/v1/ceramic/material/classification/process/segment/import/excel`, // 批量导入EXCEL关联工序段物料分类数据

        // =============================== 接口地址 自动生成 End ===============================
      },

        start_time: 0, // 开始时间
        end_time: 0, // 结束时间


        //搜索区
        searchFormData: {
          title: '',
          desc: '',
        },
        // 搜索区配置
        searchRules: [
          { key: "title", mode: "like" },
          { key: "desc", mode: "like" }
        ],
        //搜索区
        searchFormItems: [ // 子项
          { field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入标题' } } },
          { field: 'desc', title: '描述', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入描述' } } },
          { span: 8, slots: { default: 'date' } },  // 自定义列
          {
            align: 'right', span: 4, itemRender: {  // 按钮列
              name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } },  // 搜索按钮
              { props: { type: 'reset', content: '重置' } }]
            }
          }
        ],


        //数据区
        gridOptions: { // 表格配置
          height: '100%', // 表格高度  100% 会自动撑满父容器
          stripe: true, // 启用斑马纹
          id: 'datagrid_1', // 表格唯一标识

        // 表格列配置
        columns: [
          { type: 'checkbox', width: 'auto' }, // 多选框
          { type: 'seq', width: 'auto' }, // 序号

          { title: '操作', slots: { default: 'op' }, width: 120 },

          // =============================== 表格列 自动生成 Start ===============================
 
					{ field: 'code', sortable: true, title: '编码', width: 250 }, // 编码
					{ field: 'name', sortable: true, title: '分类名称', width: 250 }, // 分类名称
					{ field: 'english_name', sortable: true, title: '分类英文名称', width: 250 }, // 分类英文名称 
					{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
					{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间

          // =============================== 表格列 自动生成 Start ===============================


        ]
        }

      };

    pageData.actions.getList = pageData.actions.MesCeramicsMaterialClassificationList;
    pageData.actions.delete = pageData.actions.MesCeramicsMaterialClassificationBatchDelete;
      pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据


      this.pageOptions = pageData;
    },


  },
  watch: {

  }
};

</script> 