|
@@ -0,0 +1,320 @@
|
|
|
+<template>
|
|
|
+ <div class="yxnaContent">
|
|
|
+ <!-- 标题 -->
|
|
|
+ <TopTitle :label="label" />
|
|
|
+ <!-- 操作栏 -->
|
|
|
+ <!-- <div style="display: flex;justify-content: space-between;margin-bottom: 10px">
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-input placeholder="名称" v-model.trim="form.name" clearable @clear="clearreset" style="margin: 0 10px;width: 200px">
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" class="search" @click="serachWork">搜索</el-button>
|
|
|
+ <el-button type="primary" class="search" @click="reset" style="margin-left: 5px">重置</el-button>
|
|
|
+ </div>
|
|
|
+ </div> -->
|
|
|
+ <!-- 表格 -->
|
|
|
+ <el-table :data="tableData" border ref='multipleTable' :height="tableH" stripe
|
|
|
+ :header-cell-style="{ background: '#e5e8ed', color: '#666', textAlign: 'center' }" :cell-style="tableStyle"
|
|
|
+ style="cursor: default" @sort-change="sortChange">
|
|
|
+ <el-table-column width="100" label="序号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="名称" :show-overflow-tooltip="true" min-width="200">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="dictType" label="类别" :show-overflow-tooltip="true" width="200">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="创建日期" width="270" :show-overflow-tooltip="true">
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 0:未解决,1:已解决 2:不处理 -->
|
|
|
+ <el-table-column prop="errorState" label="状态" :show-overflow-tooltip="true" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag :type="getStateTag(scope.row.errorState)"
|
|
|
+ disable-transitions>{{ getState(scope.row.errorState) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" prop="examineState,id" min-width="220" slot="default" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button class="but" type="primary" @click="openDialog(scope.row)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="block">
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize"
|
|
|
+ layout="prev, pager,next,jumper,total,sizes" :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TopTitle from '../components/TopTitle'
|
|
|
+import request from '../utils/request'
|
|
|
+import api from '../api/index'
|
|
|
+import { mapState } from '../constants/mapState'
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ TopTitle
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableStyle: { textAlign: 'center', },
|
|
|
+ tableH: 'calc(100vh - 230px)',
|
|
|
+ label: '地图纠错',
|
|
|
+ form: {
|
|
|
+ name: '',
|
|
|
+ },
|
|
|
+ tableData: [],
|
|
|
+ // 当前页数
|
|
|
+ currentPage: 1,
|
|
|
+ // 显示一页多少条数据
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ column: null,
|
|
|
+ // 地图状态
|
|
|
+ mapState
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //排序
|
|
|
+ sortChange(column) {
|
|
|
+ },
|
|
|
+ //根据条件查询印象南岸
|
|
|
+ serachWork() {
|
|
|
+ this.$refs.multipleTable.clearSort()
|
|
|
+ this.column = undefined
|
|
|
+ this.currentPage = 1
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ //显示每条数据
|
|
|
+ handleSizeChange(pageSize) {
|
|
|
+ this.pageSize = pageSize
|
|
|
+ this.currentPage = 1
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ //切换页码
|
|
|
+ handleCurrentChange(currentPage) {
|
|
|
+ this.$refs.multipleTable.bodyWrapper.scrollTop = 0
|
|
|
+ this.currentPage = currentPage
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ // 请求数据
|
|
|
+ getData() {
|
|
|
+ let params = {
|
|
|
+ page: this.currentPage,
|
|
|
+ limit: this.pageSize,
|
|
|
+ }
|
|
|
+ api.mapEditPage({ params }).then(r => {
|
|
|
+ this.total = r.data.count
|
|
|
+ this.tableData = r.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ clearreset() {
|
|
|
+ this.form.name = ''
|
|
|
+ },
|
|
|
+ // 清空输入框
|
|
|
+ reset() {
|
|
|
+ this.form.name = ''
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ // 查看详情
|
|
|
+ openDialog(row) {
|
|
|
+ this.$router.push({name: 'MapDetails', params: {data: JSON.stringify(row)}})
|
|
|
+ },
|
|
|
+ // 获取地图状态名称
|
|
|
+ getState(code) {
|
|
|
+ return this.mapState.filter((item) => item.code === code)[0].name
|
|
|
+ },
|
|
|
+ // 获取tag状态
|
|
|
+ getStateTag(code) {
|
|
|
+ if (code === 0) {
|
|
|
+ return 'warning'
|
|
|
+ } else if (code === 1) {
|
|
|
+ return 'success'
|
|
|
+ } else {
|
|
|
+ return 'info'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="less">
|
|
|
+/* 禁用后的勾选*/
|
|
|
+/deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
|
|
|
+ border-color: #def5cb;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
|
|
|
+ background-color: #157de9;
|
|
|
+ border-color: #DCDFE6;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ [data-v-2cde7735] .el-upload-list--picture .el-upload-list__item-name {
|
|
|
+ display: block;
|
|
|
+ margin-top: 0px;
|
|
|
+ margin-left: -78px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-upload-list--picture .el-upload-list__item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column-reverse;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-upload-list--picture .el-upload-list__item-name i {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-upload-list--picture .el-upload-list__item-name {
|
|
|
+ display: block;
|
|
|
+ margin-top: 0px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-upload-list--picture .el-upload-list__item-thumbnail {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-dialog__body {
|
|
|
+ padding: 0 0 30px 20px;
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ word-break: break-all;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-form-item__label {
|
|
|
+ padding: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.yxnaContent {
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.addTitle {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .btn-custom-cancel {
|
|
|
+ float: right !important;
|
|
|
+ margin-left: 10px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.add {
|
|
|
+ width: 66px;
|
|
|
+ height: 38px;
|
|
|
+ margin-left: 0;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-message-box__btns .el-button:nth-child(1) {}
|
|
|
+
|
|
|
+/deep/ .el-message-box__btns .el-button:nth-child(2) {
|
|
|
+ margin-right: 10px;
|
|
|
+ float: right;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-col-12 {
|
|
|
+ width: 50%;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+
|
|
|
+.search {
|
|
|
+ width: 66px;
|
|
|
+ height: 38px;
|
|
|
+ margin-left: 0;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-form-item__label {
|
|
|
+ height: 40px;
|
|
|
+ width: 110px;
|
|
|
+ background-color: #FAFAFA;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ border-radius: 2px 0 0 2px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-input__inner {
|
|
|
+ border-radius: 2px 0 0 2px;
|
|
|
+}
|
|
|
+
|
|
|
+.el-select>.el-input {
|
|
|
+ width: 200px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-textarea__inner {
|
|
|
+ height: 100px;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/deep/ .el-dialog__title {
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-pagination__total {
|
|
|
+ margin-left: 10px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.el-pagination {
|
|
|
+ margin: 0;
|
|
|
+ margin-top: 10px;
|
|
|
+ /* position: fixed;
|
|
|
+ left: 13rem; */
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
|
|
|
+ z-index: 2;
|
|
|
+}
|
|
|
+
|
|
|
+.imgBox {
|
|
|
+ width: 100%;
|
|
|
+ /*height: 55vh;*/
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.but {
|
|
|
+ width: 36px;
|
|
|
+ height: 22px;
|
|
|
+ padding: 0;
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
+
|
|
|
+.el-checkbox {
|
|
|
+ margin: 0;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .bewrite>.el-form-item__label {
|
|
|
+ width: 100%;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 21px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-form--inline .el-form-item {
|
|
|
+ margin-right: 0px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ [data-v-2cde7735] .el-form-item__label {
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ /*border-right: transparent;*/
|
|
|
+}
|
|
|
+
|
|
|
+/* 空白框*/
|
|
|
+/deep/ .formTempBox {
|
|
|
+ height: 38px;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ width: 100%;
|
|
|
+ border-left: transparent;
|
|
|
+ background-color: #FAFAFA;
|
|
|
+}
|
|
|
+</style>
|