|
@@ -129,16 +129,25 @@ export default {
|
|
|
this.getList()
|
|
|
},
|
|
|
/** 查询用户列表 */
|
|
|
- getList(){
|
|
|
+ async getList(){
|
|
|
+ let sysTime
|
|
|
+ let lk
|
|
|
+ await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
+ sysTime = res.data.sysTime
|
|
|
+ lk = res.data.lk
|
|
|
+ }).catch((error) => {
|
|
|
+ })
|
|
|
+
|
|
|
this.loading = true;
|
|
|
var searchParams = {
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
- ip: this.queryParams.ip
|
|
|
+ ip: this.queryParams.ip,
|
|
|
+ sysTime: sysTime,
|
|
|
+ lk: lk
|
|
|
}
|
|
|
- this.$axios.get('/ipBlacklistController/getAll',
|
|
|
+ await this.$axios.get('/ipBlacklistController/getAll',
|
|
|
{params: searchParams}).then((res) => {
|
|
|
-
|
|
|
if (res.code == 0) {
|
|
|
this.userList = res.data.records
|
|
|
this.total = res.data.total
|
|
@@ -190,7 +199,19 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
|
- inputErrorMessage: 'IP格式不正确'
|
|
|
+ inputErrorMessage: 'IP格式不正确',
|
|
|
+ beforeClose(action, instance, done) {
|
|
|
+ if (action === "confirm") {
|
|
|
+ instance.$refs["confirm"].$el.onclick = (function (e) {
|
|
|
+ e = e || window.event;
|
|
|
+ if (e.detail != 0) {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ })();
|
|
|
+ } else {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ }
|
|
|
}).then(async({value})=>{
|
|
|
this.doAdd(value)
|
|
|
}).catch((e)=>{})
|
|
@@ -217,11 +238,21 @@ export default {
|
|
|
/**
|
|
|
* 添加提交
|
|
|
*/
|
|
|
- doAdd:debounce(function(ip){
|
|
|
+ doAdd:debounce(async function(ip){
|
|
|
+ let sysTime
|
|
|
+ let lk
|
|
|
+ await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
+ sysTime = res.data.sysTime
|
|
|
+ lk = res.data.lk
|
|
|
+ }).catch((error) => {
|
|
|
+ })
|
|
|
+
|
|
|
const param = {
|
|
|
- ip:ip
|
|
|
+ ip:ip,
|
|
|
+ sysTime: sysTime,
|
|
|
+ lk: lk
|
|
|
}
|
|
|
- this.$axios.post('/ipBlacklistController/addIp', param).then((res) => {
|
|
|
+ await this.$axios.post('/ipBlacklistController/addIp', param).then((res) => {
|
|
|
if (res.code == 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
@@ -245,9 +276,19 @@ export default {
|
|
|
/**
|
|
|
* 删除提交
|
|
|
*/
|
|
|
- doDelete:debounce(function(_selectData){
|
|
|
+ doDelete:debounce(async function(_selectData){
|
|
|
+ let sysTime
|
|
|
+ let lk
|
|
|
+ await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
+ sysTime = res.data.sysTime
|
|
|
+ lk = res.data.lk
|
|
|
+ }).catch((error) => {
|
|
|
+ })
|
|
|
+
|
|
|
const param = {
|
|
|
- id: _selectData.id
|
|
|
+ id: _selectData.id,
|
|
|
+ sysTime: sysTime,
|
|
|
+ lk: lk
|
|
|
}
|
|
|
this.$axios.post('/ipBlacklistController/delIp', param).then((res) => {
|
|
|
if (res.code == 0) {
|
|
@@ -267,7 +308,6 @@ export default {
|
|
|
type: 'error',
|
|
|
message: '删除失败!'
|
|
|
});
|
|
|
- console.log(error)
|
|
|
this.loading = false
|
|
|
})
|
|
|
},1000)
|