lxl
2022-10-19 cfcd9a35c74ce88da3647a0be3f1459fe5086ed1
src/views/maintenance/blackwhiteList.vue
@@ -61,20 +61,20 @@
            </el-form-item>
            <el-form-item>
              <el-button @click="onSubmit">{{
                $t("operatManage.BWL.change")
                $t('operatManage.BWL.change')
              }}</el-button>
            </el-form-item>
            <el-form-item>
              <el-button @click="onSubmit"
                ><i class="el-icon-search"></i> &nbsp;{{
                  $t("operatManage.BWL.search")
                  $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")
                  $t('operatManage.BWL.reset')
                }}</el-button
              >
            </el-form-item>
@@ -161,14 +161,14 @@
            <el-form-item>
              <el-button @click="onSubmit"
                ><i class="el-icon-search"></i> &nbsp;{{
                  $t("operatManage.BWL.search")
                  $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")
                  $t('operatManage.BWL.reset')
                }}</el-button
              >
            </el-form-item>
@@ -229,10 +229,10 @@
    </el-tabs>
  </div>
</template>
  <script>
import MyBread from "../../components/MyBread.vue";
import { blacklistSelectByPageAndCount } from "../../api/api";
<script>
import MyBread from '../../components/MyBread.vue';
import { blacklistSelectByPageAndCount } from '../../api/api';
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
@@ -241,14 +241,14 @@
  data() {
    return {
      activeName: "first",
      activeName: 'first',
      currentPage: 1,
      form: {
        blackListIP: "",
        IPState: "",
        interceptionCycle: "",
        unit: "",
        interceptionNumber: "",
        blackListIP: '',
        IPState: '',
        interceptionCycle: '',
        unit: '',
        interceptionNumber: '',
      },
      BTableData: [],
      WTableData: [],
@@ -269,7 +269,7 @@
  methods: {
    //格式化时间
    add0(m) {
      return m < 10 ? "0" + m : m;
      return m < 10 ? '0' + m : m;
    },
    //格式化时间
    format(shijianchuo) {
@@ -282,7 +282,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) +
        // ":" +
@@ -319,7 +319,7 @@
      this.getList();
    },
    onSubmit() {
      console.log("submit!");
      console.log('submit!');
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
@@ -328,16 +328,15 @@
      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;
    },
    async BGetList() {
      const data = await blacklistSelectByPageAndCount(this.BListData);
      console.log(data);
      if (data.code != 200) {
        return this.$message.error("列表调用失败");
        return this.$message.error('列表调用失败');
      }
      this.BTableData = data.result;
      this.Bcount = data.count;
@@ -349,7 +348,7 @@
  },
};
</script>
  <style lang="less" scoped>
<style lang="less" scoped>
//@import url(); 引入公共css类
.logLog_box {
  background: rgb(240, 242, 245);
@@ -384,4 +383,3 @@
  }
}
</style>