Commit ce2950a7 authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents fe4854c7 79b36c58
......@@ -19,6 +19,7 @@ import _get from 'lodash.get'
import _set from 'lodash.set'
import router from '../router'
import { downFileByFileId } from '../api/file'
import { export_json_to_excel } from '@/Excel/Export2Excel'
// 限制promise并发数量
export function promiseLimit(func, funcParams, limit = 5) {
let i = 0
......@@ -1593,6 +1594,21 @@ export function getTargetJobResponses(item, responseName) {
}
}
function formatJson(filterVal, jsonData) {
return jsonData.map(row => filterVal.map(j => _get(row, j)))
}
export function export_excel(columns, tableData, title) {
const tHeader = []
const filterVal = []
columns.forEach(col => {
tHeader.push(col.title)
filterVal.push(col.key)
})
// tHeader.push('id')
// filterVal.push('id')
const data = formatJson(filterVal, tableData)
export_json_to_excel(tHeader, data, title)
}
export default {
treeFindBackArray,
throttle,
......@@ -1678,5 +1694,6 @@ export default {
findForm,
sumArray,
subNum,
getTargetJobResponses
getTargetJobResponses,
export_excel
}
......@@ -61,11 +61,11 @@ export default {
mounted() {
this.initGantt()
this.getPlanStatus()
this.$bus.$on('getGantData', (data, planData) => {
this.$bus.$on('getGantData', (data, planData, selectData) => {
this.project = planData[0]
this.disabledGenerateUpdates = false
this.searchData = data
this.getAllData(data)
this.searchData = selectData
this.getAllData(selectData)
})
},
......@@ -382,10 +382,10 @@ export default {
},
// 获取甘特图数据
getAllData(val) {
const sortiesId = val.sorties
// const sortiesId = val.sorties
// const sortiesTypeId = val.sorties.split(':').slice(-1)[0]
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }] },
'searchItems': { 'items': [{ 'fieldName': 'extPositionPlans.oRProductionId', 'operator': 'EQ', 'value': val.id }] },
'openProps': [
{
'name': 'extProcessExecutorRoutes'
......@@ -423,6 +423,11 @@ export default {
},
refrehGantt(data) {
if (!data.length) {
this.gantt.clearAll()
this.gantt.parse({
links: [],
data: []
})
return
}
const params = {
......@@ -545,7 +550,7 @@ export default {
},
generateProject() {
const that = this
post(`/ExtPositionPlan/generateOrUpdate?id=${that.project.id}`, {},)
post(`/ExtPositionPlan/generateOrUpdate?id=${that.searchData.id}`, {},)
// post(`/ExtPositionPlan/generateOrUpdate?id=220731108341000`, {},)
.then((res) => {
if (res) {
......
......@@ -80,6 +80,13 @@
width="50"
align="center"
/>
<el-table-column
prop="soritesType"
label="类型"
min-width="70"
align="center"
:formatter="formatterSoritesType"
/>
<el-table-column
prop="assemblyEndTime"
label="交付时间"
......@@ -105,20 +112,20 @@
align="center"
>
<el-table-column
prop="serialNumber"
prop="extPosition.serialNumber"
label="站位"
width="60"
align="center"
/>
<el-table-column
prop="extPositionPlans[0].scheduledStart"
prop="scheduledStart"
label="计划开工"
min-width="50"
align="center"
:formatter="formatterDate"
/>
<el-table-column
prop="extPositionPlans[0].scheduledEnd"
prop="scheduledEnd"
label="计划完工"
min-width="50"
align="center"
......@@ -180,6 +187,14 @@ export default {
}
return ''
},
formatterSoritesType(row, column, cellValue, index) {
const status =
this.SoriteTypeOptions.filter((p) => p.value === cellValue)[0] || ''
if (status) {
return status.label
}
return ''
},
/**
* 获取新增机型
*/
......@@ -326,7 +341,7 @@ export default {
items: [],
operator: 'AND'
},
openProps: [{ name: 'aircraftSorties' }, { name: 'aircraftType' }, { name: 'extPositionPlans', openProps: [{ name: 'extPosition' }] }],
openProps: [{ name: 'soritesType' }, { name: 'aircraftSorties' }, { name: 'aircraftType' }, { name: 'extPositionPlans', openProps: [{ name: 'extPosition' }] }],
sortItem: [
{
fieldName: 'modifyTime',
......@@ -353,7 +368,9 @@ export default {
serialNo: p.aircraftSorties.defName,
assemblyEndTime: p.assemblyEndTime,
statusCode: p.state,
standData: p.extPositionPlans
standData: p.extPositionPlans,
soritesType: p.soritesType ? p.soritesType.type : ''
}
})
}
......@@ -362,7 +379,7 @@ export default {
// }
this.$refs.projectPlanTable.setCurrentRow(this.projectPlanData[0])
this.getStation()
this.getStation(this.projectPlanData[0])
} else {
this.$message({
showClose: true,
......@@ -377,23 +394,44 @@ export default {
/**
* 获取站位
*/
getStation() {
const sortiesId = this.form.sorties
// const sortiesTypeId = this.form.sorties.split(':').slice(-1)[0]
getStation(data) {
// const sortiesId = this.form.sorties
// const params = {
// 'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }] },
// 'openProps': [{ name: 'extPositionPlans' }],
// 'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
// }
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }] },
'openProps': [{ name: 'extPositionPlans' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
'searchItems': {
'items': [
{
'fieldName': 'oRProductionId',
'operator': 'EQ',
'value': data.id
}
]
},
'openProps': [
{
'name': 'extPosition'
}
],
'sortItem': [
{
'fieldName': 'extPosition.serialNumber',
'sortOrder': 'asc'
}
]
}
this.standLoading = true
this.$api.searchApi('ExtPosition', params).then(res => {
this.$api.searchApi('MilestonePlan', params).then(res => {
if (res.items) {
this.standData = res.items.content
} else {
this.standData = []
}
this.standLoading = false
this.$bus.$emit('getGantData', this.form, this.projectPlanData)
this.$bus.$emit('getGantData', this.form, this.projectPlanData, data)
}).catch(() => {
this.standData = []
this.standLoading = false
......
......@@ -32,12 +32,12 @@
:expand-on-click-node="false"
@node-click="handleNodeClick"
>
<span slot-scope="{ node, data }" class="custom-tree-node" :class="data.state">
<span slot-scope="{ node, data }" class="custom-tree-node">
<span class="tree-row">
<i :class="'tree' + node.level" />
<span v-if="node.level === 1" class="label" :title="data.serialNumber">{{ data.serialNumber }}</span>
<span v-if="node.level === 2">{{ data.serialNumber + ',' + data.name }}</span>
<span v-if="node.level === 3">{{ data.target.serialNumber + ',' + data.target.name }}</span>
<span v-if="node.level === 3" :class="[data.target.wrProduction?data.target.wrProduction[0].planState:'']">{{ data.target.serialNumber + ',' + data.target.name }}</span>
</span>
</span>
</el-tree>
......@@ -441,23 +441,23 @@ export default {
.label {
vertical-align: middle;
}
.Issued.custom-tree-node,
.Run.custom-tree-node,
.New.custom-tree-node,
.Yes.custom-tree-node,
.Delivery.custom-tree-node {
.Issued,
.Run,
.New,
.Yes,
.Delivery {
color: #0000ff;
}
.Finish.custom-tree-node {
.Finish {
color: #008000;
}
.Reserved.custom-tree-node {
.Reserved {
color: #ff0000;
}
.Not.custom-tree-node {
.Not {
color: #999999;
}
.Paused.custom-tree-node {
.Paused {
color: #ffff00;
}
}
......
......@@ -324,6 +324,8 @@ export default {
'operator': 'EQ',
'value': this.$route.query.title === '装配任务' ? 'FitOut' : 'CheckOut'
})
} else {
param.dmir = 'DMIR'
}
that.processLoading = true
post('/JoExecutePlan/getTaskAcceptance', param)
......
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