Commit b686fd75 authored by jingnan's avatar jingnan 👀

计划模块增加所有属性的排序

parent 8e191fbb
......@@ -69,6 +69,7 @@
@pagination-current-change="paginationCurrentChange"
@pagination-size-change="handleSizeChange"
@selection-change="selectionChange"
@sort-change="handleSortChange"
>
<dee-tools slot="header" :tools="tools" mode="normal" />
</dee-up-table>
......@@ -156,11 +157,12 @@ export default {
width: '70'
},
columns: [
{ title: '机上区域', key: 'extProcessPlan.area', align: 'left', minWidth: 120 },
{ title: '机上区域', key: 'extProcessPlan.area', align: 'left', minWidth: 120, sortable: true },
{
title: '指令号',
key: 'extProcessPlan.serialNumber',
align: 'left',
sortable: true,
minWidth: 330,
component: {
render: (h, params) => {
......@@ -192,23 +194,23 @@ export default {
}
}
},
{ title: '指令名称', key: 'extProcessPlan.name', align: 'left', minWidth: 280 },
{ title: '机型', key: 'extProcessPlan.planeType', align: 'left' },
{ title: '架次', key: 'extProcessPlan.sorties', align: 'left' },
{ title: '站位', key: 'extProcessPlan.positionNumber', align: 'left' },
{ title: '工时定额', key: 'extProcessPlan.opHour', align: 'left' },
{ title: '工时', key: 'extProcessPlan.workHour', align: 'left' },
{ title: '指令名称', key: 'extProcessPlan.name', align: 'left', minWidth: 280, sortable: true },
{ title: '机型', key: 'extProcessPlan.planeType', align: 'left', sortable: true },
{ title: '架次', key: 'extProcessPlan.sorties', align: 'left', sortable: true },
{ title: '站位', key: 'extProcessPlan.positionNumber', align: 'left', sortable: true },
{ title: '工时定额', key: 'extProcessPlan.opHour', align: 'left', sortable: true, minWidth: 120 },
{ title: '工时', key: 'extProcessPlan.workHour', align: 'left', sortable: true },
{ title: '计划员', key: 'planner.name', align: 'left' },
{ title: '工艺员', key: 'extProcessPlan.noteName', align: 'left' },
{ title: '计划开始', key: 'scheduledStart', align: 'left',
formatter(row, column) {
return row.scheduledStart ? row.scheduledStart.substr(0, 10) : ''
}
}, minWidth: 140, sortable: true
},
{ title: '计划结束', key: 'scheduledEnd', align: 'left',
formatter(row, column) {
return row.scheduledEnd ? row.scheduledEnd.substr(0, 10) : ''
}
}, minWidth: 140, sortable: true
}
],
tableData: [],
......@@ -286,7 +288,11 @@ export default {
],
groupUserTotal: 0,
groupUserPage: 1,
isLoading: false
isLoading: false,
sortItem: [{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}]
}
},
computed: {
......@@ -549,12 +555,7 @@ export default {
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
'sortItem': this.sortItem
}
if (this.searchFormData.sortiesName) {
params.searchItems.children[0].items.push({
......@@ -652,6 +653,14 @@ export default {
this.groupUserPage++
this.getGroupUser()
}
},
handleSortChange({ column, prop, order }) {
if (prop && order) {
this.sortItem = [{ fieldName: prop, sortOrder: order.includes('asc') ? 'asc' : 'desc' }]
} else {
this.sortItem = [{ 'fieldName': 'modifyTime', 'sortOrder': 'desc' }]
}
this.getInstructionsDispatchList()
}
}
}
......
......@@ -74,6 +74,7 @@
@pagination-current-change="paginationCurrentChange"
@pagination-size-change="handleSizeChange"
@selection-change="selectionChange"
@sort-change="handleSortChange"
>
<dee-tools slot="header" :tools="tools" mode="normal" />
</dee-up-table>
......@@ -213,11 +214,12 @@ export default {
width: '70'
},
columns: [
{ title: '机上区域', key: 'extProcessPlan.area', align: 'left', minWidth: 120 },
{ title: '机上区域', key: 'extProcessPlan.area', align: 'left', minWidth: 120, sortable: true },
{
title: '指令号',
key: 'extProcessPlan.serialNumber',
align: 'left',
sortable: true,
minWidth: 330,
component: {
render: (h, params) => {
......@@ -249,31 +251,33 @@ export default {
}
}
},
{ title: '指令名称', key: 'extProcessPlan.name', align: 'left', minWidth: 280 },
{ title: '指令名称', key: 'extProcessPlan.name', align: 'left', minWidth: 280, sortable: true },
{ title: '是否协同',
key: 'extProcessPlan.name',
align: 'left',
minWidth: 120,
sortable: true,
formatter(row) {
return row.cooperatives ? '协同' : ''
}
},
{ title: '机型', key: 'extProcessPlan.planeType', align: 'left' },
{ title: '架次', key: 'extProcessPlan.sorties', align: 'left' },
{ title: '站位', key: 'extProcessPlan.positionNumber', align: 'left' },
{ title: '工作包名称', key: 'extProcessPlan.extWorkPackageLinks[0].source.name', align: 'left' },
{ title: '技能点', key: 'extProcessPlan.workCode', align: 'left' },
{ title: '工时定额', key: 'extProcessPlan.opHour', align: 'left' },
{ title: '工时', key: 'extProcessPlan.workHour', align: 'left' },
{ title: '机型', key: 'extProcessPlan.planeType', align: 'left', sortable: true },
{ title: '架次', key: 'extProcessPlan.sorties', align: 'left', sortable: true },
{ title: '站位', key: 'extProcessPlan.positionNumber', align: 'left', sortable: true },
{ title: '工作包名称', key: 'extProcessPlan.extWorkPackageLinks[0].source.name', align: 'left', sortable: true, minWidth: 140 },
{ title: '技能点', key: 'extProcessPlan.workCode', align: 'left', sortable: true, minWidth: 140 },
{ title: '工时定额', key: 'extProcessPlan.opHour', align: 'left', sortable: true, minWidth: 140 },
{ title: '工时', key: 'extProcessPlan.workHour', align: 'left', sortable: true },
{ title: '计划员', key: 'planner.name', align: 'left' },
{ title: '工艺员', key: 'extProcessPlan.noteName', align: 'left' },
{ title: '计划开始', key: 'scheduledStart', align: 'left',
{ title: '计划开始', key: 'scheduledStart', align: 'left', minWidth: 140,
formatter(row, column) {
return row.scheduledStart ? row.scheduledStart.substr(0, 10) : ''
} },
{ title: '计划结束', key: 'scheduledEnd', align: 'left',
}, sortable: true },
{ title: '计划结束', key: 'scheduledEnd', align: 'left', minWidth: 140,
formatter(row, column) {
return row.scheduledEnd ? row.scheduledEnd.substr(0, 10) : ''
}
}, sortable: true
}
],
tableData: [],
......@@ -366,7 +370,11 @@ export default {
groupUserPage: 1,
mainUserId: null,
postionList: [],
isLoading: false
isLoading: false,
sortItem: [{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}]
}
},
computed: {
......@@ -629,12 +637,7 @@ export default {
'name': 'cooperatives'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
'sortItem': this.sortItem
}
if (this.searchFormData.sorties) {
params.searchItems.children[0].items.push({
......@@ -738,6 +741,14 @@ export default {
this.groupUserPage++
this.getGroupUser()
}
},
handleSortChange({ column, prop, order }) {
if (prop && order) {
this.sortItem = [{ fieldName: prop, sortOrder: order.includes('asc') ? 'asc' : 'desc' }]
} else {
this.sortItem = [{ 'fieldName': 'modifyTime', 'sortOrder': 'desc' }]
}
this.getInstructionsDispatchList()
}
}
}
......
......@@ -768,6 +768,7 @@ export default {
}
}
.right-container {
background-color: #fff;
margin-left: 20px;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment