Commit 0f17c728 by liujinbo

Merge branch 'refs/heads/master' into master_ljb

# Conflicts:
#	src/pages.json
parents 861bb62a 4a054119
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
// Generated by unplugin-vue-components // Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
export {} export {}
import '@dcloudio/types'
import '@uni-helper/uni-app-types'
import '@uni-helper/uni-ui-types'
import 'uview-plus/types'
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
// 全局组件 // 全局组件
......
import { http } from 'mocp/utils/http'
export const getDecisionApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/getDecision',
data,
config
})
}
export const updateDecisionApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/updateDecision',
data,
config
})
}
export const updateMcoDirectorInfoApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/updateMcoDirectorInfo',
data,
config
})
}
export const updateApproverInfoApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/updateApproverInfo',
data,
config
})
}
...@@ -4,7 +4,7 @@ const menuList = ref([ ...@@ -4,7 +4,7 @@ const menuList = ref([
{ id: 1, name: '信息通报', icon: 'xxtb', group: '技术支援', count: 12, url: '/panel/information-disclosure/list' }, { id: 1, name: '信息通报', icon: 'xxtb', group: '技术支援', count: 12, url: '/panel/information-disclosure/list' },
{ id: 2, name: '机队状态', icon: 'jdzt', group: '技术支援', count: 0 }, { id: 2, name: '机队状态', icon: 'jdzt', group: '技术支援', count: 0 },
{ id: 3, name: '支援申请', icon: 'zysq', group: '技术支援', count: 0 }, { id: 3, name: '支援申请', icon: 'zysq', group: '技术支援', count: 0 },
{ id: 4, name: '工作指令', icon: 'gzzl', group: '技术支援', count: 0 }, { id: 4, name: '工作指令', icon: 'gzzl', group: '技术支援', count: 0, url: '/panel/work-assignment/search' },
{ id: 5, name: '技术评估', icon: 'jspg', group: '技术支援', count: 0, url: '/panel/technology-evaluation/list' }, { id: 5, name: '技术评估', icon: 'jspg', group: '技术支援', count: 0, url: '/panel/technology-evaluation/list' },
{ id: 6, name: '运行调查', icon: 'yxdc', group: '维修控制', count: 0 }, { id: 6, name: '运行调查', icon: 'yxdc', group: '维修控制', count: 0 },
{ id: 7, name: '运行决策', icon: 'yxjc', group: '维修控制', count: 0, url: '/panel/move-decision/list' }, { id: 7, name: '运行决策', icon: 'yxjc', group: '维修控制', count: 0, url: '/panel/move-decision/list' },
......
import { defineStore } from 'pinia'
const useWorkAssignmentStore = defineStore('workAssignment', {
state: () => {
return {
searchData: {
state: 1,
presenter: '',
seat: '',
workType: null,
startDateTime: null,
endDateTime: null
},
details: undefined
}
},
getters: {},
actions: {
resetForm() {
this.searchData = {
state: 1,
presenter: '',
seat: '',
workType: null,
startDateTime: null,
endDateTime: null
}
},
setState(...args) {
this.$patch({ [args[0]]: args[1] })
}
},
// 配置持久化
persist: false
})
export default useWorkAssignmentStore
import { ref } from 'vue'
// 通用提示 // 通用提示
export const showToast = (msg, options) => { export const showToast = (msg, options) => {
uni.showToast({ uni.showToast({
...@@ -21,3 +19,7 @@ export const error = (message) => { ...@@ -21,3 +19,7 @@ export const error = (message) => {
export const success = (message) => { export const success = (message) => {
uni.$emit('useMessage', { type: 'success', message }) uni.$emit('useMessage', { type: 'success', message })
} }
// 警告消息
export const warning = (message) => {
uni.$emit('useMessage', { type: 'warning', message })
}
...@@ -206,7 +206,8 @@ ...@@ -206,7 +206,8 @@
"style": { "style": {
"navigationBarTitleText": "第二类超出持续适航文件的缺陷,需完成工程评估" "navigationBarTitleText": "第二类超出持续适航文件的缺陷,需完成工程评估"
} }
},{ },
{
"path": "pages/modules/mocp/panel/technology-evaluation/add-opinion", "path": "pages/modules/mocp/panel/technology-evaluation/add-opinion",
"style": { "style": {
"navigationBarTitleText": "经理或授权人意见" "navigationBarTitleText": "经理或授权人意见"
...@@ -229,6 +230,18 @@ ...@@ -229,6 +230,18 @@
"style": { "style": {
"navigationBarTitleText": "我的待办" "navigationBarTitleText": "我的待办"
} }
},
{
"path": "pages/modules/mocp/panel/work-assignment/search",
"style": {
"navigationBarTitleText": "筛选"
}
},
{
"path": "pages/modules/mocp/panel/work-assignment/list",
"style": {
"navigationBarTitleText": "工作任务指令"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -50,7 +50,7 @@ const goTo = (url) => { ...@@ -50,7 +50,7 @@ const goTo = (url) => {
if (url) { if (url) {
uni.$mocpJump.navigateTo(url) uni.$mocpJump.navigateTo(url)
} else { } else {
uni.$mocpMessage.error('暂未开放!') uni.$mocpMessage.warning('暂未开放!')
} }
} }
//跳转应用中心 //跳转应用中心
......
<template>
<global-page
title="工作任务指令"
isDataList
refresherEnabled
loadingMoreEnabled
auto
ref="paging"
:params="searchData"
showNavRight
navRightType="icon"
navRightIcon="saixuan-01"
@handleRightClick="handleRightClick"
:api="getDecisionApi"
:padding="24"
>
<template #="{ dataList }">
<view class="item" v-for="item in dataList" :key="item.id" @tap="goDetails(item)">
<view class="item-title">
<view class="left">
<custom-state :value="useGetDictByValue('md_state', item.state)"></custom-state>
</view>
<view class="right">
<text class="txt u-line-1" v-if="item.machineNumber">{{ item.machineNumber }}</text>
<text class="txt u-line-1" v-if="item.aviation">{{ item.aviation }}</text>
</view>
</view>
<view class="item-content u-line-3">
{{ item.faultDescription || '无' }}
</view>
<view class="item-footer">
<view class="label">
<global-icon icon="calendar"></global-icon>
<text class="txt">
{{ timeStampFormat(item.filledTime, { format: 'YYYY/MM/DD HH:mm' }) }}
</text>
</view>
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import { timeStampFormat } from 'mocp/utils/tool'
import { getDecisionApi } from 'mocp/api/move-decision'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import useMoveDecisionStore from 'mocp/store/move-decision'
import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app'
//跳转
const moveDecisionStore = useMoveDecisionStore()
const { searchData } = storeToRefs(moveDecisionStore)
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/work-assignment/details', { id: data.id }).then(() => {
moveDecisionStore.setState('details', data)
})
}
//筛选
const handleRightClick = () => {
uni.$mocpJump.redirectTo('/panel/work-assignment/search')
}
//刷新
const paging = ref()
uni.$on('workAssignmentReload', () => {
paging.value?.reload()
})
onUnload(() => {
uni.$off('workAssignmentReload')
})
</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="state" :borderBottom="true">
<global-picker v-model="formData.state" pickAlign="right" clearable dictkey="md_state"></global-picker>
</up-form-item>
<up-form-item label="航站" prop="terminal" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.terminal"
clearable
:options="baseStore.getTerminalSelect"
filter
></global-picker>
</up-form-item>
<up-form-item label="是否有效" prop="valid" :borderBottom="true">
<global-picker
v-model="formData.valid"
pickAlign="right"
:options="[
{ label: '有效', value: '1' },
{ label: '无效', value: '0' }
]"
clearable
></global-picker>
</up-form-item>
<up-form-item label="决策结果" prop="decisionState" :borderBottom="true">
<global-picker
v-model="formData.decisionState"
pickAlign="right"
:options="[
{ label: '同意', value: '1' },
{ label: '不同意', value: '0' }
]"
clearable
></global-picker>
</up-form-item>
<up-form-item label="航司" prop="aviation" :borderBottom="true">
<global-picker
v-model="formData.aviation"
pickAlign="right"
:options="baseStore.getAirlineSelect"
clearable
filter
></global-picker>
</up-form-item>
<up-form-item label="机号" prop="machineNumber" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.machineNumber" :options="deviceNumList" clearable filter></global-picker>
</up-form-item>
<up-form-item label="日期" :borderBottom="true">
<global-calendar
pickAlign="right"
v-model:startTime="formData.startDateTime"
v-model:endTime="formData.endDateTime"
clearable
></global-calendar>
</up-form-item>
</up-form>
</view>
<template #bottom>
<view class="footer-btn">
<up-row gutter="10">
<up-col span="6">
<global-button type="light" 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 useMoveDecisionStore from 'mocp/store/move-decision'
import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import { ref } from 'vue'
//获取下拉框选项
const baseStore = useBaseStore()
const {
selectList: { deviceNumList }
} = useBaseStore()
const moveDecisionStore = useMoveDecisionStore()
//获取查询表单数据
const { searchData } = storeToRefs(moveDecisionStore)
const formData = ref(cloneDeep(searchData.value))
const handleReset = () => {
moveDecisionStore.resetForm()
uni.$mocpJump.redirectTo('/panel/work-assignment/list')
uni.$emit('workAssignmentReload')
}
const handleConfirm = () => {
moveDecisionStore.setState('searchData', formData.value)
uni.$mocpJump.redirectTo('/panel/work-assignment/list')
uni.$emit('workAssignmentReload')
}
</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