Browse Source

🎟 用户模块测试完毕

master
wangxiang 3 years ago
parent
commit
5db70e0719
  1. 2
      kicc-ui/src/views/system/user/DeptTree.vue
  2. 6
      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 @@
search search
:clickRowToExpand="false" :clickRowToExpand="false"
:treeData="treeData" :treeData="treeData"
:replaceFields="{ key: 'id', title: 'name' }" :replaceFields="{ key: 'deptId', title: 'name' }"
@select="handleSelect" @select="handleSelect"
/> />
</div> </div>

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

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

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

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

Loading…
Cancel
Save