Commit 02312615 authored by jingnan's avatar jingnan 👀

Merge branch 'online'

parents c08afedf 8c36983d
......@@ -222,7 +222,16 @@ export default {
Object.keys(this.$store.state.tagsView.visitedViews).forEach(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)
},
......
......@@ -1661,6 +1661,22 @@ export function addMinutes(date, minutes) {
const resDate= formatDate(dateFormat, 'YYYY-MM-DD HH:mm:ss')
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 {
findByNameVnode,
......@@ -1753,5 +1769,6 @@ export default {
subNum,
getTargetJobResponses,
export_excel,
addMinutes
addMinutes,
getTimeDifferenceInMinutes
}
......@@ -272,6 +272,9 @@ export default {
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
const typeName = this.basicData.useRequestType
if (typeName === 'UrgentUse') { // 紧急领用的出库架次均为NA
form.sorties = 'NA'
}
const param = {
...form,
typeName: typeName, // 领用类型
......
......@@ -179,11 +179,23 @@ export default {
if (this.hideMaterial) {
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('设备')) {
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)
}
})
} 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
},
......
......@@ -2941,7 +2941,7 @@ export default {
name: 'sqcdpMaintain',
query: {
name: name,
sorties: this.info.aircraftSorties.defCode,
// sorties: this.info.aircraftSorties.defCode,
// serialNumber: this.$route.query.serialNumber,
data: data
}
......
......@@ -4,7 +4,7 @@
:visible.sync="visible"
fullscreen
:modal="false"
title="sqcdp维护"
title="SQCDP维护"
:modal-append-to-body="false"
class="sqcdp-dialog"
:destroy-on-close="true"
......
......@@ -828,6 +828,7 @@ export default {
.then((res) => {
if (res.message.includes('成功')) {
this.getTableData(this.nodeData, this.level)
this.$utils.showMessageSuccess(res.message)
} else {
this.$message({
showClose: true,
......@@ -845,6 +846,7 @@ export default {
.then((res) => {
if (res.message.includes('成功')) {
this.getTableData(this.nodeData, this.level)
this.$utils.showMessageSuccess(res.message)
} else {
this.$message({
showClose: true,
......@@ -854,7 +856,9 @@ export default {
}
})
.catch((err) => console.error(err))
.finally(() => {})
.finally(() => {
this.aoLoading = false
})
},
/**
* 表一多选框
......
......@@ -135,18 +135,8 @@ export default {
methods: {
// 加载左侧申请表
init() {
// const searchData = obtainedParams.searchFormData ? obtainedParams.searchFormData.items : []
// const extraItems = obtainedParams.extraBaseParams || []
const items = []
if (this.form.scheduledStart) {
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 timeStr = this.form.scheduledStart && `&startTime=${this.form.scheduledStart[0] + ' 00:00:00'}&endTime=${this.form.scheduledStart[1] + ' 23:59:59'}` || ''
const params = {
'pageFrom': 1,
'pageSize': 9999,
......@@ -191,8 +181,7 @@ export default {
this.checkedAll = false
this.isIndeterminate = false
this.checkedLists = []
// return new Promise((resolve, reject) => {
post(`OutStorageRequest/search/matchStorageExpireToAo?taskDefinitionKey=${this.selectData.taskKey}`, params).then(res => {
post(`OutStorageRequest/search/matchStorageExpireToAo?taskDefinitionKey=${this.selectData.taskKey}${timeStr}`, params).then(res => {
const data = res.items.content.map(item => {
return {
...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