daixjgk.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const common_assets = require("../../common/assets.js");
  4. if (!Array) {
  5. const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
  6. _easycom_uni_popup2();
  7. }
  8. const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
  9. if (!Math) {
  10. _easycom_uni_popup();
  11. }
  12. const _sfc_main = {
  13. __name: "daixjgk",
  14. setup(__props) {
  15. const warehouses = common_vendor.ref([
  16. { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false },
  17. { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false },
  18. { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false }
  19. ]);
  20. const toggleSelection = (index) => {
  21. warehouses.value[index].selected = !warehouses.value[index].selected;
  22. };
  23. const selectAll = () => {
  24. warehouses.value.forEach((warehouse) => {
  25. warehouse.selected = true;
  26. });
  27. };
  28. const confirmSelection = () => {
  29. };
  30. const state = common_vendor.reactive({
  31. type: "center",
  32. msgType: "success",
  33. messageText: "这是一条成功提示",
  34. showClose: true
  35. });
  36. const popup = common_vendor.ref(null);
  37. const toggle = (type) => {
  38. state.type = type;
  39. popup.value.open(type);
  40. };
  41. return (_ctx, _cache) => {
  42. return {
  43. a: common_vendor.o(($event) => toggle("top")),
  44. b: common_assets._imports_0$1,
  45. c: common_vendor.f(warehouses.value, (warehouse, index, i0) => {
  46. return {
  47. a: common_vendor.t(warehouse.name),
  48. b: common_vendor.t(warehouse.address),
  49. c: warehouse.selected,
  50. d: common_vendor.o(($event) => toggleSelection(index), index),
  51. e: common_vendor.t(warehouse.capacity),
  52. f: common_vendor.t(warehouse.rooms),
  53. g: common_vendor.t(warehouse.emptyRooms),
  54. h: common_vendor.t(warehouse.selected ? "1个" : "0个"),
  55. i: index
  56. };
  57. }),
  58. d: common_assets._imports_0$2,
  59. e: common_assets._imports_2$1,
  60. f: common_vendor.o(selectAll),
  61. g: common_vendor.o(confirmSelection),
  62. h: _ctx.type === "left" || _ctx.type === "right" ? 1 : "",
  63. i: common_vendor.sr(popup, "846eb3b4-0", {
  64. "k": "popup"
  65. }),
  66. j: common_vendor.o(_ctx.change),
  67. k: common_vendor.p({
  68. ["background-color"]: "#fff",
  69. ["border-radius"]: "10px 10px 0 0"
  70. })
  71. };
  72. };
  73. }
  74. };
  75. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-846eb3b4"]]);
  76. wx.createPage(MiniProgramPage);
  77. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/daixjgk/daixjgk.js.map