ZZJ
2022-06-23 feaf0a9778879ef211c5587a513ba4cbdabb52d0
bug修复
10个文件已修改
1个文件已添加
1997 ■■■■■ 已修改文件
public/css/common.scss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/images/appCenter/Group-11.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/appCenter/Group-112.png 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/index/App.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/index/detail.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/datapush/index/LeftList.vue 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/datapush/index/RightEvent.vue 536 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/library/components/personList.vue 983 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/views/NetSettings.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/views/generalSettings.vue 351 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/systemSettings/components/ClusterManagement.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/css/common.scss
@@ -331,3 +331,5 @@
  border-color: #3d68e1;
  background-color: #3d68e1;
}
public/images/appCenter/Group-11.png
public/images/appCenter/Group-112.png

src/pages/ai/index/App.vue
@@ -84,7 +84,12 @@
                    <img v-else :src="item.icon" alt />
                  </div>
                  <div class="desc">
                    <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    <el-tooltip
                      :content="item.sdk_name || item.name"
                      effect="light"
                    >
                      <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    </el-tooltip>
                    <div class="desc-2">版本 {{ item.version }}</div>
                  </div>
                  <div class="right-icon">
@@ -164,7 +169,12 @@
                    <img v-else :src="item.icon" alt />
                  </div>
                  <div class="desc">
                    <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    <el-tooltip
                      :content="item.sdk_name || item.name"
                      effect="light"
                    >
                      <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    </el-tooltip>
                    <div class="desc-2">版本 {{ item.version }}</div>
                  </div>
                  <div class="right-btn">
@@ -300,7 +310,12 @@
                    <img v-else :src="item.icon" alt />
                  </div>
                  <div class="desc">
                    <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    <el-tooltip
                      :content="item.sdk_name || item.name"
                      effect="light"
                    >
                      <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    </el-tooltip>
                    <div class="desc-2">版本 {{ item.version }}</div>
                  </div>
                  <div class="right-btn">
@@ -350,7 +365,7 @@
                  tip
                  :sourceType="3"
                  :isDrag="true"
                  :attrs="{accept:'.zip,.tar,.gz,.tar.gz'}"
                  :attrs="{ accept: '.zip,.tar,.gz,.tar.gz' }"
                  tipWords="点击上传"
                  uploadPlaceholder="算法软件"
                  url="/data/api-v/sdk/upload"
@@ -986,6 +1001,7 @@
<style lang="scss">
.s-task-manage {
  width: 100% !important;
  min-width: 754px !important;
  height: 100%;
  box-sizing: border-box;
  text-align: left;
@@ -1562,5 +1578,14 @@
    }
  }
}
@media screen and (max-width: 800px) {
  .quick-path .left-items .quick-item:last-child {
    display: none !important;
  }
  .quick-path .left-items .quick-item:nth-child(2) {
    border: none !important;
  }
}
</style>
src/pages/ai/index/detail.vue
@@ -158,7 +158,10 @@
            />
          </div>
          <div class="desc">
                    <el-tooltip :content="item.name" effect="light">
            <div class="desc-1">{{ item.name }}</div>
                    </el-tooltip>
            <div class="desc-2">版本 {{ item.productVersion || "2.0.0" }}</div>
          </div>
          <div class="right-btn">
src/pages/datapush/index/LeftList.vue
@@ -1,26 +1,34 @@
<template>
  <div class="out-div">
    <div class="flex-center left-list">
      <el-input placeholder="请输入内容" v-model="eventName" size="mini" style="width: 280px">
      <el-input
        @change="findAll"
        placeholder="请输入内容"
        v-model="eventName"
        size="mini"
        style="width: 280px"
      >
        <i slot="suffix" class="el-input__icon el-icon-search"></i>
      </el-input>
      <div class="icon-btn" @click="add" style="margin-left:10px">
      <div class="icon-btn" @click="add" style="margin-left: 10px">
        <i class="el-icon-circle-plus-outline"></i>
        <span>&nbsp;新增</span>
      </div>
    </div>
    <div class="max-height" style="overflow-y:auto;overflow-x:hidden">
    <div class="max-height" style="overflow-y: auto; overflow-x: hidden">
      <el-row
        class="cursor-pointer"
        v-for="(item, index) in eventList"
        :key="item.id"
        @click.native="clickCategory(index, item)"
        :class="{activeRow:categoryIndex==index}"
        :class="{ activeRow: categoryIndex == index }"
      >
        <div class="event-name">
          <b>{{item.name}}</b>
          <p style="margin-top:8px; color:#9e9e9e">{{item.time_start}} ~ {{item.time_end}}</p>
          <b>{{ item.name }}</b>
          <p style="margin-top: 8px; color: #9e9e9e">
            {{ item.time_start }} ~ {{ item.time_end }}
          </p>
        </div>
        <div class="event-btn">
@@ -29,11 +37,11 @@
            @change="enabled(item)"
            :inactive-value="false"
            :active-value="true"
            style="margin-top:-5px"
            style="margin-top: -5px"
          ></el-switch>
          <span
            class="iconfont iconshanchu iconStyle1"
            style="color:#E74C3C"
            style="color: #e74c3c"
            @click.stop="deleteBase(item)"
          ></span>
        </div>
@@ -49,24 +57,24 @@
  props: {
    listWidth: {
      default: "350px",
      type: String
      type: String,
    },
    title: {
      default: "",
      type: String
      type: String,
    },
    isSelected: {
      default: false,
      type: Boolean
      type: Boolean,
    },
    type: {
      default: "",
      type: String
      type: String,
    },
    activeId: {
      default: "",
      type: String
    }
      type: String,
    },
  },
  data() {
    return {
@@ -76,7 +84,7 @@
      // 当前点击的事件对象
      clickBase: {},
      // 事件名称
      eventName: ""
      eventName: "",
    };
  },
  mounted() {
@@ -86,12 +94,12 @@
    async enabled(item) {
      let json = {
        id: item.id,
        enable: item.enable
        enable: item.enable,
      };
      let res = await changeStatus(json);
      if (res && res.success) {
        // console.log(res, "更新状态");
        this.$emit("enabled", item)
        this.$emit("enabled", item);
      }
      // this.$emit("getEvents", item);
    },
@@ -122,27 +130,27 @@
      this.$confirm("确定要删除该条推送任务吗?", {
        center: true,
        cancelButtonClass: "comfirm-class-cancle",
        confirmButtonClass: "comfirm-class-sure"
        confirmButtonClass: "comfirm-class-sure",
      }).then(() => {
        let json = {
          type: "formData",
          id: data.id
          id: data.id,
        };
        deleteByid(json).then(res => {
        deleteByid(json).then((res) => {
          if (res && res.success) {
            this.$emit("del-list");
            this.$notify({
              type: "success",
              message: "删除成功"
            })
              message: "删除成功",
            });
          }
        });
      })
      });
    },
    // 查询事件列表
    async findAll() {
      let json = {
        name: this.eventName
        name: this.eventName,
      };
      let res = await findAll(json);
      if (res && res.success) {
@@ -155,11 +163,9 @@
          });
        }
        this.eventList = res.data;
      }
    }
  }
    },
  },
};
</script>
<style lang="scss" scoped>
@@ -193,7 +199,7 @@
  padding-top: 20px;
  //height: 50em;
  .left-list {
    min-width:340px;
    min-width: 340px;
    position: absolute;
    left: 15px;
    top: 10px;
src/pages/datapush/index/RightEvent.vue
@@ -3,7 +3,12 @@
    <div class="s-right-config">
      <el-form>
        <el-form-item label="名称">
          <el-input v-model="taskEditData.name" placeholder="请输入名称" size="small" style="width: 400px"></el-input>
          <el-input
            v-model="taskEditData.name"
            placeholder="请输入名称"
            size="small"
            style="width: 400px"
          ></el-input>
        </el-form-item>
        <el-form-item label="时间">
@@ -24,7 +29,11 @@
          <i class="el-icon-circle-plus-outline"></i>
          <span>&nbsp;添加接口地址</span>
        </div>
        <div v-for="(item, index) in urls" :key="item.hash" class="flex-box server-url">
        <div
          v-for="(item, index) in urls"
          :key="item.hash"
          class="flex-box server-url"
        >
          <div>
            <el-checkbox v-model="item.enable"></el-checkbox>
            <span class="ml20">{{ "URL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" }}</span>
@@ -36,13 +45,22 @@
            ></el-input>
          </div>
          <div class="server-add">
            <i class="el-icon-remove-outline" @click="delUrl(index)" style="color: red; margin-right: 10px" />
            <i
              class="el-icon-remove-outline"
              @click="delUrl(index)"
              style="color: red; margin-right: 10px"
            />
            <i class="el-icon-circle-plus-outline" @click="addUrl()"></i>
          </div>
        </div>
        <el-form-item label="联动方式" style="margin-top: 20px; width: 100">
          <el-select v-model="taskEditData.lineWay" placeholder="请选择" size="small">
          <el-select
            v-model="taskEditData.lineWay"
            placeholder="请选择"
            size="small"
          >
            <el-option label="请选择" value=""></el-option>
            <el-option
              v-for="item in taskEditData.lineOptions"
              :key="item.value"
@@ -53,8 +71,12 @@
        </el-form-item>
        <el-form-item label="标签">
          <el-radio v-model="taskEditData.radioValue" label="1">满足全部</el-radio>
          <el-radio v-model="taskEditData.radioValue" label="2">满足任意一个</el-radio>
          <el-radio v-model="taskEditData.radioValue" label="1"
            >满足全部</el-radio
          >
          <el-radio v-model="taskEditData.radioValue" label="2"
            >满足任意一个</el-radio
          >
        </el-form-item>
      </el-form>
    </div>
@@ -72,11 +94,20 @@
        </div>
      </div>
      <div v-for="(rule, index) in dataList" :key="index" style="margin-top: 10px">
      <div
        v-for="(rule, index) in dataList"
        :key="index"
        style="margin-top: 10px"
      >
        <el-row :gutter="20">
          <!-- 主题 -->
          <el-col :span="4">
            <el-select v-model="rule.topic_type" placeholder="请选择" @change="selectTopic(rule, true)" size="small">
            <el-select
              v-model="rule.topic_type"
              placeholder="请选择"
              @change="selectTopic(rule, true)"
              size="small"
            >
              <el-option
                v-for="item in rule.topicTypeOptions"
                :key="item.id"
@@ -88,7 +119,12 @@
          <!-- 过滤值 -->
          <el-col :span="4">
            <el-select v-model="rule.topic_arg" placeholder="请选择" @change="selectArg(rule, true)" size="small">
            <el-select
              v-model="rule.topic_arg"
              placeholder="请选择"
              @change="selectArg(rule, true)"
              size="small"
            >
              <el-option
                v-for="item in rule.topicArgOptions"
                :key="item.id"
@@ -100,7 +136,11 @@
          <!-- 操作符 -->
          <el-col :span="4">
            <el-select v-model="rule.operator" placeholder="请选择" size="small">
            <el-select
              v-model="rule.operator"
              placeholder="请选择"
              size="small"
            >
              <el-option label="==" value="="></el-option>
            </el-select>
          </el-col>
@@ -125,7 +165,11 @@
          <!-- 过滤值 -->
          <el-col :span="4">
            <div v-if="rule.operator_type === 'custom'">
              <el-input v-model="rule.rule_value" placeholder="请输入内容" size="small"></el-input>
              <el-input
                v-model="rule.rule_value"
                placeholder="请输入内容"
                size="small"
              ></el-input>
            </div>
            <div v-else>
              <el-select
@@ -172,11 +216,21 @@
      </div>
      <div class="config-item">
        <b>推送字段</b>
        <el-button type="primary" size="mini" @click="openPushSetDialog">设置</el-button>
        <el-button type="primary" size="mini" @click="openPushSetDialog"
          >设置</el-button
        >
      </div>
      <div class="save-btn">
        <el-button type="info" size="small" @click="onCancle" style="color: #222">取消</el-button>
        <el-button type="primary" @click="eventPushsSave" size="small">保存</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>
    <el-dialog
@@ -189,19 +243,37 @@
      <div slot="title" class="slot-title">
        <p>请选择想要推送的字段</p>
        <div class="right">
          <el-checkbox v-model="allFieldChecked" @change="allCheckChange"></el-checkbox>
          <el-checkbox
            v-model="allFieldChecked"
            @change="allCheckChange"
          ></el-checkbox>
        </div>
      </div>
      <div class="check-area" v-for="configObj in tempPushSet" :key="configObj.id">
      <div
        class="check-area"
        v-for="configObj in tempPushSet"
        :key="configObj.id"
      >
        <div class="header">
          <div class="title">{{ configObj.name }}</div>
          <div class="right">
            <el-checkbox v-model="configObj.checked" @change="toggleConfigCheck(configObj)">全选</el-checkbox>
            <el-checkbox
              v-model="configObj.checked"
              @change="toggleConfigCheck(configObj)"
              >全选</el-checkbox
            >
          </div>
        </div>
        <div class="flex-box flex-wrap">
          <div class="param flex-box" v-for="param in configObj.children" :key="param.id">
            <el-checkbox v-model="param.checked" @change="checkChildren"></el-checkbox>
          <div
            class="param flex-box"
            v-for="param in configObj.children"
            :key="param.id"
          >
            <el-checkbox
              v-model="param.checked"
              @change="checkChildren"
            ></el-checkbox>
            <span class="param-name">{{ param.name }}</span>
            <el-input
              v-model="param.alias"
@@ -210,7 +282,7 @@
              @input="varifyField(param)"
              :style="{
                color: param.error ? 'red' : '',
                borderColor: param.error ? 'red' : ''
                borderColor: param.error ? 'red' : '',
              }"
            ></el-input>
          </div>
