管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-08 e4c5bd13edea4cf6a1b0f4e825902344b5cb599e
元数据添加版本选项
已修改5个文件
217 ■■■■■ 文件已修改
src/api/api.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/navMenu.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Archive/index.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Synthesis/LeftMenu.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/metadataManage.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js
@@ -68,6 +68,14 @@
  //请求地址
  return request.get('/dep/selectDepAll', { params: params });
}
//元数据=>根据目录ID查询版本列表
export function meta_selectVerByDirid(params) {
  //请求地址
  return request.get('/meta/selectVerByDirid', { params: params });
}
//组织机构根据id查询
export function selectDep(params) {
  //请求地址
src/components/navMenu.vue
@@ -60,13 +60,13 @@
              class="elLink"
            >{{$t("common.language")}}</el-link>
          </div>
          <!-- <div class="TextLanguage">
            <!-- <div class="TextLanguage">
            <el-link
              @click="themeChange"
              :underline="false"
              class="elLink"
            > 主题切换</el-link>
          </div> -->
          </div>    -->
        </div>
      </div>
src/views/Archive/index.vue
@@ -7,33 +7,35 @@
    </div>
    <div class="box_item ">
      <div class="box_left">资料类别</div>
      <div class="box_cont">
        <div class="box_left">资料类别</div>
        <div class="box_cont">
        <div v-if="isShowFirstCheck">
          <el-checkbox-group v-model="checkedDataType">
            <el-checkbox
              @change="handleCheckedDataTypeChange(item)"
              v-for="(item, index)  in showList"
              :label="item.name"
              :key="index"
            >{{item.name}}</el-checkbox>
          </el-checkbox-group>
        </div>
        <div
          v-if="!isShowFirstCheck"
          class="menu_div"
          v-for="(item, index) in showList"
          :key="index"
          @click="changeListDataType(item)"
        >
          <div v-if="isShowFirstCheck">
            <el-checkbox-group v-model="checkedDataType">
              <el-checkbox
                @change="handleCheckedDataTypeChange(item)"
                v-for="(item, index)  in showList"
                :label="item.name"
                :key="index"
              >{{item.name}}</el-checkbox>
            </el-checkbox-group>
          </div>
          <div
            :class="{menuActive:dataTypeName == item.name}"
            style="margin-left: 5px"
          >{{ item.name }}</div>
            v-if="!isShowFirstCheck"
            class="menu_div"
            v-for="(item, index) in showList"
            :key="index"
            @click="changeListDataType(item)"
          >
            <div
              :class="{menuActive:dataTypeName == item.name}"
              style="margin-left: 5px"
            >{{ item.name }}</div>
          </div>
        </div>
      </div>
      <div class="box_right">
        <div
          class="menu_div subpage_Div"
@@ -1025,10 +1027,10 @@
  methods: {
    downloadMap(index, rows) {
      //     var token = '?token=' + getToken();
      //  debugger
      //
      //  var url = BASE_URL + '/dataLib/downloadFile' + token + '&guid=' + rows.guid+ '&pwd='+  rows.pwd 
      var token = getToken()
      var url = BASE_URL + "/dataLib/downloadFile?token=" + token + "&guid=" + rows.guid + "&pwd=" + rows.pwd;
      $("#downFrame").attr("src", url).click();
    },
@@ -1179,7 +1181,8 @@
            pageSize: 10,
            depid: null,
            dirid: null,
            name: null
            name: null,
            verid: null
          }
          this.isMenuActive = false;
@@ -1256,6 +1259,7 @@
    getBatchMetaData() {
      this.batchPage.dirid = '1'
      this.batchPage.depid = '1';
      dataLib_selectByPageForMeta(this.batchPage).then((res) => {
        this.batchPage.count = res.count;
        this.tableData2 = res.result;
@@ -1943,8 +1947,9 @@
  .box_item {
    width: calc(100% - 60px);
    height: auto;
    padding: 10px 30px;
    margin: 5px 30px;
    padding-bottom:5px ;
 border-bottom: 1px solid #dcdfe6;
    align-items: center;
    display: flex;
    float: left;
src/views/Synthesis/LeftMenu.vue
@@ -7,13 +7,21 @@
      :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }"
      :key="index"
    >
      <div class="menuTwoImage" :class="item.css"></div>
      <div
        class="menuTwoImage"
        :class="item.css"
      ></div>
      <div>{{ $t(item.label) }}</div>
    </div>
    <mapinfo ref="mapinfo" />
    <maplayer ref="maplayer" />
    <queryinfo ref="queryinfo" />
    <input type="file" accept=".kml" class="file" style="display: none" />
    <input
      type="file"
      accept=".kml"
      class="file"
      style="display: none"
    />
  </div>
</template>
@@ -400,27 +408,27 @@
    setPlot(res) {
      switch (res) {
        case "h1":
          sgworld.Creator.createSimpleGraphic("point", {}, function (entity) {})
          sgworld.Creator.createSimpleGraphic("point", {}, function (entity) { })
          break
        case "h2":
          sgworld.Creator.createSimpleGraphic(
            "polyline",
            {},
            function (entity) {}
            function (entity) { }
          )
          break
        case "h3":
          sgworld.Creator.createSimpleGraphic(
            "rectangle",
            {},
            function (entity) {}
            function (entity) { }
          )
          break
        case "h4":
          sgworld.Creator.createSimpleGraphic(
            "polygon",
            {},
            function (entity) {}
            function (entity) { }
          )
          break
        case "h5":
@@ -434,7 +442,7 @@
          break
        case "h8":
          sgworld.Creator.createSimpleGraphic("label", {}, function (entity) {})
          sgworld.Creator.createSimpleGraphic("label", {}, function (entity) { })
          break
      }
    },
@@ -539,18 +547,18 @@
        url,
        name,
        "height=" +
          iHeight +
          ",,innerHeight=" +
          iHeight +
          ",width=" +
          iWidth +
          ",innerWidth=" +
          iWidth +
          ",top=" +
          iTop +
          ",left=" +
          iLeft +
          ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"
        iHeight +
        ",,innerHeight=" +
        iHeight +
        ",width=" +
        iWidth +
        ",innerWidth=" +
        iWidth +
        ",top=" +
        iTop +
        ",left=" +
        iLeft +
        ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"
      )
    },
@@ -629,9 +637,8 @@
            "auto",
            data => {
              if (volumetricMeasurementTool.popupData) {
                volumetricMeasurementTool.popupData.value = `填方:${
                  data.volume.fill.toFixed(4) + data.unit.fill
                }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`
                volumetricMeasurementTool.popupData.value = `填方:${data.volume.fill.toFixed(4) + data.unit.fill
                  }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`
              } else {
                data.id = window.sgworld.Core.getuid()
                this.measureData.set(data.id, volumetricMeasurementTool)
@@ -695,9 +702,8 @@
          })
          break
        case "体积方量":
          info = `填方:${
            data.volume.fill.toFixed(4) + data.unit.fill
          }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`
          info = `填方:${data.volume.fill.toFixed(4) + data.unit.fill
            }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`
          break
      }
      return (
@@ -786,9 +792,8 @@
            "auto",
            data => {
              if (volumetricMeasurementTool.popupData) {
                volumetricMeasurementTool.popupData.value = `填方:${
                  data.volume.fill.toFixed(4) + data.unit.fill
                }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`
                volumetricMeasurementTool.popupData.value = `填方:${data.volume.fill.toFixed(4) + data.unit.fill
                  }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`
              } else {
                data.id = sgworld.Core.getuid()
                this.measureData.set(data.id, volumetricMeasurementTool)
@@ -870,7 +875,7 @@
            window.Excavation = sgworld.Analysis.TerrainExcavation(
              10,
              {},
              function () {}
              function () { }
            )
          }
          break
@@ -952,7 +957,7 @@
        GroupID: 0,
        url: "/SmartEarthSDK/Workers/image/waterNormals.jpg",
      }
      window.AnalysisFlood = sgworld.Command.execute(2, 2, method, value => {})
      window.AnalysisFlood = sgworld.Command.execute(2, 2, method, value => { })
    },
    addterrainSectionAnalysis() {
      window.AnalysisDXPM = sgworld.Command.execute(
@@ -1158,7 +1163,8 @@
.menu_Box {
  width: 100%;
  height: 100%;
  background: #303030;
  color: white;
  margin: 0;
  padding: 0;
  overflow-y: auto;
src/views/datamanage/metadataManage.vue
@@ -13,6 +13,21 @@
      >
        <el-form-item>
          <el-cascader
            v-model="queryForm.depid"
            :show-all-levels="false"
            :options="companyOption1"
            @change="handleChange1"
            :props="{
              label: 'name',
              value: 'id',
              children: 'children',
              checkStrictly: true,
              emitPath: false,
            }"
          ></el-cascader>
        </el-form-item>
        <el-form-item>
          <el-cascader
            v-model="queryForm.dirid"
            :show-all-levels="false"
            :options="companyOption"
@@ -27,19 +42,19 @@
          ></el-cascader>
        </el-form-item>
        <el-form-item>
          <el-cascader
            v-model="queryForm.depid"
            :show-all-levels="false"
            :options="companyOption1"
            @change="handleChange1"
            :props="{
              label: 'name',
              value: 'id',
              children: 'children',
              checkStrictly: true,
              emitPath: false,
            }"
          ></el-cascader>
          <el-select
            v-model="queryForm.verid"
            placeholder="请选择"
            @change="verHandleChange($event)"
          >
            <el-option
              v-for="item in verOptions"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item prop="name">
          <el-input
@@ -506,7 +521,8 @@
  sign_getPublicKey,
  meta_selectDownloadFile,
  meta_selectFields,
  meta_selectByPageForUpload
  meta_selectByPageForUpload,
  meta_selectVerByDirid
} from '../../api/api';
import MyBread from '../../components/MyBread.vue';
@@ -535,6 +551,7 @@
      }
    };
    return {
      verOptions: [],
      defaultProps: {
        children: 'children',
        label: 'name',
@@ -556,7 +573,8 @@
      queryForm: {
        name: '',
        dirid: '',
        depid: ''
        depid: '',
        verid: ''
      },
      behavior: '',
      initialForm: '',
@@ -696,9 +714,11 @@
      }
      this.companyOption1 = this.treeData(res.result);
      this.queryForm.depid = this.companyOption1[0].id
      this.getQueryDirTree();
    },
    async getQueryDirTree() {
      const res = await selectdirTab();
      if (res.code != 200) {
@@ -707,13 +727,30 @@
      }
      this.companyOption = this.treeData(res.result);
      this.queryForm.dirid = this.companyOption[0].id
      this.getQueryVerList();
    },
    async getQueryVerList() {
      const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid })
      if (data.code != 200) {
        this.$message.error('版本列表获取失败');
        return;
      }
      this.verOptions = data.result;
      this.queryForm.verid = data.result[0].id;
      this.getMetaData();
    },
    verHandleChange(val) {
      this.queryForm.verid = val;
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.getMetaData();
    },
    handleChange(value) {
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.queryForm.dirid = value;
      this.getMetaData();
      this.getQueryVerList()
    },
    handleChange1(value) {
      this.listData.pageSize = 10;
@@ -843,6 +880,8 @@
    getMetaData() {
      this.listData.depid = this.queryForm.depid;
      this.listData.dirid = this.queryForm.dirid;
      this.listData.verid = this.queryForm.verid;
      // this.listData.dirid = 57
      select_meta_ByPageAndCount(this.listData).then((res) => {
@@ -865,7 +904,8 @@
      this.listData.pageIndex = 1;
      this.listData.name = null;
      this.queryForm.dirid = this.companyOption[0].id;
      this.queryForm.depid = this.companyOption1[0].id
      this.queryForm.depid = this.companyOption1[0].id;
      this.getQueryVerList();
      this.getMetaData();
    },
    //新增按钮