中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

287 lines
9.4 KiB

<template>
7 months ago
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad">
<template #menu-left>
5 months ago
<el-button @click="setBathCrew()" type="primary" plain>批量分派</el-button>
7 months ago
</template>
<template #menu-right="{ size }">
</template>
<template #menu="scope">
<el-button type="primary" link @click="setCrew(scope.row)">分派</el-button>
7 months ago
</template>
<template #bsWorkType.wtName="scope">
<span>
{{ scope.row.bsWorkType ? scope.row.bsWorkType.wtName : '-' }}
</span>
</template>
<template #name="{ row }">
<i :class="row.source" style="margin-right: 5px" />
<span>{{ row.name }}</span>
</template>
<template #source="{ row }">
<div style="text-align: center">
<i :class="row.source" />
</div>
</template>
</avue-crud>
<!-- 分派人员弹框 -->
7 months ago
<assignDaialog :id="bcId" :set-crew-open="setCrewOpen" v-if="setCrewOpen" type="platingAssort"
@setCrewOpeSancel="setCrewOpeSancel" :title="title" :updateRow="updateRow"></assignDaialog>
7 months ago
</basic-container>
</template>
<script>
import {
getList,
setDispatch
} from "@/api/processManagement/taskDispatch";
7 months ago
import assignDaialog from "./components/assignDaialog.vue"
export default {
components: {
assignDaialog
},
data() {
return {
bcId: null,
setCrewOpen: false,
form: {},
query: {},
loading: true,
selectionList: [],
parentId: '',
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
height: 'auto',
7 months ago
calcHeight: 32,
6 months ago
tip: false,
size: 'medium',
simplePage: true,
7 months ago
searchShow: true,
searchMenuSpan: 12,
6 months ago
searchIcon: true,
searchIndex: 3,
tree: false,
7 months ago
border: true,
6 months ago
index: true,
7 months ago
selection: true,
5 months ago
viewBtn: false,
delBtn: false,
editBtn: false,
5 months ago
addBtn: false,
6 months ago
editBtnText: '修改',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
viewBtnText: '详情',
6 months ago
labelWidth: 120,
5 months ago
menuWidth: 80,
6 months ago
dialogWidth: 1200,
7 months ago
dialogClickModal: false,
6 months ago
searchEnter: true,
excelBtn: false,
filterBtn: true,
7 months ago
searchShowBtn: false,
6 months ago
columnSort: true,
excelBtn: true,
columnSort: true,
6 months ago
index: false,
showOverflowTooltip: true,
menuAlign: 'left',
gridBtn:false,
searchLabelPosition:'left',
searchGutter:24,
searchSpan:6,
searchMenuPosition:'right',
5 months ago
align: 'center',
7 months ago
column: [
{
label: '零件号',
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'center',
searchLabelWidth:60,
7 months ago
},
{
label: '零件名称',
prop: 'partName',
sortable: true,
search: false,
overHidden: true,
headerAlign: 'center',
align: 'left',
7 months ago
rules: [
{
required: false,
message: '请选择镀种分类',
trigger: 'click',
},
],
},
{
label: '任务类型',
prop: 'taskType',
7 months ago
sortable: true,
search: true,
overHidden: true,
type: 'select',
4 months ago
filterable:true,
clearable: true,
headerAlign: 'center',
align: 'center',
dicUrl: '/blade-system/dict/dictionary?code=processTaskType',
props: {
label: 'dictValue',
value: 'dictKey',
},
7 months ago
},
{
label: 'PDM发布时间',
prop: 'pdmCreateTime',
7 months ago
sortable: true,
search: false,
overHidden: true,
headerAlign: 'center',
align: 'center',
7 months ago
},
{
label: 'PDM工艺路线',
prop: 'pdmWay',
7 months ago
sortable: true,
search: false,
overHidden: true,
headerAlign: 'center',
align: 'center',
7 months ago
},
{
label: '工艺路线详情',
prop: 'wayDetails',
sortable: true,
search: false,
overHidden: true,
headerAlign: 'center',
align: 'center',
7 months ago
},
{
label: '在制品建议',
prop: 'wipTake',
sortable: true,
search: false,
overHidden: true,
headerAlign: 'center',
align: 'center',
7 months ago
},
{
label: '备注',
prop: 'remarks',
7 months ago
sortable: true,
search: false,
overHidden: true,
headerAlign: 'center',
align: 'left',
7 months ago
},
],
},
data: [],
title: '分派',
updateRow:[],
7 months ago
}
},
7 months ago
methods: {
setBathCrew() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.updateRow =this.selectionList
7 months ago
this.setCrewOpen = true;
this.title = '批量分派'
},
// 设置班组人员
setCrew(row) {
this.updateRow = [row]
7 months ago
this.setCrewOpen = true;
this.title = '分派'
},
// 设置班组人员弹框关闭
setCrewOpeSancel(isRefresh) {
4 months ago
// if (isRefresh) {
// this.$refs.myTable.load();
// }
7 months ago
this.setCrewOpen = false;
4 months ago
this.onLoad(this.page)
7 months ago
},
// 重置
searchReset() {
this.query = {};
this.parentId = 0;
this.onLoad(this.page);
},
// 搜索
searchChange(params, done) {
this.query = params;
this.parentId = '';
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
// 选中表格数据
selectionChange(list) {
this.selectionList = list;
},
//
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
7 months ago
// 切换 页码
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
// 切换页面 数量
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
// 加载页面数据
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = this.data.length
this.selectionClear();
});
7 months ago
},
},
}
</script>