@qqt-product/system 0.0.1 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/index.es.js +53240 -10634
  2. package/dist/index.umd.js +94 -21
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
  6. package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
  7. package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
  8. package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
  9. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
  10. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
  11. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
  12. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
  13. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
  14. package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
  15. package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
  16. package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
  17. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
  18. package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
  19. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
  20. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
  21. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
  22. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
  23. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
  24. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
  25. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
  26. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
  27. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
  28. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
  29. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
  30. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
  31. package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
  32. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
  33. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
  34. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
  35. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
  36. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
  37. package/dist/lib/components/index.d.ts +2 -2
  38. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
  39. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
  40. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
  41. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
  42. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
  43. package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
  44. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
  45. package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
  46. package/dist/style.css +1 -1
  47. package/dist/vite-env.d.ts +13 -13
  48. package/package.json +13 -11
  49. package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
  50. package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
  51. package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
  52. package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
  53. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
  54. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
  55. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
  56. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
  57. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
  58. package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
  59. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
  60. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
  61. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
  62. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
  63. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
  64. package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
  65. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
  66. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
  67. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
  68. package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
  69. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
  70. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
  71. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
  72. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
  73. package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
  74. package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
  75. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
  76. package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
  77. package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
  78. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
  79. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
  80. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
  81. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
  82. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
  83. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
  84. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
  85. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
  86. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
  87. package/src/lib/components/index.ts +78 -78
  88. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
  89. package/src/lib/components/integratedNodesList/src/index.vue +130 -136
  90. package/src/lib/components/integratedReportList/src/index.vue +55 -30
  91. package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
  92. package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
  93. package/src/lib/components/loginLogList/src/index.vue +51 -57
  94. package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
  95. package/src/lib/components/operateLogList/src/index.vue +46 -57
  96. package/src/vite-env.d.ts +13 -13
  97. package/tsconfig.json +24 -24
  98. package/vite.config.ts +1 -1
  99. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
  100. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
  101. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
  102. package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
  103. package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
  104. package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
  105. package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