@@ -218,7 +290,11 @@
      </div>
      <div slot="footer" class="text-center">
        <el-button size="small" @click="canclePushFieldSet">取消</el-button>
        <el-button size="small" type="primary" :disabled="disabledPushFieldSet" @click="submitPushFieldSet"
        <el-button
          size="small"
          type="primary"
          :disabled="disabledPushFieldSet"
          @click="submitPushFieldSet"
          >保存</el-button
        >
      </div>
@@ -226,9 +302,9 @@
  </div>
</template>
<script>
import { eventPushsSave, findByEventTopic, getPushSet } from "@/api/event"
import { findDictionaryByType, findDictionaryByID } from "@/api/dictionary"
import { getTaskList } from "@/api/search"
import { eventPushsSave, findByEventTopic, getPushSet } from "@/api/event";
import { findDictionaryByType, findDictionaryByID } from "@/api/dictionary";
import { getTaskList } from "@/api/search";
export default {
  name: "rightEvent",
@@ -236,14 +312,14 @@
    eventObject: {
      type: Object,
      default: () => {
        return {}
      }
    }
        return {};
      },
    },
  },
  computed: {
    urls() {
      return this.taskEditData.urls
    }
      return this.taskEditData.urls;
    },
  },
  data() {
    return {
@@ -266,173 +342,187 @@
        topicArgOptions: {},
        operatorOptions: {},
        operatorTypeOpionts: {},
        ruleValueOptions: []
        ruleValueOptions: [],
      },
      pushFieldDialog: false,
      tempPushSet: [],
      pushFields: [],
      allFieldChecked: false,
      disabledPushFieldSet: true
    }
      disabledPushFieldSet: true,
    };
  },
  watch: {
    eventObject: {
      handler(newVal, oldVal) {
        this.taskEditData.enable = this.eventObject.enable
        this.taskEditData.enable = this.eventObject.enable;
        if (newVal !== oldVal) {
          if (this.taskEditData.id !== newVal.id) {
            this.dataList = []
            this.dataList = [];
            this.taskEditData.id = newVal.id
            this.taskEditData.name = newVal.name
            this.taskEditData.time = [this.eventObject.time_start, this.eventObject.time_end]
            this.taskEditData.serverIp = newVal.ip_ports
            this.taskEditData.urls = newVal.urls
            this.taskEditData.lineWay = newVal.link_type
            this.taskEditData.eventTxt = newVal.rule_text
            this.taskEditData.radioValue = newVal.is_satisfy_all ? "1" : "2"
            this.taskEditData.id = newVal.id;
            this.taskEditData.name = newVal.name;
            this.taskEditData.time = [
              this.eventObject.time_start,
              this.eventObject.time_end,
            ];
            this.taskEditData.serverIp = newVal.ip_ports;
            this.taskEditData.urls = newVal.urls;
            this.taskEditData.lineWay = newVal.link_type;
            this.taskEditData.eventTxt = newVal.rule_text;
            this.taskEditData.radioValue = newVal.is_satisfy_all ? "1" : "2";
            if (!this.taskEditData.urls) {
              this.$set(this.taskEditData, "urls", [])
              this.$set(this.taskEditData, "urls", []);
            }
            //this.taskEditData.push_set = this.eventObject.push_set;
            if (!this.eventObject.push_set.length) {
              this.$set(this.taskEditData, "push_set", this.pushFields)
              this.$set(this.taskEditData, "push_set", this.pushFields);
            } else {
              this.$set(this.taskEditData, "push_set", this.eventObject.push_set)
              this.$set(
                this.taskEditData,
                "push_set",
                this.eventObject.push_set
              );
            }
            if (newVal.rules) {
              newVal.rules.forEach((element) => {
                let newRule = Object.assign(JSON.parse(JSON.stringify(this.baseRule)), element)
                this.dataList.push(newRule)
                this.selectTopic(newRule)
                this.selectOperator(newRule)
              })
                let newRule = Object.assign(
                  JSON.parse(JSON.stringify(this.baseRule)),
                  element
                );
                this.dataList.push(newRule);
                this.selectTopic(newRule);
                this.selectOperator(newRule);
              });
            }
          }
        }
      },
      deep: true
      deep: true,
    },
    tempPushSet: {
      handler(n, o) {
        let _this = this
        let flag = false
        let _this = this;
        let flag = false;
        n.forEach((configObj) => {
          let notChecked = configObj.children.find((param) => !param.checked)
          let notChecked = configObj.children.find((param) => !param.checked);
          if (!notChecked) {
            configObj.checked = true
            configObj.checked = true;
          } else {
            configObj.checked = false
            configObj.checked = false;
          }
          let someoneChecked = configObj.children.find((param) => param.checked)
          let someoneChecked = configObj.children.find(
            (param) => param.checked
          );
          if (someoneChecked) {
            flag = true
            flag = true;
          }
        })
        });
        if (flag) {
          this.disabledPushFieldSet = false
          this.disabledPushFieldSet = false;
        } else {
          this.disabledPushFieldSet = true
          this.disabledPushFieldSet = true;
        }
      },
      deep: true
    }
      deep: true,
    },
  },
  created() {
    this.reAdd()
    this.reAdd();
  },
  mounted() {
    // 加载字典
    this.findByType()
    this.getCameras()
    this.getTasks()
    this.getPushFields()
    this.findByType();
    this.getCameras();
    this.getTasks();
    this.getPushFields();
  },
  methods: {
    openPushSetDialog() {
      this.pushFieldDialog = true
      this.tempPushSet = JSON.parse(JSON.stringify(this.taskEditData.push_set))
      this.checkFlag()
      this.pushFieldDialog = true;
      this.tempPushSet = JSON.parse(JSON.stringify(this.taskEditData.push_set));
      this.checkFlag();
    },
    checkFlag() {
      // debugger
      let flag = true
      let flag = true;
      this.tempPushSet.forEach((item) => {
        if (item.checked == false) {
          flag = false
          flag = false;
        }
      })
      this.allFieldChecked = flag
      });
      this.allFieldChecked = flag;
    },
    checkChildren(val) {
      console.log(val, 12121)
      console.log(val, 12121);
      if (val == false) {
        this.allFieldChecked = false
        this.allFieldChecked = false;
      } else if (val == true && this.allFieldChecked == false) {
        this.$nextTick(() => {
          this.checkFlag()
        })
          this.checkFlag();
        });
      }
    },
    varifyField(param) {
      var reg = /^[A-Za-z]+[0-9-_]?$/
      var reg = /^[A-Za-z]+[0-9-_]?$/;
      if (!reg.test(param.alias)) {
        this.$message("请输入合法字段名")
        param.error = true
        this.$message("请输入合法字段名");
        param.error = true;
      } else {
        param.error = false
        param.error = false;
      }
      // this.pushFields.forEach(configObj => {
      //   configObj.children.find(param => param.error)
      // })
    },
    canclePushFieldSet() {
      this.pushFieldDialog = false
      this.pushFieldDialog = false;
    },
    allCheckChange(val) {
      this.tempPushSet.forEach(function(item) {
        item.checked = val
        item.children.forEach(function(child) {
          child.checked = val
        })
      })
      this.tempPushSet.forEach(function (item) {
        item.checked = val;
        item.children.forEach(function (child) {
          child.checked = val;
        });
      });
    },
    submitPushFieldSet() {
      let flag = false
      let flag = false;
      //this.pushFields.forEach(configObj => {
      this.tempPushSet.forEach((configObj) => {
        let errorOne = configObj.children.find((param) => param.checked && param.error)
        let errorOne = configObj.children.find(
          (param) => param.checked && param.error
        );
        if (errorOne) {
          this.$notify({
            type: "error",
            message: "请将选中字段输入合法字段名"
          })
          flag = true
            message: "请将选中字段输入合法字段名",
          });
          flag = true;
        }
      })
      });
      if (flag) {
        //NO SUBMIT
        return
        return;
      }
      this.taskEditData.push_set = this.tempPushSet
      this.pushFieldDialog = false
      this.taskEditData.push_set = this.tempPushSet;
      this.pushFieldDialog = false;
      // 保存规则
      this.eventPushsSave()
      this.eventPushsSave();
    },
    toggleConfigCheck(configObj) {
      configObj.children.forEach((child) => {
        child.checked = configObj.checked
      })
      this.checkFlag()
        child.checked = configObj.checked;
      });
      this.checkFlag();
    },
    getPushFields() {
      let _this = this
      let _this = this;
      getPushSet().then((res) => {
        _this.pushFields = res.data
      })
        _this.pushFields = res.data;
      });
      // this.pushFields = [
      //   {          id: 'sxjxx', name: '摄像机信息', checked: false, alias: '',
      //     children: [
@@ -448,75 +538,73 @@
    addUrl() {
      this.taskEditData.urls.push({
        checked: true,
        hash: Math.random()
          .toString(36)
          .substr(2),
        url: ""
      })
        hash: Math.random().toString(36).substr(2),
        url: "",
      });
    },
    delUrl(index) {
      this.$set(this.taskEditData.urls, index, this.baseRule)
      this.taskEditData.urls.splice(index, 1)
      this.$set(this.taskEditData.urls, index, this.baseRule);
      this.taskEditData.urls.splice(index, 1);
    },
    // 保存
    async eventPushsSave() {
      if (this.taskEditData.name.length < 1) {
        this.$notify({
          type: "warning",
          message: "请填写推送任务名称"
        })
        return
          message: "请填写推送任务名称",
        });
        return;
      }
      // 判断保存的ip是否符合格式要求
      if (this.taskEditData.urls.length < 1) {
        this.$notify({
          type: "warning",
          message: "请配置至少一台推送服务器"
        })
        return
          message: "请配置至少一台推送服务器",
        });
        return;
      }
      for (let i = 0; i < this.taskEditData.urls.length; i++) {
        if (this.taskEditData.urls[i].url.length < 1) {
          this.$notify({
            type: "warning",
            message: "接口URL地址不允许为空"
          })
          return
            message: "接口URL地址不允许为空",
          });
          return;
        }
      }
      if (this.dataList.length < 1) {
        this.$notify({
          type: "warning",
          message: "请在任务配置中维护规则!"
        })
        return
          message: "请在任务配置中维护规则!",
        });
        return;
      }
      // 拼接字符串
      let ruleDesc = []
      let ruleDesc = [];
      this.dataList.forEach((i) => {
        let str = ""
        let str = "";
        if (i.topic_type) {
          str += this.getNameByValue(i.topicTypeOptions, i.topic_type)
          str += this.getNameByValue(i.topicTypeOptions, i.topic_type);
        }
        if (i.topic_arg) {
          str += this.getNameByValue(i.topicArgOptions, i.topic_arg)
          str += this.getNameByValue(i.topicArgOptions, i.topic_arg);
        }
        if (i.operator === "==") {
          str += " = "
          str += " = ";
        }
        if (i.rule_value === "all*all") {
          str += "全部"
          str += "全部";
        } else if (i.rule_value === "null*null") {
          str += "空"
          str += "空";
        } else {
          str += i.rule_value
          str += i.rule_value;
        }
        if (str.length > 0) {
          ruleDesc.push(str)
          ruleDesc.push(str);
        }
      })
      });
      // 处理规则列表数据结构
      let ruleList = this.dataList.map((i) => {
        return {
@@ -524,9 +612,9 @@
          topic_arg: i.topic_arg,
          operator: i.operator,
          operator_type: i.operator_type,
          rule_value: i.rule_value
        }
      })
          rule_value: i.rule_value,
        };
      });
      let json = {
        enable: this.taskEditData.enable,
@@ -540,216 +628,224 @@
        urls: this.taskEditData.urls,
        is_satisfy_all: this.taskEditData.radioValue === "1",
        link_type: this.taskEditData.lineWay,
        push_set: this.taskEditData.push_set
      }
        push_set: this.taskEditData.push_set,
      };
      let res = await eventPushsSave(json)
      let res = await eventPushsSave(json);
      if (res && res.success) {
        this.taskEditData.eventTxt = ruleDesc.join("<br/>")
        this.$emit("updateList", res.data.id)
        this.taskEditData.eventTxt = ruleDesc.join("<br/>");
        this.$emit("updateList", res.data.id);
        this.$notify({
          type: "success",
          message: "保存成功"
        })
          message: "保存成功",
        });
      }
    },
    // 查找字典
    async findByType() {
      let res = await findDictionaryByType()
      let res = await findDictionaryByType();
      if (res && res.success) {
        this.dictionary = Object.assign(this.dictionary, res.data)
        this.baseRule.topicTypeOptions = this.dictionary.EVENTRULETOPIC
        this.baseRule.operatorTypeOpionts = this.dictionary.EVENTTYPECOMPUTE
        this.dictionary = Object.assign(this.dictionary, res.data);
        this.baseRule.topicTypeOptions = this.dictionary.EVENTRULETOPIC;
        this.baseRule.operatorTypeOpionts = this.dictionary.EVENTTYPECOMPUTE;
        this.dictionary["alarmLevel"] = this.dictionary.ALARMLEVEL.map((el) => {
          return {
            name: el.name,
            value: el.name
          }
        })
            value: el.name,
          };
        });
      }
    },
    async getCameras() {
      let rsp = await findByEventTopic({ topic: "camera", type: "name" })
      let rsp = await findByEventTopic({ topic: "camera", type: "name" });
      if (rsp && rsp.success) {
        this.dictionary["camera"] = rsp.data
        this.dictionary["camera"] = rsp.data;
      }
      rsp = await findByEventTopic({ topic: "dbtable" })
      rsp = await findByEventTopic({ topic: "dbtable" });
      if (rsp && rsp.success) {
        this.dictionary["dbtable"] = rsp.data.map((el) => {
          return {
            name: el.name,
            value: el.name
          }
        })
            value: el.name,
          };
        });
      }
    },
    async getTasks() {
      this.dictionary["task"] = []
      let rsp = await getTaskList()
      this.dictionary["task"] = [];
      let rsp = await getTaskList();
      if (rsp && rsp.success) {
        let hash = {}
        let hash = {};
        rsp.data.forEach((task) => {
          if (!task.isDelete && !hash[task.name]) {
            this.dictionary["task"].push({
              value: task.name,
              name: task.name
            })
            hash[task.name] = true
              name: task.name,
            });
            hash[task.name] = true;
          }
        })
        });
      }
    },
    // 新建配置
    createSet() {
      this.dataList.push(JSON.parse(JSON.stringify(this.baseRule)))
      this.dataList.push(JSON.parse(JSON.stringify(this.baseRule)));
    },
    cleanSet() {
      this.dataList.splice(0, this.dataList.length)
      this.dataList.splice(0, this.dataList.length);
    },
    // 添加子规则
    addRule() {
      this.dataList.push(JSON.parse(JSON.stringify(this.baseRule)))
      this.dataList.push(JSON.parse(JSON.stringify(this.baseRule)));
    },
    // 删除子规则
    delRule(index) {
      this.dataList.splice(index, 1)
      this.dataList.splice(index, 1);
    },
    // 规则中下拉框的选择回调
    selectTopic(rule, resetNext = false) {
      rule.topicTypeOptions.forEach((element) => {
        if (element.value === rule.topic_type) {
          rule.topicArgOptions = element.children
          rule.topicArgOptions = element.children;
          if (resetNext) {
            rule.topic_arg = rule.topicArgOptions[0].value
            this.selectArg(rule, resetNext)
            rule.topic_arg = rule.topicArgOptions[0].value;
            this.selectArg(rule, resetNext);
          }
        }
      })
      });
    },
    selectArg(rule, resetNext = false) {
      debugger
      debugger;
      let argInfo = rule.topicArgOptions.filter((arg) => {
        return arg.value === rule.topic_arg
      })
        return arg.value === rule.topic_arg;
      });
      if (argInfo.length > 0) {
        let desc = argInfo[0].description.split(",")
        let desc = argInfo[0].description.split(",");
        if (desc.length > 0) {
          rule.operatorTypeOpionts = this.dictionary.EVENTTYPECOMPUTE.filter((el) => {
            return desc.indexOf(el.value) >= 0
          })
          rule.operatorTypeOpionts = this.dictionary.EVENTTYPECOMPUTE.filter(
            (el) => {
              return desc.indexOf(el.value) >= 0;
            }
          );
        }
      }
      if (resetNext) {
        rule.operator_type = rule.operatorTypeOpionts[rule.operatorTypeOpionts.length - 1].value
        this.selectOperator(rule, resetNext)
        rule.operator_type =
          rule.operatorTypeOpionts[rule.operatorTypeOpionts.length - 1].value;
        this.selectOperator(rule, resetNext);
      }
    },
    selectOperator(rule, resetNext = false) {
      if (rule.operator_type === "option") {
        rule.ruleValueOptions = this.dictionary[rule.topic_type] ? this.dictionary[rule.topic_type] : []
        rule.ruleValueOptions = this.dictionary[rule.topic_type]
          ? this.dictionary[rule.topic_type]
          : [];
        if (rule.rule_value != "") {
          rule.rule_values = rule.rule_value.split(",")
          rule.rule_values = rule.rule_value.split(",");
        }
        // 处理 全部/空
        for (let i = 0; i < rule.rule_values.length; i++) {
          if (rule.rule_values[i] === "all*all") {
            rule.rule_values[i] = "全部"
            rule.rule_values[i] = "全部";
          }
          if (rule.rule_values[i] === "null*null") {
            rule.rule_values[i] = "空"
            rule.rule_values[i] = "空";
          }
        }
        console.log("-----------")
        this.setOptionsDisable(rule)
        console.log("-----------");
        this.setOptionsDisable(rule);
      }
      if (resetNext) {
        rule.rule_value = ""
        rule.rule_values = []
        rule.rule_value = "";
        rule.rule_values = [];
      }
    },
    selectValue(rule, val) {
      if (rule.operator_type === "option") {
        this.setOptionsDisable(rule)
        this.setOptionsDisable(rule);
        if (val.indexOf("全部") >= 0) {
          rule.rule_value = "all*all"
          return
          rule.rule_value = "all*all";
          return;
        }
        if (val.indexOf("空") >= 0) {
          rule.rule_value = "null*null"
          return
          rule.rule_value = "null*null";
          return;
        }
      }
      rule.rule_value = val.join(",")
      rule.rule_value = val.join(",");
    },
    setOptionsDisable(rule) {
      let isAllSelect = rule.rule_values.indexOf("全部") >= 0
      let isNullSelect = rule.rule_values.indexOf("空") >= 0
      console.log(rule.rule_values)
      let isAllSelect = rule.rule_values.indexOf("全部") >= 0;
      let isNullSelect = rule.rule_values.indexOf("空") >= 0;
      console.log(rule.rule_values);
      rule.ruleValueOptions.forEach((opt) => {
        if (!rule.rule_values.length) {
          opt.disabled = false
          return
          opt.disabled = false;
          return;
        }
        if (opt.name === "空") {
          opt.disabled = !isNullSelect
          return
          opt.disabled = !isNullSelect;
          return;
        }
        opt.disabled = isAllSelect || isNullSelect
      })
        opt.disabled = isAllSelect || isNullSelect;
      });
    },
    // 根据value返回对应的name
    getNameByValue(arr, value) {
      let s = arr.find((item) => {
        return item.value === value
      })
        return item.value === value;
      });
      return s.name
      return s.name;
    },
    // 清空重新新增
    reAdd() {
      this.taskEditData = {
        id: "",
        name: "",
        time: [this.$moment().format("YYYY-MM-DD 00:00:00"), this.$moment().format("YYYY-MM-DD HH:mm:ss")],
        time: [
          this.$moment().format("YYYY-MM-DD 00:00:00"),
          this.$moment().format("YYYY-MM-DD HH:mm:ss"),
        ],
        serverIp: [
          {
            enable: true,
            server_ip: "",
            port: 0
          }
            port: 0,
          },
        ],
        urls: [],
        lineWay: "",
        lineOptions: [
          {
            value: "001",
            label: "IP广播"
          }
            label: "IP广播",
          },
        ],
        radioValue: "1",
        eventTxt: "",
        push_set: this.pushFields
      }
      this.dataList = []
        push_set: this.pushFields,
      };
      this.dataList = [];
    },
    onCancle() {
      this.$emit("onCancle")
    }
  }
}
      this.$emit("onCancle");
    },
  },
};
</script>
<style lang="scss">
.s-event-push-right {
src/pages/library/components/personList.vue
@@ -4,17 +4,23 @@
      <div class="base-tip">
        <div class="left-tips">
          <span class="ku-name">{{ this.baseObject.tableName }}</span>
          <span class="list" :class="this.baseObject.bwType === '1' ? 'black-list' : 'white-list'">{{
            this.baseObject.bwType === "1" ? "黑名单" : "白名单"
          }}</span>
          <span
            class="list"
            :class="
              this.baseObject.bwType === '1' ? 'black-list' : 'white-list'
            "
            >{{ this.baseObject.bwType === "1" ? "黑名单" : "白名单" }}</span
          >
          <span class="ok-time"
            >有效时间:{{ this.baseObject.startTime }} --
            {{ this.baseObject.endTime ? this.baseObject.endTime : "永久有效" }}</span
            {{
              this.baseObject.endTime ? this.baseObject.endTime : "永久有效"
            }}</span
          >
        </div>
        <div class="right-btns">
          <span style="margin-right:2px">底库状态(生效/失效)</span>
          <span style="margin-right: 2px">底库状态(生效/失效)</span>
          <el-switch
            :active-value="1"
            :width="52"
@@ -38,7 +44,11 @@
          </el-tooltip>
          <el-tooltip content="编辑" placement="top" popper-class="atooltip">
            <span class="iconfont iconfont-wrap iconbianjiku-09" @click.stop="edit" v-if="isShow('library:set')"></span>
            <span
              class="iconfont iconfont-wrap iconbianjiku-09"
              @click.stop="edit"
              v-if="isShow('library:set')"
            ></span>
          </el-tooltip>
        </div>
      </div>
@@ -61,8 +71,14 @@
          >
            <upload-icon slot="suffix"></upload-icon>
          </el-input>
          <el-button size="small" type="primary" @click="handleSearch">搜索</el-button>
          <el-tooltip content="批量删除" placement="top" popper-class="atooltip">
          <el-button size="small" type="primary" @click="handleSearch"
            >搜索</el-button
          >
          <el-tooltip
            content="批量删除"
            placement="top"
            popper-class="atooltip"
          >
            <span
              class="iconfont iconfont-wrap iconpiliangshanchu-09"
              @click="askDelete('batch')"
@@ -70,7 +86,11 @@
            ></span>
          </el-tooltip>
          <el-tooltip content="上传照片" placement="top" popper-class="atooltip">
          <el-tooltip
            content="上传照片"
            placement="top"
            popper-class="atooltip"
          >
            <UploadBtn
              limitTypes=".jpg,.png,.jpeg"
              limitSize
@@ -103,7 +123,7 @@
          background: '#fff',
          color: '#222222',
          padding: '2px 1px',
          borderBottom: 'none'
          borderBottom: 'none',
        }"
      >
        <el-table-column type="selection" width="40"></el-table-column>
@@ -114,7 +134,9 @@
              style="width: 84px; height: 84px; object-fit: contain"
              alt
            />
            <p class="text-center fb f16" v-show="haveScore(scope.row)">{{ scope.row.compareScore }}%</p>
            <p class="text-center fb f16" v-show="haveScore(scope.row)">
              {{ scope.row.compareScore }}%
            </p>
          </template>
        </el-table-column>
        <el-table-column label="生效状态" min-width="70">
@@ -130,8 +152,19 @@
            ></el-switch>
          </template>
        </el-table-column>
        <el-table-column prop="personName" label="姓名" min-width="70" show-overflow-tooltip sortable></el-table-column>
        <el-table-column prop="sex" label="性别" min-width="60" sortable></el-table-column>
        <el-table-column
          prop="personName"
          label="姓名"
          min-width="70"
          show-overflow-tooltip
          sortable
        ></el-table-column>
        <el-table-column
          prop="sex"
          label="性别"
          min-width="60"
          sortable
        ></el-table-column>
        <el-table-column
          prop="idCard"
          label="身份证号"
@@ -146,7 +179,11 @@
          show-overflow-tooltip
          sortable
        ></el-table-column>
        <el-table-column prop="monitorLevel" label="等级" min-width="50"></el-table-column>
        <el-table-column
          prop="monitorLevel"
          label="等级"
          min-width="50"
        ></el-table-column>
        <el-table-column
          prop="createTime"
          label="入库时间"
@@ -157,7 +194,11 @@
        <el-table-column label="操作" min-width="130">
          <template slot-scope="scope">
            <fTemplate authority="library:set">
              <el-tooltip content="编辑" placement="top" popper-class="atooltip">
              <el-tooltip
                content="编辑"
                placement="top"
                popper-class="atooltip"
              >
                <span
                  class="iconfont iconbianjixinxi-09"
                  style="font-size: 24px; cursor: pointer"
@@ -165,26 +206,67 @@
                ></span>
              </el-tooltip>
            </fTemplate>
            <el-popover placement="top" trigger="click" popper-class="popper-caozuo">
              <el-tooltip content="查找此人" placement="top" popper-class="atooltip">
                <span class="iconfont iconchazhaociren-09" @click="tosearch(scope.row)"></span>
            <el-popover
              placement="top"
              trigger="click"
              popper-class="popper-caozuo"
            >
              <el-tooltip
                content="查找此人"
                placement="top"
                popper-class="atooltip"
              >
                <span
                  class="iconfont iconchazhaociren-09"
                  @click="tosearch(scope.row)"
                ></span>
              </el-tooltip>
              <el-tooltip content="查看详情" placement="top" popper-class="atooltip">
                <span class="iconfont iconchakanxiangqing-09" @click="showDetail(scope.row)"></span>
              <el-tooltip
                content="查看详情"
                placement="top"
                popper-class="atooltip"
              >
                <span
                  class="iconfont iconchakanxiangqing-09"
                  @click="showDetail(scope.row)"
                ></span>
              </el-tooltip>
              <fTemplate authority="library:set">
                <el-tooltip content="复制" placement="top" popper-class="atooltip">
                  <span class="iconfont iconfuzhi-09" title="复制" @click="copyClick(scope.row)"></span>
                <el-tooltip
                  content="复制"
                  placement="top"
                  popper-class="atooltip"
                >
                  <span
                    class="iconfont iconfuzhi-09"
                    title="复制"
                    @click="copyClick(scope.row)"
                  ></span>
                </el-tooltip>
              </fTemplate>
              <fTemplate authority="library:set">
                <el-tooltip content="移动" placement="top" popper-class="atooltip">
                  <span class="iconfont iconyidong-09" title="移动" @click="moveClick(scope.row)"></span>
                <el-tooltip
                  content="移动"
                  placement="top"
                  popper-class="atooltip"
                >
                  <span
                    class="iconfont iconyidong-09"
                    title="移动"
                    @click="moveClick(scope.row)"
                  ></span>
                </el-tooltip>
              </fTemplate>
              <fTemplate authority="library:set" class="del-wrap">
                <el-tooltip content="删除" placement="top" popper-class="atooltip">
                  <span class="iconfont iconshanchu-09" @click="askDelete('single', scope.row.id)"></span>
                <el-tooltip
                  content="删除"
                  placement="top"
                  popper-class="atooltip"
                >
                  <span
                    class="iconfont iconshanchu-09"
                    @click="askDelete('single', scope.row.id)"
                  ></span>
                </el-tooltip>
              </fTemplate>
              <span
@@ -207,7 +289,12 @@
        :total="BaseManageData.total"
      ></el-pagination>
    </div>
    <el-dialog title="抓拍详情" :visible.sync="cameraDetailVisible" okText="确定" custom-class="zhuapai-dialog">
    <el-dialog
      title="抓拍详情"
      :visible.sync="cameraDetailVisible"
      okText="确定"
      custom-class="zhuapai-dialog"
    >
      <div class="member-info">
        <label class>
          <img src="/images/library/个人信息.png" alt="" srcset="" />
@@ -255,9 +342,13 @@
          ></el-date-picker>
        </div>
        <el-button size="mini" type="primary" @click="postCameraData">查询</el-button>
        <el-button size="mini" type="primary" @click="postCameraData"
          >查询</el-button
        >
      </div>
      <p style="text-align: right; font-size: 14px; color: #5f5f5f">共{{ faceDataCount }}条数据</p>
      <p style="text-align: right; font-size: 14px; color: #5f5f5f">
        共{{ faceDataCount }}条数据
      </p>
      <el-table
        :data="cameraDetailData"
@@ -268,10 +359,15 @@
          background: '#fff',
          color: '#222222',
          padding: '2px 1px',
          borderBottom: 'none'
          borderBottom: 'none',
        }"
      >
        <el-table-column prop="faceImg" label="抓拍实景" width="160" align="center">
        <el-table-column
          prop="faceImg"
          label="抓拍实景"
          width="160"
          align="center"
        >
          <template slot-scope="scope">
            <div>
              <img
@@ -288,10 +384,28 @@
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="cameraName" label="摄像机名称" width="100" align="center"></el-table-column>
        <el-table-column prop="startTime" label="开始时间" align="center"></el-table-column>
        <el-table-column prop="endTime" label="结束时间" align="center"></el-table-column>
        <el-table-column prop="stayTime" label="停留时长" width="99" align="center">
        <el-table-column
          prop="cameraName"
          label="摄像机名称"
          width="100"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="startTime"
          label="开始时间"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="endTime"
          label="结束时间"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="stayTime"
          label="停留时长"
          width="99"
          align="center"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.stayTime }} 秒</span>
          </template>
@@ -299,11 +413,21 @@
      </el-table>
      <div class="bot-btn">
        <el-button size="mini" type="primary" @click="cameraDetailVisible = false">关闭</el-button>
        <el-button
          size="mini"
          type="primary"
          @click="cameraDetailVisible = false"
          >关闭</el-button
        >
      </div>
    </el-dialog>
    <el-drawer title="修改信息" :modal="false" :visible.sync="showInfoDrawer">
      <el-form ref="formForEdit" :model="inputPersonForm" label-width="100px" :rules="rules">
      <el-form
        ref="formForEdit"
        :model="inputPersonForm"
        label-width="100px"
        :rules="rules"
      >
        <div class="flex-center mb10">
          <el-upload
            class="avatar-uploader"
@@ -315,7 +439,11 @@
            :on-error="uploadError"
          >
            <div class="mask1">
              <div slot="trigger" class="flex-center" style="position: absolute; top: 70px">
              <div
                slot="trigger"
                class="flex-center"
                style="position: absolute; top: 70px"
              >
                <p
                  style="
                    background: rgba(0, 0, 0, 0.35);
@@ -346,27 +474,48 @@
        <el-row>
          <el-col :span="20">
            <el-form-item label="ID" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.id" disabled placeholder="请输入"></el-input>
              <el-input
                size="small"
                v-model="inputPersonForm.id"
                disabled
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="照片标识" prop="picDesc" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.picDesc" placeholder="请输入"></el-input>
            <el-form-item
              label="照片标识"
              prop="picDesc"
              style="width: 100%; margin-bottom: 20px"
            >
              <el-input
                size="small"
                v-model="inputPersonForm.picDesc"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="姓名" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.personName" placeholder="请输入"></el-input>
              <el-input
                size="small"
                v-model="inputPersonForm.personName"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="性别" prop="sex" style="width: 100%; margin-bottom: 20px; text-align: left">
            <el-form-item
              label="性别"
              prop="sex"
              style="width: 100%; margin-bottom: 20px; text-align: left"
            >
              <el-radio-group v-model="inputPersonForm.sex" class="mt10">
                <el-radio label="男"></el-radio>
                <el-radio label="女"></el-radio>
@@ -376,22 +525,47 @@
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="身份证号" prop="idCard" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.idCard" placeholder="请输入"></el-input>
            <el-form-item
              label="身份证号"
              prop="idCard"
              style="width: 100%; margin-bottom: 20px"
            >
              <el-input
                size="small"
                v-model="inputPersonForm.idCard"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="手机号" prop="phoneNum" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.phoneNum" placeholder="请输入"></el-input>
            <el-form-item
              label="手机号"
              prop="phoneNum"
              style="width: 100%; margin-bottom: 20px"
            >
              <el-input
                size="small"
                v-model="inputPersonForm.phoneNum"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="人员等级" prop="monitorLevel" style="width: 100%; margin-bottom: 20px">
              <el-select size="small" v-model="inputPersonForm.monitorLevel" placeholder="请选择" style="width: 100%">
            <el-form-item
              label="人员等级"
              prop="monitorLevel"
              style="width: 100%; margin-bottom: 20px"
            >
              <el-select
                size="small"
                v-model="inputPersonForm.monitorLevel"
                placeholder="请选择"
                style="width: 100%"
              >
                <el-option
                  v-for="item in VideoPhotoData.dictionary.MONITORLEVEL"
                  :key="item.value"
@@ -404,33 +578,64 @@
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="入库位置" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.fromServerId" disabled></el-input>
            <el-form-item
              label="入库位置"
              style="width: 100%; margin-bottom: 20px"
            >
              <el-input
                size="small"
                v-model="inputPersonForm.fromServerId"
                disabled
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="入库时间" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.createTime" disabled></el-input>
            <el-form-item
              label="入库时间"
              style="width: 100%; margin-bottom: 20px"
            >
              <el-input
                size="small"
                v-model="inputPersonForm.createTime"
                disabled
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="其他" style="width: 100%; margin-bottom: 20px">
              <el-input size="small" v-model="inputPersonForm.reserved" placeholder="请输入"></el-input>
              <el-input
                size="small"
                v-model="inputPersonForm.reserved"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div class="dialog-footer">
        <!-- {{BaseManageData.personList[1].idCard}} -->
        <el-button size="small" class="cancel-btn" @click="handleClose" type="info">取消</el-button>
        <el-button size="small" class="sure-btn" type="primary" @click="submit">确定</el-button>
        <el-button
          size="small"
          class="cancel-btn"
          @click="handleClose"
          type="info"
          >取消</el-button
        >
        <el-button size="small" class="sure-btn" type="primary" @click="submit"
          >确定</el-button
        >
      </div>
    </el-drawer>
    <el-dialog :visible.sync="dialogVisible" :close="getPersonList" :center="true" custom-class="suc-dialog">
    <el-dialog
      :visible.sync="dialogVisible"
      :close="getPersonList"
      :center="true"
      custom-class="suc-dialog"
    >
      <div>
        <div class="suc-icon">
          <i class="iconfont iconduigou3"></i>
@@ -441,31 +646,53 @@
        </div>
        <div class="flex-box mt10">
          <span>上传失败的数量:{{ uploadResult.failList.length }}</span>
          <div class="ml20" v-for="(i, index) in uploadResult.failList" :key="index">
          <div
            class="ml20"
            v-for="(i, index) in uploadResult.failList"
            :key="index"
          >
            {{ i }}
          </div>
        </div>
        <div class="flex-box mt10">
          <span>包含多张人脸的图片数量:{{ uploadResult.multiFaceList.length }}</span>
          <div class="ml20" v-for="(i, index) in uploadResult.multiFaceList" :key="index">
          <span
            >包含多张人脸的图片数量:{{
              uploadResult.multiFaceList.length
            }}</span
          >
          <div
            class="ml20"
            v-for="(i, index) in uploadResult.multiFaceList"
            :key="index"
          >
            {{ i }}
          </div>
        </div>
        <div class="flex-box mt10">
          <span>不含人脸的图片数量:{{ uploadResult.noFaceList.length }}</span>
          <div class="ml20" v-for="(i, index) in uploadResult.noFaceList" :key="index">
          <div
            class="ml20"
            v-for="(i, index) in uploadResult.noFaceList"
            :key="index"
          >
            {{ i }}
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 确认删除对话框 -->
    <el-dialog :visible.sync="askDeleteShow" :center="true" custom-class="del-dialog">
    <el-dialog
      :visible.sync="askDeleteShow"
      :center="true"
      custom-class="del-dialog"
    >
      <div>
        <div class="suc-icon">
          <i class="iconfont icongantanhao1"></i>
@@ -477,27 +704,45 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="askDeleteShow = false">取 消</el-button>
        <el-button type="primary" @click="handleDel" :loading="delBtnLoading">确 定</el-button>
        <el-button type="primary" @click="handleDel" :loading="delBtnLoading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <el-dialog title="复制到" :visible.sync="copyVisiabled" okText="保存" custom-class="copy-dialog" cancelText="取消">
    <el-dialog
      title="复制到"
      :visible.sync="copyVisiabled"
      okText="保存"
      custom-class="copy-dialog"
      cancelText="取消"
    >
      <div class="addToBase1">
        <div class="items" v-if="baseObject.bwType === '1'">
          <div class="lable">
            <p>黑名单</p>
          </div>
          <div class="baseList">
            <el-checkbox-group v-model="BaseManageData.selectBlacks" @change="blackAngWhite">
            <el-checkbox-group
              v-model="BaseManageData.selectBlacks"
              @change="blackAngWhite"
            >
              <div
                class="base"
                v-for="(item, index) in BaseManageData.blackList"
                :key="index"
                :class="BaseManageData.selectBlacks.includes(item.value) ? 'white-wrap' : ''"
                :class="
                  BaseManageData.selectBlacks.includes(item.value)
                    ? 'white-wrap'
                    : ''
                "
              >
                <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled">{{
                  item.title
                }}</el-checkbox>
                <el-checkbox
                  :label="item.value"
                  :title="item.title"
                  :disabled="item.disabled"
                  >{{ item.title }}</el-checkbox
                >
              </div>
            </el-checkbox-group>
          </div>
