管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-03-23 98aec0baaef46392f6bede8f507466fc75eca137
顶部菜单修改,目录管理批量导入修改
已修改9个文件
148 ■■■■■ 文件已修改
src/assets/css/index.css 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/menu/navbg.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ProjectOl.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/login.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/navMenu.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/preview_map.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/AddOnlineMap.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/SpatialData.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/catalogueManage.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/index.css
@@ -12,7 +12,7 @@
.el-header {
    padding: 0;
    height: 90px !important;
    height: 60px !important;
}
.el-main {
@@ -43,7 +43,7 @@
    /* width: 415px;
    height: 70px;
    background: url("../img/LOGO.png") no-repeat center; */
    width: 240px;
    width: 18%;
    height: 50px;
    background: url("../img/menu/navtitle.png") no-repeat center center;
    background-size: 100% 100%;
@@ -52,7 +52,9 @@
.topMenu {
    width: auto;
    flex: 1;
    height: 100px;
    height: 60px;
    margin-left: 3%;
}
.menuContent {
@@ -60,7 +62,17 @@
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* justify-content: center; */
}
.topUser {
    color: white;
    width: 9%;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 10px;
}
.contentDiv {
@@ -81,10 +93,10 @@
}
.menulabel {
    font-size: 10px;
    font-size: 15px;
    font-family: Source Han Sans CN;
    text-align: left;
    padding: 0 20px;
    padding: 0 10px;
    /*width: 100px;*/
    /*width: 120px;*/
    color: #fff
@@ -164,12 +176,7 @@
    background-size: 100% 100%;
}
.topUser {
    color: white;
    height: 70px;
    display: flex;
    align-items: center;
}
.userName {
    margin: 0px 10px 0 5px;
@@ -177,6 +184,7 @@
    display: flex;
    justify-content: space-between;
    height: 30px;
    align-items: center;
}
.userLanguage {
@@ -184,6 +192,7 @@
    /*margin-top: 10px;*/
    display: flex;
    height: 30px;
    align-items: center;
}
.userImage {
@@ -205,6 +214,7 @@
    background-size: 100% 100%;
    cursor: pointer;
}
.theme {
    background: url("../img/menu/theme.png") no-repeat;
    background-size: 100% 100%;
@@ -303,4 +313,4 @@
/*    background-image: url("../../assets/img/synthesis/地形.png");*/
/*    background-repeat: no-repeat;*/
/*    background-size: contain;*/
/*}*/
/*}*/
src/assets/img/menu/navbg.jpg

src/components/ProjectOl.vue
@@ -164,8 +164,9 @@
      });
    },
    async showLoacation(res) {
      this.formInline.lon = res[0].toFixed(6);
      this.formInline.lat = res[1].toFixed(6);
      this.formInline.lon = parseFloat(res[0]).toFixed(6);
      this.formInline.lat = parseFloat(res[1]).toFixed(6);
      const data = await project_selectLocation({
        x: res[0],
        y: res[1],
src/components/login.vue
@@ -228,7 +228,7 @@
                    sessionStorage.setItem("routerName", "/Thematic");
                    sessionStorage.setItem("changeSelectStyle", 1);
                    this.$router.push("/");
                  }else {
                  } else {
                    this.$message({
                      message: "请您联系管理员分配角色菜单",
                      type: "error",
@@ -323,7 +323,7 @@
}
.title_img {
  position: absolute;
  left: 17%;
  left: 20%;
  top: 8%;
  width: 20%;
  /* transform: translateX(-50%); */
src/components/navMenu.vue
@@ -43,22 +43,15 @@
      </div>
      <div class="topUser">
        <div class="userLanguage">
          <div class="userImage theme" @click="themeChange"></div>
          <div class="userImage user2" @click="switchLang"></div>
<!--          <div class="TextLanguage">-->
<!--            <el-link-->
<!--                @click="switchLang"-->
<!--                :underline="false"-->
<!--                class="elLink"-->
<!--            >{{$t("common.language")}}</el-link>-->
<!--          </div>-->
<!--          <div class="TextLanguage">-->
<!--            <el-link-->
<!--                @click="themeChange"-->
<!--                :underline="false"-->
<!--                class="elLink"-->
<!--            > 主题切换</el-link>-->
<!--          </div>-->
          <div
            class="userImage theme"
            @click="themeChange"
          ></div>
          <div
            class="userImage user2"
            @click="switchLang"
          ></div>
        </div>
        <div class="userName">
          <div class="userImage user1"></div>
src/components/preview_map.vue
@@ -186,6 +186,47 @@
      </div>
    </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> -->
    <el-dialog
      title="预览"
      :append-to-body="false"
      :visible.sync="dialog.dialogVisible"
      width="70%"
      :close-on-click-modal="false"
    >
      <div
        v-if="dialog.isPdf"
        class="pdfClass"
      >
        <iframe
          :src="dialog.src"
          type="application/x-google-chrome-pdf"
          width="100%"
          height="100%"
        >
        </iframe>
      </div>
      <div
        v-if="dialog.isJpg"
        class="pdfClass"
      >
        <img
          style="width:100%; height:100%"
          :src="dialog.src"
          alt=""
        />
      </div>
    </el-dialog>
  </div>
</template>
@@ -375,7 +416,6 @@
    },
    //附件列表查询
    async getAttacthFlieList() {
      debugger
      var obj = {
        eventid: this.layerID,
        tabName: "lf.sys_style"
@@ -719,5 +759,10 @@
    max-height: 300px;
    overflow: auto;
  }
  .pdfClass {
    height: 70vh;
    width: 100%;
    position: relative;
  }
}
</style>
src/views/Tools/AddOnlineMap.vue
@@ -313,7 +313,7 @@
        window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider(
          new Cesium.UrlTemplateImageryProvider({
            url: ulr,
            maximumLevel: 18,
            maximumLevel: 22,
          })
        );
src/views/datamanage/SpatialData.vue
@@ -272,7 +272,7 @@
                  @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>
src/views/datamanage/catalogueManage.vue
@@ -493,8 +493,11 @@
          exts: res[i].exts,
          orderNum: null,
          pid: null,
          tid: parseInt(value[2]) + 1,
          sid: parseInt(value[3]) + 1
        })
      }
      this.tableData = arr;
      this.setInsertData(this.tableData);
@@ -511,19 +514,20 @@
        }
      }
      if (chLevel == 1) {
        return [res['L' + chLevel], null]
        return [res['L' + chLevel], null, flag, -1]
      } else {
        faLevel = chLevel - 1;
        for (var i = flag; i >= 0; i--) {
          var val = result[i]
          if (val['L' + faLevel]) {
            return [res['L' + chLevel], val['L' + faLevel]]
            return [res['L' + chLevel], val['L' + faLevel], flag, i]
            break;
          }
        }
      }
    },
    setInsertData(res) {
      var list = this.excelData(res);
      if (list.length != 0) {
@@ -531,7 +535,7 @@
          return this.$message.error("上传数据错误,第一条数据不为空");
        }
        this.getAllNodeId(list);
        this.getAllNodeId(res);
      }
    },
    async getAllNodeId(res) {
@@ -542,8 +546,9 @@
          val.orderNum = this.dirList[this.dirList.length - 1].orderNum + 1;
          val.pid = 0;
        } else {
          this.tableData.filter((child) => {
            if (child.name == val.pname) {
            if (child.tid == val.sid) {
              val.pid = child.id;
              val.orderNum = i + 1;
            }
@@ -553,29 +558,31 @@
        const data = await insertDir(val);
        if (data.code != 200) {
        }
        this.tableData.filter((child) => {
          if (child.name == val.name && child.pname == val.pname) {
          if (child.name == val.name && child.tid == val.tid) {
            child.id = data.result;
          }
        });
        this.itemaName = data.result;
        this.getDirTree();
        if (res[i].children) {
          this.getAllNodeId(res[i].children);
        }
        // if (res[i].children) {
        //   this.getAllNodeId(res[i].children);
        // }
      }
    },
    excelData(source) {
      let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆
      return cloneData.filter((father) => {
        // 循环所有项
        let branchArr = cloneData.filter((child) => father.name == child.pname); // 对比ID,分别上下级菜单,并返回数据
        let branchArr = cloneData.filter((child) => father.tid == child.sid); // 对比ID,分别上下级菜单,并返回数据
        branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值
        // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2;
        // 由此循环多次后,就能形成相应的树形数据结构
        return father.pname == null; // 返回一级菜单
        return father.sid == 0; // 返回一级菜单
      });
    },
    readFile(file) {