@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.
Files changed (105) hide show
  1. package/dist/index.es.js +53240 -10634
  2. package/dist/index.umd.js +94 -21
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
  6. package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
  7. package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
  8. package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
  9. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
  10. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
  11. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
  12. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
  13. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
  14. package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
  15. package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
  16. package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
  17. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
  18. package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
  19. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
  20. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
  21. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
  22. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
  23. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
  24. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
  25. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
  26. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
  27. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
  28. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
  29. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
  30. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
  31. package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
  32. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
  33. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
  34. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
  35. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
  36. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
  37. package/dist/lib/components/index.d.ts +2 -2
  38. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
  39. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
  40. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
  41. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
  42. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
  43. package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
  44. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
  45. package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
  46. package/dist/style.css +1 -1
  47. package/dist/vite-env.d.ts +13 -13
  48. package/package.json +13 -11
  49. package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
  50. package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
  51. package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
  52. package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
  53. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
  54. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
  55. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
  56. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
  57. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
  58. package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
  59. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
  60. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
  61. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
  62. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
  63. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
  64. package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
  65. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
  66. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
  67. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
  68. package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
  69. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
  70. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
  71. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
  72. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
  73. package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
  74. package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
  75. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
  76. package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
  77. package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
  78. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
  79. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
  80. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
  81. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
  82. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
  83. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
  84. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
  85. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
  86. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
  87. package/src/lib/components/index.ts +78 -78
  88. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
  89. package/src/lib/components/integratedNodesList/src/index.vue +130 -136
  90. package/src/lib/components/integratedReportList/src/index.vue +55 -30
  91. package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
  92. package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
  93. package/src/lib/components/loginLogList/src/index.vue +51 -57
  94. package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
  95. package/src/lib/components/operateLogList/src/index.vue +46 -57
  96. package/src/vite-env.d.ts +13 -13
  97. package/tsconfig.json +24 -24
  98. package/vite.config.ts +1 -1
  99. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
  100. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
  101. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
  102. package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
  103. package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
  104. package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
  105. package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
