position.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. import { p as m } from "./workbench2.js";
  2. import { resolveComponent as s, openBlock as c, createBlock as h, createSlots as f, withCtx as n, createVNode as r, createTextVNode as l } from "vue";
  3. import { l as y, U as b } from "./index2.js";
  4. const _ = {
  5. name: "HomePage",
  6. data() {
  7. return {
  8. isPermission: !1,
  9. buttons: [
  10. {
  11. name: "添加",
  12. key: "add",
  13. show: !0,
  14. disabled: !1,
  15. type: "primary",
  16. icon: !0,
  17. api: null
  18. },
  19. {
  20. name: "批量删除",
  21. key: "delete",
  22. action: "remove",
  23. show: !0,
  24. disabled: !1,
  25. icon: !0,
  26. confirm: !0,
  27. api: this.deletesApi
  28. },
  29. {
  30. name: "同步",
  31. // 按钮名称
  32. key: "synchronize"
  33. // 按钮key 可替代action按钮权限字段
  34. // show: true, // 是否显示
  35. // disabled: false, // 是否禁用 可不设置
  36. // action: 'synchronize', // 按钮权限 不传则按照 key 渲染
  37. // icon: 'sync', // 可选值:空字符串 '':不需要icon, true:需要icon 组件自从设定的iconMap中查找, 'add' 非空串:使用的icon
  38. // confirm: false, // 是否需要确认框
  39. // selection: false, // 是否需要表格批量选择的数据
  40. // api: null // 按钮对应接口api
  41. },
  42. {
  43. name: "导入",
  44. key: "import",
  45. show: !0,
  46. disabled: !1,
  47. icon: !0,
  48. api: this.importApi,
  49. templateApi: this.templateApi
  50. },
  51. {
  52. name: "导出",
  53. key: "export",
  54. show: !0,
  55. disabled: !1,
  56. icon: !0,
  57. api: null
  58. }
  59. ]
  60. };
  61. },
  62. methods: {
  63. handLink(e) {
  64. this.$router.push(e);
  65. },
  66. reset() {
  67. this.$refs.layout.reload();
  68. },
  69. btnCallback(e) {
  70. console.log(e);
  71. },
  72. page(e = {}) {
  73. return m(this.params, e).then((t) => t);
  74. },
  75. handApprove(e) {
  76. console.log(e);
  77. }
  78. },
  79. mounted() {
  80. }
  81. };
  82. function k(e, t, g, C, a, o) {
  83. const i = s("HighlightOutlined"), p = b, u = s("s-list-card-layout");
  84. return c(), h(u, {
  85. col: "5",
  86. id: "layout",
  87. ref: "layout",
  88. buttons: a.buttons,
  89. onReset: o.reset,
  90. onBtnCallback: o.btnCallback,
  91. loadData: o.page,
  92. title: "卡片列表示例"
  93. }, f({
  94. otherBtns: n((d) => [
  95. r(p, {
  96. class: "btn",
  97. type: "primary",
  98. onClick: (x) => o.handApprove(d)
  99. }, {
  100. default: n(() => [
  101. r(i),
  102. t[0] || (t[0] = l(" 提交审核 "))
  103. ]),
  104. _: 2
  105. }, 1032, ["onClick"])
  106. ]),
  107. other: n(() => []),
  108. _: 2
  109. }, [
  110. a.isPermission ? {
  111. name: "empty",
  112. fn: n(() => [
  113. t[1] || (t[1] = l("抱歉 没有访问权限"))
  114. ]),
  115. key: "0"
  116. } : void 0
  117. ]), 1032, ["buttons", "onReset", "onBtnCallback", "loadData"]);
  118. }
  119. const w = /* @__PURE__ */ y(_, [["render", k]]);
  120. export {
  121. w as default
  122. };