yudao-dev/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue

101 lines
2.2 KiB
Vue
Raw Normal View History

2023-10-24 15:16:20 +08:00
<template>
<div>
<el-drawer title="查看详情" :visible.sync="visible" size="70%">
<div class="box">
2023-11-22 16:58:32 +08:00
<el-row class="topBox">
<el-col :span="6">
<p class="boldTitle">工单名称</p>
<p class="lightText">{{ queryParams.workOrderName ? queryParams.workOrderName : '-' }}</p>
</el-col>
<el-col :span="6">
<p class="boldTitle">班组名称</p>
<p class="lightText">{{ queryParams.teamName ? queryParams.teamName : '-' }}</p>
</el-col>
</el-row>
2023-10-24 15:16:20 +08:00
<base-table
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
/>
</div>
</el-drawer>
</div>
</template>
<script>
import { getByTeam } from '@/api/monitoring/groupTeamView'
import { parseTime } from '@/utils/ruoyi'
const tableProps = [
{
prop: 'startTime',
label: '开始时间',
filter: parseTime,
2023-11-22 16:58:32 +08:00
minWidth: 160
2023-10-24 15:16:20 +08:00
},
{
prop: 'endTime',
label: '结束时间',
filter: parseTime,
2023-11-22 16:58:32 +08:00
minWidth: 160
2023-10-24 15:16:20 +08:00
},
{
prop: 'num',
label: '人数'
},
{
prop: 'workTime',
label: '工作时长'
}
]
export default {
name: 'GroupTeamViewDetail',
data() {
return {
visible: false,
tableProps,
tableData: [],
2023-11-22 16:58:32 +08:00
tableH: this.tableHeight(260),
2023-10-24 15:16:20 +08:00
queryParams: {}
}
},
created() {
window.addEventListener('resize', () => {
2023-11-22 16:58:32 +08:00
this.tableH = this.tableHeight(260)
2023-10-24 15:16:20 +08:00
})
},
methods: {
init(params) {
this.visible = true
this.queryParams = params
getByTeam({
teamId: this.queryParams.teamId,
workOrderId: this.queryParams.workOrderId
}).then(res => {
this.tableData = res.data || []
})
}
}
}
</script>
<style lang="scss" scoped>
.box {
padding: 0 32px;
2023-11-22 16:58:32 +08:00
.topBox {
padding-bottom: 30px;
margin-bottom: 30px;
border-bottom: 1px solid #E9E9E9;
.boldTitle {
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
margin: 0;
margin-bottom: 10px;
}
.lightText {
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
margin: 0;
}
}
2023-10-24 15:16:20 +08:00
}
</style>