Commit 0553f64d by liujinbo

信息通报-依据详情

parent 4d20b1b1
...@@ -8,3 +8,12 @@ export const getFleetListApi = (data, config) => { ...@@ -8,3 +8,12 @@ export const getFleetListApi = (data, config) => {
config config
}) })
} }
export const getFleetDetailApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/getFleetDetail',
data,
config
})
}
...@@ -19,12 +19,12 @@ const useFleetStore = defineStore('fleet', { ...@@ -19,12 +19,12 @@ const useFleetStore = defineStore('fleet', {
isUpdateTime: 2, isUpdateTime: 2,
dateEnd dateEnd
}, },
details: undefined detailsId: undefined
} }
}, },
getters: {}, getters: {},
actions: { actions: {
resetForm() { resetForm () {
this.searchData = { this.searchData = {
aviation: '', aviation: '',
machineNumber: '', machineNumber: '',
...@@ -38,7 +38,7 @@ const useFleetStore = defineStore('fleet', { ...@@ -38,7 +38,7 @@ const useFleetStore = defineStore('fleet', {
dateEnd dateEnd
} }
}, },
setState(...args) { setState (...args) {
this.$patch({[args[0]]: args[1]}) this.$patch({[args[0]]: args[1]})
} }
}, },
......
...@@ -44,17 +44,6 @@ const useInforDisclosureStore = defineStore('inforDisclosure', { ...@@ -44,17 +44,6 @@ const useInforDisclosureStore = defineStore('inforDisclosure', {
} }
}, },
// 配置持久化 // 配置持久化
// persist: false persist: false
persist: {
// 调整为兼容多端的API
storage: {
setItem (key, value) {
uni.setStorageSync(key, value)
},
getItem (key) {
return uni.getStorageSync(key)
}
}
}
}) })
export default useInforDisclosureStore export default useInforDisclosureStore
...@@ -45,6 +45,10 @@ export const mocMapper = { ...@@ -45,6 +45,10 @@ export const mocMapper = {
'99': '其他' '99': '其他'
} }
export const fleetMapper = {
'1': '高高原', '2': '国际航班', '3': 'Etops', '4': '限飞外站', '5': '其他'
}
export const fightListTime = ['etdChn', 'atdChn', 'etaChn', 'ataChn'] export const fightListTime = ['etdChn', 'atdChn', 'etaChn', 'ataChn']
export const fightListPlanTime = ['staChn', 'schTime'] export const fightListPlanTime = ['staChn', 'schTime']
export const finishedStatus = ['ARR', 'NDR', 'ATA'] export const finishedStatus = ['ARR', 'NDR', 'ATA']
......
...@@ -26,6 +26,14 @@ ...@@ -26,6 +26,14 @@
<text>ATA章节:{{ details.ata }}</text> <text>ATA章节:{{ details.ata }}</text>
<view class="fleetDescribe">故障描述:</view> <view class="fleetDescribe">故障描述:</view>
<view class="describeCont">{{ details.faultDescribe || '无' }}</view> <view class="describeCont">{{ details.faultDescribe || '无' }}</view>
<view class="fleetDescribe">相关参考文档:</view>
<view class="describeCont">
<!--<global-upload
:fileList="details.releaseEnclosure"
typeField="type"
nameField="name"
:showUpload="false" />-->
</view>
</view> </view>
</view> </view>
<view class="details-footer"> <view class="details-footer">
...@@ -37,6 +45,18 @@ ...@@ -37,6 +45,18 @@
<view class="footerData occurrenceData"> <view class="footerData occurrenceData">
填报时间:{{ timeStampFormat(details.creationTime, {format: 'YYYY-MM-DD'}) }} 填报时间:{{ timeStampFormat(details.creationTime, {format: 'YYYY-MM-DD'}) }}
</view> </view>
<view class="fleetDescribe">备注:</view>
<view class="describeCont">{{ details.remarks }}</view>
<view class="fleetDescribe">空地支援:</view>
<view class="describeCont">{{ details.groundSupport }}</view>
<view class="fleetDescribe">运行限制:</view>
<view class="describeCont">{{ details.runLimitValue }}</view>
<view class="fleetDescribe">限制类型备注:</view>
<view class="describeCont">{{ details.limitRemarks }}</view>
</view> </view>
...@@ -46,13 +66,31 @@ ...@@ -46,13 +66,31 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'
import useFleetStore from 'mocp/store/fleet' import useFleetStore from 'mocp/store/fleet'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool' import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict' import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { getFleetDetailApi } from 'mocp/api/fleet'
import { onLoad } from '@dcloudio/uni-app'
import { fleetMapper } from 'mocp/utils/getFlightList'
const fleetStore = useFleetStore() const fleetStore = useFleetStore()
const {details} = storeToRefs(fleetStore) const {detailsId} = storeToRefs(fleetStore)
const details = ref({})
onLoad(() => {
getFleetDetailList()
})
const getFleetDetailList = async () => {
let res = await getFleetDetailApi({id: detailsId.value})
if (res.code == '200') {
details.value = res?.data
if (details.value.runLimit != '') details.value.runLimitValue = fleetMapper[details.value.runLimit]
}
console.log('details.value', details.value)
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../work-assignment/constants/details.scss'; @import '../work-assignment/constants/details.scss';
......
...@@ -43,10 +43,10 @@ import { getFleetListApi } from 'mocp/api/fleet' ...@@ -43,10 +43,10 @@ import { getFleetListApi } from 'mocp/api/fleet'
//跳转 //跳转
const fleetStore = useFleetStore() const fleetStore = useFleetStore()
const { searchData } = storeToRefs(fleetStore) const {searchData} = storeToRefs(fleetStore)
const goDetails = (data) => { const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/fleet/details', { id: data.id }).then(() => { uni.$mocpJump.navigateTo('/panel/fleet/details', {id: data.id}).then(() => {
fleetStore.setState('details', data) fleetStore.setState('detailsId', data.id)
}) })
} }
//筛选 //筛选
......
...@@ -70,23 +70,12 @@ ...@@ -70,23 +70,12 @@
</up-form-item> </up-form-item>
<up-form-item <up-form-item
label="发生日期(开始)" label="发生日期"
prop="startTime"
:borderBottom="true"> :borderBottom="true">
<global-date <global-calendar
v-model="formData.startTime"
pickAlign="right"
clearable
/>
</up-form-item>
<up-form-item
label="发生日期(结束)"
prop="stopTime"
:borderBottom="true">
<global-date
v-model="formData.stopTime"
pickAlign="right" pickAlign="right"
v-model:startTime="formData.startTime"
v-model:endTime="formData.stopTime"
clearable clearable
/> />
</up-form-item> </up-form-item>
......
...@@ -61,8 +61,6 @@ ...@@ -61,8 +61,6 @@
<text>状态 ({{ details.status.toUpperCase() }}</text> <text>状态 ({{ details.status.toUpperCase() }}</text>
<up-icon name="arrow-up" size="16" :color="$mocp-primary-7" /> <up-icon name="arrow-up" size="16" :color="$mocp-primary-7" />
</view> </view>
</global-button> </global-button>
</up-col> </up-col>
<up-col span="6"> <up-col span="6">
......
...@@ -68,9 +68,6 @@ const transformData = (data) => { ...@@ -68,9 +68,6 @@ const transformData = (data) => {
return { return {
...item, ...item,
time: item.creationTime.replace(/-/g, '/').replace(/:\d+?$/, ''), time: item.creationTime.replace(/-/g, '/').replace(/:\d+?$/, ''),
/*status: item.failureState.toString() === '0' ?
'open' : item.failureState.toString() === '1' ?
'close' : '作废',*/
status: EventStatusList.find(statusItem => statusItem.value == item.eventStatus)?.label, status: EventStatusList.find(statusItem => statusItem.value == item.eventStatus)?.label,
tags: [ tags: [
{ {
......
...@@ -54,26 +54,15 @@ ...@@ -54,26 +54,15 @@
</up-form-item> </up-form-item>
<up-form-item <up-form-item
label="填报日期(开始)" label="填报日期"
prop="startTime"
:borderBottom="true"> :borderBottom="true">
<global-date <global-calendar
v-model="formData.startTime"
pickAlign="right" pickAlign="right"
v-model:startTime="formData.startTime"
v-model:endTime="formData.stopTime"
clearable clearable
/> />
</up-form-item> </up-form-item>
<up-form-item
label="填报日期(结束)"
prop="stopTime"
:borderBottom="true">
<global-date
v-model="formData.stopTime"
pickAlign="right"
clearable
:timestamp="false"
/>
</up-form-item>
<up-form-item label="保障阶段" prop="guarantee" :borderBottom="true"> <up-form-item label="保障阶段" prop="guarantee" :borderBottom="true">
<global-picker <global-picker
......
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