| | |
| | | <template> |
| | | <div class="logLog_box"> |
| | | <My-bread |
| | | :list="[ |
| | | <My-bread :list="[ |
| | | `${$t('operatManage.operatManage')}`, |
| | | `${$t('operatManage.blackwhiteList')}`, |
| | | ]" |
| | | ></My-bread> |
| | | ]"></My-bread> |
| | | <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-tabs |
| | | v-model="activeName" |
| | | @tab-click="handleClick" |
| | | > |
| | | <el-tab-pane |
| | | :label="$t('operatManage.BWL.blackList')" |
| | | name="first" |
| | | > |
| | | <div> |
| | | <div class="inquire subpage_Div"> |
| | | <el-form |
| | | ref="queryInfo" |
| | | :model="queryInfo" |
| | | :inline="true" |
| | | > |
| | | <el-form-item |
| | | :label="$t('operatManage.BWL.blackListIP')" |
| | | prop="blackListIP" |
| | | > |
| | | <el-input |
| | | style="width:200px" |
| | | v-model="queryInfo.ip" |
| | | :placeholder="$t('operatManage.BWL.listIPInfo')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.BWL.interceptionNumber')" |
| | | prop="visit" |
| | | > |
| | | <el-input |
| | | style="width:200px" |
| | | v-model="queryInfo.visit" |
| | | :placeholder="$t('operatManage.BWL.interceptionNumber')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-button |
| | | type="info" |
| | | @click="resetInfo('queryInfo')" |
| | | icon="el-icon-refresh" |
| | | size="small" |
| | | >{{ $t("operatManage.BWL.reset") }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-button |
| | | type="primary" |
| | | @click="queryBlackInfo()" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | >{{ $t("operatManage.BWL.search") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <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 style="float:right"> |
| | | <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> |
| | | </div> |
| | | <div class="table_box subpage_Div"> |
| | | <el-table |
| | | :data="BTableData" |
| | | @selection-change="blackSelectionChange" |
| | | style="width: 100%" |
| | | > |
| | | <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="320" |
| | | 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 |
| | | style="margin-top: 20px" |
| | | class="pagination_box" |
| | | > |
| | | <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> |
| | | </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" |
| | | > |
| | | <el-form-item |
| | | :label="$t('operatManage.BWL.blackListIP')" |
| | | prop="blackListIP" |
| | | :label="$t('operatManage.BWL.whiteListIP')" |
| | | prop="ip" |
| | | > |
| | | <el-input |
| | | v-model="form.blackListIP" |
| | | style="width:200px" |
| | | v-model="queryInfo.ip" |
| | | :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" |
| | | prop="visit" |
| | | > |
| | | <el-input |
| | | v-model="form.interceptionNumber" |
| | | style="width:200px" |
| | | v-model="queryInfo.visit" |
| | | :placeholder="$t('operatManage.BWL.interceptionNumber')" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-form-item style="float: right;"> |
| | | <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> {{ |
| | | @click="resetForm('queryInfo')" |
| | | type="info" size="small" |
| | | ><i class="el-icon-delete"></i> {{ |
| | | $t('operatManage.BWL.reset') |
| | | }}</el-button |
| | | > |
| | | }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button v-if="menuStatus.insert" @click="showInsertdialog(1)">{{ |
| | | $t('common.append') |
| | | <el-form-item style="float: right;"> |
| | | <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 style="float: right;"> |
| | | <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 v-if="menuStatus.delete" @click="delBWList">{{ |
| | | $t('common.delete') |
| | | <el-form-item style="float: right;"> |
| | | <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> |
| | | </div> |
| | | <div class="table_box"> |
| | | <div class="table_box1 subpage_Div"> |
| | | <el-table |
| | | :data="BTableData" |
| | | stripe |
| | | :data="WTableData" |
| | | @selection-change="blackSelectionChange" |
| | | style="width: 100%" |
| | | height="85%" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | |
| | | > |
| | | <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 |
| | | > |
| | | </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> {{ |
| | | $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_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 |
| | | > |
| | | >{{ $t('common.update') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-table> |
| | | <div style="margin-top: 20px" class="pagination_box"> |
| | | <div |
| | | style="margin-top: 20px" |
| | | class="pagination_box" |
| | | > |
| | | <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')" |
| | |
| | | :visible.sync="InsertFormdialog" |
| | | width="30%" |
| | | > |
| | | <el-form ref="insertform" :model="insertform"> |
| | | <el-form-item :label-width="formLabelWidth" :label="$t('operatManage.tokentoolObj.ip')"> |
| | | <el-form |
| | | ref="insertform" |
| | | :model="insertform" |
| | | > |
| | | <el-form-item |
| | | :label-width="formLabelWidth" |
| | | :label="$t('operatManage.tokentoolObj.ip')" |
| | | > |
| | | <el-input |
| | | v-model="insertform.ip" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item :label-width="formLabelWidth" :label="$t('operatManage.BWL.PageView')"> |
| | | <el-form-item |
| | | :label-width="formLabelWidth" |
| | | :label="$t('operatManage.BWL.PageView')" |
| | | > |
| | | <el-input |
| | | v-model="insertform.visit" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item :label-width="formLabelWidth" :label="$t('operatManage.BWL.description')"> |
| | | <el-form-item |
| | | :label-width="formLabelWidth" |
| | | :label="$t('operatManage.BWL.description')" |
| | | > |
| | | <el-input |
| | | v-model="insertform.descr" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose">{{ |
| | | $t('common.close') |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <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> |
| | |
| | | :visible.sync="updateFormdialog" |
| | | width="30%" |
| | | > |
| | | <el-form ref="editfrom" :model="editfrom"> |
| | | <el-form-item :label-width="formLabelWidth" label="IP地址"> |
| | | <el-form |
| | | ref="editfrom" |
| | | :model="editfrom" |
| | | > |
| | | <el-form-item |
| | | :label-width="formLabelWidth" |
| | | label="IP地址" |
| | | > |
| | | <el-input |
| | | v-model="editfrom.ip" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item :label-width="formLabelWidth" label="访问次数"> |
| | | <el-form-item |
| | | :label-width="formLabelWidth" |
| | | label="访问次数" |
| | | > |
| | | <el-input |
| | | v-model="editfrom.visit" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item :label-width="formLabelWidth" label="描述"> |
| | | <el-form-item |
| | | :label-width="formLabelWidth" |
| | | label="描述" |
| | | > |
| | | <el-input |
| | | v-model="editfrom.descr" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="editFromDataClose">{{ |
| | | $t('common.close') |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <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: { |
| | |
| | | methods: { |
| | | 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.$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({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | 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; |
| | | } |
| | | }, |
| | | }, |
| | | 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 { |
| | | |
| | | border-radius: 10px; |
| | | height: 100%; |
| | | |
| | | box-sizing: border-box; |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | overflow: auto; |
| | | .el-input { |
| | | width: 300px; |
| | | } |
| | |
| | | padding: 10px; |
| | | margin-top: 20px; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | |
| | | margin-bottom: 20px; |
| | | |
| | | } |
| | | .table_box { |
| | | padding: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | overflow: auto; |
| | | height: 410px; |
| | | |
| | | |
| | | |
| | | } |
| | | .table_box1{ |
| | | padding: 10px; |
| | | .table_box1 { |
| | | padding: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | overflow: auto; |
| | | height: 460px; |
| | | |
| | | |
| | | |
| | | } |
| | | .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> |