@@ -1,221 +1,218 @@
1
- <template>
2
- <div class="edit-page">
3
- <a-spin :spinning="customLoading">
4
- <q-edit-page-layout ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess" @refresh="handleRefresh"></q-edit-page-layout>
5
- </a-spin>
6
- </div>
7
- </template>
8
-
9
- <script setup lang="ts">
10
- import { ref, reactive, inject } from 'vue'
11
- import type { ComponentPublicInstance } from 'vue'
12
- import { BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW, BUTTON_SAVE } from '@qqt-product/ui'
13
-
14
- // ui组件库 types
15
- import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
16
- import { usePromiseStepHook, useRefInstanceHook } from '@qqt-product/ui'
17
-
18
- import { VXETable } from 'vxe-table'
19
- const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
20
- if (i18nKey) {
21
- if (account) {
22
- return account + defaultValue
23
- }
24
- return defaultValue
25
- }
26
- return defaultValue
27
- })
28
- // 传参 props
29
- const props = defineProps<{
30
- currentRow: GlobalPageLayoutTypes.CurrentRow | null
31
- userInfo: GlobalPageLayoutTypes.UserInfo
32
- }>()
33
- const currentRow = props.currentRow
34
- ? props.currentRow
35
- : ref({
36
- id: '',
37
- templateNumber: '',
38
- templateVersion: 0,
39
- templateAccount: '',
40
- busAccount: '',
41
- elsAccount: '',
42
- })
43
- // 编辑组件 ref
44
- const layoutRef = ref<ComponentPublicInstance | null>(null)
45
-
46
- // 配置
47
- const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
48
- /**
49
- * 模块业务类型 string
50
- * 取值根据各模块配置
51
- * 当定义为"custom"时,使用本地配置
52
- */
53
- businessType: 'custom',
54
- // 布局模式
55
- pattern: 'vertical',
56
- // 当前已选行数据a
57
- currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
58
- refreshMethods(row?: GlobalPageLayoutTypes.CurrentRow) {
59
- if (options.currentRow) {
60
- options.currentRow =
61
- row ||
62
- Object.assign({}, options.currentRow, {
63
- _t: +new Date(),
64
- })
65
- }
66
- },
67
- // 当前登录租户信息
68
- userInfo: props.userInfo,
69
- // 明细接口 -- 接口字符串
70
- detailApi: '/account/permissionGroup/queryById',
71
- // 本地页面数据配置
72
- localConfig: {
73
- groups: [
74
- {
75
- groupName: '基本信息',
76
- groupCode: 'baseForm',
77
- groupType: 'head',
78
- },
79
- {
80
- groupName: srmI18n('i18n_title_permissionConfigLine', '权限配置行'),
81
- groupCode: 'permissionDataList',
82
- groupType: 'item',
83
- buttons: [BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW],
84
- },
85
- ],
86
- formFields: [
87
- {
88
- groupCode: 'baseForm',
89
- fieldType: 'input',
90
- fieldLabel: '权限组编码',
91
- fieldLabelI18nKey: 'i18n_field_bWVAo_f564cee2',
92
- fieldName: 'groupCode',
93
- },
94
- {
95
- groupCode: 'baseForm',
96
- fieldType: 'input',
97
- fieldLabel: '权限组名称',
98
- fieldLabelI18nKey: 'i18n_field_bWVRL_f55f9aba',
99
- fieldName: 'groupName',
100
- },
101
- {
102
- groupCode: 'baseForm',
103
- fieldType: 'remoteSelect',
104
- fieldLabel: '敏感字段组',
105
- fieldLabelI18nKey: 'i18n_field_KwJOV_c129a796',
106
- fieldName: 'sensitiveFieldGroups',
107
- extend: {
108
- modalColumns: [{ field: 'fieldGroup_dictText', title: '敏感字段组', with: 150 }],
109
- modalUrl: '/base/sensitiveField/findAllGroup',
110
- selectModel: 'multiple',
111
- },
112
- },
113
- {
114
- groupCode: 'baseForm',
115
- fieldType: 'input',
116
- fieldLabel: '描述',
117
- fieldLabelI18nKey: 'i18n_title_describe',
118
- fieldName: 'description',
119
- },
120
- ],
121
- itemColumns: [
122
- {
123
- groupCode: 'permissionDataList',
124
- title: '业务类型',
125
- fieldLabelI18nKey: 'i18n_field_businessType',
126
- field: 'businessType',
127
- width: '220',
128
- required: '1',
129
- fieldType: 'remoteSelect',
130
- extend: {
131
- fieldNames: { label: 'itemText', value: 'itemValue' },
132
- modalColumns: [{ field: 'itemText', title: '业务类型', with: 150 }],
133
- modalUrl: 'base/companySet/findOpenbusinessType',
134
- selectModel: 'single',
135
- },
136
- },
137
- {
138
- groupCode: 'permissionDataList',
139
- title: '权限字段',
140
- fieldLabelI18nKey: 'i18n_field_permissionField',
141
- field: 'permissionField',
142
- width: '220',
143
- required: '1',
144
- fieldType: 'select',
145
- dictCode: 'srmPermissionField',
146
- },
147
- {
148
- groupCode: 'permissionDataList',
149
- title: '字段值',
150
- fieldLabelI18nKey: 'i18n_title_fieldValue',
151
- helpText: srmI18n(
152
- 'i18n_field_ORORzEjdQOymvWKvWWWWWWWWWWWWWWWWWORCDzEjWWWWWmvWKvWWWWWWWWWWWWWWWWWtRCDzERSLuWWWWWWKvWWWWWWWWNRTPzEdjRFKjRIJWWWW_cab6b973',
153
- "多值精确匹配用英文逗号隔开,示例:1001,1002,1003\n多值模糊匹配用'|'隔开,示例:1001|1002|1003\n单值模糊匹配值后面加'|',示例:1001|\n如果需要匹配所有值则使用关键字 all",
154
- ),
155
- field: 'permissionValue',
156
- width: '150',
157
- //required: '1',
158
- fieldType: 'input',
159
- slots: {},
160
- },
161
- {
162
- groupCode: 'permissionDataList',
163
- title: '操作权限',
164
- fieldLabelI18nKey: 'i18n_field_operation',
165
- field: 'operation',
166
- width: '150',
167
- fieldType: 'switch',
168
- },
169
- {
170
- groupCode: 'permissionDataList',
171
- title: '关联用户组织',
172
- fieldLabelI18nKey: 'i18n_field_RKjDVR_43e9f793',
173
- helpText: srmI18n('i18n_alert_JOMjDRvILjDRKjVRkLbWJOR_2b5db91f', '自动取用户管理下面用户关联的组织作为权限字段值'),
174
- field: 'autoRelation',
175
- width: '150',
176
- fieldType: 'switch',
177
- slots: {},
178
- },
179
- ],
180
- },
181
- // 页面按钮
182
- pageButtons: [
183
- {
184
- ...BUTTON_SAVE,
185
- title: '保存',
186
- emit: true,
187
- emitKey: 'customSave',
188
- args: {
189
- url: '/account/permissionGroup/edit',
190
- },
191
- },
192
- ],
193
- })
194
- const pageButtons = options.pageButtons as GlobalPageLayoutTypes.PageButton[]
195
- const refreshMethods = options.refreshMethods
196
- const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
197
- const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, pageButtons: ref(pageButtons), refreshMethods })
198
- // 自定义保存
199
- const handleCustomSave = () => {
200
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
201
- const permissionDataList = pageData.value.permissionDataList as any[]
202
- if (permissionDataList.length > 0) {
203
- stepTriggerValidate()
204
- } else {
205
- VXETable.modal.message({ content: srmI18n('i18n_title_permissionConfigLine', '权限配置行'), status: 'error' })
206
- return false
207
- }
208
- }
209
- //
210
- const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
211
- if (button.key === BUTTON_SAVE.key) {
212
- composeSave()
213
- }
214
- }
215
- // 页面刷新
216
- const handleRefresh = () => {
217
- if (options.currentRow) {
218
- options.currentRow._t = +new Date()
219
- }
220
- }
221
- </script>
1
+ <template>
2
+ <div class="edit-page">
3
+ <a-spin :spinning="customLoading">
4
+ <q-edit-page-layout 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, inject } from 'vue'
11
+ import type { ComponentPublicInstance } from 'vue'
12
+ import { BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW, BUTTON_SAVE } from '@qqt-product/ui'
13
+
14
+ // ui组件库 types
15
+ import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
16
+ import { usePromiseStepHook, useRefInstanceHook } from '@qqt-product/ui'
17
+
18
+ import { VXETable } from 'vxe-table'
19
+ const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
20
+ if (i18nKey) {
21
+ if (account) {
22
+ return account + defaultValue
23
+ }
24
+ return defaultValue
25
+ }
26
+ return defaultValue
27
+ })
28
+ // 传参 props
29
+ const props = defineProps<{
30
+ currentRow: GlobalPageLayoutTypes.CurrentRow | null
31
+ userInfo: GlobalPageLayoutTypes.UserInfo
32
+ }>()
33
+ const currentRow = props.currentRow
34
+ ? props.currentRow
35
+ : ref({
36
+ id: '',
37
+ templateNumber: '',
38
+ templateVersion: 0,
39
+ templateAccount: '',
40
+ busAccount: '',
41
+ elsAccount: '',
42
+ })
43
+ // 编辑组件 ref
44
+ const layoutRef = ref<ComponentPublicInstance | null>(null)
45
+
46
+ // 配置
47
+ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
48
+ /**
49
+ * 模块业务类型 string
50
+ * 取值根据各模块配置
51
+ * 当定义为"custom"时,使用本地配置
52
+ */
53
+ businessType: 'custom',
54
+ // 布局模式
55
+ pattern: 'vertical',
56
+ // 当前已选行数据a
57
+ currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
58
+ refreshMethods(row?: GlobalPageLayoutTypes.CurrentRow) {
59
+ if (options.currentRow) {
60
+ options.currentRow =
61
+ row ||
62
+ Object.assign({}, options.currentRow, {
63
+ _t: +new Date(),
64
+ })
65
+ }
66
+ },
67
+ // 当前登录租户信息
68
+ userInfo: props.userInfo,
69
+ // 明细接口 -- 接口字符串
70
+ detailApi: '/account/permissionGroup/queryById',
71
+ // 本地页面数据配置
72
+ localConfig: {
73
+ groups: [
74
+ {
75
+ groupName: '基本信息',
76
+ groupCode: 'baseForm',
77
+ groupType: 'head',
78
+ },
79
+ {
80
+ groupName: srmI18n('i18n_title_permissionConfigLine', '权限配置行'),
81
+ groupCode: 'permissionDataList',
82
+ groupType: 'item',
83
+ buttons: [BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW],
84
+ },
85
+ ],
86
+ formFields: [
87
+ {
88
+ groupCode: 'baseForm',
89
+ fieldType: 'input',
90
+ fieldLabel: '权限组编码',
91
+ fieldLabelI18nKey: 'i18n_field_bWVAo_f564cee2',
92
+ fieldName: 'groupCode',
93
+ },
94
+ {
95
+ groupCode: 'baseForm',
96
+ fieldType: 'input',
97
+ fieldLabel: '权限组名称',
98
+ fieldLabelI18nKey: 'i18n_field_bWVRL_f55f9aba',
99
+ fieldName: 'groupName',
100
+ },
101
+ {
102
+ groupCode: 'baseForm',
103
+ fieldType: 'remoteSelect',
104
+ fieldLabel: '敏感字段组',
105
+ fieldLabelI18nKey: 'i18n_field_KwJOV_c129a796',
106
+ fieldName: 'sensitiveFieldGroups',
107
+ extend: {
108
+ modalColumns: [{ field: 'fieldGroup_dictText', title: '敏感字段组', with: 150 }],
109
+ modalUrl: '/base/sensitiveField/findAllGroup',
110
+ selectModel: 'multiple',
111
+ },
112
+ },
113
+ {
114
+ groupCode: 'baseForm',
115
+ fieldType: 'input',
116
+ fieldLabel: '描述',
117
+ fieldLabelI18nKey: 'i18n_title_describe',
118
+ fieldName: 'description',
119
+ },
120
+ ],
121
+ itemColumns: [
122
+ {
123
+ groupCode: 'permissionDataList',
124
+ title: '业务类型',
125
+ fieldLabelI18nKey: 'i18n_field_businessType',
126
+ field: 'businessType_dictText',
127
+ width: '220',
128
+ required: '1',
129
+ fieldType: 'remoteSelect',
130
+ extend: {
131
+ // fieldNames: { label: 'itemText', value: 'itemValue' },
132
+ valueKey: 'itemValue',
133
+ modalColumns: [{ field: 'itemText', title: '业务类型', with: 150 }],
134
+ modalUrl: 'base/companySet/findOpenbusinessType',
135
+ selectModel: 'single',
136
+ },
137
+ callback: (ctx, { value, data, row, pageData, layoutConfig, customFormatItem, setItemRequired, setItemDisabled, setItemRequiredOrDisabled }) => {
138
+ if (data && data.length) {
139
+ row.businessType = data[0].itemValue
140
+ row.businessType_dictText = data[0].itemText
141
+ }
142
+ },
143
+ },
144
+ {
145
+ groupCode: 'permissionDataList',
146
+ title: '权限字段',
147
+ fieldLabelI18nKey: 'i18n_field_permissionField',
148
+ field: 'permissionField',
149
+ width: '220',
150
+ required: '1',
151
+ fieldType: 'select',
152
+ dictCode: 'srmPermissionField',
153
+ },
154
+ {
155
+ groupCode: 'permissionDataList',
156
+ title: '字段值',
157
+ fieldLabelI18nKey: 'i18n_title_fieldValue',
158
+ helpText: "多值精确匹配用英文逗号隔开,示例:1001,1002,1003\n多值模糊匹配用'|'隔开,示例:1001|1002|1003\n单值模糊匹配值后面加'|',示例:1001|\n如果需要匹配所有值则使用关键字 all",
159
+ field: 'permissionValue',
160
+ width: '150',
161
+ //required: '1',
162
+ fieldType: 'input',
163
+ slots: {},
164
+ },
165
+ {
166
+ groupCode: 'permissionDataList',
167
+ title: '操作权限',
168
+ fieldLabelI18nKey: 'i18n_field_operation',
169
+ field: 'operation',
170
+ width: '150',
171
+ fieldType: 'switch',
172
+ },
173
+ {
174
+ groupCode: 'permissionDataList',
175
+ title: '关联用户组织',
176
+ fieldLabelI18nKey: 'i18n_field_RKjDVR_43e9f793',
177
+ helpText: srmI18n('i18n_alert_JOMjDRvILjDRKjVRkLbWJOR_2b5db91f', '自动取用户管理下面用户关联的组织作为权限字段值'),
178
+ field: 'autoRelation',
179
+ width: '150',
180
+ fieldType: 'switch',
181
+ slots: {},
182
+ },
183
+ ],
184
+ },
185
+ // 页面按钮
186
+ pageButtons: [
187
+ {
188
+ ...BUTTON_SAVE,
189
+ title: '保存',
190
+ emit: true,
191
+ emitKey: 'customSave',
192
+ args: {
193
+ url: '/account/permissionGroup/edit',
194
+ },
195
+ },
196
+ ],
197
+ })
198
+
199
+ const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
200
+ const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, options })
201
+ // 自定义保存
202
+ const handleCustomSave = () => {
203
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
204
+ const permissionDataList = pageData.value.permissionDataList as any[]
205
+ if (permissionDataList.length > 0) {
206
+ stepTriggerValidate()
207
+ } else {
208
+ VXETable.modal.message({ content: srmI18n('i18n_title_permissionConfigLine', '权限配置行'), status: 'error' })
209
+ return false
210
+ }
211
+ }
212
+ //
213
+ const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
214
+ if (button.key === BUTTON_SAVE.key) {
215
+ composeSave()
216
+ }
217
+ }
218
+ </script>