| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- import { p as P } from "./workbench2.js";
- import { l as S, aM as E, aN as U, U as V, bv as x, aC as L, aD as O } from "./index2.js";
- import { resolveComponent as C, openBlock as s, createBlock as h, createSlots as B, withCtx as n, createVNode as r, createTextVNode as d, createElementBlock as f, Fragment as g, renderList as b, toDisplayString as _ } from "vue";
- const T = {
- 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
- }
- ],
- params: {
- treeValue: "",
- quoted: 0,
- lookupType: {}
- },
- quoted: [
- { name: "全部", code: 0 },
- { name: "是", code: 1 },
- { name: "否", code: 2 }
- ]
- };
- },
- methods: {
- // ⬆️ 新组建方法使用
- paramChange() {
- this.$refs.layout.reload();
- },
- quotedChange() {
- this.$refs.layout.reload();
- },
- levelOneChildren(o) {
- return E(o);
- },
- levelTwoChildren(o) {
- return U(o);
- },
- handLink(o) {
- this.$router.push(o);
- },
- reset() {
- this.$refs.layout.reload();
- },
- btnCallback(o) {
- console.log(o);
- },
- page(o = {}) {
- return P(this.params, o).then((a) => a);
- },
- handApprove(o) {
- console.log(o);
- }
- },
- mounted() {
- }
- };
- function A(o, a, D, H, l, t) {
- const w = C("HighlightOutlined"), y = V, q = C("s-tree"), p = x, u = C("s-filter-item"), i = L, v = O, c = C("s-filter-wrap"), k = C("s-list-card-layout");
- return s(), h(k, {
- col: "5",
- id: "layout",
- ref: "layout",
- buttons: l.buttons,
- onReset: t.reset,
- onBtnCallback: t.btnCallback,
- loadData: t.page,
- title: "卡片列表示例"
- }, B({
- otherBtns: n((e) => [
- r(y, {
- class: "btn",
- type: "primary",
- onClick: (m) => t.handApprove(e)
- }, {
- default: n(() => [
- r(w),
- a[12] || (a[12] = d(" 提交审核 "))
- ]),
- _: 2
- }, 1032, ["onClick"])
- ]),
- tree: n(() => [
- r(q, {
- levelOneChildren: t.levelOneChildren,
- levelTwoChildren: t.levelTwoChildren,
- modelValue: l.params.treeValue,
- "onUpdate:modelValue": a[0] || (a[0] = (e) => l.params.treeValue = e)
- }, null, 8, ["levelOneChildren", "levelTwoChildren", "modelValue"])
- ]),
- filter: n(() => [
- r(c, null, {
- default: n(() => [
- r(u, {
- label: o.$l("添加")
- }, {
- default: n(() => [
- r(p, {
- maxLength: 50,
- onPressEnter: t.paramChange,
- value: l.params.name,
- "onUpdate:value": a[1] || (a[1] = (e) => l.params.name = e),
- allowClear: !0,
- placeholder: "请输入名称或编码"
- }, null, 8, ["onPressEnter", "value"])
- ]),
- _: 1
- }, 8, ["label"]),
- r(u, { label: "被引用" }, {
- default: n(() => [
- r(v, {
- showSearch: "",
- allowClear: "",
- autoClearSearchValue: "",
- placeholder: "请选择",
- onChange: t.quotedChange,
- value: l.params.quoted,
- "onUpdate:value": a[2] || (a[2] = (e) => l.params.quoted = e)
- }, {
- default: n(() => [
- (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
- value: e.code,
- key: m
- }, {
- default: n(() => [
- d(_(e.name), 1)
- ]),
- _: 2
- }, 1032, ["value"]))), 128))
- ]),
- _: 1
- }, 8, ["onChange", "value"])
- ]),
- _: 1
- }),
- r(u, { label: "关键字" }, {
- default: n(() => [
- r(p, {
- maxLength: 50,
- onPressEnter: t.paramChange,
- value: l.params.name,
- "onUpdate:value": a[3] || (a[3] = (e) => l.params.name = e),
- allowClear: !0,
- placeholder: "请输入名称或编码"
- }, null, 8, ["onPressEnter", "value"])
- ]),
- _: 1
- })
- ]),
- _: 1
- })
- ]),
- filterMore: n(() => [
- r(c, { type: "filter-more" }, {
- default: n(() => [
- r(u, {
- mb: 10,
- label: "更多条件一"
- }, {
- default: n(() => [
- r(p, {
- maxLength: 50,
- onPressEnter: t.paramChange,
- value: l.params.name,
- "onUpdate:value": a[4] || (a[4] = (e) => l.params.name = e),
- allowClear: !0,
- placeholder: "请输入名称或编码"
- }, null, 8, ["onPressEnter", "value"])
- ]),
- _: 1
- }),
- r(u, {
- mb: 10,
- label: "更多条件二"
- }, {
- default: n(() => [
- r(v, {
- showSearch: "",
- allowClear: "",
- autoClearSearchValue: "",
- placeholder: "请选择",
- onChange: t.quotedChange,
- value: l.params.quoted,
- "onUpdate:value": a[5] || (a[5] = (e) => l.params.quoted = e)
- }, {
- default: n(() => [
- (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
- value: e.code,
- key: m
- }, {
- default: n(() => [
- d(_(e.name), 1)
- ]),
- _: 2
- }, 1032, ["value"]))), 128))
- ]),
- _: 1
- }, 8, ["onChange", "value"])
- ]),
- _: 1
- }),
- r(u, {
- mb: 10,
- label: "更多条件一"
- }, {
- default: n(() => [
- r(p, {
- maxLength: 50,
- onPressEnter: t.paramChange,
- value: l.params.name,
- "onUpdate:value": a[6] || (a[6] = (e) => l.params.name = e),
- allowClear: !0,
- placeholder: "请输入名称或编码"
- }, null, 8, ["onPressEnter", "value"])
- ]),
- _: 1
- }),
- r(u, {
- mb: 10,
- label: "更多条件二"
- }, {
- default: n(() => [
- r(v, {
- showSearch: "",
- allowClear: "",
- autoClearSearchValue: "",
- placeholder: "请选择",
- onChange: t.quotedChange,
- value: l.params.quoted,
- "onUpdate:value": a[7] || (a[7] = (e) => l.params.quoted = e)
- }, {
- default: n(() => [
- (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
- value: e.code,
- key: m
- }, {
- default: n(() => [
- d(_(e.name), 1)
- ]),
- _: 2
- }, 1032, ["value"]))), 128))
- ]),
- _: 1
- }, 8, ["onChange", "value"])
- ]),
- _: 1
- }),
- r(u, {
- mb: 10,
- label: "更多条件一"
- }, {
- default: n(() => [
- r(p, {
- maxLength: 50,
- onPressEnter: t.paramChange,
- value: l.params.name,
- "onUpdate:value": a[8] || (a[8] = (e) => l.params.name = e),
- allowClear: !0,
- placeholder: "请输入名称或编码"
- }, null, 8, ["onPressEnter", "value"])
- ]),
- _: 1
- }),
- r(u, {
- mb: 10,
- label: "更多条件二"
- }, {
- default: n(() => [
- r(v, {
- showSearch: "",
- allowClear: "",
- autoClearSearchValue: "",
- placeholder: "请选择",
- onChange: t.quotedChange,
- value: l.params.quoted,
- "onUpdate:value": a[9] || (a[9] = (e) => l.params.quoted = e)
- }, {
- default: n(() => [
- (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
- value: e.code,
- key: m
- }, {
- default: n(() => [
- d(_(e.name), 1)
- ]),
- _: 2
- }, 1032, ["value"]))), 128))
- ]),
- _: 1
- }, 8, ["onChange", "value"])
- ]),
- _: 1
- }),
- r(u, {
- mb: 10,
- label: "更多条件一"
- }, {
- default: n(() => [
- r(p, {
- maxLength: 50,
- onPressEnter: t.paramChange,
- value: l.params.name,
- "onUpdate:value": a[10] || (a[10] = (e) => l.params.name = e),
- allowClear: !0,
- placeholder: "请输入名称或编码"
- }, null, 8, ["onPressEnter", "value"])
- ]),
- _: 1
- }),
- r(u, {
- mb: 10,
- label: "更多条件二"
- }, {
- default: n(() => [
- r(v, {
- showSearch: "",
- allowClear: "",
- autoClearSearchValue: "",
- placeholder: "请选择",
- onChange: t.quotedChange,
- value: l.params.quoted,
- "onUpdate:value": a[11] || (a[11] = (e) => l.params.quoted = e)
- }, {
- default: n(() => [
- (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
- value: e.code,
- key: m
- }, {
- default: n(() => [
- d(_(e.name), 1)
- ]),
- _: 2
- }, 1032, ["value"]))), 128))
- ]),
- _: 1
- }, 8, ["onChange", "value"])
- ]),
- _: 1
- })
- ]),
- _: 1
- })
- ]),
- other: n(() => []),
- _: 2
- }, [
- l.isPermission ? {
- name: "empty",
- fn: n(() => [
- a[13] || (a[13] = d("抱歉 没有访问权限"))
- ]),
- key: "0"
- } : void 0
- ]), 1032, ["buttons", "onReset", "onBtnCallback", "loadData"]);
- }
- const z = /* @__PURE__ */ S(T, [["render", A]]);
- export {
- z as default
- };
|