Commit a5382fbd by pangchong

feat: 运行调查收尾

parent 90593db1
......@@ -31,6 +31,7 @@ declare module 'vue' {
GlobalPopup: typeof import('./src/mocp/components/global-popup/global-popup.vue')['default']
GlobalRadio: typeof import('./src/mocp/components/global-radio/global-radio.vue')['default']
GlobalSwitch: typeof import('./src/mocp/components/global-switch/global-switch.vue')['default']
GlobalTable: typeof import('./src/mocp/components/global-table/global-table.vue')['default']
GlobalTabs: typeof import('./src/mocp/components/global-tabs/global-tabs.vue')['default']
GlobalTag: typeof import('./src/mocp/components/global-tag/global-tag.vue')['default']
GlobalTextStatus: typeof import('./src/mocp/components/global-text-status/global-text-status.vue')['default']
......
......@@ -81,3 +81,12 @@ export const getRepairUnitApi = (data, config) => {
config
})
}
//机械不正常事件相关列表
export const getRcOptionsApi = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/getRcOptions',
data,
config
})
}
......@@ -8,14 +8,6 @@ export const getMeDataListApi = (data, config) => {
config
})
}
export const getRcOptionsApi = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/getRcOptions',
data,
config
})
}
export const getMeDataApi = (data, config) => {
return http({
method: 'POST',
......
import { http } from 'mocp/utils/http'
export const getRsDataList2Api = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/getRsDataList2',
data,
config
})
}
export const getRsData2Api = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/getRsData2',
data,
config
})
}
export const saveAudit2Api = (data, config) => {
return http({
method: 'POST',
url: '/repaircontrol/saveAudit2',
data,
config
})
}
<template>
<view class="global-table">
<view class="table" :class="{ bordered }">
<view class="thead">
<view class="tr">
<text class="th" v-for="(column, index) in columns" :key="index" :style="getCellStyle(column)">
{{ column.title }}
</text>
</view>
</view>
<view class="tbody">
<view class="tr" v-for="(row, rowIndex) in data" :key="rowIndex">
<template v-for="(column, _index) in columns" :key="_index">
<text class="td" :style="getCellStyle(column)">
<slot :name="column.dataIndex" :row="row" :index="rowIndex">
{{ row[column.dataIndex] || '-' }}
</slot>
</text>
</template>
</view>
<view class="empty" v-if="data.length <= 0">
<global-empty></global-empty>
</view>
</view>
</view>
</view>
</template>
<script setup>
const ps = defineProps({
columns: {
type: Array,
default: () => []
},
data: {
type: Array,
default: () => []
},
bordered: {
type: Boolean,
default: false
}
})
const getCellStyle = (column) => {
return {
width: column?.width ? `${column.width}rpx` : `${750}rpx`,
textAlign: column?.align || ''
}
}
</script>
<style lang="scss" scoped>
.global-table {
background: #fff;
overflow: auto;
.tr {
display: flex;
}
.th,
.td {
padding: 8px;
text-align: left;
color: $mocp-text-3;
font-size: 24rpx;
word-break: break-all;
}
.table {
&.bordered {
border: 1px solid #f7f8fa;
.th,
.td {
border: 1px solid #f7f8fa;
}
}
}
.empty {
padding: 24rpx;
}
}
</style>
......@@ -49,6 +49,9 @@ const handleClickTabbar = (name) => {
if (name == 'chat') {
return uni.$mocpMessage.warning('暂未开放!')
}
if (name == 'home' && uni.getStorageSync('access_token')) {
return uni.$mocpMessage.warning('暂未开放!')
}
es('update:modelValue', name)
es('change', name)
}
......
......@@ -10,3 +10,4 @@ export * from './fleet'
export * from './electronicBill'
export * from './abnormalEventManage'
export * from './mechanicalAbnormalEvents'
export * from './operationalSurvey'
// 建议以文件名首字母作为前缀os_
export const os_isOpen = [
{ label: 'CLOSE', value: 0 },
{ label: 'OPEN', value: 1 },
{ label: '跟踪', value: 2 }
]
export const os_surveyLevel = [
{ label: 'A类调查', value: 'A类调查' },
{ label: 'B类调查', value: 'B类调查' },
{ label: '例行调查', value: '例行调查' }
]
export const os_disputeMsg = [
{ label: '是', value: 1 },
{ label: '否', value: 0 }
]
export const os_opinion = [
{ label: '同意', value: 1 },
{ label: '不同意', value: 0 }
]
......@@ -7,6 +7,7 @@ import {
getEngineListApi,
getFlightNumApi,
getPlaneModelsRepairApi,
getRcOptionsApi,
getRepairUnitApi
} from 'mocp/api/base'
import { uniqueArray } from 'mocp/utils/tool'
......@@ -15,6 +16,19 @@ import { defineStore } from 'pinia'
const useBaseStore = defineStore('base', {
state: () => {
return {
rcOptions: {
assurePhase: [],
commentConclusion: [],
delayNature: [],
delayProperty: [],
eventType: [],
flightImpact: [],
liabilityNature: [],
majorClass: [],
occurArea: [],
runPhase: [],
stopReason: []
},
selectList: {
deviceNumList: [], //机号
terminalList: [], //航站下拉数据
......@@ -111,7 +125,8 @@ const useBaseStore = defineStore('base', {
this.getPlaneModelsRepair(),
this.getATA(),
this.getEngineList(),
this.getRepairUnit()
this.getRepairUnit(),
this.getRcOptions()
])
} finally {
uni.hideLoading()
......@@ -186,6 +201,22 @@ const useBaseStore = defineStore('base', {
if (res.code == 200) {
this.selectList.repairUnitList = res.data
}
},
async getRcOptions() {
const res = await getRcOptionsApi({})
if (res.code == 200) {
this.rcOptions.assurePhase = res.data.assurePhase || []
this.rcOptions.commentConclusion = res.data.commentConclusion || []
this.rcOptions.delayNature = res.data.delayNature || []
this.rcOptions.delayProperty = res.data.delayProperty || []
this.rcOptions.eventType = res.data.eventType || []
this.rcOptions.flightImpact = res.data.flightImpact || []
this.rcOptions.liabilityNature = res.data.liabilityNature || []
this.rcOptions.majorClass = res.data.majorClass || []
this.rcOptions.occurArea = res.data.occurArea || []
this.rcOptions.runPhase = res.data.runPhase || []
this.rcOptions.stopReason = res.data.stopReason || []
}
}
},
// 配置持久化
......
import { getMeDataApi, getRcOptionsApi } from 'mocp/api/mechanicalAbnormalEvents'
import { getMeDataApi } from 'mocp/api/mechanicalAbnormalEvents'
import { defineStore } from 'pinia'
const useMechanicalAbnormalEventsStore = defineStore('mechanicalAbnormalEvents', {
......@@ -19,41 +19,12 @@ const useMechanicalAbnormalEventsStore = defineStore('mechanicalAbnormalEvents',
flightNo: '',
msg: ''
},
selectList: {
assurePhase: [],
commentConclusion: [],
delayNature: [],
delayProperty: [],
eventType: [],
flightImpact: [],
liabilityNature: [],
majorClass: [],
occurArea: [],
runPhase: [],
stopReason: []
},
workbenchId: '',
details: undefined
}
},
getters: {},
actions: {
async getRcOptions() {
const res = await getRcOptionsApi({})
if (res.code == 200) {
this.selectList.assurePhase = res.data.assurePhase || []
this.selectList.commentConclusion = res.data.commentConclusion || []
this.selectList.delayNature = res.data.delayNature || []
this.selectList.delayProperty = res.data.delayProperty || []
this.selectList.eventType = res.data.eventType || []
this.selectList.flightImpact = res.data.flightImpact || []
this.selectList.liabilityNature = res.data.liabilityNature || []
this.selectList.majorClass = res.data.majorClass || []
this.selectList.occurArea = res.data.occurArea || []
this.selectList.runPhase = res.data.runPhase || []
this.selectList.stopReason = res.data.stopReason || []
}
},
async getMeData() {
const res = await getMeDataApi({ workbenchId: this.workbenchId }, { loading: true })
if (res.code == 200) {
......
import { getRsData2Api } from 'mocp/api/operationalSurvey'
import { getSysSeatListApi } from 'mocp/api/system'
import { defineStore } from 'pinia'
const useOperationalSurveyStore = defineStore('operationalSurvey', {
state: () => {
return {
selectList: {
allSeatSelect: []
},
searchData: {
isOpen: 0,
acTerminal: '',
acOwn: '',
acType: '',
ac: '',
startTime: null,
stopTime: null,
seat: ''
},
workbenchId: '',
details: undefined
}
},
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 getRsData() {
const res = await getRsData2Api({ workbenchId: this.workbenchId }, { loading: true })
if (res.code == 200) {
this.details = res.data
} else {
uni.$mocpMessage.error(res.message)
}
},
resetForm() {
this.searchData = {
isOpen: 0,
acTerminal: '',
acOwn: '',
acType: '',
ac: '',
startTime: null,
stopTime: null,
seat: ''
}
},
setState(...args) {
this.$patch({ [args[0]]: args[1] })
}
},
// 配置持久化
persist: true
})
export default useOperationalSurveyStore
......@@ -11,7 +11,7 @@ const menuList = ref([
{ id: 'sfd', name: '收费单', icon: 'sfd', group: '生产保障', default: true, count: 0, url: '/panel/electronicBill/list' },
// 维修控制
{ id: 'bzcsj', name: '不正常事件', icon: 'bzcsj', group: '维修控制', default: false, count: 0, url: '/panel/abnormalEventManage/list' },
{ id: 'yxdc', name: '运行调查', icon: 'yxdc', group: '维修控制', default: false, count: 0 },
{ id: 'yxdc', name: '运行调查', icon: 'yxdc', group: '维修控制', default: false, count: 0, url: '/panel/operationalSurvey/list' },
{ id: 'yxjc', name: '运行决策', icon: 'yxjc', group: '维修控制', default: false, count: 0, url: '/panel/move-decision/list' },
{ id: 'bzgz', name: '布置工作', icon: 'bzgz', group: '维修控制', default: false, count: 0, url: '/panel/assign-work/search' },
{ id: 'jxyw', name: '机械延误', icon: 'jxyw', group: '维修控制', default: false, count: 0, url: '/panel/mechanicalAbnormalEvents/list' },
......@@ -28,7 +28,7 @@ const menuList = ref([
{ id: 'pzfx', name: '品质分析', icon: 'pzfx', group: '运行品质', default: false, count: 0 },
{ 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: 'hzgl', name: '航站管理', icon: 'hzgl', group: '航站管理', default: false, count: 0 },
{ id: 'xydw', name: '协议单位', icon: 'xydw', group: '航站管理', default: false, count: 0, url: '/panel/workSupervision/list' }
])
......
......@@ -572,6 +572,42 @@
"style": {
"navigationBarTitleText": "机械延误详情"
}
},
{
"path": "pages/modules/mocp/panel/operationalSurvey/list",
"style": {
"navigationBarTitleText": "运行调查"
}
},
{
"path": "pages/modules/mocp/panel/operationalSurvey/search",
"style": {
"navigationBarTitleText": "筛选"
}
},
{
"path": "pages/modules/mocp/panel/operationalSurvey/details",
"style": {
"navigationBarTitleText": "运行调查详情"
}
},
{
"path": "pages/modules/mocp/panel/operationalSurvey/historicalFault",
"style": {
"navigationBarTitleText": "故障历史详情"
}
},
{
"path": "pages/modules/mocp/panel/operationalSurvey/analysisList",
"style": {
"navigationBarTitleText": "事件分析详情"
}
},
{
"path": "pages/modules/mocp/panel/operationalSurvey/audit",
"style": {
"navigationBarTitleText": "批示"
}
}
],
"globalStyle": {
......
......@@ -529,9 +529,13 @@ watchEffect(() => {
})
watch([() => formData.deicingQuantityTotal, () => formData.weatherToday, () => formData.modelType], () => {
deicingFlag.value = false
formData.deicingRemark = ''
formData.deicingFile = ''
})
watch([() => formData.antiicingQuantityTotal, () => formData.weatherToday, () => formData.modelType], () => {
antiicingFlag.value = false
formData.antiicingRemark = ''
formData.antiicingFile = ''
})
// 海航集团内部的宽体机——A330-,787-,747-,777-,A350-,其余为窄体,集团外部机型-机型类别无对应数据需要手动选择
const prefixes = ['A330-', '787-', '747-', '777-', 'A350-']
......
......@@ -51,6 +51,7 @@ export const deicingValidate = () => {
if (!validateParameters(formData.deicingCartNo4, formData.deicingPersion4, formData.deicingQuantity4, formData.deicingUnit4)) {
return uni.$mocpMessage.warning('请完整填写第4条除冰记录')
}
return true
}
export const antiicingValidate = () => {
if (!formData.modelType) {
......@@ -76,11 +77,16 @@ export const antiicingValidate = () => {
if (!validateParameters(formData.antiicingCartNo4, formData.antiicingPersion4, formData.antiicingQuantity4, formData.antiicingUnit4)) {
return uni.$mocpMessage.warning('请完整填写第4条防冰记录')
}
return true
}
export const handleFooterClick = async () => {
await formRef.value?.validate()
deicingValidate()
antiicingValidate()
if (!deicingValidate()) {
return
}
if (!antiicingValidate()) {
return
}
//是否点击提交验证除冰/防冰用量
if (!deicingFlag.value && formData.deicingMix) {
return uni.$mocpMessage.warning('请提交除冰记录')
......@@ -135,14 +141,16 @@ export const getOneTotal = (a, b) => {
return (a || 0) * unit
}
export const submitDeicing = () => {
deicingValidate()
if (!deicingValidate()) {
return
}
const limit = getLimit()
if (formData.deicingQuantityTotal && formData.deicingQuantityTotal > 0) {
if (formData.deicingQuantityTotal > limit[1]) {
showDeicing.value = true
} else {
deicingFlag.value = true
showToast('提交成功')
showToast('提交成功1')
}
}
}
......@@ -158,7 +166,9 @@ export const confirmDeicing = () => {
showDeicing.value = false
}
export const submitAntiicing = () => {
antiicingValidate()
if (!antiicingValidate()) {
return
}
const limit = getLimit()
if (formData.antiicingQuantityTotal && formData.antiicingQuantityTotal > 0) {
if (formData.antiicingQuantityTotal > limit[1]) {
......
......@@ -7,26 +7,26 @@
<up-cell title="运行事件" :value="useGetDictByValue('mae_runEvent', details.runEvent) || '-'" />
<up-cell title="加入日报" :value="useGetDictByValue('mae_joinDaily', details.joinDaily)" />
<up-cell title="发生航站" :value="baseStore.getTerminalObject[details.happenStn] || '-'" />
<up-cell title="发生区域" :value="mechanicalAbnormalEventsStore.selectList.occurArea[details.occurArea] || '-'" />
<up-cell title="发生区域" :value="occurArea[details.occurArea] || '-'" />
<up-cell title="生成日报日期" :value="timeStampFormat(details.dailyOpenDate, { format: 'YYYY/MM/DD' }) || '-'" />
<up-cell title="关闭日报日期" :value="timeStampFormat(details.dailyCloseDate, { format: 'YYYY/MM/DD' }) || '-'" />
<up-cell title="始发航站" :value="baseStore.getTerminalObject[details.startStn] || '-'" />
<view class="mocp-title">进出港</view>
<view class="mocp-subTitle">进港</view>
<up-cell title="保障阶段" :value="mechanicalAbnormalEventsStore.selectList.assurePhase[details.assurePhaseIn] || '-'" />
<up-cell title="保障阶段" :value="assurePhase[details.assurePhaseIn] || '-'" />
<up-cell title="航班日期" :value="timeStampFormat(details.flightDateIn, { format: 'YYYY/MM/DD' }) || '-'" />
<up-cell title="进港航班号" :value="details.flightNoIn || '-'" />
<up-cell title="起飞航站" :value="baseStore.getTerminalObject[details.depStnIn] || '-'" />
<up-cell title="落地航站" :value="baseStore.getTerminalObject[details.arrStnIn] || '-'" />
<view class="mocp-subTitle">出港</view>
<up-cell title="保障阶段" :value="mechanicalAbnormalEventsStore.selectList.assurePhase[details.assurePhaseOut] || '-'" />
<up-cell title="保障阶段" :value="assurePhase[details.assurePhaseOut] || '-'" />
<up-cell title="航班日期" :value="timeStampFormat(details.flightDateOut, { format: 'YYYY/MM/DD' }) || '-'" />
<up-cell title="出港航班号" :value="details.flightNoOut || '-'" />
<up-cell title="起飞航站" :value="baseStore.getTerminalObject[details.depStnOut] || '-'" />
<up-cell title="落地航站" :value="baseStore.getTerminalObject[details.arrStnOut] || '-'" />
<up-cell title="延误定性" :value="mechanicalAbnormalEventsStore.selectList.delayNature[details.delayNature] || '-'" />
<up-cell title="延误定性" :value="delayNature[details.delayNature] || '-'" />
<up-cell title="起飞延误分钟" :value="details.dur1 || '-'" />
<up-cell title="延误属性" :value="mechanicalAbnormalEventsStore.selectList.delayProperty[details.delayProperty] || '-'" />
<up-cell title="延误属性" :value="delayProperty[details.delayProperty] || '-'" />
<up-cell title="顺延班次" :value="details.postponedShift > 0 ? details.postponedShift : '-'" />
<up-cell title="取消班次" :value="details.cancelNo > 0 ? details.cancelNo : '-'" />
</up-cell-group>
......@@ -35,11 +35,11 @@
<up-cell-group>
<template v-if="details.occur == 0">
<up-cell title="发生阶段" value="进港航班" />
<up-cell title="运行阶段" :value="mechanicalAbnormalEventsStore.selectList.runPhase[details.runPhaseIn]" />
<up-cell title="运行阶段" :value="runPhase[details.runPhaseIn]" />
</template>
<template v-else-if="details.occur == 1">
<up-cell title="发生阶段" value="出港航班" />
<up-cell title="运行阶段" :value="mechanicalAbnormalEventsStore.selectList.runPhase[details.runPhaseOut]" />
<up-cell title="运行阶段" :value="runPhase[details.runPhaseOut]" />
</template>
<template v-else>
<up-cell title="发生阶段" value="-" />
......@@ -61,11 +61,11 @@
<up-cell-group>
<template v-if="details.fly == 0">
<up-cell title="航班运行影响" value="进港航班" />
<up-cell title="航班影响" :value="mechanicalAbnormalEventsStore.selectList.flightImpact[details.flightImpactIn]" />
<up-cell title="航班影响" :value="flightImpact[details.flightImpactIn]" />
</template>
<template v-else-if="details.fly == 1">
<up-cell title="航班运行影响" value="出港航班" />
<up-cell title="航班影响" :value="mechanicalAbnormalEventsStore.selectList.flightImpact[details.flightImpactOut]" />
<up-cell title="航班影响" :value="flightImpact[details.flightImpactOut]" />
</template>
<template v-else>
<up-cell title="航班运行影响" value="-" />
......@@ -97,6 +97,9 @@ import { onLoad } from '@dcloudio/uni-app'
const query = defineProps(['id'])
const baseStore = useBaseStore()
const {
rcOptions: { occurArea, assurePhase, delayNature, delayProperty, runPhase, flightImpact }
} = useBaseStore()
const mechanicalAbnormalEventsStore = useMechanicalAbnormalEventsStore()
onLoad(() => {
mechanicalAbnormalEventsStore.setState('workbenchId', query.workbenchId)
......
......@@ -28,7 +28,7 @@
</view>
</view>
<view class="item-content">
<view style="margin-bottom: 20rpx">{{ item.eventId }}</view>
<view style="margin-bottom: 20rpx">事件编号 : {{ item.eventId }}</view>
<view class="u-line-3">发生阶段:{{ item.occurMsg || '无' }}</view>
<view class="u-line-3">故障描述:{{ item.faultMsg || '无' }}</view>
<view class="u-line-3">处理措施:{{ item.handleMsg || '无' }}</view>
......@@ -45,7 +45,7 @@ import { storeToRefs } from 'pinia'
import { getMeDataListApi } from 'mocp/api/mechanicalAbnormalEvents'
import useMechanicalAbnormalEventsStore from 'mocp/store/mechanicalAbnormalEvents'
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'
//跳转
......@@ -57,9 +57,6 @@ const goDetails = (data) => {
//加载下拉框数据
const mechanicalAbnormalEventsStore = useMechanicalAbnormalEventsStore()
const { searchData } = storeToRefs(mechanicalAbnormalEventsStore)
onLoad(() => {
mechanicalAbnormalEventsStore.getRcOptions()
})
//筛选
const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/mechanicalAbnormalEvents/search')
......
......@@ -30,20 +30,10 @@
></global-picker>
</up-form-item>
<up-form-item label="延误定性" prop="delayNature" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.delayNature"
clearable
:options="mechanicalAbnormalEventsStore.selectList.delayNature"
></global-picker>
<global-picker pickAlign="right" v-model="formData.delayNature" clearable :options="delayNature"></global-picker>
</up-form-item>
<up-form-item label="延误属性" prop="delayProperty" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.delayProperty"
clearable
:options="mechanicalAbnormalEventsStore.selectList.delayProperty"
></global-picker>
<global-picker pickAlign="right" v-model="formData.delayProperty" clearable :options="delayProperty"></global-picker>
</up-form-item>
<up-form-item label="日报生成日期" :borderBottom="true">
<global-calendar
......@@ -84,7 +74,8 @@ import useMechanicalAbnormalEventsStore from 'mocp/store/mechanicalAbnormalEvent
//获取下拉框选项
const baseStore = useBaseStore()
const {
selectList: { deviceNumList, flightNumList }
selectList: { deviceNumList, flightNumList },
rcOptions: { delayNature, delayProperty }
} = useBaseStore()
const mechanicalAbnormalEventsStore = useMechanicalAbnormalEventsStore()
//获取查询表单数据
......
<template>
<global-page title="事件分析详情">
<global-table :columns="columns" :data="details?.analysisList">
<template #ord="{ row }">
{{ row.ord + 1 }}
</template>
</global-table>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import useOperationalSurveyStore from 'mocp/store/operationalSurvey'
const operationalSurveyStore = useOperationalSurveyStore()
const { details } = storeToRefs(operationalSurveyStore)
const columns = ref([
{ title: '序号', dataIndex: 'ord', width: 300 },
{ title: '分析一级维度', dataIndex: 'dimension1' },
{ title: '分析二级维度', dataIndex: 'dimension2' },
{ title: '分析三级维度', dataIndex: 'dimension3' },
{ title: '分析结论', dataIndex: 'eventAnalysis' }
])
</script>
<style lang="scss" scoped></style>
<template>
<global-page title="批示">
<view class="mocp-form">
<up-form labelPosition="top" labelWidth="auto" :model="formData" ref="formRef">
<up-form-item label="批示意见" :borderBottom="true">
<up-textarea placeholder="请输入批示意见" :height="40" border="none" v-model="formData.content"></up-textarea>
</up-form-item>
</up-form>
</view>
<template #bottom>
<view class="footer-btn">
<up-row gutter="10">
<up-col span="6">
<global-button type="danger" plain size="large" :radius="5" @tap="handleSubmit(0)">不同意</global-button>
</up-col>
<up-col span="6"><global-button type="primary" size="large" :radius="5" @tap="handleSubmit(1)">同意</global-button></up-col>
</up-row>
</view>
</template>
</global-page>
</template>
<script setup>
import { onShow } from '@dcloudio/uni-app'
import { storeToRefs } from 'pinia'
import { reactive } from 'vue'
import useOperationalSurveyStore from 'mocp/store/operationalSurvey'
import { saveAudit2Api } from 'mocp/api/operationalSurvey'
const operationalSurveyStore = useOperationalSurveyStore()
const { details } = storeToRefs(operationalSurveyStore)
// 表单数据
const formData = reactive({
id: '',
workbenchId: '',
content: ''
})
// 页面初始化
onShow(() => {
if (details.value) {
formData.id = details.value.id
formData.workbenchId = details.value.workbenchId
formData.opinion = details.value.audit?.opinion
formData.content = details.value.audit?.content
}
})
//提交表单
const handleSubmit = async (opinion) => {
if (opinion == 0 && !formData.content) {
return uni.$mocpMessage.warning('请填写批示意见!')
}
const res = await saveAudit2Api({ ...formData, opinion }, { loading: true })
if (res.code == 200) {
uni.$mocpJump.navigateBack()
operationalSurveyStore.getRsData()
uni.$mocpMessage.success(res.message)
} else {
uni.$mocpMessage.error(res.message)
}
}
</script>
<style lang="scss" scoped>
.mocp-form {
background: #fff;
padding: 0 32rpx;
}
.footer-btn {
padding: 24rpx 32rpx;
background-color: #fff;
}
</style>
<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 useOperationalSurveyStore from 'mocp/store/operationalSurvey'
import { timeStampFormat } from 'mocp/utils/tool'
const operationalSurveyStore = useOperationalSurveyStore()
const { details } = storeToRefs(operationalSurveyStore)
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="getRsDataList2Api"
: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('os_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">
{{ 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>
</template>
<script setup>
import { storeToRefs } from 'pinia'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { onLoad, 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'
//跳转
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/operationalSurvey/details', {
workbenchId: data.workbenchId
})
}
//加载下拉框数据
const operationalSurveyStore = useOperationalSurveyStore()
const { searchData } = storeToRefs(operationalSurveyStore)
onLoad(() => {
operationalSurveyStore.getSysSeatList()
})
//筛选
const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/operationalSurvey/search')
}
const paging = ref()
uni.$on('operationalSurveyReload', () => {
paging.value?.reload()
})
onUnload(() => {
uni.$off('operationalSurveyReload')
})
</script>
<style lang="scss" scoped>
@import 'mocpStatic/css/list.scss';
</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="mae_isOpen"></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="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">
<global-picker
pickAlign="right"
v-model="formData.seat"
:options="operationalSurveyStore.selectList.allSeatSelect"
label-field="seatName"
value-field="id"
clearable
filter
></global-picker>
</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 useOperationalSurveyStore from 'mocp/store/operationalSurvey'
//获取下拉框选项
const baseStore = useBaseStore()
const {
selectList: { deviceNumList }
} = useBaseStore()
const operationalSurveyStore = useOperationalSurveyStore()
//获取查询表单数据
const { searchData } = storeToRefs(operationalSurveyStore)
const formData = ref(cloneDeep(searchData.value))
const handleReset = () => {
operationalSurveyStore.resetForm()
uni.$mocpJump.navigateBack()
uni.$emit('operationalSurveyReload')
}
const handleConfirm = () => {
operationalSurveyStore.setState('searchData', formData.value)
uni.$mocpJump.navigateBack()
uni.$emit('operationalSurveyReload')
}
</script>
<style lang="scss" scoped>
.search-form {
padding: 24rpx 24rpx 0 24rpx;
background: #fff;
}
.footer-btn {
padding: 24rpx 32rpx;
background-color: #fff;
}
</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