管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-03-03 b6c8e7c61f0270598ba7fdbc44f79512e010d0fe
src/views/maintenance/blackwhiteList.vue
@@ -9,90 +9,233 @@
    <el-divider />
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane :label="$t('operatManage.BWL.blackList')" name="first">
        <div class="inquire">
          <el-form ref="ruleForm" :model="form" :inline="true">
            <el-form-item
              :label="$t('operatManage.BWL.blackListIP')"
              prop="blackListIP"
            >
              <el-input
                v-model="form.blackListIP"
                :placeholder="$t('operatManage.BWL.listIPInfo')"
              />
            </el-form-item>
            <el-form-item
              :label="$t('operatManage.BWL.IPState')"
              prop="IPState"
            >
              <el-select v-model="form.IPState">
                <el-option :label="$t('operatManage.BWL.all')" value="0" />
                <el-option :label="$t('operatManage.BWL.validity')" value="1" />
                <el-option
                  :label="$t('operatManage.BWL.invalidity')"
                  value="2"
                />
              </el-select>
            </el-form-item>
            <el-form-item
              :label="$t('operatManage.BWL.interceptionCycle')"
              prop="interceptionCycle"
            >
              <el-input
                v-model="form.interceptionCycle"
                :placeholder="$t('operatManage.BWL.interceptionCycle')"
              />
            </el-form-item>
            <el-form-item prop="unit">
              <el-select v-model="form.unit">
                <el-option :label="$t('operatManage.BWL.seconds')" value="0" />
                <el-option :label="$t('operatManage.BWL.mins')" value="1" />
                <el-option :label="$t('operatManage.BWL.hours')" value="2" />
              </el-select>
            </el-form-item>
            <el-form-item
              :label="$t('operatManage.BWL.interceptionNumber')"
              prop="interceptionNumber"
            >
              <el-input
                v-model="form.interceptionNumber"
                :placeholder="$t('operatManage.BWL.interceptionNumber')"
              />
            </el-form-item>
            <el-form-item>
              <el-button
                ><i class="el-icon-search"></i> &nbsp;{{
                  $t('operatManage.BWL.search')
                }}</el-button
              >
            </el-form-item>
            <el-form-item>
              <el-button
                ><i class="el-icon-delete"></i> &nbsp;{{
                  $t('operatManage.BWL.reset')
                }}</el-button
              >
            </el-form-item>
            <el-form-item>
              <el-button v-if="menuStatus.insert" @click="showInsertdialog(1)">{{
                $t('common.append')
              }}</el-button>
            </el-form-item>
            <el-form-item>
              <el-button v-if="menuStatus.delete" @click="delBWList">{{
                $t('common.delete')
              }}</el-button>
            </el-form-item>
        <div class="inquire subpage_Div" ref="container">
          <el-form ref="queryInfo" :model="queryInfo" :inline="true">
            <div class="flex_box">
              <div style="margin-right: auto">
                <el-form-item
                  :label="$t('operatManage.BWL.blackListIP')"
                  prop="blackListIP"
                >
                  <el-input
                      size="small"
                    style="width: 200px"
                    v-model="queryInfo.ip"
                    :placeholder="$t('operatManage.BWL.blackListIPHolder')"
                  >
                    <i slot="suffix" class="el-icon-search" @click="queryBlackInfo"></i>
                  </el-input>
                </el-form-item>
<!--                <el-form-item-->
<!--                  :label="$t('operatManage.BWL.interceptionNumber')"-->
<!--                  prop="visit"-->
<!--                >-->
<!--                  <el-input-->
<!--                      size="small"-->
<!--                    style="width: 200px"-->
<!--                    v-model="queryInfo.visit"-->
<!--                    :placeholder="$t('operatManage.BWL.interceptionNumber')"-->
<!--                  />-->
<!--                </el-form-item>-->
              </div>
              <div>
