From 2af534eea471f4adb104906c7a814bcc66d4d68d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 13 九月 2021 13:03:58 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev --- ruoyi-ui/src/components/ThemePicker/index.vue | 11 ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java | 5 ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java | 5 ruoyi-ui/src/views/tool/gen/index.vue | 7 ruoyi-ui/src/views/system/menu/index.vue | 39 pom.xml | 4 ruoyi-ui/src/components/Crontab/week.vue | 334 ++-- ruoyi-quartz/pom.xml | 2 ruoyi-ui/src/views/tool/gen/editTable.vue | 4 ruoyi-ui/src/layout/components/Sidebar/Link.vue | 2 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java | 1 ruoyi-ui/src/components/Crontab/result.vue | 1132 ++++++++-------- ruoyi-ui/src/router/index.js | 27 ruoyi-ui/src/components/Crontab/month.vue | 256 ++-- ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue | 8 ruoyi-framework/pom.xml | 2 ruoyi-admin/pom.xml | 2 ruoyi-system/pom.xml | 2 ruoyi-ui/src/components/ImageUpload/index.vue | 21 sql/quartz.sql | 6 ruoyi-ui/src/components/Crontab/second.vue | 266 ++-- ruoyi-ui/src/components/Crontab/day.vue | 358 ++-- ruoyi-ui/src/utils/request.js | 2 ruoyi-ui/src/components/Crontab/index.vue | 850 ++++++------ ruoyi-ui/src/components/Crontab/year.vue | 288 ++-- sql/ry_20210908.sql | 171 +- ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml | 10 27 files changed, 1,919 insertions(+), 1,896 deletions(-) diff --git a/pom.xml b/pom.xml index eba5a16..5d46d4e 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ <docker.namespace>ruoyi</docker.namespace> <docker.plugin.version>1.2.2</docker.plugin.version> </properties> - + <!-- 渚濊禆澹版槑 --> <dependencyManagement> <dependencies> @@ -362,4 +362,4 @@ </profile> </profiles> -</project> +</project> \ No newline at end of file diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index b455a5e..f3d9ca9 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -110,4 +110,4 @@ </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java index 6fc8641..d2c5bbf 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java @@ -66,6 +66,11 @@ @Size(min = 0, max = 200, message = "缁勪欢璺緞涓嶈兘瓒呰繃255涓瓧绗�") private String component; + /** + * 璺敱鍙傛暟 + */ + private String query; + /** * 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 */ diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 918a4cc..680e6ec 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -69,4 +69,4 @@ </dependencies> -</project> +</project> \ No newline at end of file diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml index aa4faf5..cba3e92 100644 --- a/ruoyi-quartz/pom.xml +++ b/ruoyi-quartz/pom.xml @@ -37,4 +37,4 @@ </dependencies> -</project> +</project> \ No newline at end of file diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index 8e536cc..8d1d85f 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -31,4 +31,4 @@ </dependencies> -</project> +</project> \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java index 455563a..387adb4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java @@ -42,6 +42,11 @@ private String component; /** + * 璺敱鍙傛暟锛氬 {"id": 1, "name": "ry"} + */ + private String query; + + /** * 褰撲綘涓�涓矾鐢变笅闈㈢殑 children 澹版槑鐨勮矾鐢卞ぇ浜�1涓椂锛岃嚜鍔ㄤ細鍙樻垚宓屽鐨勬ā寮�--濡傜粍浠堕〉闈� */ private Boolean alwaysShow; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index a1a9422..a32c680 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -135,6 +135,7 @@ router.setName(getRouteName(menu)); router.setPath(getRouterPath(menu)); router.setComponent(getComponent(menu)); + router.setQuery(menu.getQuery()); router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); List<SysMenu> cMenus = menu.getChildren(); if (!cMenus.isEmpty() && UserConstants.TYPE_DIR.equals(menu.getMenuType())) { diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index ca4ef65..756eb53 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -12,7 +12,8 @@ <result property="orderNum" column="order_num"/> <result property="path" column="path"/> <result property="component" column="component"/> - <result property="isFrame" column="is_frame"/> + <result property="query" column="query"/> + <result property="isFrame" column="is_frame"/> <result property="isCache" column="is_cache"/> <result property="menuType" column="menu_type"/> <result property="visible" column="visible"/> @@ -33,6 +34,7 @@ order_num, path, component, + query, is_frame, is_cache, menu_type, @@ -51,7 +53,8 @@ m.menu_name, m.path, m.component, - m.visible, + m.query, + m.visible, m.status, ifnull(m.perms, '') as perms, m.is_frame, @@ -67,7 +70,7 @@ </select> <select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult"> - select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, + select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id @@ -92,6 +95,7 @@ m.menu_name, m.path, m.component, + m.query, m.visible, m.status, ifnull(m.perms, '') as perms, diff --git a/ruoyi-ui/src/components/Crontab/day.vue b/ruoyi-ui/src/components/Crontab/day.vue index 7f0a3d2..bf9f566 100644 --- a/ruoyi-ui/src/components/Crontab/day.vue +++ b/ruoyi-ui/src/components/Crontab/day.vue @@ -1,179 +1,179 @@ -<template> - <el-form size="small"> - <el-form-item> - <el-radio v-model='radioValue' :label="1"> - 鏃ワ紝鍏佽鐨勯�氶厤绗, - * / L M] - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="2"> - 涓嶆寚瀹� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="3"> - 鍛ㄦ湡浠� - <el-input-number v-model='cycle01' :min="0" :max="31" /> - - <el-input-number v-model='cycle02' :min="0" :max="31" /> 鏃� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="4"> - 浠� - <el-input-number v-model='average01' :min="0" :max="31" /> 鍙峰紑濮嬶紝姣� - <el-input-number v-model='average02' :min="0" :max="31" /> 鏃ユ墽琛屼竴娆� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="5"> - 姣忔湀 - <el-input-number v-model='workday' :min="0" :max="31" /> 鍙锋渶杩戠殑閭d釜宸ヤ綔鏃� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="6"> - 鏈湀鏈�鍚庝竴澶� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="7"> - 鎸囧畾 - <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> - <el-option v-for="item in 31" :key="item" :value="item">{{item}}</el-option> - </el-select> - </el-radio> - </el-form-item> - </el-form> -</template> - -<script> -export default { - data() { - return { - radioValue: 1, - workday: 1, - cycle01: 1, - cycle02: 2, - average01: 1, - average02: 1, - checkboxList: [], - checkNum: this.$options.propsData.check - } - }, - name: 'crontab-day', - props: ['check', 'cron'], - methods: { - // 鍗曢�夋寜閽�煎彉鍖栨椂 - radioChange() { - ('day rachange'); - if (this.radioValue === 1) { - this.$emit('update', 'day', '*', 'day'); - this.$emit('update', 'week', '?', 'day'); - this.$emit('update', 'mouth', '*', 'day'); - } else { - if (this.cron.hour === '*') { - this.$emit('update', 'hour', '0', 'day'); - } - if (this.cron.min === '*') { - this.$emit('update', 'min', '0', 'day'); - } - if (this.cron.second === '*') { - this.$emit('update', 'second', '0', 'day'); - } - } - - switch (this.radioValue) { - case 2: - this.$emit('update', 'day', '?'); - break; - case 3: - this.$emit('update', 'day', this.cycle01 + '-' + this.cycle02); - break; - case 4: - this.$emit('update', 'day', this.average01 + '/' + this.average02); - break; - case 5: - this.$emit('update', 'day', this.workday + 'W'); - break; - case 6: - this.$emit('update', 'day', 'L'); - break; - case 7: - this.$emit('update', 'day', this.checkboxString); - break; - } - ('day rachange end'); - }, - // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 - cycleChange() { - if (this.radioValue == '3') { - this.$emit('update', 'day', this.cycleTotal); - } - }, - // 骞冲潎涓や釜鍊煎彉鍖栨椂 - averageChange() { - if (this.radioValue == '4') { - this.$emit('update', 'day', this.averageTotal); - } - }, - // 鏈�杩戝伐浣滄棩鍊煎彉鍖栨椂 - workdayChange() { - if (this.radioValue == '5') { - this.$emit('update', 'day', this.workday + 'W'); - } - }, - // checkbox鍊煎彉鍖栨椂 - checkboxChange() { - if (this.radioValue == '7') { - this.$emit('update', 'day', this.checkboxString); - } - }, - // 鐖剁粍浠朵紶閫掔殑week鍙戠敓鍙樺寲瑙﹀彂 - weekChange() { - //鍒ゆ柇week鍊间笌day涓嶈兘鍚屾椂涓衡��?鈥� - if (this.cron.week == '?' && this.radioValue == '2') { - this.radioValue = '1'; - } else if (this.cron.week !== '?' && this.radioValue != '2') { - this.radioValue = '2'; - } - }, - }, - watch: { - "radioValue": "radioChange", - 'cycleTotal': 'cycleChange', - 'averageTotal': 'averageChange', - 'workdayCheck': 'workdayChange', - 'checkboxString': 'checkboxChange', - }, - computed: { - // 璁$畻涓や釜鍛ㄦ湡鍊� - cycleTotal: function () { - this.cycle01 = this.checkNum(this.cycle01, 1, 31) - this.cycle02 = this.checkNum(this.cycle02, 1, 31) - return this.cycle01 + '-' + this.cycle02; - }, - // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� - averageTotal: function () { - this.average01 = this.checkNum(this.average01, 1, 31) - this.average02 = this.checkNum(this.average02, 1, 31) - return this.average01 + '/' + this.average02; - }, - // 璁$畻宸ヤ綔鏃ユ牸寮� - workdayCheck: function () { - this.workday = this.checkNum(this.workday, 1, 31) - return this.workday; - }, - // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� - checkboxString: function () { - let str = this.checkboxList.join(); - return str == '' ? '*' : str; - } - } -} -</script> \ No newline at end of file +<template> + <el-form size="small"> + <el-form-item> + <el-radio v-model='radioValue' :label="1"> + 鏃ワ紝鍏佽鐨勯�氶厤绗, - * / L M] + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="2"> + 涓嶆寚瀹� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="3"> + 鍛ㄦ湡浠� + <el-input-number v-model='cycle01' :min="0" :max="31" /> - + <el-input-number v-model='cycle02' :min="0" :max="31" /> 鏃� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="4"> + 浠� + <el-input-number v-model='average01' :min="0" :max="31" /> 鍙峰紑濮嬶紝姣� + <el-input-number v-model='average02' :min="0" :max="31" /> 鏃ユ墽琛屼竴娆� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="5"> + 姣忔湀 + <el-input-number v-model='workday' :min="0" :max="31" /> 鍙锋渶杩戠殑閭d釜宸ヤ綔鏃� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="6"> + 鏈湀鏈�鍚庝竴澶� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="7"> + 鎸囧畾 + <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> + <el-option v-for="item in 31" :key="item" :value="item">{{item}}</el-option> + </el-select> + </el-radio> + </el-form-item> + </el-form> +</template> + +<script> +export default { + data() { + return { + radioValue: 1, + workday: 1, + cycle01: 1, + cycle02: 2, + average01: 1, + average02: 1, + checkboxList: [], + checkNum: this.$options.propsData.check + } + }, + name: 'crontab-day', + props: ['check', 'cron'], + methods: { + // 鍗曢�夋寜閽�煎彉鍖栨椂 + radioChange() { + ('day rachange'); + if (this.radioValue === 1) { + this.$emit('update', 'day', '*', 'day'); + this.$emit('update', 'week', '?', 'day'); + this.$emit('update', 'month', '*', 'day'); + } else { + if (this.cron.hour === '*') { + this.$emit('update', 'hour', '0', 'day'); + } + if (this.cron.min === '*') { + this.$emit('update', 'min', '0', 'day'); + } + if (this.cron.second === '*') { + this.$emit('update', 'second', '0', 'day'); + } + } + + switch (this.radioValue) { + case 2: + this.$emit('update', 'day', '?'); + break; + case 3: + this.$emit('update', 'day', this.cycle01 + '-' + this.cycle02); + break; + case 4: + this.$emit('update', 'day', this.average01 + '/' + this.average02); + break; + case 5: + this.$emit('update', 'day', this.workday + 'W'); + break; + case 6: + this.$emit('update', 'day', 'L'); + break; + case 7: + this.$emit('update', 'day', this.checkboxString); + break; + } + ('day rachange end'); + }, + // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 + cycleChange() { + if (this.radioValue == '3') { + this.$emit('update', 'day', this.cycleTotal); + } + }, + // 骞冲潎涓や釜鍊煎彉鍖栨椂 + averageChange() { + if (this.radioValue == '4') { + this.$emit('update', 'day', this.averageTotal); + } + }, + // 鏈�杩戝伐浣滄棩鍊煎彉鍖栨椂 + workdayChange() { + if (this.radioValue == '5') { + this.$emit('update', 'day', this.workday + 'W'); + } + }, + // checkbox鍊煎彉鍖栨椂 + checkboxChange() { + if (this.radioValue == '7') { + this.$emit('update', 'day', this.checkboxString); + } + }, + // 鐖剁粍浠朵紶閫掔殑week鍙戠敓鍙樺寲瑙﹀彂 + weekChange() { + //鍒ゆ柇week鍊间笌day涓嶈兘鍚屾椂涓衡��?鈥� + if (this.cron.week == '?' && this.radioValue == '2') { + this.radioValue = '1'; + } else if (this.cron.week !== '?' && this.radioValue != '2') { + this.radioValue = '2'; + } + }, + }, + watch: { + "radioValue": "radioChange", + 'cycleTotal': 'cycleChange', + 'averageTotal': 'averageChange', + 'workdayCheck': 'workdayChange', + 'checkboxString': 'checkboxChange', + }, + computed: { + // 璁$畻涓や釜鍛ㄦ湡鍊� + cycleTotal: function () { + this.cycle01 = this.checkNum(this.cycle01, 1, 31) + this.cycle02 = this.checkNum(this.cycle02, 1, 31) + return this.cycle01 + '-' + this.cycle02; + }, + // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� + averageTotal: function () { + this.average01 = this.checkNum(this.average01, 1, 31) + this.average02 = this.checkNum(this.average02, 1, 31) + return this.average01 + '/' + this.average02; + }, + // 璁$畻宸ヤ綔鏃ユ牸寮� + workdayCheck: function () { + this.workday = this.checkNum(this.workday, 1, 31) + return this.workday; + }, + // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� + checkboxString: function () { + let str = this.checkboxList.join(); + return str == '' ? '*' : str; + } + } +} +</script> diff --git a/ruoyi-ui/src/components/Crontab/index.vue b/ruoyi-ui/src/components/Crontab/index.vue index c1d08f6..27b4ab3 100644 --- a/ruoyi-ui/src/components/Crontab/index.vue +++ b/ruoyi-ui/src/components/Crontab/index.vue @@ -1,425 +1,425 @@ -<template> - <div> - <el-tabs type="border-card"> - <el-tab-pane label="绉�" v-if="shouldHide('second')"> - <CrontabSecond @update="updateContabValue" :check="checkNumber" ref="cronsecond" /> - </el-tab-pane> - - <el-tab-pane label="鍒嗛挓" v-if="shouldHide('min')"> - <CrontabMin - @update="updateContabValue" - :check="checkNumber" - :cron="contabValueObj" - ref="cronmin" - /> - </el-tab-pane> - - <el-tab-pane label="灏忔椂" v-if="shouldHide('hour')"> - <CrontabHour - @update="updateContabValue" - :check="checkNumber" - :cron="contabValueObj" - ref="cronhour" - /> - </el-tab-pane> - - <el-tab-pane label="鏃�" v-if="shouldHide('day')"> - <CrontabDay - @update="updateContabValue" - :check="checkNumber" - :cron="contabValueObj" - ref="cronday" - /> - </el-tab-pane> - - <el-tab-pane label="鏈�" v-if="shouldHide('mouth')"> - <CrontabMouth - @update="updateContabValue" - :check="checkNumber" - :cron="contabValueObj" - ref="cronmouth" - /> - </el-tab-pane> - - <el-tab-pane label="鍛�" v-if="shouldHide('week')"> - <CrontabWeek - @update="updateContabValue" - :check="checkNumber" - :cron="contabValueObj" - ref="cronweek" - /> - </el-tab-pane> - - <el-tab-pane label="骞�" v-if="shouldHide('year')"> - <CrontabYear - @update="updateContabValue" - :check="checkNumber" - :cron="contabValueObj" - ref="cronyear" - /> - </el-tab-pane> - </el-tabs> - - <div class="popup-main"> - <div class="popup-result"> - <p class="title">鏃堕棿琛ㄨ揪寮�</p> - <table> - <thead> - <th v-for="item of tabTitles" width="40" :key="item">{{item}}</th> - <th>Cron 琛ㄨ揪寮�</th> - </thead> - <tbody> - <td> - <span>{{contabValueObj.second}}</span> - </td> - <td> - <span>{{contabValueObj.min}}</span> - </td> - <td> - <span>{{contabValueObj.hour}}</span> - </td> - <td> - <span>{{contabValueObj.day}}</span> - </td> - <td> - <span>{{contabValueObj.mouth}}</span> - </td> - <td> - <span>{{contabValueObj.week}}</span> - </td> - <td> - <span>{{contabValueObj.year}}</span> - </td> - <td> - <span>{{contabValueString}}</span> - </td> - </tbody> - </table> - </div> - <CrontabResult :ex="contabValueString"></CrontabResult> - - <div class="pop_btn"> - <el-button size="small" type="primary" @click="submitFill">纭畾</el-button> - <el-button size="small" type="warning" @click="clearCron">閲嶇疆</el-button> - <el-button size="small" @click="hidePopup">鍙栨秷</el-button> - </div> - </div> - </div> -</template> - -<script> -import CrontabSecond from "./second.vue"; -import CrontabMin from "./min.vue"; -import CrontabHour from "./hour.vue"; -import CrontabDay from "./day.vue"; -import CrontabMouth from "./mouth.vue"; -import CrontabWeek from "./week.vue"; -import CrontabYear from "./year.vue"; -import CrontabResult from "./result.vue"; - -export default { - data() { - return { - tabTitles: ["绉�", "鍒嗛挓", "灏忔椂", "鏃�", "鏈�", "鍛�", "骞�"], - tabActive: 0, - myindex: 0, - contabValueObj: { - second: "*", - min: "*", - hour: "*", - day: "*", - mouth: "*", - week: "?", - year: "", - }, - }; - }, - name: "vcrontab", - props: ["expression", "hideComponent"], - methods: { - shouldHide(key) { - if (this.hideComponent && this.hideComponent.includes(key)) return false; - return true; - }, - resolveExp() { - //鍙嶈В鏋� 琛ㄨ揪寮� - if (this.expression) { - let arr = this.expression.split(" "); - if (arr.length >= 6) { - //6 浣嶄互涓婃槸鍚堟硶琛ㄨ揪寮� - let obj = { - second: arr[0], - min: arr[1], - hour: arr[2], - day: arr[3], - mouth: arr[4], - week: arr[5], - year: arr[6] ? arr[6] : "", - }; - this.contabValueObj = { - ...obj, - }; - for (let i in obj) { - if (obj[i]) this.changeRadio(i, obj[i]); - } - } - } else { - //娌℃湁浼犲叆鐨勮〃杈惧紡 鍒欒繕鍘� - this.clearCron(); - } - }, - // tab鍒囨崲鍊� - tabCheck(index) { - this.tabActive = index; - }, - // 鐢卞瓙缁勪欢瑙﹀彂锛屾洿鏀硅〃杈惧紡缁勬垚鐨勫瓧娈靛�� - updateContabValue(name, value, from) { - "updateContabValue", name, value, from; - this.contabValueObj[name] = value; - if (from && from !== name) { - console.log(`鏉ヨ嚜缁勪欢 ${from} 鏀瑰彉浜� ${name} ${value}`); - this.changeRadio(name, value); - } - }, - //璧嬪�煎埌缁勪欢 - changeRadio(name, value) { - let arr = ["second", "min", "hour", "mouth"], - refName = "cron" + name, - insVlaue; - - if (!this.$refs[refName]) return; - - if (arr.includes(name)) { - if (value === "*") { - insVlaue = 1; - } else if (value.indexOf("-") > -1) { - let indexArr = value.split("-"); - isNaN(indexArr[0]) - ? (this.$refs[refName].cycle01 = 0) - : (this.$refs[refName].cycle01 = indexArr[0]); - this.$refs[refName].cycle02 = indexArr[1]; - insVlaue = 2; - } else if (value.indexOf("/") > -1) { - let indexArr = value.split("/"); - isNaN(indexArr[0]) - ? (this.$refs[refName].average01 = 0) - : (this.$refs[refName].average01 = indexArr[0]); - this.$refs[refName].average02 = indexArr[1]; - insVlaue = 3; - } else { - insVlaue = 4; - this.$refs[refName].checkboxList = value.split(","); - } - } else if (name == "day") { - if (value === "*") { - insVlaue = 1; - } else if (value == "?") { - insVlaue = 2; - } else if (value.indexOf("-") > -1) { - let indexArr = value.split("-"); - isNaN(indexArr[0]) - ? (this.$refs[refName].cycle01 = 0) - : (this.$refs[refName].cycle01 = indexArr[0]); - this.$refs[refName].cycle02 = indexArr[1]; - insVlaue = 3; - } else if (value.indexOf("/") > -1) { - let indexArr = value.split("/"); - isNaN(indexArr[0]) - ? (this.$refs[refName].average01 = 0) - : (this.$refs[refName].average01 = indexArr[0]); - this.$refs[refName].average02 = indexArr[1]; - insVlaue = 4; - } else if (value.indexOf("W") > -1) { - let indexArr = value.split("W"); - isNaN(indexArr[0]) - ? (this.$refs[refName].workday = 0) - : (this.$refs[refName].workday = indexArr[0]); - insVlaue = 5; - } else if (value === "L") { - insVlaue = 6; - } else { - this.$refs[refName].checkboxList = value.split(","); - insVlaue = 7; - } - } else if (name == "week") { - if (value === "*") { - insVlaue = 1; - } else if (value == "?") { - insVlaue = 2; - } else if (value.indexOf("-") > -1) { - let indexArr = value.split("-"); - isNaN(indexArr[0]) - ? (this.$refs[refName].cycle01 = 0) - : (this.$refs[refName].cycle01 = indexArr[0]); - this.$refs[refName].cycle02 = indexArr[1]; - insVlaue = 3; - } else if (value.indexOf("#") > -1) { - let indexArr = value.split("#"); - isNaN(indexArr[0]) - ? (this.$refs[refName].average01 = 1) - : (this.$refs[refName].average01 = indexArr[0]); - this.$refs[refName].average02 = indexArr[1]; - insVlaue = 4; - } else if (value.indexOf("L") > -1) { - let indexArr = value.split("L"); - isNaN(indexArr[0]) - ? (this.$refs[refName].weekday = 1) - : (this.$refs[refName].weekday = indexArr[0]); - insVlaue = 5; - } else { - this.$refs[refName].checkboxList = value.split(","); - insVlaue = 7; - } - } else if (name == "year") { - if (value == "") { - insVlaue = 1; - } else if (value == "*") { - insVlaue = 2; - } else if (value.indexOf("-") > -1) { - insVlaue = 3; - } else if (value.indexOf("/") > -1) { - insVlaue = 4; - } else { - this.$refs[refName].checkboxList = value.split(","); - insVlaue = 5; - } - } - this.$refs[refName].radioValue = insVlaue; - }, - // 琛ㄥ崟閫夐」鐨勫瓙缁勪欢鏍¢獙鏁板瓧鏍煎紡锛堥�氳繃-props浼犻�掞級 - checkNumber(value, minLimit, maxLimit) { - //妫�鏌ュ繀椤讳负鏁存暟 - value = Math.floor(value); - if (value < minLimit) { - value = minLimit; - } else if (value > maxLimit) { - value = maxLimit; - } - return value; - }, - // 闅愯棌寮圭獥 - hidePopup() { - this.$emit("hide"); - }, - // 濉厖琛ㄨ揪寮� - submitFill() { - this.$emit("fill", this.contabValueString); - this.hidePopup(); - }, - clearCron() { - // 杩樺師閫夋嫨椤� - ("鍑嗗杩樺師"); - this.contabValueObj = { - second: "*", - min: "*", - hour: "*", - day: "*", - mouth: "*", - week: "?", - year: "", - }; - for (let j in this.contabValueObj) { - this.changeRadio(j, this.contabValueObj[j]); - } - }, - }, - computed: { - contabValueString: function() { - let obj = this.contabValueObj; - let str = - obj.second + - " " + - obj.min + - " " + - obj.hour + - " " + - obj.day + - " " + - obj.mouth + - " " + - obj.week + - (obj.year == "" ? "" : " " + obj.year); - return str; - }, - }, - components: { - CrontabSecond, - CrontabMin, - CrontabHour, - CrontabDay, - CrontabMouth, - CrontabWeek, - CrontabYear, - CrontabResult, - }, - watch: { - expression: "resolveExp", - hideComponent(value) { - // 闅愯棌閮ㄥ垎缁勪欢 - }, - }, - mounted: function() { - this.resolveExp(); - }, -}; -</script> -<style scoped> -.pop_btn { - text-align: center; - margin-top: 20px; -} -.popup-main { - position: relative; - margin: 10px auto; - background: #fff; - border-radius: 5px; - font-size: 12px; - overflow: hidden; -} -.popup-title { - overflow: hidden; - line-height: 34px; - padding-top: 6px; - background: #f2f2f2; -} -.popup-result { - box-sizing: border-box; - line-height: 24px; - margin: 25px auto; - padding: 15px 10px 10px; - border: 1px solid #ccc; - position: relative; -} -.popup-result .title { - position: absolute; - top: -28px; - left: 50%; - width: 140px; - font-size: 14px; - margin-left: -70px; - text-align: center; - line-height: 30px; - background: #fff; -} -.popup-result table { - text-align: center; - width: 100%; - margin: 0 auto; -} -.popup-result table span { - display: block; - width: 100%; - font-family: arial; - line-height: 30px; - height: 30px; - white-space: nowrap; - overflow: hidden; - border: 1px solid #e8e8e8; -} -.popup-result-scroll { - font-size: 12px; - line-height: 24px; - height: 10em; - overflow-y: auto; -} -</style> +<template> + <div> + <el-tabs type="border-card"> + <el-tab-pane label="绉�" v-if="shouldHide('second')"> + <CrontabSecond @update="updateCrontabValue" :check="checkNumber" ref="cronsecond" /> + </el-tab-pane> + + <el-tab-pane label="鍒嗛挓" v-if="shouldHide('min')"> + <CrontabMin + @update="updateCrontabValue" + :check="checkNumber" + :cron="crontabValueObj" + ref="cronmin" + /> + </el-tab-pane> + + <el-tab-pane label="灏忔椂" v-if="shouldHide('hour')"> + <CrontabHour + @update="updateCrontabValue" + :check="checkNumber" + :cron="crontabValueObj" + ref="cronhour" + /> + </el-tab-pane> + + <el-tab-pane label="鏃�" v-if="shouldHide('day')"> + <CrontabDay + @update="updateCrontabValue" + :check="checkNumber" + :cron="crontabValueObj" + ref="cronday" + /> + </el-tab-pane> + + <el-tab-pane label="鏈�" v-if="shouldHide('month')"> + <CrontabMonth + @update="updateCrontabValue" + :check="checkNumber" + :cron="crontabValueObj" + ref="cronmonth" + /> + </el-tab-pane> + + <el-tab-pane label="鍛�" v-if="shouldHide('week')"> + <CrontabWeek + @update="updateCrontabValue" + :check="checkNumber" + :cron="crontabValueObj" + ref="cronweek" + /> + </el-tab-pane> + + <el-tab-pane label="骞�" v-if="shouldHide('year')"> + <CrontabYear + @update="updateCrontabValue" + :check="checkNumber" + :cron="crontabValueObj" + ref="cronyear" + /> + </el-tab-pane> + </el-tabs> + + <div class="popup-main"> + <div class="popup-result"> + <p class="title">鏃堕棿琛ㄨ揪寮�</p> + <table> + <thead> + <th v-for="item of tabTitles" width="40" :key="item">{{item}}</th> + <th>Cron 琛ㄨ揪寮�</th> + </thead> + <tbody> + <td> + <span>{{crontabValueObj.second}}</span> + </td> + <td> + <span>{{crontabValueObj.min}}</span> + </td> + <td> + <span>{{crontabValueObj.hour}}</span> + </td> + <td> + <span>{{crontabValueObj.day}}</span> + </td> + <td> + <span>{{crontabValueObj.month}}</span> + </td> + <td> + <span>{{crontabValueObj.week}}</span> + </td> + <td> + <span>{{crontabValueObj.year}}</span> + </td> + <td> + <span>{{crontabValueString}}</span> + </td> + </tbody> + </table> + </div> + <CrontabResult :ex="crontabValueString"></CrontabResult> + + <div class="pop_btn"> + <el-button size="small" type="primary" @click="submitFill">纭畾</el-button> + <el-button size="small" type="warning" @click="clearCron">閲嶇疆</el-button> + <el-button size="small" @click="hidePopup">鍙栨秷</el-button> + </div> + </div> + </div> +</template> + +<script> +import CrontabSecond from "./second.vue"; +import CrontabMin from "./min.vue"; +import CrontabHour from "./hour.vue"; +import CrontabDay from "./day.vue"; +import CrontabMonth from "./month.vue"; +import CrontabWeek from "./week.vue"; +import CrontabYear from "./year.vue"; +import CrontabResult from "./result.vue"; + +export default { + data() { + return { + tabTitles: ["绉�", "鍒嗛挓", "灏忔椂", "鏃�", "鏈�", "鍛�", "骞�"], + tabActive: 0, + myindex: 0, + crontabValueObj: { + second: "*", + min: "*", + hour: "*", + day: "*", + month: "*", + week: "?", + year: "", + }, + }; + }, + name: "vcrontab", + props: ["expression", "hideComponent"], + methods: { + shouldHide(key) { + if (this.hideComponent && this.hideComponent.includes(key)) return false; + return true; + }, + resolveExp() { + // 鍙嶈В鏋� 琛ㄨ揪寮� + if (this.expression) { + let arr = this.expression.split(" "); + if (arr.length >= 6) { + //6 浣嶄互涓婃槸鍚堟硶琛ㄨ揪寮� + let obj = { + second: arr[0], + min: arr[1], + hour: arr[2], + day: arr[3], + month: arr[4], + week: arr[5], + year: arr[6] ? arr[6] : "", + }; + this.crontabValueObj = { + ...obj, + }; + for (let i in obj) { + if (obj[i]) this.changeRadio(i, obj[i]); + } + } + } else { + // 娌℃湁浼犲叆鐨勮〃杈惧紡 鍒欒繕鍘� + this.clearCron(); + } + }, + // tab鍒囨崲鍊� + tabCheck(index) { + this.tabActive = index; + }, + // 鐢卞瓙缁勪欢瑙﹀彂锛屾洿鏀硅〃杈惧紡缁勬垚鐨勫瓧娈靛�� + updateCrontabValue(name, value, from) { + "updateCrontabValue", name, value, from; + this.crontabValueObj[name] = value; + if (from && from !== name) { + console.log(`鏉ヨ嚜缁勪欢 ${from} 鏀瑰彉浜� ${name} ${value}`); + this.changeRadio(name, value); + } + }, + // 璧嬪�煎埌缁勪欢 + changeRadio(name, value) { + let arr = ["second", "min", "hour", "month"], + refName = "cron" + name, + insValue; + + if (!this.$refs[refName]) return; + + if (arr.includes(name)) { + if (value === "*") { + insValue = 1; + } else if (value.indexOf("-") > -1) { + let indexArr = value.split("-"); + isNaN(indexArr[0]) + ? (this.$refs[refName].cycle01 = 0) + : (this.$refs[refName].cycle01 = indexArr[0]); + this.$refs[refName].cycle02 = indexArr[1]; + insValue = 2; + } else if (value.indexOf("/") > -1) { + let indexArr = value.split("/"); + isNaN(indexArr[0]) + ? (this.$refs[refName].average01 = 0) + : (this.$refs[refName].average01 = indexArr[0]); + this.$refs[refName].average02 = indexArr[1]; + insValue = 3; + } else { + insValue = 4; + this.$refs[refName].checkboxList = value.split(","); + } + } else if (name == "day") { + if (value === "*") { + insValue = 1; + } else if (value == "?") { + insValue = 2; + } else if (value.indexOf("-") > -1) { + let indexArr = value.split("-"); + isNaN(indexArr[0]) + ? (this.$refs[refName].cycle01 = 0) + : (this.$refs[refName].cycle01 = indexArr[0]); + this.$refs[refName].cycle02 = indexArr[1]; + insValue = 3; + } else if (value.indexOf("/") > -1) { + let indexArr = value.split("/"); + isNaN(indexArr[0]) + ? (this.$refs[refName].average01 = 0) + : (this.$refs[refName].average01 = indexArr[0]); + this.$refs[refName].average02 = indexArr[1]; + insValue = 4; + } else if (value.indexOf("W") > -1) { + let indexArr = value.split("W"); + isNaN(indexArr[0]) + ? (this.$refs[refName].workday = 0) + : (this.$refs[refName].workday = indexArr[0]); + insValue = 5; + } else if (value === "L") { + insValue = 6; + } else { + this.$refs[refName].checkboxList = value.split(","); + insValue = 7; + } + } else if (name == "week") { + if (value === "*") { + insValue = 1; + } else if (value == "?") { + insValue = 2; + } else if (value.indexOf("-") > -1) { + let indexArr = value.split("-"); + isNaN(indexArr[0]) + ? (this.$refs[refName].cycle01 = 0) + : (this.$refs[refName].cycle01 = indexArr[0]); + this.$refs[refName].cycle02 = indexArr[1]; + insValue = 3; + } else if (value.indexOf("#") > -1) { + let indexArr = value.split("#"); + isNaN(indexArr[0]) + ? (this.$refs[refName].average01 = 1) + : (this.$refs[refName].average01 = indexArr[0]); + this.$refs[refName].average02 = indexArr[1]; + insValue = 4; + } else if (value.indexOf("L") > -1) { + let indexArr = value.split("L"); + isNaN(indexArr[0]) + ? (this.$refs[refName].weekday = 1) + : (this.$refs[refName].weekday = indexArr[0]); + insValue = 5; + } else { + this.$refs[refName].checkboxList = value.split(","); + insValue = 7; + } + } else if (name == "year") { + if (value == "") { + insValue = 1; + } else if (value == "*") { + insValue = 2; + } else if (value.indexOf("-") > -1) { + insValue = 3; + } else if (value.indexOf("/") > -1) { + insValue = 4; + } else { + this.$refs[refName].checkboxList = value.split(","); + insValue = 5; + } + } + this.$refs[refName].radioValue = insValue; + }, + // 琛ㄥ崟閫夐」鐨勫瓙缁勪欢鏍¢獙鏁板瓧鏍煎紡锛堥�氳繃-props浼犻�掞級 + checkNumber(value, minLimit, maxLimit) { + // 妫�鏌ュ繀椤讳负鏁存暟 + value = Math.floor(value); + if (value < minLimit) { + value = minLimit; + } else if (value > maxLimit) { + value = maxLimit; + } + return value; + }, + // 闅愯棌寮圭獥 + hidePopup() { + this.$emit("hide"); + }, + // 濉厖琛ㄨ揪寮� + submitFill() { + this.$emit("fill", this.crontabValueString); + this.hidePopup(); + }, + clearCron() { + // 杩樺師閫夋嫨椤� + ("鍑嗗杩樺師"); + this.crontabValueObj = { + second: "*", + min: "*", + hour: "*", + day: "*", + month: "*", + week: "?", + year: "", + }; + for (let j in this.crontabValueObj) { + this.changeRadio(j, this.crontabValueObj[j]); + } + }, + }, + computed: { + crontabValueString: function() { + let obj = this.crontabValueObj; + let str = + obj.second + + " " + + obj.min + + " " + + obj.hour + + " " + + obj.day + + " " + + obj.month + + " " + + obj.week + + (obj.year == "" ? "" : " " + obj.year); + return str; + }, + }, + components: { + CrontabSecond, + CrontabMin, + CrontabHour, + CrontabDay, + CrontabMonth, + CrontabWeek, + CrontabYear, + CrontabResult, + }, + watch: { + expression: "resolveExp", + hideComponent(value) { + // 闅愯棌閮ㄥ垎缁勪欢 + }, + }, + mounted: function() { + this.resolveExp(); + }, +}; +</script> +<style scoped> +.pop_btn { + text-align: center; + margin-top: 20px; +} +.popup-main { + position: relative; + margin: 10px auto; + background: #fff; + border-radius: 5px; + font-size: 12px; + overflow: hidden; +} +.popup-title { + overflow: hidden; + line-height: 34px; + padding-top: 6px; + background: #f2f2f2; +} +.popup-result { + box-sizing: border-box; + line-height: 24px; + margin: 25px auto; + padding: 15px 10px 10px; + border: 1px solid #ccc; + position: relative; +} +.popup-result .title { + position: absolute; + top: -28px; + left: 50%; + width: 140px; + font-size: 14px; + margin-left: -70px; + text-align: center; + line-height: 30px; + background: #fff; +} +.popup-result table { + text-align: center; + width: 100%; + margin: 0 auto; +} +.popup-result table span { + display: block; + width: 100%; + font-family: arial; + line-height: 30px; + height: 30px; + white-space: nowrap; + overflow: hidden; + border: 1px solid #e8e8e8; +} +.popup-result-scroll { + font-size: 12px; + line-height: 24px; + height: 10em; + overflow-y: auto; +} +</style> diff --git a/ruoyi-ui/src/components/Crontab/mouth.vue b/ruoyi-ui/src/components/Crontab/month.vue similarity index 81% rename from ruoyi-ui/src/components/Crontab/mouth.vue rename to ruoyi-ui/src/components/Crontab/month.vue index 4e2c8a7..619d1e7 100644 --- a/ruoyi-ui/src/components/Crontab/mouth.vue +++ b/ruoyi-ui/src/components/Crontab/month.vue @@ -1,128 +1,128 @@ -<template> - <el-form size='small'> - <el-form-item> - <el-radio v-model='radioValue' :label="1"> - 鏈堬紝鍏佽鐨勯�氶厤绗, - * /] - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="2"> - 鍛ㄦ湡浠� - <el-input-number v-model='cycle01' :min="1" :max="12" /> - - <el-input-number v-model='cycle02' :min="1" :max="12" /> 鏈� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="3"> - 浠� - <el-input-number v-model='average01' :min="1" :max="12" /> 鏈堝紑濮嬶紝姣� - <el-input-number v-model='average02' :min="1" :max="12" /> 鏈堟湀鎵ц涓�娆� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="4"> - 鎸囧畾 - <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> - <el-option v-for="item in 12" :key="item" :value="item">{{item}}</el-option> - </el-select> - </el-radio> - </el-form-item> - </el-form> -</template> - -<script> -export default { - data() { - return { - radioValue: 1, - cycle01: 1, - cycle02: 2, - average01: 1, - average02: 1, - checkboxList: [], - checkNum: this.check - } - }, - name: 'crontab-mouth', - props: ['check', 'cron'], - methods: { - // 鍗曢�夋寜閽�煎彉鍖栨椂 - radioChange() { - if (this.radioValue === 1) { - this.$emit('update', 'mouth', '*'); - this.$emit('update', 'year', '*'); - } else { - if (this.cron.day === '*') { - this.$emit('update', 'day', '0', 'mouth'); - } - if (this.cron.hour === '*') { - this.$emit('update', 'hour', '0', 'mouth'); - } - if (this.cron.min === '*') { - this.$emit('update', 'min', '0', 'mouth'); - } - if (this.cron.second === '*') { - this.$emit('update', 'second', '0', 'mouth'); - } - } - switch (this.radioValue) { - case 2: - this.$emit('update', 'mouth', this.cycle01 + '-' + this.cycle02); - break; - case 3: - this.$emit('update', 'mouth', this.average01 + '/' + this.average02); - break; - case 4: - this.$emit('update', 'mouth', this.checkboxString); - break; - } - }, - // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 - cycleChange() { - if (this.radioValue == '2') { - this.$emit('update', 'mouth', this.cycleTotal); - } - }, - // 骞冲潎涓や釜鍊煎彉鍖栨椂 - averageChange() { - if (this.radioValue == '3') { - this.$emit('update', 'mouth', this.averageTotal); - } - }, - // checkbox鍊煎彉鍖栨椂 - checkboxChange() { - if (this.radioValue == '4') { - this.$emit('update', 'mouth', this.checkboxString); - } - } - }, - watch: { - "radioValue": "radioChange", - 'cycleTotal': 'cycleChange', - 'averageTotal': 'averageChange', - 'checkboxString': 'checkboxChange' - }, - computed: { - // 璁$畻涓や釜鍛ㄦ湡鍊� - cycleTotal: function () { - this.cycle01 = this.checkNum(this.cycle01, 1, 12) - this.cycle02 = this.checkNum(this.cycle02, 1, 12) - return this.cycle01 + '-' + this.cycle02; - }, - // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� - averageTotal: function () { - this.average01 = this.checkNum(this.average01, 1, 12) - this.average02 = this.checkNum(this.average02, 1, 12) - return this.average01 + '/' + this.average02; - }, - // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� - checkboxString: function () { - let str = this.checkboxList.join(); - return str == '' ? '*' : str; - } - } -} -</script> \ No newline at end of file +<template> + <el-form size='small'> + <el-form-item> + <el-radio v-model='radioValue' :label="1"> + 鏈堬紝鍏佽鐨勯�氶厤绗, - * /] + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="2"> + 鍛ㄦ湡浠� + <el-input-number v-model='cycle01' :min="1" :max="12" /> - + <el-input-number v-model='cycle02' :min="1" :max="12" /> 鏈� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="3"> + 浠� + <el-input-number v-model='average01' :min="1" :max="12" /> 鏈堝紑濮嬶紝姣� + <el-input-number v-model='average02' :min="1" :max="12" /> 鏈堟湀鎵ц涓�娆� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="4"> + 鎸囧畾 + <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> + <el-option v-for="item in 12" :key="item" :value="item">{{item}}</el-option> + </el-select> + </el-radio> + </el-form-item> + </el-form> +</template> + +<script> +export default { + data() { + return { + radioValue: 1, + cycle01: 1, + cycle02: 2, + average01: 1, + average02: 1, + checkboxList: [], + checkNum: this.check + } + }, + name: 'crontab-month', + props: ['check', 'cron'], + methods: { + // 鍗曢�夋寜閽�煎彉鍖栨椂 + radioChange() { + if (this.radioValue === 1) { + this.$emit('update', 'month', '*'); + this.$emit('update', 'year', '*'); + } else { + if (this.cron.day === '*') { + this.$emit('update', 'day', '0', 'month'); + } + if (this.cron.hour === '*') { + this.$emit('update', 'hour', '0', 'month'); + } + if (this.cron.min === '*') { + this.$emit('update', 'min', '0', 'month'); + } + if (this.cron.second === '*') { + this.$emit('update', 'second', '0', 'month'); + } + } + switch (this.radioValue) { + case 2: + this.$emit('update', 'month', this.cycle01 + '-' + this.cycle02); + break; + case 3: + this.$emit('update', 'month', this.average01 + '/' + this.average02); + break; + case 4: + this.$emit('update', 'month', this.checkboxString); + break; + } + }, + // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 + cycleChange() { + if (this.radioValue == '2') { + this.$emit('update', 'month', this.cycleTotal); + } + }, + // 骞冲潎涓や釜鍊煎彉鍖栨椂 + averageChange() { + if (this.radioValue == '3') { + this.$emit('update', 'month', this.averageTotal); + } + }, + // checkbox鍊煎彉鍖栨椂 + checkboxChange() { + if (this.radioValue == '4') { + this.$emit('update', 'month', this.checkboxString); + } + } + }, + watch: { + "radioValue": "radioChange", + 'cycleTotal': 'cycleChange', + 'averageTotal': 'averageChange', + 'checkboxString': 'checkboxChange' + }, + computed: { + // 璁$畻涓や釜鍛ㄦ湡鍊� + cycleTotal: function () { + this.cycle01 = this.checkNum(this.cycle01, 1, 12) + this.cycle02 = this.checkNum(this.cycle02, 1, 12) + return this.cycle01 + '-' + this.cycle02; + }, + // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� + averageTotal: function () { + this.average01 = this.checkNum(this.average01, 1, 12) + this.average02 = this.checkNum(this.average02, 1, 12) + return this.average01 + '/' + this.average02; + }, + // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� + checkboxString: function () { + let str = this.checkboxList.join(); + return str == '' ? '*' : str; + } + } +} +</script> diff --git a/ruoyi-ui/src/components/Crontab/result.vue b/ruoyi-ui/src/components/Crontab/result.vue index 3b9b6c8..07b963b 100644 --- a/ruoyi-ui/src/components/Crontab/result.vue +++ b/ruoyi-ui/src/components/Crontab/result.vue @@ -1,566 +1,566 @@ -<template> - <div class="popup-result"> - <p class="title">鏈�杩�5娆¤繍琛屾椂闂�</p> - <ul class="popup-result-scroll"> - <template v-if='isShow'> - <li v-for='item in resultList' :key="item">{{item}}</li> - </template> - <li v-else>璁$畻缁撴灉涓�...</li> - </ul> - </div> -</template> - -<script> -export default { - data() { - return { - dayRule: '', - dayRuleSup: '', - dateArr: [], - resultList: [], - isShow: false - } - }, - name: 'crontab-result', - methods: { - // 琛ㄨ揪寮忓�煎彉鍖栨椂锛屽紑濮嬪幓璁$畻缁撴灉 - expressionChange() { - - // 璁$畻寮�濮�-闅愯棌缁撴灉 - this.isShow = false; - // 鑾峰彇瑙勫垯鏁扮粍[0绉掋��1鍒嗐��2鏃躲��3鏃ャ��4鏈堛��5鏄熸湡銆�6骞碷 - let ruleArr = this.$options.propsData.ex.split(' '); - // 鐢ㄤ簬璁板綍杩涘叆寰幆鐨勬鏁� - let nums = 0; - // 鐢ㄤ簬鏆傛椂瀛樼鍙锋椂闂磋鍒欑粨鏋滅殑鏁扮粍 - let resultArr = []; - // 鑾峰彇褰撳墠鏃堕棿绮剧‘鑷砙骞淬�佹湀銆佹棩銆佹椂銆佸垎銆佺] - let nTime = new Date(); - let nYear = nTime.getFullYear(); - let nMouth = nTime.getMonth() + 1; - let nDay = nTime.getDate(); - let nHour = nTime.getHours(); - let nMin = nTime.getMinutes(); - let nSecond = nTime.getSeconds(); - // 鏍规嵁瑙勫垯鑾峰彇鍒拌繎100骞村彲鑳藉勾鏁扮粍銆佹湀鏁扮粍绛夌瓑 - this.getSecondArr(ruleArr[0]); - this.getMinArr(ruleArr[1]); - this.getHourArr(ruleArr[2]); - this.getDayArr(ruleArr[3]); - this.getMouthArr(ruleArr[4]); - this.getWeekArr(ruleArr[5]); - this.getYearArr(ruleArr[6], nYear); - // 灏嗚幏鍙栧埌鐨勬暟缁勮祴鍊�-鏂逛究浣跨敤 - let sDate = this.dateArr[0]; - let mDate = this.dateArr[1]; - let hDate = this.dateArr[2]; - let DDate = this.dateArr[3]; - let MDate = this.dateArr[4]; - let YDate = this.dateArr[5]; - // 鑾峰彇褰撳墠鏃堕棿鍦ㄦ暟缁勪腑鐨勭储寮� - let sIdx = this.getIndex(sDate, nSecond); - let mIdx = this.getIndex(mDate, nMin); - let hIdx = this.getIndex(hDate, nHour); - let DIdx = this.getIndex(DDate, nDay); - let MIdx = this.getIndex(MDate, nMouth); - let YIdx = this.getIndex(YDate, nYear); - // 閲嶇疆鏈堟棩鏃跺垎绉掔殑鍑芥暟(鍚庨潰鐢ㄧ殑姣旇緝澶�) - const resetSecond = function () { - sIdx = 0; - nSecond = sDate[sIdx] - } - const resetMin = function () { - mIdx = 0; - nMin = mDate[mIdx] - resetSecond(); - } - const resetHour = function () { - hIdx = 0; - nHour = hDate[hIdx] - resetMin(); - } - const resetDay = function () { - DIdx = 0; - nDay = DDate[DIdx] - resetHour(); - } - const resetMouth = function () { - MIdx = 0; - nMouth = MDate[MIdx] - resetDay(); - } - // 濡傛灉褰撳墠骞翠唤涓嶄负鏁扮粍涓綋鍓嶅�� - if (nYear !== YDate[YIdx]) { - resetMouth(); - } - // 濡傛灉褰撳墠鏈堜唤涓嶄负鏁扮粍涓綋鍓嶅�� - if (nMouth !== MDate[MIdx]) { - resetDay(); - } - // 濡傛灉褰撳墠鈥滄棩鈥濅笉涓烘暟缁勪腑褰撳墠鍊� - if (nDay !== DDate[DIdx]) { - resetHour(); - } - // 濡傛灉褰撳墠鈥滄椂鈥濅笉涓烘暟缁勪腑褰撳墠鍊� - if (nHour !== hDate[hIdx]) { - resetMin(); - } - // 濡傛灉褰撳墠鈥滃垎鈥濅笉涓烘暟缁勪腑褰撳墠鍊� - if (nMin !== mDate[mIdx]) { - resetSecond(); - } - - // 寰幆骞翠唤鏁扮粍 - goYear: for (let Yi = YIdx; Yi < YDate.length; Yi++) { - let YY = YDate[Yi]; - // 濡傛灉鍒拌揪鏈�澶у�兼椂 - if (nMouth > MDate[MDate.length - 1]) { - resetMouth(); - continue; - } - // 寰幆鏈堜唤鏁扮粍 - goMouth: for (let Mi = MIdx; Mi < MDate.length; Mi++) { - // 璧嬪�笺�佹柟渚垮悗闈㈣繍绠� - let MM = MDate[Mi]; - MM = MM < 10 ? '0' + MM : MM; - // 濡傛灉鍒拌揪鏈�澶у�兼椂 - if (nDay > DDate[DDate.length - 1]) { - resetDay(); - if (Mi == MDate.length - 1) { - resetMouth(); - continue goYear; - } - continue; - } - // 寰幆鏃ユ湡鏁扮粍 - goDay: for (let Di = DIdx; Di < DDate.length; Di++) { - // 璧嬪�笺�佹柟渚垮悗闈㈣繍绠� - let DD = DDate[Di]; - let thisDD = DD < 10 ? '0' + DD : DD; - - // 濡傛灉鍒拌揪鏈�澶у�兼椂 - if (nHour > hDate[hDate.length - 1]) { - resetHour(); - if (Di == DDate.length - 1) { - resetDay(); - if (Mi == MDate.length - 1) { - resetMouth(); - continue goYear; - } - continue goMouth; - } - continue; - } - - // 鍒ゆ柇鏃ユ湡鐨勫悎娉曟�э紝涓嶅悎娉曠殑璇濅篃鏄烦鍑哄綋鍓嶅惊鐜� - if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') { - resetDay(); - continue goMouth; - } - // 濡傛灉鏃ユ湡瑙勫垯涓湁鍊兼椂 - if (this.dayRule == 'lastDay') { - //濡傛灉涓嶆槸鍚堟硶鏃ユ湡鍒欓渶瑕佸皢鍓嶅皢鏃ユ湡璋冨埌鍚堟硶鏃ユ湡鍗虫湀鏈渶鍚庝竴澶� - - if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { - while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { - DD--; - - thisDD = DD < 10 ? '0' + DD : DD; - } - } - } else if (this.dayRule == 'workDay') { - //鏍¢獙骞惰皟鏁村鏋滄槸2鏈�30鍙疯繖绉嶆棩鏈熶紶杩涙潵鏃堕渶璋冩暣鑷虫甯告湀搴� - if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { - while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { - DD--; - thisDD = DD < 10 ? '0' + DD : DD; - } - } - // 鑾峰彇杈惧埌鏉′欢鐨勬棩鏈熸槸鏄熸湡X - let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week'); - // 褰撴槦鏈熸棩鏃� - if (thisWeek == 0) { - //鍏堟壘涓嬩竴涓棩锛屽苟鍒ゆ柇鏄惁涓烘湀搴� - DD++; - thisDD = DD < 10 ? '0' + DD : DD; - //鍒ゆ柇涓嬩竴鏃ュ凡缁忎笉鏄悎娉曟棩鏈� - if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { - DD -= 3; - } - } else if (thisWeek == 6) { - //褰撴槦鏈�6鏃跺彧闇�鍒ゆ柇涓嶆槸1鍙峰氨鍙繘琛屾搷浣� - if (this.dayRuleSup !== 1) { - DD--; - } else { - DD += 2; - } - } - } else if (this.dayRule == 'weekDay') { - //濡傛灉鎸囧畾浜嗘槸鏄熸湡鍑� - //鑾峰彇褰撳墠鏃ユ湡鏄睘浜庢槦鏈熷嚑 - let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week'); - //鏍¢獙褰撳墠鏄熸湡鏄惁鍦ㄦ槦鏈熸睜锛坉ayRuleSup锛変腑 - if (Array.indexOf(this.dayRuleSup, thisWeek) < 0) { - // 濡傛灉鍒拌揪鏈�澶у�兼椂 - if (Di == DDate.length - 1) { - resetDay(); - if (Mi == MDate.length - 1) { - resetMouth(); - continue goYear; - } - continue goMouth; - } - continue; - } - } else if (this.dayRule == 'assWeek') { - //濡傛灉鎸囧畾浜嗘槸绗嚑鍛ㄧ殑鏄熸湡鍑� - //鑾峰彇姣忔湀1鍙锋槸灞炰簬鏄熸湡鍑� - let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week'); - if (this.dayRuleSup[1] >= thisWeek) { - DD = (this.dayRuleSup[0] - 1) * 7 + this.dayRuleSup[1] - thisWeek + 1; - } else { - DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1; - } - } else if (this.dayRule == 'lastWeek') { - //濡傛灉鎸囧畾浜嗘瘡鏈堟渶鍚庝竴涓槦鏈熷嚑 - //鏍¢獙骞惰皟鏁村鏋滄槸2鏈�30鍙疯繖绉嶆棩鏈熶紶杩涙潵鏃堕渶璋冩暣鑷虫甯告湀搴� - if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { - while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { - DD--; - thisDD = DD < 10 ? '0' + DD : DD; - } - } - //鑾峰彇鏈堟湯鏈�鍚庝竴澶╂槸鏄熸湡鍑� - let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week'); - //鎵惧埌瑕佹眰涓渶杩戠殑閭d釜鏄熸湡鍑� - if (this.dayRuleSup < thisWeek) { - DD -= thisWeek - this.dayRuleSup; - } else if (this.dayRuleSup > thisWeek) { - DD -= 7 - (this.dayRuleSup - thisWeek) - } - } - // 鍒ゆ柇鏃堕棿鍊兼槸鍚﹀皬浜�10缃崲鎴愨��05鈥濊繖绉嶆牸寮� - DD = DD < 10 ? '0' + DD : DD; - - // 寰幆鈥滄椂鈥濇暟缁� - goHour: for (let hi = hIdx; hi < hDate.length; hi++) { - let hh = hDate[hi] < 10 ? '0' + hDate[hi] : hDate[hi] - - // 濡傛灉鍒拌揪鏈�澶у�兼椂 - if (nMin > mDate[mDate.length - 1]) { - resetMin(); - if (hi == hDate.length - 1) { - resetHour(); - if (Di == DDate.length - 1) { - resetDay(); - if (Mi == MDate.length - 1) { - resetMouth(); - continue goYear; - } - continue goMouth; - } - continue goDay; - } - continue; - } - // 寰幆"鍒�"鏁扮粍 - goMin: for (let mi = mIdx; mi < mDate.length; mi++) { - let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi]; - - // 濡傛灉鍒拌揪鏈�澶у�兼椂 - if (nSecond > sDate[sDate.length - 1]) { - resetSecond(); - if (mi == mDate.length - 1) { - resetMin(); - if (hi == hDate.length - 1) { - resetHour(); - if (Di == DDate.length - 1) { - resetDay(); - if (Mi == MDate.length - 1) { - resetMouth(); - continue goYear; - } - continue goMouth; - } - continue goDay; - } - continue goHour; - } - continue; - } - // 寰幆"绉�"鏁扮粍 - goSecond: for (let si = sIdx; si <= sDate.length - 1; si++) { - let ss = sDate[si] < 10 ? '0' + sDate[si] : sDate[si]; - // 娣诲姞褰撳墠鏃堕棿锛堟椂闂村悎娉曟�у湪鏃ユ湡寰幆鏃跺凡缁忓垽鏂級 - if (MM !== '00' && DD !== '00') { - resultArr.push(YY + '-' + MM + '-' + DD + ' ' + hh + ':' + mm + ':' + ss) - nums++; - } - //濡傛灉鏉℃暟婊′簡灏遍��鍑哄惊鐜� - if (nums == 5) break goYear; - //濡傛灉鍒拌揪鏈�澶у�兼椂 - if (si == sDate.length - 1) { - resetSecond(); - if (mi == mDate.length - 1) { - resetMin(); - if (hi == hDate.length - 1) { - resetHour(); - if (Di == DDate.length - 1) { - resetDay(); - if (Mi == MDate.length - 1) { - resetMouth(); - continue goYear; - } - continue goMouth; - } - continue goDay; - } - continue goHour; - } - continue goMin; - } - } //goSecond - } //goMin - }//goHour - }//goDay - }//goMouth - } - // 鍒ゆ柇100骞村唴鐨勭粨鏋滄潯鏁� - if (resultArr.length == 0) { - this.resultList = ['娌℃湁杈惧埌鏉′欢鐨勭粨鏋滐紒']; - } else { - this.resultList = resultArr; - if (resultArr.length !== 5) { - this.resultList.push('鏈�杩�100骞村唴鍙湁涓婇潰' + resultArr.length + '鏉$粨鏋滐紒') - } - } - // 璁$畻瀹屾垚-鏄剧ず缁撴灉 - this.isShow = true; - - - }, - //鐢ㄤ簬璁$畻鏌愪綅鏁板瓧鍦ㄦ暟缁勪腑鐨勭储寮� - getIndex(arr, value) { - if (value <= arr[0] || value > arr[arr.length - 1]) { - return 0; - } else { - for (let i = 0; i < arr.length - 1; i++) { - if (value > arr[i] && value <= arr[i + 1]) { - return i + 1; - } - } - } - }, - // 鑾峰彇"骞�"鏁扮粍 - getYearArr(rule, year) { - this.dateArr[5] = this.getOrderArr(year, year + 100); - if (rule !== undefined) { - if (rule.indexOf('-') >= 0) { - this.dateArr[5] = this.getCycleArr(rule, year + 100, false) - } else if (rule.indexOf('/') >= 0) { - this.dateArr[5] = this.getAverageArr(rule, year + 100) - } else if (rule !== '*') { - this.dateArr[5] = this.getAssignArr(rule) - } - } - }, - // 鑾峰彇"鏈�"鏁扮粍 - getMouthArr(rule) { - this.dateArr[4] = this.getOrderArr(1, 12); - if (rule.indexOf('-') >= 0) { - this.dateArr[4] = this.getCycleArr(rule, 12, false) - } else if (rule.indexOf('/') >= 0) { - this.dateArr[4] = this.getAverageArr(rule, 12) - } else if (rule !== '*') { - this.dateArr[4] = this.getAssignArr(rule) - } - }, - // 鑾峰彇"鏃�"鏁扮粍-涓昏涓烘棩鏈熻鍒� - getWeekArr(rule) { - //鍙湁褰撴棩鏈熻鍒欑殑涓や釜鍊煎潎涓衡�溾�濇椂鍒欒〃杈炬棩鏈熸槸鏈夐�夐」鐨� - if (this.dayRule == '' && this.dayRuleSup == '') { - if (rule.indexOf('-') >= 0) { - this.dayRule = 'weekDay'; - this.dayRuleSup = this.getCycleArr(rule, 7, false) - } else if (rule.indexOf('#') >= 0) { - this.dayRule = 'assWeek'; - let matchRule = rule.match(/[0-9]{1}/g); - this.dayRuleSup = [Number(matchRule[0]), Number(matchRule[1])]; - this.dateArr[3] = [1]; - if (this.dayRuleSup[1] == 7) { - this.dayRuleSup[1] = 0; - } - } else if (rule.indexOf('L') >= 0) { - this.dayRule = 'lastWeek'; - this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]); - this.dateArr[3] = [31]; - if (this.dayRuleSup == 7) { - this.dayRuleSup = 0; - } - } else if (rule !== '*' && rule !== '?') { - this.dayRule = 'weekDay'; - this.dayRuleSup = this.getAssignArr(rule) - } - //濡傛灉weekDay鏃跺皢7璋冩暣涓�0銆恮eek鍊�0鍗虫槸鏄熸湡鏃ャ�� - if (this.dayRule == 'weekDay') { - for (let i = 0; i < this.dayRuleSup.length; i++) { - if (this.dayRuleSup[i] == 7) { - this.dayRuleSup[i] = 0; - } - } - } - } - }, - // 鑾峰彇"鏃�"鏁扮粍-灏戦噺涓烘棩鏈熻鍒� - getDayArr(rule) { - this.dateArr[3] = this.getOrderArr(1, 31); - this.dayRule = ''; - this.dayRuleSup = ''; - if (rule.indexOf('-') >= 0) { - this.dateArr[3] = this.getCycleArr(rule, 31, false) - this.dayRuleSup = 'null'; - } else if (rule.indexOf('/') >= 0) { - this.dateArr[3] = this.getAverageArr(rule, 31) - this.dayRuleSup = 'null'; - } else if (rule.indexOf('W') >= 0) { - this.dayRule = 'workDay'; - this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]); - this.dateArr[3] = [this.dayRuleSup]; - } else if (rule.indexOf('L') >= 0) { - this.dayRule = 'lastDay'; - this.dayRuleSup = 'null'; - this.dateArr[3] = [31]; - } else if (rule !== '*' && rule !== '?') { - this.dateArr[3] = this.getAssignArr(rule) - this.dayRuleSup = 'null'; - } else if (rule == '*') { - this.dayRuleSup = 'null'; - } - }, - // 鑾峰彇"鏃�"鏁扮粍 - getHourArr(rule) { - this.dateArr[2] = this.getOrderArr(0, 23); - if (rule.indexOf('-') >= 0) { - this.dateArr[2] = this.getCycleArr(rule, 24, true) - } else if (rule.indexOf('/') >= 0) { - this.dateArr[2] = this.getAverageArr(rule, 23) - } else if (rule !== '*') { - this.dateArr[2] = this.getAssignArr(rule) - } - }, - // 鑾峰彇"鍒�"鏁扮粍 - getMinArr(rule) { - this.dateArr[1] = this.getOrderArr(0, 59); - if (rule.indexOf('-') >= 0) { - this.dateArr[1] = this.getCycleArr(rule, 60, true) - } else if (rule.indexOf('/') >= 0) { - this.dateArr[1] = this.getAverageArr(rule, 59) - } else if (rule !== '*') { - this.dateArr[1] = this.getAssignArr(rule) - } - }, - // 鑾峰彇"绉�"鏁扮粍 - getSecondArr(rule) { - this.dateArr[0] = this.getOrderArr(0, 59); - if (rule.indexOf('-') >= 0) { - this.dateArr[0] = this.getCycleArr(rule, 60, true) - } else if (rule.indexOf('/') >= 0) { - this.dateArr[0] = this.getAverageArr(rule, 59) - } else if (rule !== '*') { - this.dateArr[0] = this.getAssignArr(rule) - } - }, - // 鏍规嵁浼犺繘鏉ョ殑min-max杩斿洖涓�涓『搴忕殑鏁扮粍 - getOrderArr(min, max) { - let arr = []; - for (let i = min; i <= max; i++) { - arr.push(i); - } - return arr; - }, - // 鏍规嵁瑙勫垯涓寚瀹氱殑闆舵暎鍊艰繑鍥炰竴涓暟缁� - getAssignArr(rule) { - let arr = []; - let assiginArr = rule.split(','); - for (let i = 0; i < assiginArr.length; i++) { - arr[i] = Number(assiginArr[i]) - } - arr.sort(this.compare) - return arr; - }, - // 鏍规嵁涓�瀹氱畻鏈鍒欒绠楄繑鍥炰竴涓暟缁� - getAverageArr(rule, limit) { - let arr = []; - let agArr = rule.split('/'); - let min = Number(agArr[0]); - let step = Number(agArr[1]); - while (min <= limit) { - arr.push(min); - min += step; - } - return arr; - }, - // 鏍规嵁瑙勫垯杩斿洖涓�涓叿鏈夊懆鏈熸�х殑鏁扮粍 - getCycleArr(rule, limit, status) { - //status--琛ㄧず鏄惁浠�0寮�濮嬶紙鍒欎粠1寮�濮嬶級 - let arr = []; - let cycleArr = rule.split('-'); - let min = Number(cycleArr[0]); - let max = Number(cycleArr[1]); - if (min > max) { - max += limit; - } - for (let i = min; i <= max; i++) { - let add = 0; - if (status == false && i % limit == 0) { - add = limit; - } - arr.push(Math.round(i % limit + add)) - } - arr.sort(this.compare) - return arr; - }, - //姣旇緝鏁板瓧澶у皬锛堢敤浜嶢rray.sort锛� - compare(value1, value2) { - if (value2 - value1 > 0) { - return -1; - } else { - return 1; - } - }, - // 鏍煎紡鍖栨棩鏈熸牸寮忓锛�2017-9-19 18:04:33 - formatDate(value, type) { - // 璁$畻鏃ユ湡鐩稿叧鍊� - let time = typeof value == 'number' ? new Date(value) : value; - let Y = time.getFullYear(); - let M = time.getMonth() + 1; - let D = time.getDate(); - let h = time.getHours(); - let m = time.getMinutes(); - let s = time.getSeconds(); - let week = time.getDay(); - // 濡傛灉浼犻�掍簡type鐨勮瘽 - if (type == undefined) { - return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s); - } else if (type == 'week') { - return week; - } - }, - // 妫�鏌ユ棩鏈熸槸鍚﹀瓨鍦� - checkDate(value) { - let time = new Date(value); - let format = this.formatDate(time) - return value == format ? true : false; - } - }, - watch: { - 'ex': 'expressionChange' - }, - props: ['ex'], - mounted: function () { - // 鍒濆鍖� 鑾峰彇涓�娆$粨鏋� - this.expressionChange(); - } -} - -</script> \ No newline at end of file +<template> + <div class="popup-result"> + <p class="title">鏈�杩�5娆¤繍琛屾椂闂�</p> + <ul class="popup-result-scroll"> + <template v-if='isShow'> + <li v-for='item in resultList' :key="item">{{item}}</li> + </template> + <li v-else>璁$畻缁撴灉涓�...</li> + </ul> + </div> +</template> + +<script> +export default { + data() { + return { + dayRule: '', + dayRuleSup: '', + dateArr: [], + resultList: [], + isShow: false + } + }, + name: 'crontab-result', + methods: { + // 琛ㄨ揪寮忓�煎彉鍖栨椂锛屽紑濮嬪幓璁$畻缁撴灉 + expressionChange() { + + // 璁$畻寮�濮�-闅愯棌缁撴灉 + this.isShow = false; + // 鑾峰彇瑙勫垯鏁扮粍[0绉掋��1鍒嗐��2鏃躲��3鏃ャ��4鏈堛��5鏄熸湡銆�6骞碷 + let ruleArr = this.$options.propsData.ex.split(' '); + // 鐢ㄤ簬璁板綍杩涘叆寰幆鐨勬鏁� + let nums = 0; + // 鐢ㄤ簬鏆傛椂瀛樼鍙锋椂闂磋鍒欑粨鏋滅殑鏁扮粍 + let resultArr = []; + // 鑾峰彇褰撳墠鏃堕棿绮剧‘鑷砙骞淬�佹湀銆佹棩銆佹椂銆佸垎銆佺] + let nTime = new Date(); + let nYear = nTime.getFullYear(); + let nMonth = nTime.getMonth() + 1; + let nDay = nTime.getDate(); + let nHour = nTime.getHours(); + let nMin = nTime.getMinutes(); + let nSecond = nTime.getSeconds(); + // 鏍规嵁瑙勫垯鑾峰彇鍒拌繎100骞村彲鑳藉勾鏁扮粍銆佹湀鏁扮粍绛夌瓑 + this.getSecondArr(ruleArr[0]); + this.getMinArr(ruleArr[1]); + this.getHourArr(ruleArr[2]); + this.getDayArr(ruleArr[3]); + this.getMonthArr(ruleArr[4]); + this.getWeekArr(ruleArr[5]); + this.getYearArr(ruleArr[6], nYear); + // 灏嗚幏鍙栧埌鐨勬暟缁勮祴鍊�-鏂逛究浣跨敤 + let sDate = this.dateArr[0]; + let mDate = this.dateArr[1]; + let hDate = this.dateArr[2]; + let DDate = this.dateArr[3]; + let MDate = this.dateArr[4]; + let YDate = this.dateArr[5]; + // 鑾峰彇褰撳墠鏃堕棿鍦ㄦ暟缁勪腑鐨勭储寮� + let sIdx = this.getIndex(sDate, nSecond); + let mIdx = this.getIndex(mDate, nMin); + let hIdx = this.getIndex(hDate, nHour); + let DIdx = this.getIndex(DDate, nDay); + let MIdx = this.getIndex(MDate, nMonth); + let YIdx = this.getIndex(YDate, nYear); + // 閲嶇疆鏈堟棩鏃跺垎绉掔殑鍑芥暟(鍚庨潰鐢ㄧ殑姣旇緝澶�) + const resetSecond = function () { + sIdx = 0; + nSecond = sDate[sIdx] + } + const resetMin = function () { + mIdx = 0; + nMin = mDate[mIdx] + resetSecond(); + } + const resetHour = function () { + hIdx = 0; + nHour = hDate[hIdx] + resetMin(); + } + const resetDay = function () { + DIdx = 0; + nDay = DDate[DIdx] + resetHour(); + } + const resetMonth = function () { + MIdx = 0; + nMonth = MDate[MIdx] + resetDay(); + } + // 濡傛灉褰撳墠骞翠唤涓嶄负鏁扮粍涓綋鍓嶅�� + if (nYear !== YDate[YIdx]) { + resetMonth(); + } + // 濡傛灉褰撳墠鏈堜唤涓嶄负鏁扮粍涓綋鍓嶅�� + if (nMonth !== MDate[MIdx]) { + resetDay(); + } + // 濡傛灉褰撳墠鈥滄棩鈥濅笉涓烘暟缁勪腑褰撳墠鍊� + if (nDay !== DDate[DIdx]) { + resetHour(); + } + // 濡傛灉褰撳墠鈥滄椂鈥濅笉涓烘暟缁勪腑褰撳墠鍊� + if (nHour !== hDate[hIdx]) { + resetMin(); + } + // 濡傛灉褰撳墠鈥滃垎鈥濅笉涓烘暟缁勪腑褰撳墠鍊� + if (nMin !== mDate[mIdx]) { + resetSecond(); + } + + // 寰幆骞翠唤鏁扮粍 + goYear: for (let Yi = YIdx; Yi < YDate.length; Yi++) { + let YY = YDate[Yi]; + // 濡傛灉鍒拌揪鏈�澶у�兼椂 + if (nMonth > MDate[MDate.length - 1]) { + resetMonth(); + continue; + } + // 寰幆鏈堜唤鏁扮粍 + goMonth: for (let Mi = MIdx; Mi < MDate.length; Mi++) { + // 璧嬪�笺�佹柟渚垮悗闈㈣繍绠� + let MM = MDate[Mi]; + MM = MM < 10 ? '0' + MM : MM; + // 濡傛灉鍒拌揪鏈�澶у�兼椂 + if (nDay > DDate[DDate.length - 1]) { + resetDay(); + if (Mi == MDate.length - 1) { + resetMonth(); + continue goYear; + } + continue; + } + // 寰幆鏃ユ湡鏁扮粍 + goDay: for (let Di = DIdx; Di < DDate.length; Di++) { + // 璧嬪�笺�佹柟渚垮悗闈㈣繍绠� + let DD = DDate[Di]; + let thisDD = DD < 10 ? '0' + DD : DD; + + // 濡傛灉鍒拌揪鏈�澶у�兼椂 + if (nHour > hDate[hDate.length - 1]) { + resetHour(); + if (Di == DDate.length - 1) { + resetDay(); + if (Mi == MDate.length - 1) { + resetMonth(); + continue goYear; + } + continue goMonth; + } + continue; + } + + // 鍒ゆ柇鏃ユ湡鐨勫悎娉曟�э紝涓嶅悎娉曠殑璇濅篃鏄烦鍑哄綋鍓嶅惊鐜� + if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') { + resetDay(); + continue goMonth; + } + // 濡傛灉鏃ユ湡瑙勫垯涓湁鍊兼椂 + if (this.dayRule == 'lastDay') { + // 濡傛灉涓嶆槸鍚堟硶鏃ユ湡鍒欓渶瑕佸皢鍓嶅皢鏃ユ湡璋冨埌鍚堟硶鏃ユ湡鍗虫湀鏈渶鍚庝竴澶� + + if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { + while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { + DD--; + + thisDD = DD < 10 ? '0' + DD : DD; + } + } + } else if (this.dayRule == 'workDay') { + // 鏍¢獙骞惰皟鏁村鏋滄槸2鏈�30鍙疯繖绉嶆棩鏈熶紶杩涙潵鏃堕渶璋冩暣鑷虫甯告湀搴� + if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { + while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { + DD--; + thisDD = DD < 10 ? '0' + DD : DD; + } + } + // 鑾峰彇杈惧埌鏉′欢鐨勬棩鏈熸槸鏄熸湡X + let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week'); + // 褰撴槦鏈熸棩鏃� + if (thisWeek == 0) { + // 鍏堟壘涓嬩竴涓棩锛屽苟鍒ゆ柇鏄惁涓烘湀搴� + DD++; + thisDD = DD < 10 ? '0' + DD : DD; + // 鍒ゆ柇涓嬩竴鏃ュ凡缁忎笉鏄悎娉曟棩鏈� + if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { + DD -= 3; + } + } else if (thisWeek == 6) { + // 褰撴槦鏈�6鏃跺彧闇�鍒ゆ柇涓嶆槸1鍙峰氨鍙繘琛屾搷浣� + if (this.dayRuleSup !== 1) { + DD--; + } else { + DD += 2; + } + } + } else if (this.dayRule == 'weekDay') { + // 濡傛灉鎸囧畾浜嗘槸鏄熸湡鍑� + // 鑾峰彇褰撳墠鏃ユ湡鏄睘浜庢槦鏈熷嚑 + let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week'); + // 鏍¢獙褰撳墠鏄熸湡鏄惁鍦ㄦ槦鏈熸睜锛坉ayRuleSup锛変腑 + if (Array.indexOf(this.dayRuleSup, thisWeek) < 0) { + // 濡傛灉鍒拌揪鏈�澶у�兼椂 + if (Di == DDate.length - 1) { + resetDay(); + if (Mi == MDate.length - 1) { + resetMonth(); + continue goYear; + } + continue goMonth; + } + continue; + } + } else if (this.dayRule == 'assWeek') { + // 濡傛灉鎸囧畾浜嗘槸绗嚑鍛ㄧ殑鏄熸湡鍑� + // 鑾峰彇姣忔湀1鍙锋槸灞炰簬鏄熸湡鍑� + let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week'); + if (this.dayRuleSup[1] >= thisWeek) { + DD = (this.dayRuleSup[0] - 1) * 7 + this.dayRuleSup[1] - thisWeek + 1; + } else { + DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1; + } + } else if (this.dayRule == 'lastWeek') { + // 濡傛灉鎸囧畾浜嗘瘡鏈堟渶鍚庝竴涓槦鏈熷嚑 + // 鏍¢獙骞惰皟鏁村鏋滄槸2鏈�30鍙疯繖绉嶆棩鏈熶紶杩涙潵鏃堕渶璋冩暣鑷虫甯告湀搴� + if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { + while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { + DD--; + thisDD = DD < 10 ? '0' + DD : DD; + } + } + // 鑾峰彇鏈堟湯鏈�鍚庝竴澶╂槸鏄熸湡鍑� + let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week'); + // 鎵惧埌瑕佹眰涓渶杩戠殑閭d釜鏄熸湡鍑� + if (this.dayRuleSup < thisWeek) { + DD -= thisWeek - this.dayRuleSup; + } else if (this.dayRuleSup > thisWeek) { + DD -= 7 - (this.dayRuleSup - thisWeek) + } + } + // 鍒ゆ柇鏃堕棿鍊兼槸鍚﹀皬浜�10缃崲鎴愨��05鈥濊繖绉嶆牸寮� + DD = DD < 10 ? '0' + DD : DD; + + // 寰幆鈥滄椂鈥濇暟缁� + goHour: for (let hi = hIdx; hi < hDate.length; hi++) { + let hh = hDate[hi] < 10 ? '0' + hDate[hi] : hDate[hi] + + // 濡傛灉鍒拌揪鏈�澶у�兼椂 + if (nMin > mDate[mDate.length - 1]) { + resetMin(); + if (hi == hDate.length - 1) { + resetHour(); + if (Di == DDate.length - 1) { + resetDay(); + if (Mi == MDate.length - 1) { + resetMonth(); + continue goYear; + } + continue goMonth; + } + continue goDay; + } + continue; + } + // 寰幆"鍒�"鏁扮粍 + goMin: for (let mi = mIdx; mi < mDate.length; mi++) { + let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi]; + + // 濡傛灉鍒拌揪鏈�澶у�兼椂 + if (nSecond > sDate[sDate.length - 1]) { + resetSecond(); + if (mi == mDate.length - 1) { + resetMin(); + if (hi == hDate.length - 1) { + resetHour(); + if (Di == DDate.length - 1) { + resetDay(); + if (Mi == MDate.length - 1) { + resetMonth(); + continue goYear; + } + continue goMonth; + } + continue goDay; + } + continue goHour; + } + continue; + } + // 寰幆"绉�"鏁扮粍 + goSecond: for (let si = sIdx; si <= sDate.length - 1; si++) { + let ss = sDate[si] < 10 ? '0' + sDate[si] : sDate[si]; + // 娣诲姞褰撳墠鏃堕棿锛堟椂闂村悎娉曟�у湪鏃ユ湡寰幆鏃跺凡缁忓垽鏂級 + if (MM !== '00' && DD !== '00') { + resultArr.push(YY + '-' + MM + '-' + DD + ' ' + hh + ':' + mm + ':' + ss) + nums++; + } + // 濡傛灉鏉℃暟婊′簡灏遍��鍑哄惊鐜� + if (nums == 5) break goYear; + // 濡傛灉鍒拌揪鏈�澶у�兼椂 + if (si == sDate.length - 1) { + resetSecond(); + if (mi == mDate.length - 1) { + resetMin(); + if (hi == hDate.length - 1) { + resetHour(); + if (Di == DDate.length - 1) { + resetDay(); + if (Mi == MDate.length - 1) { + resetMonth(); + continue goYear; + } + continue goMonth; + } + continue goDay; + } + continue goHour; + } + continue goMin; + } + } //goSecond + } //goMin + }//goHour + }//goDay + }//goMonth + } + // 鍒ゆ柇100骞村唴鐨勭粨鏋滄潯鏁� + if (resultArr.length == 0) { + this.resultList = ['娌℃湁杈惧埌鏉′欢鐨勭粨鏋滐紒']; + } else { + this.resultList = resultArr; + if (resultArr.length !== 5) { + this.resultList.push('鏈�杩�100骞村唴鍙湁涓婇潰' + resultArr.length + '鏉$粨鏋滐紒') + } + } + // 璁$畻瀹屾垚-鏄剧ず缁撴灉 + this.isShow = true; + + + }, + // 鐢ㄤ簬璁$畻鏌愪綅鏁板瓧鍦ㄦ暟缁勪腑鐨勭储寮� + getIndex(arr, value) { + if (value <= arr[0] || value > arr[arr.length - 1]) { + return 0; + } else { + for (let i = 0; i < arr.length - 1; i++) { + if (value > arr[i] && value <= arr[i + 1]) { + return i + 1; + } + } + } + }, + // 鑾峰彇"骞�"鏁扮粍 + getYearArr(rule, year) { + this.dateArr[5] = this.getOrderArr(year, year + 100); + if (rule !== undefined) { + if (rule.indexOf('-') >= 0) { + this.dateArr[5] = this.getCycleArr(rule, year + 100, false) + } else if (rule.indexOf('/') >= 0) { + this.dateArr[5] = this.getAverageArr(rule, year + 100) + } else if (rule !== '*') { + this.dateArr[5] = this.getAssignArr(rule) + } + } + }, + // 鑾峰彇"鏈�"鏁扮粍 + getMonthArr(rule) { + this.dateArr[4] = this.getOrderArr(1, 12); + if (rule.indexOf('-') >= 0) { + this.dateArr[4] = this.getCycleArr(rule, 12, false) + } else if (rule.indexOf('/') >= 0) { + this.dateArr[4] = this.getAverageArr(rule, 12) + } else if (rule !== '*') { + this.dateArr[4] = this.getAssignArr(rule) + } + }, + // 鑾峰彇"鏃�"鏁扮粍-涓昏涓烘棩鏈熻鍒� + getWeekArr(rule) { + // 鍙湁褰撴棩鏈熻鍒欑殑涓や釜鍊煎潎涓衡�溾�濇椂鍒欒〃杈炬棩鏈熸槸鏈夐�夐」鐨� + if (this.dayRule == '' && this.dayRuleSup == '') { + if (rule.indexOf('-') >= 0) { + this.dayRule = 'weekDay'; + this.dayRuleSup = this.getCycleArr(rule, 7, false) + } else if (rule.indexOf('#') >= 0) { + this.dayRule = 'assWeek'; + let matchRule = rule.match(/[0-9]{1}/g); + this.dayRuleSup = [Number(matchRule[0]), Number(matchRule[1])]; + this.dateArr[3] = [1]; + if (this.dayRuleSup[1] == 7) { + this.dayRuleSup[1] = 0; + } + } else if (rule.indexOf('L') >= 0) { + this.dayRule = 'lastWeek'; + this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]); + this.dateArr[3] = [31]; + if (this.dayRuleSup == 7) { + this.dayRuleSup = 0; + } + } else if (rule !== '*' && rule !== '?') { + this.dayRule = 'weekDay'; + this.dayRuleSup = this.getAssignArr(rule) + } + // 濡傛灉weekDay鏃跺皢7璋冩暣涓�0銆恮eek鍊�0鍗虫槸鏄熸湡鏃ャ�� + if (this.dayRule == 'weekDay') { + for (let i = 0; i < this.dayRuleSup.length; i++) { + if (this.dayRuleSup[i] == 7) { + this.dayRuleSup[i] = 0; + } + } + } + } + }, + // 鑾峰彇"鏃�"鏁扮粍-灏戦噺涓烘棩鏈熻鍒� + getDayArr(rule) { + this.dateArr[3] = this.getOrderArr(1, 31); + this.dayRule = ''; + this.dayRuleSup = ''; + if (rule.indexOf('-') >= 0) { + this.dateArr[3] = this.getCycleArr(rule, 31, false) + this.dayRuleSup = 'null'; + } else if (rule.indexOf('/') >= 0) { + this.dateArr[3] = this.getAverageArr(rule, 31) + this.dayRuleSup = 'null'; + } else if (rule.indexOf('W') >= 0) { + this.dayRule = 'workDay'; + this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]); + this.dateArr[3] = [this.dayRuleSup]; + } else if (rule.indexOf('L') >= 0) { + this.dayRule = 'lastDay'; + this.dayRuleSup = 'null'; + this.dateArr[3] = [31]; + } else if (rule !== '*' && rule !== '?') { + this.dateArr[3] = this.getAssignArr(rule) + this.dayRuleSup = 'null'; + } else if (rule == '*') { + this.dayRuleSup = 'null'; + } + }, + // 鑾峰彇"鏃�"鏁扮粍 + getHourArr(rule) { + this.dateArr[2] = this.getOrderArr(0, 23); + if (rule.indexOf('-') >= 0) { + this.dateArr[2] = this.getCycleArr(rule, 24, true) + } else if (rule.indexOf('/') >= 0) { + this.dateArr[2] = this.getAverageArr(rule, 23) + } else if (rule !== '*') { + this.dateArr[2] = this.getAssignArr(rule) + } + }, + // 鑾峰彇"鍒�"鏁扮粍 + getMinArr(rule) { + this.dateArr[1] = this.getOrderArr(0, 59); + if (rule.indexOf('-') >= 0) { + this.dateArr[1] = this.getCycleArr(rule, 60, true) + } else if (rule.indexOf('/') >= 0) { + this.dateArr[1] = this.getAverageArr(rule, 59) + } else if (rule !== '*') { + this.dateArr[1] = this.getAssignArr(rule) + } + }, + // 鑾峰彇"绉�"鏁扮粍 + getSecondArr(rule) { + this.dateArr[0] = this.getOrderArr(0, 59); + if (rule.indexOf('-') >= 0) { + this.dateArr[0] = this.getCycleArr(rule, 60, true) + } else if (rule.indexOf('/') >= 0) { + this.dateArr[0] = this.getAverageArr(rule, 59) + } else if (rule !== '*') { + this.dateArr[0] = this.getAssignArr(rule) + } + }, + // 鏍规嵁浼犺繘鏉ョ殑min-max杩斿洖涓�涓『搴忕殑鏁扮粍 + getOrderArr(min, max) { + let arr = []; + for (let i = min; i <= max; i++) { + arr.push(i); + } + return arr; + }, + // 鏍规嵁瑙勫垯涓寚瀹氱殑闆舵暎鍊艰繑鍥炰竴涓暟缁� + getAssignArr(rule) { + let arr = []; + let assiginArr = rule.split(','); + for (let i = 0; i < assiginArr.length; i++) { + arr[i] = Number(assiginArr[i]) + } + arr.sort(this.compare) + return arr; + }, + // 鏍规嵁涓�瀹氱畻鏈鍒欒绠楄繑鍥炰竴涓暟缁� + getAverageArr(rule, limit) { + let arr = []; + let agArr = rule.split('/'); + let min = Number(agArr[0]); + let step = Number(agArr[1]); + while (min <= limit) { + arr.push(min); + min += step; + } + return arr; + }, + // 鏍规嵁瑙勫垯杩斿洖涓�涓叿鏈夊懆鏈熸�х殑鏁扮粍 + getCycleArr(rule, limit, status) { + // status--琛ㄧず鏄惁浠�0寮�濮嬶紙鍒欎粠1寮�濮嬶級 + let arr = []; + let cycleArr = rule.split('-'); + let min = Number(cycleArr[0]); + let max = Number(cycleArr[1]); + if (min > max) { + max += limit; + } + for (let i = min; i <= max; i++) { + let add = 0; + if (status == false && i % limit == 0) { + add = limit; + } + arr.push(Math.round(i % limit + add)) + } + arr.sort(this.compare) + return arr; + }, + // 姣旇緝鏁板瓧澶у皬锛堢敤浜嶢rray.sort锛� + compare(value1, value2) { + if (value2 - value1 > 0) { + return -1; + } else { + return 1; + } + }, + // 鏍煎紡鍖栨棩鏈熸牸寮忓锛�2017-9-19 18:04:33 + formatDate(value, type) { + // 璁$畻鏃ユ湡鐩稿叧鍊� + let time = typeof value == 'number' ? new Date(value) : value; + let Y = time.getFullYear(); + let M = time.getMonth() + 1; + let D = time.getDate(); + let h = time.getHours(); + let m = time.getMinutes(); + let s = time.getSeconds(); + let week = time.getDay(); + // 濡傛灉浼犻�掍簡type鐨勮瘽 + if (type == undefined) { + return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s); + } else if (type == 'week') { + return week; + } + }, + // 妫�鏌ユ棩鏈熸槸鍚﹀瓨鍦� + checkDate(value) { + let time = new Date(value); + let format = this.formatDate(time) + return value == format ? true : false; + } + }, + watch: { + 'ex': 'expressionChange' + }, + props: ['ex'], + mounted: function () { + // 鍒濆鍖� 鑾峰彇涓�娆$粨鏋� + this.expressionChange(); + } +} + +</script> diff --git a/ruoyi-ui/src/components/Crontab/second.vue b/ruoyi-ui/src/components/Crontab/second.vue index 20a8eb3..0fdf338 100644 --- a/ruoyi-ui/src/components/Crontab/second.vue +++ b/ruoyi-ui/src/components/Crontab/second.vue @@ -1,133 +1,133 @@ -<template> - <el-form size="small"> - <el-form-item> - <el-radio v-model='radioValue' :label="1"> - 绉掞紝鍏佽鐨勯�氶厤绗, - * /] - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="2"> - 鍛ㄦ湡浠� - <el-input-number v-model='cycle01' :min="0" :max="60" /> - - <el-input-number v-model='cycle02' :min="0" :max="60" /> 绉� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="3"> - 浠� - <el-input-number v-model='average01' :min="0" :max="60" /> 绉掑紑濮嬶紝姣� - <el-input-number v-model='average02' :min="0" :max="60" /> 绉掓墽琛屼竴娆� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="4"> - 鎸囧畾 - <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> - <el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option> - </el-select> - </el-radio> - </el-form-item> - </el-form> -</template> - -<script> -export default { - data() { - return { - radioValue: 1, - cycle01: 1, - cycle02: 2, - average01: 0, - average02: 1, - checkboxList: [], - checkNum: this.$options.propsData.check - } - }, - name: 'crontab-second', - props: ['check', 'radioParent'], - methods: { - // 鍗曢�夋寜閽�煎彉鍖栨椂 - radioChange() { - switch (this.radioValue) { - case 1: - this.$emit('update', 'second', '*', 'second'); - this.$emit('update', 'min', '*', 'second'); - break; - case 2: - this.$emit('update', 'second', this.cycle01 + '-' + this.cycle02); - break; - case 3: - this.$emit('update', 'second', this.average01 + '/' + this.average02); - break; - case 4: - this.$emit('update', 'second', this.checkboxString); - break; - } - }, - // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 - cycleChange() { - if (this.radioValue == '2') { - this.$emit('update', 'second', this.cycleTotal); - } - }, - // 骞冲潎涓や釜鍊煎彉鍖栨椂 - averageChange() { - if (this.radioValue == '3') { - this.$emit('update', 'second', this.averageTotal); - } - }, - // checkbox鍊煎彉鍖栨椂 - checkboxChange() { - if (this.radioValue == '4') { - this.$emit('update', 'second', this.checkboxString); - } - }, - othChange() { - //鍙嶈В鏋� - let ins = this.cron.second - ('鍙嶈В鏋� second', ins); - if (ins === '*') { - this.radioValue = 1; - } else if (ins.indexOf('-') > -1) { - this.radioValue = 2 - } else if (ins.indexOf('/') > -1) { - this.radioValue = 3 - } else { - this.radioValue = 4 - this.checkboxList = ins.split(',') - } - } - }, - watch: { - "radioValue": "radioChange", - 'cycleTotal': 'cycleChange', - 'averageTotal': 'averageChange', - 'checkboxString': 'checkboxChange', - radioParent() { - this.radioValue = this.radioParent - } - }, - computed: { - // 璁$畻涓や釜鍛ㄦ湡鍊� - cycleTotal: function () { - this.cycle01 = this.checkNum(this.cycle01, 0, 59) - this.cycle02 = this.checkNum(this.cycle02, 0, 59) - return this.cycle01 + '-' + this.cycle02; - }, - // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� - averageTotal: function () { - this.average01 = this.checkNum(this.average01, 0, 59) - this.average02 = this.checkNum(this.average02, 1, 59) - return this.average01 + '/' + this.average02; - }, - // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� - checkboxString: function () { - let str = this.checkboxList.join(); - return str == '' ? '*' : str; - } - } -} -</script> \ No newline at end of file +<template> + <el-form size="small"> + <el-form-item> + <el-radio v-model='radioValue' :label="1"> + 绉掞紝鍏佽鐨勯�氶厤绗, - * /] + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="2"> + 鍛ㄦ湡浠� + <el-input-number v-model='cycle01' :min="0" :max="60" /> - + <el-input-number v-model='cycle02' :min="0" :max="60" /> 绉� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="3"> + 浠� + <el-input-number v-model='average01' :min="0" :max="60" /> 绉掑紑濮嬶紝姣� + <el-input-number v-model='average02' :min="0" :max="60" /> 绉掓墽琛屼竴娆� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="4"> + 鎸囧畾 + <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> + <el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option> + </el-select> + </el-radio> + </el-form-item> + </el-form> +</template> + +<script> +export default { + data() { + return { + radioValue: 1, + cycle01: 1, + cycle02: 2, + average01: 0, + average02: 1, + checkboxList: [], + checkNum: this.$options.propsData.check + } + }, + name: 'crontab-second', + props: ['check', 'radioParent'], + methods: { + // 鍗曢�夋寜閽�煎彉鍖栨椂 + radioChange() { + switch (this.radioValue) { + case 1: + this.$emit('update', 'second', '*', 'second'); + this.$emit('update', 'min', '*', 'second'); + break; + case 2: + this.$emit('update', 'second', this.cycle01 + '-' + this.cycle02); + break; + case 3: + this.$emit('update', 'second', this.average01 + '/' + this.average02); + break; + case 4: + this.$emit('update', 'second', this.checkboxString); + break; + } + }, + // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 + cycleChange() { + if (this.radioValue == '2') { + this.$emit('update', 'second', this.cycleTotal); + } + }, + // 骞冲潎涓や釜鍊煎彉鍖栨椂 + averageChange() { + if (this.radioValue == '3') { + this.$emit('update', 'second', this.averageTotal); + } + }, + // checkbox鍊煎彉鍖栨椂 + checkboxChange() { + if (this.radioValue == '4') { + this.$emit('update', 'second', this.checkboxString); + } + }, + othChange() { + // 鍙嶈В鏋� + let ins = this.cron.second + ('鍙嶈В鏋� second', ins); + if (ins === '*') { + this.radioValue = 1; + } else if (ins.indexOf('-') > -1) { + this.radioValue = 2 + } else if (ins.indexOf('/') > -1) { + this.radioValue = 3 + } else { + this.radioValue = 4 + this.checkboxList = ins.split(',') + } + } + }, + watch: { + "radioValue": "radioChange", + 'cycleTotal': 'cycleChange', + 'averageTotal': 'averageChange', + 'checkboxString': 'checkboxChange', + radioParent() { + this.radioValue = this.radioParent + } + }, + computed: { + // 璁$畻涓や釜鍛ㄦ湡鍊� + cycleTotal: function () { + this.cycle01 = this.checkNum(this.cycle01, 0, 59) + this.cycle02 = this.checkNum(this.cycle02, 0, 59) + return this.cycle01 + '-' + this.cycle02; + }, + // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� + averageTotal: function () { + this.average01 = this.checkNum(this.average01, 0, 59) + this.average02 = this.checkNum(this.average02, 1, 59) + return this.average01 + '/' + this.average02; + }, + // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� + checkboxString: function () { + let str = this.checkboxList.join(); + return str == '' ? '*' : str; + } + } +} +</script> diff --git a/ruoyi-ui/src/components/Crontab/week.vue b/ruoyi-ui/src/components/Crontab/week.vue index 8a7cb6b..5ad949d 100644 --- a/ruoyi-ui/src/components/Crontab/week.vue +++ b/ruoyi-ui/src/components/Crontab/week.vue @@ -1,167 +1,167 @@ -<template> - <el-form size='small'> - <el-form-item> - <el-radio v-model='radioValue' :label="1"> - 鍛紝鍏佽鐨勯�氶厤绗, - * / L #] - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="2"> - 涓嶆寚瀹� - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="3"> - 鍛ㄦ湡浠庢槦鏈� - <el-input-number v-model='cycle01' :min="1" :max="7" /> - - <el-input-number v-model='cycle02' :min="1" :max="7" /> - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="4"> - 绗� - <el-input-number v-model='average01' :min="1" :max="4" /> 鍛ㄧ殑鏄熸湡 - <el-input-number v-model='average02' :min="1" :max="7" /> - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="5"> - 鏈湀鏈�鍚庝竴涓槦鏈� - <el-input-number v-model='weekday' :min="1" :max="7" /> - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio v-model='radioValue' :label="6"> - 鎸囧畾 - <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> - <el-option v-for="(item,index) of weekList" :key="index" :value="index+1">{{item}}</el-option> - </el-select> - </el-radio> - </el-form-item> - - </el-form> -</template> - -<script> -export default { - data() { - return { - radioValue: 2, - weekday: 1, - cycle01: 1, - cycle02: 2, - average01: 1, - average02: 1, - checkboxList: [], - weekList: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩'], - checkNum: this.$options.propsData.check - } - }, - name: 'crontab-week', - props: ['check', 'cron'], - methods: { - // 鍗曢�夋寜閽�煎彉鍖栨椂 - radioChange() { - if (this.radioValue === 1) { - this.$emit('update', 'week', '*'); - this.$emit('update', 'year', '*'); - } else { - if (this.cron.mouth === '*') { - this.$emit('update', 'mouth', '0', 'week'); - } - if (this.cron.day === '*') { - this.$emit('update', 'day', '0', 'week'); - } - if (this.cron.hour === '*') { - this.$emit('update', 'hour', '0', 'week'); - } - if (this.cron.min === '*') { - this.$emit('update', 'min', '0', 'week'); - } - if (this.cron.second === '*') { - this.$emit('update', 'second', '0', 'week'); - } - } - switch (this.radioValue) { - case 2: - this.$emit('update', 'week', '?'); - break; - case 3: - this.$emit('update', 'week', this.cycle01 + '-' + this.cycle02); - break; - case 4: - this.$emit('update', 'week', this.average01 + '#' + this.average02); - break; - case 5: - this.$emit('update', 'week', this.weekday + 'L'); - break; - case 6: - this.$emit('update', 'week', this.checkboxString); - break; - } - }, - // 鏍规嵁浜掓枼浜嬩欢锛屾洿鏀箁adio鐨勫�� - - // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 - cycleChange() { - if (this.radioValue == '3') { - this.$emit('update', 'week', this.cycleTotal); - } - }, - // 骞冲潎涓や釜鍊煎彉鍖栨椂 - averageChange() { - if (this.radioValue == '4') { - this.$emit('update', 'week', this.averageTotal); - } - }, - // 鏈�杩戝伐浣滄棩鍊煎彉鍖栨椂 - weekdayChange() { - if (this.radioValue == '5') { - this.$emit('update', 'week', this.weekday + 'L'); - } - }, - // checkbox鍊煎彉鍖栨椂 - checkboxChange() { - if (this.radioValue == '6') { - this.$emit('update', 'week', this.checkboxString); - } - }, - }, - watch: { - "radioValue": "radioChange", - 'cycleTotal': 'cycleChange', - 'averageTotal': 'averageChange', - 'weekdayCheck': 'weekdayChange', - 'checkboxString': 'checkboxChange', - }, - computed: { - // 璁$畻涓や釜鍛ㄦ湡鍊� - cycleTotal: function () { - this.cycle01 = this.checkNum(this.cycle01, 1, 7) - this.cycle02 = this.checkNum(this.cycle02, 1, 7) - return this.cycle01 + '-' + this.cycle02; - }, - // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� - averageTotal: function () { - this.average01 = this.checkNum(this.average01, 1, 4) - this.average02 = this.checkNum(this.average02, 1, 7) - return this.average01 + '#' + this.average02; - }, - // 鏈�杩戠殑宸ヤ綔鏃ワ紙鏍煎紡锛� - weekdayCheck: function () { - this.weekday = this.checkNum(this.weekday, 1, 7) - return this.weekday; - }, - // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� - checkboxString: function () { - let str = this.checkboxList.join(); - return str == '' ? '*' : str; - } - } -} -</script> \ No newline at end of file +<template> + <el-form size='small'> + <el-form-item> + <el-radio v-model='radioValue' :label="1"> + 鍛紝鍏佽鐨勯�氶厤绗, - * / L #] + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="2"> + 涓嶆寚瀹� + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="3"> + 鍛ㄦ湡浠庢槦鏈� + <el-input-number v-model='cycle01' :min="1" :max="7" /> - + <el-input-number v-model='cycle02' :min="1" :max="7" /> + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="4"> + 绗� + <el-input-number v-model='average01' :min="1" :max="4" /> 鍛ㄧ殑鏄熸湡 + <el-input-number v-model='average02' :min="1" :max="7" /> + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="5"> + 鏈湀鏈�鍚庝竴涓槦鏈� + <el-input-number v-model='weekday' :min="1" :max="7" /> + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio v-model='radioValue' :label="6"> + 鎸囧畾 + <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple style="width:100%"> + <el-option v-for="(item,index) of weekList" :key="index" :value="index+1">{{item}}</el-option> + </el-select> + </el-radio> + </el-form-item> + + </el-form> +</template> + +<script> +export default { + data() { + return { + radioValue: 2, + weekday: 1, + cycle01: 1, + cycle02: 2, + average01: 1, + average02: 1, + checkboxList: [], + weekList: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩'], + checkNum: this.$options.propsData.check + } + }, + name: 'crontab-week', + props: ['check', 'cron'], + methods: { + // 鍗曢�夋寜閽�煎彉鍖栨椂 + radioChange() { + if (this.radioValue === 1) { + this.$emit('update', 'week', '*'); + this.$emit('update', 'year', '*'); + } else { + if (this.cron.month === '*') { + this.$emit('update', 'month', '0', 'week'); + } + if (this.cron.day === '*') { + this.$emit('update', 'day', '0', 'week'); + } + if (this.cron.hour === '*') { + this.$emit('update', 'hour', '0', 'week'); + } + if (this.cron.min === '*') { + this.$emit('update', 'min', '0', 'week'); + } + if (this.cron.second === '*') { + this.$emit('update', 'second', '0', 'week'); + } + } + switch (this.radioValue) { + case 2: + this.$emit('update', 'week', '?'); + break; + case 3: + this.$emit('update', 'week', this.cycle01 + '-' + this.cycle02); + break; + case 4: + this.$emit('update', 'week', this.average01 + '#' + this.average02); + break; + case 5: + this.$emit('update', 'week', this.weekday + 'L'); + break; + case 6: + this.$emit('update', 'week', this.checkboxString); + break; + } + }, + // 鏍规嵁浜掓枼浜嬩欢锛屾洿鏀箁adio鐨勫�� + + // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 + cycleChange() { + if (this.radioValue == '3') { + this.$emit('update', 'week', this.cycleTotal); + } + }, + // 骞冲潎涓や釜鍊煎彉鍖栨椂 + averageChange() { + if (this.radioValue == '4') { + this.$emit('update', 'week', this.averageTotal); + } + }, + // 鏈�杩戝伐浣滄棩鍊煎彉鍖栨椂 + weekdayChange() { + if (this.radioValue == '5') { + this.$emit('update', 'week', this.weekday + 'L'); + } + }, + // checkbox鍊煎彉鍖栨椂 + checkboxChange() { + if (this.radioValue == '6') { + this.$emit('update', 'week', this.checkboxString); + } + }, + }, + watch: { + "radioValue": "radioChange", + 'cycleTotal': 'cycleChange', + 'averageTotal': 'averageChange', + 'weekdayCheck': 'weekdayChange', + 'checkboxString': 'checkboxChange', + }, + computed: { + // 璁$畻涓や釜鍛ㄦ湡鍊� + cycleTotal: function () { + this.cycle01 = this.checkNum(this.cycle01, 1, 7) + this.cycle02 = this.checkNum(this.cycle02, 1, 7) + return this.cycle01 + '-' + this.cycle02; + }, + // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� + averageTotal: function () { + this.average01 = this.checkNum(this.average01, 1, 4) + this.average02 = this.checkNum(this.average02, 1, 7) + return this.average01 + '#' + this.average02; + }, + // 鏈�杩戠殑宸ヤ綔鏃ワ紙鏍煎紡锛� + weekdayCheck: function () { + this.weekday = this.checkNum(this.weekday, 1, 7) + return this.weekday; + }, + // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� + checkboxString: function () { + let str = this.checkboxList.join(); + return str == '' ? '*' : str; + } + } +} +</script> diff --git a/ruoyi-ui/src/components/Crontab/year.vue b/ruoyi-ui/src/components/Crontab/year.vue index 02bcac3..800dfa5 100644 --- a/ruoyi-ui/src/components/Crontab/year.vue +++ b/ruoyi-ui/src/components/Crontab/year.vue @@ -1,144 +1,144 @@ -<template> - <el-form size="small"> - <el-form-item> - <el-radio :label="1" v-model='radioValue'> - 涓嶅~锛屽厑璁哥殑閫氶厤绗, - * /] - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio :label="2" v-model='radioValue'> - 姣忓勾 - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio :label="3" v-model='radioValue'> - 鍛ㄦ湡浠� - <el-input-number v-model='cycle01' :min='fullYear' /> - - <el-input-number v-model='cycle02' :min='fullYear' /> - </el-radio> - </el-form-item> - - <el-form-item> - <el-radio :label="4" v-model='radioValue'> - 浠� - <el-input-number v-model='average01' :min='fullYear' /> 骞村紑濮嬶紝姣� - <el-input-number v-model='average02' :min='fullYear' /> 骞存墽琛屼竴娆� - </el-radio> - - </el-form-item> - - <el-form-item> - <el-radio :label="5" v-model='radioValue'> - 鎸囧畾 - <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple> - <el-option v-for="item in 9" :key="item" :value="item - 1 + fullYear" :label="item -1 + fullYear" /> - </el-select> - </el-radio> - </el-form-item> - </el-form> -</template> - -<script> -export default { - data() { - return { - fullYear: 0, - radioValue: 1, - cycle01: 0, - cycle02: 0, - average01: 0, - average02: 1, - checkboxList: [], - checkNum: this.$options.propsData.check - } - }, - name: 'crontab-year', - props: ['check', 'mouth', 'cron'], - methods: { - // 鍗曢�夋寜閽�煎彉鍖栨椂 - radioChange() { - if (this.cron.mouth === '*') { - this.$emit('update', 'mouth', '0', 'year'); - } - if (this.cron.day === '*') { - this.$emit('update', 'day', '0', 'year'); - } - if (this.cron.hour === '*') { - this.$emit('update', 'hour', '0', 'year'); - } - if (this.cron.min === '*') { - this.$emit('update', 'min', '0', 'year'); - } - if (this.cron.second === '*') { - this.$emit('update', 'second', '0', 'year'); - } - switch (this.radioValue) { - case 1: - this.$emit('update', 'year', ''); - break; - case 2: - this.$emit('update', 'year', '*'); - break; - case 3: - this.$emit('update', 'year', this.cycle01 + '-' + this.cycle02); - break; - case 4: - this.$emit('update', 'year', this.average01 + '/' + this.average02); - break; - case 5: - this.$emit('update', 'year', this.checkboxString); - break; - } - }, - // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 - cycleChange() { - if (this.radioValue == '3') { - this.$emit('update', 'year', this.cycleTotal); - } - }, - // 骞冲潎涓や釜鍊煎彉鍖栨椂 - averageChange() { - if (this.radioValue == '4') { - this.$emit('update', 'year', this.averageTotal); - } - }, - // checkbox鍊煎彉鍖栨椂 - checkboxChange() { - if (this.radioValue == '5') { - this.$emit('update', 'year', this.checkboxString); - } - } - }, - watch: { - "radioValue": "radioChange", - 'cycleTotal': 'cycleChange', - 'averageTotal': 'averageChange', - 'checkboxString': 'checkboxChange' - }, - computed: { - // 璁$畻涓や釜鍛ㄦ湡鍊� - cycleTotal: function () { - this.cycle01 = this.checkNum(this.cycle01, this.fullYear, this.fullYear + 100) - this.cycle02 = this.checkNum(this.cycle02, this.fullYear + 1, this.fullYear + 101) - return this.cycle01 + '-' + this.cycle02; - }, - // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� - averageTotal: function () { - this.average01 = this.checkNum(this.average01, this.fullYear, this.fullYear + 100) - this.average02 = this.checkNum(this.average02, 1, 10) - return this.average01 + '/' + this.average02; - }, - // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� - checkboxString: function () { - let str = this.checkboxList.join(); - return str; - } - }, - mounted: function () { - // 浠呰幏鍙栧綋鍓嶅勾浠� - this.fullYear = Number(new Date().getFullYear()); - } -} -</script> \ No newline at end of file +<template> + <el-form size="small"> + <el-form-item> + <el-radio :label="1" v-model='radioValue'> + 涓嶅~锛屽厑璁哥殑閫氶厤绗, - * /] + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio :label="2" v-model='radioValue'> + 姣忓勾 + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio :label="3" v-model='radioValue'> + 鍛ㄦ湡浠� + <el-input-number v-model='cycle01' :min='fullYear' /> - + <el-input-number v-model='cycle02' :min='fullYear' /> + </el-radio> + </el-form-item> + + <el-form-item> + <el-radio :label="4" v-model='radioValue'> + 浠� + <el-input-number v-model='average01' :min='fullYear' /> 骞村紑濮嬶紝姣� + <el-input-number v-model='average02' :min='fullYear' /> 骞存墽琛屼竴娆� + </el-radio> + + </el-form-item> + + <el-form-item> + <el-radio :label="5" v-model='radioValue'> + 鎸囧畾 + <el-select clearable v-model="checkboxList" placeholder="鍙閫�" multiple> + <el-option v-for="item in 9" :key="item" :value="item - 1 + fullYear" :label="item -1 + fullYear" /> + </el-select> + </el-radio> + </el-form-item> + </el-form> +</template> + +<script> +export default { + data() { + return { + fullYear: 0, + radioValue: 1, + cycle01: 0, + cycle02: 0, + average01: 0, + average02: 1, + checkboxList: [], + checkNum: this.$options.propsData.check + } + }, + name: 'crontab-year', + props: ['check', 'month', 'cron'], + methods: { + // 鍗曢�夋寜閽�煎彉鍖栨椂 + radioChange() { + if (this.cron.month === '*') { + this.$emit('update', 'month', '0', 'year'); + } + if (this.cron.day === '*') { + this.$emit('update', 'day', '0', 'year'); + } + if (this.cron.hour === '*') { + this.$emit('update', 'hour', '0', 'year'); + } + if (this.cron.min === '*') { + this.$emit('update', 'min', '0', 'year'); + } + if (this.cron.second === '*') { + this.$emit('update', 'second', '0', 'year'); + } + switch (this.radioValue) { + case 1: + this.$emit('update', 'year', ''); + break; + case 2: + this.$emit('update', 'year', '*'); + break; + case 3: + this.$emit('update', 'year', this.cycle01 + '-' + this.cycle02); + break; + case 4: + this.$emit('update', 'year', this.average01 + '/' + this.average02); + break; + case 5: + this.$emit('update', 'year', this.checkboxString); + break; + } + }, + // 鍛ㄦ湡涓や釜鍊煎彉鍖栨椂 + cycleChange() { + if (this.radioValue == '3') { + this.$emit('update', 'year', this.cycleTotal); + } + }, + // 骞冲潎涓や釜鍊煎彉鍖栨椂 + averageChange() { + if (this.radioValue == '4') { + this.$emit('update', 'year', this.averageTotal); + } + }, + // checkbox鍊煎彉鍖栨椂 + checkboxChange() { + if (this.radioValue == '5') { + this.$emit('update', 'year', this.checkboxString); + } + } + }, + watch: { + "radioValue": "radioChange", + 'cycleTotal': 'cycleChange', + 'averageTotal': 'averageChange', + 'checkboxString': 'checkboxChange' + }, + computed: { + // 璁$畻涓や釜鍛ㄦ湡鍊� + cycleTotal: function () { + this.cycle01 = this.checkNum(this.cycle01, this.fullYear, this.fullYear + 100) + this.cycle02 = this.checkNum(this.cycle02, this.fullYear + 1, this.fullYear + 101) + return this.cycle01 + '-' + this.cycle02; + }, + // 璁$畻骞冲潎鐢ㄥ埌鐨勫�� + averageTotal: function () { + this.average01 = this.checkNum(this.average01, this.fullYear, this.fullYear + 100) + this.average02 = this.checkNum(this.average02, 1, 10) + return this.average01 + '/' + this.average02; + }, + // 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆� + checkboxString: function () { + let str = this.checkboxList.join(); + return str; + } + }, + mounted: function () { + // 浠呰幏鍙栧綋鍓嶅勾浠� + this.fullYear = Number(new Date().getFullYear()); + } +} +</script> diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue index ba088b9..fcf010d 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -18,7 +18,7 @@ > <i class="el-icon-plus"></i> </el-upload> - + <!-- 涓婁紶鎻愮ず --> <div class="el-upload__tip" slot="tip" v-if="showTip"> 璇蜂笂浼� @@ -113,8 +113,10 @@ // 鍒犻櫎鍥剧墖 handleRemove(file, fileList) { const findex = this.fileList.map(f => f.name).indexOf(file.name); - this.fileList.splice(findex, 1); - this.$emit("input", this.listToString(this.fileList)); + if(findex > -1) { + this.fileList.splice(findex, 1); + this.$emit("input", this.listToString(this.fileList)); + } }, // 涓婁紶鎴愬姛鍥炶皟 handleUploadSuccess(res) { @@ -187,24 +189,23 @@ for (let i in list) { strs += list[i].url + separator; } - return strs != "" ? strs.substr(0, strs.length - 1) : ""; - }, - }, + return strs != '' ? strs.substr(0, strs.length - 1) : ''; + } + } }; </script> <style scoped lang="scss"> // .el-upload--picture-card 鎺у埗鍔犲彿閮ㄥ垎 ::v-deep.hide .el-upload--picture-card { - display: none; + display: none; } // 鍘绘帀鍔ㄧ敾鏁堟灉 ::v-deep .el-list-enter-active, ::v-deep .el-list-leave-active { - transition: all 0s; + transition: all 0s; } -::v-deep .el-list-enter, -.el-list-leave-active { +::v-deep .el-list-enter, .el-list-leave-active { opacity: 0; transform: translateY(0); } diff --git a/ruoyi-ui/src/components/ThemePicker/index.vue b/ruoyi-ui/src/components/ThemePicker/index.vue index 5589f5f..1714e1f 100644 --- a/ruoyi-ui/src/components/ThemePicker/index.vue +++ b/ruoyi-ui/src/components/ThemePicker/index.vue @@ -47,14 +47,6 @@ const themeCluster = this.getThemeCluster(val.replace('#', '')) const originalCluster = this.getThemeCluster(oldVal.replace('#', '')) - const $message = this.$message({ - message: ' 姝e湪鍒囨崲涓婚锛岃绋嶅悗...', - customClass: 'theme-message', - type: 'success', - duration: 0, - iconClass: 'el-icon-loading' - }) - const getHandler = (variable, id) => { return () => { const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', '')) @@ -91,9 +83,6 @@ }) this.$emit('change', val) - - $message.close() - }, updateStyle(style, oldCluster, newCluster) { diff --git a/ruoyi-ui/src/layout/components/Sidebar/Link.vue b/ruoyi-ui/src/layout/components/Sidebar/Link.vue index 530b3d5..8b0bc93 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Link.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Link.vue @@ -10,7 +10,7 @@ export default { props: { to: { - type: String, + type: [String, Object], required: true } }, diff --git a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue index c4febee..4853fbb 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -1,7 +1,7 @@ <template> <div v-if="!item.hidden"> <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> - <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> + <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" /> </el-menu-item> @@ -82,13 +82,17 @@ return false }, - resolvePath(routePath) { + resolvePath(routePath, routeQuery) { if (isExternal(routePath)) { return routePath } if (isExternal(this.basePath)) { return this.basePath } + if (routeQuery) { + let query = JSON.parse(routeQuery); + return { path: path.resolve(this.basePath, routePath), query: query } + } return path.resolve(this.basePath, routePath) } } diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 381264e..96f557b 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -9,19 +9,20 @@ /** * Note: 璺敱閰嶇疆椤� * - * hidden: true // 褰撹缃� true 鐨勬椂鍊欒璺敱涓嶄細鍐嶄晶杈规爮鍑虹幇 濡�401锛宭ogin绛夐〉闈紝鎴栬�呭涓�浜涚紪杈戦〉闈�/edit/1 - * alwaysShow: true // 褰撲綘涓�涓矾鐢变笅闈㈢殑 children 澹版槑鐨勮矾鐢卞ぇ浜�1涓椂锛岃嚜鍔ㄤ細鍙樻垚宓屽鐨勬ā寮�--濡傜粍浠堕〉闈� - * // 鍙湁涓�涓椂锛屼細灏嗛偅涓瓙璺敱褰撳仛鏍硅矾鐢辨樉绀哄湪渚ц竟鏍�--濡傚紩瀵奸〉闈� - * // 鑻ヤ綘鎯充笉绠¤矾鐢变笅闈㈢殑 children 澹版槑鐨勪釜鏁伴兘鏄剧ず浣犵殑鏍硅矾鐢� - * // 浣犲彲浠ヨ缃� alwaysShow: true锛岃繖鏍峰畠灏变細蹇界暐涔嬪墠瀹氫箟鐨勮鍒欙紝涓�鐩存樉绀烘牴璺敱 - * redirect: noRedirect // 褰撹缃� noRedirect 鐨勬椂鍊欒璺敱鍦ㄩ潰鍖呭睉瀵艰埅涓笉鍙鐐瑰嚮 - * name:'router-name' // 璁惧畾璺敱鐨勫悕瀛楋紝涓�瀹氳濉啓涓嶇劧浣跨敤<keep-alive>鏃朵細鍑虹幇鍚勭闂 + * hidden: true // 褰撹缃� true 鐨勬椂鍊欒璺敱涓嶄細鍐嶄晶杈规爮鍑虹幇 濡�401锛宭ogin绛夐〉闈紝鎴栬�呭涓�浜涚紪杈戦〉闈�/edit/1 + * alwaysShow: true // 褰撲綘涓�涓矾鐢变笅闈㈢殑 children 澹版槑鐨勮矾鐢卞ぇ浜�1涓椂锛岃嚜鍔ㄤ細鍙樻垚宓屽鐨勬ā寮�--濡傜粍浠堕〉闈� + * // 鍙湁涓�涓椂锛屼細灏嗛偅涓瓙璺敱褰撳仛鏍硅矾鐢辨樉绀哄湪渚ц竟鏍�--濡傚紩瀵奸〉闈� + * // 鑻ヤ綘鎯充笉绠¤矾鐢变笅闈㈢殑 children 澹版槑鐨勪釜鏁伴兘鏄剧ず浣犵殑鏍硅矾鐢� + * // 浣犲彲浠ヨ缃� alwaysShow: true锛岃繖鏍峰畠灏变細蹇界暐涔嬪墠瀹氫箟鐨勮鍒欙紝涓�鐩存樉绀烘牴璺敱 + * redirect: noRedirect // 褰撹缃� noRedirect 鐨勬椂鍊欒璺敱鍦ㄩ潰鍖呭睉瀵艰埅涓笉鍙鐐瑰嚮 + * name:'router-name' // 璁惧畾璺敱鐨勫悕瀛楋紝涓�瀹氳濉啓涓嶇劧浣跨敤<keep-alive>鏃朵細鍑虹幇鍚勭闂 + * query: '{"id": 1, "name": "ry"}' // 璁块棶璺敱鐨勯粯璁や紶閫掑弬鏁� * meta : { - noCache: true // 濡傛灉璁剧疆涓簍rue锛屽垯涓嶄細琚� <keep-alive> 缂撳瓨(榛樿 false) - title: 'title' // 璁剧疆璇ヨ矾鐢卞湪渚ц竟鏍忓拰闈㈠寘灞戜腑灞曠ず鐨勫悕瀛� - icon: 'svg-name' // 璁剧疆璇ヨ矾鐢辩殑鍥炬爣锛屽搴旇矾寰剆rc/assets/icons/svg - breadcrumb: false // 濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず - activeMenu: '/system/user' // 褰撹矾鐢辫缃簡璇ュ睘鎬э紝鍒欎細楂樹寒鐩稿搴旂殑渚ц竟鏍忋�� + noCache: true // 濡傛灉璁剧疆涓簍rue锛屽垯涓嶄細琚� <keep-alive> 缂撳瓨(榛樿 false) + title: 'title' // 璁剧疆璇ヨ矾鐢卞湪渚ц竟鏍忓拰闈㈠寘灞戜腑灞曠ず鐨勫悕瀛� + icon: 'svg-name' // 璁剧疆璇ヨ矾鐢辩殑鍥炬爣锛屽搴旇矾寰剆rc/assets/icons/svg + breadcrumb: false // 濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず + activeMenu: '/system/user' // 褰撹矾鐢辫缃簡璇ュ睘鎬э紝鍒欎細楂樹寒鐩稿搴旂殑渚ц竟鏍忋�� } */ @@ -156,7 +157,7 @@ hidden: true, children: [ { - path: 'index/:tableId(\\d+)', + path: 'index', component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), name: 'GenEdit', meta: { title: '淇敼鐢熸垚閰嶇疆', activeMenu: '/tool/gen'} diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index e4418b1..9b40b4a 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -66,7 +66,7 @@ location.href = '/index'; }) }).catch(() => {}); - return Promise.reject('浠ょ墝楠岃瘉澶辫触') + return Promise.reject('鏃犳晥鐨勪細璇濓紝鎴栬�呬細璇濆凡杩囨湡锛岃閲嶆柊鐧诲綍銆�') } else if (code === 500) { Message({ message: msg, diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index f3aa64a..0f4296c 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -206,6 +206,31 @@ </el-form-item> </el-col> <el-col :span="12"> + <el-form-item v-if="form.menuType == 'C'"> + <el-input v-model="form.query" placeholder="璇疯緭鍏ヨ矾鐢卞弬鏁�" maxlength="255" /> + <span slot="label"> + <el-tooltip content='璁块棶璺敱鐨勯粯璁や紶閫掑弬鏁帮紝濡傦細`{"id": 1, "name": "ry"}`' placement="top"> + <i class="el-icon-question"></i> + </el-tooltip> + 璺敱鍙傛暟 + </span> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item v-if="form.menuType == 'C'"> + <span slot="label"> + <el-tooltip content="閫夋嫨鏄垯浼氳`keep-alive`缂撳瓨锛岄渶瑕佸尮閰嶇粍浠剁殑`name`鍜屽湴鍧�淇濇寔涓�鑷�" placement="top"> + <i class="el-icon-question"></i> + </el-tooltip> + 鏄惁缂撳瓨 + </span> + <el-radio-group v-model="form.isCache"> + <el-radio label="0">缂撳瓨</el-radio> + <el-radio label="1">涓嶇紦瀛�</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="12"> <el-form-item v-if="form.menuType != 'F'"> <span slot="label"> <el-tooltip content="閫夋嫨闅愯棌鍒欒矾鐢卞皢涓嶄細鍑虹幇鍦ㄤ晶杈规爮锛屼絾浠嶇劧鍙互璁块棶" placement="top"> @@ -236,20 +261,6 @@ :key="dict.dictValue" :label="dict.dictValue" >{{dict.dictLabel}}</el-radio> - </el-radio-group> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item v-if="form.menuType == 'C'"> - <span slot="label"> - <el-tooltip content="閫夋嫨鏄垯浼氳`keep-alive`缂撳瓨锛岄渶瑕佸尮閰嶇粍浠剁殑`name`鍜屽湴鍧�淇濇寔涓�鑷�" placement="top"> - <i class="el-icon-question"></i> - </el-tooltip> - 鏄惁缂撳瓨 - </span> - <el-radio-group v-model="form.isCache"> - <el-radio label="0">缂撳瓨</el-radio> - <el-radio label="1">涓嶇紦瀛�</el-radio> </el-radio-group> </el-form-item> </el-col> diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue index fc66dc5..b76f5ba 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/gen/editTable.vue @@ -157,7 +157,7 @@ }; }, created() { - const tableId = this.$route.params && this.$route.params.tableId; + const tableId = this.$route.query && this.$route.query.tableId; if (tableId) { // 鑾峰彇琛ㄨ缁嗕俊鎭� getGenTable(tableId).then(res => { @@ -212,7 +212,7 @@ /** 鍏抽棴鎸夐挳 */ close() { this.$store.dispatch("tagsView/delView", this.$route); - this.$router.push({ path: "/tool/gen", query: { t: Date.now()}}) + this.$router.push({ path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } }) } }, mounted() { diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 1548704..87fc796 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -238,7 +238,8 @@ const time = this.$route.query.t; if (time != null && time != this.uniqueId) { this.uniqueId = time; - this.resetQuery(); + this.queryParams.pageNum = Number(this.$route.query.pageNum); + this.getList(); } }, methods: { @@ -319,7 +320,7 @@ /** 淇敼鎸夐挳鎿嶄綔 */ handleEditTable(row) { const tableId = row.tableId || this.ids[0]; - this.$router.push("/tool/gen-edit/index/" + tableId); + this.$router.push({ path: '/tool/gen-edit/index', query: { tableId: tableId, pageNum: this.queryParams.pageNum } }); }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { @@ -337,4 +338,4 @@ } } }; -</script> \ No newline at end of file +</script> diff --git a/sql/quartz.sql b/sql/quartz.sql index 58106e1..5f99bfb 100644 --- a/sql/quartz.sql +++ b/sql/quartz.sql @@ -56,7 +56,7 @@ -- ---------------------------- create table QRTZ_SIMPLE_TRIGGERS ( sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_ name鐨勫閿�', + trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_name鐨勫閿�', trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', repeat_count bigint(7) not null comment '閲嶅鐨勬鏁扮粺璁�', repeat_interval bigint(12) not null comment '閲嶅鐨勯棿闅旀椂闂�', @@ -134,7 +134,7 @@ -- ---------------------------- create table QRTZ_SCHEDULER_STATE ( sched_name varchar(120) not null comment '璋冨害鍚嶇О', - instance_name varchar(200) not null comment '涔嬪墠閰嶇疆鏂囦欢涓璷rg.quartz.scheduler.instanceId閰嶇疆鐨勫悕瀛楋紝灏变細鍐欏叆璇ュ瓧娈�', + instance_name varchar(200) not null comment '瀹炰緥鍚嶇О', last_checkin_time bigint(13) not null comment '涓婃妫�鏌ユ椂闂�', checkin_interval bigint(13) not null comment '妫�鏌ラ棿闅旀椂闂�', primary key (sched_name, instance_name) @@ -154,7 +154,7 @@ -- ---------------------------- create table QRTZ_SIMPROP_TRIGGERS ( sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_ name鐨勫閿�', + trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_name鐨勫閿�', trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', str_prop_1 varchar(512) null comment 'String绫诲瀷鐨則rigger鐨勭涓�涓弬鏁�', str_prop_2 varchar(512) null comment 'String绫诲瀷鐨則rigger鐨勭浜屼釜鍙傛暟', diff --git a/sql/ry_20210731.sql b/sql/ry_20210908.sql similarity index 81% rename from sql/ry_20210731.sql rename to sql/ry_20210908.sql index d48552e..0217386 100644 --- a/sql/ry_20210731.sql +++ b/sql/ry_20210908.sql @@ -137,6 +137,7 @@ order_num int(4) default 0 comment '鏄剧ず椤哄簭', path varchar(200) default '' comment '璺敱鍦板潃', component varchar(255) default null comment '缁勪欢璺緞', + query varchar(255) default null comment '璺敱鍙傛暟', is_frame int(1) default 1 comment '鏄惁涓哄閾撅紙0鏄� 1鍚︼級', is_cache int(1) default 0 comment '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級', menu_type char(1) default '' comment '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�', @@ -156,107 +157,107 @@ -- 鍒濆鍖�-鑿滃崟淇℃伅琛ㄦ暟鎹� -- ---------------------------- -- 涓�绾ц彍鍗� -insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system', null, 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '绯荤粺绠$悊鐩綍'); -insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '2', 'monitor', null, 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '绯荤粺鐩戞帶鐩綍'); -insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '3', 'tool', null, 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '绯荤粺宸ュ叿鐩綍'); -insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '4', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null , 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃'); +insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '绯荤粺绠$悊鐩綍'); +insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '2', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '绯荤粺鐩戞帶鐩綍'); +insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '3', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '绯荤粺宸ュ叿鐩綍'); +insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '4', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃'); -- 浜岀骇鑿滃崟 -insert into sys_menu values('100', '鐢ㄦ埛绠$悊', '1', '1', 'user', 'system/user/index', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '鐢ㄦ埛绠$悊鑿滃崟'); -insert into sys_menu values('101', '瑙掕壊绠$悊', '1', '2', 'role', 'system/role/index', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '瑙掕壊绠$悊鑿滃崟'); -insert into sys_menu values('102', '鑿滃崟绠$悊', '1', '3', 'menu', 'system/menu/index', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', sysdate(), '', null, '鑿滃崟绠$悊鑿滃崟'); -insert into sys_menu values('103', '閮ㄩ棬绠$悊', '1', '4', 'dept', 'system/dept/index', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', sysdate(), '', null, '閮ㄩ棬绠$悊鑿滃崟'); -insert into sys_menu values('104', '宀椾綅绠$悊', '1', '5', 'post', 'system/post/index', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', sysdate(), '', null, '宀椾綅绠$悊鑿滃崟'); -insert into sys_menu values('105', '瀛楀吀绠$悊', '1', '6', 'dict', 'system/dict/index', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', sysdate(), '', null, '瀛楀吀绠$悊鑿滃崟'); -insert into sys_menu values('106', '鍙傛暟璁剧疆', '1', '7', 'config', 'system/config/index', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', sysdate(), '', null, '鍙傛暟璁剧疆鑿滃崟'); -insert into sys_menu values('107', '閫氱煡鍏憡', '1', '8', 'notice', 'system/notice/index', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, '閫氱煡鍏憡鑿滃崟'); -insert into sys_menu values('108', '鏃ュ織绠$悊', '1', '9', 'log', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, '鏃ュ織绠$悊鑿滃崟'); -insert into sys_menu values('109', '鍦ㄧ嚎鐢ㄦ埛', '2', '1', 'online', 'monitor/online/index', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟'); -insert into sys_menu values('110', '瀹氭椂浠诲姟', '2', '2', 'job', 'monitor/job/index', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '瀹氭椂浠诲姟鑿滃崟'); -insert into sys_menu values('111', '鏁版嵁鐩戞帶', '2', '3', 'druid', 'monitor/druid/index', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, '鏁版嵁鐩戞帶鑿滃崟'); -# insert into sys_menu values('112', '鏈嶅姟鐩戞帶', '2', '4', 'server', 'monitor/server/index', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', sysdate(), '', null, '鏈嶅姟鐩戞帶鑿滃崟'); -insert into sys_menu values('113', '缂撳瓨鐩戞帶', '2', '5', 'cache', 'monitor/cache/index', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate(), '', null, '缂撳瓨鐩戞帶鑿滃崟'); -insert into sys_menu values('114', '琛ㄥ崟鏋勫缓', '3', '1', 'build', 'tool/build/index', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '琛ㄥ崟鏋勫缓鑿滃崟'); -insert into sys_menu values('115', '浠g爜鐢熸垚', '3', '2', 'gen', 'tool/gen/index', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '浠g爜鐢熸垚鑿滃崟'); -insert into sys_menu values('116', '绯荤粺鎺ュ彛', '3', '3', 'swagger', 'tool/swagger/index', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, '绯荤粺鎺ュ彛鑿滃崟'); +insert into sys_menu values('100', '鐢ㄦ埛绠$悊', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '鐢ㄦ埛绠$悊鑿滃崟'); +insert into sys_menu values('101', '瑙掕壊绠$悊', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '瑙掕壊绠$悊鑿滃崟'); +insert into sys_menu values('102', '鑿滃崟绠$悊', '1', '3', 'menu', 'system/menu/index', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', sysdate(), '', null, '鑿滃崟绠$悊鑿滃崟'); +insert into sys_menu values('103', '閮ㄩ棬绠$悊', '1', '4', 'dept', 'system/dept/index', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', sysdate(), '', null, '閮ㄩ棬绠$悊鑿滃崟'); +insert into sys_menu values('104', '宀椾綅绠$悊', '1', '5', 'post', 'system/post/index', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', sysdate(), '', null, '宀椾綅绠$悊鑿滃崟'); +insert into sys_menu values('105', '瀛楀吀绠$悊', '1', '6', 'dict', 'system/dict/index', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', sysdate(), '', null, '瀛楀吀绠$悊鑿滃崟'); +insert into sys_menu values('106', '鍙傛暟璁剧疆', '1', '7', 'config', 'system/config/index', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', sysdate(), '', null, '鍙傛暟璁剧疆鑿滃崟'); +insert into sys_menu values('107', '閫氱煡鍏憡', '1', '8', 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, '閫氱煡鍏憡鑿滃崟'); +insert into sys_menu values('108', '鏃ュ織绠$悊', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, '鏃ュ織绠$悊鑿滃崟'); +insert into sys_menu values('109', '鍦ㄧ嚎鐢ㄦ埛', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟'); +insert into sys_menu values('110', '瀹氭椂浠诲姟', '2', '2', 'job', 'monitor/job/index', '', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '瀹氭椂浠诲姟鑿滃崟'); +insert into sys_menu values('111', '鏁版嵁鐩戞帶', '2', '3', 'druid', 'monitor/druid/index', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, '鏁版嵁鐩戞帶鑿滃崟'); +insert into sys_menu values('112', '鏈嶅姟鐩戞帶', '2', '4', 'server', 'monitor/server/index', '', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', sysdate(), '', null, '鏈嶅姟鐩戞帶鑿滃崟'); +insert into sys_menu values('113', '缂撳瓨鐩戞帶', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate(), '', null, '缂撳瓨鐩戞帶鑿滃崟'); +insert into sys_menu values('114', '琛ㄥ崟鏋勫缓', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '琛ㄥ崟鏋勫缓鑿滃崟'); +insert into sys_menu values('115', '浠g爜鐢熸垚', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '浠g爜鐢熸垚鑿滃崟'); +insert into sys_menu values('116', '绯荤粺鎺ュ彛', '3', '3', 'swagger', 'tool/swagger/index', '', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, '绯荤粺鎺ュ彛鑿滃崟'); -- springboot-admin鐩戞帶 -insert into sys_menu values('117', 'Admin鐩戞帶', '2', '5', 'Admin', 'monitor/admin/index', 1, 0, 'C', '0', '0', 'monitor:admin:list', 'dashboard', 'admin', sysdate(), '', null, 'Admin鐩戞帶鑿滃崟'); +insert into sys_menu values('117', 'Admin鐩戞帶', '2', '5', 'Admin', 'monitor/admin/index', '', 1, 0, 'C', '0', '0', 'monitor:admin:list', 'dashboard', 'admin', sysdate(), '', null, 'Admin鐩戞帶鑿滃崟'); -- 涓夌骇鑿滃崟 -insert into sys_menu values('500', '鎿嶄綔鏃ュ織', '108', '1', 'operlog', 'monitor/operlog/index', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', sysdate(), '', null, '鎿嶄綔鏃ュ織鑿滃崟'); -insert into sys_menu values('501', '鐧诲綍鏃ュ織', '108', '2', 'logininfor', 'monitor/logininfor/index', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, '鐧诲綍鏃ュ織鑿滃崟'); +insert into sys_menu values('500', '鎿嶄綔鏃ュ織', '108', '1', 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', sysdate(), '', null, '鎿嶄綔鏃ュ織鑿滃崟'); +insert into sys_menu values('501', '鐧诲綍鏃ュ織', '108', '2', 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, '鐧诲綍鏃ュ織鑿滃崟'); -- 鐢ㄦ埛绠$悊鎸夐挳 -insert into sys_menu values('1001', '鐢ㄦ埛鏌ヨ', '100', '1', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1002', '鐢ㄦ埛鏂板', '100', '2', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1003', '鐢ㄦ埛淇敼', '100', '3', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1004', '鐢ㄦ埛鍒犻櫎', '100', '4', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1005', '鐢ㄦ埛瀵煎嚭', '100', '5', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1006', '鐢ㄦ埛瀵煎叆', '100', '6', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1007', '閲嶇疆瀵嗙爜', '100', '7', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1001', '鐢ㄦ埛鏌ヨ', '100', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1002', '鐢ㄦ埛鏂板', '100', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1003', '鐢ㄦ埛淇敼', '100', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1004', '鐢ㄦ埛鍒犻櫎', '100', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1005', '鐢ㄦ埛瀵煎嚭', '100', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1006', '鐢ㄦ埛瀵煎叆', '100', '6', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1007', '閲嶇疆瀵嗙爜', '100', '7', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, ''); -- 瑙掕壊绠$悊鎸夐挳 -insert into sys_menu values('1008', '瑙掕壊鏌ヨ', '101', '1', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1009', '瑙掕壊鏂板', '101', '2', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1010', '瑙掕壊淇敼', '101', '3', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1011', '瑙掕壊鍒犻櫎', '101', '4', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1012', '瑙掕壊瀵煎嚭', '101', '5', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1008', '瑙掕壊鏌ヨ', '101', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1009', '瑙掕壊鏂板', '101', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1010', '瑙掕壊淇敼', '101', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1011', '瑙掕壊鍒犻櫎', '101', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1012', '瑙掕壊瀵煎嚭', '101', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', sysdate(), '', null, ''); -- 鑿滃崟绠$悊鎸夐挳 -insert into sys_menu values('1013', '鑿滃崟鏌ヨ', '102', '1', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1014', '鑿滃崟鏂板', '102', '2', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1015', '鑿滃崟淇敼', '102', '3', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1016', '鑿滃崟鍒犻櫎', '102', '4', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1013', '鑿滃崟鏌ヨ', '102', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1014', '鑿滃崟鏂板', '102', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1015', '鑿滃崟淇敼', '102', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1016', '鑿滃崟鍒犻櫎', '102', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', sysdate(), '', null, ''); -- 閮ㄩ棬绠$悊鎸夐挳 -insert into sys_menu values('1017', '閮ㄩ棬鏌ヨ', '103', '1', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1018', '閮ㄩ棬鏂板', '103', '2', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1019', '閮ㄩ棬淇敼', '103', '3', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1020', '閮ㄩ棬鍒犻櫎', '103', '4', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1017', '閮ㄩ棬鏌ヨ', '103', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1018', '閮ㄩ棬鏂板', '103', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1019', '閮ㄩ棬淇敼', '103', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1020', '閮ㄩ棬鍒犻櫎', '103', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', sysdate(), '', null, ''); -- 宀椾綅绠$悊鎸夐挳 -insert into sys_menu values('1021', '宀椾綅鏌ヨ', '104', '1', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1022', '宀椾綅鏂板', '104', '2', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1023', '宀椾綅淇敼', '104', '3', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1024', '宀椾綅鍒犻櫎', '104', '4', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1025', '宀椾綅瀵煎嚭', '104', '5', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1021', '宀椾綅鏌ヨ', '104', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1022', '宀椾綅鏂板', '104', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1023', '宀椾綅淇敼', '104', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1024', '宀椾綅鍒犻櫎', '104', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1025', '宀椾綅瀵煎嚭', '104', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', sysdate(), '', null, ''); -- 瀛楀吀绠$悊鎸夐挳 -insert into sys_menu values('1026', '瀛楀吀鏌ヨ', '105', '1', '#', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1027', '瀛楀吀鏂板', '105', '2', '#', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1028', '瀛楀吀淇敼', '105', '3', '#', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1029', '瀛楀吀鍒犻櫎', '105', '4', '#', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1030', '瀛楀吀瀵煎嚭', '105', '5', '#', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1026', '瀛楀吀鏌ヨ', '105', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1027', '瀛楀吀鏂板', '105', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1028', '瀛楀吀淇敼', '105', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1029', '瀛楀吀鍒犻櫎', '105', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1030', '瀛楀吀瀵煎嚭', '105', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', sysdate(), '', null, ''); -- 鍙傛暟璁剧疆鎸夐挳 -insert into sys_menu values('1031', '鍙傛暟鏌ヨ', '106', '1', '#', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1032', '鍙傛暟鏂板', '106', '2', '#', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1033', '鍙傛暟淇敼', '106', '3', '#', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1034', '鍙傛暟鍒犻櫎', '106', '4', '#', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1035', '鍙傛暟瀵煎嚭', '106', '5', '#', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1031', '鍙傛暟鏌ヨ', '106', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1032', '鍙傛暟鏂板', '106', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1033', '鍙傛暟淇敼', '106', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1034', '鍙傛暟鍒犻櫎', '106', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1035', '鍙傛暟瀵煎嚭', '106', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', sysdate(), '', null, ''); -- 閫氱煡鍏憡鎸夐挳 -insert into sys_menu values('1036', '鍏憡鏌ヨ', '107', '1', '#', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1037', '鍏憡鏂板', '107', '2', '#', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1038', '鍏憡淇敼', '107', '3', '#', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1039', '鍏憡鍒犻櫎', '107', '4', '#', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1036', '鍏憡鏌ヨ', '107', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1037', '鍏憡鏂板', '107', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1038', '鍏憡淇敼', '107', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1039', '鍏憡鍒犻櫎', '107', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', sysdate(), '', null, ''); -- 鎿嶄綔鏃ュ織鎸夐挳 -insert into sys_menu values('1040', '鎿嶄綔鏌ヨ', '500', '1', '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1041', '鎿嶄綔鍒犻櫎', '500', '2', '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1042', '鏃ュ織瀵煎嚭', '500', '4', '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1040', '鎿嶄綔鏌ヨ', '500', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1041', '鎿嶄綔鍒犻櫎', '500', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1042', '鏃ュ織瀵煎嚭', '500', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 'admin', sysdate(), '', null, ''); -- 鐧诲綍鏃ュ織鎸夐挳 -insert into sys_menu values('1043', '鐧诲綍鏌ヨ', '501', '1', '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1044', '鐧诲綍鍒犻櫎', '501', '2', '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1045', '鏃ュ織瀵煎嚭', '501', '3', '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1043', '鐧诲綍鏌ヨ', '501', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1044', '鐧诲綍鍒犻櫎', '501', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1045', '鏃ュ織瀵煎嚭', '501', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 'admin', sysdate(), '', null, ''); -- 鍦ㄧ嚎鐢ㄦ埛鎸夐挳 -insert into sys_menu values('1046', '鍦ㄧ嚎鏌ヨ', '109', '1', '#', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1047', '鎵归噺寮洪��', '109', '2', '#', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1048', '鍗曟潯寮洪��', '109', '3', '#', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1046', '鍦ㄧ嚎鏌ヨ', '109', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1047', '鎵归噺寮洪��', '109', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1048', '鍗曟潯寮洪��', '109', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, ''); -- 瀹氭椂浠诲姟鎸夐挳 -insert into sys_menu values('1049', '浠诲姟鏌ヨ', '110', '1', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1050', '浠诲姟鏂板', '110', '2', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1051', '浠诲姟淇敼', '110', '3', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1052', '浠诲姟鍒犻櫎', '110', '4', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1053', '鐘舵�佷慨鏀�', '110', '5', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1054', '浠诲姟瀵煎嚭', '110', '7', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1049', '浠诲姟鏌ヨ', '110', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1050', '浠诲姟鏂板', '110', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1051', '浠诲姟淇敼', '110', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1052', '浠诲姟鍒犻櫎', '110', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1053', '鐘舵�佷慨鏀�', '110', '5', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1054', '浠诲姟瀵煎嚭', '110', '7', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', sysdate(), '', null, ''); -- 浠g爜鐢熸垚鎸夐挳 -insert into sys_menu values('1055', '鐢熸垚鏌ヨ', '115', '1', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1056', '鐢熸垚淇敼', '115', '2', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1057', '鐢熸垚鍒犻櫎', '115', '3', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1058', '瀵煎叆浠g爜', '115', '2', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1059', '棰勮浠g爜', '115', '4', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1060', '鐢熸垚浠g爜', '115', '5', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1055', '鐢熸垚鏌ヨ', '115', '1', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1056', '鐢熸垚淇敼', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1057', '鐢熸垚鍒犻櫎', '115', '3', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1058', '瀵煎叆浠g爜', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1059', '棰勮浠g爜', '115', '4', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1060', '鐢熸垚浠g爜', '115', '5', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, ''); -- ---------------------------- @@ -687,4 +688,4 @@ update_by varchar(64) default '' comment '鏇存柊鑰�', update_time datetime comment '鏇存柊鏃堕棿', primary key (column_id) -) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�'; +) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�'; \ No newline at end of file -- Gitblit v1.9.3