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