中生金域
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.1 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const _sfc_main = {
  4. data() {
  5. return {
  6. activeTab: 0,
  7. idcard: "",
  8. username: "",
  9. resultList: []
  10. };
  11. },
  12. onLoad() {
  13. const self = this;
  14. common_vendor.index.request({
  15. url: "http://localhost:8080/zsjyadmin/detection/current",
  16. method: "GET",
  17. success: (res) => {
  18. var _a, _b;
  19. if (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.code) == 0) {
  20. const data = (_b = res == null ? void 0 : res.data) == null ? void 0 : _b.data;
  21. const { idcard, username, resultList } = data || {};
  22. self.idcard = idcard;
  23. self.username = username;
  24. resultList.sort((a, b) => {
  25. return b.id - a.id;
  26. });
  27. self.resultList = resultList;
  28. }
  29. }
  30. });
  31. },
  32. methods: {
  33. changeActiveTab(activeTab) {
  34. this.activeTab = activeTab;
  35. }
  36. }
  37. };
  38. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  39. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
  40. return common_vendor.e({
  41. a: common_vendor.t($data.username),
  42. b: common_vendor.t($data.idcard),
  43. c: $data.activeTab == 0
  44. }, $data.activeTab == 0 ? {
  45. d: common_vendor.t(((_a = $data.resultList) == null ? void 0 : _a.length) > 0 ? (_b = $data.resultList[0]) == null ? void 0 : _b.c1 : "0"),
  46. e: common_vendor.t(((_c = $data.resultList) == null ? void 0 : _c.length) > 0 ? (_d = $data.resultList[0]) == null ? void 0 : _d.c2 : "0"),
  47. f: common_vendor.t(((_e = $data.resultList) == null ? void 0 : _e.length) > 0 ? (_f = $data.resultList[0]) == null ? void 0 : _f.c3 : "0"),
  48. g: common_vendor.t(((_g = $data.resultList) == null ? void 0 : _g.length) > 0 ? (_h = $data.resultList[0]) == null ? void 0 : _h.c4 : "0"),
  49. h: common_vendor.t(((_i = $data.resultList) == null ? void 0 : _i.length) > 0 ? (_j = $data.resultList[0]) == null ? void 0 : _j.c5 : "0"),
  50. i: common_vendor.t(((_k = $data.resultList) == null ? void 0 : _k.length) > 0 ? (_l = $data.resultList[0]) == null ? void 0 : _l.c6 : "0")
  51. } : {}, {
  52. j: $data.activeTab == 1
  53. }, $data.activeTab == 1 ? {
  54. k: common_vendor.f($data.resultList, (item, k0, i0) => {
  55. var _a2, _b2;
  56. return {
  57. a: common_vendor.t((_a2 = item.testDate) == null ? void 0 : _a2.split(" ")[0]),
  58. b: common_vendor.t((_b2 = item.testDate) == null ? void 0 : _b2.split(" ")[1]),
  59. c: common_vendor.t(item.c1),
  60. d: common_vendor.t(item.c2),
  61. e: common_vendor.t(item.c3),
  62. f: common_vendor.t(item.c4),
  63. g: common_vendor.t(item.c5),
  64. h: common_vendor.t(item.c6),
  65. i: item.id
  66. };
  67. })
  68. } : {}, {
  69. l: common_vendor.n($data.activeTab == 0 ? "btn active" : "btn"),
  70. m: common_vendor.o(($event) => $options.changeActiveTab(0)),
  71. n: common_vendor.n($data.activeTab == 1 ? "btn active" : "btn"),
  72. o: common_vendor.o(($event) => $options.changeActiveTab(1))
  73. });
  74. }
  75. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/cool/Desktop/code/gold-field/pages/index/index.vue"]]);
  76. wx.createPage(MiniProgramPage);