Commit c21f7a41 by pangchong

feat: 技术分析收尾

parent 9619bcfa
......@@ -8,3 +8,11 @@ export const getTaDataList2Api = (data, config) => {
config
})
}
export const getTaData2Api = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/getTaData2',
data,
config
})
}
......@@ -28,6 +28,10 @@
<script setup>
const ps = defineProps({
width: {
type: Number,
default: null
},
columns: {
type: Array,
default: () => []
......@@ -44,7 +48,8 @@ const ps = defineProps({
const getCellStyle = (column) => {
return {
width: column?.width ? `${column.width}rpx` : `${750 / ps.columns.length}rpx`,
textAlign: column?.align || ''
textAlign: column?.align || '',
minWidth: column?.minWidth ? `${column.minWidth}rpx` : `${ps.width}rpx`
}
}
</script>
......
......@@ -12,3 +12,4 @@ export * from './abnormalEventManage'
export * from './mechanicalAbnormalEvents'
export * from './operationalSurvey'
export * from './qualityAnalysis'
export * from './technicalAnalysis'
......@@ -4,3 +4,11 @@ export const ta_isOpen = [
{ label: 'CLOSE', value: 0 },
{ label: '跟踪', value: 2 }
]
export const ta_teamTop = [
{ label: '是', value: 1 },
{ label: '否', value: 0 }
]
export const ta_localMaterials = [
{label: '有',value: 1},
{label: '无',value: 0}
]
......@@ -10,6 +10,7 @@ import {
getRcOptionsApi,
getRepairUnitApi
} from 'mocp/api/base'
import { getSysSeatListApi } from 'mocp/api/system'
import { uniqueArray } from 'mocp/utils/tool'
import { defineStore } from 'pinia'
......@@ -37,7 +38,8 @@ const useBaseStore = defineStore('base', {
typeList: [], //机型下拉数据
ATAList: [], //章节下拉数据
engineList: [], //发动机型号列表
repairUnitList: [] //责任单位列表
repairUnitList: [], //责任单位列表
allSeatSelect: [] //席位
},
allBasicParams: {} //系统基础参数
}
......@@ -92,11 +94,18 @@ const useBaseStore = defineStore('base', {
},
getATAChecked: (state) => {
return (model) => {
const selectATAList = state.selectList.ATAList.filter((item) => item.zstortGc == model)
return selectATAList.map((q) => ({
label: q.label,
value: q.label
}))
let selectATAList = []
if (model) {
selectATAList = state.selectList.ATAList.filter((item) => item.zstortGc == model)
} else {
selectATAList = state.selectList.ATAList
}
return uniqueArray(
selectATAList.map((q) => ({
label: q.label,
value: q.label
}))
)
}
},
//格式化发动机型号数据
......@@ -107,6 +116,20 @@ const useBaseStore = defineStore('base', {
value: v.zMETYPE
}
})
},
//获取席位
getSeat(state) {
return (seat) => {
return (
seat
?.split(',')
.map((item) => {
const seat = state.selectList.allSeatSelect.find((option) => item == option.id)
return seat?.seatName || ''
})
.join(',') || '-'
)
}
}
},
actions: {
......@@ -126,6 +149,7 @@ const useBaseStore = defineStore('base', {
this.getATA(),
this.getEngineList(),
this.getRepairUnit(),
this.getSysSeatList(),
this.getRcOptions()
])
} finally {
......@@ -202,6 +226,12 @@ const useBaseStore = defineStore('base', {
this.selectList.repairUnitList = res.data
}
},
async getSysSeatList() {
const res = await getSysSeatListApi({ pid: 0, pageSize: 9999 })
if (res.code == 200) {
this.selectList.allSeatSelect = res.data.list || []
}
},
async getRcOptions() {
const res = await getRcOptionsApi({})
if (res.code == 200) {
......
......@@ -6,5 +6,4 @@ const pinia = createPinia()
// 使用持久化存储插件
pinia.use(persist)
// 默认导出,给 main.ts 使用
export default pinia
\ No newline at end of file
export default pinia
import { getRsData2Api } from 'mocp/api/operationalSurvey'
import { getSysSeatListApi } from 'mocp/api/system'
import { defineStore } from 'pinia'
const useOperationalSurveyStore = defineStore('operationalSurvey', {
......@@ -24,14 +23,6 @@ const useOperationalSurveyStore = defineStore('operationalSurvey', {
},
getters: {},
actions: {
async getSysSeatList() {
const res = await getSysSeatListApi({ pid: 0, pageSize: 9999 })
if (res.code == 200) {
this.selectList.allSeatSelect = res.data.list || []
} else {
uni.$mocpMessage.error(res.message)
}
},
async getRsData2() {
const res = await getRsData2Api({ workbenchId: this.workbenchId }, { loading: true })
if (res.code == 200) {
......
import { getEnetOrgTreeApi } from 'mocp/api/assign-work'
import { getQaData2Api, getQaDimensionTree2Api } from 'mocp/api/qualityAnalysis'
import { getSysSeatListApi } from 'mocp/api/system'
import { defineStore } from 'pinia'
function findRelatedLabelOfEnetOrg(items, id) {
......@@ -30,7 +29,7 @@ const useQualityAnalysisStore = defineStore('qualityAnalysis', {
EnetOrgRepeatTreeZh: []
},
searchData: {
isOpen: 0,
isOpen: 1,
acTerminal: '',
acOwn: '',
acType: '',
......@@ -54,14 +53,6 @@ const useQualityAnalysisStore = defineStore('qualityAnalysis', {
}
},
actions: {
async getSysSeatList() {
const res = await getSysSeatListApi({ pid: 0, pageSize: 9999 })
if (res.code == 200) {
this.selectList.allSeatSelect = res.data.list || []
} else {
uni.$mocpMessage.error(res.message)
}
},
async getQaDimensionTree2() {
const res = await getQaDimensionTree2Api({})
if (res.code == 200) {
......@@ -163,7 +154,7 @@ const useQualityAnalysisStore = defineStore('qualityAnalysis', {
},
resetForm() {
this.searchData = {
isOpen: 0,
isOpen: 1,
acTerminal: '',
acOwn: '',
acType: '',
......@@ -178,6 +169,6 @@ const useQualityAnalysisStore = defineStore('qualityAnalysis', {
}
},
// 配置持久化
persist: true
persist: false
})
export default useQualityAnalysisStore
import { getRsData2Api } from 'mocp/api/operationalSurvey'
import { getSysSeatListApi } from 'mocp/api/system'
import { getTaData2Api } from 'mocp/api/technicalAnalysis'
import { defineStore } from 'pinia'
const useTechnicalAnalysisStore = defineStore('technicalAnalysis', {
state: () => {
return {
selectList: {
allSeatSelect: []
},
searchData: {
isOpen: 1,
acTerminal: '',
acOwn: '',
acType: '',
ac: '',
startTime: null,
stopTime: null,
seat: ''
majorClass: null,
ataChapter: ''
},
workbenchId: '',
details: undefined
......@@ -24,16 +19,8 @@ const useTechnicalAnalysisStore = defineStore('technicalAnalysis', {
},
getters: {},
actions: {
async getSysSeatList() {
const res = await getSysSeatListApi({ pid: 0, pageSize: 9999 })
if (res.code == 200) {
this.selectList.allSeatSelect = res.data.list || []
} else {
uni.$mocpMessage.error(res.message)
}
},
async getRsData2() {
const res = await getRsData2Api({ workbenchId: this.workbenchId }, { loading: true })
async getTaData2() {
const res = await getTaData2Api({ workbenchId: this.workbenchId }, { loading: true })
if (res.code == 200) {
this.details = res.data
} else {
......@@ -47,9 +34,8 @@ const useTechnicalAnalysisStore = defineStore('technicalAnalysis', {
acOwn: '',
acType: '',
ac: '',
startTime: null,
stopTime: null,
seat: ''
majorClass: null,
ataChapter: ''
}
},
setState(...args) {
......
......@@ -668,6 +668,18 @@
"style": {
"navigationBarTitleText": "故障历史详情"
}
},
{
"path": "pages/modules/mocp/panel/technicalAnalysis/partList",
"style": {
"navigationBarTitleText": "部件信息详情"
}
},
{
"path": "pages/modules/mocp/panel/technicalAnalysis/similarEvents",
"style": {
"navigationBarTitleText": "同类事件详情"
}
}
],
"globalStyle": {
......
<template>
<global-page title="事件分析详情">
<global-table :columns="columns" :data="details?.analysisList">
<template #index="{ index }">
{{ index + 1 }}
</template>
</global-table>
<global-table :columns="columns" :data="details?.analysisList"></global-table>
</global-page>
</template>
......@@ -16,7 +12,7 @@ import useOperationalSurveyStore from 'mocp/store/operationalSurvey'
const operationalSurveyStore = useOperationalSurveyStore()
const { details } = storeToRefs(operationalSurveyStore)
const columns = ref([
{ title: '序号', dataIndex: 'index', width: 60 },
{ title: '序号', dataIndex: 'ord' },
{ title: '分析一级维度', dataIndex: 'dimension1' },
{ title: '分析二级维度', dataIndex: 'dimension2' },
{ title: '分析三级维度', dataIndex: 'dimension3' },
......
......@@ -9,7 +9,7 @@
<up-cell title="航司" :value="details.acOwn || '-'" />
<up-cell title="航站" :value="baseStore.getTerminalObject[details.acTerminal] || '-'" />
<up-cell title="提出人" :value="details.proposer || '-'" />
<up-cell title="发起席位" :value="getSeat" />
<up-cell title="发起席位" :value="baseStore.getSeat(details.seat)" />
<up-cell title="调查等级" :value="useGetDictByValue('os_surveyLevel', details.surveyLevel) || '-'" />
<up-cell title="标题" :label="details.title || '无'" />
</up-cell-group>
......@@ -218,18 +218,6 @@ onLoad(() => {
operationalSurveyStore.getRsData2()
})
const { details } = storeToRefs(operationalSurveyStore)
// 获取发起席位
const getSeat = computed(() => {
return (
details.value?.seat
.split(',')
.map((item) => {
const seat = operationalSurveyStore.selectList.allSeatSelect.find((option) => item == option.id)
return seat?.seatName || ''
})
.join(',') || '-'
)
})
//获取事件分类
const getEventclass = computed(() => {
return (
......
......@@ -50,7 +50,7 @@
<script setup>
import { storeToRefs } from 'pinia'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { onLoad, onUnload } from '@dcloudio/uni-app'
import { onUnload } from '@dcloudio/uni-app'
import { ref } from 'vue'
import useOperationalSurveyStore from 'mocp/store/operationalSurvey'
import { getRsDataList2Api } from 'mocp/api/operationalSurvey'
......@@ -65,9 +65,6 @@ const goDetails = (data) => {
//加载下拉框数据
const operationalSurveyStore = useOperationalSurveyStore()
const { searchData } = storeToRefs(operationalSurveyStore)
onLoad(() => {
operationalSurveyStore.getSysSeatList()
})
//筛选
const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/operationalSurvey/search')
......
<template>
<global-page :padding="24" title="运行调查详情">
<global-page :padding="24" title="品质分析详情">
<template v-if="details">
<view class="mocp-cell">
<up-cell-group>
......@@ -9,7 +9,7 @@
<up-cell title="航司" :value="details.acOwn || '-'" />
<up-cell title="航站" :value="baseStore.getTerminalObject[details.acTerminal] || '-'" />
<up-cell title="提出人" :value="details.proposer || '-'" />
<up-cell title="发起席位" :value="getSeat" />
<up-cell title="发起席位" :value="baseStore.getSeat(details.seat)" />
<up-cell title="调查等级" :value="useGetDictByValue('qa_surveyLevel', details.surveyLevel) || '-'" />
<up-cell title="标题" :label="details.title || '无'" />
</up-cell-group>
......@@ -157,18 +157,6 @@ onLoad(async () => {
uni.hideLoading()
})
const { details } = storeToRefs(qualityAnalysisStore)
// 获取发起席位
const getSeat = computed(() => {
return (
details.value?.seat
.split(',')
.map((item) => {
const seat = qualityAnalysisStore.selectList.allSeatSelect.find((option) => item == option.id)
return seat?.seatName || ''
})
.join(',') || '-'
)
})
//获取事件分类
const getEventclass = computed(() => {
return (
......
......@@ -64,7 +64,6 @@ const qualityAnalysisStore = useQualityAnalysisStore()
const { searchData } = storeToRefs(qualityAnalysisStore)
onLoad(() => {
qualityAnalysisStore.getQaDimensionTree2()
qualityAnalysisStore.getSysSeatList()
})
//筛选
const handleRightClick = () => {
......
......@@ -11,11 +11,11 @@
<script setup>
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import useOperationalSurveyStore from 'mocp/store/operationalSurvey'
import { timeStampFormat } from 'mocp/utils/tool'
import useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'
const operationalSurveyStore = useOperationalSurveyStore()
const { details } = storeToRefs(operationalSurveyStore)
const technicalAnalysisStore = useTechnicalAnalysisStore()
const { details } = storeToRefs(technicalAnalysisStore)
const columns = ref([
{ title: '机号', dataIndex: 'machineNumber' },
{ title: '故障描述', dataIndex: 'faultDescribe' },
......
<template>
<global-page
ref="paging"
:api="getRsDataList2Api"
:api="getTaDataList2Api"
:padding="24"
:params="searchData"
auto
......@@ -30,18 +30,6 @@
<view class="item-content u-line-3">
{{ item.eventMsg || '无' }}
</view>
<view class="item-footer">
<view class="label">
<global-icon icon="calendar"></global-icon>
<text class="txt">
{{ timeStampFormat(item.proposedTime) }}
</text>
</view>
<view class="label u-line-1">
<global-icon icon="idcard"></global-icon>
<text class="txt">提出人:{{ item.proposer || '-' }}</text>
</view>
</view>
</view>
</template>
</global-page>
......@@ -50,34 +38,30 @@
<script setup>
import { storeToRefs } from 'pinia'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { onLoad, onUnload } from '@dcloudio/uni-app'
import { onUnload } from '@dcloudio/uni-app'
import { ref } from 'vue'
import useOperationalSurveyStore from 'mocp/store/operationalSurvey'
import { getRsDataList2Api } from 'mocp/api/operationalSurvey'
import { timeStampFormat } from 'mocp/utils/tool'
import { getTaDataList2Api } from 'mocp/api/technicalAnalysis'
import useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'
//跳转
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/operationalSurvey/details', {
uni.$mocpJump.navigateTo('/panel/technicalAnalysis/details', {
workbenchId: data.workbenchId
})
}
//加载下拉框数据
const operationalSurveyStore = useOperationalSurveyStore()
const { searchData } = storeToRefs(operationalSurveyStore)
onLoad(() => {
operationalSurveyStore.getSysSeatList()
})
const technicalAnalysisStore = useTechnicalAnalysisStore()
const { searchData } = storeToRefs(technicalAnalysisStore)
//筛选
const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/operationalSurvey/search')
uni.$mocpJump.navigateTo('/panel/technicalAnalysis/search')
}
const paging = ref()
uni.$on('operationalSurveyReload', () => {
uni.$on('technicalAnalysisReload', () => {
paging.value?.reload()
})
onUnload(() => {
uni.$off('operationalSurveyReload')
uni.$off('technicalAnalysisReload')
})
</script>
<style lang="scss" scoped>
......
<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 useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
const technicalAnalysisStore = useTechnicalAnalysisStore()
const { details } = storeToRefs(technicalAnalysisStore)
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>
......@@ -3,7 +3,16 @@
<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="mae_isOpen"></global-picker>
<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
......@@ -14,34 +23,17 @@
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="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="ac" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.ac" :options="deviceNumList" clearable filter></global-picker>
</up-form-item>
<up-form-item label="发起日期" :borderBottom="true">
<global-calendar
pickAlign="right"
v-model:startTime="formData.startTime"
v-model:endTime="formData.stopTime"
clearable
></global-calendar>
</up-form-item>
<up-form-item label="发起席位" prop="seat" :borderBottom="true">
<up-form-item label="专业类别" prop="majorClass" :borderBottom="true">
<global-picker
v-model="formData.majorClass"
pickAlign="right"
v-model="formData.seat"
:options="operationalSurveyStore.selectList.allSeatSelect"
label-field="seatName"
value-field="id"
:options="getParamsByType('MajorCategory')"
clearable
filter
></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>
......@@ -62,26 +54,27 @@ import useBaseStore from 'mocp/store/base'
import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import { ref } from 'vue'
import useOperationalSurveyStore from 'mocp/store/operationalSurvey'
import useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'
import { getParamsByType } from 'mocp/hooks/use-params/useParams'
//获取下拉框选项
const baseStore = useBaseStore()
const {
selectList: { deviceNumList }
} = useBaseStore()
const operationalSurveyStore = useOperationalSurveyStore()
const technicalAnalysisStore = useTechnicalAnalysisStore()
//获取查询表单数据
const { searchData } = storeToRefs(operationalSurveyStore)
const { searchData } = storeToRefs(technicalAnalysisStore)
const formData = ref(cloneDeep(searchData.value))
const handleReset = () => {
operationalSurveyStore.resetForm()
technicalAnalysisStore.resetForm()
uni.$mocpJump.navigateBack()
uni.$emit('operationalSurveyReload')
uni.$emit('technicalAnalysisReload')
}
const handleConfirm = () => {
operationalSurveyStore.setState('searchData', formData.value)
technicalAnalysisStore.setState('searchData', formData.value)
uni.$mocpJump.navigateBack()
uni.$emit('operationalSurveyReload')
uni.$emit('technicalAnalysisReload')
}
</script>
<style lang="scss" scoped>
......
<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 useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'
const technicalAnalysisStore = useTechnicalAnalysisStore()
const { details } = storeToRefs(technicalAnalysisStore)
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>
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