heyujie
2021-06-24 7cea2db9d57b24d98e42b5207fa6f9a703362e26
朔黄和系统设置
7个文件已修改
362 ■■■■ 已修改文件
src/api/system.ts 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/user.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/leftNav.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/lkgManage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/systemSettings/index/App.vue 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/systemSettings/views/NetSettings.vue 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system.ts
@@ -135,6 +135,37 @@
  });
};
export const setServerName = (query: any) => {
  return request({
    url: "/data/api-v/sysset/setSerName",
    method: "post",
    data: qs.stringify(query)
  });
};
export const getWireList = (query: any) => {
  return request({
    url: "/data/api-v/sysset/getNetWorkCards",
    method: "get",
    data: (query)
  });
};
export const setNetWorkCard = (query: any) => {
  return request({
    url: "/data/api-v/sysset/setNetWorkCard",
    method: "post",
    data: qs.stringify(query)
  });
};
export const getNetWorkCardInfo = (query: any) => {
  return request({
    url: "/data/api-v/sysset/getNetWorkCardInfo",
    method: "post",
    data: qs.stringify(query)
  });
};
export const deleteDate = (query: any) => {
  return request({
    url: "/data/api-v/clearData/deleteEsData",
src/api/user.ts
@@ -64,3 +64,10 @@
  });
};
export const deleteUser = (params: any) => {
  return request({
    url: "/data/api-u/users/delUser",
    method: "post",
    data: params
  });
};
src/pages/shuohuangMonitorAnalyze/components/leftNav.vue
@@ -40,7 +40,7 @@
        </template>
        <el-menu-item index="transferMemo">视频转储记录</el-menu-item>
        <el-menu-item index="transferDeviceManage">转储设备管理</el-menu-item>
        <el-menu-item index="lkgManage">LKG数据管理</el-menu-item>
        <el-menu-item index="lkgManage">LKJ数据管理</el-menu-item>
      </el-submenu>
      <el-submenu index="7">
        <template slot="title">
src/pages/shuohuangMonitorAnalyze/components/lkgManage.vue
@@ -1,7 +1,7 @@
<template>
  <div class="lkg-manage">
    <div class="import-btn">
      <label>上传LKG数据文件</label>
      <label>上传LKJ数据文件</label>
      <el-button
        size="mini"
        type="primary"
src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
@@ -17,7 +17,8 @@
              v-for="(item, index) in popDownArr"
              :key="index"
              :command="item"
            >{{ item.CameraPosition }}</el-dropdown-item>
              >{{ item.CameraPosition }}</el-dropdown-item
            >
          </el-dropdown-menu>
        </el-dropdown>
@@ -118,7 +119,11 @@
          </template>
          <div class="player-control">
            <div class="progress-bar">
              <el-tooltip placement="top" v-for="(item, index) in eventMarks" :key="index">
              <el-tooltip
                placement="top"
                v-for="(item, index) in eventMarks"
                :key="index"
              >
                <div slot="content">
                  {{ getTimeStr(item.offset) }}
                  <br />
@@ -132,7 +137,11 @@
                  @click="dotJump(item.offset)"
                ></div>
              </el-tooltip>
              <el-tooltip placement="top" v-for="(item, index) in labelMarks" :key="index">
              <el-tooltip
                placement="top"
                v-for="(item, index) in labelMarks"
                :key="index"
              >
                <div slot="content">
                  {{ getTimeStr(item.offset) }}
                  <br />
@@ -201,16 +210,21 @@
                v-show="isUnusual == 1"
                type="primary"
                @click="addLabel(curVideo)"
              >添加标注</el-button>
                >添加标注</el-button
              >
            </div>
            <div class="flex-box fixed-height-box">
              <label v-if="!showTable">标注信息:</label>
              <div class="mark-list" v-if="!showTable">
                <div class="mark" v-for="mark in curVideo.LableLst" :key="mark.ID">
                <div
                  class="mark"
                  v-for="mark in curVideo.LableLst"
                  :key="mark.ID"
                >
                  <div class="time">
                    <span>
                      {{ pad0(Math.floor(mark.Time / 60)) }}:{{
                      pad0(mark.Time % 60)
                        pad0(mark.Time % 60)
                      }}
                    </span>
                    <i class="el-icon-edit" @click="editCurLabel(mark)"></i>