@@ -507,16 +752,26 @@
            <p>白名单</p>
          </div>
          <div class="baseList">
            <el-checkbox-group v-model="BaseManageData.selectWhites" @change="blackAngWhite">
            <el-checkbox-group
              v-model="BaseManageData.selectWhites"
              @change="blackAngWhite"
            >
              <div
                class="base"
                :class="BaseManageData.selectWhites.includes(item.value) ? 'white-wrap' : ''"
                :class="
                  BaseManageData.selectWhites.includes(item.value)
                    ? 'white-wrap'
                    : ''
                "
                v-for="(item, index) in BaseManageData.whiteList"
                :key="index"
              >
                <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled">{{
                  item.title
                }}</el-checkbox>
                <el-checkbox
                  :label="item.value"
                  :title="item.title"
                  :disabled="item.disabled"
                  >{{ item.title }}</el-checkbox
                >
              </div>
            </el-checkbox-group>
          </div>
@@ -524,27 +779,46 @@
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="copyClose" type="info">取 消</el-button>
        <el-button size="small" type="primary" @click="copySubmit()">确 定</el-button>
        <el-button size="small" type="primary" @click="copySubmit()"
          >确 定</el-button
        >
      </div>
    </el-dialog>
    <el-dialog title="移动至" :visible.sync="moveVisiabled" okText="保存" custom-class="copy-dialog" cancelText="取消">
    <el-dialog
      title="移动至"
      :visible.sync="moveVisiabled"
      okText="保存"
      custom-class="copy-dialog"
      cancelText="取消"
    >
      <div class="addToBase1">
        <div class="items">
          <div class="lable">
            <p>黑名单</p>
          </div>
          <div class="baseList">
            <el-checkbox-group v-model="BaseManageData.selectBlacks" @change="blackAngWhite" :max="1">
            <el-checkbox-group
              v-model="BaseManageData.selectBlacks"
              @change="blackAngWhite"
              :max="1"
            >
              <div
                class="base"
                v-for="(item, index) in BaseManageData.blackList"
                :key="index"
                :class="BaseManageData.selectBlacks.includes(item.value) ? 'white-wrap' : ''"
                :class="
                  BaseManageData.selectBlacks.includes(item.value)
                    ? 'white-wrap'
                    : ''
                "
              >
                <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled">{{
                  item.title
                }}</el-checkbox>
                <el-checkbox
                  :label="item.value"
                  :title="item.title"
                  :disabled="item.disabled"
                  >{{ item.title }}</el-checkbox
                >
              </div>
            </el-checkbox-group>
          </div>
@@ -554,16 +828,27 @@
            <p>白名单</p>
          </div>
          <div class="baseList">
            <el-checkbox-group v-model="BaseManageData.selectWhites" @change="blackAngWhite" :max="1">
            <el-checkbox-group
              v-model="BaseManageData.selectWhites"
              @change="blackAngWhite"
              :max="1"
            >
              <div
                class="base"
                v-for="(item, index) in BaseManageData.whiteList"
                :key="index"
                :class="BaseManageData.selectWhites.includes(item.value) ? 'white-wrap' : ''"
                :class="
                  BaseManageData.selectWhites.includes(item.value)
                    ? 'white-wrap'
                    : ''
                "
              >
                <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled">{{
                  item.title
                }}</el-checkbox>
                <el-checkbox
                  :label="item.value"
                  :title="item.title"
                  :disabled="item.disabled"
                  >{{ item.title }}</el-checkbox
                >
              </div>
            </el-checkbox-group>
          </div>
@@ -571,7 +856,9 @@
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="moveClose" type="info">取 消</el-button>
        <el-button size="small" type="primary" @click="moveSubmit()">确 定</el-button>
        <el-button size="small" type="primary" @click="moveSubmit()"
          >确 定</el-button
        >
      </div>
    </el-dialog>
  </div>
