Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details

uat
caiyiling 2025-04-10 17:12:06 +08:00
commit 162b649c3c
3 changed files with 59 additions and 8 deletions

View File

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

View File

@ -23,6 +23,11 @@
: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" />
@ -46,8 +51,13 @@
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.IsLoginUncommonly"> placement="top" style="margin-right: 3px" v-if="scope.row.IsIgnoreUncommonly">
<i v-if="scope.row.IsLoginUncommonly" class="el-icon-warning icon-i"></i> <i v-if="scope.row.IsLoginUncommonly" class="el-icon-warning icon-i icon-success"></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>
@ -116,7 +126,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getUserLogList } from '@/api/user' import { getUserLogList, setIsIgnoreUncommonly } 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'
@ -126,6 +136,7 @@ const searchDataDefault = () => {
OptTypeList: [], OptTypeList: [],
Ip: '', Ip: '',
LoginFaildName: '', LoginFaildName: '',
IsLoginUncommonly: null,
LoginUserName: '', LoginUserName: '',
LoginUserTypeEnum: null, LoginUserTypeEnum: null,
BeginDate: '', BeginDate: '',
@ -159,6 +170,26 @@ 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'))
@ -245,5 +276,9 @@ export default {
color: #f56c6c; color: #f56c6c;
cursor: pointer; cursor: pointer;
} }
.icon-success {
color: #67C23A
}
} }
</style> </style>

View File

@ -379,9 +379,15 @@ export default {
this.getList() this.getList()
}, },
// //
async downLoad(list) { async downLoad(list, row = {}) {
if (!this.isManage) return false if (!this.isManage) return false
try { try {
if (row.Id) {
return await downLoadFile(
this.OSSclientConfig.basePath + row.FilePath,
row.Name
)
}
let arr = this.filterExternalIds(this.tableData, list) let arr = this.filterExternalIds(this.tableData, list)
if (arr && arr.length === 1) { if (arr && arr.length === 1) {
let data = this.getData(this.tableData, arr[0]) let data = this.getData(this.tableData, arr[0])
@ -691,11 +697,13 @@ export default {
let res = await deleteAuditDocument(data) let res = await deleteAuditDocument(data)
if (res.IsSuccess) { if (res.IsSuccess) {
this.checkList = [] this.checkList = []
this.rowData = {}
this.getList(this.rowData.Id)
if (this.$refs.versionDetail) { if (this.$refs.versionDetail) {
// this.$refs.versionDetail.getHistoricalVersion() // this.$refs.versionDetail.getHistoricalVersion()
this.getList(this.rowData.Id)
this.checkList = [this.rowData.Id] this.checkList = [this.rowData.Id]
} else {
this.getList()
this.rowData = {}
} }
} }
} catch (err) { } catch (err) {
@ -1029,7 +1037,7 @@ export default {
this.getList() this.getList()
this.getBreadcrumbData() this.getBreadcrumbData()
} else { } else {
this.perview(this.rowData) this.perview(row)
} }
} }
if (key === 'del') { if (key === 'del') {
@ -1056,7 +1064,7 @@ export default {
this.stickup() this.stickup()
} }
if (key === 'downLoad') { if (key === 'downLoad') {
this.downLoad(this.checkList) this.downLoad(this.checkList, row)
} }
}, },
setRowStyle({ row, rowIndex }) { setRowStyle({ row, rowIndex }) {