@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,263 @@
1
+ <template>
2
+ <div style="height: 100%">
3
+ <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
+
5
+ <!--新增/编辑-->
6
+ <QuartzJobModal v-if="showEditPage" :current-edit-row="currentEditRow" ref="editPage" @close="hideEditPage" />
7
+ </div>
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ //组件
12
+ import { Modal, message } from '@qqt-product/ui'
13
+ import QuartzJobModal from '../src/components/QuartzJobModal.vue'
14
+ //JS
15
+ import { defineComponent, reactive, inject, nextTick } from 'vue'
16
+ //hook
17
+ import { useConfigData } from './useConfigData'
18
+ import { useConigApiMethods } from '../../../utils/global.hook'
19
+
20
+ //ts
21
+ import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
22
+
23
+ export default defineComponent({
24
+ name: 'QQuartzJobList',
25
+ components: {
26
+ QuartzJobModal,
27
+ },
28
+ props: {
29
+ userInfo: {
30
+ type: Object,
31
+ defalut: () => {
32
+ return {}
33
+ },
34
+ },
35
+ },
36
+ setup() {
37
+ //data-hook
38
+ const { showEditPage, apiUrls, listLayoutRef, currentEditRow, editPage } = useConfigData()
39
+ const qHttp = inject(INJECT_HTTP) as HttpClient
40
+ // const { userInfo } = toRefs(props)
41
+ // console.log('userInfos', userInfo)
42
+ //data
43
+ const { handleExport } = useConigApiMethods(qHttp)
44
+ const pageData = reactive({
45
+ statusConfig: {
46
+ show: false,
47
+ },
48
+ optColumn: {
49
+ attrs: {},
50
+ extend: {},
51
+ optColumnList: [
52
+ { authorityCode: 'quartzJob#QuartzJob:pause', type: 'pause', title: '停止', click: pauseJob, disabled: showStopCondition },
53
+ { authorityCode: 'quartzJob#QuartzJob:resume', type: 'start', title: '启动', click: resumeJob, disabled: showStartCondition },
54
+ { authorityCode: 'quartzJob#QuartzJob:manualExecute', start2: '', title: '手动执行', click: manualExecute },
55
+ // {authorityCode: 'quartzJob#QuartzJob:log', type: 'log', title: srmI18n(`${getLangAccount()}#i18n_btn_BR_cb692`, '日志'), clickFn: this.queryLog},
56
+ { authorityCode: 'quartzJob#QuartzJob:edit', type: 'edit', title: '编辑', click: edit },
57
+ {
58
+ authorityCode: 'quartzJob#QuartzJob:delete',
59
+ args: {
60
+ url: apiUrls.value.delete,
61
+ },
62
+ type: 'delete',
63
+ title: '删除',
64
+ disabled: showDelCondition,
65
+ },
66
+ ],
67
+ },
68
+ buttonConfig: {
69
+ attrs: {},
70
+ extend: {},
71
+ buttons: [
72
+ {
73
+ authorityCode: 'quartzJob#QuartzJob:add',
74
+ label: '新增',
75
+ icon: {
76
+ type: 'icon-Q-add',
77
+ },
78
+ attrs: {
79
+ type: 'primary',
80
+ },
81
+ click: add,
82
+ args: {
83
+ type: 'primary',
84
+ },
85
+ },
86
+ {
87
+ authorityCode: 'quartzJob#QuartzJob:export',
88
+ label: '导出',
89
+
90
+ click: handleCustomExportXls,
91
+ },
92
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns},
93
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_helpText`, '帮助说明'), icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText},
94
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_attachment`, '说明附件'), icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF}
95
+ ],
96
+ },
97
+ queryConfig: {
98
+ attrs: {},
99
+ extend: {},
100
+ form: [
101
+ {
102
+ type: 'input',
103
+ label: '任务编码',
104
+ fieldName: 'keyWord',
105
+ placeholder: '请输入任务编码',
106
+ },
107
+ {
108
+ type: 'select',
109
+ label: '任务状态',
110
+ fieldName: 'status',
111
+ dictCode: 'quartz_job_status',
112
+ placeholder: '请选择状态',
113
+ },
114
+ ],
115
+ formState: {},
116
+ },
117
+ pagerConfig: {},
118
+ })
119
+
120
+ //methods
121
+
122
+ function handleCustomExportXls() {
123
+ handleExport({
124
+ actionType: 'post',
125
+ type: 'xls',
126
+ exportXlsUrl: '/job/quartzJob/exportXls',
127
+ fileName: '定时任务',
128
+ setPostParms() {
129
+ return {
130
+ jobClassName: '',
131
+ status: '',
132
+ pageSize: 20,
133
+ pageNo: 1,
134
+ filter: {},
135
+ column: 'id',
136
+ order: 'desc',
137
+ defineColumnCode: 'ElsQuartzJob',
138
+ }
139
+ },
140
+ berforCallback() {
141
+ listLayoutRef.value.loading = true
142
+ },
143
+ afterCallback() {
144
+ listLayoutRef.value.loading = false
145
+ },
146
+ })
147
+ }
148
+ function showStopCondition({ row = {} as MapObjectNoneType }) {
149
+ return row.status === -1
150
+ }
151
+
152
+ function pauseJob({ row = {} as MapObjectNoneType }) {
153
+ Modal.confirm({
154
+ title: '确认暂停',
155
+ content: '是否暂停选中任务?',
156
+ onOk() {
157
+ listLayoutRef.value.loading = true
158
+ qHttp
159
+ .get({
160
+ url: apiUrls.value.pause,
161
+ params: { jobNameKey: row.jobNameKey },
162
+ })
163
+ .then((res) => {
164
+ if (res.success) {
165
+ message.success(res.message)
166
+ listLayoutRef.value.fetchListData()
167
+ } else {
168
+ message.warning(res.message)
169
+ }
170
+ })
171
+ .finally(() => {
172
+ listLayoutRef.value.loading = false
173
+ })
174
+ },
175
+ })
176
+ }
177
+
178
+ function showStartCondition({ row = {} as MapObjectNoneType }) {
179
+ return row.status === 0
180
+ }
181
+
182
+ function resumeJob({ row = {} as MapObjectNoneType }) {
183
+ Modal.confirm({
184
+ title: '确认启动',
185
+ content: '是否启动选中任务?',
186
+ onOk() {
187
+ listLayoutRef.value.loading = true
188
+ qHttp
189
+ .get({
190
+ url: apiUrls.value.resume,
191
+ params: { jobNameKey: row.jobNameKey },
192
+ })
193
+ .then((res) => {
194
+ if (res.success) {
195
+ message.success(res.message)
196
+ listLayoutRef.value.fetchListData()
197
+ } else {
198
+ message.warning(res.message)
199
+ }
200
+ })
201
+ .finally(() => {
202
+ listLayoutRef.value.loading = false
203
+ })
204
+ },
205
+ })
206
+ }
207
+
208
+ function manualExecute({ row = {} as MapObjectNoneType }) {
209
+ Modal.confirm({
210
+ title: '确认执行',
211
+ content: '是否手动执行选中任务?',
212
+ onOk() {
213
+ listLayoutRef.value.loading = true
214
+ qHttp
215
+ .get({
216
+ url: apiUrls.value.manualExecute,
217
+ params: { id: row.id },
218
+ })
219
+ .then((res) => {
220
+ if (res.success) {
221
+ message.success(res.message)
222
+ listLayoutRef.value.fetchListData()
223
+ } else {
224
+ message.warning(res.message)
225
+ }
226
+ })
227
+ .finally(() => {
228
+ listLayoutRef.value.loading = false
229
+ })
230
+ },
231
+ })
232
+ }
233
+
234
+ function showDelCondition({ row = {} as MapObjectNoneType }) {
235
+ return row.status === 0
236
+ }
237
+
238
+ function add() {
239
+ currentEditRow.value = {}
240
+ showEditPage.value = true
241
+ nextTick(() => {
242
+ editPage.value.add()
243
+ })
244
+ }
245
+
246
+ function edit({ row = {} as MapObjectNoneType }) {
247
+ currentEditRow.value = { ...row }
248
+ showEditPage.value = true
249
+ nextTick(() => {
250
+ editPage.value.edit(row)
251
+ })
252
+ }
253
+
254
+ function hideEditPage() {
255
+ showEditPage.value = false
256
+ currentEditRow.value = {}
257
+ }
258
+
259
+ return { editPage, hideEditPage, currentEditRow, listLayoutRef, showEditPage, apiUrls, pageData }
260
+ },
261
+ })
262
+ </script>
263
+ <style scoped></style>
@@ -0,0 +1,82 @@
1
+ <template>
2
+ <div class="components-input-demo-presuffix">
3
+ <a-input @click="openModal" placeholder="corn表达式" v-model:value="cron" @change="handleOK">
4
+ <template #prefix> <schedule-outlined title="corn控件" /> </template>
5
+
6
+ <template #suffix>
7
+ <close-circle-outlined @click="handleEmpty" title="清空" />
8
+ </template>
9
+ </a-input>
10
+ <JCronModal ref="innerVueCron" :data="cron" @ok="handleOK" />
11
+ </div>
12
+ </template>
13
+ <script lang="ts">
14
+ //vue
15
+ import { defineComponent, ref } from 'vue'
16
+ //组件
17
+ import { CloseCircleOutlined, ScheduleOutlined } from '@ant-design/icons-vue'
18
+ import JCronModal from '../components/JCronModal.vue'
19
+ export default defineComponent({
20
+ name: 'JCron',
21
+ emits: ['change'],
22
+ components: {
23
+ JCronModal,
24
+ CloseCircleOutlined,
25
+ ScheduleOutlined,
26
+ },
27
+ setup() {
28
+ const innerVueCron = ref()
29
+
30
+ return {
31
+ innerVueCron,
32
+ }
33
+ },
34
+ props: {
35
+ value: {
36
+ required: false,
37
+ type: String,
38
+ },
39
+ },
40
+ data() {
41
+ return {
42
+ cron: this.value,
43
+ }
44
+ },
45
+ watch: {
46
+ value(val) {
47
+ this.cron = val
48
+ },
49
+ },
50
+ methods: {
51
+ openModal() {
52
+ this.innerVueCron.show()
53
+ },
54
+ handleOK(val) {
55
+ this.cron = val
56
+ this.$emit('change', this.cron)
57
+ //this.$emit("change", Object.assign({}, this.cron));
58
+ },
59
+ handleEmpty() {
60
+ this.handleOK('')
61
+ },
62
+ },
63
+ model: {
64
+ prop: 'value',
65
+ event: 'change',
66
+ },
67
+ })
68
+ </script>
69
+ <style scoped>
70
+ .components-input-demo-presuffix .anticon-close-circle {
71
+ cursor: pointer;
72
+ color: #ccc;
73
+ transition: color 0.3s;
74
+ font-size: 12px;
75
+ }
76
+ .components-input-demo-presuffix .anticon-close-circle:hover {
77
+ color: #f5222d;
78
+ }
79
+ .components-input-demo-presuffix .anticon-close-circle:active {
80
+ color: #666;
81
+ }
82
+ </style>