@@ -582,27 +869,27 @@
  deleteBasePersons,
  updateDbTableStatus,
  deleteDbPersonById,
  deleteDBtablesById
} from "@/api/baseLibrary"
import { getCameraFaceData } from "@/api/es"
import { isIDCard } from "../../../scripts/validate"
  deleteDBtablesById,
} from "@/api/baseLibrary";
import { getCameraFaceData } from "@/api/es";
import { isIDCard } from "../../../scripts/validate";
import axios from "axios"
import UploadBtn from "./upload"
import fTemplate from "@/components/fTemplate"
import UploadIcon from "@/components/searching/UploadIcon.vue"
import axios from "axios";
import UploadBtn from "./upload";
import fTemplate from "@/components/fTemplate";
import UploadIcon from "@/components/searching/UploadIcon.vue";
function isPhone(rule, value, callback) {
  if (!value) {
    return callback()
    return callback();
  } else if (value.trim()) {
    var pattern = /^1[345789]\d{9}$/
    var pattern = /^1[345789]\d{9}$/;
    if (pattern.test(value)) {
      return callback()
      return callback();
    }
    return callback(new Error("输入的手机号错误"))
    return callback(new Error("输入的手机号错误"));
  }
}
Date.prototype.Format = function(fmt) {
Date.prototype.Format = function (fmt) {
  var o = {
    "M+": this.getMonth() + 1, //月份
    "d+": this.getDate(), //日
@@ -610,59 +897,72 @@
    "m+": this.getMinutes(), //分
    "s+": this.getSeconds(), //秒
    "q+": Math.floor((this.getMonth() + 3) / 3), //季度
    S: this.getMilliseconds() //毫秒
  }
  if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length))
    S: this.getMilliseconds(), //毫秒
  };
  if (/(y+)/.test(fmt))
    fmt = fmt.replace(
      RegExp.$1,
      (this.getFullYear() + "").substr(4 - RegExp.$1.length)
    );
  for (var k in o)
    if (new RegExp("(" + k + ")").test(fmt))
      fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length))
  return fmt
}
      fmt = fmt.replace(
        RegExp.$1,
        RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
      );
  return fmt;
};
export default {
  components: {
    UploadBtn,
    fTemplate,
    UploadIcon
    UploadIcon,
  },
  props: {
    baseObject: {
      default: () => {},
      type: Object
      type: Object,
    },
    syncType: {
      type: String
    }
      type: String,
    },
  },
  computed: {
    isAdmin() {
      if (sessionStorage.getItem("userInfo") && sessionStorage.getItem("userInfo") !== "") {
        let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username
        return loginName === "superadmin" || loginName === "basic"
      if (
        sessionStorage.getItem("userInfo") &&
        sessionStorage.getItem("userInfo") !== ""
      ) {
        let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
        return loginName === "superadmin" || loginName === "basic";
      }
      return false
      return false;
    },
    delText() {
      switch (this.delType) {
        case "base":
          return ["删除底库", "确定删除该底库?"]
          return ["删除底库", "确定删除该底库?"];
        case "single":
          return ["删除人员", "确定删除该底库人员?"]
          return ["删除人员", "确定删除该底库人员?"];
        case "batch":
          return ["批量删除", "确定删除该底库选中人员?"]
          return ["批量删除", "确定删除该底库选中人员?"];
        default:
          return ["", ""]
          return ["", ""];
      }
    }
    },
  },
  data() {
    return {
      timeRange: [new Date(2020, 7, 25, 8), new Date(new Date().setHours(23, 59, 59))],
      timeRange: [
        new Date(2020, 7, 25, 8),
        new Date(new Date().setHours(23, 59, 59)),
      ],
      memberInfo: {
        personName: "",
        sex: "",
        idCard: "",
        reserved: ""
        reserved: "",
      },
      askDeleteShow: false,
      toDeleteId: "",
@@ -670,7 +970,7 @@
        startTime: new Date(2020, 7, 25, 8).Format("yyyy-MM-dd HH:mm:ss"),
        endTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
        thresholdTime: 10,
        faceId: []
        faceId: [],
      },
      cameraDetailData: [],
      cameraDetailVisible: false,
@@ -690,11 +990,15 @@
      selectedRowKeys: [],
      inputPersonForm: {},
      rules: {
        picDesc: [{ required: true, message: "请输入照片标识", trigger: "change" }],
        picDesc: [
          { required: true, message: "请输入照片标识", trigger: "change" },
        ],
        sex: [{ required: true, message: "请勾选性别", trigger: "change" }],
        idCard: [{ validator: isIDCard, trigger: "blur" }],
        phoneNum: [{ validator: isPhone, trigger: "blur" }],
        monitorLevel: [{ required: true, message: "请选择人员等级", trigger: "change" }]
        monitorLevel: [
          { required: true, message: "请选择人员等级", trigger: "change" },
        ],
      },
      tableData: [],
      oldWidth: "",
@@ -708,55 +1012,57 @@
        failList: [],
        successList: [],
        multiFaceList: [],
        noFaceList: []
        noFaceList: [],
      },
      delBtnLoading: false
    }
      delBtnLoading: false,
    };
  },
  watch: {
    "BaseManageData.selectBlacks": function(value) {
      this.blackAngWhite()
    "BaseManageData.selectBlacks": function (value) {
      this.blackAngWhite();
    },
    "BaseManageData.selectWhites": function(value) {
      this.blackAngWhite()
    }
    "BaseManageData.selectWhites": function (value) {
      this.blackAngWhite();
    },
  },
  methods: {
    postCameraData() {
      getCameraFaceData(this.reqCameraParams).then((res) => {
        if (res && res.rtnCode == 1) {
          this.cameraDetailData = res.rtnData
          this.faceDataCount = res.rtnData.length
          this.cameraDetailData = res.rtnData;
          this.faceDataCount = res.rtnData.length;
        }
      })
      });
    },
    timeChange(val) {
      this.reqCameraParams.startTime = val[0]
      this.reqCameraParams.endTime = val[1]
      this.reqCameraParams.startTime = val[0];
      this.reqCameraParams.endTime = val[1];
    },
    showDetail(row) {
      this.cameraDetailData = []
      this.memberInfo.reserved = row.reserved
      this.memberInfo.idCard = row.idCard
      this.memberInfo.personName = row.personName
      this.memberInfo.sex = row.sex
      this.reqCameraParams.faceId = row.id
      this.cameraDetailVisible = true
      this.cameraDetailData = [];
      this.memberInfo.reserved = row.reserved;
      this.memberInfo.idCard = row.idCard;
      this.memberInfo.personName = row.personName;
      this.memberInfo.sex = row.sex;
      this.reqCameraParams.faceId = row.id;
      this.cameraDetailVisible = true;
    },
    isShow(authority) {
      return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
      return (
        this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
      );
    },
    pickRow(row, column, event) {
      this.$refs.multipleTable.toggleRowSelection(row)
      this.$refs.multipleTable.toggleRowSelection(row);
    },
    toggleSelection(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.multipleTable.toggleRowSelection(row)
        })
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection()
        this.$refs.multipleTable.clearSelection();
      }
    },
    askDelete(typ, id) {
@@ -765,65 +1071,68 @@
          this.$notify({
            type: "warning",
            message: "请选择要删除的人员",
            duration: 1000000
          })
          return
            duration: 1000000,
          });
          return;
        }
      }
      this.askDeleteShow = true
      this.delType = typ
      id && (this.toDeleteId = id)
      this.askDeleteShow = true;
      this.delType = typ;
      id && (this.toDeleteId = id);
    },
    getUploadResult(result) {
      this.uploadResult = result.data
      this.dialogVisible = true
      this.getPersonList()
      this.uploadResult = result.data;
      this.dialogVisible = true;
      this.getPersonList();
    },
    async setEnable(item) {
      let res = await updateDbTableStatus({
        id: item.id,
        enable: item.enable
      })
        enable: item.enable,
      });
      if (res.success) {
        this.$notify({
          type: "success",
          message: "底库成功变更生效状态!"
        })
          message: "底库成功变更生效状态!",
        });
      } else {
        this.$notify({
          type: "error",
          message: "底库变更生效状态失败!"
        })
          message: "底库变更生效状态失败!",
        });
      }
    },
    isDisabled(item) {
      var flag = true
      var flag = true;
      if (this.isShow("library:set")) {
        if (item.endTime == "") {
          flag = false
          flag = false;
        } else {
          flag = !this.$moment(new Date()).isBetween(item.startTime, item.endTime)
          flag = !this.$moment(new Date()).isBetween(
            item.startTime,
            item.endTime
          );
        }
      }
      return flag
      return flag;
    },
    edit() {
      this.$emit("changeShow", this.baseObject, this.syncType)
      this.$emit("changeShow", this.baseObject, this.syncType);
    },
    deleteThis() {
      debugger
      debugger;
      deleteDbPersonById({ id: this.toDeleteId })
        .then((data) => {
          if (data.success) {
            this.$notify({
              type: "success",
              message: "该人员删除成功!"
            })
              message: "该人员删除成功!",
            });
          }
          this.getPersonList()
          this.getPersonList();
        })
        .catch((err) => {})
        .catch((err) => {});
    },
    deleteBase() {
      deleteDBtablesById({ id: this.baseObject.id })
@@ -831,90 +1140,91 @@
          if (res.success) {
            this.$notify({
              type: "success",
              message: "底库删除成功!"
            })
              message: "底库删除成功!",
            });
          }
          this.$emit("onDelete")
          this.$emit("onDelete");
        })
        .catch((err) => {
          this.$notify({
            type: "error",
            message: err
          })
        })
            message: err,
          });
        });
    },
    async deleteBatch() {
      let ids = []
      let ids = [];
      this.selectedRowKeys.map((item, index) => {
        ids.push(item.id)
      })
      let res = await deleteBasePersons({ ids: ids })
        ids.push(item.id);
      });
      let res = await deleteBasePersons({ ids: ids });
      if (res.success) {
        this.$notify({
          type: "success",
          message: "删除成功!"
        })
        this.getPersonList()
          message: "删除成功!",
        });
        this.getPersonList();
      } else {
        this.$notify({
          type: "error",
          message: "删除失败!"
        })
          message: "删除失败!",
        });
      }
    },
    async getPersonList() {
      this.$nextTick(() => {
        if (this.baseObject.id && this.baseObject.id !== undefined) {
          this.BaseManageData.tableId = this.baseObject.id
          this.setLoadSearch(this.BaseManageData.queryPersonList())
          this.BaseManageData.tableId = this.baseObject.id;
          this.setLoadSearch(this.BaseManageData.queryPersonList());
        }
      })
      });
    },
    changeDialog(data) {
      data.erFileList.map((item, index) => {
        this.$notify({
          type: "error",
          message: item.errorMsg.message
        })
      })
          message: item.errorMsg.message,
          customClass: "PersonListDialog",
        });
      });
    },
    handleClose() {
      this.showInfoDrawer = false
      this.showInfoDrawer = false;
    },
    handleSelectionChange(val) {
      this.selectedRowKeys = val
      this.selectedRowKeys = val;
    },
    refrash(current, pageSize) {
      this.current = current
      this.BaseManageData.page = current
      this.getPersonList()
      this.current = current;
      this.BaseManageData.page = current;
      this.getPersonList();
    },
    handleSizeChange(val) {
      this.BaseManageData.size = val
      this.getPersonList()
      this.BaseManageData.size = val;
      this.getPersonList();
    },
    editRow(row) {
      this.inputPersonForm = { ...row }
      this.showInfoDrawer = true
      this.inputPersonForm = { ...row };
      this.showInfoDrawer = true;
    },
    async submit() {
      this.$refs["formForEdit"].validate(async (valid) => {
        if (valid) {
          let { ...json } = this.inputPersonForm
          delete json["compareScore"]
          let res = await updateBasePerson(json)
          let { ...json } = this.inputPersonForm;
          delete json["compareScore"];
          let res = await updateBasePerson(json);
          if (res.success) {
            this.getPersonList()
            this.$notify.success("人员修改成功!")
            this.showInfoDrawer = false
            this.getPersonList();
            this.$notify.success("人员修改成功!");
            this.showInfoDrawer = false;
          } else {
            this.$notify.error("人员修改失败,请重试!")
            this.$notify.error("人员修改失败,请重试!");
          }
        } else {
          return false
          return false;
        }
      })
      });
    },
    async enable(item) {
      let res = await updateBasePerson({
@@ -927,44 +1237,44 @@
        phoneNum: item.phoneNum,
        monitorLevel: item.monitorLevel,
        personPicUrl: item.personPicUrl,
        reserved: item.reserved
      })
        reserved: item.reserved,
      });
      if (res.success === true) {
        this.$notify({
          type: "success",
          message: "底库人员成功变更生效状态!"
        })
          message: "底库人员成功变更生效状态!",
        });
      } else {
        this.$notify({
          type: "error",
          message: "底库人员变更生效状态失败!"
        })
          message: "底库人员变更生效状态失败!",
        });
      }
    },
    handleSearch() {
      this.getPersonList()
      this.getPersonList();
    },
    async handleDel() {
      this.delBtnLoading = true
      this.delBtnLoading = true;
      if (this.delType == "single") {
        await this.deleteThis()
        await this.deleteThis();
      } else if (this.delType == "base") {
        await this.deleteBase()
        await this.deleteBase();
      } else if (this.delType == "batch") {
        await this.deleteBatch()
        await this.deleteBatch();
      }
      this.delBtnLoading = false
      this.askDeleteShow = false
      this.delBtnLoading = false;
      this.askDeleteShow = false;
    },
    searchImg() {
      this.$refs.uploadDrag && this.$refs.uploadDrag.uploadStart()
      this.$refs.uploadDrag && this.$refs.uploadDrag.uploadStart();
    },
    haveScore(row) {
      if (row.compareScore && row.compareScore !== "") {
        return true
        return true;
      } else {
        return false
        return false;
      }
    },
    async searchImgList(faceUrl, threshold) {
@@ -975,199 +1285,214 @@
        faceUrl: faceUrl,
        threshold: threshold,
        orderType: this.orderType,
        orderName: this.orderName
      }
      let res = await getPersonByPhoto(json)
      this.tableData = res.data.datalist
      this.total = res.data.total
      this.compare = true
        orderName: this.orderName,
      };
      let res = await getPersonByPhoto(json);
      this.tableData = res.data.datalist;
      this.total = res.data.total;
      this.compare = true;
    },
    updateThreshold() {},
    async updateFace(param) {
      const fd = new FormData()
      fd.append("file", param.file)
      fd.append("id", this.inputPersonForm.id)
      const fd = new FormData();
      fd.append("file", param.file);
      fd.append("id", this.inputPersonForm.id);
      let res = await axios({
        method: "post",
        url: `/data/api-v/dbperson/updateFace`,
        headers: {
          Authorization:
            sessionStorage.getItem("loginedInfo") && JSON.parse(sessionStorage.getItem("loginedInfo")).access_token
            sessionStorage.getItem("loginedInfo") &&
            JSON.parse(sessionStorage.getItem("loginedInfo")).access_token,
        },
        data: fd
      })
        data: fd,
      });
      if (res.data.success) {
        this.inputPersonForm.persoasyncnPicUrl = res.data.data.personPicUrl
        this.inputPersonForm.faceFeature = res.data.data.faceFeature
        this.inputPersonForm.persoasyncnPicUrl = res.data.data.personPicUrl;
        this.inputPersonForm.faceFeature = res.data.data.faceFeature;
      }
    },
    uploadSuccess() {},
    uploadError() {},
    async init() {
      await this.BaseManageData.querySyncTables()
      await this.BaseManageData.queryLocalTables()
      await this.BaseManageData.querySyncTables();
      await this.BaseManageData.queryLocalTables();
      if (this.baseObject.id && this.baseObject.id !== undefined) {
      } else if (this.BaseManageData.syncTables[0].id && this.BaseManageData.syncTables[0].id !== undefined) {
        this.BaseManageData.tableId = this.BaseManageData.syncTables[0].id
        this.BaseManageData.queryPersonList()
      } else if (
        this.BaseManageData.syncTables[0].id &&
        this.BaseManageData.syncTables[0].id !== undefined
      ) {
        this.BaseManageData.tableId = this.BaseManageData.syncTables[0].id;
        this.BaseManageData.queryPersonList();
      } else {
        this.BaseManageData.tableId = this.BaseManageData.localTables[0].id
        this.BaseManageData.queryPersonList()
        this.BaseManageData.tableId = this.BaseManageData.localTables[0].id;
        this.BaseManageData.queryPersonList();
      }
    },
    blackAngWhite() {
      if (this.BaseManageData.selectBlacks.length > 0) {
        for (let i = 0; i < this.BaseManageData.whiteList.length; i++) {
          //this.VideoPhotoData.whiteList[i].disabled = true
          this.$set(this.BaseManageData.whiteList[i], "disabled", true)
          this.$set(this.BaseManageData.whiteList[i], "disabled", true);
        }
      }
      if (this.BaseManageData.selectBlacks.length == 0) {
        for (let i = 0; i < this.BaseManageData.whiteList.length; i++) {
          //this.VideoPhotoData.whiteList[i].disabled = false
          this.$set(this.BaseManageData.whiteList[i], "disabled", false)
          this.$set(this.BaseManageData.whiteList[i], "disabled", false);
        }
      }
      if (this.BaseManageData.selectWhites.length > 0) {
        for (let i = 0; i < this.BaseManageData.blackList.length; i++) {
          // this.VideoPhotoData.blackList[i].disabled = true
          this.$set(this.BaseManageData.blackList[i], "disabled", true)
          this.$set(this.BaseManageData.blackList[i], "disabled", true);
        }
      }
      if (this.BaseManageData.selectWhites.length == 0) {
        for (let i = 0; i < this.BaseManageData.blackList.length; i++) {
          //this.VideoPhotoData.blackList[i].disabled = false
          this.$set(this.BaseManageData.blackList[i], "disabled", false)
          this.$set(this.BaseManageData.blackList[i], "disabled", false);
        }
      }
    },
    tosearch(item) {
      //let captureId = item.id == "" ? item.baseInfo[0].targetId : item.id
      let captureId = item.id == "" ? item.personId : item.id
      let imgUrl = item.personPicUrl ? item.personPicUrl : item.personPicUrl
      let compType = 0
      let captureId = item.id == "" ? item.personId : item.id;
      let imgUrl = item.personPicUrl ? item.personPicUrl : item.personPicUrl;
      let compType = 0;
      let message =
        "toSearch?showType=findByPic&targetId=" + captureId + "&picSmUrl=" + imgUrl + "&compType=" + compType
        "toSearch?showType=findByPic&targetId=" +
        captureId +
        "&picSmUrl=" +
        imgUrl +
        "&compType=" +
        compType;
      window.parent.postMessage(
        {
          msg: message
          msg: message,
        },
        "*"
      )
      );
    },
    copyClick(row) {
      this.BaseManageData.personId = row.id
      this.copyVisiabled = true
      this.BaseManageData.personId = row.id;
      this.copyVisiabled = true;
    },
    moveClick(row) {
      this.BaseManageData.personId = row.id
      this.moveVisiabled = true
      this.BaseManageData.personId = row.id;
      this.moveVisiabled = true;
    },
    copyClose() {
      this.copyVisiabled = false
      this.BaseManageData.personId = ""
      this.BaseManageData.selectBlacks = []
      this.BaseManageData.selectWhites = []
      this.copyVisiabled = false;
      this.BaseManageData.personId = "";
      this.BaseManageData.selectBlacks = [];
      this.BaseManageData.selectWhites = [];
    },
    moveClose() {
      this.moveVisiabled = false
      this.BaseManageData.personId = ""
      this.BaseManageData.selectBlacks = []
      this.BaseManageData.selectWhites = []
      this.moveVisiabled = false;
      this.BaseManageData.personId = "";
      this.BaseManageData.selectBlacks = [];
      this.BaseManageData.selectWhites = [];
    },
    copySubmit() {
      if (this.BaseManageData.selectBlacks.length === 0 && this.BaseManageData.selectWhites.length === 0) {
      if (
        this.BaseManageData.selectBlacks.length === 0 &&
        this.BaseManageData.selectWhites.length === 0
      ) {
        this.$notify({
          title: "注意",
          message: "请选择要复制到的库",
          type: "warning"
        })
        return
          type: "warning",
        });
        return;
      }
      var resp = this.BaseManageData.copyTo()
      var resp = this.BaseManageData.copyTo();
      resp.then((data) => {
        if (data.success) {
          this.$notify({
            title: "成功",
            message: data.data,
            type: "success"
          })
            type: "success",
          });
        } else {
          this.$notify({
            title: "失败",
            message: data.data,
            type: "error"
          })
            type: "error",
          });
        }
      })
      this.copyVisiabled = false
      this.BaseManageData.personId = ""
      this.BaseManageData.selectBlacks = []
      this.BaseManageData.selectWhites = []
      });
      this.copyVisiabled = false;
      this.BaseManageData.personId = "";
      this.BaseManageData.selectBlacks = [];
      this.BaseManageData.selectWhites = [];
    },
    moveSubmit() {
      if (this.BaseManageData.selectBlacks.length === 0 && this.BaseManageData.selectWhites.length === 0) {
      if (
        this.BaseManageData.selectBlacks.length === 0 &&
        this.BaseManageData.selectWhites.length === 0
      ) {
        this.$notify({
          title: "注意",
          message: "请选择要移动到的库",
          type: "warning"
        })
        return
          type: "warning",
        });
        return;
      }
      var resp = this.BaseManageData.moveTo()
      var resp = this.BaseManageData.moveTo();
      resp.then((data) => {
        if (data.success) {
          this.$notify({
            title: "成功",
            message: data.data,
            type: "success"
          })
            type: "success",
          });
        } else {
          this.$notify({
            title: "失败",
            message: data.data,
            type: "error"
          })
            type: "error",
          });
        }
        this.moveVisiabled = false
        this.BaseManageData.personId = ""
        this.BaseManageData.selectBlacks = []
        this.BaseManageData.selectWhites = []
        this.BaseManageData.queryPersonList()
      })
        this.moveVisiabled = false;
        this.BaseManageData.personId = "";
        this.BaseManageData.selectBlacks = [];
        this.BaseManageData.selectWhites = [];
        this.BaseManageData.queryPersonList();
      });
    },
    setLoadSearch(fn) {
      this.AuthData.setLoading("multipleTable", this)
      this.AuthData.setLoading("multipleTable", this);
      fn.then((_) => {
        this.AuthData.closeLoad()
      })
    }
        this.AuthData.closeLoad();
      });
    },
  },
  mounted() {
    this.getPersonList()
    this.VideoPhotoData.queryDictionary()
    this.BaseManageData.queryTagList()
    this.oldWidth = document.body.clientWidth
    this.oldHeight = document.body.clientHeight
    this.blackAngWhite()
    this.getPersonList();
    this.VideoPhotoData.queryDictionary();
    this.BaseManageData.queryTagList();
    this.oldWidth = document.body.clientWidth;
    this.oldHeight = document.body.clientHeight;
    this.blackAngWhite();
    window.onresize = () => {
      let width = document.body.clientWidth
      let height = document.body.clientHeight
      let width = document.body.clientWidth;
      let height = document.body.clientHeight;
      if (width !== this.oldWidth && width < 1750) {
      }
      this.$nextTick(() => {
        this.$refs.multipleTable.doLayout()
      })
    }
        this.$refs.multipleTable.doLayout();
      });
    };
    this.$nextTick(() => {
      this.$refs.multipleTable.doLayout()
    })
      this.$refs.multipleTable.doLayout();
    });
  },
  beforeDestroy() {
    window.onresize = null
  }
}
    window.onresize = null;
  },
};
</script>
<style lang="scss">
.activeRow {
@@ -1414,7 +1739,8 @@
        padding-top: 2px;
        left: 15px;
      }
      .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
      .el-form-item.is-required:not(.is-no-asterisk)
        > .el-form-item__label:before {
        color: #fe6d68;
      }
      .el-col-20 {
@@ -1465,7 +1791,9 @@
      display: none;
    }
    .el-table--border .el-table__cell,
    .el-table__body-wrapper .el-table--border.is-scrolling-left ~ .el-table__fixed {
    .el-table__body-wrapper
      .el-table--border.is-scrolling-left
      ~ .el-table__fixed {
      border-right: none;
    }
    td {
@@ -1879,7 +2207,8 @@
        margin-bottom: 10px;
      }
      .baseList {
        height: 100%;    overflow: auto;
        height: 100%;
        overflow: auto;
        .base {
          width: 152px;
          padding: 5px 5px 5px 10px;
@@ -2072,4 +2401,8 @@
    }
  }
}
.PersonListDialog {
  width: 360px !important;
}
</style>
src/pages/settings/views/NetSettings.vue
@@ -237,7 +237,7 @@
                  <div class="ad">
                    <i
                      class="el-icon-circle-plus-outline"
                      @click="+ipv6Form.prefix++;"
                      @click="+ipv6Form.prefix++"
                    ></i>
                  </div>
                  <div class="ad">
