派生自 wuyushui/SewerAndRainNetwork

seatonwan9
2021-05-31 d4fca49a4b70fe60c730d7e32e2035153a91fcc5
src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
@@ -1,156 +1,156 @@
<template>
    <div class="ReportLocationSection">
        <el-form :model="form" label-width="120px">
            <el-row class="pipe-line-search">
                <el-col :span="18">
                    <el-form-item label="管线名称:">
                        <el-input v-model="form.pipeName" @change="pipelineSearch">
                            <el-button style="padding-right:10px;" slot="suffix" type="text" @click="pipelineSearch">
                                <img src="../../../../../public/assets/images/map/emergency/search.png" alt="">
                            </el-button>
                        </el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-button type="primary" size="small" icon="el-icon-location-outline" @click="pipeClickLocation">定位
                    </el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="管段编码:">
                        <el-input v-model="form.sectionName" disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="附属设施编码:">
                        <el-input v-model="form.affiliatedFacilities" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="附属设施类型:">
                        <el-input v-model="form.affiliatedFacilitiesCode" disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <div class="pipe-table" v-show="this.tableList.length>=1">
            <el-card>
                <span class="fixed-style" style="display: block">管线名称</span>
                <el-table
                        :data="tableList"
                        border
                        height="120"
                        max-height="140"
                        @row-click="sectionShowClick"
                        style="width: 100%">
                    <el-table-column
                            label="序号"
                            type="index"
                    >
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.pipename"
                            label="管线名称">
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.subchaname"
                            label="支线名称">
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.mediumtype"
                            label="管线类型">
                    </el-table-column>
                    <el-table-column width="40" fixed="right" label="操作">
                        <template slot-scope="scope">
                            <el-button @click="localAdr(scope.row)" type="text" size="small">定位</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-card>
            <el-card>
                <span class="fixed-style" style="display: block">管段列表</span>
                <el-table
                        :data="tableListSection"
                        border
                        @row-click="sectionCode"
                        height="100"
                        max-height="100"
                        style="width: 100%">
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.pipesegcode"
                            label="管段编码">
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.startpointnumber"
                            label="起点探查号">
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.endpointnumber"
                            label="终点探查号">
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.material"
                            label="材质">
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            prop="properties.embeddingmode"
                            label="埋设方式">
                    </el-table-column>
                    <el-table-column width="40" fixed="right" label="操作">
                        <template slot-scope="scope">
                            <el-button @click="localAdr(scope.row)" type="text" size="small">定位</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <span class="fixed-style" style="display: block">附属设施列表</span>
                <el-table
                        :data="tableDataAffFac"
                        border
                        @row-click="affFacName"
                        height="120"
                        max-height="140"
                        style="width: 100%">
                    <el-table-column
                            show-overflow-tooltip
                            width="150"
                            prop="properties.pipecode"
                            label="管线编号">
                    </el-table-column>
                    <el-table-column
                            show-overflow-tooltip
                            width="150"
                            prop="properties.name"
                            label="附属设施名称">
                    </el-table-column>
                    <el-table-column
                            width="150"
                            show-overflow-tooltip
                            prop="properties.type"
                            label="设施类型">
                    </el-table-column>
                    <el-table-column width="90" fixed="right" label="操作">
                        <template slot-scope="scope">
                            <el-button @click="localAdr(scope.row)" type="text" size="small">定位</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-card>
        </div>
        <el-row style="text-align: right;margin: 10px">
            <el-button type="primary" @click="confirm" size="small">确认</el-button>
        </el-row>
  <div class="ReportLocationSection">
    <el-form :model="form" label-width="120px">
      <el-row class="pipe-line-search">
        <el-col :span="18">
          <el-form-item label="管线名称:">
            <el-input v-model="form.pipeName" @change="pipelineSearch">
              <el-button style="padding-right:10px;" slot="suffix" type="text" @click="pipelineSearch">
                <img src="../../../../../public/assets/images/map/emergency/search.png" alt="">
              </el-button>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-button type="primary" size="small" icon="el-icon-location-outline" @click="pipeClickLocation">定位
          </el-button>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="18">
          <el-form-item label="管段编:">
            <el-input v-model="form.sectionName" disabled></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="附属设施编码:">
            <el-input v-model="form.affiliatedFacilities" disabled></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="附属设施类型:">
            <el-input v-model="form.affiliatedFacilitiesCode" disabled></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div class="pipe-table" v-show="this.tableList.length>=1">
      <el-card>
        <span class="fixed-style" style="display: block">管线名称</span>
        <el-table
            :data="tableList"
            border
            height="120"
            max-height="140"
            @row-click="sectionShowClick"
            style="width: 100%">
          <el-table-column
              label="序号"
              type="index"
          >
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              prop="properties.pipename"
              label="管线名称">
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              prop="properties.subchaname"
              label="支线名称">
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              prop="properties.mediumtype"
              label="管线类型">
          </el-table-column>
          <el-table-column width="40" fixed="right" label="操作">
            <template slot-scope="scope">
              <el-button @click="localAdr(scope.row)" type="text" size="small">定位</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-card>
      <el-card>
        <span class="fixed-style" style="display: block">管段列表</span>
        <el-table
            :data="tableListSection"
            border
            @row-click="sectionCode"
            height="100"
            max-height="100"
            style="width: 100%">
          <el-table-column
              show-overflow-tooltip
              prop="properties.pipesegcode"
              label="管段编码">
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              prop="properties.startpointnumber"
              label="起点探查号">
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              prop="properties.endpointnumber"
              label="终点探查号">
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              prop="properties.material"
              label="材质">
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              prop="properties.embeddingmode"
              label="埋设方式">
          </el-table-column>
          <el-table-column width="40" fixed="right" label="操作">
            <template slot-scope="scope">
              <el-button @click="localAdr(scope.row)" type="text" size="small">定位</el-button>
            </template>
          </el-table-column>
        </el-table>
        <span class="fixed-style" style="display: block">附属设施列表</span>
        <el-table
            :data="tableDataAffFac"
            border
            @row-click="affFacName"
            height="120"
            max-height="140"
            style="width: 100%">
          <el-table-column
              show-overflow-tooltip
              width="150"
              prop="properties.pipecode"
              label="管线编号">
          </el-table-column>
          <el-table-column
              show-overflow-tooltip
              width="150"
              prop="properties.name"
              label="附属设施名称">
          </el-table-column>
          <el-table-column
              width="150"
              show-overflow-tooltip
              prop="properties.type"
              label="设施类型">
          </el-table-column>
          <el-table-column width="90" fixed="right" label="操作">
            <template slot-scope="scope">
              <el-button @click="localAdr(scope.row)" type="text" size="small">定位</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-card>
    </div>
    <el-row style="text-align: right;margin: 10px">
      <el-button type="primary" @click="confirm" size="small">确认</el-button>
    </el-row>
  </div>
