init
This commit is contained in:
@@ -162,7 +162,7 @@ export default {
|
||||
handleUserForbid(row){
|
||||
this.userForbidVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.userForbid.init(row)
|
||||
this.$refs.userForbid.init(row.userId)
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleStatus(scope.row)"
|
||||
v-hasPermi="['cai:report:edit']"
|
||||
@click="handleUserForbid(scope.row)"
|
||||
v-hasPermi="['cai:user:lock']"
|
||||
>封号
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -117,19 +117,26 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<user-forbid-dialog v-if="userForbidVisible" ref="userForbid" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { delReport, listReport, updateReport } from '@/api/cai/report'
|
||||
import { reportStatusList, reportTypeList } from '@/constant/statusMap'
|
||||
import UserForbidDialog from "@/views/cai/user/user-forbid-dialog";
|
||||
|
||||
export default {
|
||||
name: 'Report',
|
||||
components: {
|
||||
UserForbidDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
reportTypeList, reportStatusList,
|
||||
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||
userForbidVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -216,7 +223,13 @@ export default {
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
handleUserForbid(row){
|
||||
this.userForbidVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.userForbid.init(row.reportUid)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -330,7 +330,7 @@ export default {
|
||||
handleUserForbid(row){
|
||||
this.userForbidVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.userForbid.init(row)
|
||||
this.$refs.userForbid.init(row.id)
|
||||
})
|
||||
},
|
||||
handleUserResetAvatar(row){
|
||||
|
||||
@@ -3,14 +3,18 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="封禁用户" prop="">
|
||||
<div class="context-avatar-center">
|
||||
{{ info.nickname }} 【{{ info.usercode }}】 <image-avatar :src="info.avatar"/>
|
||||
{{ userData.nickname }} 【{{ userData.usercode }}】 <image-avatar :src="userData.avatar"/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户目前情况" prop="">
|
||||
<div>用户【{{userData.nickname}}】: <span v-html="userForbidMessage"/></div>
|
||||
<div v-if="userInfoData.lastLoginIp">最后登陆IP【{{userInfoData.lastLoginIp}}】: <span v-html="ipForbidMessage"/></div>
|
||||
</el-form-item>
|
||||
<el-form-item label="封禁IP确认" v-if="ipShow">
|
||||
<el-input v-model="info.lastLoginIp" disabled />
|
||||
<el-input v-model="userInfoData.lastLoginIp" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="封禁设备确认" v-if="uuidShow">
|
||||
<el-input v-model="info.mic" disabled />
|
||||
<el-input v-model="userInfoData.mic" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="封禁类型" prop="type">
|
||||
<el-checkbox-group v-model="form.type" @change="typeChange">
|
||||
@@ -41,8 +45,9 @@
|
||||
|
||||
<script>
|
||||
import ImageUpload from '@/components/ImageUpload/index'
|
||||
import {userForbid} from '@/api/cai/user'
|
||||
import { getUser, userForbid } from '@/api/cai/user'
|
||||
import {forbidStatusList, forbidTimeList, forbidTypeList} from "@/constant/statusMap";
|
||||
import { userForbidInfo } from '@/api/cai/userForbid'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -60,9 +65,12 @@ export default {
|
||||
forbidTime: undefined,
|
||||
reason: undefined,
|
||||
},
|
||||
info:{
|
||||
|
||||
},
|
||||
userData:{},
|
||||
userInfoData:{},
|
||||
userForbid:{},
|
||||
ipUserForbid:{},
|
||||
userForbidMessage: '',
|
||||
ipForbidMessage: '',
|
||||
// 表单校验
|
||||
rules: {
|
||||
type: [
|
||||
@@ -83,9 +91,27 @@ export default {
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init (row) {
|
||||
this.info = row
|
||||
this.form.userId = row.id
|
||||
init (userId) {
|
||||
this.$nextTick(() => {
|
||||
userForbidInfo(userId).then(res => {
|
||||
this.userData = res.data.user
|
||||
this.userInfoData = res.data.userInfo
|
||||
this.userForbid = res.data.userForbid
|
||||
this.ipUserForbid = res.data.ipUserForbid
|
||||
if(this.userForbid){
|
||||
this.userForbidMessage = `<span style="color: red">`+this.userForbid.endTime+`</span><span style="color: burlywood">(`+res.data.userForbidBetween+` 后解封)</span>`
|
||||
}else{
|
||||
this.userForbidMessage = `<span style="color: #1ab394">正常</span>`
|
||||
}
|
||||
if(this.ipUserForbid){
|
||||
this.ipForbidMessage = `<span style="color: red">`+this.ipUserForbid.endTime+`</span><span style="color: burlywood">(`+res.data.ipForbidBetween+` 后解封)</span>`
|
||||
}else{
|
||||
this.ipForbidMessage = `<span style="color: #1ab394">正常</span>`
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
this.form.userId = userId
|
||||
this.form.type = []
|
||||
this.form.forbidTime = undefined
|
||||
this.form.reason = undefined
|
||||
|
||||
Reference in New Issue
Block a user