Browse Source

🎟 用户模块测试完毕

master
wangxiang 3 years ago
parent
commit
5db70e0719
  1. 2
      kicc-ui/src/views/system/user/DeptTree.vue
  2. 4
      kicc-ui/src/views/system/user/UserModal.vue
  3. 2
      kicc-ui/src/views/system/user/index.vue

2
kicc-ui/src/views/system/user/DeptTree.vue

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
search
:clickRowToExpand="false"
:treeData="treeData"
:replaceFields="{ key: 'id', title: 'name' }"
:replaceFields="{ key: 'deptId', title: 'name' }"
@select="handleSelect"
/>
</div>

4
kicc-ui/src/views/system/user/UserModal.vue

@ -22,6 +22,9 @@ @@ -22,6 +22,9 @@
import { ModalProps } from "/@/components/Modal";
import { findListNameById } from '/@/utils';
import { TreeItem } from "/@/components/Tree";
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
export default defineComponent({
name: 'UserModal',
@ -80,6 +83,7 @@ @@ -80,6 +83,7 @@
const formData = await validate();
setModalProps({ confirmLoading: true });
formData.deptName = findListNameById(formData.deptId, toRaw(state.deptTree), { idField: 'deptId' });
if (!formData.deptName) return createMessage.error('部门名称数据为空,请重试!');
switch (state.tag) {
case 'add':
await addUser(formData);

2
kicc-ui/src/views/system/user/index.vue

@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
<TableAction :actions="[
{
label: '重置密码',
icon: 'brandico:codepen',
icon: 'fa6-brands:battle-net',
auth: ['user_reset'],
onClick: handleResetPassword.bind(null, record),
},

Loading…
Cancel
Save