hanbaoshan
2020-08-08 98a44e94ecc76abd72b9817648ca4b91469b936a
添加退出登录,布局调整
15个文件已修改
360 ■■■■■ 已修改文件
public/index.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/index/App.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/components/DataStackInfo.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/datapush/index/LeftList.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/datapush/index/RightEvent.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/datapush/index/main.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/components/DFrame.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/components/NoticeTip.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/components/Tools.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/mock/userData.json 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/gb28181/index/App.vue 197 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/library/index/App.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/search/index/App.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/search/index/Searching.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/components/BasicSetting.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html
@@ -316,6 +316,9 @@
    .pl20 {
      padding-left: 20px;
    }
    /* .flex-box{
      display: flex;
    } */
    .el-button--primary {
      color: #FFFFFF;
      background-color: #3D68E1!important;
src/pages/ai/index/App.vue
@@ -21,16 +21,8 @@
            >
              <el-tab-pane label="已安装" name="myAlgorithm">
                <div class="width-new-line task-list" v-show="activeName === 'myAlgorithm'">
                  <p class="src-title">算法软件</p>
                  <div class="flex-list">
                    <!-- <draggable
                :list="installedList"
                :group="{ name: 'article', pull: 'clone', put: false }"
                :sort="false"
                @start="startRight"
                @end="endLeft"
                style="display:inline"
                    >-->
                    <div class="wrap-box" v-for="item in ungradeList" :key="item.id">
                      <div class="list-choose-item-left">
                        <div class="mask">
@@ -119,7 +111,7 @@
                      </div>
                    </div>
                  </div>
                  <!-- 未下载 -->
                  <p class="src-title">应用软件</p>
                </div>
              </el-tab-pane>
@@ -134,7 +126,7 @@
                      single
                      tip
                      tipWords="上传算法"
                      uploadPlaceholder="离线安装算法"
                      uploadPlaceholder="上传安装软件"
                      url="/data/api-v/sdk/upload"
                      @complete="onFileUpload"
                      @file-added="onFileAdded"
@@ -144,7 +136,7 @@
              </el-tab-pane>
              <el-tab-pane label="应用中心" name="algorithmMall" v-show="activeName==='algorithmMall'">
                <div class="tab-content">
                  <p>算法软件</p>
                  <p class="src-title">算法软件</p>
                  <div class="store-list">
                    <div class="wrap-box">
                      <div class="inner">
@@ -162,7 +154,7 @@
                      </div>
                    </div>
                  </div>
                  <p>应用软件</p>
                  <p class="src-title">应用软件</p>
                  <div class="app-list"></div>
                </div>
                <el-drawer title="下载" :visible.sync="actDrawerShow" :direction="direction">
@@ -1116,6 +1108,7 @@
  height: 100%;
  box-sizing: border-box;
  text-align: left;
  min-width: 1106px;
  // background-color: #f2f6fc;
  .s-video-manage-breadcrumb {
    height: 5%;
@@ -1166,6 +1159,15 @@
    text-align: center;
    color: #666;
  }
}
.src-title{
  color: #333;
  font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC';
  font-weight: 650;
  font-style: normal;
  height: 36px;
  font-size: 15px;
  padding-left: 25px;
}
.task-manage {
  height: 100%;
@@ -1249,8 +1251,9 @@
      }
      .task-list {
        background: #fff;
        padding: 30px 20px 20px;
        padding: 20px;
        box-sizing: border-box;
        .flex-list {
          display: flex;
          flex-direction: row;
src/pages/cameraAccess/components/DataStackInfo.vue
@@ -118,7 +118,7 @@
      v-show="activeName === 'uploaded' "
      :data="fileList"
      tooltip-effect="dark"
      style="width: 99%"
      border
      :header-cell-style="{background:'#f8f8f8', color:'#222222', textAlign:'center'}"
      @select="handleSelect"
@@ -707,7 +707,8 @@
.data-stack-info {
  width: 100%;
  height: 100%;
  margin-left: 20px;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
  .ai-select {
    text-align: left;
@@ -767,7 +768,6 @@
    .btn-right {
      float: right;
      margin-top: -5px;
      margin-right: 10px;
      .btn {
        cursor: pointer;
        font-size: 20px;
src/pages/datapush/index/LeftList.vue
@@ -183,15 +183,16 @@
  left: 0px;
  width: 355px;
  height: 100%;
  margin-top: 20px;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}
.out-div {
  width: 350px;
  text-align: left;
  padding-top: 20px;
  //height: 50em;
  .left-list {
    position: absolute;
    left: 15px;
src/pages/datapush/index/RightEvent.vue
@@ -199,7 +199,7 @@
        <div class="div-border">{{eventData.eventTxt}}</div>
      </div>
      <div class="save-btn">
        <el-button type="info" size="small" @click="onCancle">取消</el-button>
        <el-button type="info" size="small" @click="onCancle" style="color:#222">取消</el-button>
        <el-button type="primary" @click="eventPushsSave" size="small">保存</el-button>
      </div>
    </div>
src/pages/datapush/index/main.ts
@@ -2,7 +2,7 @@
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "@/assets/css/element-variables.scss";
import "../../../assets/css/common.scss"
import App from './App.vue'
import moment from "moment";
Vue.prototype.$moment = moment;
src/pages/desktop/index/components/DFrame.vue
@@ -80,8 +80,11 @@
        }
        e = e || window.event;
        e.preventDefault();
        this.width = this.resizeObj.startW + e.clientX - this.resizeObj.mouX;
        this.height = this.resizeObj.startH + e.clientY - this.resizeObj.mouY;
        let curWidth = this.resizeObj.startW + e.clientX - this.resizeObj.mouX;
        let curHeight = this.resizeObj.startH + e.clientY - this.resizeObj.mouY;
        this.width = curWidth;
        this.height = curHeight;
      }.bind(this)
    },
    mouseup() {
src/pages/desktop/index/components/NoticeTip.vue
@@ -70,6 +70,8 @@
  display: inline-block;
  padding: 8px;
  width: 170px;
  font-size: 14px;
  line-height: 22px;
}
.notice-tip-content-title {
src/pages/desktop/index/components/Tools.vue
@@ -31,14 +31,25 @@
        <img :src="`${publicPath}images/desktop/header-icon/notice.png`" alt />
      </div>
      <div class="tools-icon">
        <el-dropdown size="small" placement="bottom">
          <span class="el-dropdown-link">
        <img :src="`${publicPath}images/desktop/header-icon/user.png`" alt />
            <!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
          </span>
          <el-dropdown-menu slot="dropdown" style='top: 44px;'>
            <el-dropdown-item @click.native='toLogout'>
              退出登录
            </el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </div>
    </div>
  </div>
</template>
<script>
import {logout} from "@/api/login";
export default {
  name: "Tools",
  data() {
@@ -127,6 +138,33 @@
        debugger
        this.$store.commit("desktop/refreshFrame", dock);
      }
    },
    toLogout(){
      this.$confirm("提示:确定退出吗?", {
        center: true,
        cancelButtonClass: "comfirm-class-cancle",
        confirmButtonClass: "comfirm-class-sure"
      }).then(_ => {
        logout().then(res => {
          if (res === "退出成功") {
            sessionStorage.removeItem("userInfo");
            location.assign('/view/index');
            this.$notify({
              title: "提示",
              type: "success",
              message: "退出成功!"
            });
          } else {
            this.$notify({
              title: "提示",
              type: "success",
              message: "退出失败!"
            });
          }
        });
      }).catch(_ => {
        console.log("退出失败");
      });
    }
  }
};
@@ -225,4 +263,7 @@
  height: 100%;
  margin-right: 14px;
}
.el-dropdown-menu{
  top: 40px !important;
}
</style>
src/pages/desktop/index/mock/userData.json
@@ -12,7 +12,7 @@
        "url": "/view/gb28181",
        "title": "GB28181配置",
        "width": 600,
        "height": 500
        "height": 700
      },
      {
        "id": "12",
@@ -22,8 +22,8 @@
        "type": "2",
        "url": "/view/cameraVideo",
        "title": "实时监控",
        "width": 1528,
        "height": 915
        "width": 1465,
        "height": 763
      },
      {
        "id": "9",
@@ -33,8 +33,8 @@
        "type": "2",
        "url": "/view/ai",
        "title": "应用中心",
        "width": 1528,
        "height": 915
        "width": 1243,
        "height": 766
      },
      {
        "id": "1",
@@ -65,7 +65,9 @@
        "alt": "data-push",
        "type": "2",
        "url": "/view/datapush",
        "title": "数据推送"
        "title": "数据推送",
        "width": 1024,
        "height": 512
      },
      {
        "id": "7",
@@ -76,7 +78,7 @@
        "url": "/view/library",
        "title": "比对库管理",
        "width": 1542,
        "height": 800
        "height": 750
      },
      {
        "id": "11",
@@ -97,7 +99,7 @@
        "type": "2",
        "url": "/view/search",
        "title": "统计查询",
        "width": 1445,
        "width": 1410,
        "height": 675
      },
      {
src/pages/gb28181/index/App.vue
@@ -16,12 +16,18 @@
        </template>
        <el-menu-item-group class="item-group">
          <!-- GB28181设置 -->
          <el-form :model="gb28181" :rules="rules" label-width="130px" class="alarmSetting" ref="gb28181">
          <el-form
            :model="gb28181"
            :rules="rules"
            label-width="130px"
            class="alarmSetting"
            ref="gb28181"
          >
            <!-- <el-form-item label="国际服务器IP" prop="ServerIp">
                  <ip-input :ip="gb28181.ServerIp" @on-blur="gb28181.ServerIp = arguments[0]"></ip-input>
            </el-form-item>-->
            <div style="text-align: left;margin-bottom: 22px;">
            <div style="text-align: left;margin-bottom: 16px;">
              <el-radio-group v-model="gb28181.idType">
                <el-radio :label="0">输入已有ID</el-radio>
                <el-radio :label="1">生成新的ID</el-radio>
@@ -76,7 +82,8 @@
                style="position: absolute"
                v-show="gb28181.idType === 1"
                @click="newGBID"
              >生成ID</el-button>
                >生成ID</el-button
              >
            </el-form-item>
            <!-- <el-form-item label="国际服务器端口" prop="GbServerPort">
@@ -84,11 +91,19 @@
            </el-form-item>-->
            <el-form-item label="国标ID">
              <el-input v-model="gb28181.PublicId" placeholder="请输入" size="small"></el-input>
              <el-input
                v-model="gb28181.PublicId"
                placeholder="请输入"
                size="small"
              ></el-input>
            </el-form-item>
            <el-form-item label="国标端口" prop="ServerPort">
              <el-input v-model.number="gb28181.GbServerPort" placeholder="请输入" size="small"></el-input>
              <el-input
                v-model.number="gb28181.GbServerPort"
                placeholder="请输入"
                size="small"
              ></el-input>
            </el-form-item>
            <el-form-item label="开启鉴权">
@@ -96,13 +111,80 @@
            </el-form-item>
            <el-form-item label="鉴权密码" v-show="gb28181.IsAuth">
              <el-input v-model="gb28181.Password" placeholder="请输入" size="small"></el-input>
              <el-input
                v-model="gb28181.Password"
                placeholder="请输入"
                size="small"
              ></el-input>
            </el-form-item>
            <el-form-item >
              <el-button type="primary" @click="submitGB28281" size="small">保存</el-button>
              <el-button type="primary" @click="submitGB28281" size="small"
                >保存</el-button
              >
            </el-form-item>
          </el-form>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="1">
        <template slot="title">
          <b class="tree-font">接入平台列表</b>
        </template>
        <el-menu-item-group class="item-group">
          <div>
            <el-table
              :data="tableList"
              border
              fit
              highlight-current-row
              style="width: 100%; color:#000"
              :header-cell-style="{ background: '#f8f8f8', color: '#222222', height:'30px'  }"
            >
              <el-table-column
                type="index"
                label="序号"
                align="center"
                width="50"
              ></el-table-column>
              <el-table-column
                prop="name"
                label="名称"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="id"
                label="ID"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="ip"
                label="IP"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="status"
                label="状态"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="mark"
                label="备注"
                align="center"
              ></el-table-column>
            </el-table>
          </div>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <b class="tree-font">国际摄像机</b>
        </template>
        <el-menu-item-group class="item-group">
          <div>
            <div>
              <el-button type="primary" size="small">刷新</el-button>
            </div>
          </div>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
@@ -115,12 +197,12 @@
  saveGB28181Config,
  getGb28181AreaList,
  newGb28181ID
} from "./api";
} from './api'
import { isPort, isIPv4 } from "@/scripts/validate";
import { isPort, isIPv4 } from '@/scripts/validate'
export default {
  name: "Gb28181Setting",
  name: 'Gb28181Setting',
  directives: {
    focus: {
      inserted: function (el) {
@@ -130,42 +212,42 @@
  },
  data() {
    return {
      gb28181: {
      },
      openeds: ['0'],
      gb28181: {},
      tableList: [],
      idType: 1,
      rules: {
        ip: [
          {
            required: true,
            message: "请输入IP地址",
            trigger: "change"
            message: '请输入IP地址',
            trigger: 'change'
          },
          { validator: isIPv4, trigger: "change" }
          { validator: isIPv4, trigger: 'change' }
        ],
        ServerIp: [
          {
            required: true,
            message: "请输入IP地址",
            trigger: "change"
            message: '请输入IP地址',
            trigger: 'change'
          },
          { validator: isIPv4, trigger: "change" }
          { validator: isIPv4, trigger: 'change' }
        ],
        ServerPort: [
          {
            required: true,
            message: "请输入端口",
            trigger: "change"
            message: '请输入端口',
            trigger: 'change'
          },
          { validator: isPort, trigger: "change" }
          { validator: isPort, trigger: 'change' }
        ],
        GbServerPort: [
          {
            required: true,
            message: "请输入端口",
            trigger: "change"
            message: '请输入端口',
            trigger: 'change'
          },
          { validator: isPort, trigger: "change" }
          { validator: isPort, trigger: 'change' }
        ]
      },
      locationCity: {
@@ -175,84 +257,92 @@
        provinceOptions: [],
        cityOptions: [],
        countyOptions: []
      },
    };
      }
    }
  },
  mounted() {
    //this.$nextTick(()=>{
      this.initGB28181Conf();
    this.initGB28181Conf()
    //})
  },
  methods: {
    initGB28181Conf() {
      getGB28181Config().then(rsp => {
        if (rsp && rsp.success) {
          this.gb28181 = rsp.data;
          this.gb28181 = rsp.data
          //this.gb28181.idType = 0;
          this.$set(this.gb28181,'idType',0);
          this.$set(this.gb28181, 'idType', 0)
        }
      });
      })
      getGb28181AreaList().then(rsp => {
        if (rsp && rsp.success) {
          this.locationCity.provinceOptions = rsp.data;
          this.locationCity.provinceOptions = rsp.data
        }
      })
    },
    submitGB28281() {
      this.$refs["gb28181"].validate(valid => {
      this.$refs['gb28181'].validate(valid => {
        if (valid) {
          saveGB28181Config(this.gb28181).then(rsp => {
            if (rsp && rsp.success) {
              this.$notify({
                type: "success",
                message: "GB28181设置保存成功"
              });
                type: 'success',
                message: 'GB28181设置保存成功'
              })
            }
          });
          })
        } else {
          console.log("error submit!!");
          return false;
          console.log('error submit!!')
          return false
        }
      });
      })
    },
    changeProvince() {
      let pid = this.locationCity.province;
      let pid = this.locationCity.province
      getGb28181AreaList({ parentId: pid }).then(rsp => {
        if (rsp && rsp.success) {
          this.locationCity.cityOptions = rsp.data;
          this.locationCity.city = this.locationCity.cityOptions[0].id;
          this.changeCity();
          this.locationCity.cityOptions = rsp.data
          this.locationCity.city = this.locationCity.cityOptions[0].id
          this.changeCity()
        }
      })
    },
    changeCity() {
      let pid = this.locationCity.city;
      let pid = this.locationCity.city
      getGb28181AreaList({ parentId: pid }).then(rsp => {
        if (rsp && rsp.success) {
          this.locationCity.countyOptions = rsp.data;
          this.locationCity.county = this.locationCity.countyOptions[0].id;
          this.locationCity.countyOptions = rsp.data
          this.locationCity.county = this.locationCity.countyOptions[0].id
        }
      })
    },
    newGBID() {
      let cCode = this.locationCity.county + "";
      let cCode = this.locationCity.county + ''
      newGb28181ID({ code: cCode }).then(rsp => {
        if (rsp && rsp.success) {
          this.gb28181.PublicId = rsp.data;
          this.gb28181.PublicId = rsp.data
        }
      })
    },
    menuOpen(){
    }
  }
};
}
</script>
<style lang="scss">
.s-basic-setting {
  height: 100%;
  padding: 30px;
  padding: 20px;
  box-sizing: border-box;
  .item-group {
    padding: 0 15px;
    margin-bottom: 15px;
  }
  .el-form {
    .el-form-item {
      text-align: left;
      margin-bottom: 16px;
      &:last-of-type{
        width: 490px;
      }
@@ -279,8 +369,11 @@
      .el-form-item__label {
        text-align: left;
      }
      &.el-form-item.is-required:not(.is-no-asterisk)
        > .el-form-item__label:before {
        margin-left: -9px;
    }
    }
  }
  .alarmSetting {
    .el-input {
src/pages/library/index/App.vue
@@ -125,6 +125,7 @@
.s-base-manage {
  box-sizing: border-box;
  background-color: #e9ebf2;
  min-width: 1315px;
}
.base-overflow {
  overflow: visible !important;
src/pages/search/index/App.vue
@@ -67,6 +67,7 @@
<style lang="scss" scoped>
.column {
  overflow: hidden;
  min-width: 1402px;
}
.column-left {
  height: 100vh;
src/pages/search/index/Searching.vue
@@ -94,7 +94,7 @@
              ></el-option>
            </el-select>
          </p>
          <p class="p-date" style="width:19%">
          <p class="p-date" style="width:19%;vertical-align: top;">
            <el-date-picker
              size="mini"
              v-model="searchTime"
src/pages/settings/components/BasicSetting.vue
@@ -256,7 +256,7 @@
      <el-tab-pane label="集群管理" name="third">
        <cluster-management></cluster-management>
      </el-tab-pane>
      <el-tab-pane label="外部网络" name="fourth">
      <el-tab-pane label="外部访问" name="fourth">
        <el-menu
          :default-openeds="openeds"
          background-color="#fff"
@@ -294,22 +294,7 @@
              </el-form>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="1">
            <template slot="title">
              <b class="tree-font">外部访问列表</b>
            </template>
            <el-menu-item-group class="item-group">
              <div>
                <el-table :data="ipServer.fileTable" border fit style="width: 100%">
                  <el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
                  <el-table-column prop="date" label="名称" align="center"></el-table-column>
                  <el-table-column prop="name" label="ID" align="center"></el-table-column>
                  <el-table-column prop="name" label="IP" align="center"></el-table-column>
                  <el-table-column prop="name" label="在线状态" align="center"></el-table-column>
                </el-table>
              </div>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-tab-pane>
      <el-tab-pane label="权限管理" name="user">
@@ -461,29 +446,6 @@
        ip: "",
        localhost: "",
        localFilePort: "",
        fileTable: [
          {
            date: '2016-05-02',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1518 弄',
            edit: false
          }, {
            date: '2016-05-04',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1517 弄',
            edit: false
          }, {
            date: '2016-05-01',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1519 弄',
            edit: false
          }, {
            date: '2016-05-03',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1516 弄',
            edit: false
          }
        ]
      },
      locationCity: {
        province: '',