管道基础大数据平台系统开发-【前端】-新系統界面
xing
2023-02-25 0fc3e879a2ef9f1baacefc68efc2fbd052c87f22
src/views/datamanage/SpatialData.vue
@@ -1,64 +1,103 @@
<template>
  <div class="Spatialbox">
    <My-bread
      :list="[
    <My-bread :list="[
        `${$t('dataManage.dataManage')}`,
        `${$t('dataManage.dataRetrieval')}`,
      ]"
    ></My-bread>
      ]"></My-bread>
    <el-divider />
    <div class="spatialContent">
      <div class="spatial_leftTree">
        <el-tree
          :data="tree"
          :props="defaultProps"
          :default-expanded-keys="[1]"
          node-key="id"
          @node-click="handleNodeClick"
        ></el-tree>
    <div class="spatialContent ">
      <div class="spatial_leftTree subpage_Div " style="border: 1px solid #dcdfe6;">
        <el-input v-model="filterText" style="width:220px;"  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" suffix-icon="el-icon-search" ></el-input>
        <div style="width:300px">
          <el-tree
            :data="tree"
            :props="defaultProps"
            node-key="id"
            :current-node-key="10"
            @node-click="handleNodeClick"
            :filter-node-method="filterNode"
            ref="tree"
          ></el-tree>
        </div>
      </div>
      <div class="spatial_rightContent">
        <el-form ref="ruleForm" :model="ruleForm" :inline="true">
          <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name">
            <el-input v-model="ruleForm.name" :placeholder="$t('common.choose')" />
          </el-form-item>
          <el-form-item>
            <el-button
              @click="submitForm('ruleForm')"
              icon="el-icon-search"
              class="primary"
              size="small"
              >{{$t('common.iquery')}}</el-button
            >
            <el-button
              @click="resetForm('ruleForm')"
              icon="el-icon-refresh"
              type="info"
              size="small"
              >{{$t('common.reset')}}</el-button
            >
      <div class="contentshuju">
        <div class="contentshujutou">
          <el-form
          ref="ruleForm"
          :model="ruleForm"
          :inline="true"
        >
          <el-form-item>
            <!-- type="textarea" disabled-->
            <el-input
              v-model="ruleForm.fileName"
              class="nm-skin-pretty"
              show-word-limit
              :rows="2"
              resize='none'
              style="width: 220px;"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')"
              suffix-icon="el-icon-edit"
            ></el-input>
          </el-form-item>
          <el-form-item style="float: right">
            <el-button
              v-if="btnStatus.download"
              icon="el-icon-position"
              type="success"
              @click="getSpaceMapVisibale"
              size="small"
              >{{$t('common.download')}}</el-button
            >
              type="primary"
            >{{
              $t('synthesis.rangequery')
            }}</el-button>
          </el-form-item>
            <el-form-item style="float: right">
              <el-button
                @click="resetForm"
                type="info"
                size="small"
                icon="el-icon-refresh"
              >{{$t('common.reset')}}</el-button>
            </el-form-item>
          <el-form-item style="float: right">
            <el-button
              @click="submitForm"
              type="primary"
              size="small"
              icon="el-icon-search"
            >{{$t('common.iquery')}}</el-button>
          </el-form-item>
          <el-form-item style="float: right">
            <el-button
              v-if="btnStatus.insert"
              @click="conditionVisible = true"
              size="small"
              icon="el-icon-plus"
              type="success"
            >{{$t('common.append')}}</el-button>
          </el-form-item>
        </el-form>
        <el-divider class="eldivider" />
        <div style="height: 85%">
        </div>
        <div class="dividing-line"></div>
        <div class="table_box2" style="height:calc(100% - 89px)">
          <el-table
            border
            ref="filterTable"
            :data="tableData"
            height="90%"
            border
            style="width: 100%"
            @selection-change="handleSelectionChange"
            height="calc(100% - 57px)"
            :header-cell-style="{background:'#e6eaee',color:'#181818', 'text-align': 'center'}  "
          >
            <el-table-column type="selection" width="55" />
            <el-table-column width="60" type="index" :label="$t('common.index')" />
          <el-table-column
              type="selection"
              width="55"
            />
            <el-table-column
              width="60"
              align="center"
              type="index"
              :label="$t('common.index')"
            />
            <el-table-column
              v-for="(item, index) in attributeData"
              :key="index"
