Commit 9343c6da by pangchong

feat: 工程分析收尾

parent c21f7a41
import { http } from 'mocp/utils/http'
export const getPaDataList2Api = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/getPaDataList2',
data,
config
})
}
export const getPaData2Api = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/getPaData2',
data,
config
})
}
// 建议以文件名首字母作为前缀ee_
export const ee_isOpen = [
{ label: 'OPEN', value: 1 },
{ label: 'CLOSE', value: 0 },
{ label: '跟踪', value: 2 }
]
export const ee_teamTop = [
{ label: '是', value: 1 },
{ label: '否', value: 0 }
]
export const ee_isTrace = [
{ label: '是', value: 1 },
{ label: '否', value: 0 }
]
export const ee_completeStatus = [
{ label: '未完成', value: 0 },
{ label: '完成', value: 1 }
]
......@@ -13,3 +13,4 @@ export * from './mechanicalAbnormalEvents'
export * from './operationalSurvey'
export * from './qualityAnalysis'
export * from './technicalAnalysis'
export * from './engineeringEvaluation'
import { getPaData2Api } from 'mocp/api/engineeringEvaluation'
import { defineStore } from 'pinia'
const useEngineeringEvaluationStore = defineStore('engineeringEvaluation', {
state: () => {
return {
searchData: {
isOpen: 1,
acTerminal: '',
acOwn: '',
acType: '',
ac: '',
majorClass: null,
ataChapter: ''
},
workbenchId: '',
details: undefined
}
},
getters: {},
actions: {
async getPaData2() {
const res = await getPaData2Api({ workbenchId: this.workbenchId }, { loading: true })
if (res.code == 200) {
this.details = res.data
} else {
uni.$mocpMessage.error(res.message)
}
},
resetForm() {
this.searchData = {
isOpen: 1,
acTerminal: '',
acOwn: '',
acType: '',
ac: '',
majorClass: null,
ataChapter: ''
}
},
setState(...args) {
this.$patch({ [args[0]]: args[1] })
}
},
// 配置持久化
persist: false
})
export default useEngineeringEvaluationStore
......@@ -27,7 +27,7 @@ const menuList = ref([
// 运行品质
{ id: 'pzfx', name: '品质分析', icon: 'pzfx', group: '运行品质', default: false, count: 0, url: '/panel/qualityAnalysis/list' },
{ id: 'khjl', name: '考核记录', icon: 'khjl', group: '运行品质', default: false, count: 0, url: '/panel/appraisal-record/list' },
{ id: 'gcfx', name: '工程分析', icon: 'gcfx', group: '运行品质', default: false, count: 0 },
{ id: 'gcfx', name: '工程分析', icon: 'gcfx', group: '运行品质', default: false, count: 0, url: '/panel/engineeringEvaluation/list' },
// 航站管理
{ id: 'hzgl', name: '航站管理', icon: 'hzgl', group: '航站管理', default: false, count: 0 },
{ id: 'xydw', name: '协议单位', icon: 'xydw', group: '航站管理', default: false, count: 0, url: '/panel/workSupervision/list' }
......
......@@ -680,6 +680,42 @@
"style": {
"navigationBarTitleText": "同类事件详情"
}
},
{
"path": "pages/modules/mocp/panel/engineeringEvaluation/list",
"style": {
"navigationBarTitleText": "工程分析"
}
},
{
"path": "pages/modules/mocp/panel/engineeringEvaluation/search",
"style": {
"navigationBarTitleText": "筛选"
}
},
{
"path": "pages/modules/mocp/panel/engineeringEvaluation/details",
"style": {
"navigationBarTitleText": "工程分析详情"
}
},
{
"path": "pages/modules/mocp/panel/engineeringEvaluation/historicalFault",
"style": {
"navigationBarTitleText": "故障历史详情"
}
},
{
"path": "pages/modules/mocp/panel/engineeringEvaluation/partList",
"style": {
"navigationBarTitleText": "部件信息详情"
}
},
{
"path": "pages/modules/mocp/panel/engineeringEvaluation/similarEvents",
"style": {
"navigationBarTitleText": "同类事件详情"
}
}
],
"globalStyle": {
......
<template>
<global-page title="故障历史详情">
<global-table :columns="columns" :data="details?.historicalFault">
<template #sendingTime="{ row }">
{{ timeStampFormat(row.sendingTime) }}
</template>
</global-table>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool'
import useEngineeringEvaluationStore from 'mocp/store/engineeringEvaluation'
const engineeringEvaluationStore = useEngineeringEvaluationStore()
const { details } = storeToRefs(engineeringEvaluationStore)
const columns = ref([
{ title: '机号', dataIndex: 'machineNumber' },
{ title: '故障描述', dataIndex: 'faultDescribe' },
{ title: '处理措施', dataIndex: 'handle' },
{ title: 'ATA章节', dataIndex: 'ata' },
{ title: '发生时间', dataIndex: 'sendingTime' }
])
</script>
<style lang="scss" scoped></style>
<template>
<global-page
ref="paging"
:api="getPaDataList2Api"
:padding="24"
:params="searchData"
auto
isDataList
loadingMoreEnabled
navRightIcon="saixuan-01"
navRightType="icon"
refresherEnabled
showNavRight
title="工程分析"
@handleRightClick="handleRightClick"
>
<template #default="{ item }">
<view class="item" @tap="goDetails(item)">
<view class="item-title">
<view class="left">
<custom-state :value="useGetDictByValue('ee_isOpen', item.isOpen)"></custom-state>
</view>
<view class="right">
<text class="txt u-line-1" v-if="item.ac">{{ item.ac }}</text>
<text class="txt u-line-1" v-if="item.acType">{{ item.acType }}</text>
<text class="txt u-line-1" v-if="item.acOwn">{{ item.acOwn }}</text>
<text class="txt u-line-1" v-if="item.acTerminal">{{ item.acTerminal }}</text>
</view>
</view>
<view class="item-content u-line-3">
{{ item.eventMsg || '无' }}
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import { storeToRefs } from 'pinia'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { onUnload } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { getPaDataList2Api } from 'mocp/api/engineeringEvaluation'
import useEngineeringEvaluationStore from 'mocp/store/engineeringEvaluation'
//跳转
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/engineeringEvaluation/details', {
workbenchId: data.workbenchId
})
}
//加载下拉框数据
const engineeringEvaluationStore = useEngineeringEvaluationStore()
const { searchData } = storeToRefs(engineeringEvaluationStore)
//筛选
const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/engineeringEvaluation/search')
}
const paging = ref()
uni.$on('engineeringEvaluationReload', () => {
paging.value?.reload()
})
onUnload(() => {
uni.$off('engineeringEvaluationReload')
})
</script>
<style lang="scss" scoped>
@import 'mocpStatic/css/list.scss';
</style>
<template>
<global-page title="部件信息详情">
<global-table :columns="columns" :data="details?.partList" :width="120">
<template #installTime="{ row }">
{{ timeStampFormat(row.installTime, { format: 'YYYY/MM/DD' }) }}
</template>
<template #localMaterials="{ row }">
{{ useGetDictByValue('ta_localMaterials', row.localMaterials) }}
</template>
</global-table>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import useEngineeringEvaluationStore from 'mocp/store/engineeringEvaluation'
const engineeringEvaluationStore = useEngineeringEvaluationStore()
const { details } = storeToRefs(engineeringEvaluationStore)
const columns = ref([
{ title: '件号', dataIndex: 'partNo', minWidth: 100 },
{ title: '序号', dataIndex: 'serialNo' },
{ title: '部件名称', dataIndex: 'partName' },
{ title: '部件性质', dataIndex: 'partNature' },
{ title: '部件情况', dataIndex: 'partSituation' },
{ title: '装机时间', dataIndex: 'installTime' },
{ title: 'CSN', dataIndex: 'csn' },
{ title: 'TSN', dataIndex: 'tsn' },
{ title: 'CSR', dataIndex: 'csr' },
{ title: 'TSR', dataIndex: 'tsr' },
{ title: '当地航材', dataIndex: 'localMaterials' },
{ title: '当地配置标准', dataIndex: 'localConf' },
{ title: '软时限', dataIndex: 'companyReliability' },
{ title: '航空集团平均使用时间', dataIndex: 'useAverageTime' },
{ title: '世界机队平均使用时间', dataIndex: 'worldFleet' }
])
</script>
<style lang="scss" scoped></style>
<template>
<global-page title="筛选">
<view class="search-form">
<up-form labelPosition="left" labelWidth="auto">
<up-form-item label="状态" prop="isOpen" :borderBottom="true">
<global-picker v-model="formData.isOpen" pickAlign="right" clearable dictkey="ta_isOpen"></global-picker>
</up-form-item>
<up-form-item label="机号" prop="ac" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.ac" :options="deviceNumList" clearable filter></global-picker>
</up-form-item>
<up-form-item label="机型" prop="acType" :borderBottom="true">
<global-picker v-model="formData.acType" pickAlign="right" :options="baseStore.getTypeSelect" clearable filter></global-picker>
</up-form-item>
<up-form-item label="航司" prop="acOwn" :borderBottom="true">
<global-picker v-model="formData.acOwn" pickAlign="right" :options="baseStore.getAirlineSelect" clearable filter></global-picker>
</up-form-item>
<up-form-item label="航站" prop="acTerminal" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.acTerminal"
clearable
:options="baseStore.getTerminalSelect"
filter
></global-picker>
</up-form-item>
<up-form-item label="专业类别" prop="majorClass" :borderBottom="true">
<global-picker
v-model="formData.majorClass"
pickAlign="right"
:options="getParamsByType('MajorCategory')"
clearable
></global-picker>
</up-form-item>
<up-form-item label="ATA章节" prop="ataChapter" :borderBottom="true">
<global-picker v-model="formData.ataChapter" pickAlign="right" :options="baseStore.getATAChecked()" clearable filter />
</up-form-item>
</up-form>
</view>
<template #bottom>
<view class="footer-btn">
<up-row gutter="10">
<up-col span="6">
<global-button type="primary" plain size="large" :radius="5" @tap="handleReset">重置</global-button>
</up-col>
<up-col span="6"><global-button type="primary" size="large" :radius="5" @tap="handleConfirm">确定</global-button></up-col>
</up-row>
</view>
</template>
</global-page>
</template>
<script setup>
import useBaseStore from 'mocp/store/base'
import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import { ref } from 'vue'
import { getParamsByType } from 'mocp/hooks/use-params/useParams'
import useEngineeringEvaluationStore from 'mocp/store/engineeringEvaluation'
//获取下拉框选项
const baseStore = useBaseStore()
const {
selectList: { deviceNumList }
} = useBaseStore()
const engineeringEvaluationStore = useEngineeringEvaluationStore()
//获取查询表单数据
const { searchData } = storeToRefs(engineeringEvaluationStore)
const formData = ref(cloneDeep(searchData.value))
const handleReset = () => {
engineeringEvaluationStore.resetForm()
uni.$mocpJump.navigateBack()
uni.$emit('engineeringEvaluationReload')
}
const handleConfirm = () => {
engineeringEvaluationStore.setState('searchData', formData.value)
uni.$mocpJump.navigateBack()
uni.$emit('engineeringEvaluationReload')
}
</script>
<style lang="scss" scoped>
.search-form {
padding: 24rpx 24rpx 0 24rpx;
background: #fff;
}
.footer-btn {
padding: 24rpx 32rpx;
background-color: #fff;
}
</style>
<template>
<global-page title="同类事件详情">
<global-table :columns="columns" :data="details?.similarEvents">
<template #sendingTime="{ row }">
{{ timeStampFormat(row.sendingTime) }}
</template>
</global-table>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool'
import useEngineeringEvaluationStore from 'mocp/store/engineeringEvaluation'
const engineeringEvaluationStore = useEngineeringEvaluationStore()
const { details } = storeToRefs(engineeringEvaluationStore)
const columns = ref([
{ title: '机号', dataIndex: 'machineNumber' },
{ title: '故障描述', dataIndex: 'faultDescribe' },
{ title: '处理措施', dataIndex: 'handle' },
{ title: 'ATA章节', dataIndex: 'ata' },
{ title: '发生时间', dataIndex: 'sendingTime' }
])
</script>
<style lang="scss" scoped></style>
......@@ -10,7 +10,7 @@
<up-cell title="航司" :value="details.acOwn || '-'" />
<up-cell title="航站" :value="baseStore.getTerminalObject[details.acTerminal] || '-'" />
<up-cell title="专业" :value="getParamNameByValue('MajorCategory', details.majorClass)" />
<up-cell title="TA章节" :value="details.ataChapter || '-'" />
<up-cell title="ATA章节" :value="details.ataChapter || '-'" />
<up-cell title="故障标签" :value="details.faultTag || '-'" />
<up-cell title="故障代码" :value="details.faultCode || '-'" />
<up-cell title="是否机队TOP故障" :value="useGetDictByValue('ta_teamTop', details.teamTop) || '-'" />
......@@ -162,7 +162,6 @@ import useBaseStore from 'mocp/store/base'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { onLoad } from '@dcloudio/uni-app'
import { computed } from 'vue'
import { getParamNameByValue } from 'mocp/hooks/use-params/useParams'
import { navigateTo } from 'mocp/utils/jump'
import useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'
......
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