|
@@ -23,22 +23,28 @@
|
|
|
label-width="110px"
|
|
label-width="110px"
|
|
|
label-position="left"
|
|
label-position="left"
|
|
|
>
|
|
>
|
|
|
- <el-form-item prop="portName" label="港口名称">
|
|
|
|
|
|
|
+ <el-form-item prop="portName" label="货主名称">
|
|
|
<el-input
|
|
<el-input
|
|
|
style="width: 280px"
|
|
style="width: 280px"
|
|
|
v-model="ruleForm.portName"
|
|
v-model="ruleForm.portName"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item prop="longitude" label="经度">
|
|
|
|
|
|
|
+ <el-form-item prop="departurePortId" label="始发港">
|
|
|
<el-input
|
|
<el-input
|
|
|
style="width: 280px"
|
|
style="width: 280px"
|
|
|
- v-model="ruleForm.longitude"
|
|
|
|
|
|
|
+ v-model="ruleForm.departurePortId"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item prop="latitude" label="纬度">
|
|
|
|
|
|
|
+ <el-form-item prop="destinationPortId" label="目的地港">
|
|
|
<el-input
|
|
<el-input
|
|
|
style="width: 280px"
|
|
style="width: 280px"
|
|
|
- v-model="ruleForm.latitude"
|
|
|
|
|
|
|
+ v-model="ruleForm.destinationPortId"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="sailingPeriod" label="航期">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ style="width: 280px"
|
|
|
|
|
+ v-model="ruleForm.sailingPeriod"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -62,20 +68,30 @@
|
|
|
align="center"
|
|
align="center"
|
|
|
></el-table-column>
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="portName"
|
|
|
|
|
- label="港口名称"
|
|
|
|
|
|
|
+ prop="cargoOwnerName"
|
|
|
|
|
+ label="货主名称"
|
|
|
|
|
+ min-width="120"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ ></el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="departurePort"
|
|
|
|
|
+ label="始发港"
|
|
|
min-width="120"
|
|
min-width="120"
|
|
|
align="center"
|
|
align="center"
|
|
|
></el-table-column>
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="longitude"
|
|
|
|
|
- label="经纬度"
|
|
|
|
|
|
|
+ prop="destinationPort"
|
|
|
|
|
+ label="目的地港"
|
|
|
|
|
+ min-width="120"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ ></el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="sailingPeriod"
|
|
|
|
|
+ label="航期"
|
|
|
min-width="120"
|
|
min-width="120"
|
|
|
align="center"
|
|
align="center"
|
|
|
>
|
|
>
|
|
|
- <template v-slot="scope">
|
|
|
|
|
- {{ scope.row.longitude }}, {{ scope.row.latitude }}
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <template v-slot="scope"> {{ scope.row.sailingPeriod }} 天 </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="createTime"
|
|
prop="createTime"
|
|
@@ -87,18 +103,11 @@
|
|
|
{{ subTimeStr(scope.row.createTime) }}
|
|
{{ subTimeStr(scope.row.createTime) }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="启用/禁用" min-width="80" align="center">
|
|
|
|
|
|
|
+ <!-- <el-table-column label="操作" min-width="80" align="center">
|
|
|
<template v-slot="scope">
|
|
<template v-slot="scope">
|
|
|
- <el-switch
|
|
|
|
|
- v-model="scope.row.status"
|
|
|
|
|
- active-color="#13ce66"
|
|
|
|
|
- :active-value="0"
|
|
|
|
|
- :inactive-value="1"
|
|
|
|
|
- inactive-color="#ff4949"
|
|
|
|
|
- @change="changeSwitch($event, scope.row.id)"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-button size="mini" type="danger">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
|
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div style="width: 100%; text-align: right; margin-top: 43px">
|
|
<div style="width: 100%; text-align: right; margin-top: 43px">
|
|
|
<el-pagination
|
|
<el-pagination
|
|
@@ -128,13 +137,17 @@ let dialogFormVisible = ref(false);
|
|
|
let form = ref(null);
|
|
let form = ref(null);
|
|
|
const ruleForm = ref({
|
|
const ruleForm = ref({
|
|
|
portName: "",
|
|
portName: "",
|
|
|
- longitude: "",
|
|
|
|
|
- latitude: "",
|
|
|
|
|
|
|
+ departurePortId: "",
|
|
|
|
|
+ destinationPortId: "",
|
|
|
});
|
|
});
|
|
|
const rules = ref({
|
|
const rules = ref({
|
|
|
portName: [{ required: true, message: "请填写港口名称", trigger: "blur" }],
|
|
portName: [{ required: true, message: "请填写港口名称", trigger: "blur" }],
|
|
|
- longitude: [{ required: true, message: "请填写港口经度", trigger: "blur" }],
|
|
|
|
|
- latitude: [{ required: true, message: "请填写港口纬度", trigger: "blur" }],
|
|
|
|
|
|
|
+ departurePortId: [
|
|
|
|
|
+ { required: true, message: "请填写港口经度", trigger: "blur" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ destinationPortId: [
|
|
|
|
|
+ { required: true, message: "请填写港口纬度", trigger: "blur" },
|
|
|
|
|
+ ],
|
|
|
});
|
|
});
|
|
|
async function getTransPortsList() {
|
|
async function getTransPortsList() {
|
|
|
tableData.value = [];
|
|
tableData.value = [];
|
|
@@ -143,7 +156,6 @@ async function getTransPortsList() {
|
|
|
size: 10,
|
|
size: 10,
|
|
|
term: term.value,
|
|
term: term.value,
|
|
|
});
|
|
});
|
|
|
- term.value = "";
|
|
|
|
|
if (res.data.status == 0) {
|
|
if (res.data.status == 0) {
|
|
|
tableData.value = res.data.result;
|
|
tableData.value = res.data.result;
|
|
|
total.value = res.data.total;
|
|
total.value = res.data.total;
|
|
@@ -157,11 +169,11 @@ function resetForm() {
|
|
|
async function addtTransPort() {
|
|
async function addtTransPort() {
|
|
|
form.value.validate(async (valid) => {
|
|
form.value.validate(async (valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- let { portName, longitude, latitude } = ruleForm.value;
|
|
|
|
|
|
|
+ let { portName, departurePortId, destinationPortId } = ruleForm.value;
|
|
|
let res = await api.addtTransPort({
|
|
let res = await api.addtTransPort({
|
|
|
portName,
|
|
portName,
|
|
|
- longitude,
|
|
|
|
|
- latitude,
|
|
|
|
|
|
|
+ departurePortId,
|
|
|
|
|
+ destinationPortId,
|
|
|
});
|
|
});
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
if (res.data.status == 0) {
|
|
if (res.data.status == 0) {
|