lxl
2022-11-07 c6a9b11ff0783bcd81a043a179fbc27f685eee70
菜单
已添加1个文件
已修改11个文件
1255 ■■■■ 文件已修改
public/index.html 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/en.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/zh.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/navMenu.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Synthesis/index.vue 245 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Synthesis/plotting.vue 324 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/domainManage.vue 601 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/metadataManage.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/menuSettings.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/userManage/userInfoManage.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html
@@ -7,16 +7,13 @@
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <title>
  </title>
  <script src="./SmartEarthSDK/Workers/polyfill.min.js"></script>
  <script src="./SmartEarthSDK/Cesium/Cesium.js"></script>
  <script src="./SmartEarthSDK/SmartEarth.min.js"></script>
  <script src="./SmartEarthSDK/Workers/TreeTool.js"></script>
  <script src="./config/config.js"></script>
  <script src="./config/rsa.min.js"></script>
  <link rel="stylesheet" href="./SmartEarthSDK/Workers/css/smartearth.css">
  <link rel="stylesheet" href="./SmartEarthSDK/Workers/layui/css/layui.css">
  <style>
    .esriControlsBR {
      display: none;
    }
    .ol-overlaycontainer-stopevent {
      display: none;
    }
@@ -24,6 +21,14 @@
</head>
<body>
  <script src="./SmartEarthSDK/Workers/polyfill.min.js"></script>
  <script src="./SmartEarthSDK/Cesium/Cesium.js"></script>
  <script src="./SmartEarthSDK/SmartEarth.min.js"></script>
  <script src="./SmartEarthSDK/Workers/TreeTool.js"></script>
  <script src="./SmartEarthSDK/Workers/layui/layui.js"></script>
  <script src="./config/config.js"></script>
  <script src="./config/rsa.min.js"></script>
  <div id="app"></div>
