index8.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. import { p as P } from "./workbench2.js";
  2. 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";
  3. 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";
  4. const T = {
  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. params: {
  61. treeValue: "",
  62. quoted: 0,
  63. lookupType: {}
  64. },
  65. quoted: [
  66. { name: "全部", code: 0 },
  67. { name: "是", code: 1 },
  68. { name: "否", code: 2 }
  69. ]
  70. };
  71. },
  72. methods: {
  73. // ⬆️ 新组建方法使用
  74. paramChange() {
  75. this.$refs.layout.reload();
  76. },
  77. quotedChange() {
  78. this.$refs.layout.reload();
  79. },
  80. levelOneChildren(o) {
  81. return E(o);
  82. },
  83. levelTwoChildren(o) {
  84. return U(o);
  85. },
  86. handLink(o) {
  87. this.$router.push(o);
  88. },
  89. reset() {
  90. this.$refs.layout.reload();
  91. },
  92. btnCallback(o) {
  93. console.log(o);
  94. },
  95. page(o = {}) {
  96. return P(this.params, o).then((a) => a);
  97. },
  98. handApprove(o) {
  99. console.log(o);
  100. }
  101. },
  102. mounted() {
  103. }
  104. };
  105. function A(o, a, D, H, l, t) {
  106. 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");
  107. return s(), h(k, {
  108. col: "5",
  109. id: "layout",
  110. ref: "layout",
  111. buttons: l.buttons,
  112. onReset: t.reset,
  113. onBtnCallback: t.btnCallback,
  114. loadData: t.page,
  115. title: "卡片列表示例"
  116. }, B({
  117. otherBtns: n((e) => [
  118. r(y, {
  119. class: "btn",
  120. type: "primary",
  121. onClick: (m) => t.handApprove(e)
  122. }, {
  123. default: n(() => [
  124. r(w),
  125. a[12] || (a[12] = d(" 提交审核 "))
  126. ]),
  127. _: 2
  128. }, 1032, ["onClick"])
  129. ]),
  130. tree: n(() => [
  131. r(q, {
  132. levelOneChildren: t.levelOneChildren,
  133. levelTwoChildren: t.levelTwoChildren,
  134. modelValue: l.params.treeValue,
  135. "onUpdate:modelValue": a[0] || (a[0] = (e) => l.params.treeValue = e)
  136. }, null, 8, ["levelOneChildren", "levelTwoChildren", "modelValue"])
  137. ]),
  138. filter: n(() => [
  139. r(c, null, {
  140. default: n(() => [
  141. r(u, {
  142. label: o.$l("添加")
  143. }, {
  144. default: n(() => [
  145. r(p, {
  146. maxLength: 50,
  147. onPressEnter: t.paramChange,
  148. value: l.params.name,
  149. "onUpdate:value": a[1] || (a[1] = (e) => l.params.name = e),
  150. allowClear: !0,
  151. placeholder: "请输入名称或编码"
  152. }, null, 8, ["onPressEnter", "value"])
  153. ]),
  154. _: 1
  155. }, 8, ["label"]),
  156. r(u, { label: "被引用" }, {
  157. default: n(() => [
  158. r(v, {
  159. showSearch: "",
  160. allowClear: "",
  161. autoClearSearchValue: "",
  162. placeholder: "请选择",
  163. onChange: t.quotedChange,
  164. value: l.params.quoted,
  165. "onUpdate:value": a[2] || (a[2] = (e) => l.params.quoted = e)
  166. }, {
  167. default: n(() => [
  168. (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
  169. value: e.code,
  170. key: m
  171. }, {
  172. default: n(() => [
  173. d(_(e.name), 1)
  174. ]),
  175. _: 2
  176. }, 1032, ["value"]))), 128))
  177. ]),
  178. _: 1
  179. }, 8, ["onChange", "value"])
  180. ]),
  181. _: 1
  182. }),
  183. r(u, { label: "关键字" }, {
  184. default: n(() => [
  185. r(p, {
  186. maxLength: 50,
  187. onPressEnter: t.paramChange,
  188. value: l.params.name,
  189. "onUpdate:value": a[3] || (a[3] = (e) => l.params.name = e),
  190. allowClear: !0,
  191. placeholder: "请输入名称或编码"
  192. }, null, 8, ["onPressEnter", "value"])
  193. ]),
  194. _: 1
  195. })
  196. ]),
  197. _: 1
  198. })
  199. ]),
  200. filterMore: n(() => [
  201. r(c, { type: "filter-more" }, {
  202. default: n(() => [
  203. r(u, {
  204. mb: 10,
  205. label: "更多条件一"
  206. }, {
  207. default: n(() => [
  208. r(p, {
  209. maxLength: 50,
  210. onPressEnter: t.paramChange,
  211. value: l.params.name,
  212. "onUpdate:value": a[4] || (a[4] = (e) => l.params.name = e),
  213. allowClear: !0,
  214. placeholder: "请输入名称或编码"
  215. }, null, 8, ["onPressEnter", "value"])
  216. ]),
  217. _: 1
  218. }),
  219. r(u, {
  220. mb: 10,
  221. label: "更多条件二"
  222. }, {
  223. default: n(() => [
  224. r(v, {
  225. showSearch: "",
  226. allowClear: "",
  227. autoClearSearchValue: "",
  228. placeholder: "请选择",
  229. onChange: t.quotedChange,
  230. value: l.params.quoted,
  231. "onUpdate:value": a[5] || (a[5] = (e) => l.params.quoted = e)
  232. }, {
  233. default: n(() => [
  234. (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
  235. value: e.code,
  236. key: m
  237. }, {
  238. default: n(() => [
  239. d(_(e.name), 1)
  240. ]),
  241. _: 2
  242. }, 1032, ["value"]))), 128))
  243. ]),
  244. _: 1
  245. }, 8, ["onChange", "value"])
  246. ]),
  247. _: 1
  248. }),
  249. r(u, {
  250. mb: 10,
  251. label: "更多条件一"
  252. }, {
  253. default: n(() => [
  254. r(p, {
  255. maxLength: 50,
  256. onPressEnter: t.paramChange,
  257. value: l.params.name,
  258. "onUpdate:value": a[6] || (a[6] = (e) => l.params.name = e),
  259. allowClear: !0,
  260. placeholder: "请输入名称或编码"
  261. }, null, 8, ["onPressEnter", "value"])
  262. ]),
  263. _: 1
  264. }),
  265. r(u, {
  266. mb: 10,
  267. label: "更多条件二"
  268. }, {
  269. default: n(() => [
  270. r(v, {
  271. showSearch: "",
  272. allowClear: "",
  273. autoClearSearchValue: "",
  274. placeholder: "请选择",
  275. onChange: t.quotedChange,
  276. value: l.params.quoted,
  277. "onUpdate:value": a[7] || (a[7] = (e) => l.params.quoted = e)
  278. }, {
  279. default: n(() => [
  280. (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
  281. value: e.code,
  282. key: m
  283. }, {
  284. default: n(() => [
  285. d(_(e.name), 1)
  286. ]),
  287. _: 2
  288. }, 1032, ["value"]))), 128))
  289. ]),
  290. _: 1
  291. }, 8, ["onChange", "value"])
  292. ]),
  293. _: 1
  294. }),
  295. r(u, {
  296. mb: 10,
  297. label: "更多条件一"
  298. }, {
  299. default: n(() => [
  300. r(p, {
  301. maxLength: 50,
  302. onPressEnter: t.paramChange,
  303. value: l.params.name,
  304. "onUpdate:value": a[8] || (a[8] = (e) => l.params.name = e),
  305. allowClear: !0,
  306. placeholder: "请输入名称或编码"
  307. }, null, 8, ["onPressEnter", "value"])
  308. ]),
  309. _: 1
  310. }),
  311. r(u, {
  312. mb: 10,
  313. label: "更多条件二"
  314. }, {
  315. default: n(() => [
  316. r(v, {
  317. showSearch: "",
  318. allowClear: "",
  319. autoClearSearchValue: "",
  320. placeholder: "请选择",
  321. onChange: t.quotedChange,
  322. value: l.params.quoted,
  323. "onUpdate:value": a[9] || (a[9] = (e) => l.params.quoted = e)
  324. }, {
  325. default: n(() => [
  326. (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
  327. value: e.code,
  328. key: m
  329. }, {
  330. default: n(() => [
  331. d(_(e.name), 1)
  332. ]),
  333. _: 2
  334. }, 1032, ["value"]))), 128))
  335. ]),
  336. _: 1
  337. }, 8, ["onChange", "value"])
  338. ]),
  339. _: 1
  340. }),
  341. r(u, {
  342. mb: 10,
  343. label: "更多条件一"
  344. }, {
  345. default: n(() => [
  346. r(p, {
  347. maxLength: 50,
  348. onPressEnter: t.paramChange,
  349. value: l.params.name,
  350. "onUpdate:value": a[10] || (a[10] = (e) => l.params.name = e),
  351. allowClear: !0,
  352. placeholder: "请输入名称或编码"
  353. }, null, 8, ["onPressEnter", "value"])
  354. ]),
  355. _: 1
  356. }),
  357. r(u, {
  358. mb: 10,
  359. label: "更多条件二"
  360. }, {
  361. default: n(() => [
  362. r(v, {
  363. showSearch: "",
  364. allowClear: "",
  365. autoClearSearchValue: "",
  366. placeholder: "请选择",
  367. onChange: t.quotedChange,
  368. value: l.params.quoted,
  369. "onUpdate:value": a[11] || (a[11] = (e) => l.params.quoted = e)
  370. }, {
  371. default: n(() => [
  372. (s(!0), f(g, null, b(l.quoted, (e, m) => (s(), h(i, {
  373. value: e.code,
  374. key: m
  375. }, {
  376. default: n(() => [
  377. d(_(e.name), 1)
  378. ]),
  379. _: 2
  380. }, 1032, ["value"]))), 128))
  381. ]),
  382. _: 1
  383. }, 8, ["onChange", "value"])
  384. ]),
  385. _: 1
  386. })
  387. ]),
  388. _: 1
  389. })
  390. ]),
  391. other: n(() => []),
  392. _: 2
  393. }, [
  394. l.isPermission ? {
  395. name: "empty",
  396. fn: n(() => [
  397. a[13] || (a[13] = d("抱歉 没有访问权限"))
  398. ]),
  399. key: "0"
  400. } : void 0
  401. ]), 1032, ["buttons", "onReset", "onBtnCallback", "loadData"]);
  402. }
  403. const z = /* @__PURE__ */ S(T, [["render", A]]);
  404. export {
  405. z as default
  406. };