| | |
| | | <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> {{ |
| | | $t('operatManage.BWL.search') |
| | | }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | ><i class="el-icon-delete"></i> {{ |
| | | $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> {{--> |
| | | <!-- $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> {{ |
| | | $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 |
| | |
| | | <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: 40px" 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> {{ |
| | | $t('operatManage.BWL.search') |
| | | }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="onSubmit" |
| | | ><i class="el-icon-delete"></i> {{ |
| | | $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_box"> |
| | | <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: 40px" 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%" |
| | | > |
| | | <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> |
| | |
| | | :title="$t('common.update')" |
| | | style="overflow: hidden" |
| | | :visible.sync="updateFormdialog" |
| | | width="30%" |
| | | > |
| | | <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> |
| | |
| | | </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: { |
| | |
| | | |
| | | 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: { |
| | |
| | | }, |
| | | 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.$nextTick(() => { |
| | | this.editForm = JSON.parse(this.initialForm); |
| | | }); |
| | | }, |
| | | 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); |
| | |
| | | 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; |
| | | }, |
| | | |
| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | 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) + |
| | | // ":" + |
| | |
| | | return this.format(data); |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(tab, event); |
| | | // console.log(tab, event); |
| | | }, |
| | | WhandleSizeChange(val) { |
| | | this.WListData.pageSize = val; |
| | |
| | | }, |
| | | 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(); |
| | | }, |
| | |
| | | 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); |
| | | if (data.code != 200) { |
| | | return this.$message.error('列表调用失败'); |
| | | return this.$message.error("列表调用失败"); |
| | | } |
| | | |
| | | this.BTableData = data.result; |
| | |
| | | }, |
| | | 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; |
| | | } |
| | | }, |
| | | }, |
| | | 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) { |
| | |
| | | <style lang="less" scoped> |
| | | //@import url(); 引入公共css类 |
| | | .logLog_box { |
| | | background: rgb(240, 242, 245); |
| | | border-radius: 10px; |
| | | height: 100%; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 0.5% 1%; |
| | | .el-input { |
| | | width: 300px; |
| | | } |
| | | .inquire { |
| | | padding: 10px; |
| | | margin-top: 20px; |
| | | background: #fff; |
| | | padding:0 8px; |
| | | //margin-top: 20px; |
| | | |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | margin-bottom: 20px; |
| | | |
| | | //margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | .table_box { |
| | | padding: 10px; |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | overflow: auto; |
| | | height: 70%; |
| | | .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; |
| | | } |
| | | .el-tab-pane { |
| | | height: 82vh; |
| | | } |
| | | } |
| | | </style> |