Commit 73305085 authored by 徐来柯's avatar 徐来柯

update

parent 39498e6e
...@@ -20,14 +20,17 @@ ...@@ -20,14 +20,17 @@
<script> <script>
export default { export default {
props: { props: {
// 总条数
totalCount: { totalCount: {
type: Number, type: Number,
default: 0, default: 0,
}, },
// 当前页
pageIndex: { pageIndex: {
type: Number, type: Number,
default: 1, default: 1,
}, },
//总页数
totalPage: { totalPage: {
type: Number, type: Number,
default: 1, default: 1,
......
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
return {} return {}
} }
}, },
// 查询条件options内容
searchList: { searchList: {
type: Array, type: Array,
default () { default () {
......
<template> <template>
<div class="baseTable"> <div class="baseTable">
<el-table <el-table
v-loading="loading"
border border
height="635" height="635"
class="conterFool_middle" class="conterFool_middle"
...@@ -78,6 +79,10 @@ export default { ...@@ -78,6 +79,10 @@ export default {
return [] return []
} }
}, },
loading: {
type: Boolean,
default: false
},
tableData: { tableData: {
type: Array, type: Array,
default () { default () {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="box-container"> <div class="box-container">
<div class="wrap"> <div class="wrap">
<search-form :formList="[1,2]" :searchList="searchList" :formData="formData" @searchData="searchData" /> <search-form :formList="[1,2]" :searchList="searchList" :formData="formData" @searchData="searchData" />
<baseTable :tableHead="tableHead" :tableData="tableData" :rowClassName="tableRowClassName" /> <baseTable :tableHead="tableHead" :tableData="tableData" :loading="loading" :rowClassName="tableRowClassName" />
<Pagination ref="page" :totalCount="totalCount" :totalPage="totalPage" @pageFun="pageFun" /> <Pagination ref="page" :totalCount="totalCount" :totalPage="totalPage" @pageFun="pageFun" />
</div> </div>
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
width: 180, width: 180,
}, },
], ],
loading: false,
deletetext: '', deletetext: '',
deleteShow: false, deleteShow: false,
typeV: '', typeV: '',
...@@ -143,10 +144,12 @@ export default { ...@@ -143,10 +144,12 @@ export default {
searchData () { searchData () {
var $this = this var $this = this
var postData = this.resetData() var postData = this.resetData()
$this.loading = true
this.$axios({ this.$axios({
method:"post", method:"post",
url:`/api/TJStatistics/Statistics_Query?argKeyWord=${postData.argKeyWord}&argWhere=${postData.argWhere}&Stime=${postData.Stime}&Etime=${postData.Etime}`, url:`/api/TJStatistics/Statistics_Query?argKeyWord=${postData.argKeyWord}&argWhere=${postData.argWhere}&Stime=${postData.Stime}&Etime=${postData.Etime}`,
}).then((res)=>{ }).then((res)=>{
$this.loading = false
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
$this.AllTableData = res.data.data.map(item => ({ $this.AllTableData = res.data.data.map(item => ({
...item, ...item,
...@@ -171,6 +174,7 @@ export default { ...@@ -171,6 +174,7 @@ export default {
$this.totalPage = 1 $this.totalPage = 1
} }
}).catch(function(err){ }).catch(function(err){
$this.loading = false
console.log('err',err) console.log('err',err)
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment