@qqt-product/system 0.0.1

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 (198) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.cjs +22 -0
  3. package/.prettierignore +4 -0
  4. package/.prettierrc.cjs +41 -0
  5. package/.vscode/extensions.json +3 -0
  6. package/README.md +16 -0
  7. package/dist/index.es.d.ts +1 -0
  8. package/dist/index.es.js +14234 -0
  9. package/dist/index.umd.js +311 -0
  10. package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +143 -0
  11. package/dist/lib/components/QAccountList/src/useConfigData.d.ts +37 -0
  12. package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +66 -0
  13. package/dist/lib/components/QBackgroundFileTaskList/src/useConfigData.d.ts +14 -0
  14. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +80 -0
  15. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +44 -0
  16. package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +68 -0
  17. package/dist/lib/components/QElsEmailSendLogList/src/useConfigData.d.ts +13 -0
  18. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +72 -0
  19. package/dist/lib/components/QElsMsgRecordList/src/useConfigData.d.ts +16 -0
  20. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +75 -0
  21. package/dist/lib/components/QI18nList/src/QI18nForm.vue.d.ts +47 -0
  22. package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +136 -0
  23. package/dist/lib/components/QI18nList/src/useConfigData.d.ts +31 -0
  24. package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +61 -0
  25. package/dist/lib/components/QImChatGroupList/src/useConfigData.d.ts +11 -0
  26. package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +60 -0
  27. package/dist/lib/components/QMqRecordList/src/useConfigData.d.ts +12 -0
  28. package/dist/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue.d.ts +49 -0
  29. package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +3 -0
  30. package/dist/lib/components/QPermissionDataList/src/form.vue.d.ts +50 -0
  31. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +86 -0
  32. package/dist/lib/components/QPurchaseNoticeList/src/useConfigData.d.ts +15 -0
  33. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +47 -0
  34. package/dist/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.d.ts +12 -0
  35. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +129 -0
  36. package/dist/lib/components/QQuartzJobList/src/components/JCron.vue.d.ts +23 -0
  37. package/dist/lib/components/QQuartzJobList/src/components/JCronModal.vue.d.ts +100 -0
  38. package/dist/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue.d.ts +55 -0
  39. package/dist/lib/components/QQuartzJobList/src/useConfigData.d.ts +20 -0
  40. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +100 -0
  41. package/dist/lib/components/QRoleList/src/components/content-header/index.d.ts +23 -0
  42. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +79 -0
  43. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +30 -0
  44. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue.d.ts +55 -0
  45. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +104 -0
  46. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +29 -0
  47. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +49 -0
  48. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +14 -0
  49. package/dist/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue.d.ts +31 -0
  50. package/dist/lib/components/QcustomConfigEdit/component/dataFormatComponent.d.ts +46 -0
  51. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +41 -0
  52. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigRender.d.ts +12 -0
  53. package/dist/lib/components/QcustomConfigEdit/src/types.d.ts +61 -0
  54. package/dist/lib/components/QcustomConfigEdit/src/useConfigComputed.d.ts +7 -0
  55. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +85 -0
  56. package/dist/lib/components/QcustomConfigEdit/src/useConfigMethods.d.ts +16 -0
  57. package/dist/lib/components/QcustomConfigEdit/src/useConstant.d.ts +18 -0
  58. package/dist/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue.d.ts +50 -0
  59. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +112 -0
  60. package/dist/lib/components/QcustomConfigList/src/useConfigData.d.ts +17 -0
  61. package/dist/lib/components/QcustomConfigList/src/useMethods.d.ts +15 -0
  62. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +66 -0
  63. package/dist/lib/components/QsysConfigList/src/useConfigData.d.ts +11 -0
  64. package/dist/lib/components/QsysConfigList/src/useMethods.d.ts +6 -0
  65. package/dist/lib/components/index.d.ts +39 -0
  66. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +107 -0
  67. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +70 -0
  68. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +61 -0
  69. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +46 -0
  70. package/dist/lib/components/loginLogList/src/index.vue.d.ts +45 -0
  71. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +45 -0
  72. package/dist/lib/components/operateLogList/src/index.vue.d.ts +53 -0
  73. package/dist/lib/index.d.ts +6 -0
  74. package/dist/lib/utils/global.hook.d.ts +31 -0
  75. package/dist/lib/utils/global.types.d.ts +41 -0
  76. package/dist/lib/utils/regexp.d.ts +27 -0
  77. package/dist/style.css +1 -0
  78. package/dist/vite-env.d.ts +13 -0
  79. package/dist/vite.svg +1 -0
  80. package/index.html +13 -0
  81. package/package.json +65 -0
  82. package/public/vite.svg +1 -0
  83. package/src/App.vue +8 -0
  84. package/src/lib/components/QAccountList/index.ts +6 -0
  85. package/src/lib/components/QAccountList/src/QAccountDetail.vue +191 -0
  86. package/src/lib/components/QAccountList/src/QAccountEdit.vue +241 -0
  87. package/src/lib/components/QAccountList/src/QAccountList.vue +530 -0
  88. package/src/lib/components/QAccountList/src/useConfigData.ts +53 -0
  89. package/src/lib/components/QBackgroundFileTaskList/index.ts +6 -0
  90. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +137 -0
  91. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +20 -0
  92. package/src/lib/components/QCompanyermissionList/src/editTree.vue +291 -0
  93. package/src/lib/components/QCompanyermissionList/src/form.vue +238 -0
  94. package/src/lib/components/QCompanyermissionList/src/index.vue +309 -0
  95. package/src/lib/components/QCompanyermissionList/src/types.ts +44 -0
  96. package/src/lib/components/QElsEmailSendLogList/index.ts +6 -0
  97. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +166 -0
  98. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +19 -0
  99. package/src/lib/components/QElsMsgRecordList/index.ts +6 -0
  100. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +148 -0
  101. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +124 -0
  102. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +22 -0
  103. package/src/lib/components/QElsTenantPortalNewsList/index.ts +6 -0
  104. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +139 -0
  105. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +196 -0
  106. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +122 -0
  107. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +20 -0
  108. package/src/lib/components/QI18nList/index.ts +6 -0
  109. package/src/lib/components/QI18nList/src/QI18nForm.vue +141 -0
  110. package/src/lib/components/QI18nList/src/QI18nList.vue +361 -0
  111. package/src/lib/components/QI18nList/src/useConfigData.ts +37 -0
  112. package/src/lib/components/QImChatGroupList/index.ts +6 -0
  113. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +94 -0
  114. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +17 -0
  115. package/src/lib/components/QMqRecordList/index.ts +6 -0
  116. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +105 -0
  117. package/src/lib/components/QMqRecordList/src/useConfigData.ts +18 -0
  118. package/src/lib/components/QPasswordSecurityPolicy/index.ts +6 -0
  119. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +266 -0
  120. package/src/lib/components/QPermissionDataList/index.ts +6 -0
  121. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -0
  122. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +221 -0
  123. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +117 -0
  124. package/src/lib/components/QPermissionDataList/src/form.vue +109 -0
  125. package/src/lib/components/QPurchaseNoticeList/index.ts +6 -0
  126. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +147 -0
  127. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +244 -0
  128. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +163 -0
  129. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -0
  130. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +6 -0
  131. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +85 -0
  132. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +18 -0
  133. package/src/lib/components/QQuartzJobList/index.ts +6 -0
  134. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +263 -0
  135. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +82 -0
  136. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +985 -0
  137. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +176 -0
  138. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +26 -0
  139. package/src/lib/components/QRoleList/index.ts +6 -0
  140. package/src/lib/components/QRoleList/src/QRoleList.vue +288 -0
  141. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +31 -0
  142. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +42 -0
  143. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +690 -0
  144. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +97 -0
  145. package/src/lib/components/QRoleList/src/useConfigData.ts +33 -0
  146. package/src/lib/components/QSupplierAccountList/index.ts +6 -0
  147. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +187 -0
  148. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +302 -0
  149. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +29 -0
  150. package/src/lib/components/QUsageList/index.ts +6 -0
  151. package/src/lib/components/QUsageList/src/QUsageList.vue +82 -0
  152. package/src/lib/components/QUsageList/src/useConfigData.ts +20 -0
  153. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -0
  154. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +100 -0
  155. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +100 -0
  156. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +71 -0
  157. package/src/lib/components/QcustomConfigEdit/index.ts +6 -0
  158. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +1807 -0
  159. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +242 -0
  160. package/src/lib/components/QcustomConfigEdit/src/types.ts +71 -0
  161. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +75 -0
  162. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +123 -0
  163. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +117 -0
  164. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +301 -0
  165. package/src/lib/components/QcustomConfigEdit/style/index.less +41 -0
  166. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +135 -0
  167. package/src/lib/components/QcustomConfigList/index.ts +6 -0
  168. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +268 -0
  169. package/src/lib/components/QcustomConfigList/src/types.ts +1 -0
  170. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +23 -0
  171. package/src/lib/components/QcustomConfigList/src/useMethods.ts +36 -0
  172. package/src/lib/components/QcustomConfigList/style/index.less +3 -0
  173. package/src/lib/components/QsysConfigList/index.ts +6 -0
  174. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +125 -0
  175. package/src/lib/components/QsysConfigList/src/types.ts +1 -0
  176. package/src/lib/components/QsysConfigList/src/useConfigData.ts +17 -0
  177. package/src/lib/components/QsysConfigList/src/useMethods.ts +11 -0
  178. package/src/lib/components/QsysConfigList/style/index.less +3 -0
  179. package/src/lib/components/index.ts +78 -0
  180. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +49 -0
  181. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +143 -0
  182. package/src/lib/components/integratedNodesList/src/index.vue +136 -0
  183. package/src/lib/components/integratedReportList/src/index.vue +86 -0
  184. package/src/lib/components/integratedReportSearchList/src/index.vue +66 -0
  185. package/src/lib/components/loginAbnormalLogList/src/index.vue +50 -0
  186. package/src/lib/components/loginLogList/src/index.vue +57 -0
  187. package/src/lib/components/loginSupplierLogList/src/index.vue +63 -0
  188. package/src/lib/components/operateLogList/src/index.vue +57 -0
  189. package/src/lib/index.ts +15 -0
  190. package/src/lib/utils/constant.ts +1 -0
  191. package/src/lib/utils/global.hook.ts +337 -0
  192. package/src/lib/utils/global.types.ts +49 -0
  193. package/src/lib/utils/regexp.ts +143 -0
  194. package/src/main.ts +11 -0
  195. package/src/vite-env.d.ts +13 -0
  196. package/tsconfig.json +24 -0
  197. package/tsconfig.node.json +9 -0
  198. package/vite.config.ts +61 -0
@@ -0,0 +1,221 @@
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>
@@ -0,0 +1,117 @@
1
+ <template>
2
+ <q-list-layout ref="listLayoutRef" :pageData="pageData" :apiUrls="apiUrls" />
3
+ <CopyForm v-if="showItemInfoForm" @hide="showItemInfoForm = false" @afterHandleSaveSuccess="afterHandleSaveItemInfoSuccess"></CopyForm>
4
+ </template>
5
+
6
+ <script setup lang="ts">
7
+ import { reactive, ref } from 'vue'
8
+ import CopyForm from './form.vue'
9
+ import { GlobalListPageLayoutTypes } from '@qqt-product/ui'
10
+
11
+ const emit = defineEmits(['create', 'edit', 'copy', 'auth'])
12
+ const listLayoutRef = ref()
13
+ const showItemInfoForm = ref(false)
14
+ const apiUrls = reactive({
15
+ columnsCode: 'permissionGroupList',
16
+ list: '/account/permissionGroup/list',
17
+ })
18
+ const pageData = reactive({
19
+ statusConfig: {
20
+ show: false,
21
+ },
22
+ optColumn: {
23
+ attrs: {},
24
+ extend: {},
25
+ optColumnList: [
26
+ {
27
+ authorityCode: 'system#permissionGroup:add',
28
+ type: 'edit',
29
+ title: '编辑',
30
+ click({ row }: GlobalListPageLayoutTypes.ListOptionsEventParams) {
31
+ const payload = {
32
+ row,
33
+ }
34
+ emit('edit', payload)
35
+ },
36
+ },
37
+ {
38
+ authorityCode: 'system#permissionGroup:copy',
39
+ title: '复制',
40
+ click({ row }: GlobalListPageLayoutTypes.ListOptionsEventParams) {
41
+ const payload = {
42
+ row,
43
+ }
44
+ showItemInfoForm.value = true
45
+ emit('copy', payload)
46
+ },
47
+ },
48
+ {
49
+ type: 'delete',
50
+ title: '删除',
51
+ authorityCode: 'system#permissionGroup:delete',
52
+ args: {
53
+ url: '/account/permissionGroup/delete',
54
+ },
55
+ },
56
+ // {
57
+ // authorityCode: 'system#permissionGroup:authUser',
58
+ // type: 'edit',
59
+ // title: '用户配置',
60
+ // click({ row }: GlobalListPageLayoutTypes.ListOptionsEventParams) {
61
+ // const payload = {
62
+ // row,
63
+ // }
64
+ // emit('auth', payload)
65
+ // },
66
+ // },
67
+ ],
68
+ },
69
+ buttonConfig: {
70
+ attrs: {},
71
+ extend: {},
72
+ buttons: [
73
+ {
74
+ authorityCode: 'system#permissionGroup:add',
75
+ label: '新增',
76
+ icon: {
77
+ type: 'icon-Q-add',
78
+ },
79
+ attrs: {
80
+ type: 'primary',
81
+ },
82
+ click({ row }: GlobalListPageLayoutTypes.ListOptionsEventParams) {
83
+ const payload = {
84
+ row,
85
+ }
86
+ emit('create', payload)
87
+ },
88
+ },
89
+ {
90
+ label: '列自定义',
91
+ icon: {
92
+ type: 'icon-Q-setting',
93
+ },
94
+ type: 'setting',
95
+ },
96
+ ],
97
+ },
98
+ queryConfig: {
99
+ attrs: {},
100
+ extend: {},
101
+ form: [
102
+ {
103
+ type: 'input',
104
+ label: '数据权限组',
105
+ fieldName: 'keyWord',
106
+ placeholder: '请输入权限组名称/编码',
107
+ },
108
+ ],
109
+ formState: {},
110
+ },
111
+ pagerConfig: {},
112
+ })
113
+ // 保存成功后
114
+ const afterHandleSaveItemInfoSuccess = () => {
115
+ listLayoutRef.value.fetchListData()
116
+ }
117
+ </script>
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <vxe-modal v-model="showModal" :width="800" :title="srmI18n('i18n_field_BRWFbWV_c80c7b10', '复制数据权限组')" :hide="hideModal">
3
+ <template #default>
4
+ <vxe-form title-colon title-align="right" title-width="160" :data="itemInfo.formData" :rules="itemInfo.formRules" :loading="itemInfo.loading" @submit="submitEvent">
5
+ <vxe-form-gather span="24">
6
+ <vxe-form-item :title="srmI18n('i18n_field_bWVAo_f564cee2', '权限组编码')" field="groupCode" span="24">
7
+ <template #default="{ data }">
8
+ <vxe-input v-model="data.groupCode" type="text" clearable></vxe-input>
9
+ </template>
10
+ </vxe-form-item>
11
+ <vxe-form-item :title="srmI18n('i18n_field_bWVRL_f55f9aba', '权限组名称')" field="groupName" span="24">
12
+ <template #default="{ data }">
13
+ <vxe-input v-model="data.groupName" type="text" clearable></vxe-input>
14
+ </template>
15
+ </vxe-form-item>
16
+ </vxe-form-gather>
17
+ <vxe-form-item align="center" span="24">
18
+ <template #default>
19
+ <vxe-button :content="srmI18n('i18n_title_cancle', '取消')" @click="hideModal"></vxe-button>
20
+ <vxe-button type="submit" status="primary" :content="srmI18n('i18n_title_save', '保存')"></vxe-button>
21
+ </template>
22
+ </vxe-form-item>
23
+ </vxe-form>
24
+ </template>
25
+ </vxe-modal>
26
+ </template>
27
+ <script lang="ts">
28
+ import { defineComponent, reactive, ref, inject } from 'vue'
29
+ import { VXETable, VxeFormEvents, VxeFormPropTypes } from 'vxe-table'
30
+ import qqtApi from '@qqt-product/api'
31
+ export default defineComponent({
32
+ name: 'ParamConfigForm',
33
+ props: {
34
+ title: {
35
+ type: String,
36
+ default: '',
37
+ },
38
+ currentRow: {
39
+ type: Object,
40
+ },
41
+ configurationClassificationList: {
42
+ type: Object,
43
+ },
44
+ itemTypeList: {
45
+ type: Object,
46
+ },
47
+ },
48
+ setup(props, { emit }) {
49
+ const qHttp: qqtApi.Request = qqtApi.useHttp()
50
+ const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
51
+ if (i18nKey) {
52
+ if (account) {
53
+ return account + defaultValue
54
+ }
55
+ return defaultValue
56
+ }
57
+ return defaultValue
58
+ })
59
+ const modalTitle = ref(props.title)
60
+ const showModal = ref(true)
61
+ const hideModal = () => {
62
+ emit('hide', false)
63
+ }
64
+ const itemInfo = reactive({
65
+ loading: false,
66
+ formData: {
67
+ groupCode: '',
68
+ groupName: '',
69
+ id: '',
70
+ },
71
+ formRules: {
72
+ groupName: [{ required: true, message: srmI18n('i18n_field_VWNbWVRL_533015f1', '请输入权限组名称') }],
73
+ groupCode: [{ required: true, message: srmI18n('18n_field_VWNbWVAo_53354a19', '请输入权限组编码') }],
74
+ } as VxeFormPropTypes.Rules,
75
+ })
76
+ itemInfo.formData = Object.assign({}, itemInfo.formData, props.currentRow)
77
+ // 保存
78
+ const save = async () => {
79
+ itemInfo.loading = true
80
+ const res = await qHttp.post({ url: '/account/permissionGroup/copy', data: itemInfo.formData })
81
+ if (res && res.success) {
82
+ VXETable.modal.message({ content: res.message, status: 'success' })
83
+ hideModal()
84
+ emit('afterHandleSaveSuccess')
85
+ } else {
86
+ VXETable.modal.message({ content: res.message, status: 'error' })
87
+ }
88
+ itemInfo.loading = false
89
+ }
90
+ const submitEvent: VxeFormEvents.Submit = () => {
91
+ save()
92
+ }
93
+ return {
94
+ modalTitle,
95
+ showModal,
96
+ hideModal,
97
+ itemInfo,
98
+ save,
99
+ submitEvent,
100
+ srmI18n,
101
+ }
102
+ },
103
+ })
104
+ </script>
105
+ <style lang="scss" scoped>
106
+ :deep(.vxe-form--gather) {
107
+ padding: 20px 0px;
108
+ }
109
+ </style>
@@ -0,0 +1,6 @@
1
+ import QPurchaseNoticeList from './src/QPurchaseNoticeList.vue'
2
+ import qqtUtils from '@qqt-product/utils'
3
+
4
+ export default qqtUtils.withInstall(QPurchaseNoticeList)
5
+
6
+ export { QPurchaseNoticeList }
@@ -0,0 +1,147 @@
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
+ <script setup lang="ts">
7
+ import { ref, reactive, inject } from 'vue'
8
+ import type { ComponentPublicInstance } from 'vue'
9
+ import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
10
+ const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
11
+ if (i18nKey) {
12
+ if (account) {
13
+ return account + defaultValue
14
+ }
15
+ return defaultValue
16
+ }
17
+ return defaultValue
18
+ })
19
+
20
+ // 传参 props
21
+ const props = defineProps<{
22
+ currentRow: GlobalPageLayoutTypes.CurrentRow | null
23
+ userInfo: GlobalPageLayoutTypes.UserInfo
24
+ }>()
25
+
26
+ const currentRow = props.currentRow
27
+ ? props.currentRow
28
+ : ref({
29
+ templateNumber: '',
30
+ templateVersion: 0,
31
+ templateAccount: '',
32
+ busAccount: '',
33
+ elsAccount: '',
34
+ })
35
+
36
+ // 编辑组件 ref
37
+ const layoutRef = ref<ComponentPublicInstance | null>(null)
38
+
39
+ // 配置
40
+ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
41
+ /**
42
+ * 模块业务类型 string
43
+ * 取值根据各模块配置
44
+ * 当定义为"custom"时,使用本地配置
45
+ */
46
+ businessType: 'custom',
47
+ // 布局模式
48
+ pattern: 'vertical',
49
+ // 当前已选行数据a
50
+ currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
51
+ // 当前登录租户信息
52
+ userInfo: props.userInfo,
53
+ // 明细接口 -- 接口字符串
54
+ detailApi: '/notice/purchaseNotice/noToken/queryById',
55
+ // 本地页面数据配置
56
+ localConfig: {
57
+ groups: [
58
+ {
59
+ groupName: srmI18n('i18n_field_100100', '基本信息'),
60
+ groupCode: 'baseForm',
61
+ groupType: 'head',
62
+ },
63
+ {
64
+ groupName: srmI18n('i18n_title_supplierList', '供应商列表'),
65
+ groupCode: 'purchaseNoticeSupplierList',
66
+ groupType: 'item',
67
+ },
68
+ {
69
+ groupName: srmI18n('i18n_title_attachmentList', '附件列表'),
70
+ groupCode: 'purchaseAttachmentList',
71
+ groupType: 'item',
72
+ },
73
+ ],
74
+ formFields: [
75
+ {
76
+ groupCode: 'baseForm',
77
+ fieldType: 'input',
78
+ fieldLabel: srmI18n('i18n_field_noticeNumber', '通知单号'),
79
+ fieldName: 'noticeNumber',
80
+ disabled: true,
81
+ },
82
+ {
83
+ groupCode: 'baseForm',
84
+ fieldType: 'input',
85
+ fieldLabel: srmI18n('i18n_field_subject', '标题'),
86
+ placeholder: srmI18n('i18n_title_pleaseEnterTitle', '请输入标题'),
87
+ fieldName: 'noticeTitle',
88
+ required: '1',
89
+ },
90
+ {
91
+ groupCode: 'baseForm',
92
+ fieldType: 'select',
93
+ fieldLabel: srmI18n('i18n_field_msgCategory', '类型'),
94
+ fieldName: 'noticeType',
95
+ placeholder: srmI18n('i18n_title_selectType', '请选择类型'),
96
+ dictCode: 'srmNoticeType',
97
+ required: '1',
98
+ },
99
+ {
100
+ groupCode: 'baseForm',
101
+ fieldType: 'select',
102
+ fieldLabel: srmI18n('i18n_field_publicScope', '公开范围'),
103
+ fieldName: 'noticeScope',
104
+ placeholder: srmI18n('i18n_title_pleaseSelectThePublicScope', '请选择公开范围'),
105
+ dictCode: 'srmNoticeScope',
106
+ required: '1',
107
+ },
108
+ {
109
+ groupCode: 'baseForm',
110
+ fieldType: 'date',
111
+ fieldLabel: srmI18n('i18n_field_effectiveTime', '生效时间'),
112
+ fieldName: 'effectiveTime',
113
+ dataFormat: 'YYYY-MM-DD HH:mm:ss',
114
+ required: '1',
115
+ },
116
+ {
117
+ groupCode: 'baseForm',
118
+ fieldType: 'date',
119
+ fieldLabel: srmI18n('i18n_field_expiryTime', '失效时间'),
120
+ fieldName: 'expiryTime',
121
+ dataFormat: 'YYYY-MM-DD HH:mm:ss',
122
+ required: '1',
123
+ },
124
+ {
125
+ groupCode: 'baseForm',
126
+ fieldType: 'switch',
127
+ fieldLabel: srmI18n('i18n_title_isPlacedTop', '是否置顶'),
128
+ fieldName: 'top',
129
+ },
130
+ {
131
+ groupCode: 'baseForm',
132
+ fieldType: 'textArea',
133
+ fieldLabel: '',
134
+ fieldName: 'noticeContent',
135
+ },
136
+ ],
137
+ itemColumns: [
138
+ { field: 'toElsAccount', groupCode: 'purchaseNoticeSupplierList', fieldType: 'input', title: srmI18n('i18n_title_supplierELSAccount', '供应商ELS账号'), width: 200 },
139
+ { field: 'supplierCode', groupCode: 'purchaseNoticeSupplierList', fieldType: 'input', title: srmI18n('i18n_massProdHead88b_supplierErpCode', '供应商ERP编码'), width: 200 },
140
+ { field: 'supplierName', groupCode: 'purchaseNoticeSupplierList', fieldType: 'input', title: srmI18n('i18n_massProdHeade95_supplierName', '供应商名称'), width: 200 },
141
+ { field: 'fileName', groupCode: 'purchaseAttachmentList', fieldType: 'input', title: srmI18n('i18n_title_fileName', '文件名称'), width: 150 },
142
+ { field: 'createBy', groupCode: 'purchaseAttachmentList', fieldType: 'input', title: srmI18n('i18n_title_uploader', '上传方'), width: 150 },
143
+ { field: 'updateTime', groupCode: 'purchaseAttachmentList', fieldType: 'input', title: srmI18n('i18n_title_uploadTime', '上传时间'), width: 300 },
144
+ ],
145
+ },
146
+ })
147
+ </script>