@@ -67,29 +106,35 @@
              show-overflow-tooltip
              align="center"
            ></el-table-column>
            <el-table-column min-width="80" :label="$t('common.operate')">
            <el-table-column
            min-width="180"
              :label="$t('common.operate')"
            >
              <template slot-scope="scope">
                <el-link class="elLink"
                <el-button
                   type="primary"
                  plain
                  size="small"
                  @click="showDetail(scope.$index, scope.row)"
                  >{{$t('common.details')}}</el-link
                >
                <el-link class="elLink"
                  @click="getAttachTable"
                >{{$t('common.details')}}</el-button>
                <el-button
                  plain
                  size="small"
                  @click="getAttachTable(scope.$index, scope.row)"
                  style="margin-left: 20px;  "
                  >{{$t('common.enclosure')}}</el-link
                >
                >{{$t('common.enclosure')}}</el-button>
              </template>
            </el-table-column>
          </el-table>
          <div style="margin-top: 20px" class="pagination_box">
          <div
            class="pagination_box"
          >
            <el-pagination
              v-if="changePag"
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="this.listData.pageIndex"
              :current-page="listData.pageIndex"
              :page-sizes="[10, 20, 50, 100]"
              :page-size="this.listData.pageSize"
              :page-size="listData.pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="count"
            >
@@ -97,31 +142,54 @@
          </div>
        </div>
      </div>
    </div>
        <div class="infoBox" v-show="showinfoBox">
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span>{{$t('common.details')}}</span>
          <div style="float: right; cursor: pointer" @click="closeDetial">
            <i class="el-icon-close"></i>
          </div>
     <div class="infoBox_box" v-show="showinfoBox">
      <div
      class="infoBox box_div"
    >
      <div
        slot="header"
        class="clearfix"
      >
        <span>{{$t('common.details')}}</span>
        <div
          style="float: right; cursor: pointer"
          @click="closeDetial"
        >
          <i class="el-icon-close"></i>
        </div>
        <div class="contentBox">
          <ul>
            <li v-for="(item, index) in itemdetail">
              <p>
                <label> {{ item.label }}:</label>
                <label class="boxlabel">{{ item.value }}</label>
              </p>
              <el-divider></el-divider>
            </li>
          </ul>
        </div>
      </el-card>
    </div>
    <el-dialog :title="$t('common.attachinform')" width="30%" :visible.sync="dialogFormVisible">
      <el-form :model="formInline" class="demo-form-inline">
        <el-form-item >
        <el-divider></el-divider>
      </div>
      <div class="contentBox">
        <ul>
          <li v-for="(item, index) in itemdetail">
            <p>
              <label> {{ item.label }}:</label>
              <label class="boxlabel">{{ item.value }}</label>
            </p>
            <el-divider></el-divider>
          </li>
        </ul>
      </div>
      </div>
     </div>
    <el-dialog
      :title="$t('common.attachinform')"
      top="2vh"
      :visible.sync="dialogFormVisible"
    >
    <div style="height: 500px; overflow: auto">
      <el-form
        :model="formInline"
        class="demo-form-inline"
        label-position="top"
      >
        <el-form-item>
          <el-input
            v-model="formInline.file"
            style="width: 300px; margin-right: 20px"