@@ -1096,14 +1096,17 @@
          align-items: center;
          .el-switch__core {
            height: 14px;
            background-color: var(--colorCard) !important;
            border-color: var(--colorCard) !important;
          }
          .el-switch.is-checked .el-switch__core::after {
            left: 100%;
            margin-left: -12px;
          }
          .el-switch.is-checked .el-switch__core {
            background-color: var(--colorCard) !important;
            border-color: var(--colorCard) !important;
          }
          .el-switch__core:after {
            content: "";
            position: absolute;
src/pages/settings/views/generalSettings.vue
@@ -9,7 +9,9 @@
          v-for="(item, i) in menuArr"
          :key="i"
        >
          <span class="iconfont" :style="`font-size:${item.size}px;`">{{ item.icon }}</span>
          <span class="iconfont" :style="`font-size:${item.size}px;`">{{
            item.icon
          }}</span>
          <span class="title">{{ item.name }}</span>
        </div>
      </div>
@@ -18,12 +20,12 @@
          <div class="min-dur">
            <div class="title">抓拍前录像时长</div>
            <div class="entity">
              <div class="sec">{{ min_video_len }}s</div>
              <div class="sec">0s</div>
              <div class="block">
                <el-slider
                  v-model="fakeObj.min"
                  id="cut_min_duration"
                  :min="5 / 1.2"
                  :min="0"
                  :max="100"
                  :step="5 / 1.2"
                  @input="min_len = min_video_len"
@@ -33,38 +35,28 @@
                  :format-tooltip="formatTooltip"
                ></el-slider>
              </div>
              <div class="sec">120s</div>
              <el-input-number
                v-model="min_len"
                @change="fakeObj.min = +(min_len / 1.2)"
                :min="5"
                :min="0"
                :step="5"
                :max="120"
                step-strictly
                size="small"
              ></el-input-number
              >&nbsp;s -->
              <el-input-number
                v-model="min_len"
                @change="fakeObj.min = +(min_len / 1.2)"
                :min="5"
                :step="5"
                :max="120"
                step-strictly
                size="small"
              ></el-input-number
              >&nbsp;s
              >s
            </div>
          </div>
          <div class="min-dur">
            <div class="title">抓拍后录像时长</div>
            <div class="entity">
              <div class="sec">{{ max_video_len }} s</div>
              <div class="sec">0s</div>
              <div class="block">
                <el-slider
                  v-model="fakeObj.max"
                  id="cut_max_duration"
                  :min="5 / 1.2"
                  :min="0"
                  @input="max_len = max_video_len"
                  :max="100"
                  :step="5 / 1.2"
@@ -73,10 +65,11 @@
                  :show-tooltip="true"
                ></el-slider>
              </div>
              <div class="sec">120s</div>
              <el-input-number
                v-model="max_len"
                @change="fakeObj.max = +(max_len / 1.2)"
                :min="5"
                :min="0"
                :step="5"
                step-strictly
                :max="120"
@@ -105,7 +98,12 @@
              </div>
              <div class="sound-btns">
                <span @click="togglePlay(item, i)">
                  <span class="iconfont" v-if="!item.isPlay" style="cursor: pointer">{{ playSpan }}</span>
                  <span
                    class="iconfont"
                    v-if="!item.isPlay"
                    style="cursor: pointer"
                    >{{ playSpan }}</span
                  >
                  <!-- <span class="iconfont" v-else style="cursor: pointer">{{
                    playSpan2
                  }}</span> -->
@@ -129,13 +127,28 @@
                  ></i>
                  <i v-else class="el-icon-video-pause"></i> -->
                </span>
                <span class="icon iconfont del" style="cursor: pointer" @click="removeSound(item)">{{ delspan }}</span>
                <span
                  class="icon iconfont del"
                  style="cursor: pointer"
                  @click="removeSound(item)"
                  >{{ delspan }}</span
                >
              </div>
            </div>
          </div>
          <div v-if="showUpload" @click.stop>
            <el-upload class="upload-demo" drag action="" :http-request="uploadSound" :show-file-list="false">
              <div class="info">请将声音事件文件拖拽到此处,或<span class="info-click">点击上传</span></div>
            <el-upload
              class="upload-demo"
              drag
              action=""
              :http-request="uploadSound"
              :show-file-list="false"
            >
              <div class="info">
                请将声音事件文件拖拽到此处,或<span class="info-click"
                  >点击上传</span
                >
              </div>
              <div class="des" v-if="showUpload" @click.stop>
                仅支持mp3、wav等格式
              </div>
@@ -144,7 +157,9 @@
          <div class="add-group">
            <div class="add-btn">
              <span class="icon iconfont" @click.stop="showUpload = !showUpload">&#xe646;</span>
              <span class="icon iconfont" @click.stop="showUpload = !showUpload"
                >&#xe646;</span
              >
            </div>
          </div>
        </div>
@@ -152,7 +167,11 @@
        <div class="self-setting" v-if="activePage == 2">
          <div class="top-title">颜色主题</div>
          <div class="color-bar">
            <div v-for="(item, index) in colorList" :key="index" style="border: none">
            <div
              v-for="(item, index) in colorList"
              :key="index"
              style="border: none"
            >
              <div
                class="color-option"
                v-if="universalColor != index"
@@ -165,11 +184,14 @@
                v-else
                :style="{
                  cursor: 'pointer',
                  border: `2px solid ${item.color}`
                  border: `2px solid ${item.color}`,
                }"
                @click="colorCard(item.color, index)"
              >
                <div :style="{ backgroundColor: item.color }" class="color-option-content"></div>
                <div
                  :style="{ backgroundColor: item.color }"
                  class="color-option-content"
                ></div>
              </div>
            </div>
          </div>
@@ -177,10 +199,18 @@
          <div class="icon-bar" style="cursor: pointer" @click="selectIcons(0)">
            <div class="bar-title">
              <span class="title">面性风格</span>
              <span class="icon iconfont" :class="activeIcons == 0 ? 'icon-active' : 'icon-normal'">&#xe6f1;</span>
              <span
                class="icon iconfont"
                :class="activeIcons == 0 ? 'icon-active' : 'icon-normal'"
                >&#xe6f1;</span
              >
            </div>
            <div class="entity">
              <div class="entity-img" v-for="(item, i) in realIconList" :key="i">
              <div
                class="entity-img"
                v-for="(item, i) in realIconList"
                :key="i"
              >
                <img :src="item.url" alt="" />
              </div>
            </div>
@@ -188,10 +218,18 @@
          <div class="icon-bar" style="cursor: pointer" @click="selectIcons(1)">
            <div class="bar-title">
              <span class="title">简约风格</span>
              <span class="icon iconfont" :class="activeIcons == 1 ? 'icon-active' : 'icon-normal'">&#xe6f1;</span>
              <span
                class="icon iconfont"
                :class="activeIcons == 1 ? 'icon-active' : 'icon-normal'"
                >&#xe6f1;</span
              >
            </div>
            <div class="entity">
              <div class="entity-img" v-for="(item, i) in flatIconList" :key="i">
              <div
                class="entity-img"
                v-for="(item, i) in flatIconList"
                :key="i"
              >
                <img :src="item.url" alt="" />
              </div>
            </div>
