import { p as m } from "./workbench2.js";
import { resolveComponent as s, openBlock as c, createBlock as h, createSlots as f, withCtx as n, createVNode as r, createTextVNode as l } from "vue";
import { l as y, U as b } from "./index2.js";
const _ = {
  name: "HomePage",
  data() {
    return {
      isPermission: !1,
      buttons: [
        {
          name: "添加",
          key: "add",
          show: !0,
          disabled: !1,
          type: "primary",
          icon: !0,
          api: null
        },
        {
          name: "批量删除",
          key: "delete",
          action: "remove",
          show: !0,
          disabled: !1,
          icon: !0,
          confirm: !0,
          api: this.deletesApi
        },
        {
          name: "同步",
          // 按钮名称
          key: "synchronize"
          // 按钮key 可替代action按钮权限字段
          // show: true, // 是否显示
          // disabled: false, // 是否禁用 可不设置
          // action: 'synchronize', // 按钮权限 不传则按照 key 渲染
          // icon: 'sync', // 可选值：空字符串 ''：不需要icon, true：需要icon 组件自从设定的iconMap中查找, 'add' 非空串：使用的icon
          // confirm: false, // 是否需要确认框
          // selection: false, // 是否需要表格批量选择的数据
          // api: null // 按钮对应接口api
        },
        {
          name: "导入",
          key: "import",
          show: !0,
          disabled: !1,
          icon: !0,
          api: this.importApi,
          templateApi: this.templateApi
        },
        {
          name: "导出",
          key: "export",
          show: !0,
          disabled: !1,
          icon: !0,
          api: null
        }
      ]
    };
  },
  methods: {
    handLink(e) {
      this.$router.push(e);
    },
    reset() {
      this.$refs.layout.reload();
    },
    btnCallback(e) {
      console.log(e);
    },
    page(e = {}) {
      return m(this.params, e).then((t) => t);
    },
    handApprove(e) {
      console.log(e);
    }
  },
  mounted() {
  }
};
function k(e, t, g, C, a, o) {
  const i = s("HighlightOutlined"), p = b, u = s("s-list-card-layout");
  return c(), h(u, {
    col: "5",
    id: "layout",
    ref: "layout",
    buttons: a.buttons,
    onReset: o.reset,
    onBtnCallback: o.btnCallback,
    loadData: o.page,
    title: "卡片列表示例"
  }, f({
    otherBtns: n((d) => [
      r(p, {
        class: "btn",
        type: "primary",
        onClick: (x) => o.handApprove(d)
      }, {
        default: n(() => [
          r(i),
          t[0] || (t[0] = l(" 提交审核 "))
        ]),
        _: 2
      }, 1032, ["onClick"])
    ]),
    other: n(() => []),
    _: 2
  }, [
    a.isPermission ? {
      name: "empty",
      fn: n(() => [
        t[1] || (t[1] = l("抱歉 没有访问权限"))
      ]),
      key: "0"
    } : void 0
  ]), 1032, ["buttons", "onReset", "onBtnCallback", "loadData"]);
}
const w = /* @__PURE__ */ y(_, [["render", k]]);
export {
  w as default
};
