+
@@ -75,16 +69,12 @@ layout("/layouts/platform_h5.html"){
data() {
return {
viewShow: false,
- yearList: [],
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
- year: ""
+ year: new Date().getFullYear()
},
- tableLoading: false,
- tableFinished: false,
- tableData: []
}
},
methods: {
@@ -101,22 +91,22 @@ layout("/layouts/platform_h5.html"){
})
})
},
- openView(row) {
+ onView(row) {
this.viewShow = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(row)
})
},
onEdit(row) {
- this.$pjaxReplace("/platform/h5/club/apply?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id + "&clubId=" + row.clubId)
+ this.$pjaxReplace("/platform/h5/club/apply?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id)
},
- onDelete(row) {
+ onDelete(id) {
this.$dialog.confirm({
title: "提示",
message: "确定要删除此申请吗?"
})
.then(() => {
- this.$axios.post("/platform/club/join/mine/delete", { id: row.id }).then((res) => {
+ this.$axios.post("/platform/club/join/mine/delete", { id: id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
@@ -125,43 +115,16 @@ layout("/layouts/platform_h5.html"){
}
})
})
- .catch(() => {
- })
+ .catch(() => {})
},
doSearch() {
- this.pageForm.pageNumber = 1
- this.tableData = []
- this.finished = false
- this.pageData()
- },
- pageData() {
- this.tableLoading = true
- this.$axios.post("/platform/club/join/mine/pageData", this.pageForm).then((res) => {
- if (res.code === 0) {
- this.tableData = this.tableData.concat(res.data.list)
- this.pageForm.totalCount = res.data.totalCount
- if (this.tableData.length >= this.pageForm.totalCount) {
- this.tableFinished = true
- } else {
- this.pageForm.pageNumber++
- }
- this.tableLoading = false
- } else {
- this.$toast(res.msg)
- }
+ this.$nextTick(() => {
+ this.pageForm.pageNumber = 1
+ this.pageForm.totalCount = 0
+ this.$refs.tableListRef.doSearch()
})
- },
- initData() {
- for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
- this.yearList.unshift({ value: i, text: i + "年" })
- }
- this.$set(this.pageForm, "year", this.yearList[0].value)
}
},
- created() {
- this.initData()
- this.pageData()
- }
})