|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="hum-page-container">
|
|
<div class="hum-page-container">
|
|
|
<div class="hum-page-title">断面管理</div>
|
|
<div class="hum-page-title">断面管理</div>
|
|
|
- <div class="hum-page-main">
|
|
|
|
|
|
|
+ <div class="hum-page-section">
|
|
|
<div class="hum-page-search">
|
|
<div class="hum-page-search">
|
|
|
<el-form :model="queryParams" size="large" ref="queryForm" label-position="top">
|
|
<el-form :model="queryParams" size="large" ref="queryForm" label-position="top">
|
|
|
<el-row :gutter="30">
|
|
<el-row :gutter="30">
|
|
@@ -31,38 +31,30 @@
|
|
|
</div>
|
|
</div>
|
|
|
<el-table v-loading="loading" :data="list" border>
|
|
<el-table v-loading="loading" :data="list" border>
|
|
|
<el-table-column label="站码" prop="id" />
|
|
<el-table-column label="站码" prop="id" />
|
|
|
- <el-table-column label="站点名称" prop="siteName" />
|
|
|
|
|
<el-table-column label="断面名称" prop="berthingName" />
|
|
<el-table-column label="断面名称" prop="berthingName" />
|
|
|
<el-table-column label="创建日期">
|
|
<el-table-column label="创建日期">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span>{{ formatDateTime(scope.row.createTime) }}</span>
|
|
<span>{{ formatDateTime(scope.row.createTime) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="断面图" align="center">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-button size="mini" type="text" icon="el-icon-s-operation" @click="showSectionChart(scope.row)">查看</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-download" @click="download(scope.row)">导出</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-download" @click="download(scope.row)">导出</el-button>
|
|
|
- <el-button v-if="scope.$index > 0" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <el-dialog title="断面图" :visible.sync="sectionChartVisible" width="60%" destroy-on-close>
|
|
|
|
|
|
|
+ <div class="hum-page-title" style="margin-top: 30px">断面图</div>
|
|
|
|
|
+ <div class="hum-page-section">
|
|
|
<SectionChart :sections="sections" />
|
|
<SectionChart :sections="sections" />
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { listSite } from "@/api/site/site";
|
|
import { listSite } from "@/api/site/site";
|
|
|
-import { listSection, deleteSection } from "@/api/site/berthing";
|
|
|
|
|
|
|
+import { getSiteSection, deleteSection } from "@/api/site/berthing";
|
|
|
import SectionChart from './chart';
|
|
import SectionChart from './chart';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -78,7 +70,6 @@ export default {
|
|
|
size: 1000,
|
|
size: 1000,
|
|
|
},
|
|
},
|
|
|
loading: true,
|
|
loading: true,
|
|
|
- total: 0,
|
|
|
|
|
list: [],
|
|
list: [],
|
|
|
sections: [],
|
|
sections: [],
|
|
|
sectionChartVisible: false,
|
|
sectionChartVisible: false,
|
|
@@ -107,16 +98,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- listSection({ ...this.queryParams, siteId: this.siteId }).then(response => {
|
|
|
|
|
- this.list = response.data.records;
|
|
|
|
|
- this.total = response.data.total;
|
|
|
|
|
|
|
+ getSiteSection(this.siteId).then(response => {
|
|
|
|
|
+ if (response.data) {
|
|
|
|
|
+ this.list = [response.data];
|
|
|
|
|
+ this.sections = JSON.parse(response.data.positions);
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
}
|
|
}
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
- showSectionChart(section) {
|
|
|
|
|
- this.sectionChartVisible = true;
|
|
|
|
|
- this.sections = JSON.parse(section.positions);
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
handleAdd() {
|
|
handleAdd() {
|
|
|
this.$router.push(`/site/section/add?siteId=${this.siteId}`)
|
|
this.$router.push(`/site/section/add?siteId=${this.siteId}`)
|
|
@@ -127,14 +115,6 @@ export default {
|
|
|
download(section) {
|
|
download(section) {
|
|
|
window.open(`${process.env.VUE_APP_BASE_API}/berthing/downFile/${section.berthingId}`, '_blank')
|
|
window.open(`${process.env.VUE_APP_BASE_API}/berthing/downFile/${section.berthingId}`, '_blank')
|
|
|
},
|
|
},
|
|
|
- handleDelete(section) {
|
|
|
|
|
- this.$modal.confirm('是否确认删除断面名称为"' + section.berthingName + '"的数据项?').then(function() {
|
|
|
|
|
- return deleteSection(section.berthingId);
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.getList();
|
|
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
- },
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|