Commit a367f18a by pangchong

feat: Add login page with AMMS integration, routine maintenance work order…

feat: Add login page with AMMS integration, routine maintenance work order creation, and a new HTTP utility.
parent 5f905292
...@@ -116,6 +116,27 @@ ...@@ -116,6 +116,27 @@
<up-form-item label="过夜维护AF+PF" prop="overnightAfPf" :borderBottom="true"> <up-form-item label="过夜维护AF+PF" prop="overnightAfPf" :borderBottom="true">
<global-switch v-model="formData.overnightAfPf" switchAlign="right"></global-switch> <global-switch v-model="formData.overnightAfPf" switchAlign="right"></global-switch>
</up-form-item> </up-form-item>
<up-form-item label="一般勤务" prop="overnightService" :borderBottom="true">
<global-switch
v-model="formData.overnightService"
switchAlign="right"
:disabled="formData.tr == '1' || formData.overnightAfPf == '1'"
></global-switch>
</up-form-item>
<up-form-item label="例行检查" prop="overnightRoutineInspection" :borderBottom="true">
<global-switch
v-model="formData.overnightRoutineInspection"
switchAlign="right"
:disabled="formData.tr == '1' || formData.overnightAfPf == '1'"
></global-switch>
</up-form-item>
<up-form-item label="飞机放行" prop="overnightFlightRelease" :borderBottom="true">
<global-switch
v-model="formData.overnightFlightRelease"
switchAlign="right"
:disabled="formData.tr == '1' || formData.overnightAfPf == '1'"
></global-switch>
</up-form-item>
</view> </view>
<view class="mocp-title">设备使用记录</view> <view class="mocp-title">设备使用记录</view>
<view class="mocp-form"> <view class="mocp-form">
...@@ -181,12 +202,18 @@ watchEffect(() => { ...@@ -181,12 +202,18 @@ watchEffect(() => {
formData.serviceTr = '0' formData.serviceTr = '0'
formData.routineInspection = '0' formData.routineInspection = '0'
formData.fly = '0' formData.fly = '0'
formData.overnightService = '0'
formData.overnightRoutineInspection = '0'
formData.overnightFlightRelease = '0'
} }
if (formData.overnightAfPf == '1') { if (formData.overnightAfPf == '1') {
formData.tr = '0' formData.tr = '0'
formData.serviceTr = '0' formData.serviceTr = '0'
formData.routineInspection = '0' formData.routineInspection = '0'
formData.fly = '0' formData.fly = '0'
formData.overnightService = '0'
formData.overnightRoutineInspection = '0'
formData.overnightFlightRelease = '0'
} }
formData.legs = formData.legs1 + '-' + formData.legs2 + '-' + formData.legs3 formData.legs = formData.legs1 + '-' + formData.legs2 + '-' + formData.legs3
}) })
......
...@@ -28,6 +28,9 @@ export const formData = reactive({ ...@@ -28,6 +28,9 @@ export const formData = reactive({
serviceAf: '0', serviceAf: '0',
servicePf: '0', servicePf: '0',
serviceTr: '0', serviceTr: '0',
overnightService: '0',
overnightRoutineInspection: '0',
overnightFlightRelease: '0',
station: '', station: '',
towPus: undefined, towPus: undefined,
tr: '0', tr: '0',
...@@ -102,7 +105,7 @@ export const rules = reactive({ ...@@ -102,7 +105,7 @@ export const rules = reactive({
upLocation: [ upLocation: [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return value && /^[A-Z0-9]+$/.test(value) return !value || /^[A-Z0-9]+$/.test(value)
}, },
message: '起飞机位只能填写大写字母和数字', message: '起飞机位只能填写大写字母和数字',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
...@@ -111,7 +114,7 @@ export const rules = reactive({ ...@@ -111,7 +114,7 @@ export const rules = reactive({
downLocation: [ downLocation: [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return value && /^[A-Z0-9]+$/.test(value) return !value || /^[A-Z0-9]+$/.test(value)
}, },
message: '落地机位只能填写大写字母和数字', message: '落地机位只能填写大写字母和数字',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
......
...@@ -103,6 +103,9 @@ export const resetData = () => { ...@@ -103,6 +103,9 @@ export const resetData = () => {
serviceAf: '0', serviceAf: '0',
servicePf: '0', servicePf: '0',
serviceTr: '0', serviceTr: '0',
overnightService: '0',
overnightRoutineInspection: '0',
overnightFlightRelease: '0',
station: '', station: '',
towPus: undefined, towPus: undefined,
tr: '0', tr: '0',
......
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