</body>
src/api/api.js
@@ -198,6 +198,10 @@
export function queryMenuTree() {
  return request.get('/perms/selectMenus');
}
// //请求编辑菜单栏数据
export function queryMenuAll() {
  return request.get('/menu/selectMenuAll');
}
//菜单递归查询数据
export function selectMenuRecursive(params) {
  return request.get('/menu/selectMenuRecursive', { params: params });
@@ -527,3 +531,18 @@
export function getPerms() {
  return request.get('perms/selectPermsEntity');
}
// æŸ¥è¯¢å€¼åŸŸè¡¨ç»“构树
export function getDomainTabs() {
  return request.get('domain/selectTabs');
}
//分页查询
export function getSingleTab(params) {
  return request.get('domain/selectByPageAndCount', { params: params });
}
export function updateDomain(params) {
  return service.post('domain/update', params);
}
export function insertDomain(params) {
  return service.post('domain/insert', params);
}
src/assets/lang/en.js
@@ -78,6 +78,17 @@
      modifySuccessfully: 'modify successfully',
      tipsUp: 'Are you sure to save the changes?',
    },
    domainManage: {
      index:'index',
      bak: "bak",
      bsm: "bsm",
      codeDesc: "codeDesc",
      domCode: "domCode",
      domDesc: "domDesc",
      domName: "domName",
      level: "level",
      orderid: "orderid",
    },
    styleManage: 'Style Manage',
    styleObj: {
      index: 'Index',
@@ -350,6 +361,8 @@
    flatterrain: 'Flat Terrain',
    terrainexcavation: 'Terrain Excavation',
    removepaint: 'Remove Paint',
    openFile: 'open File',
    saveFile: 'save File',
    synthobj: {
      m1: 'Horizontal distance',
      m2: 'Spatial distance',
src/assets/lang/zh.js
@@ -78,6 +78,18 @@
      modifySuccessfully: '修改成功',
      tipsUp: '是否确定保存修改内容?',
    },
    domainManage: {
      index: '序号',
      bak: "备注",
      bsm: "标识码",
      codeDesc: "编码描述",
      domCode: "编码",
      domDesc: "值域表描述",
      domName: "值域表名",
      level: "层级",
      orderid: "序号",
    },
    styleManage: '样式管理',
    styleObj: {
      index: '序号',
@@ -348,6 +360,8 @@
    flatterrain: '地形平整',
    terrainexcavation: '地形开挖',
    removepaint: '清除绘制',
    openFile: '打开',
    saveFile: '保存',
    synthobj: {
      m1: '水平距离',
      m2: '空间距离',
src/components/navMenu.vue
@@ -128,7 +128,7 @@
      })
        .then(async () => {
          const data = await logout({ token: getToken() });
          console.log(data);
          // console.log(data);
          if (data.code != 200) {
            return this.$message.error('退出登录失败');
          }
src/router/index.js
@@ -27,6 +27,7 @@
import SpatialData from '../views/datamanage/SpatialData.vue'; //数据管理-空间数据
import versionManage from '../views/datamanage/versionManage.vue'; //数据管理-版本管理
import dictionaryManage from '../views/datamanage/dictionaryManage.vue'; //数据管理-字典管理
import domainManage from '../views/datamanage/domainManage.vue'; //数据管理-值域管理
import styleManage from '../views/datamanage/styleManage.vue'; //数据管理-样式管理
import addStyle from '../views/datamanage/addStyle.vue'; //数据管理-样式管理-添加样式
@@ -157,6 +158,15 @@
        },
      },
      {
        path: '/domainManage',
        component: domainManage,
        name: 'domainManage',
        meta: {
          title: '值域管理',
          requireAuth: true, // æ ‡è¯†è¯¥è·¯ç”±æ˜¯å¦éœ€è¦ç™»å½•
        },
      },
      {
        path: '/styleManage',
        component: styleManage,
        name: 'styleManage',
src/views/Synthesis/index.vue
@@ -23,26 +23,44 @@
        <measurement />
      </el-tab-pane>
      <el-tab-pane v-if="menuStatus.menu8" :label="$t('synthesis.plotting')">
        <plotting />
        <plotting @drawing="showBtn" />
      </el-tab-pane>
    </el-tabs>
    <el-card class="box-card">
      <map-div></map-div>
    </el-card>
    <div class="plotBox">
      <el-collapse-transition>
        <div class="transition-box" v-show="showBtnBox">
          <ul>
            <li
              @click="changePlot(item)"
              v-for="item in itemsOne"
              :key="item.id"
            >
              <div class="divli">
                <div :class="item.class" class="backimge8"></div>
              </div>
              <div class="div_li">{{ $t(item.name) }}</div>
            </li>
          </ul>
        </div>
      </el-collapse-transition>
    </div>
  </div>
</template>
<script>
import coverage from './coverage.vue'; //图层
import viewport from './viewport.vue'; //视图
import wander from './wander.vue'; //漫游
import analyse from './analyse.vue'; //分析
import iqyery from './inquire.vue'; //查询
import orientation from './orientation.vue'; //定位
import measurement from './measurement.vue'; //测量
import plotting from './plotting.vue'; //标绘
import MapDiv from '../../components/MapDiv';
import { getPerms } from '../../api/api';
import coverage from "./coverage.vue"; //图层
import viewport from "./viewport.vue"; //视图
import wander from "./wander.vue"; //漫游
import analyse from "./analyse.vue"; //分析
import iqyery from "./inquire.vue"; //查询
import orientation from "./orientation.vue"; //定位
import measurement from "./measurement.vue"; //测量
import plotting from "./plotting.vue"; //标绘
import MapDiv from "../../components/MapDiv";
import { getPerms } from "../../api/api";
export default {
  components: {
    coverage,
@@ -57,6 +75,59 @@
  },
  data() {
    return {
      showBtnBox: false,
      itemsOne: [
        {
          id: "1",
          name: "synthesis.point",
          class: "h1",
        },
        {
          id: "2",
          name: "synthesis.line",
          class: "h2",
        },
        // {
        //   id: "3",
        //   name: "synthesis.rectangle",
        //   class: "h3",
        // },
        {
          id: "4",
          name: "synthesis.polygon",
          class: "h4",
        },
        // {
        //   id: "7",
        //   name: "synthesis.symboliclabel",
        //   class: "h7",
        // },
        // {
        //   id: "5",
        //   name: "synthesis.flatterrain",
        //   class: "h5",
        // },
        // {
        //   id: "6",
        //   name: "synthesis.terrainexcavation",
        //   class: "h6",
        // },
        {
          id: "8",
          name: "synthesis.removepaint",
          class: "h8",
        },
        // {
        //   id: "9",
        //   name: "synthesis.openFile",
        //   class: "h6",
        // },
        // {
        //   id: "10",
        //   name: "synthesis.saveFile",
        //   class: "h8",
        // },
      ],
      iframeSrc: null,
      messageName: null,
      permsId: null,
@@ -73,14 +144,88 @@
    };
  },
  watch: {},
  created() {},
  methods: {
    showBtn() {
      this.showBtnBox = !this.showBtnBox;
    },
    changePlot(res) {
      sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
      switch (res.id) {
        case "1":
          sgworld.Creator.createSimpleGraphic(
            "point",
            {},
            function (entity) {}
          );
          break;
        case "2":
          sgworld.Creator.createSimpleGraphic(
            "polyline",
            {},
            function (entity) {}
          );
          break;
        case "3":
          sgworld.Creator.createSimpleGraphic(
            "rectangle",
            {},
            function (entity) {}
          );
          break;
        case "4":
          sgworld.Creator.createSimpleGraphic(
            "polygon",
            {},
            function (entity) {}
          );
          break;
        case "6":
          if (window.Excavation) {
            window.Excavation.clear();
            window.Excavation = null;
          } else {
            this.$refs.terrainDig.open();
          }
          break;
        case "5":
          if (window.TerrainFlattening) {
            window.TerrainFlattening.remove();
            window.TerrainFlattening = null;
          } else {
            this.$refs.modelPress.open();
          }
          break;
        case "7":
          sgworld.Creator.createModelLibrary();
          break;
        case "8":
          this.clearAll();
          break;
        case "10":
          break;
      }
    },
    clearAll() {
      sgworld.Creator.SimpleGraphic.clear();
      if (window.Excavation) {
        window.Excavation.clear();
        window.Excavation = null;
      }
      if (window.TerrainFlattening) {
        window.TerrainFlattening.remove();
        window.TerrainFlattening = null;
      }
    },
    tepostmessage(res) {
      const msg = {
        message: 'changeTool',
        message: "changeTool",
        data: res,
      };
      document
        .getElementById('sunIframe')
        .getElementById("sunIframe")
        .contentWindow.postMessage(msg, this.iframeSrc);
    },
    showMenuChange(res, result) {
@@ -94,28 +239,28 @@
    },
    showMenuStatus(res) {
      switch (res.cnName) {
        case '图层':
        case "图层":
          this.menuStatus.menu1 = true;
          break;
        case '视图':
        case "视图":
          this.menuStatus.menu2 = true;
          break;
        case '漫游':
        case "漫游":
          this.menuStatus.menu3 = true;
          break;
        case '分析':
        case "分析":
          this.menuStatus.menu4 = true;
          break;
        case '查询':
        case "查询":
          this.menuStatus.menu5 = true;
          break;
        case '定位':
        case "定位":
          this.menuStatus.menu6 = true;
          break;
        case '测量':
        case "测量":
          this.menuStatus.menu7 = true;
          break;
        case '标绘':
        case "标绘":
          this.menuStatus.menu8 = true;
          break;
      }
@@ -125,7 +270,7 @@
      if (this.$store.state.currentPerms) {
        val = this.$store.state.currentPerms;
      } else {
        val = '/comprehensive';
        val = "/comprehensive";
      }
      var permsEntity = this.$store.state.permsEntity;
@@ -149,7 +294,7 @@
  },
  mounted() {
    //this.messageName = this.$store.state.teNmme;
    this.$bus.$on('changetool', (e) => {
    this.$bus.$on("changetool", (e) => {
      this.tepostmessage(e);
    });
  },
@@ -161,7 +306,7 @@
</script>
<style>
.el-card {
.synthesis .el-card {
  border: transparent !important;
}
.synthesis {
@@ -190,13 +335,14 @@
}
.synthesis .box-card {
  height: 88%;
  position: relative;
  border-radius: 0px;
}
.synthesis .el-card .el-card__body {
  padding: 0px;
}
.cardbox {
.synthesis .cardbox {
  width: 98%;
  height: 86%;
  position: absolute;
@@ -205,4 +351,53 @@
  border: transparent;
  background: transparent;
}
.synthesis .divli {
  width: 100%;
  height: 50%;
  position: relative;
}
.synthesis li {
  list-style: none;
  float: left;
  height: 60px;
  text-align: center;
  margin: 2px;
  position: relative;
  cursor: pointer;
  margin-top: 5px;
}
.synthesis .backimge8 {
  width: 30px;
  height: 30px;
  position: absolute;
  background-size: 100% 100%;
  margin: 0% 30%;
}
.synthesis .plotBox {
  width: 160px;
  /* height:; */
  position: absolute;
  top: 115px;
  left: 5px;
  background-color: #596882;
}
.synthesis .plotBox .transition-box ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  border-radius: 4px;
  text-align: center;
  color: #fff;
  /* background-color: #bfa; */
  box-sizing: border-box;
}
.synthesis .plotBox .transition-box li {
  margin: 5px;
  width: 46%;
  margin-left: 0;
  /* background-color: #fff; */
  justify-content: space-between;
}
</style>
src/views/Synthesis/plotting.vue
@@ -1,41 +1,47 @@
<template>
  <div class="box">
    <div class="tooltip"></div>
    <input type="file" accept=".kml" class="file" style="display: none" />
    <ul>
      <li
        style="margin-left: 20px"
        @click="changePlot(item)"
        v-for="item in itemsOne"
      >
      <li style="margin-left: 20px" @click="drawing">
        <div class="divli">
          <div :class="item.class" class="backimge8"></div>
          <div class="backimge8 h1"></div>
        </div>
        <div class="div_li">{{ $t(item.name) }}</div>
        <div class="div_li">标绘</div>
      </li>
      <li v-if="plotStatus.delete" style="margin-left: 20px">
      <li style="margin-left: 20px" id="open">
        <div class="divli">
          <div class="backimge8"><i class="el-icon-delete"></i></div>
          <div class="backimge8 h1"></div>
        </div>
        <div class="div_li">删除</div>
        <div class="div_li">打开json</div>
      </li>
      <li v-if="plotStatus.upload" style="margin-left: 20px">
      <li style="margin-left: 20px" @click="save">
        <div class="divli">
          <div class="backimge8"><i class="el-icon-upload2"></i></div>
          <div class="backimge8 h1"></div>
        </div>
        <div class="div_li">上传</div>
        <div class="div_li">保存json</div>
      </li>
      <li v-if="plotStatus.upload" style="margin-left: 20px">
      <li style="margin-left: 20px" @click="kmlopen">
        <div class="divli">
          <div class="backimge8"><i class="el-icon-plus"></i></div>
          <div class="backimge8 h1"></div>
        </div>
        <div class="div_li">新增</div>
        <div class="div_li">原生kml</div>
      </li>
      <li v-if="plotStatus.upload" style="margin-left: 20px">
      <li style="margin-left: 20px" @click="handleOpenClick">
        <div class="divli">
          <div class="backimge8"><i class="el-icon-edit"></i></div>
          <div class="backimge8 h1"></div>
        </div>
        <div class="div_li">修改</div>
        <div class="div_li">导入KML文件</div>
      </li>
      <li style="margin-left: 20px" @click="handleSaveClick">
        <div class="divli">
          <div class="backimge8 h1"></div>
        </div>
        <div class="div_li">导出KML文件</div>
      </li>
    </ul>
    <terrainDig ref="terrainDig" />
    <modelPress ref="modelPress" />
  </div>
@@ -43,60 +49,19 @@
<script>
// æµ‹é‡-信息弹窗
import terrainDig from '../Tools/terrainDig.vue';
import modelPress from '../Tools/modelPress.vue';
import terrainDig from "../Tools/terrainDig.vue";
import modelPress from "../Tools/modelPress.vue";
export default {
  components: { terrainDig, modelPress },
  data() {
    return {
      id: "",
      plotStatus: {
        delete: false,
        upload: false,
        insert: false,
        update: false,
        delete: true,
        upload: true,
        insert: true,
        update: true,
      },
      itemsOne: [
        {
          id: '1',
          name: 'synthesis.point',
          class: 'h1',
        },
        {
          id: '2',
          name: 'synthesis.line',
          class: 'h2',
        },
        {
          id: '3',
          name: 'synthesis.rectangle',
          class: 'h3',
        },
        {
          id: '4',
          name: 'synthesis.polygon',
          class: 'h4',
        },
        {
          id: '7',
          name: 'synthesis.symboliclabel',
          class: 'h7',
        },
        {
          id: '5',
          name: 'synthesis.flatterrain',
          class: 'h5',
        },
        {
          id: '6',
          name: 'synthesis.terrainexcavation',
          class: 'h6',
        },
        {
          id: '8',
          name: 'synthesis.removepaint',
          class: 'h8',
        },
      ],
    };
  },
  created() {
@@ -108,80 +73,170 @@
        this.showViewMenu(cover_perms[i]);
      }
    }
    layui.use("upload", function () {
      var upload = layui.upload;
      upload.render({
        elem: "#open",
        accept: "file", //普通文件
        auto: false,
        choose: function (obj) {
          var files = obj.pushFile();
          for (var key in files) {
            sgworld.Creator.SimpleGraphic.open(files[key]);
            break;
          }
        },
      });
    });
  },
  methods: {
    handleSaveClick() {
      let funDownload = function (content, filename) {
        let eleLink = document.createElement("a");
        eleLink.download = filename;
        eleLink.style.display = "none";
        // å­—符内容转变成blob地址
        let blob = new Blob([content]);
        eleLink.href = URL.createObjectURL(blob);
        // è§¦å‘点击
        document.body.appendChild(eleLink);
        eleLink.click();
        // ç„¶åŽç§»é™¤
        document.body.removeChild(eleLink);
      };
      let entities = new Cesium.EntityCollection();
      let dataSources = sgworld.Viewer.dataSources;
      for (let i = 0, j = dataSources.length; i < j; i++) {
        for (let v of dataSources.get(i).entities.values) {
          entities.add(v);
        }
      }
      for (let v of sgworld.Viewer.entities.values) {
        entities.add(v);
      }
      if (entities.values.length) {
        console.log(sgworld.Viewer.entities);
        let promise = Cesium.exportKml({ entities: sgworld.Viewer.entities });
        console.log(entities);
        // let promise = Cesium.exportKml({ entities: entities });
        promise.then(function (e) {
          funDownload(e.kml, new Date().getTime() + ".kml");
        });
      } else {
        alert("当前场景没有entities实体");
      }
    },
    handleOpenClick() {
      // let that = this;
      let fileInput = document.querySelector(".file");
      fileInput.onchange = function (evt) {
        let files = evt.target.files;
        if (files.length > 0) {
          let file = evt.target.files[0];
          let fileReader = new FileReader();
          fileReader.readAsDataURL(file);
          fileReader.onload = () => {
            sgworld.Viewer.dataSources
              .add(
                Cesium.KmlDataSource.load(fileReader.result, {
                  camera: sgworld.Viewer.scene.camera,
                  canvas: sgworld.Viewer.scene.canvas,
                })
              )
              .then((KmlDataSource) => {
                console.log(KmlDataSource);
                // let entities = kmlDataSource.entities;
              });
          };
          // let fileReader = new FileReader();
          // fileReader.onload = function () {
          // sgworld.Viewer.dataSources
          // .add(
          //       Cesium.KmlDataSource.load(new Blob([this.result]), {
          //         camera: sgworld.Viewer.scene.camera,
          //         canvas: sgworld.Viewer.scene.canvas,
          //         clampToGround: false,
          //       })
          // )
          //     .then(function (kmlDataSource) {
          //       let entities = kmlDataSource.entities;
          //       let item = entities.values[entities.values.length - 1];
          //       sgworld.Viewer.zoomTo(entities);
          //     });
          //   fileInput = null;
          //   fileReader = null;
          // };
          // fileReader.readAsText(file);
        }
        // fileInput.value = null;
      };
      fileInput.click();
    },
    preview(event) {
      var reader = new FileReader();
      reader.readAsDataURL(file);
      //监听文件读取结束后事件
      reader.onloadend = function (e) {
        $(".img").attr("src", e.target.result); //e.target.result就是最后的路径地址
      };
      // let files = document.getElementById(this.id).files[0];
      // this.imgDataUrl = this.getObjectURL(files);
      // // this.$emit("sendImgUrl", this.imgDataUrl, this.id);
      // console.log("sendImgUrl", this.imgDataUrl, this.id);
    },
    getObjectURL(file) {
      let url = null;
      if (window.createObjectURL != undefined) {
        // basic
        url = window.createObjectURL(file);
      } else if (window.webkitURL != undefined) {
        // webkit or chrome
        url = window.webkitURL.createObjectURL(file);
      } else if (window.URL != undefined) {
        // mozilla(firefox)
        url = window.URL.createObjectURL(file);
      }
      return url;
    },
    showViewMenu(res) {
      if (res.cnName != '标绘') return;
      if (res.cnName != "标绘") return;
      switch (res.tag) {
        case '/delete':
        case "/delete":
          this.plotStatus.delete = true;
          break;
        case '/upload':
        case "/upload":
          this.plotStatus.upload = true;
          break;
        case '/insert':
        case "/insert":
          this.plotStatus.insert = true;
          break;
        case '/update':
        case "/update":
          this.plotStatus.update = true;
          break;
      }
    },
    changePlot(res) {
      switch (res.id) {
        case '1':
          sgworld.Creator.createSimpleGraphic(
            'point',
            {},
            function (entity) {}
    save() {
      // var val_result = sgworld.Viewer.entities._entities._array;
      // console.log(val_result[0]);
      // console.log(sgworld.Core);
      // console.log(sgworld.Core.getEntityPropValue(val_result[0], show));
      sgworld.Creator.SimpleGraphic.save();
    },
    kmlopen() {
      sgworld.Creator.addKmlLayer(
        "kml数据",
        "http://183.162.245.49:82/sdkdemo_2022/demo/kml/facilities/facilities.kml",
        true
          );
          break;
        case '2':
          sgworld.Creator.createSimpleGraphic(
            'polyline',
            {},
            function (entity) {}
          );
          break;
        case '3':
          sgworld.Creator.createSimpleGraphic(
            'rectangle',
            {},
            function (entity) {}
          );
          break;
        case '4':
          sgworld.Creator.createSimpleGraphic(
            'polygon',
            {},
            function (entity) {}
          );
          break;
        case '6':
          if (window.Excavation) {
            window.Excavation.clear();
            window.Excavation = null;
          } else {
            this.$refs.terrainDig.open();
          }
          break;
        case '5':
          if (window.TerrainFlattening) {
            window.TerrainFlattening.remove();
            window.TerrainFlattening = null;
          } else {
            this.$refs.modelPress.open();
          }
          break;
        case '7':
          sgworld.Creator.createModelLibrary();
          break;
        case '8':
          this.clearAll();
          break;
      }
    },
    drawing() {
      this.$emit("drawing");
    },
    clearAll() {
      sgworld.Creator.SimpleGraphic.clear();
@@ -204,6 +259,7 @@
  height: 100%;
  position: relative;
}
.box li {
  list-style: none;
  float: left;
@@ -218,34 +274,34 @@
  margin: 0px;
}
.h1 {
  background: url('../../assets/img/synthesis/椭圆 5 æ‹·è´ 3.png') no-repeat
  background: url("../../assets/img/synthesis/椭圆 5 æ‹·è´ 3.png") no-repeat
    center;
}
.h2 {
  background: url('../../assets/img/synthesis/椭圆 3 æ‹·è´ 16.png') no-repeat
  background: url("../../assets/img/synthesis/椭圆 3 æ‹·è´ 16.png") no-repeat
    center;
}
.h3 {
  background: url('../../assets/img/synthesis/椭圆 3 æ‹·è´ 20.png') no-repeat
  background: url("../../assets/img/synthesis/椭圆 3 æ‹·è´ 20.png") no-repeat
    center;
}
.h4 {
  background: url('../../assets/img/synthesis/椭圆 3 æ‹·è´ 23.png') no-repeat
  background: url("../../assets/img/synthesis/椭圆 3 æ‹·è´ 23.png") no-repeat
    center;
}
.h5 {
  background: url('../../assets/img/synthesis/矩形 14 æ‹·è´.png') no-repeat
  background: url("../../assets/img/synthesis/矩形 14 æ‹·è´.png") no-repeat
    center;
}
.h6 {
  background: url('../../assets/img/synthesis/矩形 14 æ‹·è´ 7.png') no-repeat
  background: url("../../assets/img/synthesis/矩形 14 æ‹·è´ 7.png") no-repeat
    center;
}
.h7 {
  background: url('../../assets/img/synthesis/文本风格.png') no-repeat center;
  background: url("../../assets/img/synthesis/文本风格.png") no-repeat center;
}
.h8 {
  background: url('../../assets/img/synthesis/清除.png') no-repeat center;
  background: url("../../assets/img/synthesis/清除.png") no-repeat center;
}
.backimge8 {
  width: 30px;
src/views/datamanage/domainManage.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,601 @@
<template>
  <div class="authorityManagement_box">
    <My-bread :list="[`${$t('dataManage.dataManage')}`, `值域管理`]"></My-bread>
    <el-divider />
    <div class="contentBox">
      <div class="leftTree">
        <el-tree
          :data="domainData"
          :props="defaultProps"
          :default-expand-all="true"
          @node-click="toggleTabs"
        ></el-tree>
      </div>
      <div class="right">
        <div class="inquire">
          <el-form ref="queryForm" :model="queryForm" :inline="true">
            <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name">
              <el-input
                v-model="queryForm.name"
                :placeholder="$t('common.pleaseInput')"
              />
            </el-form-item>
            <el-form-item>
              <el-button
                @click="queryInfo('queryForm')"
                icon="el-icon-search"
                size="small"
                >{{ $t("common.iquery") }}</el-button
              >
              <el-button
                @click="resetInfo('queryForm')"
                icon="el-icon-delete"
                size="small"
                >{{ $t("common.empty") }}</el-button
              >
              <el-button
                v-if="btnStatus.insert"
                @click="showAddDialog"
                icon="el-icon-plus"
                size="small"
                >{{ $t("common.append") }}</el-button
              >
              <el-button
                v-if="btnStatus.delete"
                type="danger"
                size="small"
                @click="handleDelete"
                icon="el-icon-delete"
                >{{ $t("common.delete") }}</el-button
              >
            </el-form-item>
          </el-form>
        </div>
        <div class="table_box">
          <el-table :data="tableData" stripe style="width: 100%" height="99%">
            <el-table-column type="selection" width="50" />
            <el-table-column
              align="center"
              type="index"
              :label="$t('dataManage.domainManage.index')"
              width="70px"
            />
            <el-table-column
              align="center"
              prop="domName"
              :label="$t('dataManage.domainManage.domName')"
            />
            <el-table-column
              align="center"
              prop="domDesc"
              :label="$t('dataManage.domainManage.domDesc')"
            />
            <el-table-column
              align="center"
              prop="domCode"
              :label="$t('dataManage.domainManage.domCode')"
            />
            <el-table-column
              align="center"
              prop="codeDesc"
              :label="$t('dataManage.domainManage.codeDesc')"
            />
            <el-table-column
              align="center"
              prop="bsm"
              :label="$t('dataManage.domainManage.bsm')"
            />
            <el-table-column
              align="center"
              prop="level"
              :label="$t('dataManage.domainManage.level')"
            />
            <el-table-column
              align="center"
              prop="orderid"
              :label="$t('dataManage.domainManage.orderid')"
            />
            <el-table-column
              align="center"
              prop="bak"
              :label="$t('dataManage.domainManage.bak')"
            />
            <el-table-column min-width="150" :label="$t('common.operate')">
              <template slot-scope="scope">
                <el-button
                  v-if="btnStatus.update"
                  @click="handleEdit(scope.$index, scope.row)"
                  type="warning"
                  size="small"
                  >{{ $t("common.update") }}</el-button
                >
                <el-button
                  v-if="btnStatus.delete"
                  @click="handleDelete(scope.$index, scope.row)"
                  type="danger"
                  size="small"
                  >{{ $t("common.delete") }}</el-button
                >
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div
          class="pagination_box"
          style="margin-top: 20px; margin-left: 200px"
        >
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="listData.pageIndex"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="listData.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="count"
          >
          </el-pagination>
        </div>
      </div>
    </div>
    <div class="infoBox" v-show="showinfoBox">
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span>详细信息</span>
          <div style="float: right; cursor: pointer">
            <i class="el-icon-close"></i>
          </div>
        </div>
        <div class="contentBox">
          <p>数据名称:{{ itemdetail.domName }}</p>
          <el-divider></el-divider>
          <p>所属目录:{{ itemdetail.path }}</p>
          <el-divider></el-divider>
          <p>创建时间:{{ itemdetail.create_time }}</p>
          <el-divider></el-divider>
          <p>创建人员:{{ itemdetail.create_user }}</p>
          <el-divider></el-divider>
          <p>上传单位:{{ itemdetail.up_unit }}</p>
          <el-divider></el-divider>
          <p>数据状态:{{ itemdetail.status }}</p>
          <el-divider></el-divider>
          <p>数据版本:{{ itemdetail.version }}</p>
        </div>
      </el-card>
    </div>
    <el-dialog
      width="510px"
      top="5vh"
      :title="behavior"
      :visible.sync="dialogFormVisible"
      :before-close="handleClose"
    >
      <el-form :model="editForm" ref="editForm">
        <el-form-item
          :label="$t('dataManage.domainManage.domName')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.domName" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.domDesc')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.domDesc" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.domCode')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.domCode" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.codeDesc')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.codeDesc" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.bsm')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.bsm" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.level')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.level" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.orderid')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.orderid" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.bak')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.bak" autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
      <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer">
        <el-button @click="cancelEdit()">重置</el-button>
        <el-button
          size="medium"
          type="primary"
          @click="sendEdit()"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t("common.confirm") }}</el-button
        >
      </div>
      <div v-else slot="footer" class="dialog-footer">
        <el-button @click="cancelAdd('editForm')">重置</el-button>
        <el-button
          size="medium"
          type="primary"
          @click="sendAdd('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t("common.confirm") }}</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getDomainTabs,
  getSingleTab,
  insertDomain,
  // deleteDomain,
  // updateDomain,
} from "../../api/api";
import MyBread from "../../components/MyBread.vue";
export default {
  name: "domainManage",
  components: { MyBread },
  data() {
    return {
      multipleSelection: [],
      behavior: "",
      formLabelWidth: "100px",
      dialogFormVisible: false,
      showinfoBox: false,
      fullscreenLoading: false,
      itemdetail: {},
      editForm: {},
      queryForm: {},
      insertform: {},
      initialForm: "",
      tableData: [],
      count: 0,
      rowFlag: null,
      listData: {
        ns: "",
        tab: "",
        pageIndex: 1,
        pageSize: 10,
      },
      btnStatus: {
        select: false,
        delete: false,
        upload: false,
        download: false,
        insert: false,
        update: false,
      },
      domainData: [
        {
          tabDesc: "基础数据",
          children: [],
        },
        {
          tabDesc: "业务数据",
          children: [],
        },
      ],
      defaultProps: {
        children: "children",
        label: "tabDesc",
      },
    };
  },
  created() {
    this.getAllTabelData();
    this.showPermsBtn();
  },
  computed: {
    pathId() {
      return this.$store.state.cataNode.id;
    },
  },
  methods: {
    toggleTabs(data) {
      this.fullscreenLoading = true;
      this.listData.ns = data.ns;
      this.listData.tab = data.tab;
      getSingleTab(this.listData).then((res) => {
        setTimeout(() => {
          this.tableData = res.result;
          this.count = res.count;
          this.fullscreenLoading = false;
        }, 500);
      });
    },
    showPermsBtn() {
      let currentPerms = this.$store.state.currentPerms;
      let permsEntity = this.$store.state.permsEntity;
      permsEntity
        .filter((item) => item.perms == currentPerms)
        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
    },
    getAllTabelData() {
      getDomainTabs().then((res) => {
        let bdres = res.result.filter((item) => item.ns == "bd");
        let bsres = res.result.filter((item) => item.ns == "bs");
        this.domainData[0].children = bdres;
        this.domainData[1].children = bsres;
      });
    },
    queryInfo() {
      alert("缺少查询条件接口");
      return;
      // let searchData = {
      //   name: this.queryForm.name.trim(),
      //   pageIndex: this.pageIndex,
      //   pageSize: this.pageSize,
      // };
      XXX(searchData).then((res) => {
        if (res.code == 200) {
          this.tableData = res.result;
          this.count = res.count;
        } else {
          console.log("查询接口报错");
          this.$notify.error({
            title: res.code,
            message: res.result,
          });
        }
      });
    },
    resetInfo() {
      this.queryForm = {};
      this.$store.state.verCateNode = {};
      this.$bus.$emit("clearTressLabel", true);
      this.getAllTabelData();
    },
    showAddDialog() {
      this.behavior = "新增用户";
      this.editForm = {};
      this.dialogFormVisible = true;
    },
    cancelAdd(formName) {
      this.editForm = {};
      this.$refs[formName].resetFields();
    },
    sendAdd() {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          return;
          console.log(this.editForm);
          this.fullscreenLoading = true;
          insertDomain(this.editForm)
            .then((res) => {
              setTimeout(() => {
                this.fullscreenLoading = false;
                if (res.code == 200) {
                  this.getMetaData({ pageIndex: 1, pageSize: 10 });
                  this.$message({
                    message: "添加成功",
                    type: "success",
                  });
                  this.editForm = {};
                  this.dialogFormVisible = false;
                }
              }, 500);
            })
            .catch((res) => {
              alert("修改失败,请重试!");
              this.fullscreenLoading = false;
            });
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
    handleClose(done) {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.editForm = {};
          done();
        })
        .catch((_) => {});
    },
    handleEdit(index, row) {
      this.dialogFormVisible = true;
      this.editForm = row;
      this.behavior = "属性修改";
    },
    editFromDataClose() {
      this.dialogFormVisible = false;
      this.editForm = {};
    },
    editFromData() {
      // this.editForm = {};
      console.log(this.editForm);
    },
    handleDelete(index, row) {},
    handleSizeChange(val) {
      this.listData.pageSize = val;
      // console.log(this.listData);
      getSingleTab(this.listData).then((res) => {
        setTimeout(() => {
          this.tableData = res.result;
          this.count = res.count;
          this.fullscreenLoading = false;
        }, 500);
      });
    },
    handleCurrentChange(val) {
      this.listData.pageIndex = val;
      getSingleTab(this.listData).then((res) => {
        setTimeout(() => {
          this.tableData = res.result;
          this.count = res.count;
          this.fullscreenLoading = false;
        }, 500);
      });
    },
  },
  watch: {
    pathId: {
      immediate: true,
      handler(val) {},
    },
  },
};
</script>
<style lang="less" scoped>
//@import url(); å¼•入公共cssç±»
.authorityManagement_box {
  background: rgb(240, 242, 245);
  border-radius: 10px;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  .el-input {
    width: 300px !important;
  }
  .contentBox {
    display: flex;
    justify-content: space-between;
    .leftTree {
      width: 15%;
      height: 90vh;
      border-radius: 10px;
      overflow: auto;
    }
    .right {
      width: 84%;
      height: 92vh;
      // background-color: #bfa;
      .inquire {
        margin-bottom: 10px;
        background: #fff;
        border-radius: 5px;
        border: 1px solid rgb(202, 201, 204);
        .el-form-item {
          margin: 5px;
        }
      }
      .table_box {
        width: 100%;
        height: 90%;
        margin: 0 auto;
        overflow: auto;
        background: #fff;
        // .el-table {
        //   height: 100%;
        // }
        .el-table /deep/ th.el-table__cell > .cell {
          padding: 15px !important;
        }
        // .el-table /deep/ .el-table__header-wrapper tr th {
        //   background-color: rgb(255, 255, 255) !important;
        //   color: rgb(0, 0, 0);
        // }
        // // ä¿®æ”¹æ¯è¡Œæ ·å¼ï¼š
        // .el-table /deep/ .el-table__row {
        //   background-color: rgba(255, 255, 255) !important;
        //   color: rgb(0, 0, 0);
        // }
        // .el-table /deep/ .el-table__body tr.current-row > td {
        //   background-color: rgb(211, 211, 211) !important;
        // }
        // .el-table /deep/ .el-table__body tr:hover > td {
        //   background-color: rgb(211, 211, 211) !important;
        // }
        // // ä¿®æ”¹è¡¨æ ¼æ¯è¡Œè¾¹æ¡†çš„æ ·å¼ï¼š
        // .el-table /deep/ td,
        // .el-table /deep/ th.is-leaf {
        //   border-bottom: 1px solid #eee;
        //   border-right: 1px solid #eee;
        // }
        // .el-table /deep/ .el-table__cell {
        //   padding: 0;
        // }
        // è®¾ç½®è¡¨æ ¼æ¯è¡Œçš„高度:
        // .el-table /deep/ .el-table__header tr,
        // .el-table /deep/ .el-table__header th {
        //   height: 40px;
        // }
        // .el-table__body tr,
        // .el-table__body td {
        //   height: 40px;
        //   padding: 0;
        // }
        // è®¾ç½®è¡¨æ ¼è¾¹æ¡†é¢œè‰²ï¼š
        .el-table--border::after,
        .el-table--group::after {
          width: 0;
        }
        .el-table::before {
          height: 0;
        }
        //   a {
        //     color: #000;
        //   }
      }
    }
  }
  .infoBox {
    width: 500px;
    border: 1px solid #eee;
    position: absolute;
    z-index: 100;
    top: 15%;
    right: 25%;
    background-color: #fff;
    .el-card {
      background-color: transparent;
      span {
        font-size: 16px;
        font-weight: 600;
      }
    }
    .contentBox {
      margin: 0 aotu 10px;
      p {
        // background-color: #bfa;
        // margin-bottom: 10px;
        font-size: 14px;
      }
    }
  }
  /deep/ .el-dialog {
    width: 620px !important;
    margin-top: 10vh !important;
  }
  /deep/.el-dialog .el-input__inner {
    width: 300px;
  }
  /deep/ .el-dialog__body {
    padding: 0px 30px;
  }
  /deep/ .el-dialog__footer {
    padding-top: 0 !important;
    width: 600px;
    display: flex;
    margin: 0 auto;
    justify-content: center;
  }
}
</style>
src/views/datamanage/metadataManage.vue
@@ -10,7 +10,10 @@
    <div class="inquire">
      <el-form ref="queryForm" :model="queryForm" :inline="true">
        <el-form-item label="关键字" prop="name">
          <el-input v-model="queryForm.name" placeholder="请输入" />
          <el-input
            v-model="queryForm.name"
            :placeholder="$t('common.pleaseInput')"
          />
        </el-form-item>
        <el-form-item>
          <el-button
src/views/maintenance/menuSettings.vue
@@ -183,7 +183,7 @@
<script>
import MyBread from '../../components/MyBread.vue';
import {
  queryMenuTree,
  queryMenuAll,
  updateMenuTree,
  updateMenuTrees,
  queryMaxId,
@@ -296,7 +296,7 @@
      // queryMaxId().then((res) => {
      //   this.id = res.data;
      // });
      queryMenuTree().then((res) => {
      queryMenuAll().then((res) => {
        if (res.code == 200) {
          this.menuList = this.treeData(res.result);
          this.oriData = res.result;
src/views/userManage/userInfoManage.vue
@@ -1013,7 +1013,6 @@
      this.queryInfo();
    },
    showPermsMenu(res) {
      console.log(res.tag);
      switch (res.tag) {
        case "/delete":
          this.menuStatus.delete = true;