@@ -269,12 +283,19 @@
      <div class="label-check">
        <p class="label">隐患问题:</p>
        <el-checkbox-group v-model="labelCheckedList">
          <el-checkbox v-for="item in labelOptions" :key="item.ID" :label="item.ID">{{ item.Name }}</el-checkbox>
          <el-checkbox
            v-for="item in labelOptions"
            :key="item.ID"
            :label="item.ID"
            >{{ item.Name }}</el-checkbox
          >
        </el-checkbox-group>
      </div>
      <div class="btns">
        <el-button @click="cancelLabelChecked" size="small">取消</el-button>
        <el-button @click="submitLabelChecked" size="small" type="primary">确定</el-button>
        <el-button @click="submitLabelChecked" size="small" type="primary"
          >确定</el-button
        >
      </div>
    </el-dialog>
  </div>
@@ -332,11 +353,11 @@
  filters: {
    fixPath(str) {
      if (!str || str == undefined) {
        return ""
        return "";
      }
      return str.replace("/opt/vasystem", "")
    }
      return str.replace("/opt/vasystem", "");
    },
  },
  data() {
    return {
@@ -532,26 +553,6 @@
      _this.$nextTick(() => {
        _this.$refs[`player_${_this.curVideo.id}`][0].init();
      });
      // let _this = this;
      // console.log(cmd)
      // getCarVideos({
      //   TrainNumber: cmd.TrainNumber,
      //   CarNumber: cmd.CarNumber,
      //   Driver1: cmd.Driver1,
      // }).then((res) => {
      //   _this.allCurVideos = res.data;
      //   _this.curCamera = cmd.CameraPosition;
      //   _this.curRoomVideos = _this.allCurVideos.filter((item) => {
      //     return item.CameraPosition == cmd.CameraPosition;
      //   });
      //   _this.curVideo = _this.curRoomVideos.find((item) => {
      //     return item.ID == cmd.ID;
      //   });
      //   _this.$nextTick(() => {
      //     _this.$refs[`player_${_this.curVideo.ID}`][0].init();
      //   });
      // });
    },
    pad0(val) {
      return val < 10 ? "0" + val : val;
@@ -569,7 +570,6 @@
        CarNumber: v.CarNumber,
        Driver1: v.Driver1,
      }).then((res) => {
        res.data.forEach((item) => {
          item.marks = _this.mergeMarks(item);
        });
@@ -601,7 +601,8 @@
        _this.$nextTick(() => {
          _this.$refs[`player_${_this.curVideo.id}`][0].init();
          let arr = _this.maxVideoTime.split(":");
          let min = +arr[1], sec = +arr[2];
          let min = +arr[1],
            sec = +arr[2];
          _this.maxSecond = min * 60 + sec;
        });
      });
