@qqt-product/system 0.0.16 → 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 (148) hide show
  1. package/dist/index.es.js +9595 -9168
  2. package/dist/index.umd.js +34 -35
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +15 -12
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +13 -10
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +16 -12
  6. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +12 -9
  7. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +12 -9
  8. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +15 -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 +15 -12
  12. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +12 -9
  13. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +17 -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 +9 -0
  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 +12 -9
  22. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +15 -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,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,365 +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" width="600" show-footer @confirm="addZhWordHandle('confirm')" @cancel="addZhWordHandle('cancel')">
7
- <vxe-form title-colon title-align="right" title-width="120" :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: 100%" 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 style="width: 100%" v-model="data.i18nValue" type="text" placeholder="请输入中文内容" clearable></vxe-input>
17
- <!-- <a-input style="width: 200px" v-model:value="data.i18nValue" placeholder="请输入中文内容" clearable /> -->
18
- </template>
19
- </vxe-form-item>
20
- </vxe-form-gather>
21
- </vxe-form>
22
- </vxe-modal>
23
-
24
- <!--翻译-->
25
- <vxe-modal v-model="translateVisible" title="翻译" type="confirm" show-footer @confirm="translateHandle('confirm')">
26
- <q-select style="width: 200px" v-model:value="languageValue" dict-code="language"></q-select>
27
- </vxe-modal>
28
-
29
- <!--编辑-->
30
- <QI18nForm v-if="showEditPage" title="编辑" :currentRow="itemInfoRow" @hide="showEditPage = false" />
31
- </div>
32
- </template>
33
-
34
- <script lang="ts">
35
- //JS
36
- import { defineComponent, reactive, ref, inject, nextTick } from 'vue'
37
- //hook
38
- import { useConfigData } from './useConfigData'
39
- //组件
40
- import { Modal, message } from '@qqt-product/ui'
41
- import QI18nForm from './QI18nForm.vue'
42
- //ts
43
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
44
-
45
- export default defineComponent({
46
- name: 'QI18nList',
47
- components: {
48
- QI18nForm,
49
- },
50
- props: {
51
- userInfo: {
52
- type: Object,
53
- defalut: () => {
54
- return {}
55
- },
56
- },
57
- },
58
- setup(props) {
59
- //data-hook
60
- const { itemInfoRow, languageValue, translateVisible, showEditPage, apiUrls, addZhWord, addZhWordFrom, addZhWordLoading } = useConfigData()
61
- //data
62
- const qHttp = inject(INJECT_HTTP) as HttpClient
63
- const pageData = reactive({
64
- statusConfig: {
65
- show: false,
66
- },
67
- optionConfig: {
68
- attrs: {},
69
- extend: {},
70
- options: [
71
- { authorityCode: 'i18n#I18n:editNew', type: 'edit', title: '编辑', click: handleEdit },
72
- {
73
- type: 'delete',
74
- title: '删除',
75
- authorityCode: 'i18n#I18n:delete',
76
- // args: {
77
- // url: apiUrls.value.deleteWord,
78
- // },
79
- click: I18nRowDel,
80
- // allow: allowDelete,
81
- },
82
- ],
83
- },
84
- buttonConfig: {
85
- attrs: {},
86
- extend: {},
87
- buttons: [
88
- {
89
- authorityCode: 'i18n#I18n:add',
90
- label: '新增',
91
- icon: {
92
- type: 'icon-Q-add',
93
- },
94
- attrs: {
95
- type: 'primary',
96
- },
97
- click: addRow,
98
- },
99
- {
100
- label: '导入',
101
- icon: {
102
- type: 'icon-Q-import',
103
- },
104
- type: 'import',
105
- args: {
106
- url: '/base/i18n/importExcel',
107
- excelCode: 'i18n',
108
- },
109
- },
110
- {
111
- label: '导出',
112
- icon: {
113
- type: 'icon-Q-export',
114
- },
115
- args: {
116
- url: '/base/i18n/exportXls',
117
- },
118
- type: 'export',
119
- },
120
- { authorityCode: 'i18n#I18n:delRedisData', label: '清除缓存', click: delRedis },
121
- { authorityCode: 'i18n#I18n:delRedisData', label: '清除菜单缓存', click: delPerRedis },
122
- { authorityCode: 'i18n#I18n:translateData', label: '翻译', click: translate },
123
- { authorityCode: 'i18n#I18n:translateAll', label: '一键翻译', click: translateAll },
124
- {
125
- label: '列自定义',
126
- icon: {
127
- type: 'icon-Q-setting',
128
- },
129
- type: 'setting',
130
- },
131
- {
132
- label: '帮助说明',
133
- icon: {
134
- type: 'icon-Q-help-text',
135
- },
136
- type: 'help-text',
137
- },
138
- {
139
- label: '附件说明',
140
- icon: {
141
- type: 'icon-Q-attachment-text',
142
- },
143
- type: 'attachment-text',
144
- },
145
- ],
146
- },
147
- queryConfig: {
148
- attrs: {},
149
- extend: {},
150
- form: [
151
- {
152
- type: 'input',
153
- label: '国际化key',
154
- fieldName: 'i18nKey',
155
- placeholder: '请输入国际化key',
156
- },
157
- {
158
- type: 'input',
159
- label: '国际化名称',
160
- fieldName: 'chinese',
161
- placeholder: '请输入国际化名称',
162
- },
163
- ],
164
- },
165
- pagerConfig: {},
166
- })
167
- const listLayoutRef = ref()
168
-
169
- function delRedis() {
170
- Modal.confirm({
171
- title: '提示',
172
- content: '确认清除缓存?',
173
- onOk() {
174
- listLayoutRef.value.loading = true
175
- qHttp
176
- .get({
177
- url: apiUrls.value.delRedisData,
178
- })
179
- .then((res) => {
180
- if (res.success) {
181
- message.success(res.message)
182
- listLayoutRef.value.fetchListData()
183
- } else {
184
- message.warning(res.message)
185
- }
186
- })
187
- .finally(() => {
188
- listLayoutRef.value.loading = true
189
- })
190
- },
191
- })
192
- }
193
-
194
- function delPerRedis() {
195
- Modal.confirm({
196
- title: '提示',
197
- content: '确认清除缓存?',
198
- onOk() {
199
- listLayoutRef.value.loading = true
200
- qHttp
201
- .get({
202
- url: apiUrls.value.delPerRedis,
203
- })
204
- .then((res) => {
205
- if (res.success) {
206
- message.success(res.message)
207
- listLayoutRef.value.fetchListData()
208
- } else {
209
- message.warning(res.message)
210
- }
211
- })
212
- .finally(() => {
213
- listLayoutRef.value.loading = true
214
- })
215
- },
216
- })
217
- }
218
-
219
- function translateAll() {
220
- listLayoutRef.value.loading = true
221
- qHttp
222
- .get({
223
- url: apiUrls.value.translateAll,
224
- })
225
- .then((res) => {
226
- listLayoutRef.value.loading = false
227
- if (res.success) {
228
- // this.$message.success(res.message)
229
- message.success('操作成功')
230
- } else {
231
- // this.$message.warning(res.message)
232
- message.warning('操作失败')
233
- }
234
- })
235
- .catch(() => {
236
- listLayoutRef.value.loading = false
237
- })
238
- }
239
-
240
- function addRow() {
241
- // console.log(props.userInfo?.userInfo?.elsAccount)
242
- const elsAccount = props.userInfo?.userInfo?.elsAccount
243
-
244
- if (elsAccount != '100000') {
245
- message.warning('请在平台添加词条!')
246
- return
247
- }
248
- addZhWord.value = true
249
- }
250
- function addZhWordHandle(handleType: string) {
251
- if (handleType == 'confirm') {
252
- if (!addZhWordFrom.value.i18nValue && !addZhWordFrom.value.i18nValue) {
253
- message.error('请填写词条类型和中文内容')
254
- } else {
255
- listLayoutRef.value.loading = true
256
- qHttp
257
- .post({
258
- url: apiUrls.value.add,
259
- data: {
260
- translateType: addZhWordFrom.value.translateType,
261
- i18nValue: addZhWordFrom.value.i18nValue,
262
- },
263
- })
264
- .then((res) => {
265
- listLayoutRef.value.loading = false
266
- if (res.success) {
267
- // this.$message.success(res.message)
268
- message.success('操作成功')
269
- listLayoutRef.value.fetchListData()
270
- } else {
271
- // this.$message.warning(res.message)
272
- message.warning('操作失败')
273
- }
274
- })
275
- .catch(() => {
276
- listLayoutRef.value.loading = false
277
- })
278
- }
279
- } else {
280
- addZhWordFrom.value = {
281
- translateType: '',
282
- i18nValue: '',
283
- }
284
- }
285
- }
286
-
287
- function I18nRowDel({ row = {} as MapObjectNoneType }) {
288
- Modal.confirm({
289
- title: '提示',
290
- content: '是否需要删除行?',
291
- onOk() {
292
- listLayoutRef.value.loading = true
293
- qHttp
294
- .get({
295
- url: apiUrls.value.deleteWord,
296
- params: { i18nKey: row.i18nKey },
297
- })
298
- .then((res) => {
299
- if (res.success) {
300
- message.success(res.message)
301
- listLayoutRef.value.fetchListData()
302
- } else {
303
- message.warning(res.message)
304
- }
305
- })
306
- .finally(() => {
307
- listLayoutRef.value.loading = true
308
- })
309
- },
310
- })
311
- }
312
-
313
- function translate() {
314
- translateVisible.value = true
315
- }
316
-
317
- function translateHandle(handleType: string) {
318
- if (handleType == 'confirm') {
319
- if (languageValue.value == 'zh') {
320
- message.warning('中文不需要翻译!')
321
- } else {
322
- listLayoutRef.value.loading = true
323
- qHttp
324
- .get({
325
- url: apiUrls.value.translateData,
326
- params: { to: languageValue.value },
327
- })
328
- .then((res) => {
329
- if (res.success) {
330
- message.success('操作成功!')
331
- listLayoutRef.value.fetchListData()
332
- }
333
- })
334
- .finally(() => {
335
- listLayoutRef.value.loading = false
336
- translateVisible.value = false
337
- })
338
- }
339
- }
340
- }
341
-
342
- function handleEdit({ row = {} as MapObjectNoneType }) {
343
- itemInfoRow.value = row
344
- nextTick(() => {
345
- showEditPage.value = true
346
- })
347
- }
348
-
349
- return {
350
- itemInfoRow,
351
- translateHandle,
352
- languageValue,
353
- translateVisible,
354
- addZhWordHandle,
355
- showEditPage,
356
- apiUrls,
357
- pageData,
358
- listLayoutRef,
359
- addZhWord,
360
- addZhWordFrom,
361
- addZhWordLoading,
362
- }
363
- },
364
- })
365
- </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 }
@@ -1,103 +0,0 @@
1
- <template>
2
- <div style="height: 100%">
3
- <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
- </div>
5
- </template>
6
-
7
- <script lang="ts">
8
- //JS
9
- import { defineComponent, reactive, toRefs, inject } from 'vue'
10
- //hook
11
- import { useConfigData } from './useConfigData'
12
- //ts
13
- interface layimTS {
14
- openGruopChat: (parmas: object) => void
15
- }
16
-
17
- export default defineComponent({
18
- name: 'QImChatGroupList',
19
-
20
- props: {
21
- userInfo: {
22
- type: Object,
23
- defalut: () => {
24
- return {}
25
- },
26
- },
27
- },
28
- setup() {
29
- //inject
30
- const layIM = inject('Q_APPLICATION_IM') as layimTS
31
- //data
32
- const pageData = reactive({
33
- statusConfig: {
34
- show: false,
35
- },
36
- optionConfig: {
37
- attrs: {},
38
- extend: {},
39
- options: [
40
- // { authorityCode: 'template#templateHead:edit', type: 'edit', title: '编辑', click: handleEdit, allow: allowEdit },
41
- // { authorityCode: 'template#templateHead:copyById', type: 'copyById', title: '复制', click: handleCusotmCopy },
42
- // { authorityCode: 'template#templateHead:cancel', type: 'cancel', title: '作废', click: handleCustomCancel, allow: allowCancel },
43
- {
44
- type: 'chat',
45
- title: '查看',
46
- click: handleViewChat,
47
- },
48
- ],
49
- },
50
- buttonConfig: {
51
- attrs: {},
52
- extend: {},
53
- buttons: [
54
- // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns}
55
- ],
56
- },
57
- queryConfig: {
58
- attrs: {},
59
- extend: {},
60
- form: [
61
- {
62
- type: 'input',
63
- label: '群组名称',
64
- fieldName: 'keyWord',
65
- placeholder: '请输入群组名称',
66
- },
67
- {
68
- type: 'select',
69
- label: 'IM群聊单据类型',
70
- fieldName: 'recordType',
71
- dictCode: 'ImRecordType',
72
- placeholder: '请选择单据类型',
73
- },
74
- ],
75
- },
76
- pagerConfig: {},
77
- })
78
- //data-hook
79
- const { showEditPage, apiUrls } = useConfigData()
80
- //methods
81
- // function allowDelete() {
82
- // console.log('userInfo.value?.userInfo?.elsAccount', userInfo.value?.userInfo?.elsAccount)
83
- // if (userInfo.value?.userInfo?.elsAccount != '100000') {
84
- // return true
85
- // } else {
86
- // return false
87
- // }
88
- // }
89
- //methods
90
- function handleViewChat({ row }) {
91
- let chatInfo = {
92
- groupname: row.name,
93
- avatar: row.avatar || '',
94
- id: row.id,
95
- }
96
- console.log('123123', layIM)
97
- layIM.openGruopChat(chatInfo)
98
- }
99
- return { showEditPage, apiUrls, pageData }
100
- },
101
- })
102
- </script>
103
- <style scoped></style>
@@ -1,17 +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: 'im/message/group-page',
10
- columnsCode: 'imChatGroupList',
11
- })
12
- const uploadShow = shallowRef<boolean>(false)
13
- const showEditPage = shallowRef<boolean>(false)
14
- const currentEditRow = ref({})
15
- const listLayoutRef = ref()
16
- return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
17
- }
@@ -1,6 +0,0 @@
1
- import QMqRecordList from './src/QMqRecordList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QMqRecordList)
5
-
6
- export { QMqRecordList }