diff --git a/package.json b/package.json
index a7fe2b9cc4822466339603af56bdb5f9fe534e2a..60c05f06b7dfd113d26d054918247f22cfb79580 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ruoyi-plus-vben",
- "version": "1.1.3",
+ "version": "1.1.4",
"homepage": "https://gitee.com/dapppp/ruoyi-plus-vben.git",
"bugs": {
"url": "https://gitee.com/dapppp/ruoyi-plus-vben/issues"
diff --git a/src/views/system/client/index.vue b/src/views/system/client/index.vue
index 1f630c59a5e895295ad576cb5be524e6933f1b27..e0b349967661ba6bb1832298f0bba0ffcac86ea9 100644
--- a/src/views/system/client/index.vue
+++ b/src/views/system/client/index.vue
@@ -37,6 +37,18 @@
+
+
+
import { PageWrapper } from '@/components/Page';
- import { BasicTable, useTable, TableAction } from '@/components/Table';
+ import { BasicTable, useTable, TableAction, TableSwitch } from '@/components/Table';
import { Space } from 'ant-design-vue';
- import { clientList, clientExport, clientRemove } from '@/api/system/client';
+ import { clientList, clientExport, clientRemove, clientChangeStatus } from '@/api/system/client';
import { downloadExcel } from '@/utils/file/download';
import { useModal } from '@/components/Modal';
import ClientModal from './ClientModal.vue';
diff --git a/src/views/system/dept/DeptModal.vue b/src/views/system/dept/DeptModal.vue
index f023e5a65df47bdddad888dd9c3addb28207146e..b26a5e065a34d9414c9ea2ee4a91842ae41b4122 100644
--- a/src/views/system/dept/DeptModal.vue
+++ b/src/views/system/dept/DeptModal.vue
@@ -30,25 +30,24 @@
});
const [registerInnerModal, { modalLoading, closeModal }] = useModalInner(
- async (data: { deptId: string | number; update: boolean }) => {
+ async (data: { deptId?: string | number; update: boolean }) => {
modalLoading(true);
const { deptId, update } = data;
isUpdate.value = update;
- // deptId必填
- if (update) {
- const ret = await deptInfo(deptId);
- await setFieldsValue(ret);
- } else {
- // 新增
+ if (deptId) {
await setFieldsValue({ parentId: deptId });
+ if (unref(isUpdate)) {
+ const ret = await deptInfo(deptId);
+ await setFieldsValue(ret);
+ }
}
-
- // 部门负责人下拉框
- await initDeptUsers(deptId);
-
- // 部门选择框
+ if (deptId && update) {
+ await initDeptUsers(deptId);
+ } else {
+ await setLeaderOptions();
+ }
+ /** 部门选择 下拉框 */
await initDeptSelect(deptId);
-
modalLoading(false);
},
);
@@ -56,38 +55,21 @@
async function initDeptSelect(deptId?: string | number) {
// 需要动态更新TreeSelect组件 这里允许为空
const treeData = await getDeptTree(deptId, !unref(isUpdate));
- // onChange 切换时刷新部门用户列表
await updateSchema({
field: 'parentId',
- componentProps({ formModel }) {
- return {
- /**
- * 这里不能用onChnage 因为每次打开都会触发
- * 和useModalInner回调函数会总共调用两次initDeptUsers
- * 使用onSelect只会在选择后触发
- * @param value
- */
- async onSelect(deptId: number) {
- if (typeof deptId !== 'number') {
- return;
- }
- await initDeptUsers(deptId);
- // 清空已经选择的部门管理员
- formModel.leader = void 0;
- },
- treeData,
- treeLine: { showLeafIcon: false },
- fieldNames: { label: 'deptName', value: 'deptId' },
- treeDefaultExpandAll: true,
- // 选中后显示在输入框的值
- treeNodeLabelProp: 'fullName',
- };
+ componentProps: {
+ treeData,
+ treeLine: { showLeafIcon: false },
+ fieldNames: { label: 'deptName', value: 'deptId' },
+ treeDefaultExpandAll: true,
+ // 选中后显示在输入框的值
+ treeNodeLabelProp: 'fullName',
},
});
}
/**
- * 部门管理员下拉框
+ * 部门管理员下拉框 更新时才会enable
* @param deptId
*/
async function initDeptUsers(deptId: string | number) {
@@ -96,13 +78,23 @@
label: `${user.userName} | ${user.nickName}`,
value: user.userId,
}));
-
await updateSchema({
field: 'leader',
componentProps: {
options,
disabled: ret.length === 0,
- placeholder: ret.length === 0 ? '该部门暂无用户' : '请选择部门管理员',
+ placeholder: ret.length === 0 ? '该部门暂无用户' : '请选择部门负责人',
+ },
+ });
+ }
+
+ async function setLeaderOptions() {
+ await updateSchema({
+ field: 'leader',
+ componentProps: {
+ options: [],
+ disabled: true,
+ placeholder: '仅在更新时可选部门负责人',
},
});
}
diff --git a/src/views/system/dept/dept.data.ts b/src/views/system/dept/dept.data.ts
index ca01b75a43ea16ccb42450332db9ace97a35e819..0ad3cf9a9e840dbe097a7b17e4fded92b9396d18 100644
--- a/src/views/system/dept/dept.data.ts
+++ b/src/views/system/dept/dept.data.ts
@@ -79,6 +79,10 @@ export const modalSchemas: FormSchema[] = [
field: 'leader',
label: '负责人',
component: 'Select',
+ componentProps: {
+ // 选中了就只能修改 不能重置为无负责人
+ allowClear: false,
+ },
},
{
field: 'phone',
diff --git a/src/views/system/menu/menu.data.ts b/src/views/system/menu/menu.data.ts
index 9ba01c400d21806181d25ba4d7b4efaa2fc123f3..9db7bf996d482ed0e2686b3011edea4fbb9934f3 100644
--- a/src/views/system/menu/menu.data.ts
+++ b/src/views/system/menu/menu.data.ts
@@ -7,9 +7,9 @@ import { isUrl } from '@/utils/is';
// (M目录 C菜单 F按钮)
const menuTypes = {
- M: { value: '目录', icon: 'ic:outline-folder' },
- C: { value: '菜单', icon: 'gg:menu-round' },
- F: { value: '按钮', icon: 'mdi:button-cursor' },
+ M: { value: '目录', icon: 'fxemoji:folder' },
+ C: { value: '菜单', icon: 'fluent-emoji-flat:open-book' },
+ F: { value: '按钮', icon: 'fluent-emoji:ok-button' },
};
const { renderDict, renderIcon, renderIconSpan } = useRender();
@@ -40,7 +40,7 @@ export const tableColumns: BasicColumn[] = [
width: 150,
customRender({ value }) {
const current = menuTypes[value];
- return renderIconSpan(current.icon, current.value, true);
+ return renderIconSpan(current.icon, current.value, true, '5px');
},
},
{
diff --git a/src/views/system/oss/OssConfig.vue b/src/views/system/oss/OssConfig.vue
index 98beda3d0b1431093648e0ddab0062012f93785e..32897a2d2e3748f878df6fde2e901030bd92cff8 100644
--- a/src/views/system/oss/OssConfig.vue
+++ b/src/views/system/oss/OssConfig.vue
@@ -7,7 +7,7 @@
type="primary"
:pre-icon="IconEnum.ADD"
@click="handleAdd"
- v-auth="'system:oss:add'"
+ v-auth="'system:ossConfig:add'"
>新增配置
选中删除
@@ -25,6 +25,7 @@
-
-
+
+
选中删除
-
- 预览图片:
+
+ 预览图片
- OSS配置管理
diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts
index ba995e98afbbed4d76fa18f738cd3c5265cf384c..a468ad78d7e3140fdb9afe3c2ae5e4358a613640 100644
--- a/src/views/system/tenant/tenant.data.ts
+++ b/src/views/system/tenant/tenant.data.ts
@@ -154,7 +154,6 @@ export const modalSchemas: FormSchema[] = [
min: -1,
},
renderComponentContent({ model }) {
- console.log(model.accountCount);
return {
addonBefore: () => (model.accountCount == -1 ? '不限制数量' : '输入数量'),
};
diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue
index 4da6cbf78b604fac5c71cc6617e5a5992dcc3cb2..fb388cf27a8fe485f69eb108dd6601132d106a70 100644
--- a/src/views/system/tenantPackage/index.vue
+++ b/src/views/system/tenantPackage/index.vue
@@ -35,6 +35,17 @@
>
+
+
+
import { PageWrapper } from '@/components/Page';
- import { packageList, packageRemove, packageExport } from '@/api/system/tenantPackage';
- import { BasicTable, useTable, TableAction } from '@/components/Table';
+ import {
+ packageList,
+ packageRemove,
+ packageExport,
+ packageChangeStatus,
+ } from '@/api/system/tenantPackage';
+ import { BasicTable, useTable, TableAction, TableSwitch } from '@/components/Table';
import { columns, formSchemas } from './tenantPackage.data';
import { IconEnum } from '@/enums/appEnum';
import { Space } from 'ant-design-vue';
diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts
index 742e22d60248d22cfd34950b2afdbcebfb786dbc..0356fea7084d84b67ad5e9a57f56d8fa7dd68dfe 100644
--- a/src/views/system/tenantPackage/tenantPackage.data.ts
+++ b/src/views/system/tenantPackage/tenantPackage.data.ts
@@ -1,9 +1,6 @@
import { BasicColumn } from '@/components/Table';
-import { useRender } from '@/hooks/component/useRender';
import { FormSchema } from '@/components/Form';
-import { packageChangeStatus } from '@/api/system/tenantPackage';
-const { renderSwitch } = useRender();
export const columns: BasicColumn[] = [
{
title: '套餐名称',
@@ -16,11 +13,11 @@ export const columns: BasicColumn[] = [
{
title: '租户状态',
dataIndex: 'status',
- customRender({ record }) {
- return renderSwitch(record, packageChangeStatus, (newStatusStr) => {
- return `确认${newStatusStr}租户套餐[${record.packageName}]吗?`;
- });
- },
+ // customRender({ record }) {
+ // return renderSwitch(record, packageChangeStatus, (newStatusStr) => {
+ // return `确认${newStatusStr}租户套餐[${record.packageName}]吗?`;
+ // });
+ // },
},
];
diff --git a/src/views/system/user/UserInfoModal.vue b/src/views/system/user/UserInfoModal.vue
index 9b3b3efba6d645cbad6f76007585afe1e0d93610..35eefb55fdd8af38653d652955353b2c423775ed 100644
--- a/src/views/system/user/UserInfoModal.vue
+++ b/src/views/system/user/UserInfoModal.vue
@@ -1,6 +1,7 @@
-
+
+
关闭
@@ -12,35 +13,36 @@
import { userInfo } from '@/api/system/user';
import { Description, useDescription } from '@/components/Description';
import { descSchema } from './user.info';
+ import { Skeleton } from 'ant-design-vue';
+ import { ref } from 'vue';
defineOptions({ name: 'UserInfoModal' });
- const [registerInnerModal, { modalLoading, closeModal }] = useModalInner(
- async (userId: string | number) => {
- modalLoading(true);
- if (!userId) {
- return closeModal();
- }
- const response = await userInfo(userId);
- // 外部的roleIds postIds才是真正对应的 新增时为空
- const { postIds = [], roleIds = [], user, roles, posts } = response;
-
- const postNames = posts
- .filter((item) => postIds.includes(item.postId))
- .map((item) => item.postName);
-
- const roleNames = roles
- .filter((item) => roleIds.includes(item.roleId))
- .map((item) => item.roleName);
-
- (user as any).postNames = postNames;
- (user as any).roleNames = roleNames;
-
- // 赋值
- setDescProps({ data: user });
- modalLoading(false);
- },
- );
+ const showSkeleton = ref(true);
+ const [registerInnerModal, { closeModal }] = useModalInner(async (userId: string | number) => {
+ showSkeleton.value = true;
+ if (!userId) {
+ return closeModal();
+ }
+ const response = await userInfo(userId);
+ // 外部的roleIds postIds才是真正对应的 新增时为空
+ const { postIds = [], roleIds = [], user, roles, posts } = response;
+
+ const postNames = posts
+ .filter((item) => postIds.includes(item.postId))
+ .map((item) => item.postName);
+
+ const roleNames = roles
+ .filter((item) => roleIds.includes(item.roleId))
+ .map((item) => item.roleName);
+
+ (user as any).postNames = postNames;
+ (user as any).roleNames = roleNames;
+
+ // 赋值
+ setDescProps({ data: user });
+ showSkeleton.value = false;
+ });
const [registerDescription, { setDescProps }] = useDescription({
column: 1,
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 8f9103500f9081b5d14d1d6685c5352a80c45547..591f4a2858888aff111f8ed6a9a08ac459ce1eca 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -2,22 +2,24 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -70,6 +72,7 @@
import { PageWrapper } from '@/components/Page';
- import { Row, Col, Space, Empty } from 'ant-design-vue';
+ import { Row, Col, Space, Empty, Skeleton } from 'ant-design-vue';
import { BasicTree } from '@/components/Tree/index';
import {
departmentTree,
@@ -169,16 +172,17 @@
// 缓存
defineOptions({ name: 'User' });
- type Data = {
+ interface TreeProps {
tree: DeptTreeData[];
selectDeptId: string[];
- };
+ }
/** 左边搜索框 */
const deptSearchText = ref('');
- const data: Data = reactive({
+ const data: TreeProps = reactive({
tree: [],
selectDeptId: [],
});
+ const showTreeSkeleton = ref(true);
// 选中部门后刷新表格
async function handleSelectDept() {
@@ -187,6 +191,7 @@
onMounted(async () => {
data.tree = await departmentTree();
+ showTreeSkeleton.value = false;
});
const [registerTable, { reload, selected, reloadWithCallback, multipleRemove }] = useTable({
@@ -279,10 +284,6 @@