</template>
<script>
@@ -159,6 +159,7 @@
import AjaxUtils from '@utils/AjaxUtils'
import eventBus from '../../../../eventBus'
import { WMS_URL } from '../../../../conf/Constants'
import { publicLocationStore } from './ReportLocation'
export default {
  name: 'ReportLocationSection',
@@ -355,9 +356,27 @@
    confirm () {
      // console.log('点击确定选择完成')
      eventBus.$emit('location-setChange', true)
      // 事件上报 位置信息 存储数据库
      const data = {
        ID: '',
        EventID: '',
        EventPipeline: this.form.pipeName,
        EventPipeSeg: this.form.sectionName,
        EventAffType: this.form.affiliatedFacilitiesCode,
        EventAffCode: this.form.affiliatedFacilities,
        EventAffPointNum: '',
        EventPosX: '',
        EventPosY: '',
        AcquisitionPeople: '',
        AcquisitionDate: ''
      }
      // 通过方法 存储数据 进行 数据库存储数据
      publicLocationStore(data)
      // 数据置空
      this.form.pipeName = ''
      this.form.sectionName = ''
      this.form.affiliatedFacilities = ''
      this.form.affiliatedFacilitiesCode = ''
      this.tableList = []
      this.tableListSection = []
      this.tableDataAffFac = []
@@ -368,86 +387,23 @@
</script>
<style lang="less" scoped>
    /*/deep/ .el-input {*/
    /*    width: 0.74353rem;*/
    /*}*/
    .pipe-line-search {
        display: flex;
        align-items: center;
.pipe-line-search {
  display: flex;
  align-items: center;
        .el-button {
            margin: 0 15px;
        }
  .el-button {
    margin: 0 15px;
  }
}
.pipe-table {
  /deep/ .el-card {
    .el-table {
      margin: 0.05345rem auto;
    }
  }
}
    .pipe-table {
        /*display: flex;*/
        /*align-items: center;*/
        /*justify-content: space-around;*/
        /deep/ .el-card {
            /*width: 1.39523rem;*/
            /*max-width: 1.39523rem;*/
            /*height: 0.9343rem;*/
            /*max-height: 0.9343rem;*/
            .el-table {
                margin: 0.05345rem auto;
            }
        }
    }
    .fixed-style {
        color: @color;
    }
    /deep/
    .warnPagination {
        .btn-quicknext, .btn-quickprev {
            color: #e4e8f1 !important;
            background-color: transparent;
            // border: 1px solid #25AECD;
            border-left: 1px solid #25AECD;
            border-bottom: 1px solid #25AECD;
            border-top: 1px solid #25AECD;
            color: #e4e8f1;
        }
        .el-pager li {
            color: #e4e8f1;
            background: transparent;
            // border: 1px solid #25AECD;
            border-left: 1px solid #25AECD;
            border-bottom: 1px solid #25AECD;
            border-top: 1px solid #25AECD;
        }
        .el-pager li.active {
            border-color: #25AECD;
            background-color: rgba(38, 222, 253, 0.3);
            color: #e4e8f1;
        }
        .el-pager li:hover {
            border-color: #25AECD;
            background-color: rgba(38, 222, 253, 0.3);
            color: #34e0ff;
        }
        .btn-prev {
            background-color: transparent;
            // border: 1px solid #25AECD;
            border-left: 1px solid #25AECD;
            border-bottom: 1px solid #25AECD;
            border-top: 1px solid #25AECD;
            color: #e4e8f1;
        }
        .btn-next {
            background-color: transparent;
            border: 1px solid #25AECD;
            color: #e4e8f1;
        }
    }
</style>