@@ -134,55 +202,178 @@
            id="insertFile"
            multiple="multiple"
            style="display: none"
              @change="insertFile( )"
            @change="insertFile( )"
          />
          <el-link  @click="getInsertFile( )" :underline="false"
            ><i class="el-icon-folder-opened"></i
          ></el-link>
          <el-link
            @click="getInsertFile( )"
            :underline="false"
          ><i class="el-icon-folder-opened"></i></el-link>
        </el-form-item>
        <el-form-item>
          <el-row  >
            <el-col :span="3"> <el-link  class="elLink" :underline="false" @click="setAttachInsert" >{{$t('common.append')}}</i></el-link></el-col>
            <el-col :span="3">   <el-link  class="elLink" :underline="false" @click="setAttachDel" >{{$t('common.delete')}}</i></el-link></el-col>
          <el-row>
            <el-col :span="3">
              <el-link
                v-if="btnStatus.insert"
                class="elLink"
                :underline="false"
                @click="setAttachInsert"
              >{{$t('common.append')}}</el-link>
            </el-col>
            <el-col :span="3">
              <el-link
                v-if="btnStatus.delete"
                class="elLink"
                :underline="false"
                @click="setAttachDel"
              >{{$t('common.delete')}}</el-link>
            </el-col>
            <!-- <el-col :span="3">  <el-link  class="elLink" :underline="false" >{{$t('common.reset')}}</i></el-link></el-col> -->
          </el-row>
        </el-form-item>
        <el-form-item>
 <el-table
       :data="tableAttach"
          <el-table
            :data="tableAttach"
            ref="filterTable"
            height="99%"
            height="100%"
            border
            style="width: 100%"
            @selection-change="handleAttatchChange"
          >
                  <el-table-column type="selection" width="55" />
          <el-table-column width="60" type="index" :label="$t('common.index')" />
              <el-table-column  prop="date"
         :label="$t('common.fileNme')"
         />
            <el-table-column
              type="selection"
              width="55"
            />
            <el-table-column
              width="60"
              type="index"
              :label="$t('common.index')"
            />
            <el-table-column
              prop="date"
              :label="$t('common.fileNme')"
            />
      <el-table-column
        prop="name"
        :label="$t('common.filePath')"
        />
            <el-table-column
              prop="name"
              :label="$t('common.filePath')"
            />
           </el-table>
          </el-table>
        </el-form-item>
        <!-- <el-form-item>
          <el-row :gutter="20">
            <el-col
              :span="12"
              :offset="8"
            >
              <el-button
                type="primary"
                size="small"
                @click="dialogFormVisible = false"
              >确认</el-button>
              <el-button
                type="info"
                size="small"
                @click="dialogFormVisible = false"
              >取消</el-button>
            </el-col>
          </el-row>
        </el-form-item> -->
      </el-form>
    </div>
    </el-dialog>
    <el-dialog
       top="2vh"
      :visible.sync="conditionVisible"
      title="查询条件"
      :before-close="handleconditionClose"
    >
      <el-form
        :inline="true"
        :model="formSql"
        class="demo-form-inline"
        label-position="top"
      >
        <el-form-item>
          <el-select
            @change="fieldChange($event)"
            v-model="formSql.field"
            :popper-append-to-body="false"
          >
            <el-option
              v-for="item in filedsOption"
              :key="item.field"
              :label="item.alias"
              :value="item.field"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
<el-row :gutter="20">
  <el-col :span="12" :offset="8">  <el-button  class="primary" @click="dialogFormVisible = false">确认</el-button>  <el-button type="info"   @click="dialogFormVisible = false">取消</el-button></el-col>
</el-row>
          <el-select
            :popper-append-to-body="false"
            v-model="formSql.condition"
          >
            <el-option
              v-for="item in condOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item v-show="!fromSqlflag">
          <el-input v-model="formSql.value"></el-input>
        </el-form-item>
        <el-form-item v-show="fromSqlflag">
          <el-date-picker
            v-model="formSql.date"
            type="date"
            placeholder="选择日期"
            value-format="yyyy-MM-dd"
          >
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          size="small"
          @click="startFiledAndcondition"
        >取 消</el-button>
        <el-button
          class="primaries"
          size="small"
          @click="appendQueryFilter"
        >确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      :title=" $t('synthesis.rangequery')"
      :visible.sync="dialogMapVisible"
      width="90%"
      top="10vh"
      :before-close="handleMapClose"
    >
      <div style="height:700px">
        <map-sdk v-if='showMapVisible'></map-sdk>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import $ from 'jquery';
