2023-10-24 15:16:20 +08:00
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<!-- 搜索工作栏 -->
|
2024-03-14 14:47:57 +08:00
|
|
|
<search-area @submit="buttonClick" />
|
2024-02-29 16:46:25 +08:00
|
|
|
<!-- <search-bar
|
2023-10-24 15:16:20 +08:00
|
|
|
:formConfigs="formConfig"
|
|
|
|
ref="searchBarForm"
|
|
|
|
@headBtnClick="buttonClick"
|
2024-02-29 16:46:25 +08:00
|
|
|
/> -->
|
2023-10-24 15:16:20 +08:00
|
|
|
<!-- 列表 -->
|
2024-03-14 14:47:57 +08:00
|
|
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
|
|
|
:max-height="tableH">
|
|
|
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
|
|
|
@clickBtn="handleClick" />
|
2023-10-24 15:16:20 +08:00
|
|
|
</base-table>
|
2024-03-14 14:47:57 +08:00
|
|
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
|
|
|
@pagination="getList" />
|
2023-10-24 15:16:20 +08:00
|
|
|
<!-- 查看生产情况 -->
|
2024-03-14 14:47:57 +08:00
|
|
|
<team-production-detail v-if='paramVisible' ref='schedulingMonitoringDetail' />
|
2023-10-24 15:16:20 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2024-02-29 16:46:25 +08:00
|
|
|
import { groupTeamSchedulingPage } from '@/api/monitoring/teamProduction'
|
2023-10-24 15:16:20 +08:00
|
|
|
import { parseTime } from '@/utils/ruoyi'
|
2023-10-30 10:26:54 +08:00
|
|
|
import TeamProductionDetail from './components/teamProductionDetail'
|
2024-02-01 14:24:12 +08:00
|
|
|
import { publicFormatter } from '@/utils/dict'
|
2024-02-29 16:46:25 +08:00
|
|
|
import SearchArea from './components/searchArea'
|
2023-10-24 15:16:20 +08:00
|
|
|
const tableProps = [
|
|
|
|
{
|
2024-02-01 14:24:12 +08:00
|
|
|
prop: 'roomNameDict',
|
|
|
|
label: '车间名称',
|
|
|
|
filter: publicFormatter('workshop'),
|
|
|
|
showOverflowtooltip: true,
|
|
|
|
minWidth: 100
|
2023-10-24 15:16:20 +08:00
|
|
|
},
|
2024-02-01 14:24:12 +08:00
|
|
|
// {
|
|
|
|
// prop: 'createTime',
|
|
|
|
// label: '排班创建时间',
|
|
|
|
// filter: parseTime,
|
|
|
|
// minWidth: 160
|
|
|
|
// },
|
2023-10-24 15:16:20 +08:00
|
|
|
{
|
|
|
|
prop: 'startDay',
|
2023-11-03 16:59:07 +08:00
|
|
|
label: '上班日期',
|
|
|
|
minWidth: 100
|
2023-10-24 15:16:20 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'startTime',
|
|
|
|
label: '上班时间',
|
2023-11-03 16:59:07 +08:00
|
|
|
filter: parseTime,
|
2023-11-22 16:58:32 +08:00
|
|
|
minWidth: 160
|
2023-10-24 15:16:20 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'endTime',
|
|
|
|
label: '下班时间',
|
2023-11-03 16:59:07 +08:00
|
|
|
filter: parseTime,
|
2023-11-22 16:58:32 +08:00
|
|
|
minWidth: 160
|
2023-10-24 15:16:20 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'classesName',
|
2023-11-03 16:59:07 +08:00
|
|
|
label: '班次名称',
|
|
|
|
showOverflowtooltip: true
|
2023-10-24 15:16:20 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'teamName',
|
2023-11-03 16:59:07 +08:00
|
|
|
label: '班组名称',
|
|
|
|
showOverflowtooltip: true
|
2023-10-24 15:16:20 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
export default {
|
|
|
|
name: 'GroupTeamScheduling',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 20,
|
|
|
|
classesId: '',
|
|
|
|
teamName: '',
|
2023-11-07 15:49:07 +08:00
|
|
|
startDay: []
|
2023-10-24 15:16:20 +08:00
|
|
|
},
|
|
|
|
tableProps,
|
2023-11-07 15:49:07 +08:00
|
|
|
tableBtn: [
|
2024-03-14 14:47:57 +08:00
|
|
|
this.$auth.hasPermi('base:team-production:detail')
|
2023-11-07 15:49:07 +08:00
|
|
|
? {
|
2024-03-14 14:47:57 +08:00
|
|
|
type: 'productionDetail',
|
|
|
|
btnName: '查看',
|
|
|
|
showTip: '生产情况'
|
|
|
|
}
|
2023-11-07 15:49:07 +08:00
|
|
|
: undefined
|
|
|
|
].filter((v) => v),
|
2023-10-24 15:16:20 +08:00
|
|
|
list: [],
|
2023-11-03 16:59:07 +08:00
|
|
|
tableH: this.tableHeight(260),
|
2023-10-24 15:16:20 +08:00
|
|
|
total: 0,
|
|
|
|
paramVisible: false
|
|
|
|
}
|
|
|
|
},
|
2024-02-29 16:46:25 +08:00
|
|
|
components: { TeamProductionDetail, SearchArea },
|
2023-10-24 15:16:20 +08:00
|
|
|
mounted() {
|
|
|
|
window.addEventListener('resize', () => {
|
2023-11-03 16:59:07 +08:00
|
|
|
this.tableH = this.tableHeight(260)
|
2023-10-24 15:16:20 +08:00
|
|
|
})
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
buttonClick(val) {
|
|
|
|
this.queryParams.pageNo = 1;
|
2023-11-03 16:59:07 +08:00
|
|
|
this.queryParams.classesId = val.classesId
|
|
|
|
this.queryParams.teamName = val.teamName
|
2023-11-07 15:49:07 +08:00
|
|
|
this.queryParams.startDay[0] = val.tiemStr ? val.tiemStr[0] + ' 00:00:00' : ''
|
|
|
|
this.queryParams.startDay[1] = val.tiemStr ? val.tiemStr[1] + ' 23:59:59' : ''
|
2023-10-24 15:16:20 +08:00
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
getList() {
|
2024-03-14 14:47:57 +08:00
|
|
|
groupTeamSchedulingPage({ ...this.queryParams }).then(res => {
|
2023-10-24 15:16:20 +08:00
|
|
|
console.log(res)
|
|
|
|
this.list = res.data.list || []
|
|
|
|
this.total = res.data.total || 0
|
|
|
|
})
|
2023-10-30 10:26:54 +08:00
|
|
|
},
|
2023-10-24 15:16:20 +08:00
|
|
|
handleClick(val) {
|
|
|
|
console.log(val)
|
|
|
|
this.paramVisible = true
|
|
|
|
this.$nextTick(() => {
|
2023-10-30 10:26:54 +08:00
|
|
|
this.$refs.schedulingMonitoringDetail.init(val.data)
|
2023-10-24 15:16:20 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|