Commit f1270ea4 by pangchong

feat: 技术评估开发

parent 6f0b28ff
...@@ -11258,9 +11258,9 @@ ...@@ -11258,9 +11258,9 @@
} }
}, },
"node_modules/uview-plus": { "node_modules/uview-plus": {
"version": "3.2.22", "version": "3.3.5",
"resolved": "https://registry.npmmirror.com/uview-plus/-/uview-plus-3.2.22.tgz", "resolved": "https://registry.npmmirror.com/uview-plus/-/uview-plus-3.3.5.tgz",
"integrity": "sha512-ouhq0CCGP/ElR7eCCu0rBFNPTGW/EctcrxKIerjj1DOkEIY9BwKBbdI0VTSSkMFnr6RFejSQLBw/aKkqd6Q+7g==", "integrity": "sha512-yyNBmUTNiIzslEb8/HQA3uAwhEyS/A6DrAm0ZZXDHT+jm2CKnkJyKHt7xh3WrhC/qimziuHZCTEOk4Oca27epQ==",
"dependencies": { "dependencies": {
"clipboard": "^2.0.11", "clipboard": "^2.0.11",
"dayjs": "^1.11.3" "dayjs": "^1.11.3"
......
import { createSSRApp } from 'vue' import { createSSRApp } from 'vue'
import App from './App.vue' import App from './App.vue'
import pinia from 'mocp/store' import pinia from 'mocp/store'
import uviewPlus from 'uview-plus' import uviewPlus, { setConfig } from 'uview-plus'
import * as message from 'mocp/utils/message' import * as message from 'mocp/utils/message'
import * as tool from 'mocp/utils/tool' import * as tool from 'mocp/utils/tool'
import * as jump from 'mocp/utils/jump' import * as jump from 'mocp/utils/jump'
//mocp消息提示 //mocp消息提示
uni.$mocpMessage = message uni.$mocpMessage = message
//mocp工具方法 //mocp工具方法
...@@ -15,6 +16,20 @@ export function createApp() { ...@@ -15,6 +16,20 @@ export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
app.use(pinia) app.use(pinia)
app.use(uviewPlus) app.use(uviewPlus)
setConfig({
props: {
checkbox: {
activeColor: '#165dff',
labelColor: '#1D2129',
labelSize: 16
},
checkboxGroup: {
activeColor: '#165dff',
labelColor: '#1D2129',
labelSize: 16
}
}
})
return { return {
app app
} }
......
import { http } from 'mocp/utils/http' import { http } from 'mocp/utils/http'
//获取机号列表
export const getAircraftNumbersApi = (data, config) => { export const getAircraftNumbersApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
...@@ -8,6 +9,7 @@ export const getAircraftNumbersApi = (data, config) => { ...@@ -8,6 +9,7 @@ export const getAircraftNumbersApi = (data, config) => {
config config
}) })
} }
//通过机号查询飞机相关数据
export const getAcReduceListApi = (data, config) => { export const getAcReduceListApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
...@@ -16,6 +18,7 @@ export const getAcReduceListApi = (data, config) => { ...@@ -16,6 +18,7 @@ export const getAcReduceListApi = (data, config) => {
config config
}) })
} }
//获取用户基本信息分页列表
export const getAdminListApi = (data, config) => { export const getAdminListApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
...@@ -24,6 +27,7 @@ export const getAdminListApi = (data, config) => { ...@@ -24,6 +27,7 @@ export const getAdminListApi = (data, config) => {
config config
}) })
} }
//获取所有敏感词
export const getBasicParamsListApi = (data, config) => { export const getBasicParamsListApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
...@@ -32,6 +36,7 @@ export const getBasicParamsListApi = (data, config) => { ...@@ -32,6 +36,7 @@ export const getBasicParamsListApi = (data, config) => {
config config
}) })
} }
//获取航站列表
export const getAircraftTerminalsApi = (data, config) => { export const getAircraftTerminalsApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
...@@ -48,6 +53,7 @@ export const getAirLinesListApi = (data, config) => { ...@@ -48,6 +53,7 @@ export const getAirLinesListApi = (data, config) => {
config config
}) })
} }
//获取航班号
export const getFlightNumApi = (data, config) => { export const getFlightNumApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
...@@ -56,3 +62,21 @@ export const getFlightNumApi = (data, config) => { ...@@ -56,3 +62,21 @@ export const getFlightNumApi = (data, config) => {
config config
}) })
} }
//获取mcc机型
export const getPlaneModelsRepairApi = (data, config) => {
return http({
method: 'POST',
url: '/resource/flight/getPlaneModelsRepair',
data,
config
})
}
//获取ATA章节
export const getATAApi = (data, config) => {
return http({
method: 'POST',
url: '/technical-support/getATA',
data,
config
})
}
import { http } from 'mocp/utils/http'
export const getTechnicalEvaluationApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/getTechnicalEvaluation',
data,
config
})
}
export const addEngineeringApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/addEngineering',
data,
config
})
}
export const addOpinionApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/addOpinion',
data,
config
})
}
export const addRatifyApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/addRatify',
data,
config
})
}
export const addSupportFileApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/addSupportFile',
data,
config
})
}
<template>
<up-action-sheet
:actions="actions"
:title="title"
:description="description"
:cancelText="cancelText"
:round="round"
:show="show"
:closeOnClickAction="true"
:closeOnClickOverlay="true"
@select="handleSelect"
@close="handleClose"
></up-action-sheet>
</template>
<script setup>
import { ref } from 'vue'
const show = ref(false)
const es = defineEmits(['select', 'close'])
const ps = defineProps({
actions: {
type: Array,
default: () => {
return []
}
},
title: {
type: String,
default: ''
},
description: {
type: String,
default: ''
},
cancelText: {
type: String,
default: '取消'
},
round: {
type: [String, Number],
default: 10
}
})
const open = () => {
show.value = true
}
const handleSelect = (data) => {
show.value = false
es('select', data)
}
const handleClose = () => {
show.value = false
es('close')
}
defineExpose({
open
})
</script>
<style lang="scss" scoped></style>
...@@ -52,6 +52,9 @@ ...@@ -52,6 +52,9 @@
&:active { &:active {
@include global-button-light-active; @include global-button-light-active;
} }
&::after {
border: none;
}
} }
&.primary { &.primary {
@include global-button-primary; @include global-button-primary;
......
...@@ -116,6 +116,9 @@ const getCustomStyle = computed(() => { ...@@ -116,6 +116,9 @@ const getCustomStyle = computed(() => {
if (ps.placement == 'row') { if (ps.placement == 'row') {
_style.marginLeft = '16rpx' _style.marginLeft = '16rpx'
} }
if (ps.placement == 'column') {
_style.marginBottom = '40rpx'
}
return _style return _style
}) })
//获取下拉框的内容Columns //获取下拉框的内容Columns
...@@ -157,4 +160,10 @@ const checkboxChange = (value) => { ...@@ -157,4 +160,10 @@ const checkboxChange = (value) => {
.checkbox { .checkbox {
display: flex; display: flex;
} }
:deep(.u-checkbox) {
&:last-child {
margin-bottom: 0 !important;
margin-left: 0 !important;
}
}
</style> </style>
...@@ -37,6 +37,11 @@ const ps = defineProps({ ...@@ -37,6 +37,11 @@ const ps = defineProps({
type: String, type: String,
default: 'date' default: 'date'
}, },
//是否时间戳
timestamp: {
type: Boolean,
default: true
},
//显示为空的value值 //显示为空的value值
emptyValue: { emptyValue: {
type: [String, Number], type: [String, Number],
...@@ -52,7 +57,7 @@ const ps = defineProps({ ...@@ -52,7 +57,7 @@ const ps = defineProps({
}, },
placeholder: { placeholder: {
type: String, type: String,
default: '请选择' default: '请选择日期'
}, },
disabled: { disabled: {
type: Boolean, type: Boolean,
...@@ -66,6 +71,10 @@ const ps = defineProps({ ...@@ -66,6 +71,10 @@ const ps = defineProps({
type: String, type: String,
default: 'YYYY/MM/DD' default: 'YYYY/MM/DD'
}, },
valueFormat: {
type: String,
default: 'YYYY/MM/DD HH:mm:ss'
},
cancelText: { cancelText: {
type: String, type: String,
default: '取消' default: '取消'
...@@ -121,10 +130,19 @@ watch( ...@@ -121,10 +130,19 @@ watch(
() => ps.modelValue, () => ps.modelValue,
() => { () => {
if (ps.modelValue != 0 && ps.modelValue != ps.emptyValue) { if (ps.modelValue != 0 && ps.modelValue != ps.emptyValue) {
labelValue.value = parseInt(ps.modelValue) if (ps.timestamp) {
defaultValue.value = parseInt(ps.modelValue) labelValue.value = parseInt(ps.modelValue)
defaultValue.value = parseInt(ps.modelValue)
} else {
labelValue.value = ps.modelValue
defaultValue.value = ps.modelValue
}
} else { } else {
defaultValue.value = Day().valueOf() if (ps.timestamp) {
defaultValue.value = Day().valueOf()
} else {
defaultValue.value = Day().format(ps.valueFormat)
}
} }
}, },
{ immediate: true } { immediate: true }
...@@ -134,8 +152,13 @@ const confirm = (e) => { ...@@ -134,8 +152,13 @@ const confirm = (e) => {
show.value = false show.value = false
labelValue.value = e.value labelValue.value = e.value
defaultValue.value = e.value defaultValue.value = e.value
es('update:modelValue', defaultValue.value) if (ps.timestamp) {
es('change', defaultValue.value) es('update:modelValue', defaultValue.value)
es('change', defaultValue.value)
} else {
es('update:modelValue', Day(defaultValue.value).format(ps.valueFormat))
es('change', Day(defaultValue.value).format(ps.valueFormat))
}
} }
//点击清空按钮 //点击清空按钮
const clear = () => { const clear = () => {
......
...@@ -51,11 +51,19 @@ ...@@ -51,11 +51,19 @@
</view> </view>
<slot name="bottom"></slot> <slot name="bottom"></slot>
</template> </template>
<up-toast ref="uToastRef" v-if="showToast"></up-toast>
<!-- <up-loading-page
:loading="false"
loadingText="正在加载中..."
bg-color="rgba(0, 0, 0, 0.3)"
loadingMode="spinner"
fontSize="15"
></up-loading-page> -->
</z-paging> </z-paging>
</template> </template>
<script setup> <script setup>
import { filterEmptyValues } from 'mocp/utils/tool' import { filterEmptyValues } from 'mocp/utils/tool'
import { computed, ref } from 'vue' import { computed, nextTick, ref } from 'vue'
const dataList = ref([]) const dataList = ref([])
const es = defineEmits(['query', 'handleLeftClick', 'handleRightClick', 'handleFooterClick']) const es = defineEmits(['query', 'handleLeftClick', 'handleRightClick', 'handleFooterClick'])
...@@ -258,6 +266,20 @@ const handleLeftClick = () => { ...@@ -258,6 +266,20 @@ const handleLeftClick = () => {
const handleRightClick = () => { const handleRightClick = () => {
es('handleRightClick') es('handleRightClick')
} }
//消息提示
const uToastRef = ref()
const showToast = ref(true)
uni.$on('useMessage', (params) => {
nextTick(() => {
uToastRef.value?.show(params)
})
})
uni.$on('closeMessage', () => {
showToast.value = false
nextTick(() => {
showToast.value = true
})
})
//点击底部按钮 //点击底部按钮
const handleFooterClick = () => { const handleFooterClick = () => {
es('handleFooterClick') es('handleFooterClick')
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</template> </template>
<script setup> <script setup>
import { computed, ref, watch } from 'vue' import { computed, nextTick, ref, watch } from 'vue'
import * as dictData from 'mocp/hooks/use-dict/dict-data' import * as dictData from 'mocp/hooks/use-dict/dict-data'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
...@@ -189,7 +189,9 @@ watch( ...@@ -189,7 +189,9 @@ watch(
const index = getColumns.value.findIndex((option) => String(option[ps.valueField]) === String(ps.modelValue)) const index = getColumns.value.findIndex((option) => String(option[ps.valueField]) === String(ps.modelValue))
if (option) { if (option) {
labelValue.value = option[ps.labelField] labelValue.value = option[ps.labelField]
defaultIndex.value = index nextTick(() => {
defaultIndex.value = index
})
} else { } else {
labelValue.value = ps.modelValue labelValue.value = ps.modelValue
defaultIndex.value = 0 defaultIndex.value = 0
......
export * from './appraisal-record' export * from './appraisal-record'
export * from './assign-work' export * from './assign-work'
export * from './move-decision' export * from './move-decision'
export * from './technology-evaluation'
// 建议以文件名首字母作为前缀te_
export const te_state = [
{ label: 'OPEN', value: '1' },
{ label: '跟踪', value: '2' },
{ label: 'CLOSE', value: '3' }
]
export const te_opinionType = [
{ label: '同意工程评估意见', value: '1' },
{ label: '建议结束技术评估', value: '2' }
]
export const te_customType = [
{ label: '同意评估意见,批准放行', value: '1' },
{ label: '同意厂家批复文件,批准放行', value: '2' },
{ label: '结束技术评估', value: '3' }
]
export const useMessage = () => {
return {
// 消息提示
toast(message) {
uni.$emit('useMessage', { type: 'default', message })
},
// 错误消息
error(message) {
uni.$emit('useMessage', { type: 'error', message })
},
// 成功消息
success(message) {
uni.$emit('useMessage', { type: 'success', message })
},
// 警告消息
loading(message) {
uni.$emit('useMessage', { type: 'loading', duration: 200000, message: message || '加载中...' })
},
close() {
uni.$emit('closeMessage')
}
}
}
import { getAirLinesListApi, getAircraftNumbersApi, getAircraftTerminalsApi, getBasicParamsListApi, getFlightNumApi } from 'mocp/api/base' import {
getATAApi,
getAdminListApi,
getAirLinesListApi,
getAircraftNumbersApi,
getAircraftTerminalsApi,
getBasicParamsListApi,
getFlightNumApi,
getPlaneModelsRepairApi
} from 'mocp/api/base'
import { uniqueArray } from 'mocp/utils/tool'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
const useBaseStore = defineStore('base', { const useBaseStore = defineStore('base', {
...@@ -8,7 +18,9 @@ const useBaseStore = defineStore('base', { ...@@ -8,7 +18,9 @@ const useBaseStore = defineStore('base', {
deviceNumList: [], //机号 deviceNumList: [], //机号
terminalList: [], //航站下拉数据 terminalList: [], //航站下拉数据
airlineCodeList: [], //航司下拉数据 airlineCodeList: [], //航司下拉数据
flightNumList: [] //航班号下拉数据 flightNumList: [], //航班号下拉数据
typeList: [], //机型下拉数据
ATAList: [] //章节下拉数据
}, },
allBasicParams: {} //系统基础参数 allBasicParams: {} //系统基础参数
} }
...@@ -37,6 +49,29 @@ const useBaseStore = defineStore('base', { ...@@ -37,6 +49,29 @@ const useBaseStore = defineStore('base', {
zOP2: z.value, zOP2: z.value,
label: z.zOP3 + z.shortName label: z.zOP3 + z.shortName
})) }))
},
//格式化机型数据
getTypeSelect(state) {
return state.selectList.typeList.map((a) => ({
label: a,
value: a
}))
},
//章节下拉数据
getAllATASelect(state) {
return state.selectList.ATAList.map((q) => ({
label: q.label + `(${q.zstortGc})`,
value: q.label,
id: q.id
}))
},
getATASelect(state) {
return uniqueArray(
state.selectList.ATAList.map((q) => ({
label: q.label,
value: q.label
}))
)
} }
}, },
actions: { actions: {
...@@ -46,22 +81,23 @@ const useBaseStore = defineStore('base', { ...@@ -46,22 +81,23 @@ const useBaseStore = defineStore('base', {
mask: true mask: true
}) })
try { try {
await Promise.all( await Promise.all([
this.getAircraftNumbers(), this.getAircraftNumbers(),
this.getBasicParamsList(), this.getBasicParamsList(),
this.getAircraftTerminals(), this.getAircraftTerminals(),
this.getAirLinesList(), this.getAirLinesList(),
this.getFlightNum() this.getFlightNum(),
) this.getPlaneModelsRepair(),
uni.hideLoading() this.getATA()
} catch (error) { ])
} finally {
uni.hideLoading() uni.hideLoading()
} }
}, },
async getAircraftNumbers() { async getAircraftNumbers() {
const res = await getAircraftNumbersApi({}) const res = await getAircraftNumbersApi({})
if (res.code == 200) { if (res.code == 200) {
this.selectList.deviceNumList = res.data this.selectList.deviceNumList = ['0000', ...res.data]
} }
}, },
async getAircraftTerminals() { async getAircraftTerminals() {
...@@ -104,6 +140,41 @@ const useBaseStore = defineStore('base', { ...@@ -104,6 +140,41 @@ const useBaseStore = defineStore('base', {
}, {}) }, {})
} }
}, },
async getPlaneModelsRepair() {
const res = await getPlaneModelsRepairApi({})
if (res.code == 200) {
this.selectList.typeList = res.data
}
},
async getATA() {
const res = await getATAApi({})
if (res.code == 200) {
this.selectList.ATAList = res.data.ataList
}
},
async getAdminList(realName = '') {
return new Promise((resolve, reject) => {
const params = {
pageIndex: 1,
pageSize: 100,
realName
}
getAdminListApi(params, { loading: true }).then((res) => {
if (res.code == 200) {
const selectList = res.data.list.map((item) => {
return {
label: `${item.nickname}(${(item.enetAccount || '无易网号') + '-' + (item.deptFullName || '无机构')})`,
value: item.id
}
})
resolve(selectList)
} else {
uni.$mocpMessage.showToast(res.message)
reject()
}
})
})
},
getParamsByType(paramType) { getParamsByType(paramType) {
return this.allBasicParams[paramType] return this.allBasicParams[paramType]
?.filter((item) => item.isDel == 0) ?.filter((item) => item.isDel == 0)
...@@ -111,7 +182,18 @@ const useBaseStore = defineStore('base', { ...@@ -111,7 +182,18 @@ const useBaseStore = defineStore('base', {
return { label: item.paramName, value: item.paramCode } return { label: item.paramName, value: item.paramCode }
}) })
}, },
getParamNameByValue(paramType, paramName) { getParamNameByValue(paramType, paramName, extend = {}) {
if (extend && extend.isArray) {
const paramNameArray = paramName.split(',')
return paramNameArray
.reduce((q, w) => {
if (this.getParamNameByValue(paramType, w)) {
q.push(this.getParamNameByValue(paramType, w))
}
return q
}, [])
.join(',')
}
return this.getParamsByType(paramType).find((item) => item.value == paramName)?.label || '' return this.getParamsByType(paramType).find((item) => item.value == paramName)?.label || ''
} }
}, },
......
import { defineStore } from 'pinia'
const useTechnologyEvaluationStore = defineStore('technologyEvaluation', {
state: () => {
return {
details: undefined
}
},
getters: {},
actions: {
setState(...args) {
this.$patch({ [args[0]]: args[1] })
}
},
// 配置持久化
persist: {
// 调整为兼容多端的API
storage: {
setItem(key, value) {
uni.setStorageSync(key, value)
},
getItem(key) {
return uni.getStorageSync(key)
}
}
}
})
export default useTechnologyEvaluationStore
...@@ -5,7 +5,7 @@ const menuList = ref([ ...@@ -5,7 +5,7 @@ const menuList = ref([
{ 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 },
{ id: 5, name: '技术评估', icon: 'jspg', group: '技术支援', count: 0 }, { 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' },
{ id: 8, name: '布置工作', icon: 'bzgz', group: '维修控制', count: 0, url: '/panel/assign-work/list' }, { id: 8, name: '布置工作', icon: 'bzgz', group: '维修控制', count: 0, url: '/panel/assign-work/list' },
......
...@@ -54,7 +54,7 @@ export const httpInterceptor = (options) => { ...@@ -54,7 +54,7 @@ export const httpInterceptor = (options) => {
options.url = baseURL + options.url options.url = baseURL + options.url
} }
// 请求超时, 默认 60s // 请求超时, 默认 60s
options.timeout = 10000 options.timeout = 60000
// 添加小程序端请求头标识 // 添加小程序端请求头标识
if (options.name == 'file') { if (options.name == 'file') {
options.formData = { options.formData = {
......
...@@ -25,3 +25,19 @@ export const filterEmptyValues = (obj) => { ...@@ -25,3 +25,19 @@ export const filterEmptyValues = (obj) => {
return acc return acc
}, {}) }, {})
} }
/**
*数组去重
*/
export const uniqueArray = (arr) => {
let uniqueArr = []
let obj = {}
for (let i = 0; i < arr.length; i++) {
let str = JSON.stringify(arr[i])
if (!obj[str]) {
uniqueArr.push(arr[i])
obj[str] = true
}
}
return uniqueArr
}
...@@ -169,7 +169,48 @@ ...@@ -169,7 +169,48 @@
"style": { "style": {
"navigationBarTitleText": "编辑运行决策" "navigationBarTitleText": "编辑运行决策"
} }
} },
{
"path": "pages/modules/mocp/panel/technology-evaluation/list",
"style": {
"navigationBarTitleText": "技术评估"
}
},
{
"path": "pages/modules/mocp/panel/technology-evaluation/search",
"style": {
"navigationBarTitleText": "筛选"
}
},
{
"path": "pages/modules/mocp/panel/technology-evaluation/details",
"style": {
"navigationBarTitleText": "技术评估详情"
}
},
{
"path": "pages/modules/mocp/panel/technology-evaluation/add-engineering",
"style": {
"navigationBarTitleText": "第二类超出持续适航文件的缺陷,需完成工程评估"
}
},{
"path": "pages/modules/mocp/panel/technology-evaluation/add-opinion",
"style": {
"navigationBarTitleText": "经理或授权人意见"
}
},
{
"path": "pages/modules/mocp/panel/technology-evaluation/add-support-file",
"style": {
"navigationBarTitleText": "厂家提供技术支援文件"
}
},
{
"path": "pages/modules/mocp/panel/technology-evaluation/add-ratify",
"style": {
"navigationBarTitleText": "客户工程授权人意见"
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
......
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
</template> </template>
<script setup> <script setup>
import { computed, ref } from 'vue' import { ref } from 'vue'
import CardDetails from './components/card-details.vue' import CardDetails from './components/card-details.vue'
import CardDetailsItem from './components/card-details-item.vue' import CardDetailsItem from './components/card-details-item.vue'
import CardDetailsFooter from './components/card-details-footer.vue' import CardDetailsFooter from './components/card-details-footer.vue'
......
...@@ -84,7 +84,6 @@ const handleSave = async () => { ...@@ -84,7 +84,6 @@ const handleSave = async () => {
return uni.$mocpMessage.showToast(`请输入分解计划的内容`) return uni.$mocpMessage.showToast(`请输入分解计划的内容`)
} }
} }
console.log(formData.value)
uni.$emit('changeDecompose', formData.value) uni.$emit('changeDecompose', formData.value)
uni.$mocpJump.navigateBack() uni.$mocpJump.navigateBack()
} }
......
...@@ -6,11 +6,7 @@ ...@@ -6,11 +6,7 @@
v-model="formData.state" v-model="formData.state"
pickAlign="right" pickAlign="right"
clearable clearable
:options="[ dictkey="md_state"
{ label: 'OPEN', value: 1 },
{ label: '跟踪', value: 2 },
{ label: 'CLOSE', value: 3 }
]"
></global-picker> ></global-picker>
</up-form-item> </up-form-item>
<up-form-item label="航站" prop="terminal" :borderBottom="true"> <up-form-item label="航站" prop="terminal" :borderBottom="true">
......
<template>
<global-page
title="第二类超出持续适航文件的缺陷,需完成工程评估"
navLeftType="text"
:showNavRight="true"
navRightType="button"
navRightText="保存"
@handleRightClick="handleSave"
>
<view class="mocp-form">
<up-form labelPosition="left" labelWidth="auto">
<up-form-item label="授权工程师" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.estimateEngineer" clearable :options="estimateOpts"></global-picker>
</up-form-item>
<up-form-item label="日期" :borderBottom="true">
<global-date pickAlign="right" v-model="formData.engineerTime" clearable :timestamp="false"></global-date>
</up-form-item>
<up-form-item label="缺陷对飞机重要系统/结构的影响" :borderBottom="true" labelPosition="top">
<up-textarea
placeholder="一段很长很长的内容文字,长文本自动换行,该选项的描述是一段很长的内容"
:height="40"
v-model="formData.estimateEffect"
border="none"
></up-textarea>
</up-form-item>
<up-form-item label="缺陷的扩展可能造成的潜在影响" :borderBottom="true" labelPosition="top">
<up-textarea
placeholder="一段很长很长的内容文字,长文本自动换行,该选项的描述是一段很长的内容"
:height="40"
v-model="formData.estimatePotential"
border="none"
></up-textarea>
</up-form-item>
<up-form-item
label="历史上对类似缺陷的处理经验, 包括厂家已发布的超出持续适航文件范围的技术支援类文件"
:borderBottom="true"
labelPosition="top"
>
<up-textarea
placeholder="一段很长很长的内容文字,长文本自动换行,该选项的描述是一段很长的内容"
:height="40"
border="none"
v-model="formData.estimateHandle"
></up-textarea>
</up-form-item>
<up-form-item label="评估结论" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.estimateType"
clearable
:options="baseStore.getParamsByType('EvaluateEstimateType')"
emptyValue="0"
></global-picker>
</up-form-item>
</up-form>
</view>
</global-page>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import useTechnologyEvaluationStore from 'mocp/store/technology-evaluation'
import { storeToRefs } from 'pinia'
import { reactive, ref } from 'vue'
import useBaseStore from 'mocp/store/base'
import { addEngineeringApi } from 'mocp/api/technology-evaluation'
const baseStore = useBaseStore()
const technologyEvaluationStore = useTechnologyEvaluationStore()
const { details } = storeToRefs(technologyEvaluationStore)
const formData = reactive({
id: '',
num: '',
estimateEffect: '',
estimatePotential: '',
estimateHandle: '',
estimateEngineer: '',
estimateType: null,
engineerTime: null
})
//页面初始化
const estimateOpts = ref([])
onLoad(() => {
formData.id = details.value.id
formData.num = details.value.num
formData.estimateEffect = details.value.estimateEffect
formData.estimatePotential = details.value.estimatePotential
formData.estimateHandle = details.value.estimateHandle
formData.estimateEngineer = details.value.estimateEngineer
formData.estimateType = details.value.estimateType
formData.engineerTime = details.value.engineerTime
baseStore.getAdminList(details.value.estimateEngineerName).then((res) => {
estimateOpts.value = res
})
})
//保存
const handleSave = async () => {
const res = await addEngineeringApi(formData, { loading: true })
if (res.code == 200) {
uni.$mocpJump.navigateBack()
uni.$mocpMessage.showToast(res.message)
res.data.estimateEngineerName = estimateOpts.value.find((item) => item.value == formData.estimateEngineer)?.label.split('(')[0] || ''
//更新详情
technologyEvaluationStore.setState('details', res.data)
} else {
uni.$mocpMessage.showToast(res.message)
}
}
</script>
<style lang="scss" scoped>
.mocp-form {
background: #fff;
margin-bottom: 24rpx;
padding: 0 32rpx;
}
</style>
<template>
<global-page
title="经理或授权人意见"
navLeftType="text"
:showNavRight="true"
navRightType="button"
navRightText="保存"
@handleRightClick="handleSave"
>
<view class="mocp-form">
<up-form labelPosition="left" labelWidth="auto">
<up-form-item label="机队经理或其授权人" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.otherName" clearable :options="otherNameOpts"></global-picker>
</up-form-item>
<up-form-item label="机队经理或其授权人意见" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.opinionType" clearable dictkey="te_opinionType" emptyValue="0"></global-picker>
</up-form-item>
</up-form>
</view>
</global-page>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import useTechnologyEvaluationStore from 'mocp/store/technology-evaluation'
import { storeToRefs } from 'pinia'
import { reactive, ref } from 'vue'
import useBaseStore from 'mocp/store/base'
import { addOpinionApi } from 'mocp/api/technology-evaluation'
const baseStore = useBaseStore()
const technologyEvaluationStore = useTechnologyEvaluationStore()
const { details } = storeToRefs(technologyEvaluationStore)
const formData = reactive({
id: '',
num: '',
otherName: '',
opinionType: ''
})
//页面初始化
const otherNameOpts = ref([])
onLoad(() => {
formData.id = details.value.id
formData.num = details.value.num
formData.otherName = details.value.otherName
formData.opinionType = details.value.opinionType
baseStore.getAdminList(details.value.otherFullName).then((res) => {
otherNameOpts.value = res
})
})
//保存
const handleSave = async () => {
const res = await addOpinionApi(formData, { loading: true })
if (res.code == 200) {
uni.$mocpJump.navigateBack()
uni.$mocpMessage.showToast(res.message)
res.data.otherFullName = otherNameOpts.value.find((item) => item.value == formData.otherName)?.label.split('(')[0] || ''
//更新详情
technologyEvaluationStore.setState('details', res.data)
} else {
uni.$mocpMessage.showToast(res.message)
}
}
</script>
<style lang="scss" scoped>
.mocp-form {
background: #fff;
margin-bottom: 24rpx;
padding: 0 32rpx;
}
</style>
<template>
<global-page
title="客户工程授权人意见"
navLeftType="text"
:showNavRight="true"
navRightType="button"
navRightText="保存"
@handleRightClick="handleSave"
>
<view class="mocp-form">
<up-form labelPosition="left" labelWidth="auto">
<up-form-item label="客户工程授权人" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.customName" clearable :options="customNameOpts"></global-picker>
</up-form-item>
<up-form-item label="客户工程授权人意见" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.customType" clearable dictkey="te_customType" emptyValue="0"></global-picker>
</up-form-item>
</up-form>
</view>
</global-page>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import useTechnologyEvaluationStore from 'mocp/store/technology-evaluation'
import { storeToRefs } from 'pinia'
import { reactive, ref } from 'vue'
import useBaseStore from 'mocp/store/base'
import { addRatifyApi } from 'mocp/api/technology-evaluation'
const baseStore = useBaseStore()
const technologyEvaluationStore = useTechnologyEvaluationStore()
const { details } = storeToRefs(technologyEvaluationStore)
const formData = reactive({
id: '',
num: '',
customName: '',
customType: ''
})
//页面初始化
const customNameOpts = ref([])
onLoad(() => {
formData.id = details.value.id
formData.num = details.value.num
formData.customName = details.value.customName
formData.customType = details.value.customType
baseStore.getAdminList(details.value.customFullName).then((res) => {
customNameOpts.value = res
})
})
//保存
const handleSave = async () => {
const res = await addRatifyApi(formData, { loading: true })
if (res.code == 200) {
uni.$mocpJump.navigateBack()
uni.$mocpMessage.showToast(res.message)
res.data.customFullName = customNameOpts.value.find((item) => item.value == formData.customName)?.label.split('(')[0] || ''
//更新详情
technologyEvaluationStore.setState('details', res.data)
} else {
uni.$mocpMessage.showToast(res.message)
}
}
</script>
<style lang="scss" scoped>
.mocp-form {
background: #fff;
margin-bottom: 24rpx;
padding: 0 32rpx;
}
</style>
<template>
<global-page
title="厂家提供技术支援文件 "
navLeftType="text"
:showNavRight="true"
navRightType="button"
navRightText="保存"
@handleRightClick="handleSave"
>
<view class="mocp-form">
<up-form labelPosition="left" labelWidth="auto">
<view class="form">
<view class="form-title">非持续适航文件</view>
<view class="form-item">
<up-form-item :borderBottom="true">
<global-checkbox
v-model="formData.nonFileType"
placement="column"
:options="baseStore.getParamsByType('EvaluateNonFileType')"
></global-checkbox>
</up-form-item>
<up-form-item label="非持续适航文件描述" :borderBottom="true" labelPosition="top">
<up-textarea
placeholder="一段很长很长的内容文字,长文本自动换行,该选项的描述是一段很长的内容"
:height="40"
border="none"
v-model="formData.nonName"
></up-textarea>
</up-form-item>
</view>
</view>
<view class="form">
<view class="form-title">持续适航文件</view>
<view class="form-item">
<up-form-item :borderBottom="true">
<global-checkbox
v-model="formData.fileType"
placement="column"
:options="baseStore.getParamsByType('EvaluateFileType')"
></global-checkbox>
</up-form-item>
<up-form-item label="持续适航文件描述" :borderBottom="true" labelPosition="top">
<up-textarea
placeholder="一段很长很长的内容文字,长文本自动换行,该选项的描述是一段很长的内容"
:height="40"
border="none"
v-model="formData.fileTypeName"
></up-textarea>
</up-form-item>
</view>
</view>
<view class="form">
<view class="form-title">批准类别</view>
<view class="form-item">
<up-form-item :borderBottom="true">
<global-checkbox
v-model="formData.ratifyType"
placement="column"
:options="baseStore.getParamsByType('EvaluateRatifyType')"
></global-checkbox>
</up-form-item>
</view>
</view>
</up-form>
</view>
</global-page>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import useTechnologyEvaluationStore from 'mocp/store/technology-evaluation'
import { storeToRefs } from 'pinia'
import { reactive } from 'vue'
import useBaseStore from 'mocp/store/base'
import { addSupportFileApi } from 'mocp/api/technology-evaluation'
const baseStore = useBaseStore()
const technologyEvaluationStore = useTechnologyEvaluationStore()
const { details } = storeToRefs(technologyEvaluationStore)
const formData = reactive({
id: '',
nonFileType: '',
nonName: '',
fileType: '',
fileTypeName: '',
ratifyType: ''
})
//页面初始化
onLoad(() => {
formData.id = details.value.id
formData.num = details.value.num
formData.nonFileType = details.value.nonFileType
formData.nonName = details.value.nonName
formData.fileType = details.value.fileType
formData.fileTypeName = details.value.fileTypeName
formData.ratifyType = details.value.ratifyType
console.log(formData)
})
//保存
const handleSave = async () => {
const res = await addSupportFileApi(formData, { loading: true })
if (res.code == 200) {
uni.$mocpJump.navigateBack()
uni.$mocpMessage.showToast(res.message)
//更新详情
technologyEvaluationStore.setState('details', res.data)
} else {
uni.$mocpMessage.showToast(res.message)
}
}
</script>
<style lang="scss" scoped>
.mocp-form {
background: #fff;
.form {
&-title {
padding: 20rpx 32rpx;
background: #f7f8fa;
color: $mocp-text-5;
}
&-item {
padding: 0 32rpx;
}
}
}
</style>
.border-top {
border-top: 2rpx solid #f4f4f4;
margin-bottom: 0 !important;
}
.padding-x {
padding: 16rpx 0;
}
.details {
&-header {
padding: 24rpx;
background: #fff;
margin-bottom: 16rpx;
&-center {
margin: 16rpx 0;
}
&-bottom {
display: flex;
align-items: center;
justify-content: space-between;
}
}
&-body {
line-height: 48rpx;
&-list {
border-bottom: 2rpx solid #f4f4f4;
}
&-item {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
}
&-footer {
display: flex;
align-items: center;
justify-content: space-between;
}
&-cell {
margin-bottom: 16rpx;
&:first-child {
margin-top: 16rpx;
}
.title {
font-size: 34rpx;
color: $mocp-text-5;
margin-bottom: 16rpx;
}
.label {
font-size: 30rpx;
color: $mocp-text-4;
}
}
}
&-edit {
text-align: right;
color: $mocp-primary-6;
margin-bottom: 16rpx;
}
:deep(.u-collapse-item) {
background: #fff;
margin-bottom: 16rpx;
.u-cell__body {
padding: 24rpx !important;
}
.u-cell__title {
color: $mocp-text-5;
font-size: 34rpx;
}
}
}
.item {
padding: 24rpx;
margin-bottom: 16rpx;
border-radius: 12rpx;
background: linear-gradient(#e6eeff, #ffffff, #ffffff);
&-title {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 16rpx;
border-bottom: 2rpx solid #f4f4f4;
.left {
display: flex;
align-items: center;
.txt {
color: $mocp-text-5;
font-size: 34rpx;
margin-left: 16rpx;
}
}
.right {
display: flex;
align-items: center;
justify-content: space-between;
.label {
margin-right: 32rpx;
.txt {
margin-left: 16rpx;
}
&:last-child {
margin-right: 0;
}
}
}
}
&-content {
padding-top: 16rpx;
font-size: 30rpx;
color: $mocp-text-4;
line-height: 40rpx;
}
&-footer {
display: flex;
align-items: center;
justify-content: space-between;
.label {
display: flex;
align-items: center;
margin-top: 16rpx;
.txt {
margin-left: 16rpx;
}
}
}
}
import { ref } from 'vue'
export const formRef = ref()
// 表单数据
export const formData = ref({
state: null,
ac: '',
model: '',
ata: '',
startDateTime: null,
endDateTime: null
})
export const status = ref([])
import { toRaw } from 'vue'
import { formData, formRef } from './search.compositions'
export const handleReset = () => {
formData.value = {
state: null,
presenter: '',
seat: '',
workType: null,
startTime: null,
stopTime: null
}
formRef.value?.resetFields()
handleConfirm()
}
export const handleConfirm = () => {
uni.$mocpJump.navigateBack()
uni.$emit('technologyEvaluationReload', { params: toRaw(formData.value) })
}
<template>
<global-page
title="技术评估"
isDataList
refresherEnabled
loadingMoreEnabled
auto
ref="paging"
:params="searchParams"
showNavRight
navRightType="icon"
navRightIcon="saixuan-01"
@handleRightClick="handleRightClick"
:api="getTechnicalEvaluationApi"
: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('te_state', item.state)"></custom-state>
</view>
<view class="right">
<view class="label">
<global-field class="txt" label="机号:" :value="item.ac || '-'"></global-field>
</view>
<view class="label">
<global-field class="txt" label="机型:" :value="item.model || '-'"></global-field>
</view>
</view>
</view>
<view class="item-content u-line-3">
{{ item.description || '暂无内容~' }}
</view>
<view class="item-footer">
<view class="label">
<global-icon icon="calendar"></global-icon>
<text class="txt">
{{ Day(item.dateTime).format('YYYY/MM/DD') }}
</text>
</view>
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import Day from 'mocp/utils/dayjs'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import useTechnologyEvaluationStore from 'mocp/store/technology-evaluation'
import { onUnload } from '@dcloudio/uni-app'
import { getTechnicalEvaluationApi } from 'mocp/api/technology-evaluation'
//跳转
const technologyEvaluationStore = useTechnologyEvaluationStore()
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/technology-evaluation/details', { id: data.id }).then(() => {
technologyEvaluationStore.setState('details', data)
})
}
//筛选
const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/technology-evaluation/search')
}
//刷新
const searchParams = ref()
const paging = ref()
uni.$on('technologyEvaluationReload', ({ params }) => {
if (params) {
searchParams.value = params
}
paging.value?.reload()
})
onUnload(() => {
uni.$off('technologyEvaluationReload')
})
</script>
<style lang="scss" scoped>
@import './constants/list.scss';
</style>
<template>
<global-page :padding="24" title="筛选">
<up-form labelPosition="left" labelWidth="auto" :model="formData" ref="formRef">
<up-form-item label="状态" prop="state" :borderBottom="true">
<global-picker v-model="formData.state" pickAlign="right" clearable dictkey="te_state"></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="model" :borderBottom="true">
<global-picker v-model="formData.model" pickAlign="right" :options="baseStore.getTypeSelect" clearable filter></global-picker>
</up-form-item>
<up-form-item label="ATA章节" prop="ata" :borderBottom="true">
<global-picker v-model="formData.ata" pickAlign="right" :options="baseStore.getATASelect" 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>
<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 { formData, formRef } from './constants/search.compositions'
import useBaseStore from 'mocp/store/base'
import { handleConfirm, handleReset } from './constants/search.functionals'
//获取下拉框选项
const baseStore = useBaseStore()
const {
selectList: { deviceNumList }
} = useBaseStore()
</script>
<style lang="scss" scoped>
.footer-btn {
padding: 24rpx 32rpx;
background-color: #fff;
}
</style>
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe6e3;</span>
<div class="name">fly</div>
<div class="code-name">&amp;#xe6e3;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe6e2;</span> <span class="icon iconfont">&#xe6e2;</span>
<div class="name">saixuan</div> <div class="name">saixuan</div>
<div class="code-name">&amp;#xe6e2;</div> <div class="code-name">&amp;#xe6e2;</div>
...@@ -162,9 +168,9 @@ ...@@ -162,9 +168,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1720423308442') format('woff2'), src: url('iconfont.woff2?t=1720593389064') format('woff2'),
url('iconfont.woff?t=1720423308442') format('woff'), url('iconfont.woff?t=1720593389064') format('woff'),
url('iconfont.ttf?t=1720423308442') format('truetype'); url('iconfont.ttf?t=1720593389064') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
...@@ -191,6 +197,15 @@ ...@@ -191,6 +197,15 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-fly"></span>
<div class="name">
fly
</div>
<div class="code-name">.icon-fly
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-saixuan-01"></span> <span class="icon iconfont icon-saixuan-01"></span>
<div class="name"> <div class="name">
saixuan saixuan
...@@ -354,6 +369,14 @@ ...@@ -354,6 +369,14 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fly"></use>
</svg>
<div class="name">fly</div>
<div class="code-name">#icon-fly</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-saixuan-01"></use> <use xlink:href="#icon-saixuan-01"></use>
</svg> </svg>
<div class="name">saixuan</div> <div class="name">saixuan</div>
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4550048 */ font-family: "iconfont"; /* Project id 4550048 */
src: url('iconfont.woff2?t=1720423308442') format('woff2'), src: url('iconfont.woff2?t=1720593389064') format('woff2'),
url('iconfont.woff?t=1720423308442') format('woff'), url('iconfont.woff?t=1720593389064') format('woff'),
url('iconfont.ttf?t=1720423308442') format('truetype'); url('iconfont.ttf?t=1720593389064') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-fly:before {
content: "\e6e3";
}
.icon-saixuan-01:before { .icon-saixuan-01:before {
content: "\e6e2"; content: "\e6e2";
} }
......
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "41020181",
"name": "fly",
"font_class": "fly",
"unicode": "e6e3",
"unicode_decimal": 59107
},
{
"icon_id": "40993233", "icon_id": "40993233",
"name": "saixuan", "name": "saixuan",
"font_class": "saixuan-01", "font_class": "saixuan-01",
......
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