import MapSdk from "../../components/mapsdk.vue";
import $ from "jquery";
import { conditions } from "../Archive/Archive.js";
import {
  dataQuery_selectTabs,
  dataQuery_selectDomains,
@@ -191,38 +382,71 @@
  dataQuery_uploadFiles,
  dataQuery_selectFiles,
  dataQuery_deletes,
} from '../../api/api';
} from "../../api/api";
import { getToken } from "../../utils/auth.js";
import catalogueTree from '../../components/catalogueTree.vue';
import MyBread from '../../components/MyBread.vue';
import catalogueTree from "../../components/catalogueTree.vue";
import MyBread from "../../components/MyBread.vue";
export default {
  //import引入的组件需要注入到对象中才能使用
  name: 'dataSearch',
  components: { MyBread, catalogueTree },
  name: "dataSearch",
  components: { MyBread, catalogueTree, MapSdk },
  data() {
    return {
      attachtable: ['b_pac_geologic_hazard', 'b_hydrogeology', 'b_pac_meteorological', 'b_pac_marine_meteorological', 'b_pac_frozensoil', 's_borehole', 'm_marker', 'm_hydraulic_protection', 'm_equipment_nameplate'],
      attachtable: [
        "b_pac_geologic_hazard",
        "b_hydrogeology",
        "b_pac_meteorological",
        "b_pac_marine_meteorological",
        "b_pac_frozensoil",
        "s_borehole",
        "m_marker",
        "m_hydraulic_protection",
        "m_equipment_nameplate",
      ],
      formInline: {
        file: '',
        file: "",
      },
      formSql: {
        field: "",
        condition: "",
        value: "",
        type: "",
        date: "",
      },
      fromSqlflag: false,
      tree: [
        {
          tabDesc: '基础数据',
          tab: '基础数据',
          value: 'BD',
          tabDesc: "基础数据",
          label: "基础数据",
          value: "BD",
          ns: "bd",
          id: 1,
          children: [],
        },
        {
          tabDesc: '业务数据',
          tab: '业务数据',
          value: 'BS',
          id: 2,
          tabDesc: "业务数据",
          label: "业务数据",
          value: "BS",
          ns: "bs",
          children: [],
        },
        {
          id: 3,
          tabDesc: "元数据",
          label: "元数据",
          value: "MD",
          ns: "md",
          children: [],
        },
      ],
      tableAttach: [],
      filedsOption: [],
      condOption: [],
      defaultProps: {
        children: 'children',
        label: 'tab',
        children: "children",
        label: "label",
      },
      btnStatus: {
        select: false,
@@ -234,32 +458,31 @@
      },
      tableType: null,
      ruleForm: {
        name: null,
        fileName: "",
      },
      FBtest: false,
      tableData: [],
      formLabelWidth: '120px',
      formLabelWidth: "120px",
      dialogFormVisible: false,
      upform: {
        gid: '',
        pipename: '',
        sitename: '',
        type: '',
        seriesname: '',
        stationvalue: '',
        transportm: '',
        diameter: '',
        name: '',
        gid: "",
        pipename: "",
        sitename: "",
        type: "",
        seriesname: "",
        stationvalue: "",
        transportm: "",
        diameter: "",
        name: "",
      },
      changePag: true,
      showinfoBox: false,
      itemdetail: {},
      tableData: [],
      attributeData: [],
      currentPage: 1,
      searchName: '',
      searchName: "",
      multipleSelection: [],
      filedsLayer: null,
      count: 0,
@@ -272,6 +495,14 @@
      },
      getClickTable: null,
      attacgSelection: [],
      conditionVisible: false,
      dialogMapVisible: false,
      showMapVisible: false,
      upAttach: {
        tabName: null,
        eventid: null,
      },
      filterText: "",
    };
  },
  created() {
@@ -280,79 +511,126 @@
    this.showPermsBtn();
    this.getTreeDataAll();
  },
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val);
    },
  },
  methods: {
  async setAttachDel() {
       var std = [];
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    getSpaceMapVisibale() {
      this.dialogMapVisible = true;
      this.showMapVisible = true;
      this.$store.state.mapMenuBoolean = true;
      this.$store.state.mapMenuBoxFlag = "1";
      this.$store.state.mapPopBoolean = false;
      this.$store.state.mapPopBoxFlag = null;
      this.$store.state.download = true;
    },
    handleMapClose() {
      this.$confirm("确认关闭?")
        .then((_) => {
          this.closeMapDown();
        })
        .catch((_) => {});
    },
    closeMapDown() {
      this.dialogMapVisible = false;
      this.showMapVisible = false;
      this.$store.state.mapMenuBoolean = false;
      this.$store.state.mapMenuBoxFlag = null;
      this.$store.state.download = false;
      this.$store.state.mapPopBoolean = false;
      this.$store.state.mapPopBoxFlag = null;
    },
    async setAttachDel() {
      var std = [];
      for (var i in this.attacgSelection) {
        std.push(this.attacgSelection[i].id);
      }
      const res = await dataQuery_deletes({ ids: std.toString() });
      if(res.code != 200){
        this.$message.error('文件删除失败');
      if (res.code != 200) {
        this.$message.error("文件删除失败");
      }
       this.getAttacthFlieList();
      this.getAttacthFlieList();
    },
    setAttachInsert() {
      var token = getToken();
      var fs = document.getElementById("insertFile");
      if (fs.files.length == 0) {
        alert("请选择要上传的文件!");
        this.$message({
          message: "请选择要上传的文件!",
          type: "warning",
        });
        return;
      }
      const formData = new FormData()
      const formData = new FormData();
      for (var i = 0, c = fs.files.length; i < c; i++) {
        formData.append('file', fs.files[i]); // fs.files[i].name,file
        formData.append("file", fs.files[i]); // fs.files[i].name,file
      }
      $.ajax(BASE_URL + "/dataQuery/uploadFiles?token=" + token + "&tabName=lf.sys_style&eventid=fa25979a5ef8b43ba82a0be35b3fb0d4", {
        type: "post",
        data: formData,
        async: true,
        cache: false,
        processData: false,
        contentType: false,
        success: (rs) => {
          this.$message({
            message: '附件添加成功',
            type: 'success'
          });
          document.getElementById("insertFile").value = "";
          this.formInline = {
            file: '',
          }
          this.getAttacthFlieList();
        },
        error: (e) => {
          document.getElementById("insertFile").value = "";
          this.$message.error('附件添加失败');
      $.ajax(
        BASE_URL +
          "/dataQuery/uploadFiles?token=" +
          token +
          "&tabName= " +
          this.upAttach.tabName +
          "&eventid=" +
          this.upAttach.eventid,
        {
          type: "post",
          data: formData,
          async: true,
          cache: false,
          processData: false,
          contentType: false,
          success: (rs) => {
            this.$message({
              message: "附件添加成功",
              type: "success",
            });
            document.getElementById("insertFile").value = "";
            this.formInline = {
              file: "",
            };
            this.getAttacthFlieList();
          },
          error: (e) => {
            document.getElementById("insertFile").value = "";
            this.$message.error("附件添加失败");
          },
        }
      });
      );
    },
    async getAttacthFlieList() {
      var obj = {
        tabName: 'lf.sys_style',
        eventid: 'fa25979a5ef8b43ba82a0be35b3fb0d4'
      }
      var obj = this.upAttach;
      const res = await dataQuery_selectFiles(obj);
      if (res.code != 200) {
        this.$message.error('列表调用失败');
        return
        this.$message.error("列表调用失败");
        return;
      }
      this.tableAttach = res.result;
    },
    getAttachTable() {
    getAttachTable(index, row) {
      if (row.eventid != null) {
        this.upAttach.eventid = row.eventid;
      } else {
        this.upAttach.eventid = "";
      }
      this.getAttacthFlieList();
      this.dialogFormVisible = true;
    },
    //附件=>文件选择
    getInsertFile() {
      $('#insertFile').click();
      $("#insertFile").click();
    },
    insertFile() {
      var val = document.getElementById('insertFile').files;
      var val = document.getElementById("insertFile").files;
      if (!val || !val.length) return;
      this.formInline.file = val[0].name;
@@ -361,19 +639,29 @@
    async getTreeDataAll() {
      const data = await dataQuery_selectTabs();
      if (data.code != 200) {
        this.$message.error('列表调用失败');
        this.$message.error("列表调用失败");
      }
      var option = data.result;
      for (var i in option) {
        var val_Data = option[i];
        val_Data.id = '1' + i;
        if (option[i].ns == 'bd') {
          this.tree[0].children.push(val_Data);
        } else {
          this.tree[1].children.push(val_Data);
        val_Data.id = "1" + i;
        // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")"
        val_Data.label = val_Data.tabDesc;
        option[i].id = parseInt(option[i].id);
        for (var j in this.tree) {
          if (this.tree[j].ns == option[i].ns) {
            this.tree[j].children.push(val_Data);
          }
        }
        // if (option[i].ns == 'bd') {
        //   this.tree[0].children.push(val_Data);
        // } else {
        //   this.tree[1].children.push(val_Data);
        // }
      }
      this.handleNodeClick(this.tree[0].children[0]);
    },
    //授权管理
    showPermsBtn() {
@@ -382,7 +670,6 @@
      permsEntity
        .filter((item) => item.perms == currentPerms)
        .map((item) => {
          console.log(item);
          this.btnStatus[item.tag.substr(1)] = true;
        });
    },
@@ -392,7 +679,12 @@
      if (data.children != null) return;
      this.listData.name = data.entity; //要查询表格类型;
      this.getClickTable = data;
      this.listData.pageIndex = 1;
      this.listData.pageSize = 10;
      this.count = 0;
      this.upAttach.tabName = data.ns + "." + data.tab;
      this.filedsLayer = this.getCollapseDomFiled(); //获取每个表字段名称及阈值
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
@@ -401,15 +693,15 @@
      res.then((val) => {
        this.attributeData = val;
      });
      if (this.ruleForm.name != null) {
        this.listData.filter = 'name like ' + this.ruleForm.name;
      if (this.ruleForm.fileName != "") {
        this.listData.filter = this.ruleForm.fileName;
      } else {
        this.listData.filter = null;
      }
      const data = await dataQuery_selectByPage(this.listData);
      if (data.code != 200) {
        this.$message.error('调用列表失败,请联系工作人员!');
        this.$message.error("调用列表失败,请联系工作人员!");
        return;
      }
      var res_val = this.attributeData;
@@ -423,7 +715,9 @@
          }
        }
      }
      this.tableData = data.result;
      this.$refs.filterTable.doLayout();
    },
    //获取每个表字段名称及阈值
    async getCollapseDomFiled() {
@@ -432,7 +726,7 @@
        name: this.listData.name,
      });
      if (fileds.code != 200) {
        this.$message.error('调用列表失败,请联系工作人员!');
        this.$message.error("调用列表失败,请联系工作人员!");
        return;
      }
@@ -441,13 +735,16 @@
        name: this.listData.name,
      });
      if (domains.code != 200) {
        this.$message.error('调用列表失败,请联系工作人员!');
        this.$message.error("调用列表失败,请联系工作人员!");
        return;
      }
      var data1 = fileds.result;
      var data2 = domains.result;
      var std = [];
      for (var i in data1) {
        if (data1[i].type != "geomtry" && data1[i].type != "null") {
          this.filedsOption.push(data1[i]);
        }
        if (data1[i].showtype == 1) {
          if (data1[i].domainNa != null) {
            data1[i].domainNa = this.getDomainNaFild(data1[i].domainNa, data2);
@@ -455,8 +752,99 @@
          std.push(data1[i]);
        }
      }
      this.startFiledAndcondition();
      return std;
    },
    startFiledAndcondition() {
      this.conditionVisible = false;
      this.conditionChange(this.filedsOption[0]);
      this.formSql.value = "";
      this.formSql.date = new Date();
    },
    handleconditionClose() {
      this.$confirm("确认关闭?")
        .then((_) => {
          this.startFiledAndcondition();
        })
        .catch((_) => {});
    },
    fieldChange(value) {
      var obj = {};
      obj = this.filedsOption.find(function (item) {
        return item.field === value;
      });
      this.conditionChange(obj);
    },
    conditionChange(res) {
      this.formSql.field = res.field;
      this.formSql.type = res.type;
      if (res.type == "date" || res.type == "datetime") {
        this.fromSqlflag = true;
      } else {
        this.fromSqlflag = false;
      }
      var std = [];
      this.condOption = [];
      if (res.type == "text" || res.type == "blob") {
        std = conditions[0];
      } else if (res.type == "date" || res.type == "datetime") {
        std = conditions[2];
      } else {
        std = conditions[1];
      }
      for (var i in std) {
        this.condOption.push({
          label: std[i],
          value: std[i],
        });
      }
      this.formSql.condition = this.condOption[0].value;
    },
    appendQueryFilter() {
      if (this.formSql.type == "date" || this.formSql.type == "datetime") {
        if (this.formSql.date == null) {
          this.$message.error("请输入要查询的信息!");
          return;
        }
      } else {
        if (this.formSql.value == "") {
          this.$message.error("请输入要查询的信息!");
          return;
        }
      }
      if (this.ruleForm.fileName != "") {
        this.ruleForm.fileName += " and ";
      }
      var val;
      if (this.formSql.type == "long" || this.formSql.type == "integer") {
        val = parseInt(this.formSql.value);
      } else if (this.formSql.type == "double") {
        if (this.formSql.value.indexOf(".") != -1) {
          val = this.formSql.value;
        } else {
          val = parseFloat(this.formSql.value).toFixed(1);
        }
      } else if (
        this.formSql.type == "date" ||
        this.formSql.type == "datetime"
      ) {
        var time = new Date(this.formSql.date);
        var m = time.getMonth() + 1;
        var d = time.getDate();
        var y = time.getFullYear();
        val = "'" + y + "-" + this.add0(m) + "-" + this.add0(d) + "'";
      } else {
        val = "'" + this.formSql.value + "'";
      }
      this.ruleForm.fileName +=
        this.formSql.field + " " + this.formSql.condition + " " + val;
      this.startFiledAndcondition();
    },
    //值域字段匹配
    getDomainNaFild(res, result) {
      for (var i in result) {
@@ -513,20 +901,21 @@
    },
    //分页点击事件
    handleSizeChange(val) {
      this.listdata.pageSize = val;
      this.listdata.pageIndex = 1;
      this.listData.pageSize = val;
      this.listData.pageIndex = 1;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    handleCurrentChange(val) {
      this.listdata.pageIndex = val;
      this.listData.pageIndex = val;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    // 重置查询
    resetForm(formName) {
      this.searchName = '';
      this.$refs[formName].resetFields();
    resetForm() {
      this.ruleForm.fileName = "";
      this.listData.pageIndex = 1;
      this.listData.pageSize = 10;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
@@ -542,9 +931,9 @@
      //     .then(() => {
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)',
        text: "Loading",
        spinner: "el-icon-loading",
        background: "rgba(0, 0, 0, 0.7)",
      });
      setTimeout(() => {
        loading.close();
@@ -583,15 +972,15 @@
    // 提交修改
    updateForm() {
      let params = {};
      this.$confirm('是否确定编辑?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      this.$confirm("是否确定编辑?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.dialogFormVisible = false;
          switch (this.tableType) {
            case '场站点':
            case "场站点":
              params = {
                gid: this.upform.gid,
                pipename: this.upform.pipename,
@@ -601,15 +990,15 @@
              UpdateSitePoint(params).then((res) => {
                if (res.data == 1) {
                  this.$message({
                    message: '修改成功',
                    type: 'success',
                    message: "修改成功",
                    type: "success",
                  });
                }
                this.getSPData(10, 1, '');
                this.getSPCount('');
                this.getSPData(10, 1, "");
                this.getSPCount("");
              });
              break;
            case '管道中心线':
            case "管道中心线":
              params = {
                gid: this.upform.gid,
                pipename: this.upform.pipename,
@@ -621,15 +1010,15 @@
              UpdateStationSeries(params).then((res) => {
                if (res.data == 1) {
                  this.$message({
                    message: '修改成功',
                    type: 'success',
                    message: "修改成功",
                    type: "success",
                  });
                }
                this.getSSData(10, 1, '');
                this.getSSCount('');
                this.getSSData(10, 1, "");
                this.getSSCount("");
              });
              break;
            case '标桩':
            case "标桩":
              params = {
                gid: this.upform.gid,
                pipename: this.upform.pipename,
@@ -639,12 +1028,12 @@
              UpdatgeMarker(params).then((res) => {
                if (res.data == 1) {
                  this.$message({
                    message: '修改成功',
                    type: 'success',
                    message: "修改成功",
                    type: "success",
                  });
                }
                this.getMData(10, 1, '');
                this.getMCount('');
                this.getMData(10, 1, "");
                this.getMCount("");
              });
              break;
          }
@@ -659,7 +1048,7 @@
          //   this.getMetaCount("");
          // });
        })
        .catch(() => { });
        .catch(() => {});
    },
    // 获取多选选中的对象
    handleSelectionChange(val) {
@@ -674,47 +1063,47 @@
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].gid);
      }
      this.$confirm('确定是否删除所选内容?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      this.$confirm("确定是否删除所选内容?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          switch (this.tableType) {
            case '场站点':
            case "场站点":
              dltSitePoint(std).then((res) => {
                if (res.data !== 0) {
                  this.$message({
                    message: '删除成功',
                    type: 'success',
                    message: "删除成功",
                    type: "success",
                  });
                }
                this.getSPData(10, 1, '');
                this.getSPCount('');
                this.getSPData(10, 1, "");
                this.getSPCount("");
              });
              break;
            case '管道中心线':
            case "管道中心线":
              dltStationSeries(std).then((res) => {
                if (res.data !== 0) {
                  this.$message({
                    message: '删除成功',
                    type: 'success',
                    message: "删除成功",
                    type: "success",
                  });
                }
                this.getSSData(10, 1, '');
                this.getSSCount('');
                this.getSSData(10, 1, "");
                this.getSSCount("");
              });
              break;
            case '标桩':
            case "标桩":
              dltMarker(std).then((res) => {
                if (res.data !== 0) {
                  this.$message({
                    message: '删除成功',
                    type: 'success',
                    message: "删除成功",
                    type: "success",
                  });
                }
                this.getMData(10, 1, '');
                this.getMCount('');
                this.getMData(10, 1, "");
                this.getMCount("");
              });
              break;
          }
@@ -727,7 +1116,7 @@
          //   });
          // });
        })
        .catch(() => { });
        .catch(() => {});
    },
  },
};
@@ -735,194 +1124,47 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.Spatialbox {
  height: 81%;
  width: 97%;
  position: absolute;
  box-sizing: border-box;
  height: 98%;
  width: 98%;
  padding: 1%;
  .spatialContent {
    width: 100%;
    height: 92%;
    height: calc(100% - 75px);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    .spatial_leftTree {
      width: 15%;
      height: 95%;
      border: 1px solid white;
      width: calc(23% - 0px);
      height: 100%;
      padding: 10px;
      border-radius: 5px;
      padding: 1%;
      max-height: 670px;
      box-sizing: border-box;
      overflow-y: auto;
    }
    .spatial_rightContent {
      width: 80%;
      height: 95%;
      border: 1px solid white;
    .contentshuju {
      width: 75%;
      height: 100%;
      border-radius: 5px;
      padding: 1%;
      overflow-y: auto;
      padding: 0px;
      box-sizing: border-box;
      border: 1px solid #dcdfe6;
    }
  }
  .primary {
    background: #409eff;
    border: #409eff;
    color: white;
  }
  .eldivider {
    margin-top: 0px;
  }
  /deep/.el-form-item__label {
    color: white;
  }
  // 设置输入框的背景色、字体颜色、边框属性设置;
  /deep/.el-input__inner {
    background-color: transparent !important ;
    color: #fff;
    border: 1px solid;
  }
  /*修改table 表体的背景颜色和文字颜色*/
  /deep/ .el-table {
    background-color: transparent;
}
    th,
    td {
      background-color: transparent;
    }
    .el-table__expanded-cell {
      background-color: transparent !important;
    }
    // 表头背景色
    th.el-table__cell {
      background-color: #303030;
      color: #fff;
    }
    tr > td {
      background-color: #303030;
      color: #fff;
    }
.table_box2 {
  border-radius: 5px;
  padding: 10px;
  box-sizing: border-box;
}
    // hover效果
    tr:hover > td {
      background-color: rgba(255, 255, 255, 0.3) !important;
    }
    tbody tr:hover {
      background-color: rgba(255, 255, 255, 0.3) !important;
      // text-align: center;
    }
    // 滚动条宽高
    .el-table__body-wrapper::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    .el-table__body-wrapper::-webkit-scrollbar {
      width: 5px;
      /*滚动条宽度*/
      height: 5px;
      /*滚动条高度*/
    }
    /*定义滚动条轨道 内阴影+圆角*/
    .el-table__body-wrapper::-webkit-scrollbar-track {
      box-shadow: 0px 1px 3px #216fe6 inset;
      /*滚动条的背景区域的内阴影*/
      border-radius: 10px;
    }
    /*定义滑块 内阴影+圆角*/
    .el-table__body-wrapper::-webkit-scrollbar-thumb {
      box-shadow: 0px 1px 3px #216fe6 inset;
      border-radius: 6px;
      background-color: #216fe6;
    }
  }
  .infoBox {
    width: 500px;
    position: absolute;
    z-index: 100;
    top: 15%;
    right: 15%;
    background-color: #303030;
    color: white;
    .el-card {
      background-color: transparent;
      color: white;
      span {
        font-size: 16px;
        font-weight: 600;
        color: white;
      }
    }
    .contentBox {
      margin: 0 aotu 10px;
      p {
        color: white;
        font-size: 14px;
      }
    }
  }
  .pagination_box {
    margin-top: 20px;
    /deep/.el-input__inner {
      background-color: transparent !important;
      border: 1px solid;
      color: white;
    }
    /deep/.el-pagination__total {
      color: white;
    }
    /deep/.el-pagination__jump {
      color: white;
    }
    /deep/.el-pager li.active {
      color: #409eff;
    }
    /deep/.el-pager li {
      color: white;
      background: transparent;
    }
    /deep/.el-pager li {
      color: white;
    }
    /deep/.btn-prev {
      background: transparent;
    }
    /deep/.btn-next {
      background: transparent;
    }
    /deep/.btn-next i {
      color: white;
    }
    /deep/.btn-prev i {
      color: white;
    }
  }
  .elLink {
    color: white !important;
  }
  .el-icon-folder-opened {
    color: white;
  }
  /deep/ .el-select .el-input__inner {
    border-color: #fff !important;
  }
  /deep/ .el-dialog {
    background: #303030;
  }
  /deep/.el-range-editor.is-active,
  .el-range-editor.is-active:hover,
  .el-select .el-input.is-focus .el-input__inner {
    border: 1px solid;
  }
  /deep/.el-dialog__title {
    color: white;
.contentshujutou {
  padding: 8px;
  // margin-top: 10px;
  border-radius: 5px;
  .el-form-item {
    margin: 5px;
  }
}
</style>