@qqt-product/system 0.0.2 → 0.0.17

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 (179) hide show
  1. package/dist/index.es.js +53481 -10448
  2. package/dist/index.umd.js +94 -22
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2881 -0
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2874 -0
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2882 -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 +2867 -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 +2867 -0
  12. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2879 -0
  13. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +38 -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/QPermissionDataAuth.vue.d.ts +387 -3
  18. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2875 -0
  19. package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
  20. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2867 -0
  21. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2890 -0
  22. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
  23. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
  24. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +222 -28
  25. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
  26. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
  27. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +32 -7
  28. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
  29. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
  30. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +25 -4
  31. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
  32. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
  33. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
  34. package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
  35. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
  36. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1208 -0
  37. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
  38. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
  39. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
  40. package/dist/lib/components/index.d.ts +2 -2
  41. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2866 -0
  42. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2875 -0
  43. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
  44. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
  45. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
  46. package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
  47. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
  48. package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
  49. package/dist/style.css +1 -1
  50. package/dist/vite-env.d.ts +13 -13
  51. package/package.json +24 -11
  52. package/.eslintignore +0 -4
  53. package/.eslintrc.cjs +0 -22
  54. package/.prettierignore +0 -4
  55. package/.prettierrc.cjs +0 -41
  56. package/.vscode/extensions.json +0 -3
  57. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
  58. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
  59. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
  60. package/dist/vite.svg +0 -1
  61. package/index.html +0 -13
  62. package/public/vite.svg +0 -1
  63. package/src/App.vue +0 -8
  64. package/src/lib/components/QAccountList/index.ts +0 -6
  65. package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -191
  66. package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -241
  67. package/src/lib/components/QAccountList/src/QAccountList.vue +0 -530
  68. package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
  69. package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
  70. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -137
  71. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
  72. package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
  73. package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
  74. package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
  75. package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
  76. package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
  77. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -166
  78. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
  79. package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
  80. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
  81. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -124
  82. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
  83. package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
  84. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
  85. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -196
  86. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -122
  87. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
  88. package/src/lib/components/QI18nList/index.ts +0 -6
  89. package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
  90. package/src/lib/components/QI18nList/src/QI18nList.vue +0 -361
  91. package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
  92. package/src/lib/components/QImChatGroupList/index.ts +0 -6
  93. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -94
  94. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
  95. package/src/lib/components/QMqRecordList/index.ts +0 -6
  96. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -105
  97. package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
  98. package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
  99. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
  100. package/src/lib/components/QPermissionDataList/index.ts +0 -6
  101. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
  102. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -221
  103. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -117
  104. package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
  105. package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
  106. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
  107. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -244
  108. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -163
  109. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
  110. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
  111. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -85
  112. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
  113. package/src/lib/components/QQuartzJobList/index.ts +0 -6
  114. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -263
  115. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
  116. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
  117. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
  118. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
  119. package/src/lib/components/QRoleList/index.ts +0 -6
  120. package/src/lib/components/QRoleList/src/QRoleList.vue +0 -288
  121. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
  122. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
  123. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
  124. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
  125. package/src/lib/components/QRoleList/src/useConfigData.ts +0 -33
  126. package/src/lib/components/QSupplierAccountList/index.ts +0 -6
  127. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
  128. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -302
  129. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
  130. package/src/lib/components/QUsageList/index.ts +0 -6
  131. package/src/lib/components/QUsageList/src/QUsageList.vue +0 -82
  132. package/src/lib/components/QUsageList/src/useConfigData.ts +0 -20
  133. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
  134. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
  135. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
  136. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
  137. package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
  138. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1807
  139. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
  140. package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
  141. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
  142. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
  143. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
  144. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
  145. package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
  146. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
  147. package/src/lib/components/QcustomConfigList/index.ts +0 -6
  148. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -268
  149. package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
  150. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
  151. package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
  152. package/src/lib/components/QcustomConfigList/style/index.less +0 -3
  153. package/src/lib/components/QsysConfigList/index.ts +0 -6
  154. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -125
  155. package/src/lib/components/QsysConfigList/src/types.ts +0 -1
  156. package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
  157. package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
  158. package/src/lib/components/QsysConfigList/style/index.less +0 -3
  159. package/src/lib/components/index.ts +0 -78
  160. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
  161. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -143
  162. package/src/lib/components/integratedNodesList/src/index.vue +0 -136
  163. package/src/lib/components/integratedReportList/src/index.vue +0 -86
  164. package/src/lib/components/integratedReportSearchList/src/index.vue +0 -66
  165. package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -50
  166. package/src/lib/components/loginLogList/src/index.vue +0 -57
  167. package/src/lib/components/loginSupplierLogList/src/index.vue +0 -63
  168. package/src/lib/components/operateLogList/src/index.vue +0 -57
  169. package/src/lib/index.ts +0 -15
  170. package/src/lib/utils/constant.ts +0 -1
  171. package/src/lib/utils/global.hook.ts +0 -337
  172. package/src/lib/utils/global.types.ts +0 -49
  173. package/src/lib/utils/regexp.ts +0 -143
  174. package/src/main.ts +0 -11
  175. package/src/vite-env.d.ts +0 -13
  176. package/tsconfig.json +0 -24
  177. package/tsconfig.node.json +0 -9
  178. package/vite.config.ts +0 -61
  179. /package/dist/{index.es.d.ts → index.d.ts} +0 -0
@@ -1,122 +0,0 @@
1
- <template>
2
- <q-list-layout ref="listLayoutRef" :pageData="pageData" :apiUrls="apiUrls" />
3
- </template>
4
- <script setup lang="ts">
5
- import { reactive, ref, inject } from 'vue'
6
- const listLayoutRef = ref()
7
- const emit = defineEmits(['create', 'detail', 'edit', 'delete', 'publish'])
8
- const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
9
- if (i18nKey) {
10
- if (account) {
11
- return account + defaultValue
12
- }
13
- return defaultValue
14
- }
15
- return defaultValue
16
- })
17
- const apiUrls = {
18
- list: '/news/elsTenantPortalNews/list',
19
- columnsCode: 'elsTenantPortalNewsList',
20
- }
21
- const pageData = reactive({
22
- statusConfig: {
23
- show: false,
24
- },
25
- optColumn: {
26
- attrs: {},
27
- extend: {},
28
- optColumnList: [
29
- {
30
- type: 'view',
31
- title: srmI18n('i18n_title_view', '查看'),
32
- click: ({ row }) => {
33
- emit('detail', row)
34
- },
35
- },
36
- {
37
- type: 'edit',
38
- title: srmI18n('i18n_title_edit', '编辑'),
39
- click: ({ row }) => {
40
- emit('edit', row)
41
- },
42
- disabled: ({ row }) => row.status == '1',
43
- },
44
- {
45
- type: 'delete',
46
- title: '删除',
47
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
- click: ({ row }: any) => {
49
- emit('delete', row)
50
- },
51
- },
52
- {
53
- type: 'publish',
54
- title: srmI18n('i18n_title_publish', '发布'),
55
- disabled: ({ row }) => row.status == '1',
56
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
- click: ({ row }: any) => {
58
- emit('publish', row)
59
- },
60
- },
61
- ],
62
- },
63
- buttonConfig: {
64
- attrs: {},
65
- extend: {},
66
- buttons: [
67
- {
68
- label: srmI18n('i18n_title_add', '新增'),
69
- icon: {
70
- type: 'icon-Q-add',
71
- },
72
- type: 'add',
73
- click: () => {
74
- emit('create')
75
- },
76
- },
77
- {
78
- label: srmI18n('i18n_title_listCustom', '列自定义'),
79
- icon: {
80
- type: 'icon-Q-setting',
81
- },
82
- type: 'setting',
83
- },
84
- {
85
- label: srmI18n('i18n_title_helpText', '帮助说明'),
86
- icon: {
87
- type: 'icon-Q-help-text',
88
- },
89
- type: 'help-text',
90
- },
91
- {
92
- label: srmI18n('i18n_title_attachment', '说明附件'),
93
- icon: {
94
- type: 'icon-Q-attachment-text',
95
- },
96
- type: 'attachment-text',
97
- },
98
- ],
99
- },
100
- queryConfig: {
101
- attrs: {},
102
- extend: {},
103
- form: [
104
- {
105
- type: 'input',
106
- label: '关键字',
107
- fieldName: 'keyWord',
108
- placeholder: '请输入新闻标题、新闻简介',
109
- },
110
- ],
111
- formState: {},
112
- },
113
- pagerConfig: {},
114
- })
115
- const refresh = () => {
116
- listLayoutRef.value.fetchListData()
117
- }
118
- defineExpose({
119
- refresh,
120
- })
121
- </script>
122
- <style scoped></style>
@@ -1,20 +0,0 @@
1
- import { shallowRef, ref } from 'vue'
2
- // import type { MapObjectNoneType } from './types'
3
- // import { VxeTableInstance } from 'vxe-table'
4
- // import type {}
5
- export function useConfigData() {
6
- //响应
7
-
8
- const apiUrls = shallowRef({
9
- list: '/news/elsTenantPortalNews/list',
10
- columnsCode: 'elsTenantPortalNewsList',
11
- add: '/news/elsTenantPortalNews/add',
12
- delete: '/news/elsTenantPortalNews/delete',
13
- publish: '/news/elsTenantPortalNews/publish',
14
- })
15
- const uploadShow = shallowRef<boolean>(false)
16
- const showEditPage = shallowRef<boolean>(false)
17
- const currentEditRow = ref({})
18
- const listLayoutRef = ref()
19
- return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
20
- }
@@ -1,6 +0,0 @@
1
- import QI18nList from './src/QI18nList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QI18nList)
5
-
6
- export { QI18nList }
@@ -1,141 +0,0 @@
1
- <template>
2
- <vxe-modal v-model="showModal" :width="800" :title="modalTitle" :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="国际化key" field="i18nKey" span="24">
7
- <template #default="{ data }">
8
- <vxe-input :disabled="true" v-model="data.i18nKey" type="text" placeholder="请输入国际化key" clearable></vxe-input>
9
- </template>
10
- </vxe-form-item>
11
-
12
- <vxe-form-item title="中文内容" field="chinese" span="24">
13
- <template #default="{ data }">
14
- <vxe-input :disabled="true" v-model="data.chinese" type="text" placeholder="请输入中文内容" clearable></vxe-input>
15
- </template>
16
- </vxe-form-item>
17
-
18
- <vxe-form-item title="英文内容" field="english" span="24">
19
- <template #default="{ data }">
20
- <vxe-input v-model="data.english" type="text" placeholder="请输入英文内容" clearable></vxe-input>
21
- </template>
22
- </vxe-form-item>
23
-
24
- <vxe-form-item title="繁体中文" field="traditionalChinese" span="24">
25
- <template #default="{ data }">
26
- <vxe-input v-model="data.traditionalChinese" type="text" placeholder="请输入繁体中文" clearable></vxe-input>
27
- </template>
28
- </vxe-form-item>
29
-
30
- <vxe-form-item title="法语" field="french" span="24">
31
- <template #default="{ data }">
32
- <vxe-input v-model="data.french" type="text" placeholder="请输入法语" clearable></vxe-input>
33
- </template>
34
- </vxe-form-item>
35
-
36
- <vxe-form-item title="德语" field="german" span="24">
37
- <template #default="{ data }">
38
- <vxe-input v-model="data.german" type="text" placeholder="请输入德语" clearable></vxe-input>
39
- </template>
40
- </vxe-form-item>
41
- <vxe-form-item title="越南" field="vietnamese" span="24">
42
- <template #default="{ data }">
43
- <vxe-input v-model="data.vietnamese" type="text" placeholder="请输入越南" clearable></vxe-input>
44
- </template>
45
- </vxe-form-item>
46
- </vxe-form-gather>
47
- <vxe-form-item align="center" span="24">
48
- <template #default>
49
- <vxe-button content="取消" @click="hideModal"></vxe-button>
50
- <vxe-button type="submit" status="primary" content="保存"></vxe-button>
51
- </template>
52
- </vxe-form-item>
53
- </vxe-form>
54
- </template>
55
- </vxe-modal>
56
- </template>
57
- <script lang="ts">
58
- import { defineComponent, reactive, ref, inject } from 'vue'
59
- import { VXETable, VxeFormEvents, VxeFormPropTypes } from 'vxe-table'
60
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
61
-
62
- export default defineComponent({
63
- name: 'QI18nForm',
64
- props: {
65
- title: {
66
- type: String,
67
- default: '',
68
- },
69
- currentRow: {
70
- type: Object,
71
- },
72
-
73
- itemTypeList: {
74
- type: Object,
75
- },
76
- },
77
- setup(props, { emit }) {
78
- const qHttp = inject(INJECT_HTTP) as HttpClient
79
- const modalTitle = ref(props.title)
80
- const showModal = ref(true)
81
- const hideModal = () => {
82
- emit('hide', false)
83
- }
84
- const itemInfo = reactive({
85
- loading: false,
86
- formData: {
87
- i18nKey: '',
88
- chinese: '',
89
- english: '',
90
- traditionalChinese: '',
91
- french: '',
92
- german: '',
93
- vietnamese: '',
94
- },
95
- formRules: {
96
- i18nKey: [{ required: true, message: '当前内容为必填项' }],
97
- chinese: [{ required: true, message: '当前内容为必填项' }],
98
- english: [{ required: true, message: '当前内容为必填项' }],
99
- traditionalChinese: [{ required: true, message: '当前内容为必填项' }],
100
- french: [{ required: true, message: '当前内容为必填项' }],
101
- german: [{ required: true, message: '当前内容为必填项' }],
102
- vietnamese: [{ required: true, message: '当前内容为必填项' }],
103
- // defaultValue: [{ required: true, message: '请输入默认值' }],
104
- } as VxeFormPropTypes.Rules,
105
- })
106
- itemInfo.formData = Object.assign({}, itemInfo.formData, props.currentRow)
107
- // 保存
108
-
109
- const save = async () => {
110
- itemInfo.loading = true
111
- let params: MapObjectNoneType = { ...itemInfo.formData }
112
-
113
- const res = await qHttp.post({ url: '/base/i18n/editNew', data: params })
114
- if (res && res.success) {
115
- VXETable.modal.message({ content: res.message, status: 'success' })
116
- hideModal()
117
- emit('afterHandleSaveSuccess')
118
- } else {
119
- VXETable.modal.message({ content: res.message, status: 'error' })
120
- }
121
- itemInfo.loading = false
122
- }
123
- const submitEvent: VxeFormEvents.Submit = () => {
124
- save()
125
- }
126
- return {
127
- modalTitle,
128
- showModal,
129
- hideModal,
130
- itemInfo,
131
- save,
132
- submitEvent,
133
- }
134
- },
135
- })
136
- </script>
137
- <style lang="scss" scoped>
138
- :deep(.vxe-form--gather) {
139
- padding: 20px 0px;
140
- }
141
- </style>
@@ -1,361 +0,0 @@
1
- <template>
2
- <div style="height: 100%">
3
- <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
-
5
- <!--新增-->
6
- <vxe-modal v-model="addZhWord" title="添加词条" type="confirm" show-footer @confirm="addZhWordHandle('confirm')" @cancel="addZhWordHandle('cancel')">
7
- <vxe-form title-colon title-align="right" title-width="160" :data="addZhWordFrom" :loading="addZhWordLoading">
8
- <vxe-form-gather span="24">
9
- <vxe-form-item title="词条类型" field="translateType" span="24">
10
- <template #default="{ data }">
11
- <q-select style="width: 200px" v-model:value="data.translateType" dict-code="translateType"></q-select>
12
- </template>
13
- </vxe-form-item>
14
- <vxe-form-item title="中文内容" field="i18nValue" span="24">
15
- <template #default="{ data }">
16
- <vxe-input v-model="data.i18nValue" type="text" placeholder="请输入中文内容" clearable></vxe-input>
17
- </template>
18
- </vxe-form-item>
19
- </vxe-form-gather>
20
- </vxe-form>
21
- </vxe-modal>
22
-
23
- <!--翻译-->
24
- <vxe-modal v-model="translateVisible" title="翻译" type="confirm" show-footer @confirm="translateHandle('confirm')">
25
- <q-select style="width: 200px" v-model:value="languageValue" dict-code="language"></q-select>
26
- </vxe-modal>
27
-
28
- <!--编辑-->
29
- <QI18nForm v-if="showEditPage" title="编辑" :currentRow="itemInfoRow" @hide="showEditPage = false" />
30
- </div>
31
- </template>
32
-
33
- <script lang="ts">
34
- //JS
35
- import { defineComponent, reactive, ref, inject, nextTick } from 'vue'
36
- //hook
37
- import { useConfigData } from './useConfigData'
38
- //组件
39
- import { Modal, message } from '@qqt-product/ui'
40
- import QI18nForm from './QI18nForm.vue'
41
- //ts
42
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
43
-
44
- export default defineComponent({
45
- name: 'QI18nList',
46
- components: {
47
- QI18nForm,
48
- },
49
- props: {
50
- userInfo: {
51
- type: Object,
52
- defalut: () => {
53
- return {}
54
- },
55
- },
56
- },
57
- setup() {
58
- //data-hook
59
- const { itemInfoRow, languageValue, translateVisible, showEditPage, apiUrls, addZhWord, addZhWordFrom, addZhWordLoading } = useConfigData()
60
- //data
61
- const qHttp = inject(INJECT_HTTP) as HttpClient
62
- const pageData = reactive({
63
- statusConfig: {
64
- show: false,
65
- },
66
- optColumn: {
67
- attrs: {},
68
- extend: {},
69
- optColumnList: [
70
- { authorityCode: 'i18n#I18n:editNew', type: 'edit', title: '编辑', click: handleEdit },
71
- {
72
- type: 'delete',
73
- title: '删除',
74
- authorityCode: 'i18n#I18n:delete',
75
- // args: {
76
- // url: apiUrls.value.deleteWord,
77
- // },
78
- click: I18nRowDel,
79
- // allow: allowDelete,
80
- },
81
- ],
82
- },
83
- buttonConfig: {
84
- attrs: {},
85
- extend: {},
86
- buttons: [
87
- {
88
- authorityCode: 'i18n#I18n:add',
89
- label: '新增',
90
- icon: {
91
- type: 'icon-Q-add',
92
- },
93
- attrs: {
94
- type: 'primary',
95
- },
96
- click: addRow,
97
- },
98
- {
99
- label: '导入',
100
- icon: {
101
- type: 'icon-Q-import',
102
- },
103
- type: 'import',
104
- args: {
105
- url: '/base/i18n/importExcel',
106
- excelCode: 'i18n',
107
- },
108
- },
109
- {
110
- label: '导出',
111
- icon: {
112
- type: 'icon-Q-export',
113
- },
114
- args: {
115
- url: '/base/i18n/exportXls',
116
- },
117
- type: 'export',
118
- },
119
- { authorityCode: 'i18n#I18n:delRedisData', label: '清除缓存', click: delRedis },
120
- { authorityCode: 'i18n#I18n:delRedisData', label: '清除菜单缓存', click: delPerRedis },
121
- { authorityCode: 'i18n#I18n:translateData', label: '翻译', click: translate },
122
- { authorityCode: 'i18n#I18n:translateAll', label: '一键翻译', click: translateAll },
123
- {
124
- label: '列自定义',
125
- icon: {
126
- type: 'icon-Q-setting',
127
- },
128
- type: 'setting',
129
- },
130
- {
131
- label: '帮助说明',
132
- icon: {
133
- type: 'icon-Q-help-text',
134
- },
135
- type: 'help-text',
136
- },
137
- {
138
- label: '附件说明',
139
- icon: {
140
- type: 'icon-Q-attachment-text',
141
- },
142
- type: 'attachment-text',
143
- },
144
- ],
145
- },
146
- queryConfig: {
147
- attrs: {},
148
- extend: {},
149
- form: [
150
- {
151
- type: 'input',
152
- label: '国际化key',
153
- fieldName: 'i18nKey',
154
- placeholder: '请输入国际化key',
155
- },
156
- {
157
- type: 'input',
158
- label: '国际化名称',
159
- fieldName: 'chinese',
160
- placeholder: '请输入国际化名称',
161
- },
162
- ],
163
- formState: {
164
- i18nKey: '',
165
- chinese: '',
166
- },
167
- },
168
- pagerConfig: {},
169
- })
170
- const listLayoutRef = ref()
171
-
172
- function delRedis() {
173
- Modal.confirm({
174
- title: '提示',
175
- content: '确认清除缓存?',
176
- onOk() {
177
- listLayoutRef.value.loading = true
178
- qHttp
179
- .get({
180
- url: apiUrls.value.delRedisData,
181
- })
182
- .then((res) => {
183
- if (res.success) {
184
- message.success(res.message)
185
- listLayoutRef.value.fetchListData()
186
- } else {
187
- message.warning(res.message)
188
- }
189
- })
190
- .finally(() => {
191
- listLayoutRef.value.loading = true
192
- })
193
- },
194
- })
195
- }
196
-
197
- function delPerRedis() {
198
- Modal.confirm({
199
- title: '提示',
200
- content: '确认清除缓存?',
201
- onOk() {
202
- listLayoutRef.value.loading = true
203
- qHttp
204
- .get({
205
- url: apiUrls.value.delPerRedis,
206
- })
207
- .then((res) => {
208
- if (res.success) {
209
- message.success(res.message)
210
- listLayoutRef.value.fetchListData()
211
- } else {
212
- message.warning(res.message)
213
- }
214
- })
215
- .finally(() => {
216
- listLayoutRef.value.loading = true
217
- })
218
- },
219
- })
220
- }
221
-
222
- function translateAll() {
223
- listLayoutRef.value.loading = true
224
- qHttp
225
- .get({
226
- url: apiUrls.value.translateAll,
227
- })
228
- .then((res) => {
229
- listLayoutRef.value.loading = false
230
- if (res.success) {
231
- // this.$message.success(res.message)
232
- message.success('操作成功')
233
- } else {
234
- // this.$message.warning(res.message)
235
- message.warning('操作失败')
236
- }
237
- })
238
- .catch(() => {
239
- listLayoutRef.value.loading = false
240
- })
241
- }
242
-
243
- function addRow() {
244
- addZhWord.value = true
245
- }
246
- function addZhWordHandle(handleType: string) {
247
- if (handleType == 'confirm') {
248
- if (!addZhWordFrom.value.i18nValue && !addZhWordFrom.value.i18nValue) {
249
- message.error('请填写词条类型和中文内容')
250
- } else {
251
- listLayoutRef.value.loading = true
252
- qHttp
253
- .post({
254
- url: apiUrls.value.add,
255
- data: {
256
- translateType: addZhWordFrom.value.translateType,
257
- i18nValue: addZhWordFrom.value.i18nValue,
258
- },
259
- })
260
- .then((res) => {
261
- listLayoutRef.value.loading = false
262
- if (res.success) {
263
- // this.$message.success(res.message)
264
- message.success('操作成功')
265
- listLayoutRef.value.fetchListData()
266
- } else {
267
- // this.$message.warning(res.message)
268
- message.warning('操作失败')
269
- }
270
- })
271
- .catch(() => {
272
- listLayoutRef.value.loading = false
273
- })
274
- }
275
- } else {
276
- addZhWordFrom.value = {
277
- translateType: '',
278
- i18nValue: '',
279
- }
280
- }
281
- }
282
-
283
- function I18nRowDel({ row = {} as MapObjectNoneType }) {
284
- Modal.confirm({
285
- title: '提示',
286
- content: '是否需要删除行?',
287
- onOk() {
288
- listLayoutRef.value.loading = true
289
- qHttp
290
- .get({
291
- url: apiUrls.value.deleteWord,
292
- params: { i18nKey: row.i18nKey },
293
- })
294
- .then((res) => {
295
- if (res.success) {
296
- message.success(res.message)
297
- listLayoutRef.value.fetchListData()
298
- } else {
299
- message.warning(res.message)
300
- }
301
- })
302
- .finally(() => {
303
- listLayoutRef.value.loading = true
304
- })
305
- },
306
- })
307
- }
308
-
309
- function translate() {
310
- translateVisible.value = true
311
- }
312
-
313
- function translateHandle(handleType: string) {
314
- if (handleType == 'confirm') {
315
- if (languageValue.value == 'zh') {
316
- message.warning('中文不需要翻译!')
317
- } else {
318
- listLayoutRef.value.loading = true
319
- qHttp
320
- .get({
321
- url: apiUrls.value.translateData,
322
- params: { to: languageValue.value },
323
- })
324
- .then((res) => {
325
- if (res.success) {
326
- message.success('操作成功!')
327
- listLayoutRef.value.fetchListData()
328
- }
329
- })
330
- .finally(() => {
331
- listLayoutRef.value.loading = false
332
- translateVisible.value = false
333
- })
334
- }
335
- }
336
- }
337
-
338
- function handleEdit({ row = {} as MapObjectNoneType }) {
339
- itemInfoRow.value = row
340
- nextTick(() => {
341
- showEditPage.value = true
342
- })
343
- }
344
-
345
- return {
346
- itemInfoRow,
347
- translateHandle,
348
- languageValue,
349
- translateVisible,
350
- addZhWordHandle,
351
- showEditPage,
352
- apiUrls,
353
- pageData,
354
- listLayoutRef,
355
- addZhWord,
356
- addZhWordFrom,
357
- addZhWordLoading,
358
- }
359
- },
360
- })
361
- </script>
@@ -1,37 +0,0 @@
1
- import { shallowRef, reactive, ref } from 'vue'
2
- // import type { MapObjectNoneType } from './types'
3
- // import { VxeTableInstance } from 'vxe-table'
4
- // import type {}
5
- export function useConfigData() {
6
- //响应
7
-
8
- const apiUrls = shallowRef({
9
- list: '/base/i18n/listAll',
10
- columnsCode: 'i18nListAll',
11
- delete: '/base/i18n/delete',
12
- deleteWord: '/base/i18n/deleteWord',
13
- add: '/base/i18n/add',
14
- delRedisData: '/base/i18n/delRedisData',
15
- delPerRedis: '/account/permission/delPerRedisData',
16
- translateData: '/base/i18n/translateData',
17
- translateAll: '/base/i18n/translateAll',
18
- deleteBatch: '/base/i18n/deleteBatch',
19
- importExcelUrl: '/base/i18n/importExcel',
20
- excelCode: 'i18n',
21
- exportXlsUrl: '/base/i18n/exportXls',
22
- })
23
- const uploadShow = shallowRef<boolean>(false)
24
- const showEditPage = shallowRef<boolean>(false)
25
- const addZhWord = shallowRef<boolean>(false)
26
- const currentEditRow = ref({})
27
- const listLayoutRef = ref()
28
- const addZhWordFrom = ref({
29
- translateType: '',
30
- i18nValue: '',
31
- })
32
- const languageValue = ref('en')
33
- const addZhWordLoading = shallowRef<boolean>(false)
34
- const translateVisible = shallowRef<boolean>(false)
35
- const itemInfoRow = ref({})
36
- return { itemInfoRow, translateVisible, languageValue, addZhWordLoading, addZhWordFrom, addZhWord, apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
37
- }
@@ -1,6 +0,0 @@
1
- import QImChatGroupList from './src/QImChatGroupList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QImChatGroupList)
5
-
6
- export { QImChatGroupList }