@@ -99,6 +99,13 @@ Page({
url: '/pages/myFile/myFile',
})
},
+ // 点击查看报告
+ handleRepoetDetail (e) {
+ var reportid = e.currentTarget.dataset.reportid
+ wx.navigateTo({
+ url: '/pages/reportDetail/reportDetail?reportid=' + reportid
+ })
+ },
// 添加检测人
handleAddCheck () {
wx.navigateTo({
@@ -59,7 +59,7 @@
<image class="qrcode-item" src="../../imaes/erweima@2x.png"></image>
</view>
- <view class="file-right check-report">查看报告</view>
+ <view class="file-right check-report" data-reportid="{{item.reportId}}" wx:if="{{item.reportId !== null }}" bindtap="handleRepoetDetail">查看报告</view>
</block>
@@ -59,6 +59,13 @@ Page({
}
+ handleReportDetail (e) {
+
/**
* 新建档案
*/
@@ -26,8 +26,8 @@
<view class="f-right ittflex">
- <!-- <text class="report-text">已有2份报告</text> -->
- <text class="report-text report-text-fail">还未产生报告</text>
+ <text class="report-text report-text-success" wx:if="{{item.reportId !== null}}" data-reportid="{{item.reportId}}" bindtap="handleReportDetail">查看报告</text>
+ <text class="report-text report-text-fail" wx:if="{{item.reportId == null}}">还未产生报告</text>
@@ -53,6 +53,9 @@
.report-text-fail {
color: #999999;
+.report-text-success {
+ color: var(--maincolor);
+}
.fu-name {
font-size: 30rpx;
font-weight: bold;
@@ -77,18 +77,8 @@ Page({
handleDetail(e) {
var reportId = e.currentTarget.dataset.reportid
- console.log(e.currentTarget.dataset.reportid);
url: '/pages/reportDetail/reportDetail?reportid=' + reportId
- /* var data = {
- name: '循环系统',
- reportId: reportId
- }
- getReport(data).then(res => {
- console.log(res);
- })
- return
- */