管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-07 6c086fae275e7f3579654e374cadb85e7e054949
src/views/datamanage/SpatialData.vue
@@ -5,19 +5,24 @@
        `${$t('dataManage.dataRetrieval')}`,
      ]"></My-bread>
    <el-divider />
    <div class="spatialContent">
      <div class="spatial_leftTree">
        <el-tree
          ref="treeDay"
          :data="tree"
          :props="defaultProps"
          :default-expanded-keys="[1]"
          node-key="id"
          :current-node-key="10"
          @node-click="handleNodeClick"
        ></el-tree>
    <div class="spatialContent ">
      <div class="spatial_leftTree subpage_Div">
        <el-input v-model="filterText"></el-input>
        <div style="width:300px">
          <el-tree
            :data="tree"
            :props="defaultProps"
            :default-expanded-keys="[1]"
            node-key="id"
            :current-node-key="10"
            @node-click="handleNodeClick"
            :filter-node-method="filterNode"
            ref="tree"
          ></el-tree>
        </div>
      </div>
      <div class="spatial_rightContent">
      <div class="spatial_rightContent subpage_Div">
        <el-form
          ref="ruleForm"
          :model="ruleForm"
@@ -33,46 +38,51 @@
              :rows="2"
              resize='none'
              disabled
              style="width: 650px;"
              style="width: 545px;"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button
              v-if="btnStatus.insert"
              @click="conditionVisible = true"
              class="primaries"
              size="small"
              icon="el-icon-plus"
              type="success"
            >{{$t('common.append')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              @click="submitForm"
              class="primaries"
              type="primary"
              size="small"
              icon="el-icon-search"
            >{{$t('common.iquery')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              @click="resetForm"
              size="small"
              icon="el-icon-refresh"
              type="info"
            >{{$t('common.reset')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              @click="getSpaceMapVisibale"
              class="primaries"
              size="small"
              type="primary"
            >{{
              $t('synthesis.rangequery')
            }}</el-button>
          </el-form-item>
        </el-form>
        <el-divider class="eldivider" />
        <div style="height=500px">
        <div>
          <el-table
            ref="filterTable"
            :data="tableData"
            height="500px"
            border
            style="width: 100%"
            style="width: 100% "
            @selection-change="handleSelectionChange"
          >
            <el-table-column
@@ -81,6 +91,7 @@
            />
            <el-table-column
              width="60"
              align="center"
              type="index"
              :label="$t('common.index')"
            />
@@ -93,7 +104,7 @@
              align="center"
            ></el-table-column>
            <el-table-column
              min-width="80"
              min-width="120"
              :label="$t('common.operate')"
            >
              <template slot-scope="scope">
@@ -129,34 +140,36 @@
      </div>
    </div>
    <div
      class="infoBox"
      class="infoBox box_div"
      v-show="showinfoBox"
    >
      <el-card class="box-card">
      <div
        slot="header"
        class="clearfix"
      >
        <span>{{$t('common.details')}}</span>
        <div
          slot="header"
          class="clearfix"
          style="float: right; cursor: pointer"
          @click="closeDetial"
        >
          <span>{{$t('common.details')}}</span>
          <div
            style="float: right; cursor: pointer"
            @click="closeDetial"
          >
            <i class="el-icon-close"></i>
          </div>
          <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>
        <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>
    <el-dialog
      :title="$t('common.attachinform')"
@@ -191,6 +204,7 @@
          <el-row>
            <el-col :span="3">
              <el-link
                v-if="btnStatus.insert"
                class="elLink"
                :underline="false"
                @click="setAttachInsert"
@@ -198,6 +212,7 @@
            </el-col>
            <el-col :span="3">
              <el-link
                v-if="btnStatus.delete"
                class="elLink"
                :underline="false"
                @click="setAttachDel"
@@ -245,10 +260,12 @@
            >
              <el-button
                class="primary"
                size="small"
                @click="dialogFormVisible = false"
              >确认</el-button>
              <el-button
                type="info"
                size="small"
                @click="dialogFormVisible = false"
              >取消</el-button>
            </el-col>
@@ -311,9 +328,13 @@
        slot="footer"
        class="dialog-footer"
      >
        <el-button @click="startFiledAndcondition">取 消</el-button>
        <el-button
          size="small"
          @click="startFiledAndcondition"
        >取 消</el-button>
        <el-button
          class="primaries"
          size="small"
          @click="appendQueryFilter"
        >确 定</el-button>
      </span>
@@ -371,6 +392,7 @@
          tabDesc: '基础数据',
          label: '基础数据',
          value: 'BD',
          ns: 'bd',
          id: 1,
          children: [],
        },
@@ -379,6 +401,14 @@
          tabDesc: '业务数据',
          label: '业务数据',
          value: 'BS',
          ns: 'bs',
          children: [],
        }, {
          id: 3,
          tabDesc: '元数据',
          label: '元数据',
          value: 'MD',
          ns: 'md',
          children: [],
        },
      ],
@@ -443,7 +473,8 @@
      upAttach: {
        tabName: null,
        eventid: null,
      }
      },
      filterText: ''
    };
  },
