@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.
- package/.eslintignore +4 -0
- package/.eslintrc.cjs +22 -0
- package/.prettierignore +4 -0
- package/.prettierrc.cjs +41 -0
- package/.vscode/extensions.json +3 -0
- package/README.md +16 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +14234 -0
- package/dist/index.umd.js +311 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +143 -0
- package/dist/lib/components/QAccountList/src/useConfigData.d.ts +37 -0
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +66 -0
- package/dist/lib/components/QBackgroundFileTaskList/src/useConfigData.d.ts +14 -0
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +80 -0
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +44 -0
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +68 -0
- package/dist/lib/components/QElsEmailSendLogList/src/useConfigData.d.ts +13 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +72 -0
- package/dist/lib/components/QElsMsgRecordList/src/useConfigData.d.ts +16 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +75 -0
- package/dist/lib/components/QI18nList/src/QI18nForm.vue.d.ts +47 -0
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +136 -0
- package/dist/lib/components/QI18nList/src/useConfigData.d.ts +31 -0
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +61 -0
- package/dist/lib/components/QImChatGroupList/src/useConfigData.d.ts +11 -0
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +60 -0
- package/dist/lib/components/QMqRecordList/src/useConfigData.d.ts +12 -0
- package/dist/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue.d.ts +49 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +3 -0
- package/dist/lib/components/QPermissionDataList/src/form.vue.d.ts +50 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +86 -0
- package/dist/lib/components/QPurchaseNoticeList/src/useConfigData.d.ts +15 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +47 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.d.ts +12 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +129 -0
- package/dist/lib/components/QQuartzJobList/src/components/JCron.vue.d.ts +23 -0
- package/dist/lib/components/QQuartzJobList/src/components/JCronModal.vue.d.ts +100 -0
- package/dist/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue.d.ts +55 -0
- package/dist/lib/components/QQuartzJobList/src/useConfigData.d.ts +20 -0
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +100 -0
- package/dist/lib/components/QRoleList/src/components/content-header/index.d.ts +23 -0
- package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +79 -0
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +30 -0
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue.d.ts +55 -0
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +104 -0
- package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +29 -0
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +49 -0
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +14 -0
- package/dist/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue.d.ts +31 -0
- package/dist/lib/components/QcustomConfigEdit/component/dataFormatComponent.d.ts +46 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +41 -0
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigRender.d.ts +12 -0
- package/dist/lib/components/QcustomConfigEdit/src/types.d.ts +61 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigComputed.d.ts +7 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +85 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigMethods.d.ts +16 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConstant.d.ts +18 -0
- package/dist/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue.d.ts +50 -0
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +112 -0
- package/dist/lib/components/QcustomConfigList/src/useConfigData.d.ts +17 -0
- package/dist/lib/components/QcustomConfigList/src/useMethods.d.ts +15 -0
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +66 -0
- package/dist/lib/components/QsysConfigList/src/useConfigData.d.ts +11 -0
- package/dist/lib/components/QsysConfigList/src/useMethods.d.ts +6 -0
- package/dist/lib/components/index.d.ts +39 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +107 -0
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +70 -0
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +61 -0
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +46 -0
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +45 -0
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +45 -0
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +53 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/utils/global.hook.d.ts +31 -0
- package/dist/lib/utils/global.types.d.ts +41 -0
- package/dist/lib/utils/regexp.d.ts +27 -0
- package/dist/style.css +1 -0
- package/dist/vite-env.d.ts +13 -0
- package/dist/vite.svg +1 -0
- package/index.html +13 -0
- package/package.json +65 -0
- package/public/vite.svg +1 -0
- package/src/App.vue +8 -0
- package/src/lib/components/QAccountList/index.ts +6 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +191 -0
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +241 -0
- package/src/lib/components/QAccountList/src/QAccountList.vue +530 -0
- package/src/lib/components/QAccountList/src/useConfigData.ts +53 -0
- package/src/lib/components/QBackgroundFileTaskList/index.ts +6 -0
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +137 -0
- package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +20 -0
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +291 -0
- package/src/lib/components/QCompanyermissionList/src/form.vue +238 -0
- package/src/lib/components/QCompanyermissionList/src/index.vue +309 -0
- package/src/lib/components/QCompanyermissionList/src/types.ts +44 -0
- package/src/lib/components/QElsEmailSendLogList/index.ts +6 -0
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +166 -0
- package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +19 -0
- package/src/lib/components/QElsMsgRecordList/index.ts +6 -0
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +148 -0
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +124 -0
- package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +22 -0
- package/src/lib/components/QElsTenantPortalNewsList/index.ts +6 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +139 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +196 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +122 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +20 -0
- package/src/lib/components/QI18nList/index.ts +6 -0
- package/src/lib/components/QI18nList/src/QI18nForm.vue +141 -0
- package/src/lib/components/QI18nList/src/QI18nList.vue +361 -0
- package/src/lib/components/QI18nList/src/useConfigData.ts +37 -0
- package/src/lib/components/QImChatGroupList/index.ts +6 -0
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +94 -0
- package/src/lib/components/QImChatGroupList/src/useConfigData.ts +17 -0
- package/src/lib/components/QMqRecordList/index.ts +6 -0
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +105 -0
- package/src/lib/components/QMqRecordList/src/useConfigData.ts +18 -0
- package/src/lib/components/QPasswordSecurityPolicy/index.ts +6 -0
- package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +266 -0
- package/src/lib/components/QPermissionDataList/index.ts +6 -0
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -0
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +221 -0
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +117 -0
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -0
- package/src/lib/components/QPurchaseNoticeList/index.ts +6 -0
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +147 -0
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +244 -0
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +163 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -0
- package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +6 -0
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +85 -0
- package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +18 -0
- package/src/lib/components/QQuartzJobList/index.ts +6 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +263 -0
- package/src/lib/components/QQuartzJobList/src/components/JCron.vue +82 -0
- package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +985 -0
- package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +176 -0
- package/src/lib/components/QQuartzJobList/src/useConfigData.ts +26 -0
- package/src/lib/components/QRoleList/index.ts +6 -0
- package/src/lib/components/QRoleList/src/QRoleList.vue +288 -0
- package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +31 -0
- package/src/lib/components/QRoleList/src/components/content-header/index.tsx +42 -0
- package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +690 -0
- package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +97 -0
- package/src/lib/components/QRoleList/src/useConfigData.ts +33 -0
- package/src/lib/components/QSupplierAccountList/index.ts +6 -0
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +187 -0
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +302 -0
- package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +29 -0
- package/src/lib/components/QUsageList/index.ts +6 -0
- package/src/lib/components/QUsageList/src/QUsageList.vue +82 -0
- package/src/lib/components/QUsageList/src/useConfigData.ts +20 -0
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -0
- package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +100 -0
- package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +100 -0
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +71 -0
- package/src/lib/components/QcustomConfigEdit/index.ts +6 -0
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +1807 -0
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +242 -0
- package/src/lib/components/QcustomConfigEdit/src/types.ts +71 -0
- package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +75 -0
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +123 -0
- package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +117 -0
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +301 -0
- package/src/lib/components/QcustomConfigEdit/style/index.less +41 -0
- package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +135 -0
- package/src/lib/components/QcustomConfigList/index.ts +6 -0
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +268 -0
- package/src/lib/components/QcustomConfigList/src/types.ts +1 -0
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +23 -0
- package/src/lib/components/QcustomConfigList/src/useMethods.ts +36 -0
- package/src/lib/components/QcustomConfigList/style/index.less +3 -0
- package/src/lib/components/QsysConfigList/index.ts +6 -0
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +125 -0
- package/src/lib/components/QsysConfigList/src/types.ts +1 -0
- package/src/lib/components/QsysConfigList/src/useConfigData.ts +17 -0
- package/src/lib/components/QsysConfigList/src/useMethods.ts +11 -0
- package/src/lib/components/QsysConfigList/style/index.less +3 -0
- package/src/lib/components/index.ts +78 -0
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +49 -0
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +143 -0
- package/src/lib/components/integratedNodesList/src/index.vue +136 -0
- package/src/lib/components/integratedReportList/src/index.vue +86 -0
- package/src/lib/components/integratedReportSearchList/src/index.vue +66 -0
- package/src/lib/components/loginAbnormalLogList/src/index.vue +50 -0
- package/src/lib/components/loginLogList/src/index.vue +57 -0
- package/src/lib/components/loginSupplierLogList/src/index.vue +63 -0
- package/src/lib/components/operateLogList/src/index.vue +57 -0
- package/src/lib/index.ts +15 -0
- package/src/lib/utils/constant.ts +1 -0
- package/src/lib/utils/global.hook.ts +337 -0
- package/src/lib/utils/global.types.ts +49 -0
- package/src/lib/utils/regexp.ts +143 -0
- package/src/main.ts +11 -0
- package/src/vite-env.d.ts +13 -0
- package/tsconfig.json +24 -0
- package/tsconfig.node.json +9 -0
- package/vite.config.ts +61 -0
|
@@ -0,0 +1,985 @@
|
|
|
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>
|