| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <template>
- <div>
- <el-table v-loading="tableLoading" :data="tableData" stripe border style="width: 100%">
- <el-table-column align="center" show-overflow-tooltip fixed prop="deptName" label="机构名称"></el-table-column>
- <el-table-column align="center" show-overflow-tooltip fixed prop="deptId" label="机构编码"></el-table-column>
- <el-table-column closable fixed="right" label="操作" align="center" width="155">
- <template slot-scope="scope">
- <el-button type="text" size="small" @click="pushPrRiver(scope.$index, scope.row)">确定</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- style="margin-top:10px;text-align:center;"
- small
- :current-page.sync="pageNum"
- :page-size="pageSize"
- layout="total,prev, pager, next"
- :total="showResultCount"
- @current-change="pageIndexChange"
- ></el-pagination>
- </div>
- </template>
- <script>
- import { getAffData } from "../api/administrativeRegion.js";
- export default {
- props: [],
- data() {
- return {
- tableLoading: false,
- adId: "350000000000",
- pageNum: 1,
- pageSize: 10,
- showResultCount: 10,
- tableData: []
- };
- },
- mounted: function() {
- this.getTableData();
- },
- methods: {
- pushPrRiver: function(index, row) {
- var _self = this;
- this.$emit("dialogEvent", { deptId: row.deptId });
- },
- pageIndexChange: function() {
- this.getTableData(this.pageNum);
- },
- getTableData: function() {
- var _self = this;
- _self.tableLoading = true;
- try {
- getAffData(_self.adId).then(
- response => {
- _self.tableData = response.data;
- _self.tableLoading = false;
- },
- response => {}
- );
- } catch (e) {
- alert("暂无河流数据");
- }
- }
- },
- watch: {}
- };
- </script>
- <style>
- .tree_menu {
- position: absolute;
- top: 30px;
- z-index: 20;
- width: 100%;
- border: solid 1px #eee;
- background-color: #fff;
- }
- .tree_menu p {
- font-weight: normal;
- color: #999;
- text-align: center;
- position: absolute;
- right: 10px;
- top: -28px;
- z-index: 20;
- font-size: 16px;
- }
- .menu_tree {
- position: absolute;
- top: 30px;
- z-index: 20;
- width: 100%;
- border: solid 1px #eee;
- background-color: #fff;
- }
- .menu_tree p {
- font-weight: normal;
- color: #999;
- text-align: center;
- position: absolute;
- right: 10px;
- top: -28px;
- z-index: 20;
- font-size: 16px;
- }
- </style>
|