Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
407f0b85d2
|
@ -48,6 +48,7 @@
|
||||||
:show-overflow-tooltip="column.showOverflowTooltip || false"
|
:show-overflow-tooltip="column.showOverflowTooltip || false"
|
||||||
:sortable="column.sortable || false"
|
:sortable="column.sortable || false"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
|
:fixed="column.fixed"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 仅仅显示文字 -->
|
<!-- 仅仅显示文字 -->
|
||||||
|
|
|
@ -135,7 +135,6 @@ const actions = {
|
||||||
zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser)
|
zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser)
|
||||||
commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser)
|
commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser)
|
||||||
commit('SET_USERNAME', data.BasicInfo.UserName)
|
commit('SET_USERNAME', data.BasicInfo.UserName)
|
||||||
commit('SET_USERID', data.BasicInfo.IdentityUserId)
|
|
||||||
setToken(data.JWTStr)
|
setToken(data.JWTStr)
|
||||||
// setName(data.BasicInfo.RealName)
|
// setName(data.BasicInfo.RealName)
|
||||||
const userString = decodeURIComponent(escape(window.atob(data.JWTStr.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
const userString = decodeURIComponent(escape(window.atob(data.JWTStr.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
||||||
|
@ -177,6 +176,8 @@ const actions = {
|
||||||
try {
|
try {
|
||||||
commit('SET_TOKEN', data)
|
commit('SET_TOKEN', data)
|
||||||
setToken(data)
|
setToken(data)
|
||||||
|
commit('SET_USERID', userRoleId)
|
||||||
|
zzSessionStorage.setItem('userId', userRoleId)
|
||||||
const userString = decodeURIComponent(escape(window.atob(data.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
const userString = decodeURIComponent(escape(window.atob(data.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
||||||
const user = JSON.parse(userString)
|
const user = JSON.parse(userString)
|
||||||
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
|
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
<template>
|
||||||
|
<base-model v-if="config.visible" :config="config">
|
||||||
|
<template slot="dialog-body">
|
||||||
|
<el-form ref="form" :model="curData" max-height="500px">
|
||||||
|
<template v-for="key in curDataArr">
|
||||||
|
<el-form-item
|
||||||
|
:key="key"
|
||||||
|
:label="$t(`system:loginLog:form:${key}`)"
|
||||||
|
label-width="120px"
|
||||||
|
style="margin-bottom: 0px"
|
||||||
|
>
|
||||||
|
<span v-if="key !== 'UserRoleList'">{{ curData[key] }}</span>
|
||||||
|
<template v-else>
|
||||||
|
<div
|
||||||
|
v-for="item in curData[key]"
|
||||||
|
:key="item.UserTypeEnum"
|
||||||
|
style="margin: 0"
|
||||||
|
>
|
||||||
|
{{ item.UserTypeShortName
|
||||||
|
}}{{ $t('system:loginLog:form:symbol')
|
||||||
|
}}{{ $fd('IsEnable', !item.IsUserRoleDisabled) }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<template slot="dialog-footer">
|
||||||
|
<el-button type="primary" @click="config.visible = false">
|
||||||
|
{{ $t('common:button:confirm') }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</base-model>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import BaseModel from '@/components/BaseModel'
|
||||||
|
export default {
|
||||||
|
components: { BaseModel },
|
||||||
|
props: {
|
||||||
|
JsonObj: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
config: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
title: this.$t('system:loginLog:dialog:title'),
|
||||||
|
width: '500px',
|
||||||
|
top: '10vh',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
curKeys: [
|
||||||
|
'UserName',
|
||||||
|
'FirstName',
|
||||||
|
'LastName',
|
||||||
|
'EMail',
|
||||||
|
'Phone',
|
||||||
|
'OrganizationName',
|
||||||
|
'PositionName',
|
||||||
|
'DepartmentName',
|
||||||
|
'UserRoleList',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
curDataArr() {
|
||||||
|
if (!this.curData) return []
|
||||||
|
return Object.keys(this.curData)
|
||||||
|
},
|
||||||
|
curData() {
|
||||||
|
if (!this.JsonObj) return {}
|
||||||
|
let obj = JSON.parse(this.JsonObj)
|
||||||
|
let curData = {}
|
||||||
|
Object.keys(obj).forEach((key) => {
|
||||||
|
if (this.curKeys.includes(key)) {
|
||||||
|
curData[key] = obj[key]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return curData
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -50,7 +50,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label=" $t('system:loginLog:table:LoginUserType')"
|
:label="$t('system:loginLog:table:LoginUserType')"
|
||||||
prop="LoginUserTypeEnum"
|
prop="LoginUserTypeEnum"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -77,19 +77,15 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button type="primary" icon="el-icon-search" @click="getList">
|
||||||
type="primary"
|
{{ $t('common:button:search') }}
|
||||||
icon="el-icon-search"
|
|
||||||
@click="getList"
|
|
||||||
>
|
|
||||||
{{ $t("common:button:search") }}
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="handleReset"
|
@click="handleReset"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:reset") }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -110,7 +106,7 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("UserOptType", scope.row.OptType) }}
|
{{ $fd('UserOptType', scope.row.OptType) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -136,12 +132,12 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('system:loginLog:table:LoginUserName')"
|
:label="$t('system:loginLog:table:LoginUserName')"
|
||||||
prop="LoginUserName"
|
prop="ActionUserName"
|
||||||
min-width="140"
|
min-width="140"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
:label="$t('system:loginLog:table:LoginUserType')"
|
:label="$t('system:loginLog:table:LoginUserType')"
|
||||||
prop="LoginUserTypeEnum"
|
prop="LoginUserTypeEnum"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
|
@ -151,15 +147,15 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("UserType", scope.row.LoginUserTypeEnum) }}
|
{{ $fd("UserType", scope.row.LoginUserTypeEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('system:loginLog:table:OptUserName')"
|
:label="$t('system:loginLog:table:OptUserName')"
|
||||||
prop="OptUserName"
|
prop="TargetIdentityUserName"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
:label="$t('system:loginLog:table:OptUserType')"
|
:label="$t('system:loginLog:table:OptUserType')"
|
||||||
prop="OptUserTypeEnum"
|
prop="OptUserTypeEnum"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
|
@ -169,6 +165,21 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("UserType", scope.row.OptUserTypeEnum) }}
|
{{ $fd("UserType", scope.row.OptUserTypeEnum) }}
|
||||||
</template>
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column
|
||||||
|
:label="$t('system:loginLog:table:detail')"
|
||||||
|
min-width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.JsonObj"
|
||||||
|
type="text"
|
||||||
|
@click="handleOpenDialog(scope.row)"
|
||||||
|
>
|
||||||
|
<span>{{ $t('system:loginLog:message:detail') }}</span>
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('system:loginLog:table:CreateTime')"
|
:label="$t('system:loginLog:table:CreateTime')"
|
||||||
|
@ -187,29 +198,31 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<detail :config="config" :JsonObj="JsonObj" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getUserLogList } from "@/api/user";
|
import { getUserLogList } from '@/api/user'
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from '@/components/Pagination'
|
||||||
import moment from "moment";
|
import detail from './detail.vue'
|
||||||
|
import moment from 'moment'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
OptType: null,
|
OptType: null,
|
||||||
Ip: "",
|
Ip: '',
|
||||||
LoginFaildName: "",
|
LoginFaildName: '',
|
||||||
LoginUserName: '',
|
LoginUserName: '',
|
||||||
LoginUserTypeEnum: null,
|
LoginUserTypeEnum: null,
|
||||||
BeginDate: "",
|
BeginDate: '',
|
||||||
EndDate: "",
|
EndDate: '',
|
||||||
Asc: false,
|
Asc: false,
|
||||||
SortField: "CreateTime",
|
SortField: 'CreateTime',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination, detail },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
moment,
|
moment,
|
||||||
|
@ -218,52 +231,69 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
datetimerange: [],
|
datetimerange: [],
|
||||||
};
|
config: {
|
||||||
|
visible: false,
|
||||||
|
title: this.$t('system:loginLog:dialog:title'),
|
||||||
|
width: '500px',
|
||||||
|
top: '10vh',
|
||||||
|
},
|
||||||
|
JsonObj: null,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpenDialog(row) {
|
||||||
|
if (!row.JsonObj)
|
||||||
|
return this.$message.warning(this.$t('system:loginLog:message:noJSON'))
|
||||||
|
this.config.title = this.$t('system:loginLog:dialog:title').replace(
|
||||||
|
'xxx',
|
||||||
|
this.$fd('UserOptType', row.OptType)
|
||||||
|
)
|
||||||
|
this.JsonObj = row.JsonObj
|
||||||
|
this.config.visible = true
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getUserLogList(this.searchData)
|
getUserLogList(this.searchData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.list = res.Result.CurrentPageData;
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount;
|
this.total = res.Result.TotalCount
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleDatetimeChange(val) {
|
handleDatetimeChange(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.searchData.BeginDate = val[0];
|
this.searchData.BeginDate = val[0]
|
||||||
this.searchData.EndDate = val[1];
|
this.searchData.EndDate = val[1]
|
||||||
} else {
|
} else {
|
||||||
this.searchData.BeginDate = "";
|
this.searchData.BeginDate = ''
|
||||||
this.searchData.EndDate = "";
|
this.searchData.EndDate = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 重置列表查询
|
// 重置列表查询
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.datetimerange = []
|
this.datetimerange = []
|
||||||
this.searchData = searchDataDefault();
|
this.searchData = searchDataDefault()
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === "ascending") {
|
if (column.order === 'ascending') {
|
||||||
this.searchData.Asc = true;
|
this.searchData.Asc = true
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false;
|
this.searchData.Asc = false
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop;
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.log {
|
.log {
|
||||||
|
|
|
@ -213,6 +213,7 @@ export default {
|
||||||
type: 'operate',
|
type: 'operate',
|
||||||
label: this.$t('common:action:action'),
|
label: this.$t('common:action:action'),
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
|
fixed:"right",
|
||||||
operates: [
|
operates: [
|
||||||
{
|
{
|
||||||
name: this.$t('common:button:edit'),
|
name: this.$t('common:button:edit'),
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||||
{{ $t("common:button:search") }}
|
{{ $t('common:button:search') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 重置 -->
|
<!-- 重置 -->
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="handleReset"
|
@click="handleReset"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:reset") }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("UserOptType", scope.row.OptType) }}
|
{{ $fd('UserOptType', scope.row.OptType) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -145,12 +145,12 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('trials:loginLog:table:userName')"
|
:label="$t('trials:loginLog:table:userName')"
|
||||||
prop="LoginUserName"
|
prop="ActionUserName"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
:label="$t('trials:loginLog:table:userType')"
|
:label="$t('trials:loginLog:table:userType')"
|
||||||
prop="LoginUserTypeEnum"
|
prop="LoginUserTypeEnum"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
|
@ -158,18 +158,18 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("UserType", scope.row.LoginUserTypeEnum) }}
|
{{ $fd('UserType', scope.row.LoginUserTypeEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="!isMine"
|
v-if="!isMine"
|
||||||
:label="$t('trials:loginLog:table:optUserName')"
|
:label="$t('trials:loginLog:table:optUserName')"
|
||||||
prop="OptUserName"
|
prop="TargetIdentityUserName"
|
||||||
min-width="160"
|
min-width="120"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
v-if="!isMine"
|
v-if="!isMine"
|
||||||
:label="$t('trials:loginLog:table:optUserType')"
|
:label="$t('trials:loginLog:table:optUserType')"
|
||||||
prop="OptUserTypeEnum"
|
prop="OptUserTypeEnum"
|
||||||
|
@ -178,7 +178,22 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("UserType", scope.row.OptUserTypeEnum) }}
|
{{ $fd('UserType', scope.row.OptUserTypeEnum) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column
|
||||||
|
:label="$t('trials:loginLog:table:detail')"
|
||||||
|
min-width="80"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.JsonObj"
|
||||||
|
type="text"
|
||||||
|
@click="handleOpenDialog(scope.row)"
|
||||||
|
>
|
||||||
|
<span>{{ $t('trials:loginLog:message:detail') }}</span>
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -198,32 +213,34 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<detail :config="config" :JsonObj="JsonObj" />
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getUserLogList, getTrialUserList } from "@/api/user";
|
import { getUserLogList, getTrialUserList } from '@/api/user'
|
||||||
import BaseContainer from "@/components/BaseContainer";
|
import BaseContainer from '@/components/BaseContainer'
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from '@/components/Pagination'
|
||||||
import moment from "moment";
|
import moment from 'moment'
|
||||||
|
import detail from '@/views/system/login-log/detail.vue'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
TrialId: "",
|
TrialId: '',
|
||||||
OptType: null,
|
OptType: null,
|
||||||
Ip: "",
|
Ip: '',
|
||||||
LoginFaildName: "",
|
LoginFaildName: '',
|
||||||
LoginUserName: "",
|
LoginUserName: '',
|
||||||
LoginUserTypeEnum: null,
|
LoginUserTypeEnum: null,
|
||||||
BeginDate: "",
|
BeginDate: '',
|
||||||
EndDate: "",
|
EndDate: '',
|
||||||
Asc: false,
|
Asc: false,
|
||||||
SortField: "CreateTime",
|
SortField: 'CreateTime',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
UserId: "",
|
UserId: '',
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
components: { BaseContainer, Pagination },
|
components: { BaseContainer, Pagination, detail },
|
||||||
props: {
|
props: {
|
||||||
isMine: {
|
isMine: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -231,7 +248,7 @@ export default {
|
||||||
},
|
},
|
||||||
id: {
|
id: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -243,75 +260,92 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
datetimerange: [],
|
datetimerange: [],
|
||||||
trialUserList: [],
|
trialUserList: [],
|
||||||
};
|
config: {
|
||||||
|
visible: false,
|
||||||
|
title: this.$t('trials:loginLog:dialog:title'),
|
||||||
|
width: '500px',
|
||||||
|
top: '10vh',
|
||||||
|
},
|
||||||
|
JsonObj: null,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (!this.isMine) {
|
if (!this.isMine) {
|
||||||
this.getTrialUserList();
|
this.getTrialUserList()
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpenDialog(row) {
|
||||||
|
if (!row.JsonObj)
|
||||||
|
return this.$message.warning(this.$t('trials:loginLog:message:noJSON'))
|
||||||
|
this.config.title = this.$t('trials:loginLog:dialog:title').replace(
|
||||||
|
'xxx',
|
||||||
|
this.$fd('UserOptType', row.OptType)
|
||||||
|
)
|
||||||
|
this.JsonObj = row.JsonObj
|
||||||
|
this.config.visible = true
|
||||||
|
},
|
||||||
// 获取登录用户
|
// 获取登录用户
|
||||||
async getTrialUserList() {
|
async getTrialUserList() {
|
||||||
try {
|
try {
|
||||||
let params = {
|
let params = {
|
||||||
TrialId: this.$route.query.trialId,
|
TrialId: this.$route.query.trialId,
|
||||||
};
|
}
|
||||||
let res = await getTrialUserList(params);
|
let res = await getTrialUserList(params)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.trialUserList = res.Result;
|
this.trialUserList = res.Result
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.searchData.TrialId = this.$route.query.trialId;
|
this.searchData.TrialId = this.$route.query.trialId
|
||||||
if (this.isMine) {
|
if (this.isMine) {
|
||||||
this.searchData.UserId = this.id;
|
this.searchData.UserId = this.id
|
||||||
}
|
}
|
||||||
getUserLogList(this.searchData)
|
getUserLogList(this.searchData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.list = res.Result.CurrentPageData;
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount;
|
this.total = res.Result.TotalCount
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleDatetimeChange(val) {
|
handleDatetimeChange(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.searchData.BeginDate = val[0];
|
this.searchData.BeginDate = val[0]
|
||||||
this.searchData.EndDate = val[1];
|
this.searchData.EndDate = val[1]
|
||||||
} else {
|
} else {
|
||||||
this.searchData.BeginDate = "";
|
this.searchData.BeginDate = ''
|
||||||
this.searchData.EndDate = "";
|
this.searchData.EndDate = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 重置列表查询
|
// 重置列表查询
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.datetimerange = null;
|
this.datetimerange = null
|
||||||
this.searchData = searchDataDefault();
|
this.searchData = searchDataDefault()
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === "ascending") {
|
if (column.order === 'ascending') {
|
||||||
this.searchData.Asc = true;
|
this.searchData.Asc = true
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false;
|
this.searchData.Asc = false
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop;
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue