|
|
@@ -14,7 +14,6 @@ interface CheckboxItem {
|
|
|
}
|
|
|
|
|
|
interface Props {
|
|
|
- SystemList: Object
|
|
|
TitleType: String
|
|
|
}
|
|
|
const MilestoneOceanListInit = ref<CheckboxItem[]>([])
|
|
|
@@ -25,7 +24,6 @@ const ContainerOceanListInit = ref<CheckboxItem[]>([])
|
|
|
const ContainerOceanListChecked = ref()
|
|
|
const props = defineProps<Props>()
|
|
|
let savesubscribeobj: any = {}
|
|
|
-const SystemList = ref(props.SystemList)
|
|
|
const RulesActive = ref([
|
|
|
'ShipmentRange',
|
|
|
'SelectMilestone',
|
|
|
@@ -57,22 +55,7 @@ const DelayedDataInit = ref()
|
|
|
const DelayedDataInitAir = ref()
|
|
|
const OceanETDInit = ref()
|
|
|
const AirETDInit = ref()
|
|
|
-
|
|
|
-watch(
|
|
|
- () => props.SystemList,
|
|
|
- (current) => {
|
|
|
- SystemList.value = current
|
|
|
- FrequencyDataMil.value = current['Milestone_Update']
|
|
|
- MethodsDataMil.value = current['Milestone_Update']
|
|
|
- FrequencyDataCon.value = current['Container_Status_Update']
|
|
|
- MethodsDataCon.value = current['Container_Status_Update']
|
|
|
- FrequencyDataDep.value = current['Departure/Arrival_Delay']
|
|
|
- MethodsDataDep.value = current['Departure/Arrival_Delay']
|
|
|
- FrequencyDataETD.value = current['ETD/ETA_Change']
|
|
|
- MethodsDataETD.value = current['ETD/ETA_Change']
|
|
|
- Initdata(current)
|
|
|
- }
|
|
|
-)
|
|
|
+const ShipmentRangeMil = ref()
|
|
|
|
|
|
const MonitoringList = ref()
|
|
|
const getInitMonitoring = () => {
|
|
|
@@ -90,47 +73,70 @@ const getInitMonitoring = () => {
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
getInitMonitoring()
|
|
|
+ Initdata()
|
|
|
})
|
|
|
// 初始赋值
|
|
|
-const Initdata = (val: any) => {
|
|
|
- console.log(val)
|
|
|
- MilestoneOceanListInit.value = val.Milestone_Update.OceanCheckBoxList
|
|
|
- MilestoneOceanListChecked.value = val.Milestone_Update.OceanCheckedList
|
|
|
- OceanCheckList.value = val.Milestone_Update.OceanCheckedList
|
|
|
- MilestoneAirListInit.value = val.Milestone_Update.AirCheckBoxList
|
|
|
- MilestoneAirListChecked.value = val.Milestone_Update.AirCheckedList
|
|
|
- AirCheckList.value = val.Milestone_Update.AirCheckedList
|
|
|
- ContainerOceanListInit.value = val.Container_Status_Update.CtnrCheckBoxList
|
|
|
- ContainerOceanListChecked.value = val.Container_Status_Update.CtnrCheckedList
|
|
|
- ContainerOceanList.value = val.Container_Status_Update.CtnrCheckedList
|
|
|
- let OceanObj: any = {}
|
|
|
- OceanObj.atd_etd = val['Departure/Arrival_Delay'].ocean_atd_sub_etd
|
|
|
- OceanObj.atd_etd_unit = val['Departure/Arrival_Delay'].ocean_atd_sub_etd_unit
|
|
|
- OceanObj.ata_eta = val['Departure/Arrival_Delay'].ocean_ata_sub_eta
|
|
|
- OceanObj.ata_eta_unit = val['Departure/Arrival_Delay'].ocean_ata_sub_eta_unit
|
|
|
- DelayedDataInit.value = OceanObj
|
|
|
- let AirObj: any = {}
|
|
|
- AirObj.atd_etd = val['Departure/Arrival_Delay'].air_atd_sub_etd
|
|
|
- AirObj.atd_etd_unit = val['Departure/Arrival_Delay'].air_atd_sub_etd_unit
|
|
|
- AirObj.ata_eta = val['Departure/Arrival_Delay'].air_ata_sub_eta
|
|
|
- AirObj.ata_eta_unit = val['Departure/Arrival_Delay'].air_ata_sub_eta_unit
|
|
|
- DelayedDataInitAir.value = AirObj
|
|
|
- let OceanChange: any = {}
|
|
|
- OceanChange.ETDradio = val['ETD/ETA_Change'].ocean_etd_change
|
|
|
- OceanChange.etd_old_sub_new = val['ETD/ETA_Change'].ocean_etd_old_sub_new
|
|
|
- OceanChange.etd_old_sub_new_unit = val['ETD/ETA_Change'].ocean_etd_old_sub_new_unit
|
|
|
- OceanChange.ETAradio = val['ETD/ETA_Change'].ocean_eta_change
|
|
|
- OceanChange.eta_old_sub_new = val['ETD/ETA_Change'].ocean_eta_old_sub_new
|
|
|
- OceanChange.eta_old_sub_new_unit = val['ETD/ETA_Change'].ocean_eta_old_sub_new_unit
|
|
|
- OceanETDInit.value = OceanChange
|
|
|
- let AirChange: any = {}
|
|
|
- AirChange.ETDradio = val['ETD/ETA_Change'].air_etd_change
|
|
|
- AirChange.etd_old_sub_new = val['ETD/ETA_Change'].air_etd_old_sub_new
|
|
|
- AirChange.etd_old_sub_new_unit = val['ETD/ETA_Change'].air_etd_old_sub_new_unit
|
|
|
- AirChange.ETAradio = val['ETD/ETA_Change'].air_eta_change
|
|
|
- AirChange.eta_old_sub_new = val['ETD/ETA_Change'].air_eta_old_sub_new
|
|
|
- AirChange.eta_old_sub_new_unit = val['ETD/ETA_Change'].air_eta_old_sub_new_unit
|
|
|
- AirETDInit.value = AirChange
|
|
|
+const Initdata = () => {
|
|
|
+ if (sessionStorage.getItem('editTableid') != null) {
|
|
|
+ const editTableid = sessionStorage.getItem('editTableid')
|
|
|
+ const editTablerules_type = sessionStorage.getItem('editTablerules_type')
|
|
|
+ $api
|
|
|
+ .EditMonitoringTable({
|
|
|
+ id: editTableid,
|
|
|
+ rules_type: editTablerules_type
|
|
|
+ })
|
|
|
+ .then((res: any) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ if (editTablerules_type == 'Milestone_Update') {
|
|
|
+ FrequencyDataMil.value = res.data.Milestone_Update
|
|
|
+ MethodsDataMil.value = res.data.Milestone_Update
|
|
|
+ ShipmentRangeMil.value = res.data.Milestone_Update
|
|
|
+ MilestoneOceanListInit.value = res.data.Milestone_Update.OceanCheckBoxList
|
|
|
+ MilestoneOceanListChecked.value = res.data.Milestone_Update.OceanCheckedList
|
|
|
+ OceanCheckList.value = res.data.Milestone_Update.OceanCheckedList
|
|
|
+ MilestoneAirListInit.value = res.data.Milestone_Update.AirCheckBoxList
|
|
|
+ MilestoneAirListChecked.value = res.data.Milestone_Update.AirCheckedList
|
|
|
+ AirCheckList.value = res.data.Milestone_Update.AirCheckedList
|
|
|
+ createListMilestone.value = res.data.Milestone_Update.shipment_details
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ sessionStorage.removeItem('editTableid')
|
|
|
+ sessionStorage.removeItem('editTablerules_type')
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ // ContainerOceanListInit.value = val.CtnrCheckBoxList
|
|
|
+ // ContainerOceanListChecked.value = val.CtnrCheckedList
|
|
|
+ // ContainerOceanList.value = val.CtnrCheckedList
|
|
|
+ // let OceanObj: any = {}
|
|
|
+ // OceanObj.atd_etd = val.ocean_atd_sub_etd
|
|
|
+ // OceanObj.atd_etd_unit = val.ocean_atd_sub_etd_unit
|
|
|
+ // OceanObj.ata_eta = val.ocean_ata_sub_eta
|
|
|
+ // OceanObj.ata_eta_unit = val.ocean_ata_sub_eta_unit
|
|
|
+ // DelayedDataInit.value = OceanObj
|
|
|
+ // let AirObj: any = {}
|
|
|
+ // AirObj.atd_etd = val.air_atd_sub_etd
|
|
|
+ // AirObj.atd_etd_unit = val.air_atd_sub_etd_unit
|
|
|
+ // AirObj.ata_eta = val.air_ata_sub_eta
|
|
|
+ // AirObj.ata_eta_unit = val.air_ata_sub_eta_unit
|
|
|
+ // DelayedDataInitAir.value = AirObj
|
|
|
+ // let OceanChange: any = {}
|
|
|
+ // OceanChange.ETDradio = val.ocean_etd_change
|
|
|
+ // OceanChange.etd_old_sub_new = val.ocean_etd_old_sub_new
|
|
|
+ // OceanChange.etd_old_sub_new_unit = val.ocean_etd_old_sub_new_unit
|
|
|
+ // OceanChange.ETAradio = val.ocean_eta_change
|
|
|
+ // OceanChange.eta_old_sub_new = val.ocean_eta_old_sub_new
|
|
|
+ // OceanChange.eta_old_sub_new_unit = val.ocean_eta_old_sub_new_unit
|
|
|
+ // OceanETDInit.value = OceanChange
|
|
|
+ // let AirChange: any = {}
|
|
|
+ // AirChange.ETDradio = val.air_etd_change
|
|
|
+ // AirChange.etd_old_sub_new = val.air_etd_old_sub_new
|
|
|
+ // AirChange.etd_old_sub_new_unit = val.air_etd_old_sub_new_unit
|
|
|
+ // AirChange.ETAradio = val.air_eta_change
|
|
|
+ // AirChange.eta_old_sub_new = val.air_eta_old_sub_new
|
|
|
+ // AirChange.eta_old_sub_new_unit = val.air_eta_old_sub_new_unit
|
|
|
+ // AirETDInit.value = AirChange
|
|
|
}
|
|
|
|
|
|
// 给tag list赋值
|
|
|
@@ -234,7 +240,7 @@ const changecheckCreateRulesContainer = (val: any, value: any) => {
|
|
|
createListContainer.value.push(createObj.Timestr)
|
|
|
}
|
|
|
savesubscribeobj.shipment_transport_mode = value
|
|
|
- savesubscribeobj.shipment_details = createListMilestone.value.join(';\n')
|
|
|
+ savesubscribeobj.shipment_details = createListContainer.value.join(';\n')
|
|
|
}
|
|
|
const ChangeCheckTimeRulesContainer = (val: any, time: any) => {
|
|
|
createListContainer.value = []
|
|
|
@@ -253,7 +259,7 @@ const ChangeCheckTimeRulesContainer = (val: any, time: any) => {
|
|
|
if (createObj.Timestr != '') {
|
|
|
createListContainer.value.push(createObj.Timestr)
|
|
|
}
|
|
|
- savesubscribeobj.shipment_details = createListMilestone.value.join(';\n')
|
|
|
+ savesubscribeobj.shipment_details = createListContainer.value.join(';\n')
|
|
|
}
|
|
|
const changecheckCreateRulesDeparture = (val: any, value: any) => {
|
|
|
createListDeparture.value = []
|
|
|
@@ -265,7 +271,7 @@ const changecheckCreateRulesDeparture = (val: any, value: any) => {
|
|
|
createListDeparture.value.push(createObj.Timestr)
|
|
|
}
|
|
|
savesubscribeobj.shipment_transport_mode = value
|
|
|
- savesubscribeobj.shipment_details = createListMilestone.value.join(';\n')
|
|
|
+ savesubscribeobj.shipment_details = createListDeparture.value.join(';\n')
|
|
|
}
|
|
|
const ChangeCheckTimeRulesDeparture = (val: any, time: any) => {
|
|
|
createListDeparture.value = []
|
|
|
@@ -284,7 +290,7 @@ const ChangeCheckTimeRulesDeparture = (val: any, time: any) => {
|
|
|
if (createObj.Timestr != '') {
|
|
|
createListDeparture.value.push(createObj.Timestr)
|
|
|
}
|
|
|
- savesubscribeobj.shipment_details = createListMilestone.value.join(';\n')
|
|
|
+ savesubscribeobj.shipment_details = createListDeparture.value.join(';\n')
|
|
|
}
|
|
|
const changecheckCreateRulesETDChange = (val: any, value: any) => {
|
|
|
createListETDChange.value = []
|
|
|
@@ -296,7 +302,7 @@ const changecheckCreateRulesETDChange = (val: any, value: any) => {
|
|
|
createListETDChange.value.push(createObj.Timestr)
|
|
|
}
|
|
|
savesubscribeobj.shipment_transport_mode = value
|
|
|
- savesubscribeobj.shipment_details = createListMilestone.value.join(';\n')
|
|
|
+ savesubscribeobj.shipment_details = createListETDChange.value.join(';\n')
|
|
|
}
|
|
|
const ChangeCheckTimeRulesETDChange = (val: any, time: any) => {
|
|
|
createListETDChange.value = []
|
|
|
@@ -315,7 +321,7 @@ const ChangeCheckTimeRulesETDChange = (val: any, time: any) => {
|
|
|
if (createObj.Timestr != '') {
|
|
|
createListETDChange.value.push(createObj.Timestr)
|
|
|
}
|
|
|
- savesubscribeobj.shipment_details = createListMilestone.value.join(';\n')
|
|
|
+ savesubscribeobj.shipment_details = createListETDChange.value.join(';\n')
|
|
|
}
|
|
|
// 删除create tag
|
|
|
const ShipmentRangeRef = ref()
|
|
|
@@ -655,7 +661,8 @@ const clearData = (val: any) => {
|
|
|
|
|
|
defineExpose({
|
|
|
clearData,
|
|
|
- Savesubscribe
|
|
|
+ Savesubscribe,
|
|
|
+ Initdata
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
|
@@ -680,6 +687,7 @@ defineExpose({
|
|
|
<ShipmentRange
|
|
|
ref="ShipmentRangeRef"
|
|
|
v-if="props.TitleType == 'Milestone'"
|
|
|
+ :ShipmentRangeData="ShipmentRangeMil"
|
|
|
@ChangeCheckRules="changecheckCreateRulesMilestone"
|
|
|
@ChangeCheckTimeRules="ChangeCheckTimeRulesMilestone"
|
|
|
></ShipmentRange>
|
|
|
@@ -1207,7 +1215,8 @@ defineExpose({
|
|
|
margin-right: 0;
|
|
|
height: fit-content;
|
|
|
line-height: 32px;
|
|
|
- align-items: center;
|
|
|
+ align-items: start;
|
|
|
+ align-items: start;
|
|
|
}
|
|
|
:deep(.el-radio__input.is-checked + .el-radio__label) {
|
|
|
color: var(--color-neutral-1);
|