@@ -218,9 +256,9 @@
</template>
<script>
import { saveAlarmConfig, getDevInfo } from "@/api/system"
import { uploadSound, getSoundList, deleteSound } from "@/api/event"
import { updateUser } from "@/api/user"
import { saveAlarmConfig, getDevInfo } from "@/api/system";
import { uploadSound, getSoundList, deleteSound } from "@/api/event";
import { updateUser } from "@/api/user";
export default {
  data() {
    return {
@@ -235,12 +273,12 @@
      max_len: 0,
      fakeObj: {
        min: 0,
        max: 0
        max: 0,
      },
      menuArr: [
        { name: "事件录像时长", icon: "\ue74f", size: 20 },
        { name: "事件声音", icon: "\ueb5e", size: 16 },
        { name: "个性化设置", icon: "\ue750", size: 18 }
        { name: "个性化设置", icon: "\ue750", size: 18 },
      ],
      soundList: [],
      activePage: 0,
@@ -256,7 +294,7 @@
        webVersion: "",
        disks: "",
        memory: "",
        activeBg: 0
        activeBg: 0,
      },
      isPlay: false,
      realIconList: [
@@ -266,7 +304,7 @@
        { url: "/images/settings/面性图标/4安全帽检测.png" },
        { url: "/images/settings/面性图标/5奔跑.png" },
        { url: "/images/settings/面性图标/6车辆检测.png" },
        { url: "/images/settings/面性图标/7抽烟.png" }
        { url: "/images/settings/面性图标/7抽烟.png" },
      ],
      flatIconList: [
        { url: "/images/settings/简约图标/1仰卧检测.png" },
@@ -275,12 +313,12 @@
        { url: "/images/settings/简约图标/4安全帽检测.png" },
        { url: "/images/settings/简约图标/5奔跑.png" },
        { url: "/images/settings/简约图标/6车辆检测.png" },
        { url: "/images/settings/简约图标/7抽烟.png" }
        { url: "/images/settings/简约图标/7抽烟.png" },
      ],
      tableBGList: [
        { name: "background", url: "/images/desktop/background.png" },
        { name: "message", url: "/images/desktop/message.png" },
        { name: "weather", url: "/images/desktop/weather.png" }
        { name: "weather", url: "/images/desktop/weather.png" },
      ],
      universalColor: "",
      colorList: [
@@ -292,227 +330,229 @@
        { name: 6, color: "#61E2EB" },
        { name: 7, color: "#4E94FF" },
        { name: 8, color: "#8E8CD8" },
        { name: 9, color: "#4C4A48" }
      ]
    }
        { name: 9, color: "#4C4A48" },
      ],
    };
  },
  mounted() {
    this.getDeviceInfo()
    this.getSounds()
    const url = this.curUser.backgroundpic
    this.activeIcons = this.curUser.useIconType - 1
    this.getDeviceInfo();
    this.getSounds();
    const url = this.curUser.backgroundpic;
    this.activeIcons = this.curUser.useIconType - 1;
    this.universalColor = this.colorList.findIndex((x) => {
      return x.color == localStorage.getItem("--colorCard")
    })
      return x.color == localStorage.getItem("--colorCard");
    });
    if (url) {
      this.activeBg = this.tableBGList.findIndex((x) => {
        return x.url == url
      })
        return x.url == url;
      });
    } else {
      this.activeBg = 0
      this.activeBg = 0;
    }
    this.eventAudio.addEventListener("ended", this.endedHandle, false)
    this.$refs.curPage.addEventListener("click", this.clickHandle, false)
    this.eventAudio.addEventListener("ended", this.endedHandle, false);
    this.$refs.curPage.addEventListener("click", this.clickHandle, false);
  },
  beforeDestroy() {
    this.eventAudio.removeEventListener("ended", this.endedHandle, false)
    this.$refs.curPage.removeEventListener("click", this.clickHandle, false)
    this.eventAudio.removeEventListener("ended", this.endedHandle, false);
    this.$refs.curPage.removeEventListener("click", this.clickHandle, false);
  },
  computed: {
    min_video_len() {
      return Math.round(this.fakeObj.min * 1.2)
      return Math.round(this.fakeObj.min * 1.2);
    },
    max_video_len() {
      return Math.round(this.fakeObj.max * 1.2)
      return Math.round(this.fakeObj.max * 1.2);
    },
    curUser() {
      return JSON.parse(sessionStorage.getItem("userInfo"))
    }
      return JSON.parse(sessionStorage.getItem("userInfo"));
    },
  },
  methods: {
    endedHandle() {
      let _this = this
      let _this = this;
      if (_this.curPlayingIndex !== null && _this.soundList.length) {
        _this.soundList[_this.curPlayingIndex].isPlay = false
        _this.curPlayingIndex = null
        _this.soundList[_this.curPlayingIndex].isPlay = false;
        _this.curPlayingIndex = null;
      }
    },
    clickHandle() {
      let _this = this
      let _this = this;
      if (this.showUpload) {
        this.showUpload = false
        this.showUpload = false;
      }
    },
    formatTooltip(v) {
      return Math.round(v * 1.2)
      return Math.round(v * 1.2);
    },
    pickBg(item, i) {
      this.activeBg = i
      let message = "changeBackground?" + item.name
      window.parent.postMessage({ msg: message }, "*")
      this.activeBg = i;
      let message = "changeBackground?" + item.name;
      window.parent.postMessage({ msg: message }, "*");
      updateUser({
        id: this.curUser.id,
        backgroundpic: item.url
        backgroundpic: item.url,
      }).then((res) => {
        if (res.success) {
          sessionStorage.setItem("userInfo", JSON.stringify(res.data))
          debugger
          this.$message.success(res.msg)
          sessionStorage.setItem("userInfo", JSON.stringify(res.data));
          debugger;
          this.$message.success(res.msg);
        }
      })
      this.$forceUpdate()
      });
      this.$forceUpdate();
    },
    togglePlay(item, i) {
      if (this.curPlayingIndex !== null) {
        this.eventAudio.pause()
        this.soundList[this.curPlayingIndex].isPlay = false
        this.eventAudio.pause();
        this.soundList[this.curPlayingIndex].isPlay = false;
        if (this.curPlayingIndex === i) {
          this.curPlayingIndex = null
          return
          this.curPlayingIndex = null;
          return;
        }
      }
      this.curPlayingIndex = i
      this.eventAudio.src = "http://" + item.path
      this.curPlayingIndex = i;
      this.eventAudio.src = "http://" + item.path;
      if (item.isPlay) {
        this.eventAudio.pause()
        this.eventAudio.pause();
      } else {
        this.eventAudio.play()
        this.eventAudio.play();
      }
      item.isPlay = !item.isPlay
      item.isPlay = !item.isPlay;
    },
    getDeviceInfo() {
      getDevInfo().then((res) => {
        let info = res.data.deviceInfo
        let basic = res.data
        this.deviceInfo.cpu = info.cpu[0].modelName
        this.deviceInfo.runningTime = this.secondsFormat(info.host.uptime)
        this.deviceInfo.server_id = basic.server_id
        this.deviceInfo.deviceModel = basic.deviceModel
        this.deviceInfo.deviceDesc = basic.deviceDesc
        this.deviceInfo.masterVersion = basic.masterVersion
        this.deviceInfo.channelCount = basic.channelCount
        this.deviceInfo.webVersion = "V2.0.0"
        this.deviceInfo.disks = "( " + info.disk + ") "
        this.deviceInfo.memory = (info.mem.total / 1024 / 1024 / 1024).toFixed(2) + "GB"
        this.fakeObj.min = basic.min_video_len / 1.2
        this.fakeObj.max = basic.max_video_len / 1.2
      })
        let info = res.data.deviceInfo;
        let basic = res.data;
        this.deviceInfo.cpu = info.cpu[0].modelName;
        this.deviceInfo.runningTime = this.secondsFormat(info.host.uptime);
        this.deviceInfo.server_id = basic.server_id;
        this.deviceInfo.deviceModel = basic.deviceModel;
        this.deviceInfo.deviceDesc = basic.deviceDesc;
        this.deviceInfo.masterVersion = basic.masterVersion;
        this.deviceInfo.channelCount = basic.channelCount;
        this.deviceInfo.webVersion = "V2.0.0";
        this.deviceInfo.disks = "( " + info.disk + ") ";
        this.deviceInfo.memory =
          (info.mem.total / 1024 / 1024 / 1024).toFixed(2) + "GB";
        this.fakeObj.min = basic.min_video_len / 1.2;
        this.fakeObj.max = basic.max_video_len / 1.2;
      });
    },
    getSounds() {
      getSoundList().then((res) => {
        if (res.success) {
          this.soundList = res.data
          this.soundList = res.data;
          this.soundList.forEach((x) => {
            this.$set(x, "isPlay", false)
          })
            this.$set(x, "isPlay", false);
          });
        }
      })
      });
    },
    secondsFormat(s) {
      var day = (s / (24 * 3600)) | 0
      var hour = ((s - day * 24 * 3600) / 3600) | 0
      var minute = ((s - day * 24 * 3600 - hour * 3600) / 60) | 0
      var second = s - day * 24 * 3600 - hour * 3600 - minute * 60
      return day + "天 " + hour + "小时 " + minute + "分 " + second + "秒"
      var day = (s / (24 * 3600)) | 0;
      var hour = ((s - day * 24 * 3600) / 3600) | 0;
      var minute = ((s - day * 24 * 3600 - hour * 3600) / 60) | 0;
      var second = s - day * 24 * 3600 - hour * 3600 - minute * 60;
      return day + "天 " + hour + "小时 " + minute + "分 " + second + "秒";
    },
    uploadSound(params) {
      let param = new FormData()
      param.append("file", params.file)
      let param = new FormData();
      param.append("file", params.file);
      uploadSound(param).then(
        (res) => {
          this.$message.success("上传成功")
          this.showUpload = false
          this.getSounds()
          this.$message.success("上传成功");
          this.showUpload = false;
          this.getSounds();
        },
        (err) => {
          this.$message.error("声音上传失败")
          this.$message.error("声音上传失败");
        }
      )
      );
    },
    openRight(i) {
      this.activePage = i
      this.activePage = i;
    },
    selectIcons(i) {
      this.activeIcons = i
      this.activeIcons = i;
      updateUser({
        id: this.curUser.id,
        iconType: i + 1
        iconType: i + 1,
      }).then((res) => {
        if (res.success) {
          window.parent.postMessage({ msg: "AppUpdate" }, "*")
          sessionStorage.setItem("userInfo", JSON.stringify(res.data))
          debugger
          this.$message.success(res.msg)
          window.parent.postMessage({ msg: "AppUpdate" }, "*");
          sessionStorage.setItem("userInfo", JSON.stringify(res.data));
          debugger;
          this.$message.success(res.msg);
        }
      })
      });
    },
    removeSound(item) {
      const h = this.$createElement
      const h = this.$createElement;
      const icon = this.$msgbox({
        title: "",
        message: h(
          "div",
          {
            style: "display: flex;  flex-direction: column; justify-content: center; align-items: center;"
            style:
              "display: flex;  flex-direction: column; justify-content: center; align-items: center;",
          },
          [
            h("span", { class: "icon iconfont warn-icon" }, `${this.warnSpn}`),
            h("span", { class: "warn-title" }, "删除事件声音 "),
            h("span", { class: "warn-dec" }, "您是否确认删除事件声音?")
            h("span", { class: "warn-dec" }, "您是否确认删除事件声音?"),
          ]
        ),
        showCancelButton: true,
        confirmButtonText: "确定",
        cancelButtonText: "取消"
        cancelButtonText: "取消",
      }).then(() => {
        deleteSound({
          id: item.id
          id: item.id,
        }).then(
          (res) => {
            if (res.success) {
              this.getSounds()
              this.getSounds();
              this.$message({
                type: "success",
                message: "删除成功!"
              })
              this.showUpload = false
                message: "删除成功!",
              });
              this.showUpload = false;
            }
          },
          (err) => {
            this.$message.error(err.msg)
            this.$message.error(err.msg);
          }
        )
      })
        );
      });
    },
    clickSound(item, i) {
      this.$refs["soundBar"].forEach((x) => {
        x.style = "border: 2px solid #FFF;"
      })
      this.$refs["soundBar"][i].style = "border: 2px solid #4E94FF;"
        x.style = "border: 2px solid #FFF;";
      });
      this.$refs["soundBar"][i].style = "border: 2px solid #4E94FF;";
    },
    submitAlarm() {
      saveAlarmConfig({
        min_video_len: this.min_video_len,
        max_video_len: this.max_video_len
        max_video_len: this.max_video_len,
      }).then((res) => {
        if (res && res.success) {
          this.getDeviceInfo()
          this.getDeviceInfo();
          this.$notify({
            type: "success",
            message: "保存成功"
          })
            message: "保存成功",
          });
        }
      })
      });
    },
    colorCard(color, index) {
      this.universalColor = index
      document.documentElement.style.setProperty("--colorCard", `${color}`)
      localStorage.setItem("--colorCard", `${color}`)
      window.parent.postMessage({ msg: "changeColor", color }, "*")
    }
  }
}
      this.universalColor = index;
      document.documentElement.style.setProperty("--colorCard", `${color}`);
      localStorage.setItem("--colorCard", `${color}`);
      window.parent.postMessage({ msg: "changeColor", color }, "*");
    },
  },
};
</script>
<style scoped lang="scss">
@@ -578,8 +618,11 @@
    border-top: 4px solid #f2f2f7;
    padding: 6px 18px 10px 10px;
    .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before,
    .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label:before {
    .el-form-item.is-required:not(.is-no-asterisk)
      > .el-form-item__label:before,
    .el-form-item.is-required:not(.is-no-asterisk)
      .el-form-item__label-wrap
      > .el-form-item__label:before {
      display: none;
    }
    .el-select {
@@ -725,13 +768,13 @@
        .sec {
          min-width: 30px;
          line-height: 80px;
          margin-right: 10px;
          color: #333;
          font-size: 8px;
        }
        .block {
          flex: 1;
          margin: 0 20px 0 6px;
          margin: 0 0px 0 6px;
        }
        .el-input-number--small {
          width: 100px;
src/pages/systemSettings/components/ClusterManagement.vue
@@ -652,11 +652,7 @@
      })
        .then(async () => {
          let res = await leave();
          this.$notify({
            title: res.success ? "成功" : "失败",
            message: res.msg,
            type: res.success ? "success" : "error",
          });
          if (res && res.success) {
            this.ruleForm.clustername = "";
            this.ruleForm.clusterpwd = "";
@@ -665,6 +661,11 @@
            this.activeName = "1";
            this.members = [];
            this.innerNodes = [];
            this.$notify({
              title: "成功",
              message: "退出成功",
              type: "success",
            });
          }
        })
        .catch(() => {
@@ -675,6 +676,11 @@
          this.activeName = "1";
          this.members = [];
          this.innerNodes = [];
          this.$notify({
            title: "失败",
            message: "退出失败",
            type: "error",
          });
        });
    },
    joinNode(event, node) {