diff --git a/weapp/images/word.svg b/weapp/images/word.svg
index 8e60511..65846fa 100644
--- a/weapp/images/word.svg
+++ b/weapp/images/word.svg
@@ -1 +1,42 @@
-
\ No newline at end of file
+
diff --git a/weapp/package/inspectionReport/inspectionReport.js b/weapp/package/inspectionReport/inspectionReport.js
index 15ada30..dfe6c55 100644
--- a/weapp/package/inspectionReport/inspectionReport.js
+++ b/weapp/package/inspectionReport/inspectionReport.js
@@ -11,9 +11,7 @@ Page({
data: {
structures: [], // 结构物
struLoading: false,
- struVisible: false,
- dateVisible: false,
- curStru: 0, // 选中结构物index
+ curStruId: 'all', // 选中结构物id
startTime: new Date().getTime(),
endTime: new Date().getTime(),
formatStartTime: moment(new Date().getTime()).format('YYYY-MM-DD'),
@@ -21,23 +19,15 @@ Page({
report: [], // 巡检报告
},
- showPopup(e) {
- const { item } = e.currentTarget.dataset;
- this.setData({ [`${item}Visible`]: true });
- },
-
onClose(e) {
- const { item } = e.currentTarget.dataset;
- this.setData({ [`${item}Visible`]: false });
// 获取报告
this.getPatrolReport();
},
onStruChange(e) {
if (e.detail) {
- const { index } = e.detail;
this.setData({
- curStru: index
+ curStruId: e.detail
})
}
},
@@ -77,9 +67,9 @@ Page({
},
getPatrolReport() {
- const { structures, curStru, formatStartTime, formatEndTime } = this.data;
+ const { curStruId, formatStartTime, formatEndTime } = this.data;
const params = {
- projectId: structures[curStru].id,
+ projectId: curStruId === 'all' ? '' : curStruId,
startTime: formatStartTime + ' 00:00:00',
endTime: formatEndTime + ' 23:59:59',
}
@@ -89,7 +79,7 @@ Page({
this.setData({
report: res.rows.map(r => {
const fileName = r.excelPath.substring(r.excelPath.lastIndexOf('/') + 1);
- return { ...r, fileName }
+ return { ...r, fileName, inspectTm: moment(r.inspectTm).format('YYYY-MM-DD HH:mm:ss') }
})
})
})
@@ -101,8 +91,8 @@ Page({
this.setData({
struLoading: false,
structures: [
- { name: '全部', id: '' },
- ...res.rows.map(s => ({ name: s.name, id: s.id }))
+ { text: '全部', value: 'all' },
+ ...res.rows.map(s => ({ text: s.name, value: s.id }))
]
}, () => { this.getPatrolReport(); })
})
diff --git a/weapp/package/inspectionReport/inspectionReport.json b/weapp/package/inspectionReport/inspectionReport.json
index edafa52..bc39d82 100644
--- a/weapp/package/inspectionReport/inspectionReport.json
+++ b/weapp/package/inspectionReport/inspectionReport.json
@@ -10,6 +10,8 @@
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-button": "@vant/weapp/button/index",
"van-divider": "@vant/weapp/divider/index",
- "van-empty": "@vant/weapp/empty/index"
+ "van-empty": "@vant/weapp/empty/index",
+ "van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
+ "van-dropdown-item": "@vant/weapp/dropdown-item/index"
}
}
\ No newline at end of file
diff --git a/weapp/package/inspectionReport/inspectionReport.wxml b/weapp/package/inspectionReport/inspectionReport.wxml
index ae63a38..287039f 100644
--- a/weapp/package/inspectionReport/inspectionReport.wxml
+++ b/weapp/package/inspectionReport/inspectionReport.wxml
@@ -1,26 +1,25 @@
-
-
-
-
-
-
-
-
-
-
- 至
-
+
+
+
+
+
+ 至
+
-
-
+
+
+
-
+
- {{item.fileName}}
+
+ {{item.fileName}}
+ {{item.inspectTm}}
+
- 打开
+
diff --git a/weapp/package/inspectionReport/inspectionReport.wxss b/weapp/package/inspectionReport/inspectionReport.wxss
index 15b9675..87a4db2 100644
--- a/weapp/package/inspectionReport/inspectionReport.wxss
+++ b/weapp/package/inspectionReport/inspectionReport.wxss
@@ -1,31 +1,68 @@
/* package/inspectionReport/inspectionReport.wxss */
+.page {
+ min-height: 100vh;
+ background: #F7F7FA;
+ position: relative;
+ --dropdown-menu-background-color: #fff;
+ --dropdown-menu-box-shadow: 0 2px 12px fade(#646566, 12);
+}
+
.time-option {
- display: flex;
- justify-content: space-evenly;
+ display: flex;
+ justify-content: space-evenly;
}
.time-option .van-picker {
- width: 45vw;
+ width: 45vw;
}
.file-box {
- width: 94%;
- height: 100rpx;
- padding: 0 20rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid rgb(240, 239, 239);
+ width: auto;
+ height: 85px;
+ background: #FFFFFF;
+ border-radius: 8px;
+ margin: 16px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
.file-box .file .logo {
- width: 80rpx;
- height: 80rpx;
- float: left;
- margin-right: 20rpx;
+ width: 34px;
+ height: 34px;
+ float: left;
+ margin-left: 13px;
+ margin-right: 20px;
+}
+
+.file-box .file .text {
+ height: 60px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-evenly;
+}
+
+.file-box .file .name {
+ font-weight: 600;
+ font-size: 17px;
+ color: #414141;
+}
+
+.file-box .file .time {
+ font-weight: 400;
+ font-size: 12px;
+ color: #414141a6;
+ letter-spacing: 0.09px;
+}
+
+.file-box .arrow {
+ width: 15px;
+ height: 15px;
+ float: right;
+ margin-right: 11px;
}
.file-box .file {
- display: flex;
- align-items: center;
+ display: flex;
+ align-items: center;
}
\ No newline at end of file