Compare commits

..

No commits in common. "adeecf0b07bfeb259916c5f3f33ca19c40e2ce20" and "1c19301f2883bb2b5841f521f5d3c1453739dd62" have entirely different histories.

2 changed files with 3 additions and 46 deletions

View File

@ -209,11 +209,3 @@ export function loginSelectUserRole(params) {
params, params,
}) })
} }
// 忽略异地登录
export function setIsIgnoreUncommonly(data) {
return request({
url: `/User/setIsIgnoreUncommonly`,
method: 'post',
data,
})
}

View File

@ -23,11 +23,6 @@
:label="item.label" /> :label="item.label" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:loginLog:label:IsLoginUncommonly')" prop="IsLoginUncommonly ">
<el-select v-model="searchData.IsLoginUncommonly" clearable style="width: 120px">
<el-option v-for="item of $d.YesOrNo" :key="item.id" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item :label="$t('system:loginLog:label:CreateTime')"> <el-form-item :label="$t('system:loginLog:label:CreateTime')">
<el-date-picker v-model="datetimerange" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" <el-date-picker v-model="datetimerange" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']" @change="handleDatetimeChange" style="width: 380px" /> :default-time="['00:00:00', '23:59:59']" @change="handleDatetimeChange" style="width: 380px" />
@ -51,13 +46,8 @@
justify-content: flex-end; justify-content: flex-end;
"> ">
<el-tooltip class="item" effect="dark" :content="$t('system:loginLog:label:IsLoginUncommonly')" <el-tooltip class="item" effect="dark" :content="$t('system:loginLog:label:IsLoginUncommonly')"
placement="top" style="margin-right: 3px" v-if="scope.row.IsIgnoreUncommonly"> placement="top" style="margin-right: 3px" v-if="scope.row.IsLoginUncommonly">
<i v-if="scope.row.IsLoginUncommonly" class="el-icon-warning icon-i icon-success"></i> <i v-if="scope.row.IsLoginUncommonly" class="el-icon-warning icon-i"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system:loginLog:label:IsLoginUncommonly')"
placement="top" style="margin-right: 3px" v-else-if="scope.row.IsLoginUncommonly">
<i v-if="scope.row.IsLoginUncommonly" class="el-icon-warning icon-i"
@click.stop="setIsIgnoreUncommonly(scope.row)"></i>
</el-tooltip> </el-tooltip>
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</span> </span>
@ -126,7 +116,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getUserLogList, setIsIgnoreUncommonly } from '@/api/user' import { getUserLogList } from '@/api/user'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import detail from './detail.vue' import detail from './detail.vue'
import moment from 'moment' import moment from 'moment'
@ -136,7 +126,6 @@ const searchDataDefault = () => {
OptTypeList: [], OptTypeList: [],
Ip: '', Ip: '',
LoginFaildName: '', LoginFaildName: '',
IsLoginUncommonly: null,
LoginUserName: '', LoginUserName: '',
LoginUserTypeEnum: null, LoginUserTypeEnum: null,
BeginDate: '', BeginDate: '',
@ -170,26 +159,6 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
//
async setIsIgnoreUncommonly(row) {
try {
let confirm = await this.$confirm(this.$t("system:loginLog:confirmMessage:setIsIgnoreUncommonly"))
if (!confirm) return false
let data = {
IsIgnoreUncommonly: true,
Id: row.Id
}
this.loading = true
let res = await setIsIgnoreUncommonly(data)
this.loading = false
if (res.IsSuccess) {
this.getList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
handleOpenDialog(row) { handleOpenDialog(row) {
if (!row.JsonObj) if (!row.JsonObj)
return this.$message.warning(this.$t('system:loginLog:message:noJSON')) return this.$message.warning(this.$t('system:loginLog:message:noJSON'))
@ -276,9 +245,5 @@ export default {
color: #f56c6c; color: #f56c6c;
cursor: pointer; cursor: pointer;
} }
.icon-success {
color: #67C23A
}
} }
</style> </style>