<template>
  <div class="index_container">
    <div style="height: 100px"></div>
    <ces-table
      class="r_yhgl_table"
      size="mini"
      :headers="headers"
      :url="url"
      :searchShow="true"
      :addRowBtn="addRowBtn"
      :isDialog="true"
      :isSelection="true"
      :isIndex="true"
      :confirmOptions="confirmOptions"
      :detailsUrl="detailsUrl"
      @primary-edit="editItem"
    ></ces-table>
  </div>
</template>

<script>
import cesTable from "@/components/table-um";
export default {
  data: () => ({
    headers: [
      { label: "服务url", prop: "date", type: "href", align: "left" },
      { label: "服务名称", prop: "name", type: "input", align: "center" },
      { label: "中文名", prop: "address", type: "input", align: "right" },
      {
        label: "操作",
        type: "Button",
        align: "center",
        btnList: [
          {
            type: "primary-edit",
            label: "编辑",
            line: "|"
          },
          {
            type: "primary-del",
            label: "删除"
          }
        ]
      }
    ],
    url: "",
    detailsUrl: "ss/",
    addRowBtn: true,
    confirmOptions: {
        title: "提示", //提示
        message: "确认删除该条数据？", //""
        btnCancelText: "取消", //取消
        btnSubmitText: "确定" //确定
      },
  }),
  components: {
    cesTable
  },
  methods: {
    editItem(val) {
      console.log(val);
    }
  }
};
</script>

<style scoped>
.index_container {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
</style>
