..
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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user