From fe35350698db9546efbb3f3cd167b4e7933565a9 Mon Sep 17 00:00:00 2001 From: xusd Date: Mon, 17 Jun 2024 10:21:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=9D=E5=85=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/maintenance/maintenance.js | 16 ++ pages/work/maintenance/detailsMaintenance.vue | 180 ++++++++++++- pages/work/maintenance/listMaintenance.vue | 239 +++++++++++++++++- 3 files changed, 425 insertions(+), 10 deletions(-) create mode 100644 api/maintenance/maintenance.js diff --git a/api/maintenance/maintenance.js b/api/maintenance/maintenance.js new file mode 100644 index 0000000..72b72d9 --- /dev/null +++ b/api/maintenance/maintenance.js @@ -0,0 +1,16 @@ +import request from "@/utils/request"; + +export function listMaintenance(query) { + return request({ + url: "/upkeep/record/list", + method: "get", + params: query, + }); +} + +export function getMaintenanceById(id) { + return request({ + url: "/upkeep/report/" + id, + method: "get" + }); +} \ No newline at end of file diff --git a/pages/work/maintenance/detailsMaintenance.vue b/pages/work/maintenance/detailsMaintenance.vue index 8183fd0..56c7855 100644 --- a/pages/work/maintenance/detailsMaintenance.vue +++ b/pages/work/maintenance/detailsMaintenance.vue @@ -1,22 +1,192 @@ + view { + font-size: 14px; + line-height: inherit; + } + + /* #endif */ + + .text { + text-align: center; + font-size: 26rpx; + margin-top: 10rpx; + } + + .grid-item-box { + flex: 1; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + align-items: center; + justify-content: center; + padding: 15px 0; + } + + .uni-margin-wrap { + width: 690rpx; + width: 100%; + ; + } + + .swiper { + height: 300rpx; + } + + .swiper-box { + height: 150px; + } + + .swiper-item { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + justify-content: center; + align-items: center; + color: #fff; + height: 300rpx; + line-height: 300rpx; + } + + @media screen and (min-width: 500px) { + .uni-swiper-dot-box { + width: 400px; + /* #ifndef APP-NVUE */ + margin: 0 auto; + /* #endif */ + margin-top: 8px; + } + + .image { + width: 100%; + } + } + + .detail-container { + padding: 12px; + background: #f1f1f1; + + //设置按钮的样式,靠右 + .worker-button { + float: right; + /* margin-right: 24px; */ + margin-top: 10px; + } + } + \ No newline at end of file diff --git a/pages/work/maintenance/listMaintenance.vue b/pages/work/maintenance/listMaintenance.vue index 1fbba54..43c77be 100644 --- a/pages/work/maintenance/listMaintenance.vue +++ b/pages/work/maintenance/listMaintenance.vue @@ -1,22 +1,251 @@ + .card-group .card-title { + left: 20px !important; + color: #333; + font-weight: 600; + display: flex; + justify-content: space-between; + width: calc(100% - 20px) !important; + } + + .card-group .card-title .label-btn { + margin: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 16px; + border-bottom-left-radius: 16px; + letter-spacing: 1px; + } + + .card-group .cu-list.menu-avatar>.cu-item { + height: 50px; + } + + .card-group .cu-list.menu-avatar>.cu-item:after { + border-bottom: none !important; + } + + .card-group .content-container { + padding-left: 20px; + color: #909399; + margin-bottom: 6px; + } + + .card-group .content-container .text-content .iconfont { + font-size: 16px; + margin-right: 4px; + } + + .card-group .content-container .text-content .text-description { + font-size: 14px; + } + + .card-group .text-bottom { + margin: 0 20px; + border-top: 1px dotted #aaa; + padding: 6px 0; + } + + /* 卡片的样式 end */ + + /* 下拉加载提示字的样式 end */ + .loading-tip { + font-size: 12px; + color: #666; + padding-bottom: 12px; + text-align: center; + } + \ No newline at end of file