mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 06:49:37 +08:00
Merge remote-tracking branch 'origin/shoot-hand-html' into shoot-hand-html
This commit is contained in:
commit
c6e61f198e
@ -74,7 +74,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md='5' :sm='15'>
|
<a-col :md='5' :sm='15'>
|
||||||
<a-form-item label='预约时间'>
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md='5' :sm='15'>
|
<a-col :md='5' :sm='15'>
|
||||||
@ -138,9 +138,11 @@
|
|||||||
<a-config-provider :auto-insert-space-in-button='false'>
|
<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-button type='default' @click='handleShow(record.id)' style='margin-left: 5px' size='small'>查看</a-button>
|
||||||
</a-config-provider>
|
</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-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 slot='overlay'>
|
||||||
<a-menu-item key='0' @click='handleEdit(record.id, 1)'>
|
<a-menu-item key='0' @click='handleEdit(record.id, 1)'>
|
||||||
重新选择时间、会议室
|
重新选择时间、会议室
|
||||||
@ -151,10 +153,12 @@
|
|||||||
</a-menu>
|
</a-menu>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
<a-config-provider :auto-insert-space-in-button='false'>
|
<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>
|
||||||
<a-config-provider :auto-insert-space-in-button='false'>
|
<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-config-provider>
|
||||||
<a-button type='default' v-if='record.canStaff' @click='staff(record.id)' style='margin-left: 5px' size='small'>分配会务</a-button>
|
<a-button type='default' v-if='record.canStaff' @click='staff(record.id)' style='margin-left: 5px' size='small'>分配会务</a-button>
|
||||||
</span>
|
</span>
|
||||||
@ -237,6 +241,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: 'num'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '会议室',
|
title: '会议室',
|
||||||
dataIndex: 'name'
|
dataIndex: 'name'
|
||||||
@ -282,7 +290,8 @@ export default {
|
|||||||
// this.queryParam.name = this.$route.params.roomId
|
// this.queryParam.name = this.$route.params.roomId
|
||||||
let chooseDate = this.queryParam.chooseDate
|
let chooseDate = this.queryParam.chooseDate
|
||||||
if (chooseDate) {
|
if (chooseDate) {
|
||||||
this.queryParam.filterDate = chooseDate.format('YYYY-MM-DD')
|
// 暂时只取第一个,等后台接口调整
|
||||||
|
this.queryParam.filterDate = chooseDate[0].format('YYYY-MM-DD')
|
||||||
} else {
|
} else {
|
||||||
this.queryParam.filterDate = ''
|
this.queryParam.filterDate = ''
|
||||||
}
|
}
|
||||||
@ -291,8 +300,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.queryParam.role = 1
|
this.queryParam.role = 1
|
||||||
}
|
}
|
||||||
|
let dataNum = 0
|
||||||
return getMeetingReservationList(Object.assign(parameter, this.queryParam)).then(res => {
|
return getMeetingReservationList(Object.assign(parameter, this.queryParam)).then(res => {
|
||||||
for (let key in res.rows) {
|
for (let key in res.rows) {
|
||||||
|
dataNum = dataNum + 1
|
||||||
let startTime = res.rows[key].start
|
let startTime = res.rows[key].start
|
||||||
let endTime = res.rows[key].end
|
let endTime = res.rows[key].end
|
||||||
res.rows[key].timeSlot = moment(startTime).format('YYYY-MM-DD HH:mm') + '~' + moment(endTime).format('HH:mm')
|
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].canEdit = showEdit
|
||||||
res.rows[key].canApprove = showApprove
|
res.rows[key].canApprove = showApprove
|
||||||
res.rows[key].canStaff = showStaff
|
res.rows[key].canStaff = showStaff
|
||||||
|
res.rows[key].num = dataNum
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
@ -387,7 +399,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
let date = this.$route.query.date
|
let date = this.$route.query.date
|
||||||
if (date) {
|
if (date) {
|
||||||
this.queryParam.chooseDate = moment(date)
|
this.queryParam.chooseDate = [moment(date), moment(date)]
|
||||||
}
|
}
|
||||||
let status = this.$route.query.status
|
let status = this.$route.query.status
|
||||||
if (status) {
|
if (status) {
|
||||||
@ -409,6 +421,9 @@ export default {
|
|||||||
this.getAllRoomList()
|
this.getAllRoomList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onChangeTime(date, dateString) {
|
||||||
|
this.queryParam.chooseDate = date
|
||||||
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.queryParam = { status: '' }
|
this.queryParam = { status: '' }
|
||||||
this.$refs.table.refresh(true)
|
this.$refs.table.refresh(true)
|
||||||
|
@ -503,6 +503,8 @@ export default {
|
|||||||
top: 50,
|
top: 50,
|
||||||
bottom: 50
|
bottom: 50
|
||||||
}
|
}
|
||||||
|
const total = []
|
||||||
|
let totalNum = 0
|
||||||
const series = [
|
const series = [
|
||||||
'未完成',
|
'未完成',
|
||||||
'已完成'
|
'已完成'
|
||||||
@ -511,7 +513,7 @@ export default {
|
|||||||
name,
|
name,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'total',
|
stack: 'total',
|
||||||
barWidth: '10px',
|
barWidth: '30px',
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
formatter: (params) => params.value > 0 ? params.value : ''
|
formatter: (params) => params.value > 0 ? params.value : ''
|
||||||
@ -519,9 +521,49 @@ export default {
|
|||||||
data: rawData[sid].map((d, did) => rawData[sid][did])
|
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 = {
|
let option = {
|
||||||
|
graphic: [
|
||||||
|
{
|
||||||
|
type: 'text', // 类型为文本
|
||||||
|
left: '70%', // 位置
|
||||||
|
top: '2px', // 位置
|
||||||
|
style: {
|
||||||
|
text: '合计:' + totalNum + '条', // 文本内容
|
||||||
|
fontSize: 16, // 字体大小
|
||||||
|
fill: '#FF0000' // 字体颜色
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
legend: {
|
legend: {
|
||||||
selectedMode: false
|
data: ['未完成', '已完成']
|
||||||
|
// selectedMode: false
|
||||||
},
|
},
|
||||||
color: ['#f9c956', '#75bedc'],
|
color: ['#f9c956', '#75bedc'],
|
||||||
grid,
|
grid,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user