|
@ -5,8 +5,7 @@ |
|
|
class="aui-card--fill"> |
|
|
class="aui-card--fill"> |
|
|
<div class="mod-demo__demo}"> |
|
|
<div class="mod-demo__demo}"> |
|
|
<el-form :inline="true" |
|
|
<el-form :inline="true" |
|
|
:model="tableParams" |
|
|
:model="tableParams"> |
|
|
@keyup.enter.native="loadTable()"> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
<div> |
|
|
|
|
|
|
|
@ -24,10 +23,11 @@ |
|
|
<div> |
|
|
<div> |
|
|
<el-form-item label="统计类型" |
|
|
<el-form-item label="统计类型" |
|
|
:label-width="labelWidth"> |
|
|
:label-width="labelWidth"> |
|
|
<el-radio v-model="staticType" |
|
|
<el-radio-group v-model="staticType" |
|
|
label="end">截止累计值</el-radio> |
|
|
@change="handleTypeChange"> |
|
|
<el-radio v-model="staticType" |
|
|
<el-radio label="end">截止累计值</el-radio> |
|
|
label="Interval">区间新增值</el-radio> |
|
|
<el-radio label="Interval">区间新增值</el-radio> |
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
|
<el-date-picker style="margin-left:30px" |
|
|
<el-date-picker style="margin-left:30px" |
|
|
v-if="staticType==='Interval'" |
|
|
v-if="staticType==='Interval'" |
|
@ -64,6 +64,7 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
<el-table :data="tableData" |
|
|
<el-table :data="tableData" |
|
|
|
|
|
v-loading="tableLoading" |
|
|
ref="ref_table" |
|
|
ref="ref_table" |
|
|
style="width: 100%;margin-bottom: 20px;" |
|
|
style="width: 100%;margin-bottom: 20px;" |
|
|
row-key="categoryCode" |
|
|
row-key="categoryCode" |
|
@ -136,7 +137,7 @@ export default { |
|
|
return { |
|
|
return { |
|
|
flag: "classify",//页面标识 |
|
|
flag: "classify",//页面标识 |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
|
|
|
tableLoading: false, |
|
|
downloadLoading: false, |
|
|
downloadLoading: false, |
|
|
|
|
|
|
|
|
//查询条件标题宽度 |
|
|
//查询条件标题宽度 |
|
@ -186,11 +187,11 @@ export default { |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
async initData () { |
|
|
async initData () { |
|
|
this.startLoading() |
|
|
|
|
|
this.initDate() |
|
|
this.initDate() |
|
|
await this.getAgencylist()//获取组织级联列表 |
|
|
await this.getAgencylist()//获取组织级联列表 |
|
|
await this.loadTable()//获取组织级联列表 |
|
|
await this.loadTable()//获取组织级联列表 |
|
|
this.endLoading() |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async getAgencylist () { |
|
|
async getAgencylist () { |
|
@ -239,7 +240,11 @@ export default { |
|
|
if (this.staticType === 'end') { |
|
|
if (this.staticType === 'end') { |
|
|
this.tableParams.startTime = '' |
|
|
this.tableParams.startTime = '' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.tableLoading = true |
|
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, this.tableParams) |
|
|
const { data, code, msg } = await requestPost(url, this.tableParams) |
|
|
|
|
|
this.tableLoading = false |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.tableData = data |
|
|
this.tableData = data |
|
|
|
|
|
|
|
@ -282,7 +287,7 @@ export default { |
|
|
date.setTime(date.getTime() - 24 * 60 * 60 * 1000); |
|
|
date.setTime(date.getTime() - 24 * 60 * 60 * 1000); |
|
|
const month = date.getMonth() + 1 > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1) |
|
|
const month = date.getMonth() + 1 > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1) |
|
|
const day = date.getDate() > 9 ? (date.getDate()) : '0' + (date.getDate()) |
|
|
const day = date.getDate() > 9 ? (date.getDate()) : '0' + (date.getDate()) |
|
|
|
|
|
|
|
|
const yesterday = date.getFullYear() + '-' + month + '-' + day |
|
|
const yesterday = date.getFullYear() + '-' + month + '-' + day |
|
|
this.timeArray = ['', yesterday] |
|
|
this.timeArray = ['', yesterday] |
|
|
this.endTimeModel = yesterday |
|
|
this.endTimeModel = yesterday |
|
@ -294,7 +299,30 @@ export default { |
|
|
this.endTimeShow = yesterdayArray[0] + '年' + yesterdayArray[1] + '月' + yesterdayArray[2] + '日' |
|
|
this.endTimeShow = yesterdayArray[0] + '年' + yesterdayArray[1] + '月' + yesterdayArray[2] + '日' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleTypeChange (value) { |
|
|
|
|
|
if (value === 'end') { |
|
|
|
|
|
|
|
|
|
|
|
const endTimeArray = util.dateFormatter(this.endTimeModel, 'date').split('-') |
|
|
|
|
|
this.tableParams.startTime = '' |
|
|
|
|
|
this.tableParams.endTime = endTimeArray[0] + endTimeArray[1] + endTimeArray[2] |
|
|
|
|
|
|
|
|
|
|
|
this.startTimeShow = '' |
|
|
|
|
|
this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日' |
|
|
|
|
|
} else { |
|
|
|
|
|
if (this.timeArray[0]) { |
|
|
|
|
|
const startTimeArray = util.dateFormatter(this.timeArray[0], 'date').split('-') |
|
|
|
|
|
this.tableParams.startTime = startTimeArray[0] + startTimeArray[1] + startTimeArray[2] |
|
|
|
|
|
this.startTimeShow = startTimeArray[0] + '年' + startTimeArray[1] + '月' + startTimeArray[2] + '日' |
|
|
|
|
|
} else { |
|
|
|
|
|
this.tableParams.startTime = '' |
|
|
|
|
|
this.startTimeShow = '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const endTimeArray = util.dateFormatter(this.timeArray[1], 'date').split('-') |
|
|
|
|
|
this.tableParams.endTime = endTimeArray[0] + endTimeArray[1] + endTimeArray[2] |
|
|
|
|
|
this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
handleEndTimeChange (item) { |
|
|
handleEndTimeChange (item) { |
|
|
if (item) { |
|
|
if (item) { |
|
|
const endTimeArray = util.dateFormatter(item, 'date').split('-') |
|
|
const endTimeArray = util.dateFormatter(item, 'date').split('-') |
|
@ -327,6 +355,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
validate () { |
|
|
validate () { |
|
|
|
|
|
|
|
|
if (this.staticType === 'Interval' && (!this.tableParams.endTime || !this.tableParams.startTime)) { |
|
|
if (this.staticType === 'Interval' && (!this.tableParams.endTime || !this.tableParams.startTime)) { |
|
|
this.$message.info("请选择起止日期") |
|
|
this.$message.info("请选择起止日期") |
|
|
return false |
|
|
return false |
|
|