<!--                <el-form-item>-->
<!--                  <el-button-->
<!--                    type="primary"-->
<!--                    @click="queryBlackInfo()"-->
<!--                    size="small"-->
<!--                    icon="el-icon-search"-->
<!--                    >{{ $t("operatManage.BWL.search") }}-->
<!--                  </el-button>-->
<!--                </el-form-item>-->
                <el-form-item>
                  <el-button
                      icon="el-icon-edit"
                      v-if="menuStatus.insert"
                      type="success"
                      size="small"
                      @click="showInsertdialog(1)"
                  >{{ $t("common.append") }}</el-button
                  >
                </el-form-item>
                <el-form-item>
                  <el-button
                    icon="el-icon-delete"
                    v-if="menuStatus.delete"
                    type="danger"
                    size="small"
                    @click="delBWList"
                    >{{ $t("common.delete") }}</el-button
                  >
                </el-form-item>
                <el-form-item>
                  <el-button
                      type="info"
                      @click="resetInfo('queryInfo')"
                      icon="el-icon-refresh"
                      size="small"
                  >{{ $t("operatManage.BWL.reset") }}</el-button
                  >
                </el-form-item>
              </div>
            </div>
          </el-form>
        </div>
        <div class="table_box">
        <div class="table_box subpage_Div" :style="styleVar">
          <el-table
            :data="BTableData"
            stripe
            border
            @selection-change="blackSelectionChange"
            style="width: 100%"
            height="85%"
            height="calc(100% - 45px)"
          >
            <el-table-column type="selection" width="55" />
            <el-table-column
              align="center"
              type="index"
              :label="$t('operatManage.BWL.index')"
              width="70px"
            />
            <el-table-column
              prop="ip"
              :label="$t('operatManage.BWL.blackListIP')"
            />
            <el-table-column
              prop="visit"
              :label="$t('operatManage.BWL.PageView')"
            />
            <el-table-column
              prop="descr"
              :label="$t('operatManage.BWL.description')"
            />
            <el-table-column
              prop="createName"
              :label="$t('operatManage.BWL.creator')"
            />
            <el-table-column
              :formatter="formatData"
              prop="createTime"
              :label="$t('operatManage.BWL.creationTime')"
            />
            <el-table-column
              prop="updateName"
              :label="$t('operatManage.BWL.update')"
            />
            <el-table-column
              :formatter="formatData"
              prop="updateTime"
              :label="$t('operatManage.BWL.UpdateTime')"
            />
            <el-table-column
              v-if="menuStatus.update"
              :label="$t('operatManage.tokentoolObj.operation')"
              width="120"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="handleEdit(scope.row)"
                  type="warning"
                  plain
                  size="small"
                  >{{ $t("common.update") }}</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <div class="pagination_box" style="margin-top: 10px">
            <el-pagination
              @size-change="BhandleSizeChange"
              @current-change="BhandleCurrentChange"
              :current-page="BListData.pageIndex"
              :page-sizes="[10, 20, 50, 100]"
              :page-size="BListData.pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="Bcount"
            >
            </el-pagination>
          </div>
        </div>
      </el-tab-pane>
      <el-tab-pane :label="$t('operatManage.BWL.whiteList')" name="second">
        <div class="inquire subpage_Div">
          <el-form ref="queryInfo" :model="queryInfo" :inline="true">
            <div class="flex_box">
              <div style="margin-right: auto">
                <el-form-item
                  :label="$t('operatManage.BWL.whiteListIP')"
                  prop="ip"
                >
                  <el-input
                      size="small"
                    style="width: 200px"
                    v-model="queryInfo.ip"
                    :placeholder="$t('operatManage.BWL.whiteListIPHolder')"
                  >
                    <i slot="suffix" class="el-icon-search" @click="queryWhiteInfo"></i>
                  </el-input>
                </el-form-item>
<!--                <el-form-item-->
<!--                  :label="$t('operatManage.BWL.interceptionNumber')"-->
<!--                  prop="visit"-->
<!--                >-->
<!--                  <el-input-->
<!--                      size="small"-->
<!--                    style="width: 200px"-->
<!--                    v-model="queryInfo.visit"-->
<!--                    :placeholder="$t('operatManage.BWL.interceptionNumber')"-->
<!--                  />-->
<!--                </el-form-item>-->
              </div>
              <div>
