@qqt-product/system 0.0.16 → 0.0.18

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.
Files changed (148) hide show
  1. package/dist/index.es.js +9601 -9171
  2. package/dist/index.umd.js +34 -35
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +16 -12
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +14 -10
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +17 -12
  6. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +13 -9
  7. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +13 -9
  8. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +16 -12
  9. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +9 -0
  10. package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +387 -3
  11. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +16 -12
  12. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +13 -9
  13. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +18 -14
  14. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +1 -1
  15. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +2 -1
  16. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +21 -1
  17. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
  18. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +19 -2
  19. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
  20. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +0 -1
  21. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +13 -9
  22. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +16 -12
  23. package/dist/style.css +1 -1
  24. package/package.json +20 -9
  25. package/.eslintignore +0 -4
  26. package/.eslintrc.cjs +0 -22
  27. package/.prettierignore +0 -4
  28. package/.prettierrc.cjs +0 -41
  29. package/.vscode/extensions.json +0 -3
  30. package/dist/vite.svg +0 -1
  31. package/index.html +0 -13
  32. package/public/vite.svg +0 -1
  33. package/src/App.vue +0 -8
  34. package/src/lib/components/QAccountList/index.ts +0 -6
  35. package/src/lib/components/QAccountList/src/QAccountCreate.vue +0 -272
  36. package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -259
  37. package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -273
  38. package/src/lib/components/QAccountList/src/QAccountList.vue +0 -532
  39. package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
  40. package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
  41. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -143
  42. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
  43. package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
  44. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -172
  45. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
  46. package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
  47. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
  48. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -123
  49. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
  50. package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
  51. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
  52. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -244
  53. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -151
  54. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
  55. package/src/lib/components/QI18nList/index.ts +0 -6
  56. package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
  57. package/src/lib/components/QI18nList/src/QI18nList.vue +0 -365
  58. package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
  59. package/src/lib/components/QImChatGroupList/index.ts +0 -6
  60. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -103
  61. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
  62. package/src/lib/components/QMqRecordList/index.ts +0 -6
  63. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -109
  64. package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
  65. package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
  66. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
  67. package/src/lib/components/QPermissionDataList/index.ts +0 -6
  68. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
  69. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -218
  70. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -110
  71. package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
  72. package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
  73. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
  74. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -332
  75. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -189
  76. package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +0 -84
  77. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
  78. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
  79. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -134
  80. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +0 -91
  81. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
  82. package/src/lib/components/QQuartzJobList/index.ts +0 -6
  83. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -276
  84. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
  85. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
  86. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
  87. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
  88. package/src/lib/components/QRoleList/index.ts +0 -6
  89. package/src/lib/components/QRoleList/src/QRoleList.vue +0 -332
  90. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
  91. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
  92. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
  93. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
  94. package/src/lib/components/QRoleList/src/useConfigData.ts +0 -28
  95. package/src/lib/components/QSupplierAccountList/index.ts +0 -6
  96. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
  97. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -304
  98. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
  99. package/src/lib/components/QUsageList/index.ts +0 -6
  100. package/src/lib/components/QUsageList/src/QUsageList.vue +0 -287
  101. package/src/lib/components/QUsageList/src/useConfigData.ts +0 -154
  102. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
  103. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
  104. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
  105. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
  106. package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
  107. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1895
  108. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
  109. package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
  110. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
  111. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
  112. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
  113. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
  114. package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
  115. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
  116. package/src/lib/components/QcustomConfigList/index.ts +0 -6
  117. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -276
  118. package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
  119. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
  120. package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
  121. package/src/lib/components/QcustomConfigList/style/index.less +0 -3
  122. package/src/lib/components/QsysConfigList/index.ts +0 -6
  123. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -124
  124. package/src/lib/components/QsysConfigList/src/types.ts +0 -1
  125. package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
  126. package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
  127. package/src/lib/components/QsysConfigList/style/index.less +0 -3
  128. package/src/lib/components/index.ts +0 -78
  129. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
  130. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -135
  131. package/src/lib/components/integratedNodesList/src/index.vue +0 -130
  132. package/src/lib/components/integratedReportList/src/index.vue +0 -111
  133. package/src/lib/components/integratedReportSearchList/src/index.vue +0 -106
  134. package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -43
  135. package/src/lib/components/loginLogList/src/index.vue +0 -51
  136. package/src/lib/components/loginSupplierLogList/src/index.vue +0 -53
  137. package/src/lib/components/operateLogList/src/index.vue +0 -46
  138. package/src/lib/index.ts +0 -15
  139. package/src/lib/utils/constant.ts +0 -1
  140. package/src/lib/utils/global.hook.ts +0 -337
  141. package/src/lib/utils/global.types.ts +0 -49
  142. package/src/lib/utils/regexp.ts +0 -143
  143. package/src/main.ts +0 -11
  144. package/src/vite-env.d.ts +0 -13
  145. package/tsconfig.json +0 -24
  146. package/tsconfig.node.json +0 -9
  147. package/vite.config.ts +0 -61
  148. /package/dist/{index.es.d.ts → index.d.ts} +0 -0