@@ -453,8 +484,17 @@
    this.showPermsBtn();
    this.getTreeDataAll();
  },
  methods: {
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val);
    }
  },
  methods: {
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    getSpaceMapVisibale() {
      this.dialogMapVisible = true;
      this.showMapVisible = true;
@@ -496,7 +536,11 @@
      var token = getToken();
      var fs = document.getElementById("insertFile");
      if (fs.files.length == 0) {
        alert("请选择要上传的文件!");
        this.$message({
          message: '请选择要上传的文件!',
          type: 'warning'
        });
        return;
      }
      const formData = new FormData()
@@ -570,14 +614,20 @@
      for (var i in option) {
        var val_Data = option[i];
        val_Data.id = '1' + i;
        val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")"
        // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")"
        val_Data.label = val_Data.tabDesc
        option[i].id = parseInt(option[i].id)
        if (option[i].ns == 'bd') {
          this.tree[0].children.push(val_Data);
        } else {
          this.tree[1].children.push(val_Data);
        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])
    },
@@ -588,7 +638,7 @@
      permsEntity
        .filter((item) => item.perms == currentPerms)
        .map((item) => {
          console.log(item);
          this.btnStatus[item.tag.substr(1)] = true;
        });
    },
@@ -740,7 +790,6 @@
      var val;
      if (this.formSql.type == "long" || this.formSql.type == "integer") {
        val = parseInt(this.formSql.value);
      } else if (this.formSql.type == 'double') {
@@ -1049,221 +1098,31 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.Spatialbox {
  height: 81%;
  width: 97%;
  position: absolute;
  height: 98%;
  width: 98%;
  box-sizing: border-box;
  padding: 1%;
  .spatialContent {
    width: 100%;
    height: 92%;
    display: flex;
    justify-content: space-between;
    .spatial_leftTree {
      width: 15%;
      height: 95%;
      border: 1px solid white;
      width: calc(15% - 0px);
      height: 91%;
      border-radius: 5px;
      padding: 1%;
      max-height: 670px;
      overflow: auto;
    }
    .spatial_rightContent {
      width: 80%;
      height: 95%;
      border: 1px solid white;
      height: 91%;
      border-radius: 5px;
      padding: 1%;
      overflow-y: auto;
    }
  }
  .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;
    }
    // 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;
  }
  /deep/.el-textarea__inner {
    background: transparent !important;
    border-color: #fff !important;
    color: white;
  }
}
/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;
}
/deep/ .el-dialog__body {
  padding: 10px;
}
/deep/.el-input__inner {
  background-color: transparent !important ;
  color: #fff;
  border: 1px solid white !important;
}
/deep/.el-dialog__wrapper {
  overflow: hidden !important;
}
</style>