@@ -617,7 +618,7 @@
          _this.curCamera = _this.popDownArr[0].CameraPosition;
        }
      });
      _this.popDownArr
      _this.popDownArr;
    },
    renderLabelOpts() {
      let _this = this;
@@ -627,7 +628,7 @@
    },
    refreshCurVideoLabel(video) {
      let _this = this;
      _this.popDownArr = []
      _this.popDownArr = [];
      getRelatedVideoInfo({ GroupID: video.GroupID }).then((res) => {
        res.data.forEach((item) => {
          _this.popDownArr.push(item);
@@ -635,17 +636,22 @@
            video.LableLst = item.LableLst;
          }
        });
        // res.data.forEach((d) => {
        //   if (item.ID === video.ID) {
        //     video.LableLst = item.LableLst;
        //   }
        // });
      });
      _this.popDownArr
      _this.popDownArr;
    },
    checkVideo(video, index) {
      this.refreshCurVideoLabel(video);
      this.curVideo = video;
      this.eventMarks = []
      this.labelMarks = []
      video.marks.forEach((item) => {
         if (item.type == 0) {
          this.eventMarks.push(item);
        } else {
          this.labelMarks.push(item);
        }
      })
      this.videoArrs = this.allCurVideos.filter(
        (item) => video.GroupID == item.GroupID
      );
@@ -740,10 +746,10 @@
    },
    removeCurLabel(mark) {
      let _this = this;
      debugger
      debugger;
      let obj = {
        ID: mark.ID,
        VideoIds: mark.VideoIds
        VideoIds: mark.VideoIds,
      };
      delLabel(obj).then((rsp) => {
        if (rsp && rsp.success) {
@@ -767,7 +773,7 @@
    },
    mergeMarks(videoInfo) {
      if (!videoInfo.EventLst || !videoInfo.LableLst) {
        console.log("mergeMarks data null")
        console.log("mergeMarks data null");
        return;
      }
@@ -906,7 +912,7 @@
              height: 8px;
              width: 6px;
              z-index: 1;
              background-color:yellowgreen ;
              background-color: yellowgreen;
              cursor: pointer;
              -webkit-transform: translateX(-50%);
              transform: translateX(-50%);
src/pages/systemSettings/index/App.vue
@@ -153,28 +153,26 @@
        <div class="permission" v-if="inAccountDetail && isSetPermission">
          <div class="title">权限管理</div>
          <div class="line">
            <div class="name">实时监控</div>
            <el-switch
              v-model="isRealtime"
              active-color="rgba(61, 104, 225, 1)"
            >
            </el-switch>
          <div class="line-wrap" v-for="item in sysMenus" :key="item.id">
            <div class="line">
              <div class="name">{{ item.name }}</div>
              <el-switch
                v-model="item.selected"
                active-color="rgba(61, 104, 225, 1)"
              >
              </el-switch>
            </div>
            <div v-if="item.children">
                <div class="line" style="margin-left:55px;" v-for="x in item.children" :key="x.id">
                  <div class="name">{{ x.name }}</div>
                  <el-switch
                    v-model="x.selected"
                    active-color="rgba(61, 104, 225, 1)"
                  >
                  </el-switch>
                </div>
              </div>
          </div>
          <div class="line">
            <div class="name">统计查询</div>
            <el-switch v-model="isCount" active-color="rgba(61, 104, 225, 1)">
            </el-switch>
          </div>
          <div class="line">
            <div class="name">算力管理</div>
            <el-switch
              v-model="isCalculate"
              active-color="rgba(61, 104, 225, 1)"
            >
            </el-switch>
          </div>
          <div class="btns">
            <div class="cancel" @click="cancelSet">取消</div>
            <div class="ok">保存</div>
@@ -451,6 +449,9 @@
  getUsers,
  updateUser,
  updatePassword,
  deleteUser,
  getUserMenus,
  getSysMenus,
} from "@/api/user";
import switchBar from "../components/switchBar";
import ipInput from "@/components/subComponents/IPInput";
@@ -541,7 +542,8 @@
      showYrsInput: false,
      showMonthInput: false,
      showDayInput: false,
      cameraInfo: false,
      dependentScene: false,
      timestamp: 0,
      inAccountDetail: false,
      isChangePw: false,
@@ -582,6 +584,7 @@
        confirmPassword: "",
      },
      activeAccountIndex: 0,
      sysMenus: [],
      addForm: {
        userName: "",
        nickName: "",
@@ -622,6 +625,7 @@
    });
    this.fetchUserList();
    this.fetchSysMenus();
  },
  methods: {
    fetchUserList() {
@@ -887,7 +891,6 @@
    syncBrowser(val) {
      this.isSyncBrowser = val;
      if (val == false) {
        console.log(12121);
        clearInterval(this.browserTimer);
      } else {
        this.browserTimer = setInterval(() => {
@@ -899,7 +902,6 @@
        }, 1000);
      }
    },
    openChangePw() {},
    showAddAccount() {
      this.inAccountDetail = false;
      this.isAddAccount = true;
@@ -911,6 +913,14 @@
    cancelChangePassword() {
      this.isChangePw = false;
      this.inAccountDetail = false;
    },
    fetchSysMenus() {
      getSysMenus().then((rsp) => {
        if (rsp && rsp.success) {
          this.sysMenus = rsp.data;
          console.log(this.sysMenus);
        }
      });
    },
    saveAddAccount(formName) {
      this.$refs[formName].validate((valid) => {
@@ -982,9 +992,19 @@
        cancelButtonText: "取消",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          debugger;
          deleteUser({
            ids: [this.activeAccountItem.id],
          }).then((res) => {
            if (res.success) {
              this.fetchUserList();
              this.$message({
                type: "success",
                message: "删除成功!",
              });
            } else {
              this.$message.warning("删除失败");
            }
          });
        })
        .catch(() => {});
@@ -992,9 +1012,25 @@
    openPermission() {
      this.inAccountDetail = true;
      this.isSetPermission = true;
      getUserMenus({
        userId: this.activeAccountItem.id,
      }).then((res) => {
        if (res && res.success) {
          res.data.menus.forEach(e => {
          });
        }
      });
      //  getUserMenus({ userId: row.id }).then(rsp => {
      //   if (rsp && rsp.success) {
      //     this.userMenus = rsp.data.menus.map(menu => {
      //       return menu.id
      //     })
      //   }
      // })
    },
  },
  watch: {
    isManual(v) {
      this.isNtp = !v;
src/pages/systemSettings/views/NetSettings.vue
@@ -41,7 +41,7 @@
                size="small"
              ></el-input>
            </el-form-item>
            <div class="save-btn">保存</div>
            <div class="save-btn" @click="saveServerName">保存</div>
          </el-form>
        </div>
@@ -240,12 +240,13 @@
        <div class="wire" v-if="activePage == 'wire' && !inWireDetail">
          <div
            class="wire-bar"
            v-for="(item, i) in wireArr"
            :key="i"
            @click="checkWire(item)"
            @click.self="checkWire(item)"
          >
            <div class="name">{{ item.name }}</div>
            <div class="name">{{ "网络" + item.index }}</div>
            <div class="right">
              <span class="icon iconfont">&#xe676;</span>
@@ -260,18 +261,18 @@
          </div>
        </div>
        <div class="wire-detail" v-if="activePage == 'wire' && inWireDetail">
            <div class="title">网络设置</div>
          <div class="title">网络设置</div>
          <el-form
            :model="wireForm"
            :rules="wireFormRules"
            ref="wireForm"
            label-width="150px"
          >
     <el-form-item label="网络名称" prop="name">
              <div class="wifi-name">{{ 12123 }}</div>
            <el-form-item label="网络名称" prop="name">
              <div class="wifi-name">{{"网络" + activeWireItem.index }}</div>
            </el-form-item>
            <el-form-item label="网卡" prop="name">
              <div class="wifi-name">{{ 12123 }}</div>
            <el-form-item label="网卡" prop="ifname">
              <div class="wifi-name">{{ activeWireItem.name }}</div>
            </el-form-item>
            <el-form-item label="IP" prop="ip">
              <ip-input
@@ -288,23 +289,22 @@
            <el-form-item label="网关" prop="gateway">
              <ip-input
                :ip="ipv4Form.gateway"
                @on-blur="ipv4Form.gateway = arguments[0]"
                :ip="wireForm.gateway"
                @on-blur="wireForm.gateway = arguments[0]"
              ></ip-input>
            </el-form-item>
            <el-form-item label="首选DNS" prop="dns">
            <el-form-item label="DNS" prop="dns">
              <ip-input
                :ip="ipv4Form.dns1"
                @on-blur="ipv4Form.dns1 = arguments[0]"
              ></ip-input>
            </el-form-item>
            <el-form-item label="备用DNS" prop="dns">
              <ip-input
                :ip="ipv4Form.dns2"
                @on-blur="ipv4Form.dns2 = arguments[0]"
                :ip="wireForm.dns"
                @on-blur="wireForm.dns = arguments[0]"
              ></ip-input>
            </el-form-item>
          </el-form>
          <div class="btns">
            <div class="cancel" @click="cancelSaveWire">取消</div>
            <div class="ok" @click="saveWire">保存</div>
          </div>
        </div>
      </div>
    </div>
@@ -328,6 +328,8 @@
  addESNode,
  getEsClusterInfo,
} from "@/api/clusterManage";
import { setServerName, getWireList, setNetWorkCard,getNetWorkCardInfo } from "@/api/system";
import cloudNode from "../components/CloudNode";
import ipInput from "@/components/subComponents/IPInput";
import { isIPv4 } from "@/scripts/validate";
@@ -358,18 +360,20 @@
        name: "",
        password: "",
      },
      wireArr: [{ name: "有线网络1" }, { name: "有线网络2" }],
      wireArr: [],
      inWifiDetail: false,
      wifiList: [{ name: "无线网络1" }, { name: "无线网络2" }],
      isOpenWifi: false,
      inWireDetail: false,
      wireForm:{
      wireForm: {
        dns:"",
        subMask:"",
        gateway:"",
        ip:"",
      },
      wireFormRules:{
      },
      wireFormRules: {},
      activePage: "net",
      activeWireItem: {},
      rules: {
        deviceName: [
          { required: true, message: "请输入设备名称", trigger: "change" },
@@ -401,8 +405,50 @@
  beforeDestroy() {},
  props: ["barName"],
  methods: {
    fetchWireList() {
      getWireList().then((res) => {
        if (res && res.success) {
          console.log(res);
          this.wireArr = res.data;
        }
      });
    },
    cancelSaveWire() {
      this.inWireDetail = false;
    },
    saveServerName() {
      setServerName({
        server_name: this.ruleForm.deviceName,
        server_port: this.ruleForm.port,
      }).then((res) => {
        console.log(res);
        if (res && res.success) {
          this.$message.success(res.data);
        }
      });
    },
    openRight(typ) {
      this.activePage = typ;
      if (typ == "wire") {
        this.fetchWireList();
      }
    },
    saveWire(ifname) {
      debugger
      let data ={
        ip: this.wireForm.ip,
        gateway: this.wireForm.gateway,
        dns: this.wireForm.dns,
        subMask: this.wireForm.subMask,
        ifname: this.activeWireItem.name,
      }
      setNetWorkCard(data).then((res) => {
        if (res&&res.success) {
          this.$message.success(res.data)
        }
      },(err) => {
        this.$message.error("保存失败:"+ err.msg)
      });
    },
    wifiControl(val) {},
    checkWifi() {
@@ -410,6 +456,18 @@
    },
    checkWire(item) {
      this.inWireDetail = true;
      this.activeWireItem = item;
      getNetWorkCardInfo({
        ifname:item.name
      }).then((res) => {
        if (res&&res.success) {
          debugger
          this.wireForm.ip = res.data.ip
          this.wireForm.gateway = res.data.gateway
          this.wireForm.dns = res.data.dns
          this.wireForm.subMask = res.data.subMask
        }
      })
    },
  },
};
@@ -417,6 +475,27 @@
<style lang="scss">
.all {
  width: 100%;
}
.wire-detail {
  .btns {
    display: flex;
    justify-content: space-between;
    .cancel {
      background-color: rgba(240, 240, 240, 1);
      height: 40px;
      line-height: 40px;
      width: 48%;
      border-radius: 10px;
    }
    .ok {
      background-color: rgba(61, 104, 225, 1);
      height: 40px;
      line-height: 40px;
      width: 48%;
      color: #fff;
      border-radius: 10px;
    }
  }
}
.cluster-content {
@@ -432,7 +511,8 @@
    overflow: auto;
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 10px;    border-right: 5px solid #f8f8f8;
    padding: 10px;
    border-right: 5px solid #f8f8f8;
    // background-color: lavender;
    .menu-item {