Showing
5 changed files
with
13 additions
and
9 deletions
... | ... | @@ -40,11 +40,12 @@ export const sysDictPage = (params: SysDictParams) => |
40 | 40 | * 获取SysDictItem列表 |
41 | 41 | * @param params 查询参数 |
42 | 42 | */ |
43 | -export const sysDictItemPage = (params: SysDictItemParams) => | |
44 | - defHttp.get<SysDictItemResultModel>({ | |
43 | +export const sysDictItemPage = (params: SysDictItemParams) => { | |
44 | + return defHttp.get<SysDictItemResultModel>({ | |
45 | 45 | url: SysDictApi.CONFIG_ITEM_URL, |
46 | 46 | params, |
47 | 47 | }); |
48 | +}; | |
48 | 49 | |
49 | 50 | /** |
50 | 51 | * 保存或更新字典值表 | ... | ... |
... | ... | @@ -5,20 +5,19 @@ |
5 | 5 | </template> |
6 | 6 | |
7 | 7 | <script> |
8 | - import { defineComponent, ref } from 'vue'; | |
8 | + import { defineComponent } from 'vue'; | |
9 | 9 | import { useRoute } from 'vue-router'; |
10 | 10 | import { PageWrapper } from '/@/components/Page'; |
11 | 11 | import { useGo } from '/@/hooks/web/usePage'; |
12 | 12 | import { Description } from '../../../components/Description'; |
13 | 13 | import { useTabs } from '/@/hooks/web/useTabs'; |
14 | - import { Tabs } from 'ant-design-vue'; | |
15 | 14 | import { getAccountInfo } from '../../../api/system/system'; |
16 | 15 | import { accountSchema } from './account.detail.data'; |
17 | 16 | import { useDescription } from '../../../components/Description'; |
18 | 17 | const accountData = {}; |
19 | 18 | export default defineComponent({ |
20 | 19 | name: 'AccountDetail', |
21 | - components: { PageWrapper, ATabs: Tabs, ATabPane: Tabs.TabPane, Description }, | |
20 | + components: { PageWrapper, Description }, | |
22 | 21 | setup() { |
23 | 22 | const route = useRoute(); |
24 | 23 | const go = useGo(); |
... | ... | @@ -44,7 +43,6 @@ |
44 | 43 | Reflect.set(accountData, 'createTime', result.createTime); |
45 | 44 | Reflect.set(accountData, 'updateTime', result.updateTime); |
46 | 45 | Reflect.set(accountData, 'deptId', result.deptId); |
47 | - console.log(accountData, 'accountData'); | |
48 | 46 | // 设置Tab的标题(不会影响页面标题) |
49 | 47 | setTitle('详情:用户' + result.realName); |
50 | 48 | methods.setDescProps(accountData); | ... | ... |
... | ... | @@ -58,6 +58,7 @@ |
58 | 58 | setModalProps({ confirmLoading: false }); |
59 | 59 | isUpdate.value = !!data?.isUpdate; |
60 | 60 | const groupListModel = await findCurrentUserGroups(); |
61 | + | |
61 | 62 | if (unref(organizationTreeData).length === 0) { |
62 | 63 | let treeValues = new Array<TreeItem>(); |
63 | 64 | groupListModel.map((item) => { |
... | ... | @@ -74,8 +75,10 @@ |
74 | 75 | |
75 | 76 | if (unref(isUpdate)) { |
76 | 77 | rowId.value = data.record.id; |
78 | + | |
77 | 79 | const roleParams = new RoleOrOrganizationParam(rowId.value, true, false); |
78 | 80 | findCurrentUserRelation(roleParams).then((result) => { |
81 | + console.log(result); | |
79 | 82 | Reflect.set(data.record, 'roleIds', result); |
80 | 83 | Reflect.set(data.record, 'password', '******'); |
81 | 84 | setFieldsValue({ |
... | ... | @@ -92,7 +95,7 @@ |
92 | 95 | dynamicDisabled: unref(isUpdate), |
93 | 96 | }, |
94 | 97 | { |
95 | - field: 'deptId', | |
98 | + field: 'organizationIds', | |
96 | 99 | componentProps: { |
97 | 100 | treeData: deptData, |
98 | 101 | }, |
... | ... | @@ -106,6 +109,7 @@ |
106 | 109 | try { |
107 | 110 | const { createMessage } = useMessage(); |
108 | 111 | const values = await validate(); |
112 | + console.log(values); | |
109 | 113 | values.accountExpireTime = |
110 | 114 | typeof values.accountExpireTime != 'undefined' && values.accountExpireTime != null |
111 | 115 | ? values.accountExpireTime.format('YYYY-MM-DD HH:mm:ss') | ... | ... |
... | ... | @@ -33,6 +33,7 @@ |
33 | 33 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { |
34 | 34 | await resetFields(); |
35 | 35 | setDrawerProps({ confirmLoading: false }); |
36 | + console.log(data); | |
36 | 37 | isUpdate.value = !!data?.isUpdate; |
37 | 38 | if (unref(isUpdate)) { |
38 | 39 | id = data.record.id; | ... | ... |
... | ... | @@ -41,18 +41,18 @@ |
41 | 41 | import ItemDrawer from '/@/views/system/dict/item/ItemDrawer.vue'; |
42 | 42 | |
43 | 43 | import { columns, searchFormSchema } from './dict.item.data'; |
44 | - import { Tag } from 'ant-design-vue'; | |
45 | 44 | import { useMessage } from '/@/hooks/web/useMessage'; |
46 | 45 | |
47 | 46 | export default defineComponent({ |
48 | 47 | name: 'ItemIndex', |
49 | - components: { BasicDrawer, BasicTable, ItemDrawer, TableAction, Tag }, | |
48 | + components: { BasicDrawer, BasicTable, ItemDrawer, TableAction }, | |
50 | 49 | setup() { |
51 | 50 | let dictId; |
52 | 51 | const { createMessage } = useMessage(); |
53 | 52 | const [registerDrawer, { openDrawer }] = useDrawer(); |
54 | 53 | const [register] = useDrawerInner((data) => { |
55 | 54 | dictId = data.id; |
55 | + reload(); | |
56 | 56 | }); |
57 | 57 | const [registerTable, { reload }] = useTable({ |
58 | 58 | title: '字典值列表', | ... | ... |