管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-03-03 b6c8e7c61f0270598ba7fdbc44f79512e010d0fe
src/views/maintenance/blackwhiteList.vue
@@ -22,7 +22,9 @@
                    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')"-->
@@ -37,23 +39,24 @@
<!--                </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
                    type="info"
                    @click="resetInfo('queryInfo')"
                    icon="el-icon-refresh"
                    size="small"
                    >{{ $t("operatManage.BWL.reset") }}</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
                    type="primary"
                    @click="queryBlackInfo()"
                    size="small"
                    icon="el-icon-search"
                    >{{ $t("operatManage.BWL.search") }}
                  </el-button>
                </el-form-item>
                <el-form-item>
                  <el-button
@@ -67,12 +70,11 @@
                </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
                      type="info"
                      @click="resetInfo('queryInfo')"
                      icon="el-icon-refresh"
                      size="small"
                  >{{ $t("operatManage.BWL.reset") }}</el-button
                  >
                </el-form-item>
              </div>
@@ -82,6 +84,7 @@
        <div class="table_box subpage_Div" :style="styleVar">
          <el-table
            :data="BTableData"
            border
            @selection-change="blackSelectionChange"
            style="width: 100%"
            height="calc(100% - 45px)"
@@ -168,7 +171,9 @@
                    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')"-->
@@ -183,21 +188,21 @@
<!--                </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
                    @click="resetForm('queryInfo')"
                    type="info"
                    size="small"
                    ><i class="el-icon-delete"></i> &nbsp;{{
                      $t("operatManage.BWL.reset")
                    }}</el-button
                  >
                </el-form-item>
                <el-form-item>
                  <el-button size="small" type="primary" @click="queryWhiteInfo"
                    ><i class="el-icon-search"></i> &nbsp;{{
                      $t("operatManage.BWL.search")
                    }}</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>
@@ -212,12 +217,12 @@
                </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
                      @click="resetForm('queryInfo')"
                      type="info"
                      size="small"
                  ><i class="el-icon-delete"></i> &nbsp;{{
                      $t("operatManage.BWL.reset")
                    }}</el-button
                  >
                </el-form-item>
              </div>
@@ -227,6 +232,7 @@
        <div class="table_box subpage_Div" :style="styleVar">
          <el-table
            :data="WTableData"
            border
            @selection-change="blackSelectionChange"
            style="width: 100%"
            height="calc(100% - 45px)"
@@ -304,6 +310,7 @@
    <el-dialog
      :title="$t('common.append')"
      :visible.sync="InsertFormdialog"
      :before-close="handleClose"
    >
      <el-form ref="insertform" :model="insertform" label-position="top">
@@ -352,6 +359,7 @@
      :title="$t('common.update')"
      style="overflow: hidden"
      :visible.sync="updateFormdialog"
      :before-close="handleCloseEdit"
    >
      <el-form ref="editfrom" :model="editfrom" label-position="top">
        <el-form-item :label-width="formLabelWidth" label="IP地址">
@@ -465,10 +473,16 @@
      });
    },
    editFromDataClose() {
      this.updateFormdialog = false;
      this.$nextTick(() => {
        this.editForm = JSON.parse(this.initialForm);
      });
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.updateFormdialog = false;
          this.$nextTick(() => {
            this.editForm = JSON.parse(this.initialForm);
          });
          this.BGetList();
          this.WGetList();
        })
        .catch((_) => { });
    },
    queryBlackInfo() {
      let searchData = {
@@ -596,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);
@@ -709,6 +727,20 @@
          break;
      }
    },
    handleClose() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false
        })
        .catch((_) => { });
    },
    handleCloseEdit() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.updateFormdialog = false
        })
        .catch((_) => { });
    },
  },
  mounted() {
    window.addEventListener("resize", this.onResize);