..
This commit is contained in:
@@ -12,8 +12,9 @@
|
||||
<div v-for="(row, index) in tableData" :key="index" class="table-list-item">
|
||||
<slot name="header" :index="index" :row="row">
|
||||
<div class="item-header">
|
||||
<div class="item-title">{{row[title]}}</div>
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
<div class="item-title">{{ row[title] }}</div>
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</div>
|
||||
</slot>
|
||||
|
||||
@@ -47,14 +48,22 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
},
|
||||
json:{
|
||||
json: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
page_form:{
|
||||
handler(val) {
|
||||
this.localPageForm = {...val}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -68,9 +77,9 @@ module.exports = {
|
||||
methods: {
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.localPageForm = {...this.page_form}
|
||||
// this.localPageForm = {...this.page_form}
|
||||
const loading = createListLoading()
|
||||
this.$axios.post(this.api, this.json ? ({pageForm:JSON.stringify(this.localPageForm)}) : this.localPageForm).then((res) => {
|
||||
this.$axios.post(this.api, this.json ? ({pageForm: JSON.stringify(this.localPageForm)}) : this.localPageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.localPageForm.totalCount = res.data.totalCount
|
||||
@@ -92,19 +101,15 @@ module.exports = {
|
||||
this.tableData = [];
|
||||
this.pageData();
|
||||
},
|
||||
onRefresh() {
|
||||
this.localPageForm.pageNumber = 1
|
||||
this.$emit('update:page_form', {...this.localPageForm});
|
||||
this.doSearch()
|
||||
},
|
||||
onRefresh() {
|
||||
this.localPageForm.pageNumber = 1
|
||||
this.$emit('update:page_form', {...this.localPageForm});
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// this.pageData();
|
||||
},
|
||||
mounted() {
|
||||
// 通知父组件准备好了
|
||||
this.$emit('ready');
|
||||
}
|
||||
mounted() {
|
||||
this.$emit('ready');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
+4
-6
@@ -18,7 +18,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/proposal/mine/pageData" :page_form.sync="pageForm">
|
||||
<table-list api="/platform/proposal/mine/pageData" :page_form.sync="pageForm" @ready="onReady" ref="tableListRef">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案类型">{{row.typeName}}</table-column>
|
||||
</template>
|
||||
@@ -118,10 +118,6 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
doSearch() {
|
||||
this.$refs.tableListRef.doSearch()
|
||||
// this.pageForm.pageNumber = 1
|
||||
// this.pageForm.totalCount = 0
|
||||
// this.tableData = []
|
||||
// this.pageData()
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$dialog
|
||||
@@ -150,10 +146,12 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onReady() {
|
||||
this.listSession()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+10
-25
@@ -33,13 +33,16 @@ layout("/layouts/platform_h5.html"){
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/teacherCongress/delegate/read/pageData" :page_form.sync="pageForm" json ref="tableListRef">
|
||||
<table-list api="/platform/teacherCongress/delegate/read/pageData" :page_form.sync="pageForm" json
|
||||
@ready="onReady"
|
||||
ref="tableListRef">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="代表姓名">{{row.userName}}</table-column>
|
||||
<table-column label="代表工号">{{row.loginName}}</table-column>
|
||||
<table-column label="代表团">{{delegationOptions.find(v=>v.id===row.delegationId)?.name}}</table-column>
|
||||
<table-column label="代表身份">{{moreOptions.find(v=>v.title==='代表身份')?.options.find(v=>v.id===row.roleId)?.name}}</table-column>
|
||||
<table-column label="代表身份">
|
||||
{{moreOptions.find(v=>v.title==='代表身份')?.options.find(v=>v.id===row.roleId)?.name}}
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn">
|
||||
@@ -135,33 +138,15 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
// this.tableLoading = true
|
||||
// this.$axios
|
||||
// .post("/platform/teacherCongress/delegate/read/pageData", {
|
||||
// pageForm: JSON.stringify(this.pageForm)
|
||||
// })
|
||||
// .then((resp) => {
|
||||
// this.tableData = this.tableData.concat(resp.data.list)
|
||||
// this.pageForm.totalCount = resp.data.totalCount
|
||||
// if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
// this.tableFinished = true
|
||||
// } else {
|
||||
// this.pageForm.pageNumber++
|
||||
// }
|
||||
// this.tableLoading = false
|
||||
// })
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
},
|
||||
onReady() {
|
||||
this.listRole()
|
||||
this.listSession()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.pageData()
|
||||
this.listRole()
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user