|
@@ -18,6 +18,15 @@
|
|
|
>
|
|
>
|
|
|
[查看]
|
|
[查看]
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ link
|
|
|
|
|
+ v-permission="'user:userRequestLimit:disarm'"
|
|
|
|
|
+ @click="handleDisarm(row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ [解禁]
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</common-table>
|
|
</common-table>
|
|
@@ -26,17 +35,20 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
- import { ref, reactive } from 'vue';
|
|
|
|
|
|
|
+ import { ref, reactive, getCurrentInstance } from 'vue';
|
|
|
import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
|
import pageSearch from './components/page-search.vue';
|
|
import pageSearch from './components/page-search.vue';
|
|
|
- import restrictHistory from '@/views/riskControl/restrictLog/components/restrict-history.vue'
|
|
|
|
|
|
|
+ import restrictHistory from '@/views/riskControl/restrictLog/components/restrict-history.vue';
|
|
|
|
|
+ import { ElMessageBox } from 'element-plus';
|
|
|
|
|
|
|
|
defineOptions({ name: 'restrictLog' });
|
|
defineOptions({ name: 'restrictLog' });
|
|
|
|
|
|
|
|
|
|
+ const { proxy } = getCurrentInstance();
|
|
|
|
|
+
|
|
|
/** 表格列配置 */
|
|
/** 表格列配置 */
|
|
|
const columns = ref([
|
|
const columns = ref([
|
|
|
{ label: '用户昵称', prop: 'nickName', align: 'center' },
|
|
{ label: '用户昵称', prop: 'nickName', align: 'center' },
|
|
|
- { label: '限制类型', prop: 'limitType', align: 'center' },
|
|
|
|
|
|
|
+ { label: '限制类型', prop: 'limitTypeDesc', align: 'center' },
|
|
|
{ label: '限制时间', prop: 'limitTime', align: 'center' },
|
|
{ label: '限制时间', prop: 'limitTime', align: 'center' },
|
|
|
{ label: '限制ip', prop: 'userIp', align: 'center' },
|
|
{ label: '限制ip', prop: 'userIp', align: 'center' },
|
|
|
{
|
|
{
|
|
@@ -67,4 +79,28 @@
|
|
|
function handleView(row) {
|
|
function handleView(row) {
|
|
|
restrictLogRef.value?.handleOpen(row.userId);
|
|
restrictLogRef.value?.handleOpen(row.userId);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //解禁
|
|
|
|
|
+ function handleDisarm(row) {
|
|
|
|
|
+ ElMessageBox.confirm('确定解禁吗?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ console.log(row);
|
|
|
|
|
+ proxy.$http
|
|
|
|
|
+ .post('/user/userRequestLimit/disarm', {
|
|
|
|
|
+ userId: row.userId,
|
|
|
|
|
+ limitType: row.limitType
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.data.code === 200) {
|
|
|
|
|
+ proxy.$message.success('解禁成功');
|
|
|
|
|
+ reload();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ proxy.$message.error(res.data.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
</script>
|
|
</script>
|