|
|
@@ -100,12 +100,11 @@
|
|
|
placeholder="装货港"
|
|
|
size="small"
|
|
|
@change="getIndexData(1)"
|
|
|
- @focus="getPortSelect"
|
|
|
filterable
|
|
|
clearable
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in portOptions"
|
|
|
+ v-for="item in loadPortOptions"
|
|
|
:key="item"
|
|
|
:label="item.value"
|
|
|
:value="item.key"
|
|
|
@@ -120,12 +119,11 @@
|
|
|
placeholder="卸货港"
|
|
|
size="small"
|
|
|
@change="getIndexData(1)"
|
|
|
- @focus="getPortSelect"
|
|
|
filterable
|
|
|
clearable
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in portOptions"
|
|
|
+ v-for="item in discPortOptions"
|
|
|
:key="item"
|
|
|
:label="item.value"
|
|
|
:value="item.key"
|
|
|
@@ -166,7 +164,6 @@
|
|
|
placeholder="货种"
|
|
|
size="small"
|
|
|
@change="getIndexData(1)"
|
|
|
- @focus="getCargoSelect"
|
|
|
filterable
|
|
|
clearable
|
|
|
>
|
|
|
@@ -352,6 +349,14 @@ function drawMarkers() {
|
|
|
let status = ref(3);
|
|
|
function changeVoyageType(s) {
|
|
|
status.value = s;
|
|
|
+ postData.value = {
|
|
|
+ loadPortId: "",
|
|
|
+ discPortId: "",
|
|
|
+ isArrived: "",
|
|
|
+ abnormalStatus: "",
|
|
|
+ cargoId: "",
|
|
|
+ };
|
|
|
+ getIndexSelect();
|
|
|
getIndexData();
|
|
|
}
|
|
|
|
|
|
@@ -478,6 +483,9 @@ async function getPortSelect() {
|
|
|
portOptions.value = res.data.result;
|
|
|
}
|
|
|
|
|
|
+let loadPortOptions = ref([]);
|
|
|
+let discPortOptions = ref([]);
|
|
|
+
|
|
|
let cargoOptions = ref([]);
|
|
|
async function getCargoSelect() {
|
|
|
if (cargoOptions.value.length) return;
|
|
|
@@ -593,7 +601,6 @@ async function exportZip() {
|
|
|
|
|
|
function resetFilter() {
|
|
|
postData.value = {
|
|
|
- status: 0,
|
|
|
loadPortId: "",
|
|
|
discPortId: "",
|
|
|
isArrived: "",
|
|
|
@@ -602,10 +609,24 @@ function resetFilter() {
|
|
|
};
|
|
|
getIndexData();
|
|
|
}
|
|
|
+
|
|
|
+async function getIndexSelect() {
|
|
|
+ let res = await api.getIndexSelect({
|
|
|
+ status: status.value,
|
|
|
+ });
|
|
|
+ if (res.data.status == 0) {
|
|
|
+ loadPortOptions.value = res.data.result.loadPortSelect;
|
|
|
+ discPortOptions.value = res.data.result.discPortSelect;
|
|
|
+ cargoOptions.value = res.data.result.cargoSelect;
|
|
|
+ } else {
|
|
|
+ loadPortOptions.value = [];
|
|
|
+ discPortOptions.value = [];
|
|
|
+ cargoOptions.value = [];
|
|
|
+ }
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
- getPortSelect();
|
|
|
- getCargoSelect();
|
|
|
getIndexData("init");
|
|
|
+ getIndexSelect();
|
|
|
});
|
|
|
</script>
|
|
|
|