修改随手拍统计图表

修改会议系统列表内容
This commit is contained in:
471615499@qq.com 2025-05-21 21:03:45 +08:00
parent acf66a4c37
commit 111e9c32f7
2 changed files with 66 additions and 9 deletions

View File

@ -74,7 +74,7 @@
</a-col>
<a-col :md='5' :sm='15'>
<a-form-item label='预约时间'>
<a-date-picker v-model='queryParam.chooseDate' @change='res => this.$forceUpdate()' />
<a-range-picker v-model='queryParam.chooseDate' @change='onChangeTime' />
</a-form-item>
</a-col>
<a-col :md='5' :sm='15'>
@ -138,9 +138,11 @@
<a-config-provider :auto-insert-space-in-button='false'>
<a-button type='default' @click='handleShow(record.id)' style='margin-left: 5px' size='small'>查看</a-button>
</a-config-provider>
<a-button type='default' v-if='record.canCancel' @click='cancelConfirm(record.id, record.status)' style='margin-left: 5px' size='small'>取消预约</a-button>
<a-button type='default' v-if='record.canCancel' @click='cancelConfirm(record.id, record.status)'
style='margin-left: 5px' size='small'>取消预约</a-button>
<a-dropdown :trigger="['click']" v-if='record.canEdit'>
<a-button type='default' class='ant-dropdown-link' @click='e => e.preventDefault()' style='margin-left: 5px' size='small'>修改信息</a-button>
<a-button type='default' class='ant-dropdown-link' @click='e => e.preventDefault()' style='margin-left: 5px'
size='small'>修改信息</a-button>
<a-menu slot='overlay'>
<a-menu-item key='0' @click='handleEdit(record.id, 1)'>
重新选择时间会议室
@ -151,10 +153,12 @@
</a-menu>
</a-dropdown>
<a-config-provider :auto-insert-space-in-button='false'>
<a-button type='primary' v-if='record.canApprove' @click='approve(record.id, 1)' style='margin-left: 5px' size='small'>通过</a-button>
<a-button type='primary' v-if='record.canApprove' @click='approve(record.id, 1)' style='margin-left: 5px'
size='small'>通过</a-button>
</a-config-provider>
<a-config-provider :auto-insert-space-in-button='false'>
<a-button type='danger' v-if='record.canApprove' @click='approve(record.id, 2)' style='margin-left: 5px' size='small'>驳回</a-button>
<a-button type='danger' v-if='record.canApprove' @click='approve(record.id, 2)' style='margin-left: 5px'
size='small'>驳回</a-button>
</a-config-provider>
<a-button type='default' v-if='record.canStaff' @click='staff(record.id)' style='margin-left: 5px' size='small'>分配会务</a-button>
</span>
@ -237,6 +241,10 @@ export default {
},
//
columns: [
{
title: '序号',
dataIndex: 'num'
},
{
title: '会议室',
dataIndex: 'name'
@ -282,7 +290,8 @@ export default {
// this.queryParam.name = this.$route.params.roomId
let chooseDate = this.queryParam.chooseDate
if (chooseDate) {
this.queryParam.filterDate = chooseDate.format('YYYY-MM-DD')
//
this.queryParam.filterDate = chooseDate[0].format('YYYY-MM-DD')
} else {
this.queryParam.filterDate = ''
}
@ -291,8 +300,10 @@ export default {
} else {
this.queryParam.role = 1
}
let dataNum = 0
return getMeetingReservationList(Object.assign(parameter, this.queryParam)).then(res => {
for (let key in res.rows) {
dataNum = dataNum + 1
let startTime = res.rows[key].start
let endTime = res.rows[key].end
res.rows[key].timeSlot = moment(startTime).format('YYYY-MM-DD HH:mm') + '~' + moment(endTime).format('HH:mm')
@ -365,6 +376,7 @@ export default {
res.rows[key].canEdit = showEdit
res.rows[key].canApprove = showApprove
res.rows[key].canStaff = showStaff
res.rows[key].num = dataNum
}
return res
})
@ -387,7 +399,7 @@ export default {
created() {
let date = this.$route.query.date
if (date) {
this.queryParam.chooseDate = moment(date)
this.queryParam.chooseDate = [moment(date), moment(date)]
}
let status = this.$route.query.status
if (status) {
@ -409,6 +421,9 @@ export default {
this.getAllRoomList()
},
methods: {
onChangeTime(date, dateString) {
this.queryParam.chooseDate = date
},
reset() {
this.queryParam = { status: '' }
this.$refs.table.refresh(true)

View File

@ -503,6 +503,8 @@ export default {
top: 50,
bottom: 50
}
const total = []
let totalNum = 0
const series = [
'未完成',
'已完成'
@ -511,7 +513,7 @@ export default {
name,
type: 'bar',
stack: 'total',
barWidth: '10px',
barWidth: '30px',
label: {
show: true,
formatter: (params) => params.value > 0 ? params.value : ''
@ -519,9 +521,49 @@ export default {
data: rawData[sid].map((d, did) => rawData[sid][did])
}
})
for (let key in series[0]['data']) {
let numAll = series[0]['data'][key] + series[1]['data'][key]
total.push(numAll)
totalNum = numAll + totalNum
}
series.push({
name: '总数',
type: 'bar',
stack: 'sum',
barWidth: '30px',
barGap: '-100%',
label: {
normal: {
show: true,
position: 'top',
formatter: (params) => params.value > 0 ? params.value : '',
// formatter: '{c}', //
textStyle: { color: '#000' }
}
},
itemStyle: {
normal: {
color: 'rgba(128, 128, 128, 0)'
}
},
data: total
})
let option = {
graphic: [
{
type: 'text', //
left: '70%', //
top: '2px', //
style: {
text: '合计:' + totalNum + '条', //
fontSize: 16, //
fill: '#FF0000' //
}
}
],
legend: {
selectedMode: false
data: ['未完成', '已完成']
// selectedMode: false
},
color: ['#f9c956', '#75bedc'],
grid,