heyujie
2021-07-04 85da22c4861736f7b0cabbc75daecbe4fea1bf80
src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
@@ -167,8 +167,8 @@
              @change="filterSearchData"
            >
              <el-option value label="全部"></el-option>
              <el-option :value="false" label="未关注"></el-option>
              <el-option :value="true" label="已关注"></el-option>
              <el-option :value="'1'" label="未关注"></el-option>
              <el-option :value="'0'" label="已关注"></el-option>
            </el-select>
          </div>
          <div>
@@ -315,10 +315,16 @@
          <el-table-column label="大小" prop="VideoSize" sortable>
            <template slot-scope="scope" style="cursor: pointer">
              <div>{{ Math.round((+scope.row.VideoSize) / (1024*1024)) + " MB" }}</div>
              <div>
                {{ Math.round(+scope.row.VideoSize / (1024 * 1024)) + " MB" }}
              </div>
            </template>
          </el-table-column>
          <el-table-column label="视频时间" prop="StartTime" sortable></el-table-column>
          <el-table-column
            label="视频时间"
            prop="StartTime"
            sortable
          ></el-table-column>
          <!-- <el-table-column label="创建日期" prop="VideoCreateDate" sortable></el-table-column> -->
          <el-table-column label="操作">
@@ -543,16 +549,8 @@
      this.filterSearchData();
    },
    //二级查询
    filterSearchData() {
    filterSearchData(val) {
      let _this = this;
      let isFollow = "";
      if (this.IsFollow === "") {
        isFollow = "";
      } else if (!!this.IsFollow) {
        isFollow = "1";
      } else {
        isFollow = "0";
      }
      let query = {
        KeyWord: this.keyword,
        StartDate: this.searchTime[0],
@@ -562,7 +560,7 @@
        PageSize:
          this.showType == "list" ? this.tablePageSize : this.tabPageSize,
        IsDetail: this.showType == "list",
        IsFollow: isFollow,
        IsFollow: this.IsFollow ,
        IsOperate: this.IsOperate,
      };
      let filterQuerys = [];
@@ -582,7 +580,6 @@
        if (_this.showType == "list") {
          _this.tableTotal = res.total;
          _this.tableData = res.data;
          debugger;
        } else {
          _this.tabTotal = res.total;
          _this.tabData = res.data;
@@ -618,6 +615,18 @@
        IsFollow: this.IsFollow,
        IsOperate: this.IsOperate,
      };
      let filterQuerys = [];
      this.checkedConfigs.forEach((config) => {
        let checkedOpts = config.data.filter((option) => option.isChecked);
        if (checkedOpts.length) {
          var linkOpts = checkedOpts.map((opt) => opt.name);
          linkOpts = linkOpts.join(",");
          let obj = {};
          obj[config.NameEn] = linkOpts;
          filterQuerys.push(obj);
        }
      });
      Object.assign(query, ...filterQuerys);
      this.optionalConfigs = [];
      this.highLevelConfigs = [];
      getlstInit(query).then((res) => {
@@ -689,11 +698,12 @@
    toggleFollow(data) {
      data.IsFollow == "0" ? (data.IsFollow = "1") : (data.IsFollow = "0");
      updateFollow({
        id: data.id,
        IsFollow: data.IsFollow,
      }).then((res) => {
        this.$notify({
          type: "success",
          message: "已添加关注!",
          message: data.IsFollow == "0" ? "已添加关注!" : "已取消关注!",
        });
      });
    },