@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,263 +1,276 @@
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>
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
+ optionConfig: {
49
+ attrs: {},
50
+ extend: {},
51
+ options: [
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
+ args: {
90
+ fileName: '定时任务',
91
+ url: '/job/quartzJob/exportXls', // 原来的 exportXlsUrl
92
+ },
93
+ icon: {
94
+ type: 'icon-Q-export',
95
+ },
96
+ type: 'export',
97
+ // click: handleCustomExportXls,
98
+ },
99
+ {
100
+ label: '列自定义',
101
+ icon: {
102
+ type: 'icon-Q-setting',
103
+ },
104
+ type: 'setting',
105
+ },
106
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns},
107
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_helpText`, '帮助说明'), icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText},
108
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_attachment`, '说明附件'), icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF}
109
+ ],
110
+ },
111
+ queryConfig: {
112
+ attrs: {},
113
+ extend: {},
114
+ form: [
115
+ {
116
+ type: 'input',
117
+ label: '任务编码',
118
+ fieldName: 'keyWord',
119
+ placeholder: '请输入任务编码',
120
+ },
121
+ {
122
+ type: 'select',
123
+ label: '任务状态',
124
+ fieldName: 'status',
125
+ dictCode: 'quartz_job_status',
126
+ placeholder: '请选择状态',
127
+ },
128
+ ],
129
+ },
130
+ pagerConfig: {},
131
+ })
132
+
133
+ //methods
134
+
135
+ function handleCustomExportXls() {
136
+ handleExport({
137
+ actionType: 'post',
138
+ type: 'xls',
139
+ exportXlsUrl: '/job/quartzJob/exportXls',
140
+ fileName: '定时任务',
141
+ setPostParms() {
142
+ return {
143
+ jobClassName: '',
144
+ status: '',
145
+ pageSize: 20,
146
+ pageNo: 1,
147
+ filter: {},
148
+ column: 'id',
149
+ order: 'desc',
150
+ defineColumnCode: 'ElsQuartzJob',
151
+ }
152
+ },
153
+ berforCallback() {
154
+ listLayoutRef.value.loading = true
155
+ },
156
+ afterCallback() {
157
+ listLayoutRef.value.loading = false
158
+ },
159
+ })
160
+ }
161
+ function showStopCondition({ row = {} as MapObjectNoneType }) {
162
+ return row.status === -1
163
+ }
164
+
165
+ function pauseJob({ row = {} as MapObjectNoneType }) {
166
+ Modal.confirm({
167
+ title: '确认暂停',
168
+ content: '是否暂停选中任务?',
169
+ onOk() {
170
+ listLayoutRef.value.loading = true
171
+ qHttp
172
+ .get({
173
+ url: apiUrls.value.pause,
174
+ params: { jobNameKey: row.jobNameKey },
175
+ })
176
+ .then((res) => {
177
+ if (res.success) {
178
+ message.success(res.message)
179
+ listLayoutRef.value.fetchListData()
180
+ } else {
181
+ message.warning(res.message)
182
+ }
183
+ })
184
+ .finally(() => {
185
+ listLayoutRef.value.loading = false
186
+ })
187
+ },
188
+ })
189
+ }
190
+
191
+ function showStartCondition({ row = {} as MapObjectNoneType }) {
192
+ return row.status === 0
193
+ }
194
+
195
+ function resumeJob({ row = {} as MapObjectNoneType }) {
196
+ Modal.confirm({
197
+ title: '确认启动',
198
+ content: '是否启动选中任务?',
199
+ onOk() {
200
+ listLayoutRef.value.loading = true
201
+ qHttp
202
+ .get({
203
+ url: apiUrls.value.resume,
204
+ params: { jobNameKey: row.jobNameKey },
205
+ })
206
+ .then((res) => {
207
+ if (res.success) {
208
+ message.success(res.message)
209
+ listLayoutRef.value.fetchListData()
210
+ } else {
211
+ message.warning(res.message)
212
+ }
213
+ })
214
+ .finally(() => {
215
+ listLayoutRef.value.loading = false
216
+ })
217
+ },
218
+ })
219
+ }
220
+
221
+ function manualExecute({ row = {} as MapObjectNoneType }) {
222
+ Modal.confirm({
223
+ title: '确认执行',
224
+ content: '是否手动执行选中任务?',
225
+ onOk() {
226
+ listLayoutRef.value.loading = true
227
+ qHttp
228
+ .get({
229
+ url: apiUrls.value.manualExecute,
230
+ params: { id: row.id },
231
+ })
232
+ .then((res) => {
233
+ if (res.success) {
234
+ message.success(res.message)
235
+ listLayoutRef.value.fetchListData()
236
+ } else {
237
+ message.warning(res.message)
238
+ }
239
+ })
240
+ .finally(() => {
241
+ listLayoutRef.value.loading = false
242
+ })
243
+ },
244
+ })
245
+ }
246
+
247
+ function showDelCondition({ row = {} as MapObjectNoneType }) {
248
+ return row.status === 0
249
+ }
250
+
251
+ function add() {
252
+ currentEditRow.value = {}
253
+ showEditPage.value = true
254
+ nextTick(() => {
255
+ editPage.value.add()
256
+ })
257
+ }
258
+
259
+ function edit({ row = {} as MapObjectNoneType }) {
260
+ currentEditRow.value = { ...row }
261
+ showEditPage.value = true
262
+ nextTick(() => {
263
+ editPage.value.edit(row)
264
+ })
265
+ }
266
+
267
+ function hideEditPage() {
268
+ showEditPage.value = false
269
+ currentEditRow.value = {}
270
+ }
271
+
272
+ return { editPage, hideEditPage, currentEditRow, listLayoutRef, showEditPage, apiUrls, pageData }
273
+ },
274
+ })
275
+ </script>
276
+ <style scoped></style>