1
This commit is contained in:
@@ -1,152 +1,150 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<!-- 列表 -->
|
||||
<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="160"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<!-- 查看详情 -->
|
||||
<group-team-view-detail v-if="paramVisible" ref="groupTeamViewDetail"/>
|
||||
</div>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<!-- 列表 -->
|
||||
<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="160"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<!-- 查看详情 -->
|
||||
<group-team-view-detail
|
||||
v-if="paramVisible"
|
||||
ref="groupTeamViewDetail" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getByWorkOrder } from '@/api/monitoring/groupTeamView'
|
||||
import { workOrderList } from '@/api/base/workOrder'
|
||||
import GroupTeamViewDetail from './components/groupTeamViewDetail.vue'
|
||||
import { publicFormatter } from '@/utils/dict'
|
||||
import { getByWorkOrder } from '@/api/monitoring/groupTeamView';
|
||||
import { workOrderList } from '@/api/base/workOrder';
|
||||
import GroupTeamViewDetail from './components/groupTeamViewDetail.vue';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'roomNameDict',
|
||||
label: '车间名称',
|
||||
filter: publicFormatter('workshop'),
|
||||
showOverflowtooltip: true,
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '班组名称'
|
||||
},
|
||||
{
|
||||
prop: 'leaderName',
|
||||
label: '班组长'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '人数'
|
||||
},
|
||||
{
|
||||
prop: 'workCount',
|
||||
label: '上班次数'
|
||||
}
|
||||
]
|
||||
{
|
||||
prop: 'roomNameDict',
|
||||
label: '车间名称',
|
||||
filter: publicFormatter('workshop'),
|
||||
showOverflowtooltip: true,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '班组名称',
|
||||
},
|
||||
{
|
||||
prop: 'leaderName',
|
||||
label: '班组长',
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '人数',
|
||||
},
|
||||
{
|
||||
prop: 'workCount',
|
||||
label: '上班次数',
|
||||
},
|
||||
];
|
||||
export default {
|
||||
name: 'GroupTeamView',
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工单',
|
||||
selectOptions: [],
|
||||
param: 'workOrderId',
|
||||
clearable: false,
|
||||
filterable: true
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
}
|
||||
],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 1000,
|
||||
workOrderId: ''
|
||||
},
|
||||
workOrderList: [],
|
||||
workOrderName: '',
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:group-team-view:detail')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
tableProps,
|
||||
tableH: this.tableHeight(220),
|
||||
list: [],
|
||||
paramVisible: false
|
||||
}
|
||||
},
|
||||
components: { GroupTeamViewDetail },
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(220)
|
||||
})
|
||||
this.getOrderList()
|
||||
},
|
||||
methods: {
|
||||
// 获取工单list
|
||||
getOrderList() {
|
||||
workOrderList().then(res => {
|
||||
console.log(res)
|
||||
this.formConfig[0].selectOptions = res.data || []
|
||||
this.workOrderList = res.data || []
|
||||
})
|
||||
},
|
||||
// 查询
|
||||
buttonClick(val) {
|
||||
if (!val.workOrderId) {
|
||||
this.$modal.msgWarning('工单不能为空')
|
||||
return false
|
||||
}
|
||||
this.queryParams.workOrderId = val.workOrderId
|
||||
this.getList()
|
||||
},
|
||||
// 获取table数据
|
||||
getList() {
|
||||
getByWorkOrder({ id: this.queryParams.workOrderId }).then(res => {
|
||||
this.list = res.data || []
|
||||
})
|
||||
},
|
||||
handleClick(val) {
|
||||
this.paramVisible = true
|
||||
let params = {}
|
||||
params.teamId = val.data.id
|
||||
params.teamName = val.data.name
|
||||
this.workOrderList.map(item => {
|
||||
if (val.data.workOrderId === item.id) {
|
||||
this.workOrderName = item.name
|
||||
}
|
||||
})
|
||||
params.workOrderId = val.data.workOrderId
|
||||
params.workOrderName = this.workOrderName
|
||||
params.roomNameDict = val.data.roomNameDict
|
||||
this.$nextTick(() => {
|
||||
this.$refs.groupTeamViewDetail.init(params)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
name: 'GroupTeamView',
|
||||
mixins: [tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工单',
|
||||
selectOptions: [],
|
||||
param: 'workOrderId',
|
||||
clearable: false,
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 1000,
|
||||
workOrderId: '',
|
||||
},
|
||||
heightNum: 220,
|
||||
workOrderList: [],
|
||||
workOrderName: '',
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:group-team-view:detail')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps,
|
||||
list: [],
|
||||
paramVisible: false,
|
||||
};
|
||||
},
|
||||
components: { GroupTeamViewDetail },
|
||||
mounted() {
|
||||
this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
// 获取工单list
|
||||
getOrderList() {
|
||||
workOrderList().then((res) => {
|
||||
console.log(res);
|
||||
this.formConfig[0].selectOptions = res.data || [];
|
||||
this.workOrderList = res.data || [];
|
||||
});
|
||||
},
|
||||
// 查询
|
||||
buttonClick(val) {
|
||||
if (!val.workOrderId) {
|
||||
this.$modal.msgWarning('工单不能为空');
|
||||
return false;
|
||||
}
|
||||
this.queryParams.workOrderId = val.workOrderId;
|
||||
this.getList();
|
||||
},
|
||||
// 获取table数据
|
||||
getList() {
|
||||
getByWorkOrder({ id: this.queryParams.workOrderId }).then((res) => {
|
||||
this.list = res.data || [];
|
||||
});
|
||||
},
|
||||
handleClick(val) {
|
||||
this.paramVisible = true;
|
||||
let params = {};
|
||||
params.teamId = val.data.id;
|
||||
params.teamName = val.data.name;
|
||||
this.workOrderList.map((item) => {
|
||||
if (val.data.workOrderId === item.id) {
|
||||
this.workOrderName = item.name;
|
||||
}
|
||||
});
|
||||
params.workOrderId = val.data.workOrderId;
|
||||
params.workOrderName = this.workOrderName;
|
||||
params.roomNameDict = val.data.roomNameDict;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.groupTeamViewDetail.init(params);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,130 +1,146 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area @submit="buttonClick" />
|
||||
<!-- <search-bar
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area @submit="buttonClick" />
|
||||
<!-- <search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/> -->
|
||||
<!-- 列表 -->
|
||||
<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" />
|
||||
</base-table>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<!-- 查看生产情况 -->
|
||||
<team-production-detail v-if='paramVisible' ref='schedulingMonitoringDetail' />
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<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" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList" />
|
||||
<!-- 查看生产情况 -->
|
||||
<team-production-detail
|
||||
v-if="paramVisible"
|
||||
ref="schedulingMonitoringDetail" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { groupTeamSchedulingPage } from '@/api/monitoring/teamProduction'
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import TeamProductionDetail from './components/teamProductionDetail'
|
||||
import { publicFormatter } from '@/utils/dict'
|
||||
import SearchArea from './components/searchArea'
|
||||
import { groupTeamSchedulingPage } from '@/api/monitoring/teamProduction';
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import TeamProductionDetail from './components/teamProductionDetail';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
import SearchArea from './components/searchArea';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'roomNameDict',
|
||||
label: '车间名称',
|
||||
filter: publicFormatter('workshop'),
|
||||
showOverflowtooltip: true,
|
||||
minWidth: 100
|
||||
},
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: '排班创建时间',
|
||||
// filter: parseTime,
|
||||
// minWidth: 160
|
||||
// },
|
||||
{
|
||||
prop: 'startDay',
|
||||
label: '上班日期',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '上班时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160
|
||||
},
|
||||
{
|
||||
prop: 'endTime',
|
||||
label: '下班时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160
|
||||
},
|
||||
{
|
||||
prop: 'classesName',
|
||||
label: '班次名称',
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'teamName',
|
||||
label: '班组名称',
|
||||
showOverflowtooltip: true
|
||||
}
|
||||
]
|
||||
{
|
||||
prop: 'roomNameDict',
|
||||
label: '车间名称',
|
||||
filter: publicFormatter('workshop'),
|
||||
showOverflowtooltip: true,
|
||||
minWidth: 100,
|
||||
},
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: '排班创建时间',
|
||||
// filter: parseTime,
|
||||
// minWidth: 160
|
||||
// },
|
||||
{
|
||||
prop: 'startDay',
|
||||
label: '上班日期',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '上班时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160,
|
||||
},
|
||||
{
|
||||
prop: 'endTime',
|
||||
label: '下班时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160,
|
||||
},
|
||||
{
|
||||
prop: 'classesName',
|
||||
label: '班次名称',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'teamName',
|
||||
label: '班组名称',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
name: 'GroupTeamScheduling',
|
||||
data() {
|
||||
return {
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
classesId: '',
|
||||
teamName: '',
|
||||
startDay: []
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:team-production:detail')
|
||||
? {
|
||||
type: 'productionDetail',
|
||||
btnName: '查看',
|
||||
showTip: '生产情况'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
list: [],
|
||||
tableH: this.tableHeight(260),
|
||||
total: 0,
|
||||
paramVisible: false
|
||||
}
|
||||
},
|
||||
components: { TeamProductionDetail, SearchArea },
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.classesId = val.classesId
|
||||
this.queryParams.teamName = val.teamName
|
||||
this.queryParams.startDay[0] = val.tiemStr ? val.tiemStr[0] + ' 00:00:00' : ''
|
||||
this.queryParams.startDay[1] = val.tiemStr ? val.tiemStr[1] + ' 23:59:59' : ''
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
groupTeamSchedulingPage({ ...this.queryParams }).then(res => {
|
||||
console.log(res)
|
||||
this.list = res.data.list || []
|
||||
this.total = res.data.total || 0
|
||||
})
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val)
|
||||
this.paramVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.schedulingMonitoringDetail.init(val.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
name: 'GroupTeamScheduling',
|
||||
mixins: [tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
classesId: '',
|
||||
teamName: '',
|
||||
startDay: [],
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:team-production:detail')
|
||||
? {
|
||||
type: 'productionDetail',
|
||||
btnName: '查看',
|
||||
showTip: '生产情况',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
list: [],
|
||||
total: 0,
|
||||
paramVisible: false,
|
||||
};
|
||||
},
|
||||
components: { TeamProductionDetail, SearchArea },
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.classesId = val.classesId;
|
||||
this.queryParams.teamName = val.teamName;
|
||||
this.queryParams.startDay[0] = val.tiemStr
|
||||
? val.tiemStr[0] + ' 00:00:00'
|
||||
: '';
|
||||
this.queryParams.startDay[1] = val.tiemStr
|
||||
? val.tiemStr[1] + ' 23:59:59'
|
||||
: '';
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
groupTeamSchedulingPage({ ...this.queryParams }).then((res) => {
|
||||
console.log(res);
|
||||
this.list = res.data.list || [];
|
||||
this.total = res.data.total || 0;
|
||||
});
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
this.paramVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.schedulingMonitoringDetail.init(val.data);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user