@@ -1,137 +1,143 @@
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, inject } from 'vue'
10
- //hook
11
- import { useConfigData } from './useConfigData'
12
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
13
- import { message, Modal } from '@qqt-product/ui'
14
- import { useConigApiMethods } from '../../../utils/global.hook'
15
- export default defineComponent({
16
- name: 'QBackgroundFileTaskList',
17
- props: {
18
- userInfo: {
19
- type: Object,
20
- defalut: () => {
21
- return {}
22
- },
23
- },
24
- },
25
- setup() {
26
- //data-hook
27
- const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
28
- const qHttp = inject(INJECT_HTTP) as HttpClient
29
- const { handleExport } = useConigApiMethods(qHttp)
30
- // const { userIpnfo } = toRefs(props)
31
- // console.log('userInfos', userInfo)
32
-
33
- //data
34
- const pageData = reactive({
35
- statusConfig: {
36
- show: false,
37
- },
38
- optColumn: {
39
- attrs: {},
40
- extend: {},
41
- optColumnList: [
42
- { authorityCode: 'backgroundFileTask#BackgroundFileTask:runTask', type: 'run', title: '执行任务', click: handleRun, disabled: allowRun },
43
- {
44
- authorityCode: 'backgroundFileTask#BackgroundFileTask:downTaskFile',
45
- type: 'down',
46
- title: '下载文件',
47
- click: handleCustomDown,
48
- disabled: allowDown,
49
- },
50
- {
51
- authorityCode: 'backgroundFileTask#BackgroundFileTask:delete',
52
- type: 'delete',
53
- title: '删除',
54
- args: {
55
- url: apiUrls.value.delete,
56
- },
57
- },
58
- ],
59
- },
60
- buttonConfig: {
61
- attrs: {},
62
- extend: {},
63
- buttons: [
64
- // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns},
65
- // {label: srmI18n(`${getLangAccount()}#i18n_title_helpText`, '帮助说明'), icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText},
66
- // {label: srmI18n(`${getLangAccount()}#i18n_title_attachment`, '说明附件'), icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF}
67
- ],
68
- },
69
- queryConfig: {
70
- attrs: {},
71
- extend: {},
72
- form: [],
73
- formState: {},
74
- },
75
- pagerConfig: {},
76
- })
77
- //methods
78
-
79
- function allowRun({ row = {} as MapObjectNoneType }) {
80
- return '0' !== row.taskStatus
81
- }
82
-
83
- function handleRun({ row = {} as MapObjectNoneType }) {
84
- if ('0' !== row.taskStatus) {
85
- message.warning('当前状态不允许执行文件任务')
86
- return
87
- }
88
- Modal.confirm({
89
- title: '执行文件任务',
90
- content: '是否执行文件任务?',
91
- onOk() {
92
- listLayoutRef.value.loading = true
93
- qHttp
94
- .post({
95
- url: apiUrls.value.runTask + '/' + row.id,
96
- })
97
- .then((res) => {
98
- if (res.success) {
99
- listLayoutRef.value.fetchListData()
100
- message.success(res.message)
101
- } else {
102
- message.warning(res.message)
103
- }
104
- })
105
- .finally(() => {
106
- listLayoutRef.value.loading = true
107
- })
108
- },
109
- })
110
- }
111
-
112
- function allowDown({ row = {} as MapObjectNoneType }) {
113
- return '1' !== row.taskStatus
114
- }
115
- function handleCustomDown({ row = {} as MapObjectNoneType }) {
116
- handleExport({
117
- exportXlsUrl: apiUrls.value.downTaskFile + '/' + row.id,
118
- type: 'xls',
119
- fileName: row.taskName,
120
- actionType: 'get',
121
- setPostParms: () => {
122
- return {}
123
- },
124
- berforCallback: () => {
125
- listLayoutRef.value.loading = true
126
- },
127
- afterCallback: () => {
128
- listLayoutRef.value.loading = false
129
- },
130
- })
131
- }
132
-
133
- return { listLayoutRef, showEditPage, apiUrls, pageData }
134
- },
135
- })
136
- </script>
137
- <style scoped></style>
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, inject } from 'vue'
10
+ //hook
11
+ import { useConfigData } from './useConfigData'
12
+ import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
13
+ import { message, Modal } from '@qqt-product/ui'
14
+ import { useConigApiMethods } from '../../../utils/global.hook'
15
+ export default defineComponent({
16
+ name: 'QBackgroundFileTaskList',
17
+ props: {
18
+ userInfo: {
19
+ type: Object,
20
+ defalut: () => {
21
+ return {}
22
+ },
23
+ },
24
+ },
25
+ setup() {
26
+ //data-hook
27
+ const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
28
+ const qHttp = inject(INJECT_HTTP) as HttpClient
29
+ const { handleExport } = useConigApiMethods(qHttp)
30
+ // const { userIpnfo } = toRefs(props)
31
+ // console.log('userInfos', userInfo)
32
+
33
+ //data
34
+ const pageData = reactive({
35
+ statusConfig: {
36
+ show: false,
37
+ },
38
+ optionConfig: {
39
+ attrs: {},
40
+ extend: {},
41
+ options: [
42
+ { authorityCode: 'backgroundFileTask#BackgroundFileTask:runTask', type: 'run', title: '执行任务', click: handleRun, disabled: allowRun },
43
+ {
44
+ authorityCode: 'backgroundFileTask#BackgroundFileTask:downTaskFile',
45
+ type: 'down',
46
+ title: '下载文件',
47
+ click: handleCustomDown,
48
+ disabled: allowDown,
49
+ },
50
+ {
51
+ authorityCode: 'backgroundFileTask#BackgroundFileTask:delete',
52
+ type: 'delete',
53
+ title: '删除',
54
+ args: {
55
+ url: apiUrls.value.delete,
56
+ },
57
+ },
58
+ ],
59
+ },
60
+ buttonConfig: {
61
+ attrs: {},
62
+ extend: {},
63
+ buttons: [
64
+ {
65
+ label: '列自定义',
66
+ icon: {
67
+ type: 'icon-Q-setting',
68
+ },
69
+ type: 'setting',
70
+ },
71
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns},
72
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_helpText`, '帮助说明'), icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText},
73
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_attachment`, '说明附件'), icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF}
74
+ ],
75
+ },
76
+ queryConfig: {
77
+ attrs: {},
78
+ extend: {},
79
+ form: [],
80
+ },
81
+ pagerConfig: {},
82
+ })
83
+ //methods
84
+
85
+ function allowRun({ row = {} as MapObjectNoneType }) {
86
+ return '0' !== row.taskStatus
87
+ }
88
+
89
+ function handleRun({ row = {} as MapObjectNoneType }) {
90
+ if ('0' !== row.taskStatus) {
91
+ message.warning('当前状态不允许执行文件任务')
92
+ return
93
+ }
94
+ Modal.confirm({
95
+ title: '执行文件任务',
96
+ content: '是否执行文件任务?',
97
+ onOk() {
98
+ listLayoutRef.value.loading = true
99
+ qHttp
100
+ .post({
101
+ url: apiUrls.value.runTask + '/' + row.id,
102
+ })
103
+ .then((res) => {
104
+ if (res.success) {
105
+ listLayoutRef.value.fetchListData()
106
+ message.success(res.message)
107
+ } else {
108
+ message.warning(res.message)
109
+ }
110
+ })
111
+ .finally(() => {
112
+ listLayoutRef.value.loading = true
113
+ })
114
+ },
115
+ })
116
+ }
117
+
118
+ function allowDown({ row = {} as MapObjectNoneType }) {
119
+ return '1' !== row.taskStatus
120
+ }
121
+ function handleCustomDown({ row = {} as MapObjectNoneType }) {
122
+ handleExport({
123
+ exportXlsUrl: apiUrls.value.downTaskFile + '/' + row.id,
124
+ type: 'xls',
125
+ fileName: row.taskName,
126
+ actionType: 'get',
127
+ setPostParms: () => {
128
+ return {}
129
+ },
130
+ berforCallback: () => {
131
+ listLayoutRef.value.loading = true
132
+ },
133
+ afterCallback: () => {
134
+ listLayoutRef.value.loading = false
135
+ },
136
+ })
137
+ }
138
+
139
+ return { listLayoutRef, showEditPage, apiUrls, pageData }
140
+ },
141
+ })
142
+ </script>
143
+ <style scoped></style>
@@ -1,166 +1,172 @@
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, inject } from 'vue'
10
- //hook
11
- import { useConfigData } from './useConfigData'
12
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
13
-
14
- //组件
15
- import { Modal, message } from '@qqt-product/ui'
16
- export default defineComponent({
17
- name: 'QElsEmailSendLogList',
18
- props: {
19
- userInfo: {
20
- type: Object,
21
- defalut: () => {
22
- return {}
23
- },
24
- },
25
- },
26
- setup() {
27
- //data-hook
28
- const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
29
- const qHttp = inject(INJECT_HTTP) as HttpClient
30
- //data
31
- const pageData = reactive({
32
- statusConfig: {
33
- show: false,
34
- },
35
- optColumn: {
36
- attrs: {},
37
- extend: {},
38
- optColumnList: [
39
- { type: 'retry', title: '重试', click: retry, disabled: retryShow },
40
- {
41
- type: 'delete',
42
- title: '删除',
43
- args: {
44
- url: apiUrls.value.delete,
45
- },
46
- },
47
- ],
48
- },
49
- buttonConfig: {
50
- attrs: {},
51
- extend: {},
52
- buttons: [
53
- // {
54
- // label: '导入',
55
- // args: {
56
- // url: 'material/purchaseMaterialHead/importExcel',
57
- // excelCode: 'purchaseMaterialExcel',
58
- // handleBeforeImportExcel(data) {
59
- // console.log('data :>> ', data)
60
- // return Promise.resolve({
61
- // flag: true,
62
- // params: {},
63
- // })
64
- // },
65
- // },
66
- // icon: {
67
- // type: 'icon-Q-import',
68
- // },
69
- // type: 'import',
70
- // },
71
- // {
72
- // label: '导出',
73
- // args: {
74
- // url: 'price/purchaseInformationRecordsRequest/exportXls',
75
- // },
76
- // icon: {
77
- // type: 'icon-Q-setting',
78
- // },
79
- // type: 'export',
80
- // },
81
- // {
82
- // label: '帮助说明',
83
- // icon: {
84
- // type: 'icon-Q-help-text',
85
- // },
86
- // type: 'help-text',
87
- // },
88
- // {
89
- // label: '附件说明',
90
- // icon: {
91
- // type: 'icon-Q-attachment-text',
92
- // },
93
- // type: 'attachment-text',
94
- // },
95
- // {
96
- // label: '视频说明',
97
- // icon: {
98
- // type: 'icon-Q-video-text',
99
- // },
100
- // type: 'video-text',
101
- // },
102
- // { type: 'edit', title: this.$srmI18n(`${this.$getLangAccount()}#i18n_menu_sK_1233a8`, '重试'), clickFn: this.retry, allow: this.retryShow },
103
- // { type: 'delete', title: this.$srmI18n(`${this.$getLangAccount()}#i18n_title_delete`, '删除'), clickFn: this.handleDeleteSingle },
104
- ],
105
- },
106
- queryConfig: {
107
- attrs: {},
108
- extend: {},
109
- form: [
110
- {
111
- type: 'input',
112
- label: '邮件标题',
113
- fieldName: 'subject',
114
- placeholder: '请输入邮件标题',
115
- },
116
- {
117
- type: 'input',
118
- label: '邮件接收人',
119
- fieldName: 'emailTo',
120
- placeholder: '请输入邮件接收人',
121
- },
122
- ],
123
- formState: {},
124
- },
125
- pagerConfig: {},
126
- })
127
-
128
- // const { userInfo } = toRefs(props)
129
- // console.log('userInfos', userInfo)
130
- //methods
131
- function retryShow({ row = {} as MapObjectNoneType }) {
132
- return row.sendStatus === '1'
133
- }
134
-
135
- function retry({ row = {} as MapObjectNoneType }) {
136
- // let param = { id: row.id }
137
-
138
- Modal.confirm({
139
- title: '提示',
140
- content: '是否重新发送邮件?',
141
- onOk: function () {
142
- listLayoutRef.value.loading = true
143
- qHttp
144
- .post({
145
- url: apiUrls.value.retry + '/' + row.id,
146
- })
147
- .then((res) => {
148
- if (res.success) {
149
- listLayoutRef.value.fetchListData()
150
- message.success(res.message)
151
- } else {
152
- message.warning(res.message)
153
- }
154
- })
155
- .finally(() => {
156
- listLayoutRef.value.loading = true
157
- })
158
- },
159
- })
160
- }
161
-
162
- return { showEditPage, apiUrls, pageData, listLayoutRef }
163
- },
164
- })
165
- </script>
166
- <style scoped></style>
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, inject } from 'vue'
10
+ //hook
11
+ import { useConfigData } from './useConfigData'
12
+ import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
13
+
14
+ //组件
15
+ import { Modal, message } from '@qqt-product/ui'
16
+ export default defineComponent({
17
+ name: 'QElsEmailSendLogList',
18
+ props: {
19
+ userInfo: {
20
+ type: Object,
21
+ defalut: () => {
22
+ return {}
23
+ },
24
+ },
25
+ },
26
+ setup() {
27
+ //data-hook
28
+ const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
29
+ const qHttp = inject(INJECT_HTTP) as HttpClient
30
+ //data
31
+ const pageData = reactive({
32
+ statusConfig: {
33
+ show: false,
34
+ },
35
+ optionConfig: {
36
+ attrs: {},
37
+ extend: {},
38
+ options: [
39
+ { type: 'retry', title: '重试', click: retry, disabled: retryShow },
40
+ {
41
+ type: 'delete',
42
+ title: '删除',
43
+ args: {
44
+ url: apiUrls.value.delete,
45
+ },
46
+ },
47
+ ],
48
+ },
49
+ buttonConfig: {
50
+ attrs: {},
51
+ extend: {},
52
+ buttons: [
53
+ {
54
+ label: '列自定义',
55
+ icon: {
56
+ type: 'icon-Q-setting',
57
+ },
58
+ type: 'setting',
59
+ },
60
+ // {
61
+ // label: '导入',
62
+ // args: {
63
+ // url: 'material/purchaseMaterialHead/importExcel',
64
+ // excelCode: 'purchaseMaterialExcel',
65
+ // handleBeforeImportExcel(data) {
66
+ // console.log('data :>> ', data)
67
+ // return Promise.resolve({
68
+ // flag: true,
69
+ // params: {},
70
+ // })
71
+ // },
72
+ // },
73
+ // icon: {
74
+ // type: 'icon-Q-import',
75
+ // },
76
+ // type: 'import',
77
+ // },
78
+ // {
79
+ // label: '导出',
80
+ // args: {
81
+ // url: 'price/purchaseInformationRecordsRequest/exportXls',
82
+ // },
83
+ // icon: {
84
+ // type: 'icon-Q-setting',
85
+ // },
86
+ // type: 'export',
87
+ // },
88
+ // {
89
+ // label: '帮助说明',
90
+ // icon: {
91
+ // type: 'icon-Q-help-text',
92
+ // },
93
+ // type: 'help-text',
94
+ // },
95
+ // {
96
+ // label: '附件说明',
97
+ // icon: {
98
+ // type: 'icon-Q-attachment-text',
99
+ // },
100
+ // type: 'attachment-text',
101
+ // },
102
+ // {
103
+ // label: '视频说明',
104
+ // icon: {
105
+ // type: 'icon-Q-video-text',
106
+ // },
107
+ // type: 'video-text',
108
+ // },
109
+ // { type: 'edit', title: this.$srmI18n(`${this.$getLangAccount()}#i18n_menu_sK_1233a8`, '重试'), clickFn: this.retry, allow: this.retryShow },
110
+ // { type: 'delete', title: this.$srmI18n(`${this.$getLangAccount()}#i18n_title_delete`, '删除'), clickFn: this.handleDeleteSingle },
111
+ ],
112
+ },
113
+ queryConfig: {
114
+ attrs: {},
115
+ extend: {},
116
+ form: [
117
+ {
118
+ type: 'input',
119
+ label: '邮件标题',
120
+ fieldName: 'subject',
121
+ placeholder: '请输入邮件标题',
122
+ },
123
+ {
124
+ type: 'input',
125
+ label: '邮件接收人',
126
+ fieldName: 'emailTo',
127
+ placeholder: '请输入邮件接收人',
128
+ },
129
+ ],
130
+ },
131
+ pagerConfig: {},
132
+ })
133
+
134
+ // const { userInfo } = toRefs(props)
135
+ // console.log('userInfos', userInfo)
136
+ //methods
137
+ function retryShow({ row = {} as MapObjectNoneType }) {
138
+ return row.sendStatus === '1'
139
+ }
140
+
141
+ function retry({ row = {} as MapObjectNoneType }) {
142
+ // let param = { id: row.id }
143
+
144
+ Modal.confirm({
145
+ title: '提示',
146
+ content: '是否重新发送邮件?',
147
+ onOk: function () {
148
+ listLayoutRef.value.loading = true
149
+ qHttp
150
+ .post({
151
+ url: apiUrls.value.retry + '/' + row.id,
152
+ })
153
+ .then((res) => {
154
+ if (res.success) {
155
+ listLayoutRef.value.fetchListData()
156
+ message.success(res.message)
157
+ } else {
158
+ message.warning(res.message)
159
+ }
160
+ })
161
+ .finally(() => {
162
+ listLayoutRef.value.loading = true
163
+ })
164
+ },
165
+ })
166
+ }
167
+
168
+ return { showEditPage, apiUrls, pageData, listLayoutRef }
169
+ },
170
+ })
171
+ </script>
172
+ <style scoped></style>