@@ -1,272 +0,0 @@
1
- <template>
2
- <div class="edit-page">
3
- <a-spin :spinning="customLoading">
4
- <q-edit-page-layout v-if="showEdit" ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess"></q-edit-page-layout>
5
- </a-spin>
6
- </div>
7
- </template>
8
-
9
- <script setup lang="ts">
10
- import { ref, reactive, onMounted, inject, shallowRef, nextTick } from 'vue'
11
- import type { ComponentPublicInstance } from 'vue'
12
- import { BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW, BUTTON_SAVE } from '@qqt-product/ui'
13
- // ui组件库 types
14
- import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
15
- import { usePromiseStepHook, useRefInstanceHook } from '@qqt-product/ui'
16
- import * as customConfigEdits from '../../../utils/global.types'
17
-
18
- // 传参 props
19
- const props = defineProps<{
20
- currentRow: GlobalPageLayoutTypes.CurrentRow | null
21
- userInfo: GlobalPageLayoutTypes.UserInfo
22
- }>()
23
- const qHttp = inject(customConfigEdits.INJECT_HTTP) as customConfigEdits.HttpClient
24
- const showEdit = shallowRef(false)
25
- const currentRow = props.currentRow
26
- ? props.currentRow
27
- : ref({
28
- id: '',
29
- templateNumber: '',
30
- templateVersion: 0,
31
- templateAccount: '',
32
- busAccount: '',
33
- elsAccount: '',
34
- })
35
- // 编辑组件 ref
36
- const layoutRef = ref<ComponentPublicInstance | null>(null)
37
- const roleOptains = ref([])
38
- const groupOptains = ref([])
39
-
40
- // 配置
41
- const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
42
- /**
43
- * 模块业务类型 string
44
- * 取值根据各模块配置
45
- * 当定义为"custom"时,使用本地配置
46
- */
47
- businessType: 'custom',
48
- // 布局模式
49
- pattern: 'vertical',
50
- // 当前已选行数据a
51
- currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
52
- refreshMethods(row?: GlobalPageLayoutTypes.CurrentRow) {
53
- if (options.currentRow) {
54
- options.currentRow =
55
- row ||
56
- Object.assign({}, options.currentRow, {
57
- _t: +new Date(),
58
- })
59
- }
60
- },
61
- // 当前登录租户信息
62
- userInfo: props.userInfo,
63
- // 明细接口 -- 接口字符串
64
- detailApi: '/account/elsSubAccount/queryById',
65
- // 本地页面数据配置
66
- localConfig: {
67
- groups: [
68
- {
69
- groupName: '基本信息',
70
- groupCode: 'baseForm',
71
- groupType: 'head',
72
- },
73
- {
74
- groupName: '关联组织',
75
- groupCode: 'subaccountOrgList',
76
- groupType: 'item',
77
- buttons: [BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW],
78
- },
79
- ],
80
- formFields: [
81
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: 'ELS账号', fieldLabelI18nKey: 'i18n_title_ELSAccount', fieldName: 'elsAccount', placeholder: 'ELS账号', disabled: true },
82
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '子账号', fieldLabelI18nKey: 'i18n_field_subAccount', fieldName: 'subAccount', required: '1' },
83
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '姓名', fieldLabelI18nKey: 'i18n_title_name', fieldName: 'realname', required: '1' },
84
- {
85
- groupCode: 'baseForm',
86
- fieldType: 'input',
87
- fieldLabel: '密码',
88
- fieldLabelI18nKey: 'i18n_title_password',
89
- fieldName: 'password',
90
- required: '1',
91
- },
92
- {
93
- groupCode: 'baseForm',
94
- fieldType: 'multiple',
95
- fieldLabel: '角色',
96
- fieldLabelI18nKey: 'i18n_title_role',
97
- fieldName: 'selectedroles',
98
- required: '1',
99
- options: roleOptains,
100
- },
101
- {
102
- groupCode: 'baseForm',
103
- fieldType: 'multiple',
104
- fieldLabel: '数据权限组',
105
- fieldLabelI18nKey: 'i18n_menu_WFbWV_c4394039',
106
- fieldName: 'selectedGroups',
107
- options: groupOptains,
108
- },
109
- {
110
- groupCode: 'baseForm',
111
- fieldType: 'input',
112
- fieldLabel: '电子邮件',
113
- fieldLabelI18nKey: 'i18n_title_email',
114
- fieldName: 'email',
115
- regex: /[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+/,
116
- alertMsg: '邮箱格式不正确',
117
- },
118
- {
119
- groupCode: 'baseForm',
120
- fieldType: 'input',
121
- fieldLabel: '手机号',
122
- fieldLabelI18nKey: 'i18n_title_phone',
123
- fieldName: 'phone',
124
- regex: /^1[3|4|5|7|8|9]\d{9}$/,
125
- alertMsg: '您的手机号码格式不正确',
126
- },
127
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '工号', fieldLabelI18nKey: 'i18n_field_workNo', fieldName: 'workNo' },
128
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '座机号', fieldLabelI18nKey: 'i18n_title_landlineNumber', fieldName: 'telephone' },
129
- {
130
- groupCode: 'baseForm',
131
- fieldType: 'select',
132
- fieldLabel: '部门',
133
- fieldLabelI18nKey: 'i18n_title_department',
134
- dictCode: '/org/purchaseOrganizationInfo/getOrgTree',
135
- fieldName: 'orgCode',
136
- },
137
- { groupCode: 'baseForm', fieldType: 'date', fieldLabel: '账号过期时间', fieldLabelI18nKey: 'i18n_title_accountExpirationTime', fieldName: 'accountValidityDate' },
138
- {
139
- groupCode: 'baseForm',
140
- fieldType: 'remoteSelect',
141
- fieldLabel: '直属领导',
142
- fieldLabelI18nKey: 'i18n_field_RWQu_378045a0',
143
- fieldName: 'superiorLeader',
144
- extend: {
145
- modalColumns: [
146
- {
147
- field: 'subAccount',
148
- fieldLabelI18nKey: 'i18n_field_subAccount',
149
- title: '子账号',
150
- width: 150,
151
- },
152
- {
153
- field: 'realname',
154
- fieldLabelI18nKey: 'i18n_title_name',
155
- title: '姓名',
156
- width: 150,
157
- },
158
- ],
159
- modalUrl: '/account/elsSubAccount/list',
160
- },
161
- callback(ctx, { data, pageData }) {
162
- if (!data?.length) return
163
- pageData.superiorLeader = data[0].subAccount + '_' + data[0].realname
164
- },
165
- },
166
- ],
167
- itemColumns: [
168
- {
169
- groupCode: 'subaccountOrgList',
170
- fieldType: 'select',
171
- dictCode: 'orgCategoryType',
172
- title: '组织类型',
173
- fieldLabelI18nKey: 'i18n_field_organizationType',
174
- field: 'orgCategoryCode',
175
- align: 'center',
176
- headerAlign: 'center',
177
- defaultValue: '',
178
- width: '250',
179
- visible: true,
180
- },
181
- {
182
- groupCode: 'subaccountOrgList',
183
- fieldType: 'input',
184
- title: '组织编码',
185
- fieldLabelI18nKey: '',
186
- field: 'orgCode',
187
- align: 'center',
188
- headerAlign: 'center',
189
- defaultValue: '',
190
- width: '250',
191
- visible: true,
192
- },
193
- {
194
- groupCode: 'subaccountOrgList',
195
- fieldType: 'input',
196
- title: '备注',
197
- fieldLabelI18nKey: '',
198
- field: 'remark',
199
- align: 'center',
200
- headerAlign: 'center',
201
- defaultValue: '',
202
- width: '250',
203
- visible: true,
204
- },
205
- ],
206
- },
207
- // 页面按钮
208
- pageButtons: [
209
- {
210
- ...BUTTON_SAVE,
211
- title: '保存',
212
- emit: true,
213
- emitKey: 'customSave',
214
- args: {
215
- url: '/account/elsSubAccount/edit',
216
- },
217
- },
218
- ],
219
- })
220
-
221
- const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
222
- const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, options })
223
- // 自定义保存
224
- const handleCustomSave = () => {
225
- stepTriggerValidate()
226
- }
227
- //
228
- const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
229
- if (button.key === BUTTON_SAVE.key) {
230
- composeSave()
231
- }
232
- }
233
- // 页面刷新
234
-
235
- function getRoleOptains() {
236
- return qHttp
237
- .get({
238
- url: '/account/role/queryall',
239
- })
240
- .then((res) => {
241
- let result = res.result || []
242
- roleOptains.value = result.map((item) => ({
243
- label: item.roleName,
244
- value: item.id,
245
- }))
246
- })
247
- }
248
- function getGroupOptains() {
249
- return qHttp
250
- .get({
251
- url: '/account/permissionGroup/queryAll',
252
- })
253
- .then((res) => {
254
- let result = res.result || []
255
- console.log(123123, res.result)
256
- groupOptains.value = result.map((item) => ({
257
- ...item,
258
- label: item.groupName,
259
- value: item.id,
260
- }))
261
- })
262
- }
263
-
264
- //生命周期
265
- onMounted(async () => {
266
- await getRoleOptains()
267
- await getGroupOptains()
268
- await nextTick(() => {
269
- showEdit.value = true
270
- })
271
- })
272
- </script>
@@ -1,259 +0,0 @@
1
- <template>
2
- <div class="detail-page">
3
- <q-detail-page-layout ref="layoutRef" v-bind="options"></q-detail-page-layout>
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
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'
14
- import type { ComponentPublicInstance } from 'vue'
15
- import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
16
-
17
- // 传参 props
18
- const props = defineProps<{
19
- currentRow: GlobalPageLayoutTypes.CurrentRow | null
20
- userInfo: GlobalPageLayoutTypes.UserInfo
21
- }>()
22
- //state
23
-
24
- const qHttp = inject(customConfigEdits.INJECT_HTTP) as customConfigEdits.HttpClient
25
- let optionall = ref([])
26
- let groupOptions = ref([])
27
- const currentRow = props.currentRow
28
- ? props.currentRow
29
- : ref({
30
- id: '',
31
- templateNumber: '',
32
- templateVersion: 0,
33
- templateAccount: '',
34
- busAccount: '',
35
- elsAccount: '',
36
- })
37
- // 编辑组件 ref
38
- const layoutRef = ref<ComponentPublicInstance | null>(null)
39
- const { pageData } = useRefInstanceHook(layoutRef)
40
- // 配置
41
- const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
42
- /**
43
- * 模块业务类型 string
44
- * 取值根据各模块配置
45
- * 当定义为"custom"时,使用本地配置
46
- */
47
- businessType: 'custom',
48
- // 布局模式
49
- pattern: 'vertical',
50
- // 当前已选行数据a
51
- currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
52
- // 当前登录租户信息
53
- userInfo: props.userInfo,
54
- // 明细接口 -- 接口字符串
55
- detailApi: '/account/elsSubAccount/queryById',
56
- // 本地页面数据配置
57
- localConfig: {
58
- groups: [
59
- {
60
- groupName: '基本信息',
61
- groupCode: 'baseForm',
62
- groupType: 'head',
63
- },
64
- {
65
- groupName: '关联组织',
66
- groupCode: 'subaccountOrgList',
67
- groupType: 'item',
68
- },
69
- ],
70
- formFields: [
71
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: 'ELS账号', fieldLabelI18nKey: 'i18n_title_ELSAccount', fieldName: 'elsAccount', placeholder: 'ELS账号', disabled: true },
72
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '子账号', fieldLabelI18nKey: 'i18n_field_subAccount', fieldName: 'subAccount', required: '1' },
73
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '姓名', fieldLabelI18nKey: 'i18n_title_name', fieldName: 'realname', required: '1' },
74
- {
75
- groupCode: 'baseForm',
76
- fieldType: 'remoteSelect',
77
- fieldLabel: '角色',
78
- fieldLabelI18nKey: 'i18n_title_role',
79
- fieldName: 'selectedroles_dictText',
80
- extend: {
81
- modalColumns: [{ field: 'roleName', title: '角色', with: 150 }],
82
- modalUrl: '/account/role/queryall',
83
- selectModel: 'single',
84
- },
85
- required: '1',
86
- },
87
- {
88
- groupCode: 'baseForm',
89
- fieldType: 'remoteSelect',
90
- fieldLabel: '数据权限组',
91
- fieldLabelI18nKey: 'i18n_menu_WFbWV_c4394039',
92
- fieldName: 'selectedGroups_dictText',
93
- extend: {
94
- modalColumns: [{ field: 'groupName', title: '数据权限组', with: 150 }],
95
- modalUrl: '/account/permissionGroup/queryAll',
96
- selectModel: 'single',
97
- },
98
- },
99
- {
100
- groupCode: 'baseForm',
101
- fieldType: 'input',
102
- fieldLabel: '电子邮件',
103
- fieldLabelI18nKey: 'i18n_title_email',
104
- fieldName: 'email',
105
- regex: /[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+/,
106
- alertMsg: '邮箱格式不正确',
107
- },
108
- {
109
- groupCode: 'baseForm',
110
- fieldType: 'input',
111
- fieldLabel: '手机号',
112
- fieldLabelI18nKey: 'i18n_title_phone',
113
- fieldName: 'phone',
114
- regex: /^1[3|4|5|7|8|9]\d{9}$/,
115
- alertMsg: '您的手机号码格式不正确',
116
- },
117
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '工号', fieldLabelI18nKey: 'i18n_field_workNo', fieldName: 'workNo' },
118
- { groupCode: 'baseForm', fieldType: 'input', fieldLabel: '座机号', fieldLabelI18nKey: 'i18n_title_landlineNumber', fieldName: 'telephone' },
119
- {
120
- groupCode: 'baseForm',
121
- fieldType: 'select',
122
- fieldLabel: '部门',
123
- fieldLabelI18nKey: 'i18n_title_department',
124
- dictCode: '/org/purchaseOrganizationInfo/getOrgTree',
125
- fieldName: 'orgCode',
126
- },
127
- { groupCode: 'baseForm', fieldType: 'date', fieldLabel: '账号过期时间', fieldLabelI18nKey: 'i18n_title_accountExpirationTime', fieldName: 'accountValidityDate' },
128
- {
129
- groupCode: 'baseForm',
130
- fieldType: 'remoteSelect',
131
- fieldLabel: '直属领导',
132
- fieldLabelI18nKey: 'i18n_field_RWQu_378045a0',
133
- fieldName: 'superiorLeader',
134
- extend: {
135
- modalColumns: [
136
- {
137
- field: 'subAccount',
138
- fieldLabelI18nKey: 'i18n_field_subAccount',
139
- title: '子账号',
140
- width: 150,
141
- },
142
- {
143
- field: 'realname',
144
- fieldLabelI18nKey: 'i18n_title_name',
145
- title: '姓名',
146
- width: 150,
147
- },
148
- ],
149
- modalUrl: '/account/elsSubAccount/list',
150
- },
151
- },
152
- ],
153
- itemColumns: [
154
- {
155
- groupCode: 'subaccountOrgList',
156
- fieldType: 'select',
157
- dictCode: 'orgCategoryType',
158
- title: '组织类型',
159
- fieldLabelI18nKey: 'i18n_field_organizationType',
160
- field: 'orgCategoryCode',
161
- align: 'center',
162
- headerAlign: 'center',
163
- defaultValue: '',
164
- width: '250',
165
- visible: true,
166
- },
167
- {
168
- groupCode: 'subaccountOrgList',
169
- fieldType: 'input',
170
- title: '组织编码',
171
- fieldLabelI18nKey: '',
172
- field: 'orgCode',
173
- align: 'center',
174
- headerAlign: 'center',
175
- defaultValue: '',
176
- width: '250',
177
- visible: true,
178
- },
179
- {
180
- groupCode: 'subaccountOrgList',
181
- fieldType: 'input',
182
- title: '备注',
183
- fieldLabelI18nKey: '',
184
- field: 'remark',
185
- align: 'center',
186
- headerAlign: 'center',
187
- defaultValue: '',
188
- width: '250',
189
- visible: true,
190
- },
191
- ],
192
- },
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
- }
259
- </script>