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.
55 lines
1.5 KiB
55 lines
1.5 KiB
5 years ago
|
Component({
|
||
|
data: {
|
||
|
list: [],
|
||
|
},
|
||
|
properties: {
|
||
|
contentObj: {
|
||
|
type: Object,
|
||
|
value: {},
|
||
|
},
|
||
|
key: {
|
||
|
type: String,
|
||
|
value: 'tab1',
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
navigateToDetail(e) {
|
||
|
const id = e.currentTarget.dataset.id
|
||
|
let {infoid} = e.currentTarget.dataset
|
||
|
if(this.properties.key=='tab1'){
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/noteIndex/pages/noteDetail/noteDetail?id=${id}`
|
||
|
})
|
||
|
}else if(this.properties.key=='tab2'){
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/weeklyReport/pages/weeklyReportDetail/weeklyReportDetail?infoId=${id}`
|
||
|
})
|
||
|
}else if(this.properties.key=='tab3'){
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/monthlyReport/pages/monthlyDetail/monthlyDetail?infoId=${infoid}`
|
||
|
})
|
||
|
}
|
||
|
|
||
|
},
|
||
|
navigateToUd(e) {
|
||
|
// noteType = "change" id
|
||
|
const id = e.currentTarget.dataset.id
|
||
|
let {infoid} = e.currentTarget.dataset
|
||
|
if(this.properties.key=='tab1'){
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/noteIndex/pages/noteIndex/noteIndex?id=${id}¬eType=change`
|
||
|
})
|
||
|
}else if(this.properties.key=='tab2'){
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/weeklyReport/pages/weeklyReportIndex/weeklyReportIndex?infoId=${id}&weeklyType=change`
|
||
|
})
|
||
|
}else if(this.properties.key=='tab3'){
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/monthlyReport/pages/monthlyIndex/monthlyIndex?infoId=${infoid}&monthlyType=change`
|
||
|
})
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
})
|