<!--                <el-form-item>-->
<!--                  <el-button size="small" type="primary" @click="queryWhiteInfo"-->
<!--                    ><i class="el-icon-search"></i> &nbsp;{{-->
<!--                      $t("operatManage.BWL.search")-->
<!--                    }}</el-button-->
<!--                  >-->
<!--                </el-form-item>-->
                <el-form-item>
                  <el-button
                      type="success"
                      size="small"
                      icon="el-icon-edit"
                      v-if="menuStatus.insert"
                      @click="showInsertdialog(2)"
                  >{{ $t("common.append") }}</el-button
                  >
                </el-form-item>
                <el-form-item>
                  <el-button
                    type="danger"
                    size="small"
                    icon="el-icon-delete"
                    v-if="menuStatus.delete"
                    @click="delBWList"
                    >{{ $t("common.delete") }}</el-button
                  >
                </el-form-item>
                <el-form-item>
                  <el-button
                      @click="resetForm('queryInfo')"
                      type="info"
                      size="small"
                  ><i class="el-icon-delete"></i> &nbsp;{{
                      $t("operatManage.BWL.reset")
                    }}</el-button
                  >
                </el-form-item>
              </div>
            </div>
          </el-form>
        </div>
        <div class="table_box subpage_Div" :style="styleVar">
          <el-table
            :data="WTableData"
            border
            @selection-change="blackSelectionChange"
            style="width: 100%"
            height="calc(100% - 45px)"
          >
            <el-table-column type="selection" width="55" />
            <el-table-column
