@qqt-product/system 0.0.16 → 0.0.18

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 +9601 -9171
  2. package/dist/index.umd.js +34 -35
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +16 -12
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +14 -10
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +17 -12
  6. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +13 -9
  7. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +13 -9
  8. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +16 -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 +16 -12
  12. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +13 -9
  13. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +18 -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 +21 -1
  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 +13 -9
  22. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +16 -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,985 +0,0 @@
1
- <template>
2
- <a-modal v-drag title="corn表达式" :width="modalWidth" :visible="visible" :confirm-loading="confirmLoading" @ok="handleSubmit" @cancel="close" cancel-text="关闭">
3
- <div class="card-container">
4
- <a-tabs type="card">
5
- <a-tab-pane key="1" type="card">
6
- <template #tab>
7
- <span><ScheduleOutlined /> 秒</span>
8
- </template>
9
-
10
- <a-radio-group v-model:value="result.second.cronEvery">
11
- <a-row>
12
- <a-radio value="1"> 每一秒钟 </a-radio>
13
- </a-row>
14
- <a-row>
15
- <a-radio value="2">
16
- 每隔
17
- <a-input-number size="small" v-model:value="result.second.incrementIncrement" :min="1" :max="59" />
18
- 秒执行 从
19
- <a-input-number size="small" v-model:value="result.second.incrementStart" :min="0" :max="59" />
20
- 秒开始
21
- </a-radio>
22
- </a-row>
23
- <a-row>
24
- <a-radio value="3"> 具体秒数(可多选) </a-radio>
25
- <a-select style="width: 354px" size="small" mode="multiple" v-model:value="result.second.specificSpecific">
26
- <a-select-option v-for="(val, index) in 60" :key="index" :value="index">
27
- {{ index }}
28
- </a-select-option>
29
- </a-select>
30
- </a-row>
31
- <a-row>
32
- <a-radio value="4">
33
- 周期从
34
- <a-input-number size="small" v-model:value="result.second.rangeStart" :min="1" :max="59" />
35
-
36
- <a-input-number size="small" v-model:value="result.second.rangeEnd" :min="0" :max="59" />
37
-
38
- </a-radio>
39
- </a-row>
40
- </a-radio-group>
41
- </a-tab-pane>
42
- <a-tab-pane key="2">
43
- <template #tab>
44
- <span><ScheduleOutlined /> 分</span>
45
- </template>
46
-
47
- <div class="tabBody">
48
- <a-radio-group v-model:value="result.minute.cronEvery">
49
- <a-row>
50
- <a-radio value="1"> 每一分钟 </a-radio>
51
- </a-row>
52
- <a-row>
53
- <a-radio value="2">
54
- 每隔
55
- <a-input-number size="small" v-model:value="result.minute.incrementIncrement" :min="1" :max="60" />
56
- 分执行 从
57
- <a-input-number size="small" v-model:value="result.minute.incrementStart" :min="0" :max="59" />
58
- 分开始
59
- </a-radio>
60
- </a-row>
61
- <a-row>
62
- <a-radio value="3"> 具体分钟数(可多选) </a-radio>
63
- <a-select style="width: 340px" size="small" mode="multiple" v-model:value="result.minute.specificSpecific">
64
- <a-select-option v-for="(val, index) in Array(60)" :key="index" :value="index">
65
- {{ index }}
66
- </a-select-option>
67
- </a-select>
68
- </a-row>
69
- <a-row>
70
- <a-radio value="4">
71
- 周期从
72
- <a-input-number size="small" v-model:value="result.minute.rangeStart" :min="1" :max="60" />
73
-
74
- <a-input-number size="small" v-model:value="result.minute.rangeEnd" :min="0" :max="59" />
75
-
76
- </a-radio>
77
- </a-row>
78
- </a-radio-group>
79
- </div>
80
- </a-tab-pane>
81
- <a-tab-pane key="3">
82
- <template #tab>
83
- <span><ScheduleOutlined /> 时</span>
84
- </template>
85
-
86
- <div class="tabBody">
87
- <a-radio-group v-model:value="result.hour.cronEvery">
88
- <a-row>
89
- <a-radio value="1"> 每一小时 </a-radio>
90
- </a-row>
91
- <a-row>
92
- <a-radio value="2">
93
- 每隔
94
- <a-input-number size="small" v-model:value="result.hour.incrementIncrement" :min="0" :max="23" />
95
- 小时执行 从
96
- <a-input-number size="small" v-model:value="result.hour.incrementStart" :min="0" :max="23" />
97
- 小时开始
98
- </a-radio>
99
- </a-row>
100
- <a-row>
101
- <a-radio class="long" value="3"> 具体小时数(可多选) </a-radio>
102
- <a-select style="width: 340px" size="small" mode="multiple" v-model:value="result.hour.specificSpecific">
103
- <a-select-option v-for="(val, index) in Array(24)" :key="index">
104
- {{ index }}
105
- </a-select-option>
106
- </a-select>
107
- </a-row>
108
- <a-row>
109
- <a-radio value="4">
110
- 周期从
111
- <a-input-number size="small" v-model:value="result.hour.rangeStart" :min="0" :max="23" />
112
-
113
- <a-input-number size="small" v-model:value="result.hour.rangeEnd" :min="0" :max="23" />
114
- 小时
115
- </a-radio>
116
- </a-row>
117
- </a-radio-group>
118
- </div>
119
- </a-tab-pane>
120
- <a-tab-pane key="4">
121
- <template #tab>
122
- <span><ScheduleOutlined /> 天</span>
123
- </template>
124
-
125
- <div class="tabBody">
126
- <a-radio-group v-model:value="result.day.cronEvery">
127
- <a-row>
128
- <a-radio value="1"> 每一天 </a-radio>
129
- </a-row>
130
- <a-row>
131
- <a-radio value="2">
132
- 每隔
133
- <a-input-number size="small" v-model:value="result.week.incrementIncrement" :min="1" :max="7" />
134
- 周执行 从
135
- <a-select size="small" v-model:value="result.week.incrementStart">
136
- <a-select-option v-for="(val, index) in Array(7)" :key="index" :value="index + 1">
137
- {{ weekDays[index] }}
138
- </a-select-option>
139
- </a-select>
140
- 开始
141
- </a-radio>
142
- </a-row>
143
- <a-row>
144
- <a-radio value="3">
145
- 每隔
146
- <a-input-number size="small" v-model:value="result.day.incrementIncrement" :min="1" :max="31" />
147
- 天执行 从
148
- <a-input-number size="small" v-model:value="result.day.incrementStart" :min="1" :max="31" />
149
- 天开始
150
- </a-radio>
151
- </a-row>
152
- <a-row>
153
- <a-radio class="long" value="4"> 具体星期几(可多选) </a-radio>
154
- <a-select style="width: 340px" size="small" mode="multiple" v-model:value="result.week.specificSpecific">
155
- <a-select-option v-for="(val, index) in Array(7)" :key="index" :value="index + 1">
156
- {{ weekDays[index] }}
157
- </a-select-option>
158
- </a-select>
159
- </a-row>
160
- <a-row>
161
- <a-radio class="long" value="5"> 具体天数(可多选) </a-radio>
162
- <a-select style="width: 354px" size="small" mode="multiple" v-model:value="result.day.specificSpecific">
163
- <a-select-option v-for="(val, index) in Array(31)" :key="index" :value="index + 1">
164
- {{ index + 1 }}
165
- </a-select-option>
166
- </a-select>
167
- </a-row>
168
- <a-row>
169
- <a-radio value="6"> 在这个月的最后一天 </a-radio>
170
- </a-row>
171
- <a-row>
172
- <a-radio value="7"> 在这个月的最后一个工作日 </a-radio>
173
- </a-row>
174
- <a-row>
175
- <a-radio value="8">
176
- 在这个月的最后一个
177
- <a-select size="small" v-model:value="result.day.cronLastSpecificDomDay">
178
- <a-select-option v-for="(val, index) in Array(7)" :key="index" :value="index + 1">
179
- {{ weekDays[index] }}
180
- </a-select-option>
181
- </a-select>
182
- </a-radio>
183
- </a-row>
184
- <a-row>
185
- <a-radio value="9">
186
- 在本月底前
187
- <a-input-number size="small" v-model:value="result.day.cronDaysBeforeEomMinus" :min="1" :max="31" />
188
-
189
- </a-radio>
190
- </a-row>
191
- <a-row>
192
- <a-radio value="10">
193
- 最近的工作日(周一至周五)至本月
194
- <a-input-number size="small" v-model:value="result.day.cronDaysNearestWeekday" :min="1" :max="31" />
195
-
196
- </a-radio>
197
- </a-row>
198
- <a-row>
199
- <a-radio value="11">
200
- 在这个月的第
201
- <a-input-number size="small" v-model:value="result.week.cronNthDayNth" :min="1" :max="5" />
202
-
203
- <a-select size="small" v-model:value="result.week.cronNthDayDay">
204
- <a-select-option v-for="(val, index) in Array(7)" :key="index" :value="index + 1">
205
- {{ weekDays[index] }}
206
- </a-select-option>
207
- </a-select>
208
- </a-radio>
209
- </a-row>
210
- </a-radio-group>
211
- </div>
212
- </a-tab-pane>
213
- <a-tab-pane key="5">
214
- <template #tab>
215
- <span><ScheduleOutlined /> 月</span>
216
- </template>
217
-
218
- <div class="tabBody">
219
- <a-radio-group v-model:value="result.month.cronEvery">
220
- <a-row>
221
- <a-radio value="1"> 每一月 </a-radio>
222
- </a-row>
223
- <a-row>
224
- <a-radio value="2">
225
- 每隔
226
- <a-input-number size="small" v-model:value="result.month.incrementIncrement" :min="0" :max="12" />
227
- 月执行 从
228
- <a-input-number size="small" v-model:value="result.month.incrementStart" :min="0" :max="12" />
229
- 月开始
230
- </a-radio>
231
- </a-row>
232
- <a-row>
233
- <a-radio class="long" value="3"> 具体月数(可多选) </a-radio>
234
- <a-select style="width: 354px" size="small" filterable mode="multiple" v-model:value="result.month.specificSpecific">
235
- <a-select-option v-for="(val, index) in Array(12)" :key="index" :value="index + 1">
236
- {{ index + 1 }}
237
- </a-select-option>
238
- </a-select>
239
- </a-row>
240
- <a-row>
241
- <a-radio value="4">
242
-
243
- <a-input-number size="small" v-model:value="result.month.rangeStart" :min="1" :max="12" />
244
-
245
- <a-input-number size="small" v-model:value="result.month.rangeEnd" :min="1" :max="12" />
246
- 月之间的每个月
247
- </a-radio>
248
- </a-row>
249
- </a-radio-group>
250
- </div>
251
- </a-tab-pane>
252
- <a-tab-pane key="6">
253
- <template #tab>
254
- <span><ScheduleOutlined /> 年</span>
255
- </template>
256
-
257
- <div class="tabBody">
258
- <a-radio-group v-model:value="result.year.cronEvery">
259
- <a-row>
260
- <a-radio value="1"> 每一年 </a-radio>
261
- </a-row>
262
- <a-row>
263
- <a-radio value="2">
264
- 每隔
265
- <a-input-number size="small" v-model:value="result.year.incrementIncrement" :min="1" :max="99" />
266
- 年执行 从
267
- <a-input-number size="small" v-model:value="result.year.incrementStart" :min="2019" :max="2119" />
268
- 年开始
269
- </a-radio>
270
- </a-row>
271
- <a-row>
272
- <a-radio class="long" value="3"> 具体年份(可多选) </a-radio>
273
- <a-select style="width: 354px" size="small" filterable mode="multiple" v-model:value="result.year.specificSpecific">
274
- <a-select-option v-for="(val, index) in Array(100)" :key="index" :value="2019 + index">
275
- {{ 2019 + index }}
276
- </a-select-option>
277
- </a-select>
278
- </a-row>
279
- <a-row>
280
- <a-radio value="4">
281
-
282
- <a-input-number size="small" v-model:value="result.year.rangeStart" :min="2019" :max="2119" />
283
-
284
- <a-input-number size="small" v-model:value="result.year.rangeEnd" :min="2019" :max="2119" />
285
- 年之间的每一年
286
- </a-radio>
287
- </a-row>
288
- </a-radio-group>
289
- </div>
290
- </a-tab-pane>
291
- </a-tabs>
292
- <div class="bottom">
293
- <span class="value">{{ cron }}</span>
294
- </div>
295
- </div>
296
- </a-modal>
297
- </template>
298
- <script lang="ts">
299
- //JS
300
- import { defineComponent } from 'vue'
301
-
302
- //组件
303
- import { ScheduleOutlined } from '@ant-design/icons-vue'
304
-
305
- //ts
306
- import { MapObjectNoneType } from '../../../../utils/global.types'
307
-
308
- export default defineComponent({
309
- name: 'VueCron',
310
- props: ['data'],
311
- emits: ['ok'],
312
- components: {
313
- ScheduleOutlined,
314
- },
315
- data() {
316
- return {
317
- visible: false,
318
- confirmLoading: false,
319
- size: 'large',
320
- weekDays: ['天', '一', '二', '三', '四', '五', '六'].map((val) => '星期' + val),
321
- result: {
322
- second: {} as MapObjectNoneType,
323
- minute: {} as MapObjectNoneType,
324
- hour: {} as MapObjectNoneType,
325
- day: {} as MapObjectNoneType,
326
- week: {} as MapObjectNoneType,
327
- month: {} as MapObjectNoneType,
328
- year: {} as MapObjectNoneType,
329
- } as MapObjectNoneType,
330
- defaultValue: {
331
- second: {
332
- cronEvery: '',
333
- incrementStart: 3,
334
- incrementIncrement: 5,
335
- rangeStart: 1,
336
- rangeEnd: 0,
337
- specificSpecific: [],
338
- },
339
- minute: {
340
- cronEvery: '',
341
- incrementStart: 3,
342
- incrementIncrement: 5,
343
- rangeStart: 1,
344
- rangeEnd: '0',
345
- specificSpecific: [],
346
- },
347
- hour: {
348
- cronEvery: '',
349
- incrementStart: 3,
350
- incrementIncrement: 5,
351
- rangeStart: '0',
352
- rangeEnd: '0',
353
- specificSpecific: [],
354
- },
355
- day: {
356
- cronEvery: '',
357
- incrementStart: 1,
358
- incrementIncrement: '1',
359
- rangeStart: '',
360
- rangeEnd: '',
361
- specificSpecific: [],
362
- cronLastSpecificDomDay: 1,
363
- cronDaysBeforeEomMinus: 1,
364
- cronDaysNearestWeekday: 1,
365
- },
366
- week: {
367
- cronEvery: '',
368
- incrementStart: 1,
369
- incrementIncrement: 1,
370
- specificSpecific: [],
371
- cronNthDayDay: 1,
372
- cronNthDayNth: 1,
373
- },
374
- month: {
375
- cronEvery: '',
376
- incrementStart: 3,
377
- incrementIncrement: 5,
378
- rangeStart: 1,
379
- rangeEnd: 1,
380
- specificSpecific: [],
381
- },
382
- year: {
383
- cronEvery: '',
384
- incrementStart: 2017,
385
- incrementIncrement: 1,
386
- rangeStart: 2019,
387
- rangeEnd: 2019,
388
- specificSpecific: [],
389
- },
390
- label: '',
391
- },
392
- }
393
- },
394
- computed: {
395
- modalWidth() {
396
- return 608
397
- },
398
- secondsText() {
399
- let seconds = ''
400
- let cronEvery = this.result.second.cronEvery || ''
401
- switch (cronEvery.toString()) {
402
- case '1':
403
- seconds = '*'
404
- break
405
- case '2':
406
- seconds = this.result.second.incrementStart + '/' + this.result.second.incrementIncrement
407
- break
408
- case '3':
409
- this.result.second.specificSpecific.map((val) => {
410
- seconds += val + ','
411
- })
412
- seconds = seconds.slice(0, -1)
413
- break
414
- case '4':
415
- seconds = this.result.second.rangeStart + '-' + this.result.second.rangeEnd
416
- break
417
- }
418
- return seconds
419
- },
420
- minutesText() {
421
- let minutes = ''
422
- let cronEvery = this.result.minute.cronEvery || ''
423
- switch (cronEvery.toString()) {
424
- case '1':
425
- minutes = '*'
426
- break
427
- case '2':
428
- minutes = this.result.minute.incrementStart + '/' + this.result.minute.incrementIncrement
429
- break
430
- case '3':
431
- this.result.minute.specificSpecific.map((val) => {
432
- minutes += val + ','
433
- })
434
- minutes = minutes.slice(0, -1)
435
- break
436
- case '4':
437
- minutes = this.result.minute.rangeStart + '-' + this.result.minute.rangeEnd
438
- break
439
- }
440
- return minutes
441
- },
442
- hoursText() {
443
- let hours = ''
444
- let cronEvery = this.result.hour.cronEvery || ''
445
- switch (cronEvery.toString()) {
446
- case '1':
447
- hours = '*'
448
- break
449
- case '2':
450
- hours = this.result.hour.incrementStart + '/' + this.result.hour.incrementIncrement
451
- break
452
- case '3':
453
- this.result.hour.specificSpecific.map((val) => {
454
- hours += val + ','
455
- })
456
- hours = hours.slice(0, -1)
457
- break
458
- case '4':
459
- hours = this.result.hour.rangeStart + '-' + this.result.hour.rangeEnd
460
- break
461
- }
462
- return hours
463
- },
464
- daysText() {
465
- let days = ''
466
- let cronEvery = this.result.day.cronEvery || ''
467
- switch (cronEvery.toString()) {
468
- case '1':
469
- break
470
- case '2':
471
- case '4':
472
- case '11':
473
- days = '?'
474
- break
475
- case '3':
476
- days = this.result.day.incrementStart + '/' + this.result.day.incrementIncrement
477
- break
478
- case '5':
479
- this.result.day.specificSpecific.map((val) => {
480
- days += val + ','
481
- })
482
- days = days.slice(0, -1)
483
- break
484
- case '6':
485
- days = 'L'
486
- break
487
- case '7':
488
- days = 'LW'
489
- break
490
- case '8':
491
- days = this.result.day.cronLastSpecificDomDay + 'L'
492
- break
493
- case '9':
494
- days = 'L-' + this.result.day.cronDaysBeforeEomMinus
495
- break
496
- case '10':
497
- days = this.result.day.cronDaysNearestWeekday + 'W'
498
- break
499
- }
500
- return days
501
- },
502
- weeksText() {
503
- let weeks = ''
504
- let cronEvery = this.result.day.cronEvery || ''
505
- switch (cronEvery.toString()) {
506
- case '1':
507
- case '3':
508
- case '5':
509
- weeks = '?'
510
- break
511
- case '2':
512
- weeks = this.result.week.incrementStart + '/' + this.result.week.incrementIncrement
513
- break
514
- case '4':
515
- this.result.week.specificSpecific.map((val) => {
516
- weeks += val + ','
517
- })
518
- weeks = weeks.slice(0, -1)
519
- break
520
- case '6':
521
- case '7':
522
- case '8':
523
- case '9':
524
- case '10':
525
- weeks = '?'
526
- break
527
- case '11':
528
- weeks = this.result.week.cronNthDayDay + '#' + this.result.week.cronNthDayNth
529
- break
530
- }
531
- return weeks
532
- },
533
- monthsText() {
534
- let months = ''
535
- let cronEvery = this.result.month.cronEvery || ''
536
- switch (cronEvery.toString()) {
537
- case '1':
538
- months = '*'
539
- break
540
- case '2':
541
- months = this.result.month.incrementStart + '/' + this.result.month.incrementIncrement
542
- break
543
- case '3':
544
- this.result.month.specificSpecific.map((val) => {
545
- months += val + ','
546
- })
547
- months = months.slice(0, -1)
548
- break
549
- case '4':
550
- months = this.result.month.rangeStart + '-' + this.result.month.rangeEnd
551
- break
552
- }
553
- return months
554
- },
555
- yearsText() {
556
- let years = ''
557
- let cronEvery = this.result.year.cronEvery || ''
558
- switch (cronEvery.toString()) {
559
- case '1':
560
- years = '*'
561
- break
562
- case '2':
563
- years = this.result.year.incrementStart + '/' + this.result.year.incrementIncrement
564
- break
565
- case '3':
566
- this.result.year.specificSpecific.map((val) => {
567
- years += val + ','
568
- })
569
- years = years.slice(0, -1)
570
- break
571
- case '4':
572
- years = this.result.year.rangeStart + '-' + this.result.year.rangeEnd
573
- break
574
- }
575
- return years
576
- },
577
- cron() {
578
- return `${this.secondsText || '*'} ${this.minutesText || '*'} ${this.hoursText || '*'} ${this.daysText || '*'} ${this.monthsText || '*'} ${this.weeksText || '?'} ${this.yearsText || '*'}`
579
- },
580
- },
581
- watch: {
582
- visible: {
583
- handler() {
584
- // if(this.data){
585
- // //this. result = Object.keys(this.data.value).length>0?this.deepCopy(this.data.value):this.deepCopy(this.defaultValue);
586
- // //this.result = Object.keys(this.data.value).length>0?clone(this.data.value):clone(this.defaultValue);
587
- // //this.result = Object.keys(this.data.value).length>0?clone(JSON.parse(this.data.value)):clone(this.defaultValue);
588
- // this.result = Object.keys(this.data.value).length>0?JSON.parse(this.data.value):JSON.parse(JSON.stringify(this.defaultValue));
589
- // }else{
590
- // //this.result = this.deepCopy(this.defaultValue);
591
- // //this.result = clone(this.defaultValue);
592
- // this.result = JSON.parse(JSON.stringify(this.defaultValue));
593
- // }
594
- let label = this.data
595
- if (label) {
596
- this.secondsReverseExp(label)
597
- this.minutesReverseExp(label)
598
- this.hoursReverseExp(label)
599
- this.daysReverseExp(label)
600
- this.daysReverseExp(label)
601
- this.monthsReverseExp(label)
602
- this.yearReverseExp(label)
603
- JSON.parse(JSON.stringify(label))
604
- } else {
605
- this.result = JSON.parse(JSON.stringify(this.defaultValue))
606
- }
607
- },
608
- },
609
- },
610
- methods: {
611
- show() {
612
- this.visible = true
613
- // console.log('secondsReverseExp',this.secondsReverseExp(this.data));
614
- // console.log('minutesReverseExp',this.minutesReverseExp(this.data));
615
- // console.log('hoursReverseExp',this.hoursReverseExp(this.data));
616
- // console.log('daysReverseExp',this.daysReverseExp(this.data));
617
- // console.log('monthsReverseExp',this.monthsReverseExp(this.data));
618
- // console.log('yearReverseExp',this.yearReverseExp(this.data));
619
- },
620
- handleSubmit() {
621
- this.$emit('ok', this.cron)
622
- this.close()
623
- this.visible = false
624
- },
625
- close() {
626
- this.visible = false
627
- },
628
- secondsReverseExp(seconds) {
629
- let val = seconds.split(' ')[0]
630
- //alert(val);
631
- let second = {
632
- cronEvery: '',
633
- incrementStart: 3,
634
- incrementIncrement: 5,
635
- rangeStart: 1,
636
- rangeEnd: 0,
637
- specificSpecific: [],
638
- }
639
- switch (true) {
640
- case val.includes('*'):
641
- second.cronEvery = '1'
642
- break
643
- case val.includes('/'):
644
- second.cronEvery = '2'
645
- second.incrementStart = val.split('/')[0]
646
- second.incrementIncrement = val.split('/')[1]
647
- break
648
- case val.includes(','):
649
- second.cronEvery = '3'
650
- second.specificSpecific = val.split(',').map(Number).sort()
651
- break
652
- case val.includes('-'):
653
- second.cronEvery = '4'
654
- second.rangeStart = val.split('-')[0]
655
- second.rangeEnd = val.split('-')[1]
656
- break
657
- default:
658
- second.cronEvery = '1'
659
- }
660
- this.result.second = second
661
- },
662
- minutesReverseExp(minutes) {
663
- let val = minutes.split(' ')[1]
664
- let minute = {
665
- cronEvery: '',
666
- incrementStart: 3,
667
- incrementIncrement: 5,
668
- rangeStart: 1,
669
- rangeEnd: 0,
670
- specificSpecific: [],
671
- }
672
- switch (true) {
673
- case val.includes('*'):
674
- minute.cronEvery = '1'
675
- break
676
- case val.includes('/'):
677
- minute.cronEvery = '2'
678
- minute.incrementStart = val.split('/')[0]
679
- minute.incrementIncrement = val.split('/')[1]
680
- break
681
- case val.includes(','):
682
- minute.cronEvery = '3'
683
- minute.specificSpecific = val.split(',').map(Number).sort()
684
- break
685
- case val.includes('-'):
686
- minute.cronEvery = '4'
687
- minute.rangeStart = val.split('-')[0]
688
- minute.rangeEnd = val.split('-')[1]
689
- break
690
- default:
691
- minute.cronEvery = '1'
692
- }
693
- this.result.minute = minute
694
- },
695
- hoursReverseExp(hours) {
696
- let val = hours.split(' ')[2]
697
- let hour = {
698
- cronEvery: '',
699
- incrementStart: 3,
700
- incrementIncrement: 5,
701
- rangeStart: 1,
702
- rangeEnd: '0',
703
- specificSpecific: [],
704
- }
705
- switch (true) {
706
- case val.includes('*'):
707
- hour.cronEvery = '1'
708
- break
709
- case val.includes('/'):
710
- hour.cronEvery = '2'
711
- hour.incrementStart = val.split('/')[0]
712
- hour.incrementIncrement = val.split('/')[1]
713
- break
714
- case val.includes(','):
715
- hour.cronEvery = '3'
716
- hour.specificSpecific = val.split(',').map(Number).sort()
717
- break
718
- case val.includes('-'):
719
- hour.cronEvery = '4'
720
- hour.rangeStart = val.split('-')[0]
721
- hour.rangeEnd = val.split('-')[1]
722
- break
723
- default:
724
- hour.cronEvery = '1'
725
- }
726
- this.result.hour = hour
727
- },
728
- daysReverseExp(cron) {
729
- let days = cron.split(' ')[3]
730
- let weeks = cron.split(' ')[5]
731
- let day = {
732
- cronEvery: '',
733
- incrementStart: 1,
734
- incrementIncrement: 1,
735
- rangeStart: 1,
736
- rangeEnd: 1,
737
- specificSpecific: [],
738
- cronLastSpecificDomDay: 1,
739
- cronDaysBeforeEomMinus: 1,
740
- cronDaysNearestWeekday: 1,
741
- }
742
- let week = {
743
- cronEvery: '',
744
- incrementStart: 1,
745
- incrementIncrement: 1,
746
- specificSpecific: [],
747
- cronNthDayDay: 1,
748
- cronNthDayNth: '1',
749
- }
750
- if (!days.includes('?')) {
751
- switch (true) {
752
- case days.includes('*'):
753
- day.cronEvery = '1'
754
- break
755
- case days.includes('?'):
756
- // 2、4、11
757
- break
758
- case days.includes('/'):
759
- day.cronEvery = '3'
760
- day.incrementStart = days.split('/')[0]
761
- day.incrementIncrement = days.split('/')[1]
762
- break
763
- case days.includes(','):
764
- day.cronEvery = '5'
765
- day.specificSpecific = days.split(',').map(Number).sort()
766
- // day.specificSpecific.forEach(function (value, index) {
767
- // day.specificSpecific[index] = value -1;
768
- // });
769
- break
770
- case days.includes('LW'):
771
- day.cronEvery = '7'
772
- break
773
- case days.includes('L-'):
774
- day.cronEvery = '9'
775
- day.cronDaysBeforeEomMinus = days.split('L-')[1]
776
- break
777
- case days.includes('L'):
778
- //alert(days);
779
- if (days.len == 1) {
780
- day.cronEvery = '6'
781
- day.cronLastSpecificDomDay = 1
782
- } else {
783
- day.cronEvery = '8'
784
- day.cronLastSpecificDomDay = Number(days.split('L')[0])
785
- }
786
- break
787
- case days.includes('W'):
788
- day.cronEvery = '10'
789
- day.cronDaysNearestWeekday = days.split('W')[0]
790
- break
791
- default:
792
- day.cronEvery = '1'
793
- }
794
- } else {
795
- switch (true) {
796
- case weeks.includes('/'):
797
- day.cronEvery = '2'
798
- week.incrementStart = weeks.split('/')[0]
799
- week.incrementIncrement = weeks.split('/')[1]
800
- break
801
- case weeks.includes(','):
802
- day.cronEvery = '4'
803
- week.specificSpecific = weeks.split(',').map(Number).sort()
804
- break
805
- case weeks.includes('#'):
806
- day.cronEvery = '11'
807
- week.cronNthDayDay = weeks.split('#')[0]
808
- week.cronNthDayNth = weeks.split('#')[1]
809
- break
810
- default:
811
- day.cronEvery = '1'
812
- week.cronEvery = '1'
813
- }
814
- }
815
- this.result.day = day
816
- this.result.week = week
817
- },
818
- monthsReverseExp(cron) {
819
- let months = cron.split(' ')[4]
820
- let month = {
821
- cronEvery: '',
822
- incrementStart: 3,
823
- incrementIncrement: 5,
824
- rangeStart: 1,
825
- rangeEnd: 1,
826
- specificSpecific: [],
827
- }
828
- switch (true) {
829
- case months.includes('*'):
830
- month.cronEvery = '1'
831
- break
832
- case months.includes('/'):
833
- month.cronEvery = '2'
834
- month.incrementStart = months.split('/')[0]
835
- month.incrementIncrement = months.split('/')[1]
836
- break
837
- case months.includes(','):
838
- month.cronEvery = '3'
839
- month.specificSpecific = months.split(',').map(Number).sort()
840
- break
841
- case months.includes('-'):
842
- month.cronEvery = '4'
843
- month.rangeStart = months.split('-')[0]
844
- month.rangeEnd = months.split('-')[1]
845
- break
846
- default:
847
- month.cronEvery = '1'
848
- }
849
- this.result.month = month
850
- },
851
- yearReverseExp(cron) {
852
- let years = cron.split(' ')[6]
853
- let year = {
854
- cronEvery: '',
855
- incrementStart: 3,
856
- incrementIncrement: 5,
857
- rangeStart: 2019,
858
- rangeEnd: 2019,
859
- specificSpecific: [],
860
- }
861
- switch (true) {
862
- case years.includes('*'):
863
- year.cronEvery = '1'
864
- break
865
- case years.includes('/'):
866
- year.cronEvery = '2'
867
- year.incrementStart = years.split('/')[0]
868
- year.incrementIncrement = years.split('/')[1]
869
- break
870
- case years.includes(','):
871
- year.cronEvery = '3'
872
- year.specificSpecific = years.split(',').map(Number).sort()
873
- break
874
- case years.includes('-'):
875
- year.cronEvery = '4'
876
- year.rangeStart = years.split('-')[0]
877
- year.rangeEnd = years.split('-')[1]
878
- break
879
- default:
880
- year.cronEvery = '1'
881
- }
882
- this.result.year = year
883
- },
884
- },
885
- })
886
- </script>
887
-
888
- <style lang="scss">
889
- .card-container {
890
- background: #fff;
891
- overflow: hidden;
892
- padding: 12px;
893
- position: relative;
894
- width: 100%;
895
- .tab-layout-tabs.ant-tabs {
896
- border: 1px solid #e6ebf5;
897
- padding: 0;
898
- .ant-tabs-bar {
899
- margin: 0;
900
- outline: none;
901
- border-bottom: none;
902
- .ant-tabs-nav-container {
903
- margin: 0;
904
- .ant-tabs-tab {
905
- padding: 0 24px !important;
906
- background-color: #f5f7fa !important;
907
- margin-right: 0px !important;
908
- border-radius: 0;
909
- line-height: 38px;
910
- border: 1px solid transparent !important;
911
- border-bottom: 1px solid #e6ebf5 !important;
912
- }
913
- .ant-tabs-tab-active.ant-tabs-tab {
914
- color: #409eff;
915
- background-color: #fff !important;
916
- border-right: 1px solid #e6ebf5 !important;
917
- border-left: 1px solid #e6ebf5 !important;
918
- border-bottom: 1px solid #fff !important;
919
- font-weight: normal;
920
- transition: none !important;
921
- }
922
- }
923
- }
924
- .ant-tabs-tabpane {
925
- padding: 15px;
926
- .ant-row {
927
- margin: 10px 0;
928
- }
929
- .ant-select,
930
- .ant-input-number {
931
- width: 100px;
932
- }
933
- }
934
- }
935
- }
936
- </style>
937
- <style lang="scss" scoped>
938
- .container-widthEn {
939
- width: 755px;
940
- }
941
- .container-widthCn {
942
- width: 608px;
943
- }
944
- .language {
945
- text-align: center;
946
- position: absolute;
947
- right: 13px;
948
- top: 13px;
949
- border: 1px solid transparent;
950
- height: 40px;
951
- line-height: 38px;
952
- font-size: 16px;
953
- color: #409eff;
954
- z-index: 1;
955
- background: #f5f7fa;
956
- outline: none;
957
- width: 47px;
958
- border-bottom: 1px solid #e6ebf5;
959
- border-radius: 0;
960
- }
961
- .card-container {
962
- .bottom {
963
- display: flex;
964
- justify-content: center;
965
- padding: 10px 0 0 0;
966
- .cronButton {
967
- margin: 0 10px;
968
- line-height: 40px;
969
- }
970
- }
971
- }
972
- .tabBody {
973
- .a-row {
974
- margin: 10px 0;
975
- .long {
976
- .a-select {
977
- width: 354px;
978
- }
979
- }
980
- .a-input-number {
981
- width: 110px;
982
- }
983
- }
984
- }
985
- </style>