mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
chore:字典组件优化,支持数组格式,其他模块代码优化
This commit is contained in:
@ -31,8 +31,8 @@ function closeDrawer() {
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NDescriptions label-placement="left" :column="1" size="small" bordered>
|
||||
<NDescriptionsItem label="用户账号">
|
||||
{{ props.rowData?.userName }}
|
||||
<NDescriptionsItem label="账号信息">
|
||||
{{ props.rowData?.userName }} | {{ props.rowData?.ipaddr }} | {{ props.rowData?.loginLocation }}
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem label="客户端">
|
||||
{{ props.rowData?.clientKey }}
|
||||
@ -40,12 +40,6 @@ function closeDrawer() {
|
||||
<NDescriptionsItem label="设备类型">
|
||||
<DictTag size="small" :value="props.rowData?.deviceType" dict-code="sys_device_type" />
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem label="登录IP地址">
|
||||
{{ props.rowData?.ipaddr }}
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem label="登录地点">
|
||||
{{ props.rowData?.loginLocation }}
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem label="浏览器类型">
|
||||
<div class="flex items-center gap-2">
|
||||
<SvgIcon :icon="getBrowserIcon(props.rowData?.browser ?? '')" />
|
||||
|
@ -10,6 +10,7 @@ import { useAppStore } from '@/store/modules/app';
|
||||
import { useDownload } from '@/hooks/business/download';
|
||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||
import DictTag from '@/components/custom/dict-tag.vue';
|
||||
import { useDict } from '@/hooks/business/dict';
|
||||
import PostOperateDrawer from './modules/post-operate-drawer.vue';
|
||||
import PostSearch from './modules/post-search.vue';
|
||||
|
||||
@ -17,6 +18,7 @@ defineOptions({
|
||||
name: 'PostList'
|
||||
});
|
||||
|
||||
useDict('sys_normal_disable');
|
||||
const appStore = useAppStore();
|
||||
const { download } = useDownload();
|
||||
const { hasAuth } = useAuth();
|
||||
@ -170,7 +172,6 @@ async function handleExport() {
|
||||
const { loading: treeLoading, startLoading: startTreeLoading, endLoading: endTreeLoading } = useLoading();
|
||||
const deptPattern = ref<string>();
|
||||
const deptData = ref<Api.Common.CommonTreeRecord>([]);
|
||||
const selectedKeys = ref<string[]>([]);
|
||||
|
||||
async function getTreeData() {
|
||||
startTreeLoading();
|
||||
@ -184,7 +185,6 @@ async function getTreeData() {
|
||||
getTreeData();
|
||||
|
||||
function handleClickTree(keys: string[]) {
|
||||
selectedKeys.value = keys;
|
||||
searchParams.belongDeptId = keys.length ? keys[0] : null;
|
||||
checkedRowKeys.value = [];
|
||||
getDataByPage();
|
||||
@ -192,7 +192,6 @@ function handleClickTree(keys: string[]) {
|
||||
|
||||
function handleResetTreeData() {
|
||||
deptPattern.value = undefined;
|
||||
selectedKeys.value = [];
|
||||
searchParams.belongDeptId = null;
|
||||
getTreeData();
|
||||
getDataByPage();
|
||||
@ -212,7 +211,6 @@ function handleResetTreeData() {
|
||||
<NInput v-model:value="deptPattern" clearable :placeholder="$t('common.keywordSearch')" />
|
||||
<NSpin class="dept-tree" :show="treeLoading">
|
||||
<NTree
|
||||
v-model:selected-keys="selectedKeys"
|
||||
block-node
|
||||
show-line
|
||||
:data="deptData as []"
|
||||
|
@ -261,7 +261,7 @@ watch(visible, () => {
|
||||
class="w-full"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem label="用户数量" path="accountCount">
|
||||
<NFormItem path="accountCount">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip content="-1不限制用户数量" />
|
||||
@ -270,7 +270,7 @@ watch(visible, () => {
|
||||
</template>
|
||||
<NInputNumber v-model:value="model.accountCount" placeholder="请输入用户数量" min="-1" class="w-full" />
|
||||
</NFormItem>
|
||||
<NFormItem label="绑定域名" path="domain">
|
||||
<NFormItem path="domain">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip
|
||||
|
Reference in New Issue
Block a user