@@ -134,188 +277,81 @@
            <el-table-column
              v-if="menuStatus.update"
              :label="$t('operatManage.tokentoolObj.operation')"
              width="320"
              width="120"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="handleEdit(scope.$index, scope.row)"
                  @click="handleEdit(scope.row)"
                  type="warning"
                  plain
                  size="small"
                  >{{ $t('common.update') }}</el-button
                  >{{ $t("common.update") }}</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <div style="margin-top: 20px" class="pagination_box">
            <el-pagination
              @size-change="BhandleSizeChange"
              @current-change="BhandleCurrentChange"
              :current-page="BListData.pageIndex"
              :page-sizes="[10, 20, 30, 40]"
              :page-size="BListData.pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="Bcount"
            >
            </el-pagination>
          </div>
        </div>
      </el-tab-pane>
      <el-tab-pane :label="$t('operatManage.BWL.whiteList')" name="second"
        ><div class="inquire">
          <el-form ref="ruleForm" :model="form" :inline="true">
            <el-form-item
              :label="$t('operatManage.BWL.whiteListIP')"
              prop="whiteListIP"
            >
              <el-input
                v-model="form.blackListIP"
                :placeholder="$t('operatManage.BWL.listIPInfo')"
              />
            </el-form-item>
            <el-form-item
              :label="$t('operatManage.BWL.IPState')"
              prop="IPState"
            >
              <el-select v-model="form.IPState">
                <el-option :label="$t('operatManage.BWL.all')" value="0" />
                <el-option :label="$t('operatManage.BWL.validity')" value="1" />
                <el-option
                  :label="$t('operatManage.BWL.invalidity')"
                  value="2"
                />
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button @click="onSubmit"
                ><i class="el-icon-search"></i> &nbsp;{{
                  $t('operatManage.BWL.search')
                }}</el-button
              >
            </el-form-item>
            <el-form-item>
              <el-button @click="onSubmit"
                ><i class="el-icon-delete"></i> &nbsp;{{
                  $t('operatManage.BWL.reset')
                }}</el-button
              >
            </el-form-item>
            <el-form-item>
              <el-button   v-if="menuStatus.insert" @click="showInsertdialog(2)">{{
                $t('common.append')
              }}</el-button>
            </el-form-item>
            <el-form-item>
              <el-button   v-if="menuStatus.delete" @click="delBWList">{{
                $t('common.delete')
              }}</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="table_box1">
          <el-table :data="WTableData" stripe     @selection-change="blackSelectionChange" style="width: 100%" height="85%">
               <el-table-column type="selection" width="55" />
            <el-table-column
              align="center"
              type="index"
              :label="$t('operatManage.BWL.index')"
              width="70px"
            />
            <el-table-column
              prop="ip"
              :label="$t('operatManage.BWL.whiteListIP')"
            />
            <el-table-column
              prop="visit"
              :label="$t('operatManage.BWL.PageView')"
            />
            <el-table-column
              prop="descr"
              :label="$t('operatManage.BWL.description')"
            />
            <el-table-column
              prop="createName"
              :label="$t('operatManage.BWL.creator')"
            />
            <el-table-column
              :formatter="formatData"
              prop="createTime"
              :label="$t('operatManage.BWL.creationTime')"
            />
            <el-table-column
              prop="updateName"
              :label="$t('operatManage.BWL.update')"
            />
            <el-table-column
              :formatter="formatData"
              prop="updateTime"
              :label="$t('operatManage.BWL.UpdateTime')"
            />
             <el-table-column
             v-if="menuStatus.update"
              :label="$t('operatManage.tokentoolObj.operation')"
              width="320"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="handleEdit(scope.$index, scope.row)"
                  type="warning"
                  plain
                  size="small"
                  >{{ $t('common.update') }}</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          </el-table>
          <div style="margin-top: 20px" class="pagination_box">
          <div class="pagination_box" style="margin-top: 10px">
            <el-pagination
              @size-change="WhandleSizeChange"
              @current-change="WhandleCurrentChange"
              :current-page="WListData.pageIndex"
              :page-sizes="[10, 20, 30, 40]"
              :page-sizes="[10, 20, 50, 100]"
              :page-size="WListData.pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="Wcount"
            >
            </el-pagination>
          </div></div
      ></el-tab-pane>
          </div>
        </div>
      </el-tab-pane>
    </el-tabs>
    <el-dialog
      :title="$t('common.append')"
      style="overflow: hidden"
      :visible.sync="InsertFormdialog"
      width="30%"
      :before-close="handleClose"
    >
      <el-form ref="insertform" :model="insertform">
        <el-form-item :label-width="formLabelWidth" label="IP地址">
      <el-form ref="insertform" :model="insertform" label-position="top">
        <el-form-item
          :label-width="formLabelWidth"
          :label="$t('operatManage.tokentoolObj.ip')"
        >
          <el-input
            v-model="insertform.ip"
            :placeholder="$t('common.pleaseInput')"
             style="width:85%"
          />
        </el-form-item>
        <el-form-item :label-width="formLabelWidth" label="访问次数">
        <el-form-item
          :label-width="formLabelWidth"
          :label="$t('operatManage.BWL.PageView')"
        >
          <el-input
            v-model="insertform.visit"
            :placeholder="$t('common.pleaseInput')"
             style="width:85%"
          />
        </el-form-item>
        <el-form-item :label-width="formLabelWidth" label="描述">
        <el-form-item
          :label-width="formLabelWidth"
          :label="$t('operatManage.BWL.description')"
        >
          <el-input
            v-model="insertform.descr"
            :placeholder="$t('common.pleaseInput')"
             style="width:85%"
          />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="insertFromDataClose">{{
          $t('common.close')
        <el-button size="small" @click="insertFromDataClose">{{
          $t("common.close")
        }}</el-button>
        <el-button @click="insertFromData" type="primary">{{
          $t('common.confirm')
        <el-button @click="insertFromData" type="primary" size="small">{{
          $t("common.confirm")
        }}</el-button>
      </div>
    </el-dialog>
@@ -323,34 +359,37 @@
      :title="$t('common.update')"
      style="overflow: hidden"
      :visible.sync="updateFormdialog"
      width="30%"
      :before-close="handleCloseEdit"
    >
      <el-form ref="editfrom" :model="editfrom">
      <el-form ref="editfrom" :model="editfrom" label-position="top">
        <el-form-item :label-width="formLabelWidth" label="IP地址">
          <el-input
            v-model="editfrom.ip"
            :placeholder="$t('common.pleaseInput')"
            style="width:85%"
          />
        </el-form-item>
        <el-form-item :label-width="formLabelWidth" label="访问次数">
          <el-input
            v-model="editfrom.visit"
            :placeholder="$t('common.pleaseInput')"
            style="width:85%"
          />
        </el-form-item>
        <el-form-item :label-width="formLabelWidth" label="描述">
          <el-input
            v-model="editfrom.descr"
            :placeholder="$t('common.pleaseInput')"
            style="width:85%"
          />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="editFromDataClose">{{
          $t('common.close')
        <el-button size="small" @click="editFromDataClose">{{
          $t("common.close")
        }}</el-button>
        <el-button @click="editFromData" type="primary">{{
          $t('common.confirm')
        <el-button @click="editFromData" type="primary" size="small">{{
          $t("common.confirm")
        }}</el-button>
      </div>
    </el-dialog>
@@ -358,14 +397,14 @@
</template>
<script>
import MyBread from '../../components/MyBread.vue';
import MyBread from "../../components/MyBread.vue";
import {
  blacklistSelectByPageAndCount,
  blacklistAppend,
  deletelacklist,
  updateblacklist,
  blacklistSelectCount,
} from '../../api/api';
} from "../../api/api";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
@@ -374,26 +413,26 @@
  data() {
    return {
         menuStatus: {
      menuStatus: {
        delete: false,
        insert: false,
        update: false,
      },
      updateFormdialog: false,
      multipleSelection: [],
      formLabelWidth: '100px',
      insertform: {},
      formLabelWidth: "100px",
      insertform: {
        type: null,
      },
      editfrom: {},
      InsertFormdialog: false,
      activeName: 'first',
      activeName: "first",
      currentPage: 1,
      form: {
        blackListIP: '',
        IPState: '',
        interceptionCycle: '',
        unit: '',
        interceptionNumber: '',
      queryInfo: {
        ip: "",
        visit: "",
      },
      initialForm: "",
      BTableData: [],
      WTableData: [],
      BListData: {
@@ -408,12 +447,87 @@
      },
      Wcount: 0,
      Bcount: 0,
      tableHeight: 0,
      timer: 0,
      styleVar: {
        height: "calc(100% - 109px)",
      },
    };
  },
  beforeDestroy() {
    this.timer && clearTimeout(this.timer);
    window.removeEventListener("resize", this.onResize);
  },
  methods: {
    onResize() {
      this.timer && clearTimeout(this.timer);
      this.timer = setTimeout(() => {
        this.calHeight();
      }, 500);
    },
    calHeight() {
      this.$nextTick(() => {
        const rect = this.$refs.container.getBoundingClientRect();
        this.tableHeight = `${rect.height + 40}px`;
        this.styleVar["height"] = `calc(100% - ${rect.height + 0}px)`;
      });
    },
    editFromDataClose() {
      this.updateFormdialog = false;
      this.editfrom = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.updateFormdialog = false;
          this.$nextTick(() => {
            this.editForm = JSON.parse(this.initialForm);
          });
          this.BGetList();
          this.WGetList();
        })
        .catch((_) => { });
    },
    queryBlackInfo() {
      let searchData = {
        ip: this.queryInfo.ip.trim(),
        visit: this.queryInfo.visit,
        pageIndex: this.BListData.pageIndex,
        pageSize: this.BListData.pageSize,
        type: this.BListData.type,
      };
      blacklistSelectByPageAndCount(searchData).then((res) => {
        if (res.code == 200) {
          this.BTableData = res.result;
          this.Bcount = res.count;
        } else {
          console.log("查询接口报错");
          this.$notify.error({
            title: res.code,
            message: res.result,
          });
        }
      });
    },
    queryWhiteInfo() {
      let searchData = {
        ip: this.queryInfo.ip.trim(),
        visit: this.queryInfo.visit,
        pageIndex: this.WListData.pageIndex,
        pageSize: this.WListData.pageSize,
        type: this.WListData.type,
      };
      blacklistSelectByPageAndCount(searchData).then((res) => {
        if (res.code == 200) {
          this.WTableData = res.result;
          this.Wcount = res.count;
        } else {
          console.log("查询接口报错");
          this.$notify.error({
            title: res.code,
            message: res.result,
          });
        }
      });
    },
    resetInfo(formName) {
      this.$refs[formName].resetFields();
    },
    async editFromData() {
      var data = await updateblacklist(this.editfrom);
@@ -421,20 +535,21 @@
        this.updateFormdialog = false;
        this.editfrom = {};
        this.$message({
          message: '修改成功!',
          type: 'success',
          message: "修改成功!",
          type: "success",
        });
        this.BGetList();
        this.WGetList();
      } else {
        this.$message({
          message: '修改失败!',
          type: 'warning',
          message: "修改失败!",
          type: "warning",
        });
      }
    },
    handleEdit(index, row) {
      this.editfrom = row;
    handleEdit(row) {
      this.initialForm = JSON.stringify(row);
      this.editfrom = JSON.parse(JSON.stringify(row));
      this.updateFormdialog = true;
    },
@@ -444,20 +559,48 @@
        std.push(this.multipleSelection[i].id);
      }
      //deletes
      const data = await deletelacklist({ ids: std.toString() });
      if (data.code == 200) {
        this.$message({
          message: '删除成功!',
          type: 'success',
      this.$confirm("此操作将永久删除该名单, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(async () => {
          const data = await deletelacklist({ ids: std.toString() });
          if (data.code == 200) {
            this.InsertFormdialog = false;
            this.$message({
              message: "删除成功!",
              type: "success",
            });
            this.BGetList();
            this.WGetList();
          } else {
            this.$message({
              message: "删除失败!",
              type: "warning",
            });
          }
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
        this.BGetList();
        this.WGetList();
      } else {
        this.$message({
          message: '删除失败!',
          type: 'warning',
        });
      }
      // const data = await deletelacklist({ ids: std.toString() });
      // if (data.code == 200) {
      //   this.$message({
      //     message: "删除成功!",
      //     type: "success",
      //   });
      //   this.BGetList();
      //   this.WGetList();
      // } else {
      //   this.$message({
      //     message: "删除失败!",
      //     type: "warning",
      //   });
      // }
    },
    blackSelectionChange(val) {
      this.multipleSelection = val;
@@ -467,8 +610,12 @@
      this.InsertFormdialog = true;
    },
    insertFromDataClose() {
      this.InsertFormdialog = false;
      this.insertform = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false;
          this.insertform = {};
        })
        .catch((_) => { });
    },
    async insertFromData() {
      var count = await blacklistSelectCount(this.insertform);
@@ -479,21 +626,21 @@
        this.InsertFormdialog = false;
        this.insertform = {};
        this.$message({
          message: '添加成功!',
          type: 'success',
          message: "添加成功!",
          type: "success",
        });
        this.BGetList();
        this.WGetList();
      } else {
        this.$message({
          message: '添加失败!',
          type: 'warning',
          message: "添加失败!",
          type: "warning",
        });
      }
    },
    //格式化时间
    add0(m) {
      return m < 10 ? '0' + m : m;
      return m < 10 ? "0" + m : m;
    },
    //格式化时间
    format(shijianchuo) {
@@ -506,7 +653,7 @@
      var mm = time.getMinutes();
      var s = time.getSeconds();
      return (
        y + '-' + this.add0(m) + '-' + this.add0(d)
        y + "-" + this.add0(m) + "-" + this.add0(d)
        // " " +
        // this.add0(h) +
        // ":" +
@@ -524,7 +671,7 @@
      return this.format(data);
    },
    handleClick(tab, event) {
      console.log(tab, event);
      // console.log(tab, event);
    },
    WhandleSizeChange(val) {
      this.WListData.pageSize = val;
@@ -532,19 +679,20 @@
    },
    WhandleCurrentChange(val) {
      this.WListData.pageIndex = val;
      this.getList();
      this.queryBlackInfo();
    },
    BhandleSizeChange(val) {
      this.BListData.pageSize = val;
      this.getList();
      this.queryBlackInfo();
    },
    BhandleCurrentChange(val) {
      this.BListData.pageIndex = val;
      this.getList();
    },
    onSubmit() {
      console.log('submit!');
    onSubmit(formName) {
      this.$refs[formName].resetFields();
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
    },
@@ -552,7 +700,7 @@
      const data = await blacklistSelectByPageAndCount(this.WListData);
      if (data.code != 200) {
        return this.$message.error('列表调用失败');
        return this.$message.error("列表调用失败");
      }
      this.WTableData = data.result;
      this.Wcount = data.count;
@@ -560,7 +708,7 @@
    async BGetList() {
      const data = await blacklistSelectByPageAndCount(this.BListData);
      if (data.code != 200) {
        return this.$message.error('列表调用失败');
        return this.$message.error("列表调用失败");
      }
      this.BTableData = data.result;
@@ -568,20 +716,38 @@
    },
    showPermsMenu(res) {
      switch (res.tag) {
        case '/delete':
        case "/delete":
          this.menuStatus.delete = true;
          break;
        case '/insert':
        case "/insert":
          this.menuStatus.insert = true;
          break;
        case '/update':
        case "/update":
          this.menuStatus.update = true;
          break;
      }
    },
    handleClose() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false
        })
        .catch((_) => { });
    },
    handleCloseEdit() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.updateFormdialog = false
        })
        .catch((_) => { });
    },
  },
  mounted() {
    window.addEventListener("resize", this.onResize);
    this.calHeight();
  },
  created() {
     var val = this.$store.state.currentPerms;
    var val = this.$store.state.currentPerms;
    var permsEntity = this.$store.state.permsEntity;
    for (var i = 0; i < permsEntity.length; i++) {
      if (permsEntity[i].perms == val) {
@@ -596,151 +762,36 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.logLog_box {
  border-radius: 10px;
  height: 100%;
  box-sizing: border-box;
  height: 98%;
  width: 98%;
  padding: 0.5% 1%;
  .el-input {
    width: 300px;
  }
  .inquire {
    padding: 10px;
    margin-top: 20px;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
    margin-bottom: 20px;
    padding:0 8px;
    //margin-top: 20px;
  }
  .table_box {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
    overflow: auto;
    height: 410px;
    //margin-bottom: 20px;
    .el-form-item {
      margin: 5px;
    }
  }
  .table_box1{
padding: 10px;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
    overflow: auto;
    height: 460px;
  .el-tabs {
    //height: calc(100% - 70px);
    height: calc(100% - 30px);
  }
  /deep/ .el-tabs__content {
    height: calc(100% - 54px);
    //height: calc(100% - 49px);
  }
  /deep/ .el-tab-pane {
    height: 100%;
  }
  .text-center {
    text-align: center;
  }
  .pagination_box {
    /deep/.el-input__inner {
      background-color: transparent !important;
      border: 1px solid;
      color: white;
    }
    /deep/.el-pagination__total {
      color: white;
    }
    /deep/.el-pagination__jump {
      color: white;
    }
    /deep/.el-pager li.active {
      color: #1890ff;
    }
    /deep/.el-pager li {
      color: white;
      background: transparent;
    }
    /deep/.el-pager li {
      color: white;
    }
    /deep/.btn-prev {
      background: transparent;
    }
    /deep/.btn-next {
      background: transparent;
    }
  }
/deep/
.el-tabs__item {
     color: #409eff;
}
    /deep/.el-form-item__label {
      color: white;
    }
    /deep/ .el-input__inner {
      background-color: transparent !important;
      border: 1px solid;
      color: white;
    }
 /deep/ .el-dialog {
    background: #303030;
  }
  /deep/.el-range-editor.is-active,
  .el-range-editor.is-active:hover,
  .el-select .el-input.is-focus .el-input__inner {
    border: 1px solid;
  }
  /deep/.el-dialog__title {
    color: white;
  }
/deep/.el-tabs__active-bar{
      background: #409eff;
}
 /*修改table 表体的背景颜色和文字颜色*/
    /deep/ .el-table {
      background-color: transparent;
      th,
      td {
        background-color: transparent;
      }
      .el-table__expanded-cell {
        background-color: transparent !important;
      }
      // 表头背景色
      th.el-table__cell {
        background-color: #303030;
        color: #fff;
      }
      tr > td {
        background-color: #303030;
        color: #fff;
      }
      // hover效果
      tr:hover > td {
        background-color: rgba(255, 255, 255, 0.3) !important;
      }
      tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.3) !important;
        // text-align: center;
      }
      // 滚动条宽高
      .el-table__body-wrapper::-webkit-scrollbar {
        width: 5px;
        height: 5px;
      }
      .el-table__body-wrapper::-webkit-scrollbar {
        width: 5px;
        /*滚动条宽度*/
        height: 10px;
        /*滚动条高度*/
      }
      /*定义滚动条轨道 内阴影+圆角*/
      .el-table__body-wrapper::-webkit-scrollbar-track {
        box-shadow: 0px 1px 3px #216fe6 inset;
        /*滚动条的背景区域的内阴影*/
        border-radius: 10px;
      }
      /*定义滑块 内阴影+圆角*/
      .el-table__body-wrapper::-webkit-scrollbar-thumb {
        box-shadow: 0px 1px 3px #216fe6 inset;
        border-radius: 6px;
        background-color: #216fe6;
      }
    }
}
</style>