Commit 02312615 authored by jingnan's avatar jingnan 👀

Merge branch 'online'

parents c08afedf 8c36983d
...@@ -222,7 +222,16 @@ export default { ...@@ -222,7 +222,16 @@ export default {
Object.keys(this.$store.state.tagsView.visitedViews).forEach(key => { Object.keys(this.$store.state.tagsView.visitedViews).forEach(key => {
list = [...list, ...this.$store.state.tagsView.visitedViews[key]] list = [...list, ...this.$store.state.tagsView.visitedViews[key]]
}) })
this.$set(this, 'visitedViews', list.filter(x => (x.path !== '/home' && x.path !== '/businessHome' && x.path !== '/systemHome' && x.path !== '/DevopsHome' && x.path !== '/safeHome'))) const filterViews = list.filter(x => (x.path !== '/home' && x.path !== '/businessHome' && x.path !== '/systemHome' && x.path !== '/DevopsHome' && x.path !== '/safeHome'))
const tempViews = filterViews.reduce((acc, current) => {
const exists = acc.find(item => item.title === current.title)
if (!exists) {
acc.push(current)
}
return acc
}, [])
this.$set(this, 'visitedViews', tempViews)
// this.$set(this, 'visitedViews', list.filter(x => (x.path !== '/home' && x.path !== '/businessHome' && x.path !== '/systemHome' && x.path !== '/DevopsHome' && x.path !== '/safeHome')))
} }
}, 0) }, 0)
}, },
......
...@@ -1661,6 +1661,22 @@ export function addMinutes(date, minutes) { ...@@ -1661,6 +1661,22 @@ export function addMinutes(date, minutes) {
const resDate= formatDate(dateFormat, 'YYYY-MM-DD HH:mm:ss') const resDate= formatDate(dateFormat, 'YYYY-MM-DD HH:mm:ss')
return resDate return resDate
} }
/**
* 计算两个日期时间字符串的时间差(单位:分钟)
* @param {*} dateTimeStr1
* @param {*} dateTimeStr2
* @returns
*/
export function getTimeDifferenceInMinutes(dateTimeStr1, dateTimeStr2) {
const date1 = new Date(dateTimeStr1)
const date2 = new Date(dateTimeStr2)
if (isNaN(date1.getTime()) || isNaN(date2.getTime())) {
throw new Error('无效的日期时间字符串')
}
const differenceInMilliseconds = Math.abs(date2 - date1) // 使用Math.abs获取绝对值,确保总是正数
const differenceInSeconds = differenceInMilliseconds / (1000 * 60)
return differenceInSeconds
}
export default { export default {
findByNameVnode, findByNameVnode,
...@@ -1753,5 +1769,6 @@ export default { ...@@ -1753,5 +1769,6 @@ export default {
subNum, subNum,
getTargetJobResponses, getTargetJobResponses,
export_excel, export_excel,
addMinutes addMinutes,
getTimeDifferenceInMinutes
} }
...@@ -272,6 +272,9 @@ export default { ...@@ -272,6 +272,9 @@ export default {
form.aircraftType = form.aircraftType && form.aircraftType.includes('+') && form.aircraftType.split('+')[1] || form.aircraftType form.aircraftType = form.aircraftType && form.aircraftType.includes('+') && form.aircraftType.split('+')[1] || form.aircraftType
form.sorties = form.sorties && form.sorties.includes('+') && form.sorties.split('+')[1] || form.sorties form.sorties = form.sorties && form.sorties.includes('+') && form.sorties.split('+')[1] || form.sorties
const typeName = this.basicData.useRequestType const typeName = this.basicData.useRequestType
if (typeName === 'UrgentUse') { // 紧急领用的出库架次均为NA
form.sorties = 'NA'
}
const param = { const param = {
...form, ...form,
typeName: typeName, // 领用类型 typeName: typeName, // 领用类型
......
...@@ -179,11 +179,23 @@ export default { ...@@ -179,11 +179,23 @@ export default {
if (this.hideMaterial) { if (this.hideMaterial) {
this.tableData.forEach(row => { this.tableData.forEach(row => {
if (!row.extMaterial.resType2.typeCode.includes('金属材料') && !row.extMaterial.resType2.typeCode.includes('工装') && !row.extMaterial.resType2.typeCode.includes('工具') && !row.extMaterial.resType2.typeCode.includes('设备')) { if (!row.extMaterial.resType2.typeCode.includes('金属材料') && !row.extMaterial.resType2.typeCode.includes('工装') && !row.extMaterial.resType2.typeCode.includes('工具') && !row.extMaterial.resType2.typeCode.includes('设备')) {
row.parentAreaName = this.basicData.extProcessPlan &&
this.basicData.extProcessPlan.extSupportings &&
this.basicData.extProcessPlan.extSupportings[0] &&
this.basicData.extProcessPlan.extSupportings[0].extDxProductArea &&
this.basicData.extProcessPlan.extSupportings[0].extDxProductArea.extname || ''
resData.push(row) resData.push(row)
} }
}) })
} else { } else {
resData = this.tableData resData = this.tableData.map(item => {
item.parentAreaName = this.basicData.extProcessPlan &&
this.basicData.extProcessPlan.extSupportings &&
this.basicData.extProcessPlan.extSupportings[0] &&
this.basicData.extProcessPlan.extSupportings[0].extDxProductArea &&
this.basicData.extProcessPlan.extSupportings[0].extDxProductArea.extname || ''
return item
})
} }
return resData return resData
}, },
......
...@@ -2941,7 +2941,7 @@ export default { ...@@ -2941,7 +2941,7 @@ export default {
name: 'sqcdpMaintain', name: 'sqcdpMaintain',
query: { query: {
name: name, name: name,
sorties: this.info.aircraftSorties.defCode, // sorties: this.info.aircraftSorties.defCode,
// serialNumber: this.$route.query.serialNumber, // serialNumber: this.$route.query.serialNumber,
data: data data: data
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:visible.sync="visible" :visible.sync="visible"
fullscreen fullscreen
:modal="false" :modal="false"
title="sqcdp维护" title="SQCDP维护"
:modal-append-to-body="false" :modal-append-to-body="false"
class="sqcdp-dialog" class="sqcdp-dialog"
:destroy-on-close="true" :destroy-on-close="true"
......
...@@ -828,6 +828,7 @@ export default { ...@@ -828,6 +828,7 @@ export default {
.then((res) => { .then((res) => {
if (res.message.includes('成功')) { if (res.message.includes('成功')) {
this.getTableData(this.nodeData, this.level) this.getTableData(this.nodeData, this.level)
this.$utils.showMessageSuccess(res.message)
} else { } else {
this.$message({ this.$message({
showClose: true, showClose: true,
...@@ -845,6 +846,7 @@ export default { ...@@ -845,6 +846,7 @@ export default {
.then((res) => { .then((res) => {
if (res.message.includes('成功')) { if (res.message.includes('成功')) {
this.getTableData(this.nodeData, this.level) this.getTableData(this.nodeData, this.level)
this.$utils.showMessageSuccess(res.message)
} else { } else {
this.$message({ this.$message({
showClose: true, showClose: true,
...@@ -854,7 +856,9 @@ export default { ...@@ -854,7 +856,9 @@ export default {
} }
}) })
.catch((err) => console.error(err)) .catch((err) => console.error(err))
.finally(() => {}) .finally(() => {
this.aoLoading = false
})
}, },
/** /**
* 表一多选框 * 表一多选框
......
...@@ -135,18 +135,8 @@ export default { ...@@ -135,18 +135,8 @@ export default {
methods: { methods: {
// 加载左侧申请表 // 加载左侧申请表
init() { init() {
// const searchData = obtainedParams.searchFormData ? obtainedParams.searchFormData.items : []
// const extraItems = obtainedParams.extraBaseParams || []
const items = [] const items = []
if (this.form.scheduledStart) { const timeStr = this.form.scheduledStart && `&startTime=${this.form.scheduledStart[0] + ' 00:00:00'}&endTime=${this.form.scheduledStart[1] + ' 23:59:59'}` || ''
items.push({
fieldName: 'joExecutePlan.scheduledStart',
operator: 'BTWN',
searchItemType: 'Date',
value: this.form.scheduledStart[0] + ' 00:00:00',
value1: this.form.scheduledStart[1] + ' 23:59:59'
})
}
const params = { const params = {
'pageFrom': 1, 'pageFrom': 1,
'pageSize': 9999, 'pageSize': 9999,
...@@ -191,8 +181,7 @@ export default { ...@@ -191,8 +181,7 @@ export default {
this.checkedAll = false this.checkedAll = false
this.isIndeterminate = false this.isIndeterminate = false
this.checkedLists = [] this.checkedLists = []
// return new Promise((resolve, reject) => { post(`OutStorageRequest/search/matchStorageExpireToAo?taskDefinitionKey=${this.selectData.taskKey}${timeStr}`, params).then(res => {
post(`OutStorageRequest/search/matchStorageExpireToAo?taskDefinitionKey=${this.selectData.taskKey}`, params).then(res => {
const data = res.items.content.map(item => { const data = res.items.content.map(item => {
return { return {
...item, ...item,
......
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