管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-01-16 3c0bcd367dbc9aff25202d1a8ec2eb143f3e8261
src/views/datamanage/projectManage.vue
@@ -1,11 +1,9 @@
<template>
  <div class="verSionBox">
    <My-bread
      :list="[
    <My-bread :list="[
        `${$t('dataManage.dataManage')}`,
        `${$t('dataManage.projectManage')}`,
      ]"
    ></My-bread>
      ]"></My-bread>
    <el-divider />
    <div class="verSionContent">
      <div class="verSion_leftTree">
@@ -22,7 +20,10 @@
        </el-tree>
      </div>
      <div class="verSion_rightContent">
        <el-form :inline="true" class="demo-form-inline">
        <el-form
          :inline="true"
          class="demo-form-inline"
        >
          <el-form-item>
            <el-button
              v-if="btnStatus.insert"
@@ -30,12 +31,12 @@
              @click="insertProject"
              :disabled="count1 != 0 ? true : false"
              type="success"
              >{{ $t('common.append') }}</el-button
            >
              size="small"
            >{{ $t('common.append') }}</el-button>
          </el-form-item>
        </el-form>
        <el-divider class="eldivider" />
        <div style="height: 82%; padding: 1%; overflow: auto">
        <div style="height: 80%; padding: 1%; overflow: auto">
          <el-table
            ref="filterTable"
            :data="dbTableData"
@@ -57,7 +58,7 @@
              :label="$t('dataManage.projectObj.projtype')"
            />
            <el-table-column
              prop="location"
              prop="geom"
              :label="$t('dataManage.projectObj.location')"
            />
            <el-table-column
@@ -92,29 +93,33 @@
              prop="remarks"
              :label="$t('dataManage.projectObj.remarks')"
            />
            <el-table-column label="操作" width="200">
            <el-table-column
              label="操作"
              width="200"
            >
              <template slot-scope="scope">
                <el-button
                  v-if="btnStatus.delete"
                  @click="deleteProject(scope.row)"
                  icon="el-icon-delete"
                  size="mini"
                  size="small"
                  type="danger"
                  >{{ $t('common.delete') }}</el-button
                >
                >{{ $t('common.delete') }}</el-button>
                <el-button
                  v-if="btnStatus.update"
                  @click="EditProject(scope.row)"
                  icon="el-icon-edit"
                  type="info"
                  size="mini"
                  >{{ $t('common.update') }}</el-button
                >
                  size="small"
                >{{ $t('common.update') }}</el-button>
              </template>
            </el-table-column>
          </el-table>
          <div style="margin-top: 10px" class="pagination_box">
            <el-pagination
          <div
            style="margin-top: 10px"
            class="pagination_box"
          >
            <!-- <el-pagination
              @size-change="handleLoaderSizeChange"
              @current-change="handleLoaderCurrentChange"
              :current-page="listLoader.pageIndex"
@@ -123,7 +128,7 @@
              layout="total, sizes, prev, pager, next, jumper"
              :total="count1"
            >
            </el-pagination>
            </el-pagination> -->
          </div>
          <!-- <el-form
            class="projFrom"
@@ -235,7 +240,10 @@
            <el-input v-model="editFrom.projtype"></el-input>
          </el-form-item>
          <el-form-item :label="$t('dataManage.projectObj.location')">
            <el-input :disabled="true" v-model="editFrom.location"></el-input>
            <el-input
              :disabled="true"
              v-model="editFrom.geom"
            ></el-input>
            <el-link
              @click="ShowInner"
              style="color: white; margin-left: 20px"
@@ -269,14 +277,21 @@
          </el-form-item>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
      <div
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          type="info"
          size="small"
          :disabled="behavior != '新增项目' ? true : false"
          @click="setRestEditFrom"
          >{{ $t('common.reset') }}</el-button
        >
        <el-button class="primary" @click="insertEditFrom">{{
        >{{ $t('common.reset') }}</el-button>
        <el-button
          size="small"
          type="primary"
          @click="insertEditFrom"
        >{{
          $t('common.confirm')
        }}</el-button>
      </div>
@@ -307,7 +322,7 @@
      showMap: false,
      count: null,
      projectFrom: {},
      editFrom: { location: ' ' },
      editFrom: { geom: ' ' },
      dirId: null,
      elProject: [],
      dirList: [], //el树数据
@@ -357,12 +372,13 @@
          this.getSelectProject();
          done();
        })
        .catch((_) => {});
        .catch((_) => { });
    },
    innerClose() {
      this.showMap = false;
      this.innerVisible = false;
      this.editFrom.location = this.$store.state.projeOl;
      ;
      this.editFrom.geom = this.$store.state.projeOl;
    },
    async insertEditFrom() {
      if (this.behavior == '新增项目') {
@@ -386,13 +402,12 @@
      this.setRestEditFrom();
    },
    setRestEditFrom() {
      this.editFrom = { location: ' ' };
      this.editFrom = { geom: ' ' };
      this.$store.state.projeOl = null;
    },
    //删除项目
    async deleteProject(row) {
      debugger;
      const data = await project_delete({ gid: row.gid });
      if (data.code != 200) {
        this.$message.error('项目删除失败');
@@ -405,7 +420,7 @@
      this.behavior = '修改项目';
      this.outerVisible = true;
      this.editFrom = row;
      this.$store.state.projeOl = row.location;
      this.$store.state.projeOl = row.geom;
    },
    //新增项目
    insertProject() {
@@ -467,10 +482,9 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.verSionBox {
  height: 81%;
  width: 97%;
  position: absolute;
  box-sizing: border-box;
  height: 98%;
  width: 98%;
  padding: 1%;
  .verSionContent {
    width: 100%;
    height: 92%;
@@ -478,16 +492,16 @@
    justify-content: space-between;
    .verSion_leftTree {
      width: 15%;
      height: 95%;
      height: 91%;
      border: 1px solid white;
      border-radius: 5px;
      padding: 1%;
      max-height: 670px;
      overflow-y: auto;
    }
    .verSion_rightContent {
      width: 80%;
      height: 95%;
      height: 91%;
      border: 1px solid white;
      border-radius: 5px;
      padding: 1%;
@@ -604,13 +618,13 @@
    // 滚动条宽高
    .el-table__body-wrapper::-webkit-scrollbar {
      width: 5px;
      height: 5px;
      height: 10px;
    }
    .el-table__body-wrapper::-webkit-scrollbar {
      width: 5px;
      /*滚动条宽度*/
      height: 5px;
      height: 10px;
      /*滚动条高度*/
    }
    /*定义滚动条轨道 内阴影+圆角*/