@qqt-product/system 0.0.2 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +53240 -10634
- package/dist/index.umd.js +94 -21
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +13 -11
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
- package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
- package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
- package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
- package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
- package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
- package/src/lib/components/index.ts +78 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
- package/src/lib/components/integratedNodesList/src/index.vue +130 -136
- package/src/lib/components/integratedReportList/src/index.vue +55 -30
- package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
- package/src/lib/components/loginLogList/src/index.vue +51 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
- package/src/lib/components/operateLogList/src/index.vue +46 -57
- package/src/vite-env.d.ts +13 -13
- package/tsconfig.json +24 -24
- package/vite.config.ts +1 -1
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
|
@@ -5,14 +5,25 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup lang="ts">
|
|
8
|
-
|
|
8
|
+
//JS
|
|
9
|
+
import { ref, reactive, inject } from 'vue'
|
|
10
|
+
import { useRefInstanceHook } from '@qqt-product/ui'
|
|
11
|
+
|
|
12
|
+
//ts
|
|
13
|
+
import * as customConfigEdits from '../../../utils/global.types'
|
|
9
14
|
import type { ComponentPublicInstance } from 'vue'
|
|
10
15
|
import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
|
|
16
|
+
|
|
11
17
|
// 传参 props
|
|
12
18
|
const props = defineProps<{
|
|
13
19
|
currentRow: GlobalPageLayoutTypes.CurrentRow | null
|
|
14
20
|
userInfo: GlobalPageLayoutTypes.UserInfo
|
|
15
21
|
}>()
|
|
22
|
+
//state
|
|
23
|
+
|
|
24
|
+
const qHttp = inject(customConfigEdits.INJECT_HTTP) as customConfigEdits.HttpClient
|
|
25
|
+
let optionall = ref([])
|
|
26
|
+
let groupOptions = ref([])
|
|
16
27
|
const currentRow = props.currentRow
|
|
17
28
|
? props.currentRow
|
|
18
29
|
: ref({
|
|
@@ -25,7 +36,7 @@ const currentRow = props.currentRow
|
|
|
25
36
|
})
|
|
26
37
|
// 编辑组件 ref
|
|
27
38
|
const layoutRef = ref<ComponentPublicInstance | null>(null)
|
|
28
|
-
|
|
39
|
+
const { pageData } = useRefInstanceHook(layoutRef)
|
|
29
40
|
// 配置
|
|
30
41
|
const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
31
42
|
/**
|
|
@@ -60,20 +71,12 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
60
71
|
{ groupCode: 'baseForm', fieldType: 'input', fieldLabel: 'ELS账号', fieldLabelI18nKey: 'i18n_title_ELSAccount', fieldName: 'elsAccount', placeholder: 'ELS账号', disabled: true },
|
|
61
72
|
{ groupCode: 'baseForm', fieldType: 'input', fieldLabel: '子账号', fieldLabelI18nKey: 'i18n_field_subAccount', fieldName: 'subAccount', required: '1' },
|
|
62
73
|
{ groupCode: 'baseForm', fieldType: 'input', fieldLabel: '姓名', fieldLabelI18nKey: 'i18n_title_name', fieldName: 'realname', required: '1' },
|
|
63
|
-
{
|
|
64
|
-
groupCode: 'baseForm',
|
|
65
|
-
fieldType: 'input',
|
|
66
|
-
fieldLabel: '密码',
|
|
67
|
-
fieldLabelI18nKey: 'i18n_title_password',
|
|
68
|
-
fieldName: 'password',
|
|
69
|
-
required: '1',
|
|
70
|
-
},
|
|
71
74
|
{
|
|
72
75
|
groupCode: 'baseForm',
|
|
73
76
|
fieldType: 'remoteSelect',
|
|
74
77
|
fieldLabel: '角色',
|
|
75
78
|
fieldLabelI18nKey: 'i18n_title_role',
|
|
76
|
-
fieldName: '
|
|
79
|
+
fieldName: 'selectedroles_dictText',
|
|
77
80
|
extend: {
|
|
78
81
|
modalColumns: [{ field: 'roleName', title: '角色', with: 150 }],
|
|
79
82
|
modalUrl: '/account/role/queryall',
|
|
@@ -86,7 +89,7 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
86
89
|
fieldType: 'remoteSelect',
|
|
87
90
|
fieldLabel: '数据权限组',
|
|
88
91
|
fieldLabelI18nKey: 'i18n_menu_WFbWV_c4394039',
|
|
89
|
-
fieldName: '
|
|
92
|
+
fieldName: 'selectedGroups_dictText',
|
|
90
93
|
extend: {
|
|
91
94
|
modalColumns: [{ field: 'groupName', title: '数据权限组', with: 150 }],
|
|
92
95
|
modalUrl: '/account/permissionGroup/queryAll',
|
|
@@ -134,13 +137,13 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
134
137
|
field: 'subAccount',
|
|
135
138
|
fieldLabelI18nKey: 'i18n_field_subAccount',
|
|
136
139
|
title: '子账号',
|
|
137
|
-
|
|
140
|
+
width: 150,
|
|
138
141
|
},
|
|
139
142
|
{
|
|
140
143
|
field: 'realname',
|
|
141
144
|
fieldLabelI18nKey: 'i18n_title_name',
|
|
142
145
|
title: '姓名',
|
|
143
|
-
|
|
146
|
+
width: 150,
|
|
144
147
|
},
|
|
145
148
|
],
|
|
146
149
|
modalUrl: '/account/elsSubAccount/list',
|
|
@@ -188,4 +191,69 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
188
191
|
],
|
|
189
192
|
},
|
|
190
193
|
})
|
|
194
|
+
|
|
195
|
+
function onMouteds() {
|
|
196
|
+
getOptions()
|
|
197
|
+
getGroupOptions()
|
|
198
|
+
setTimeout(() => {
|
|
199
|
+
let selectedroles = pageData.value.selectedroles as string
|
|
200
|
+
let selectId = selectedroles.split(',')
|
|
201
|
+
let selectRoleName = selectId.map((val) => {
|
|
202
|
+
let optionallSingle: any = optionall.value.find((vals: customConfigEdits.MapObjectNoneType) => {
|
|
203
|
+
return vals.id == val
|
|
204
|
+
})
|
|
205
|
+
return optionallSingle.title
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
console.log('optionall', selectRoleName)
|
|
209
|
+
pageData.value.selectedroles_dictText = selectRoleName.join(',')
|
|
210
|
+
let selectedGroups = pageData.value.selectedGroups as string
|
|
211
|
+
let selectGroupId = selectedGroups ? selectedGroups.split(',') : []
|
|
212
|
+
let selectGroupName = selectGroupId.map((val) => {
|
|
213
|
+
let groupOptionsSigle = {} as any | undefined
|
|
214
|
+
groupOptionsSigle = groupOptions.value.find((vals: customConfigEdits.MapObjectNoneType) => {
|
|
215
|
+
return vals.id == val
|
|
216
|
+
})
|
|
217
|
+
return groupOptionsSigle && groupOptionsSigle.title ? groupOptionsSigle.title : ''
|
|
218
|
+
})
|
|
219
|
+
console.log('selectGroupName', groupOptions.value)
|
|
220
|
+
pageData.value.selectedGroups_dictText = selectGroupName.join(',')
|
|
221
|
+
}, 2000)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
onMouteds()
|
|
225
|
+
|
|
226
|
+
function getOptions() {
|
|
227
|
+
return qHttp
|
|
228
|
+
.get({
|
|
229
|
+
url: '/account/role/queryall',
|
|
230
|
+
})
|
|
231
|
+
.then((res) => {
|
|
232
|
+
let result = res.result || []
|
|
233
|
+
optionall.value = result.map((item) => {
|
|
234
|
+
return {
|
|
235
|
+
...item,
|
|
236
|
+
title: item.roleName,
|
|
237
|
+
value: item.id,
|
|
238
|
+
}
|
|
239
|
+
})
|
|
240
|
+
})
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function getGroupOptions() {
|
|
244
|
+
qHttp
|
|
245
|
+
.get({
|
|
246
|
+
url: '/account/permissionGroup/queryAll',
|
|
247
|
+
})
|
|
248
|
+
.then((res) => {
|
|
249
|
+
let result = res.result || []
|
|
250
|
+
groupOptions.value = result.map((item) => {
|
|
251
|
+
return {
|
|
252
|
+
...item,
|
|
253
|
+
title: item.groupName,
|
|
254
|
+
value: item.id,
|
|
255
|
+
}
|
|
256
|
+
})
|
|
257
|
+
})
|
|
258
|
+
}
|
|
191
259
|
</script>
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="edit-page">
|
|
3
3
|
<a-spin :spinning="customLoading">
|
|
4
|
-
<q-edit-page-layout ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess"
|
|
4
|
+
<q-edit-page-layout v-if="showEdit" ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess"></q-edit-page-layout>
|
|
5
5
|
</a-spin>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
|
-
import { ref, reactive } from 'vue'
|
|
10
|
+
import { ref, reactive, onMounted, inject, shallowRef, nextTick } from 'vue'
|
|
11
11
|
import type { ComponentPublicInstance } from 'vue'
|
|
12
12
|
import { BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW, BUTTON_SAVE } from '@qqt-product/ui'
|
|
13
13
|
// ui组件库 types
|
|
14
14
|
import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
|
|
15
15
|
import { usePromiseStepHook, useRefInstanceHook } from '@qqt-product/ui'
|
|
16
|
+
import * as customConfigEdits from '../../../utils/global.types'
|
|
16
17
|
|
|
17
18
|
// 传参 props
|
|
18
19
|
const props = defineProps<{
|
|
19
20
|
currentRow: GlobalPageLayoutTypes.CurrentRow | null
|
|
20
21
|
userInfo: GlobalPageLayoutTypes.UserInfo
|
|
21
22
|
}>()
|
|
23
|
+
|
|
24
|
+
const qHttp = inject(customConfigEdits.INJECT_HTTP) as customConfigEdits.HttpClient
|
|
25
|
+
const showEdit = shallowRef(false)
|
|
22
26
|
const currentRow = props.currentRow
|
|
23
27
|
? props.currentRow
|
|
24
28
|
: ref({
|
|
@@ -33,6 +37,10 @@ const currentRow = props.currentRow
|
|
|
33
37
|
const layoutRef = ref<ComponentPublicInstance | null>(null)
|
|
34
38
|
|
|
35
39
|
// 配置
|
|
40
|
+
|
|
41
|
+
const roleOptains = ref([])
|
|
42
|
+
const groupOptains = ref([])
|
|
43
|
+
|
|
36
44
|
const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
37
45
|
/**
|
|
38
46
|
* 模块业务类型 string
|
|
@@ -78,36 +86,20 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
78
86
|
{ groupCode: 'baseForm', fieldType: 'input', fieldLabel: '姓名', fieldLabelI18nKey: 'i18n_title_name', fieldName: 'realname', required: '1' },
|
|
79
87
|
{
|
|
80
88
|
groupCode: 'baseForm',
|
|
81
|
-
fieldType: '
|
|
82
|
-
fieldLabel: '密码',
|
|
83
|
-
fieldLabelI18nKey: 'i18n_title_password',
|
|
84
|
-
fieldName: 'password',
|
|
85
|
-
required: '1',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
groupCode: 'baseForm',
|
|
89
|
-
fieldType: 'remoteSelect',
|
|
89
|
+
fieldType: 'multiple',
|
|
90
90
|
fieldLabel: '角色',
|
|
91
91
|
fieldLabelI18nKey: 'i18n_title_role',
|
|
92
92
|
fieldName: 'selectedroles',
|
|
93
|
-
extend: {
|
|
94
|
-
modalColumns: [{ field: 'roleName', title: '角色', with: 150 }],
|
|
95
|
-
modalUrl: '/account/role/queryall',
|
|
96
|
-
selectModel: 'single',
|
|
97
|
-
},
|
|
98
93
|
required: '1',
|
|
94
|
+
options: roleOptains,
|
|
99
95
|
},
|
|
100
96
|
{
|
|
101
97
|
groupCode: 'baseForm',
|
|
102
|
-
fieldType: '
|
|
98
|
+
fieldType: 'multiple',
|
|
103
99
|
fieldLabel: '数据权限组',
|
|
104
100
|
fieldLabelI18nKey: 'i18n_menu_WFbWV_c4394039',
|
|
105
101
|
fieldName: 'selectedGroups',
|
|
106
|
-
|
|
107
|
-
modalColumns: [{ field: 'groupName', title: '数据权限组', with: 150 }],
|
|
108
|
-
modalUrl: '/account/permissionGroup/queryAll',
|
|
109
|
-
selectModel: 'single',
|
|
110
|
-
},
|
|
102
|
+
options: groupOptains,
|
|
111
103
|
},
|
|
112
104
|
{
|
|
113
105
|
groupCode: 'baseForm',
|
|
@@ -131,11 +123,17 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
131
123
|
{ groupCode: 'baseForm', fieldType: 'input', fieldLabel: '座机号', fieldLabelI18nKey: 'i18n_title_landlineNumber', fieldName: 'telephone' },
|
|
132
124
|
{
|
|
133
125
|
groupCode: 'baseForm',
|
|
134
|
-
fieldType: '
|
|
126
|
+
fieldType: 'treeSelect',
|
|
135
127
|
fieldLabel: '部门',
|
|
136
128
|
fieldLabelI18nKey: 'i18n_title_department',
|
|
137
129
|
dictCode: '/org/purchaseOrganizationInfo/getOrgTree',
|
|
138
130
|
fieldName: 'orgCode',
|
|
131
|
+
placeholder: '请选择部门',
|
|
132
|
+
extend: {
|
|
133
|
+
params: { parentId: '0' },
|
|
134
|
+
fieldNames: { children: 'children', label: 'title', value: 'value' },
|
|
135
|
+
multiple: true,
|
|
136
|
+
},
|
|
139
137
|
},
|
|
140
138
|
{ groupCode: 'baseForm', fieldType: 'date', fieldLabel: '账号过期时间', fieldLabelI18nKey: 'i18n_title_accountExpirationTime', fieldName: 'accountValidityDate' },
|
|
141
139
|
{
|
|
@@ -150,17 +148,21 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
150
148
|
field: 'subAccount',
|
|
151
149
|
fieldLabelI18nKey: 'i18n_field_subAccount',
|
|
152
150
|
title: '子账号',
|
|
153
|
-
|
|
151
|
+
width: 150,
|
|
154
152
|
},
|
|
155
153
|
{
|
|
156
154
|
field: 'realname',
|
|
157
155
|
fieldLabelI18nKey: 'i18n_title_name',
|
|
158
156
|
title: '姓名',
|
|
159
|
-
|
|
157
|
+
width: 150,
|
|
160
158
|
},
|
|
161
159
|
],
|
|
162
160
|
modalUrl: '/account/elsSubAccount/list',
|
|
163
161
|
},
|
|
162
|
+
callback(ctx, { data, pageData }) {
|
|
163
|
+
if (!data?.length) return
|
|
164
|
+
pageData.superiorLeader = data[0].subAccount + '_' + data[0].realname
|
|
165
|
+
},
|
|
164
166
|
},
|
|
165
167
|
],
|
|
166
168
|
itemColumns: [
|
|
@@ -216,11 +218,9 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
216
218
|
},
|
|
217
219
|
],
|
|
218
220
|
})
|
|
219
|
-
const pageButtons = options.pageButtons as GlobalPageLayoutTypes.PageButton[]
|
|
220
|
-
const refreshMethods = options.refreshMethods
|
|
221
221
|
|
|
222
222
|
const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
|
|
223
|
-
const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues,
|
|
223
|
+
const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, options })
|
|
224
224
|
// 自定义保存
|
|
225
225
|
const handleCustomSave = () => {
|
|
226
226
|
stepTriggerValidate()
|
|
@@ -231,11 +231,43 @@ const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
|
|
|
231
231
|
composeSave()
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
+
|
|
234
235
|
// 页面刷新
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
|
|
237
|
+
function getRoleOptains() {
|
|
238
|
+
return qHttp
|
|
239
|
+
.get({
|
|
240
|
+
url: '/account/role/queryall',
|
|
241
|
+
})
|
|
242
|
+
.then((res) => {
|
|
243
|
+
let result = res.result || []
|
|
244
|
+
roleOptains.value = result.map((item) => ({
|
|
245
|
+
label: item.roleName,
|
|
246
|
+
value: item.id,
|
|
247
|
+
}))
|
|
248
|
+
})
|
|
240
249
|
}
|
|
250
|
+
function getGroupOptains() {
|
|
251
|
+
return qHttp
|
|
252
|
+
.get({
|
|
253
|
+
url: '/account/permissionGroup/queryAll',
|
|
254
|
+
})
|
|
255
|
+
.then((res) => {
|
|
256
|
+
let result = res.result || []
|
|
257
|
+
groupOptains.value = result.map((item) => ({
|
|
258
|
+
...item,
|
|
259
|
+
label: item.groupName,
|
|
260
|
+
value: item.id,
|
|
261
|
+
}))
|
|
262
|
+
})
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
//生命周期
|
|
266
|
+
onMounted(async () => {
|
|
267
|
+
await getRoleOptains()
|
|
268
|
+
await getGroupOptains()
|
|
269
|
+
await nextTick(() => {
|
|
270
|
+
showEdit.value = true
|
|
271
|
+
})
|
|
272
|
+
})
|
|
241
273
|
</script>
|