Browse Source

替换var 为const/let
删除未使用import
替换 == 为 ===

xingyu4j 2 years ago
parent
commit
011dc23699
66 changed files with 305 additions and 319 deletions
  1. 2 2
      yudao-ui-admin/build/index.js
  2. 2 2
      yudao-ui-admin/package.json
  3. 1 1
      yudao-ui-admin/src/components/Breadcrumb/index.vue
  4. 6 7
      yudao-ui-admin/src/components/Crontab/day.vue
  5. 4 4
      yudao-ui-admin/src/components/Crontab/hour.vue
  6. 10 10
      yudao-ui-admin/src/components/Crontab/index.vue
  7. 5 5
      yudao-ui-admin/src/components/Crontab/min.vue
  8. 4 4
      yudao-ui-admin/src/components/Crontab/month.vue
  9. 34 34
      yudao-ui-admin/src/components/Crontab/result.vue
  10. 4 4
      yudao-ui-admin/src/components/Crontab/second.vue
  11. 5 5
      yudao-ui-admin/src/components/Crontab/week.vue
  12. 3 3
      yudao-ui-admin/src/components/Crontab/year.vue
  13. 0 1
      yudao-ui-admin/src/components/PanThumb/index.vue
  14. 1 1
      yudao-ui-admin/src/components/RightToolbar/index.vue
  15. 3 3
      yudao-ui-admin/src/components/TopNav/index.vue
  16. 0 1
      yudao-ui-admin/src/components/Verifition/Verify.vue
  17. 5 5
      yudao-ui-admin/src/components/Verifition/Verify/VerifyPoints.vue
  18. 15 10
      yudao-ui-admin/src/components/Verifition/Verify/VerifySlide.vue
  19. 1 2
      yudao-ui-admin/src/components/Verifition/utils/axios.js
  20. 29 29
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js
  21. 10 10
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js
  22. 16 18
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js
  23. 10 10
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js
  24. 10 10
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js
  25. 10 10
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js
  26. 1 1
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue
  27. 1 1
      yudao-ui-admin/src/components/generator/js.js
  28. 5 5
      yudao-ui-admin/src/directive/dialog/drag.js
  29. 1 1
      yudao-ui-admin/src/plugins/tab.js
  30. 1 1
      yudao-ui-admin/src/store/modules/permission.js
  31. 1 1
      yudao-ui-admin/src/store/modules/user.js
  32. 15 16
      yudao-ui-admin/src/utils/index.js
  33. 5 9
      yudao-ui-admin/src/utils/permission.js
  34. 2 2
      yudao-ui-admin/src/utils/request.js
  35. 8 6
      yudao-ui-admin/src/utils/ruoyi.js
  36. 6 4
      yudao-ui-admin/src/utils/scroll-to.js
  37. 3 5
      yudao-ui-admin/src/utils/validate.js
  38. 0 1
      yudao-ui-admin/src/views/bpm/definition/index.vue
  39. 1 3
      yudao-ui-admin/src/views/bpm/form/formEditor.vue
  40. 1 1
      yudao-ui-admin/src/views/bpm/oa/leave/index.vue
  41. 2 2
      yudao-ui-admin/src/views/bpm/processInstance/detail.vue
  42. 1 1
      yudao-ui-admin/src/views/bpm/processInstance/index.vue
  43. 0 1
      yudao-ui-admin/src/views/bpm/task/todo.vue
  44. 1 2
      yudao-ui-admin/src/views/dashboard/PanelGroup.vue
  45. 1 1
      yudao-ui-admin/src/views/infra/build/ResourceDialog.vue
  46. 2 2
      yudao-ui-admin/src/views/infra/build/RightPanel.vue
  47. 1 1
      yudao-ui-admin/src/views/infra/build/TreeNodeDialog.vue
  48. 2 2
      yudao-ui-admin/src/views/infra/build/index.vue
  49. 4 4
      yudao-ui-admin/src/views/infra/codegen/genInfoForm.vue
  50. 1 1
      yudao-ui-admin/src/views/infra/codegen/index.vue
  51. 1 1
      yudao-ui-admin/src/views/infra/redis/index.vue
  52. 3 3
      yudao-ui-admin/src/views/login.vue
  53. 0 1
      yudao-ui-admin/src/views/mall/market/banner/index.vue
  54. 0 2
      yudao-ui-admin/src/views/mall/product/category/index.vue
  55. 3 3
      yudao-ui-admin/src/views/mall/product/property/index.vue
  56. 18 21
      yudao-ui-admin/src/views/mall/product/spu/save.vue
  57. 0 1
      yudao-ui-admin/src/views/pay/order/index.vue
  58. 1 1
      yudao-ui-admin/src/views/sso.vue
  59. 1 1
      yudao-ui-admin/src/views/system/dept/index.vue
  60. 0 1
      yudao-ui-admin/src/views/system/role/index.vue
  61. 1 2
      yudao-ui-admin/src/views/system/sms/smsChannel.vue
  62. 1 1
      yudao-ui-admin/src/views/system/tenantPackage/index.vue
  63. 1 1
      yudao-ui-admin/src/views/system/user/index.vue
  64. 1 1
      yudao-ui-admin/src/views/system/user/profile/userAvatar.vue
  65. 1 1
      yudao-ui-admin/src/views/system/user/profile/userInfo.vue
  66. 17 13
      yudao-ui-admin/yarn.lock

+ 2 - 2
yudao-ui-admin/build/index.js

@@ -12,8 +12,8 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
   const port = 9526
   const publicPath = config.publicPath
 
-  var connect = require('connect')
-  var serveStatic = require('serve-static')
+  const connect = require('connect')
+  const serveStatic = require('serve-static')
   const app = connect()
 
   app.use(

+ 2 - 2
yudao-ui-admin/package.json

@@ -89,8 +89,8 @@
     "fs-extra": "^8.1.0",
     "lint-staged": "10.5.3",
     "runjs": "4.4.2",
-    "sass": "1.32.13",
-    "sass-loader": "10.1.1",
+    "sass": "1.56.0",
+    "sass-loader": "13.1.0",
     "script-ext-html-webpack-plugin": "2.1.5",
     "svg-sprite-loader": "5.1.1",
     "terser-webpack-plugin": "^4.2.3",

+ 1 - 1
yudao-ui-admin/src/components/Breadcrumb/index.vue

@@ -2,7 +2,7 @@
   <el-breadcrumb class="app-breadcrumb" separator="/">
     <transition-group name="breadcrumb">
       <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
-        <span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
+        <span v-if="item.redirect==='noRedirect'||index===levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
         <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
       </el-breadcrumb-item>
     </transition-group>

+ 6 - 7
yudao-ui-admin/src/components/Crontab/day.vue

@@ -103,25 +103,25 @@ export default {
 		},
 		// 周期两个值变化时
 		cycleChange() {
-			if (this.radioValue == '3') {
+			if (this.radioValue === '3') {
 				this.$emit('update', 'day', this.cycleTotal);
 			}
 		},
 		// 平均两个值变化时
 		averageChange() {
-			if (this.radioValue == '4') {
+			if (this.radioValue === '4') {
 				this.$emit('update', 'day', this.averageTotal);
 			}
 		},
 		// 最近工作日值变化时
 		workdayChange() {
-			if (this.radioValue == '5') {
+			if (this.radioValue === '5') {
 				this.$emit('update', 'day', this.workdayCheck + 'W');
 			}
 		},
 		// checkbox值变化时
 		checkboxChange() {
-			if (this.radioValue == '7') {
+			if (this.radioValue === '7') {
 				this.$emit('update', 'day', this.checkboxString);
 			}
 		}
@@ -148,13 +148,12 @@ export default {
 		},
 		// 计算工作日格式
 		workdayCheck: function () {
-			const workday = this.checkNum(this.workday, 1, 31)
-			return workday;
+			return this.checkNum(this.workday, 1, 31);
 		},
 		// 计算勾选的checkbox值合集
 		checkboxString: function () {
 			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
+			return str === '' ? '*' : str;
 		}
 	}
 }

+ 4 - 4
yudao-ui-admin/src/components/Crontab/hour.vue

@@ -68,19 +68,19 @@ export default {
 		},
 		// 周期两个值变化时
 		cycleChange() {
-			if (this.radioValue == '2') {
+			if (this.radioValue === '2') {
 				this.$emit('update', 'hour', this.cycleTotal);
 			}
 		},
 		// 平均两个值变化时
 		averageChange() {
-			if (this.radioValue == '3') {
+			if (this.radioValue === '3') {
 				this.$emit('update', 'hour', this.averageTotal);
 			}
 		},
 		// checkbox值变化时
 		checkboxChange() {
-			if (this.radioValue == '4') {
+			if (this.radioValue === '4') {
 				this.$emit('update', 'hour', this.checkboxString);
 			}
 		}
@@ -107,7 +107,7 @@ export default {
 		// 计算勾选的checkbox值合集
 		checkboxString: function () {
 			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
+			return str === '' ? '*' : str;
 		}
 	}
 }

+ 10 - 10
yudao-ui-admin/src/components/Crontab/index.vue

@@ -143,8 +143,8 @@ export default {
   props: ["expression", "hideComponent"],
   methods: {
     shouldHide(key) {
-      if (this.hideComponent && this.hideComponent.includes(key)) return false;
-      return true;
+      return !(this.hideComponent && this.hideComponent.includes(key));
+
     },
     resolveExp() {
       // 反解析 表达式
@@ -215,10 +215,10 @@ export default {
           insValue = 4;
           this.$refs[refName].checkboxList = value.split(",");
         }
-      } else if (name == "day") {
+      } else if (name === "day") {
         if (value === "*") {
           insValue = 1;
-        } else if (value == "?") {
+        } else if (value === "?") {
           insValue = 2;
         } else if (value.indexOf("-") > -1) {
           let indexArr = value.split("-");
@@ -246,10 +246,10 @@ export default {
           this.$refs[refName].checkboxList = value.split(",");
           insValue = 7;
         }
-      } else if (name == "week") {
+      } else if (name === "week") {
         if (value === "*") {
           insValue = 1;
-        } else if (value == "?") {
+        } else if (value === "?") {
           insValue = 2;
         } else if (value.indexOf("-") > -1) {
           let indexArr = value.split("-");
@@ -275,10 +275,10 @@ export default {
           this.$refs[refName].checkboxList = value.split(",");
           insValue = 6;
         }
-      } else if (name == "year") {
-        if (value == "") {
+      } else if (name === "year") {
+        if (value === "") {
           insValue = 1;
-        } else if (value == "*") {
+        } else if (value === "*") {
           insValue = 2;
         } else if (value.indexOf("-") > -1) {
           insValue = 3;
@@ -343,7 +343,7 @@ export default {
         obj.month +
         " " +
         obj.week +
-        (obj.year == "" ? "" : " " + obj.year);
+        (obj.year === "" ? "" : " " + obj.year);
       return str;
     },
   },

+ 5 - 5
yudao-ui-admin/src/components/Crontab/min.vue

@@ -69,19 +69,19 @@ export default {
 		},
 		// 周期两个值变化时
 		cycleChange() {
-			if (this.radioValue == '2') {
+			if (this.radioValue === '2') {
 				this.$emit('update', 'min', this.cycleTotal, 'min');
 			}
 		},
 		// 平均两个值变化时
 		averageChange() {
-			if (this.radioValue == '3') {
+			if (this.radioValue === '3') {
 				this.$emit('update', 'min', this.averageTotal, 'min');
 			}
 		},
 		// checkbox值变化时
 		checkboxChange() {
-			if (this.radioValue == '4') {
+			if (this.radioValue === '4') {
 				this.$emit('update', 'min', this.checkboxString, 'min');
 			}
 		},
@@ -109,8 +109,8 @@ export default {
 		// 计算勾选的checkbox值合集
 		checkboxString: function () {
 			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
+			return str === '' ? '*' : str;
 		}
 	}
 }
-</script>
+</script>

+ 4 - 4
yudao-ui-admin/src/components/Crontab/month.vue

@@ -68,19 +68,19 @@ export default {
 		},
 		// 周期两个值变化时
 		cycleChange() {
-			if (this.radioValue == '2') {
+			if (this.radioValue === '2') {
 				this.$emit('update', 'month', this.cycleTotal);
 			}
 		},
 		// 平均两个值变化时
 		averageChange() {
-			if (this.radioValue == '3') {
+			if (this.radioValue === '3') {
 				this.$emit('update', 'month', this.averageTotal);
 			}
 		},
 		// checkbox值变化时
 		checkboxChange() {
-			if (this.radioValue == '4') {
+			if (this.radioValue === '4') {
 				this.$emit('update', 'month', this.checkboxString);
 			}
 		}
@@ -107,7 +107,7 @@ export default {
 		// 计算勾选的checkbox值合集
 		checkboxString: function () {
 			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
+			return str === '' ? '*' : str;
 		}
 	}
 }

+ 34 - 34
yudao-ui-admin/src/components/Crontab/result.vue

@@ -126,7 +126,7 @@ export default {
 					// 如果到达最大值时
 					if (nDay > DDate[DDate.length - 1]) {
 						resetDay();
-						if (Mi == MDate.length - 1) {
+						if (Mi === MDate.length - 1) {
 							resetMonth();
 							continue goYear;
 						}
@@ -141,9 +141,9 @@ export default {
 						// 如果到达最大值时
 						if (nHour > hDate[hDate.length - 1]) {
 							resetHour();
-							if (Di == DDate.length - 1) {
+							if (Di === DDate.length - 1) {
 								resetDay();
-								if (Mi == MDate.length - 1) {
+								if (Mi === MDate.length - 1) {
 									resetMonth();
 									continue goYear;
 								}
@@ -158,7 +158,7 @@ export default {
 							continue goMonth;
 						}
 						// 如果日期规则中有值时
-						if (this.dayRule == 'lastDay') {
+						if (this.dayRule === 'lastDay') {
 							// 如果不是合法日期则需要将前将日期调到合法日期即月末最后一天
 
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
@@ -168,7 +168,7 @@ export default {
 									thisDD = DD < 10 ? '0' + DD : DD;
 								}
 							}
-						} else if (this.dayRule == 'workDay') {
+						} 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) {
@@ -179,7 +179,7 @@ export default {
 							// 获取达到条件的日期是星期X
 							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
 							// 当星期日时
-							if (thisWeek == 1) {
+							if (thisWeek === 1) {
 								// 先找下一个日,并判断是否为月底
 								DD++;
 								thisDD = DD < 10 ? '0' + DD : DD;
@@ -187,7 +187,7 @@ export default {
 								if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
 									DD -= 3;
 								}
-							} else if (thisWeek == 7) {
+							} else if (thisWeek === 7) {
 								// 当星期6时只需判断不是1号就可进行操作
 								if (this.dayRuleSup !== 1) {
 									DD--;
@@ -195,16 +195,16 @@ export default {
 									DD += 2;
 								}
 							}
-						} else if (this.dayRule == 'weekDay') {
+						} else if (this.dayRule === 'weekDay') {
 							// 如果指定了是星期几
 							// 获取当前日期是属于星期几
 							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
 							// 校验当前星期是否在星期池(dayRuleSup)中
 							if (this.dayRuleSup.indexOf(thisWeek) < 0) {
 								// 如果到达最大值时
-								if (Di == DDate.length - 1) {
+								if (Di === DDate.length - 1) {
 									resetDay();
-									if (Mi == MDate.length - 1) {
+									if (Mi === MDate.length - 1) {
 										resetMonth();
 										continue goYear;
 									}
@@ -212,7 +212,7 @@ export default {
 								}
 								continue;
 							}
-						} else if (this.dayRule == 'assWeek') {
+						} else if (this.dayRule === 'assWeek') {
 							// 如果指定了是第几周的星期几
 							// 获取每月1号是属于星期几
 							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
@@ -221,7 +221,7 @@ export default {
 							} else {
 								DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1;
 							}
-						} else if (this.dayRule == 'lastWeek') {
+						} else if (this.dayRule === 'lastWeek') {
 							// 如果指定了每月最后一个星期几
 							// 校验并调整如果是2月30号这种日期传进来时需调整至正常月底
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
@@ -249,11 +249,11 @@ export default {
 							// 如果到达最大值时
 							if (nMin > mDate[mDate.length - 1]) {
 								resetMin();
-								if (hi == hDate.length - 1) {
+								if (hi === hDate.length - 1) {
 									resetHour();
-									if (Di == DDate.length - 1) {
+									if (Di === DDate.length - 1) {
 										resetDay();
-										if (Mi == MDate.length - 1) {
+										if (Mi === MDate.length - 1) {
 											resetMonth();
 											continue goYear;
 										}
@@ -270,13 +270,13 @@ export default {
 								// 如果到达最大值时
 								if (nSecond > sDate[sDate.length - 1]) {
 									resetSecond();
-									if (mi == mDate.length - 1) {
+									if (mi === mDate.length - 1) {
 										resetMin();
-										if (hi == hDate.length - 1) {
+										if (hi === hDate.length - 1) {
 											resetHour();
-											if (Di == DDate.length - 1) {
+											if (Di === DDate.length - 1) {
 												resetDay();
-												if (Mi == MDate.length - 1) {
+												if (Mi === MDate.length - 1) {
 													resetMonth();
 													continue goYear;
 												}
@@ -297,17 +297,17 @@ export default {
 										nums++;
 									}
 									// 如果条数满了就退出循环
-									if (nums == 5) break goYear;
+									if (nums === 5) break goYear;
 									// 如果到达最大值时
-									if (si == sDate.length - 1) {
+									if (si === sDate.length - 1) {
 										resetSecond();
-										if (mi == mDate.length - 1) {
+										if (mi === mDate.length - 1) {
 											resetMin();
-											if (hi == hDate.length - 1) {
+											if (hi === hDate.length - 1) {
 												resetHour();
-												if (Di == DDate.length - 1) {
+												if (Di === DDate.length - 1) {
 													resetDay();
-													if (Mi == MDate.length - 1) {
+													if (Mi === MDate.length - 1) {
 														resetMonth();
 														continue goYear;
 													}
@@ -326,7 +326,7 @@ export default {
 				}//goMonth
 			}
 			// 判断100年内的结果条数
-			if (resultArr.length == 0) {
+			if (resultArr.length === 0) {
 				this.resultList = ['没有达到条件的结果!'];
 			} else {
 				this.resultList = resultArr;
@@ -378,23 +378,23 @@ export default {
 		// 获取"日"数组-主要为日期规则
 		getWeekArr(rule) {
 			// 只有当日期规则的两个值均为“”时则表达日期是有选项的
-			if (this.dayRule == '' && this.dayRuleSup == '') {
+			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);
+					let matchRule = rule.match(/[0-9]/g);
 					this.dayRuleSup = [Number(matchRule[1]), Number(matchRule[0])];
 					this.dateArr[3] = [1];
-					if (this.dayRuleSup[1] == 7) {
+					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) {
+					if (this.dayRuleSup === 7) {
 						this.dayRuleSup = 0;
 					}
 				} else if (rule !== '*' && rule !== '?') {
@@ -425,7 +425,7 @@ export default {
 			} else if (rule !== '*' && rule !== '?') {
 				this.dateArr[3] = this.getAssignArr(rule)
 				this.dayRuleSup = 'null';
-			} else if (rule == '*') {
+			} else if (rule === '*') {
 				this.dayRuleSup = 'null';
 			}
 		},
@@ -504,7 +504,7 @@ export default {
 			}
 			for (let i = min; i <= max; i++) {
 				let add = 0;
-				if (status == false && i % limit == 0) {
+				if (status === false && i % limit === 0) {
 					add = limit;
 				}
 				arr.push(Math.round(i % limit + add))
@@ -532,9 +532,9 @@ export default {
 			let s = time.getSeconds();
 			let week = time.getDay();
 			// 如果传递了type的话
-			if (type == undefined) {
+			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') {
+			} else if (type === 'week') {
 				// 在quartz中 1为星期日
 				return week + 1;
 			}

+ 4 - 4
yudao-ui-admin/src/components/Crontab/second.vue

@@ -68,19 +68,19 @@ export default {
 		},
 		// 周期两个值变化时
 		cycleChange() {
-			if (this.radioValue == '2') {
+			if (this.radioValue === '2') {
 				this.$emit('update', 'second', this.cycleTotal);
 			}
 		},
 		// 平均两个值变化时
 		averageChange() {
-			if (this.radioValue == '3') {
+			if (this.radioValue === '3') {
 				this.$emit('update', 'second', this.averageTotal);
 			}
 		},
 		// checkbox值变化时
 		checkboxChange() {
-			if (this.radioValue == '4') {
+			if (this.radioValue === '4') {
 				this.$emit('update', 'second', this.checkboxString);
 			}
 		}
@@ -110,7 +110,7 @@ export default {
 		// 计算勾选的checkbox值合集
 		checkboxString: function () {
 			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
+			return str === '' ? '*' : str;
 		}
 	}
 }

+ 5 - 5
yudao-ui-admin/src/components/Crontab/week.vue

@@ -144,25 +144,25 @@ export default {
 
 		// 周期两个值变化时
 		cycleChange() {
-			if (this.radioValue == '3') {
+			if (this.radioValue === '3') {
 				this.$emit('update', 'week', this.cycleTotal);
 			}
 		},
 		// 平均两个值变化时
 		averageChange() {
-			if (this.radioValue == '4') {
+			if (this.radioValue === '4') {
 				this.$emit('update', 'week', this.averageTotal);
 			}
 		},
 		// 最近工作日值变化时
 		weekdayChange() {
-			if (this.radioValue == '5') {
+			if (this.radioValue === '5') {
 				this.$emit('update', 'week', this.weekday + 'L');
 			}
 		},
 		// checkbox值变化时
 		checkboxChange() {
-			if (this.radioValue == '6') {
+			if (this.radioValue === '6') {
 				this.$emit('update', 'week', this.checkboxString);
 			}
 		},
@@ -195,7 +195,7 @@ export default {
 		// 计算勾选的checkbox值合集
 		checkboxString: function () {
 			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
+			return str === '' ? '*' : str;
 		}
 	}
 }

+ 3 - 3
yudao-ui-admin/src/components/Crontab/year.vue

@@ -79,19 +79,19 @@ export default {
 		},
 		// 周期两个值变化时
 		cycleChange() {
-			if (this.radioValue == '3') {
+			if (this.radioValue === '3') {
 				this.$emit('update', 'year', this.cycleTotal);
 			}
 		},
 		// 平均两个值变化时
 		averageChange() {
-			if (this.radioValue == '4') {
+			if (this.radioValue === '4') {
 				this.$emit('update', 'year', this.averageTotal);
 			}
 		},
 		// checkbox值变化时
 		checkboxChange() {
-			if (this.radioValue == '5') {
+			if (this.radioValue === '5') {
 				this.$emit('update', 'year', this.checkboxString);
 			}
 		}

+ 0 - 1
yudao-ui-admin/src/components/PanThumb/index.vue

@@ -108,7 +108,6 @@ export default {
 
 .pan-info p a {
   display: block;
-  color: #333;
   width: 80px;
   height: 80px;
   background: rgba(255, 255, 255, 0.3);

+ 1 - 1
yudao-ui-admin/src/components/RightToolbar/index.vue

@@ -62,7 +62,7 @@ export default {
     },
     // 右侧列表元素变化
     dataChange(data) {
-      for (var item in this.columns) {
+      for (let item in this.columns) {
         const key = this.columns[item].key;
         this.columns[item].visible = !data.includes(key);
       }

+ 3 - 3
yudao-ui-admin/src/components/TopNav/index.vue

@@ -69,7 +69,7 @@ export default {
     childrenMenus() {
       const childrenMenus = [];
       this.routers.map((router) => {
-        for (var item in router.children) {
+        for (let item in router.children) {
           if (router.children[item].parentPath === undefined) {
             if(router.path === "/") {
               router.children[item].path = "/" + router.children[item].path;
@@ -135,10 +135,10 @@ export default {
     },
     // 当前激活的路由
     activeRoutes(key) {
-      var routes = [];
+      const routes = []
       if (this.childrenMenus && this.childrenMenus.length > 0) {
         this.childrenMenus.map((item) => {
-          if (key == item.parentPath || (key == "index" && "" == item.path)) {
+          if (key === item.parentPath || (key === "index" && "" === item.path)) {
             routes.push(item);
           }
         });

File diff suppressed because it is too large
+ 0 - 1
yudao-ui-admin/src/components/Verifition/Verify.vue


+ 5 - 5
yudao-ui-admin/src/components/Verifition/Verify/VerifyPoints.vue

@@ -58,7 +58,7 @@
  * VerifyPoints
  * @description 点选
  * */
-import { resetSize, _code_chars, _code_color1, _code_color2 } from './../utils/util'
+import { resetSize } from './../utils/util'
 import { aesEncrypt } from '@/utils/ase'
 import { reqGet, reqCheck } from './../api/index'
 
@@ -167,7 +167,7 @@ export default {
         setTimeout(() => {
           // var flag = this.comparePos(this.fontPos, this.checkPosArr);
           // 发送后端请求
-          var captchaVerification = this.secretKey ? aesEncrypt(this.backToken + '---' + JSON.stringify(this.checkPosArr), this.secretKey) : this.backToken + '---' + JSON.stringify(this.checkPosArr)
+          const captchaVerification = this.secretKey ? aesEncrypt(this.backToken + '---' + JSON.stringify(this.checkPosArr), this.secretKey) : this.backToken + '---' + JSON.stringify(this.checkPosArr)
           const data = {
             captchaType: this.captchaType,
             'pointJson': this.secretKey ? aesEncrypt(JSON.stringify(this.checkPosArr), this.secretKey) : JSON.stringify(this.checkPosArr),
@@ -205,8 +205,8 @@ export default {
 
     // 获取坐标
     getMousePos: function(obj, e) {
-      var x = e.offsetX
-      var y = e.offsetY
+      const x = e.offsetX
+      const y = e.offsetY
       return { x, y }
     },
     // 创建坐标点
@@ -253,7 +253,7 @@ export default {
     },
     // 坐标转换函数
     pointTransfrom(pointArr, imgSize) {
-      var newPointArr = pointArr.map(p => {
+      const newPointArr = pointArr.map(p => {
         const x = Math.round(310 * p.x / parseInt(imgSize.imgWidth))
         const y = Math.round(155 * p.y / parseInt(imgSize.imgHeight))
         return { x, y }

+ 15 - 10
yudao-ui-admin/src/components/Verifition/Verify/VerifySlide.vue

@@ -193,7 +193,7 @@ export default {
         this.$parent.$emit('ready', this)
       })
 
-      var _this = this
+      const _this = this
 
       window.removeEventListener('touchmove', function(e) {
         _this.move(e)
@@ -228,11 +228,12 @@ export default {
 
     // 鼠标按下
     start: function(e) {
+      let x
       e = e || window.event
       if (!e.touches) { // 兼容PC端
-        var x = e.clientX
+        x = e.clientX
       } else { // 兼容移动端
-        var x = e.touches[0].pageX
+        x = e.touches[0].pageX
       }
       this.startLeft = Math.floor(x - this.barArea.getBoundingClientRect().left)
       this.startMoveTime = +new Date() // 开始滑动的时间
@@ -247,15 +248,16 @@ export default {
     },
     // 鼠标移动
     move: function(e) {
+      let x
       e = e || window.event
       if (this.status && this.isEnd === false) {
         if (!e.touches) { // 兼容PC端
-          var x = e.clientX
+          x = e.clientX
         } else { // 兼容移动端
-          var x = e.touches[0].pageX
+          x = e.touches[0].pageX
         }
-        var bar_area_left = this.barArea.getBoundingClientRect().left
-        var move_block_left = x - bar_area_left // 小方块相对于父元素的left值
+        const bar_area_left = this.barArea.getBoundingClientRect().left
+        let move_block_left = x - bar_area_left  // 小方块相对于父元素的left值
         if (move_block_left >= this.barArea.offsetWidth - parseInt(parseInt(this.blockSize.width) / 2) - 2) {
           move_block_left = this.barArea.offsetWidth - parseInt(parseInt(this.blockSize.width) / 2) - 2
         }
@@ -271,10 +273,10 @@ export default {
     // 鼠标松开
     end: function() {
       this.endMovetime = +new Date()
-      var _this = this
+      const _this = this
       // 判断是否重合
       if (this.status && this.isEnd === false) {
-        var moveLeftDistance = parseInt((this.moveBlockLeft || '').replace('px', ''))
+        const moveLeftDistance = parseInt((this.moveBlockLeft || '').replace('px', ''))
         moveLeftDistance = moveLeftDistance * 310 / parseInt(this.setSize.imgWidth)
         const data = {
           captchaType: this.captchaType,
@@ -297,7 +299,10 @@ export default {
             }
             this.passFlag = true
             this.tipWords = `${((this.endMovetime - this.startMoveTime) / 1000).toFixed(2)}s验证成功`
-            var captchaVerification = this.secretKey ? aesEncrypt(this.backToken + '---' + JSON.stringify({ x: moveLeftDistance, y: 5.0 }), this.secretKey) : this.backToken + '---' + JSON.stringify({ x: moveLeftDistance, y: 5.0 })
+            const captchaVerification = this.secretKey ? aesEncrypt(this.backToken + '---' + JSON.stringify({
+              x: moveLeftDistance,
+              y: 5.0
+            }), this.secretKey) : this.backToken + '---' + JSON.stringify({ x: moveLeftDistance, y: 5.0 })
             setTimeout(() => {
               this.tipWords = ''
               this.$parent.closeBox()

+ 1 - 2
yudao-ui-admin/src/components/Verifition/utils/axios.js

@@ -21,8 +21,7 @@ service.interceptors.request.use(
 // response interceptor
 service.interceptors.response.use(
   response => {
-    const res = response.data
-    return res
+    return response.data
   },
   error => {
   }

+ 29 - 29
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js

@@ -49,14 +49,14 @@ export default function ContextPadProvider(
   }
 
   eventBus.on("create.end", 250, function(event) {
-    var context = event.context,
-      shape = context.shape;
+    const context = event.context,
+      shape = context.shape
 
     if (!hasPrimaryModifier(event) || !contextPad.isOpen(shape)) {
       return;
     }
 
-    var entries = contextPad.getEntries(shape);
+    const entries = contextPad.getEntries(shape)
 
     if (entries.replace) {
       entries.replace.action.click(event, shape);
@@ -81,7 +81,7 @@ ContextPadProvider.$inject = [
 ];
 
 ContextPadProvider.prototype.getContextPadEntries = function(element) {
-  var contextPad = this._contextPad,
+  const contextPad = this._contextPad,
     modeling = this._modeling,
     elementFactory = this._elementFactory,
     connect = this._connect,
@@ -90,15 +90,15 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
     canvas = this._canvas,
     rules = this._rules,
     autoPlace = this._autoPlace,
-    translate = this._translate;
+    translate = this._translate
 
-  var actions = {};
+  const actions = {}
 
   if (element.type === "label") {
     return actions;
   }
 
-  var businessObject = element.businessObject;
+  const businessObject = element.businessObject
 
   function startConnect(event, element) {
     connect.start(event, element);
@@ -109,21 +109,21 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
   }
 
   function getReplaceMenuPosition(element) {
-    var Y_OFFSET = 5;
+    const Y_OFFSET = 5
 
-    var diagramContainer = canvas.getContainer(),
-      pad = contextPad.getPad(element).html;
+    const diagramContainer = canvas.getContainer(),
+      pad = contextPad.getPad(element).html
 
-    var diagramRect = diagramContainer.getBoundingClientRect(),
-      padRect = pad.getBoundingClientRect();
+    const diagramRect = diagramContainer.getBoundingClientRect(),
+      padRect = pad.getBoundingClientRect()
 
-    var top = padRect.top - diagramRect.top;
-    var left = padRect.left - diagramRect.left;
+    const top = padRect.top - diagramRect.top
+    const left = padRect.left - diagramRect.left
 
-    var pos = {
+    const pos = {
       x: left,
       y: top + padRect.height + Y_OFFSET
-    };
+    }
 
     return pos;
   }
@@ -145,19 +145,19 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
     }
 
     function appendStart(event, element) {
-      var shape = elementFactory.createShape(assign({ type: type }, options));
+      const shape = elementFactory.createShape(assign({ type: type }, options))
       create.start(event, shape, {
         source: element
       });
     }
 
-    var append = autoPlace
+    const append = autoPlace
       ? function(event, element) {
-          var shape = elementFactory.createShape(assign({ type: type }, options));
+        const shape = elementFactory.createShape(assign({ type: type }, options))
 
-          autoPlace.append(element, shape);
-        }
-      : appendStart;
+        autoPlace.append(element, shape)
+      }
+      : appendStart
 
     return {
       group: "model",
@@ -182,7 +182,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
   }
 
   if (isAny(businessObject, ["bpmn:Lane", "bpmn:Participant"]) && isExpanded(businessObject)) {
-    var childLanes = getChildLanes(element);
+    const childLanes = getChildLanes(element)
 
     assign(actions, {
       "lane-insert-above": {
@@ -302,9 +302,9 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
         title: translate("Change type"),
         action: {
           click: function(event, element) {
-            var position = assign(getReplaceMenuPosition(element), {
+            const position = assign(getReplaceMenuPosition(element), {
               cursor: { x: event.x, y: event.y }
-            });
+            })
 
             popupMenu.open(element, "bpmn-replace", position);
           }
@@ -350,7 +350,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
   }
 
   // delete element entry, only show if allowed by rules
-  var deleteAllowed = rules.allowed("elements.delete", { elements: [element] });
+  let deleteAllowed = rules.allowed('elements.delete', { elements: [element] })
 
   if (isArray(deleteAllowed)) {
     // was the element returned as a deletion candidate?
@@ -376,10 +376,10 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
 // helpers /////////
 
 function isEventType(eventBo, type, definition) {
-  var isType = eventBo.$instanceOf(type);
-  var isDefinition = false;
+  const isType = eventBo.$instanceOf(type)
+  let isDefinition = false
 
-  var definitions = eventBo.eventDefinitions || [];
+  const definitions = eventBo.eventDefinitions || []
   forEach(definitions, function(def) {
     if (def.$type === definition) {
       isDefinition = true;

+ 10 - 10
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js

@@ -1,12 +1,12 @@
 "use strict";
 
-var some = require("min-dash").some;
+const some = require('min-dash').some
 
-var ALLOWED_TYPES = {
-  FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
-  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
-  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
-};
+const ALLOWED_TYPES = {
+  FailedJobRetryTimeCycle: ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:Activity'],
+  Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'],
+  Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']
+}
 
 function is(element, type) {
   return element && typeof element.$instanceOf === "function" && element.$instanceOf(type);
@@ -32,8 +32,8 @@ function anyType(element, types) {
 }
 
 function isAllowed(propName, propDescriptor, newElement) {
-  var name = propDescriptor.name,
-    types = ALLOWED_TYPES[name.replace(/activiti:/, "")];
+  const name = propDescriptor.name,
+    types = ALLOWED_TYPES[name.replace(/activiti:/, '')]
 
   return name === propName && anyType(newElement, types);
 }
@@ -42,8 +42,8 @@ function ActivitiModdleExtension(eventBus) {
   eventBus.on(
     "property.clone",
     function(context) {
-      var newElement = context.newElement,
-        propDescriptor = context.propertyDescriptor;
+      const newElement = context.newElement,
+        propDescriptor = context.propertyDescriptor
 
       this.canCloneProperty(newElement, propDescriptor);
     },

+ 16 - 18
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js

@@ -1,17 +1,17 @@
 "use strict";
 
-var isFunction = require("min-dash").isFunction,
-  isObject = require("min-dash").isObject,
-  some = require("min-dash").some;
+const isFunction = require('min-dash').isFunction,
+  isObject = require('min-dash').isObject,
+  some = require('min-dash').some
 
-var WILDCARD = "*";
+const WILDCARD = '*'
 
 function CamundaModdleExtension(eventBus) {
-  var self = this;
+  const self = this
 
   eventBus.on("moddleCopy.canCopyProperty", function(context) {
-    var property = context.property,
-      parent = context.parent;
+    const property = context.property,
+      parent = context.parent
 
     return self.canCopyProperty(property, parent);
   });
@@ -45,14 +45,14 @@ CamundaModdleExtension.prototype.canCopyProperty = function(property, parent) {
 
 CamundaModdleExtension.prototype.canHostInputOutput = function(parent) {
   // allowed in camunda:Connector
-  var connector = getParent(parent, "camunda:Connector");
+  const connector = getParent(parent, 'camunda:Connector')
 
   if (connector) {
     return true;
   }
 
   // special rules inside bpmn:FlowNode
-  var flowNode = getParent(parent, "bpmn:FlowNode");
+  const flowNode = getParent(parent, 'bpmn:FlowNode')
 
   if (!flowNode) {
     return false;
@@ -62,15 +62,13 @@ CamundaModdleExtension.prototype.canHostInputOutput = function(parent) {
     return false;
   }
 
-  if (is(flowNode, "bpmn:SubProcess") && flowNode.get("triggeredByEvent")) {
-    return false;
-  }
+  return !(is(flowNode, "bpmn:SubProcess") && flowNode.get("triggeredByEvent"));
+
 
-  return true;
 };
 
 CamundaModdleExtension.prototype.canHostConnector = function(parent) {
-  var serviceTaskLike = getParent(parent, "camunda:ServiceTaskLike");
+  const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike')
 
   if (is(serviceTaskLike, "bpmn:MessageEventDefinition")) {
     // only allow on throw and end events
@@ -81,13 +79,13 @@ CamundaModdleExtension.prototype.canHostConnector = function(parent) {
 };
 
 CamundaModdleExtension.prototype.canHostIn = function(parent) {
-  var callActivity = getParent(parent, "bpmn:CallActivity");
+  const callActivity = getParent(parent, 'bpmn:CallActivity')
 
   if (callActivity) {
     return true;
   }
 
-  var signalEventDefinition = getParent(parent, "bpmn:SignalEventDefinition");
+  const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition')
 
   if (signalEventDefinition) {
     // only allow on throw and end events
@@ -129,9 +127,9 @@ function getParent(element, type) {
 
 function isAllowedInParent(property, parent) {
   // (1) find property descriptor
-  var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
+  const descriptor = property.$type && property.$model.getTypeDescriptor(property.$type)
 
-  var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
+  const allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn
 
   if (!allowedIn || isWildcard(allowedIn)) {
     return true;

+ 10 - 10
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js

@@ -1,12 +1,12 @@
 "use strict";
 
-var some = require("min-dash").some;
+const some = require('min-dash').some
 
-var ALLOWED_TYPES = {
-  FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
-  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
-  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
-};
+const ALLOWED_TYPES = {
+  FailedJobRetryTimeCycle: ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:Activity'],
+  Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'],
+  Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']
+}
 
 function is(element, type) {
   return element && typeof element.$instanceOf === "function" && element.$instanceOf(type);
@@ -32,8 +32,8 @@ function anyType(element, types) {
 }
 
 function isAllowed(propName, propDescriptor, newElement) {
-  var name = propDescriptor.name,
-    types = ALLOWED_TYPES[name.replace(/flowable:/, "")];
+  const name = propDescriptor.name,
+    types = ALLOWED_TYPES[name.replace(/flowable:/, '')]
 
   return name === propName && anyType(newElement, types);
 }
@@ -42,8 +42,8 @@ function FlowableModdleExtension(eventBus) {
   eventBus.on(
     "property.clone",
     function(context) {
-      var newElement = context.newElement,
-        propDescriptor = context.propertyDescriptor;
+      const newElement = context.newElement,
+        propDescriptor = context.propertyDescriptor
 
       this.canCloneProperty(newElement, propDescriptor);
     },

+ 10 - 10
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js

@@ -10,18 +10,18 @@ F.prototype = PaletteProvider.prototype; // 核心,将父类的原型赋值给
 
 // 利用中介函数重写原型链方法
 F.prototype.getPaletteEntries = function() {
-  var actions = {},
+  const actions = {},
     create = this._create,
     elementFactory = this._elementFactory,
     spaceTool = this._spaceTool,
     lassoTool = this._lassoTool,
     handTool = this._handTool,
     globalConnect = this._globalConnect,
-    translate = this._translate;
+    translate = this._translate
 
   function createAction(type, group, className, title, options) {
     function createListener(event) {
-      var shape = elementFactory.createShape(assign({ type: type }, options));
+      const shape = elementFactory.createShape(assign({ type: type }, options))
 
       if (options) {
         shape.businessObject.di.isExpanded = options.isExpanded;
@@ -30,7 +30,7 @@ F.prototype.getPaletteEntries = function() {
       create.start(event, shape);
     }
 
-    var shortType = type.replace(/^bpmn:/, "");
+    const shortType = type.replace(/^bpmn:/, '')
 
     return {
       group: group,
@@ -44,19 +44,19 @@ F.prototype.getPaletteEntries = function() {
   }
 
   function createSubprocess(event) {
-    var subProcess = elementFactory.createShape({
-      type: "bpmn:SubProcess",
+    const subProcess = elementFactory.createShape({
+      type: 'bpmn:SubProcess',
       x: 0,
       y: 0,
       isExpanded: true
-    });
+    })
 
-    var startEvent = elementFactory.createShape({
-      type: "bpmn:StartEvent",
+    const startEvent = elementFactory.createShape({
+      type: 'bpmn:StartEvent',
       x: 40,
       y: 82,
       parent: subProcess
-    });
+    })
 
     create.start(event, [subProcess, startEvent], {
       hints: {

+ 10 - 10
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js

@@ -19,18 +19,18 @@ export default function PaletteProvider(palette, create, elementFactory, spaceTo
 PaletteProvider.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "translate"];
 
 PaletteProvider.prototype.getPaletteEntries = function() {
-  var actions = {},
+  const actions = {},
     create = this._create,
     elementFactory = this._elementFactory,
     spaceTool = this._spaceTool,
     lassoTool = this._lassoTool,
     handTool = this._handTool,
     globalConnect = this._globalConnect,
-    translate = this._translate;
+    translate = this._translate
 
   function createAction(type, group, className, title, options) {
     function createListener(event) {
-      var shape = elementFactory.createShape(assign({ type: type }, options));
+      const shape = elementFactory.createShape(assign({ type: type }, options))
 
       if (options) {
         shape.businessObject.di.isExpanded = options.isExpanded;
@@ -39,7 +39,7 @@ PaletteProvider.prototype.getPaletteEntries = function() {
       create.start(event, shape);
     }
 
-    var shortType = type.replace(/^bpmn:/, "");
+    const shortType = type.replace(/^bpmn:/, '')
 
     return {
       group: group,
@@ -53,19 +53,19 @@ PaletteProvider.prototype.getPaletteEntries = function() {
   }
 
   function createSubprocess(event) {
-    var subProcess = elementFactory.createShape({
-      type: "bpmn:SubProcess",
+    const subProcess = elementFactory.createShape({
+      type: 'bpmn:SubProcess',
       x: 0,
       y: 0,
       isExpanded: true
-    });
+    })
 
-    var startEvent = elementFactory.createShape({
-      type: "bpmn:StartEvent",
+    const startEvent = elementFactory.createShape({
+      type: 'bpmn:StartEvent',
       x: 40,
       y: 82,
       parent: subProcess
-    });
+    })
 
     create.start(event, [subProcess, startEvent], {
       hints: {

+ 1 - 1
yudao-ui-admin/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue

@@ -76,7 +76,7 @@ export default {
       if (!value) {
         return;
       }
-      if (!value.match(/[a-zA-Z_][\-_.0-9_a-zA-Z$]*/)) {
+      if (!value.match(/[a-zA-Z_][\-_.0-9a-zA-Z$]*/)) {
         console.log('key 不满足 XML NCName 规则,所以不进行赋值');
         return;
       }

+ 1 - 1
yudao-ui-admin/src/components/generator/js.js

@@ -1,5 +1,5 @@
 import { isArray } from 'util'
-import { exportDefault, titleCase, deepClone } from '@/utils/index'
+import { exportDefault, titleCase, deepClone } from '@/utils'
 import ruleTrigger from './ruleTrigger'
 
 const units = {

+ 5 - 5
yudao-ui-admin/src/directive/dialog/drag.js

@@ -5,7 +5,7 @@
 export default {
   bind(el, binding, vnode, oldVnode) {
     const value = binding.value
-    if (value == false) return
+    if (value === false) return
     // 获取拖拽内容头部
     const dialogHeaderEl = el.querySelector('.el-dialog__header');
     const dragDom = el.querySelector('.el-dialog');
@@ -16,7 +16,7 @@ export default {
     dragDom.style.marginTop = 0;
     let width = dragDom.style.width;
     if (width.includes('%')) {
-      width = +document.body.clientWidth * (+width.replace(/\%/g, '') / 100);
+      width = +document.body.clientWidth * (+width.replace(/%/g, '') / 100);
     } else {
       width = +width.replace(/\px/g, '');
     }
@@ -32,12 +32,12 @@ export default {
 
       // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
       if (sty.left.includes('%')) {
-        styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
-        styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
+        styL = +document.body.clientWidth * (+sty.left.replace(/%/g, '') / 100);
+        styT = +document.body.clientHeight * (+sty.top.replace(/%/g, '') / 100);
       } else {
         styL = +sty.left.replace(/\px/g, '');
         styT = +sty.top.replace(/\px/g, '');
-      };
+      }
 
       // 鼠标拖拽事件
       document.onmousemove = function (e) {

+ 1 - 1
yudao-ui-admin/src/plugins/tab.js

@@ -56,7 +56,7 @@ export default {
   },
   // 添加tab页签
   openPage(title, url, params) {
-    var obj = { path: url, meta: { title: title } }
+    const obj = { path: url, meta: { title: title } }
     store.dispatch('tagsView/addView', obj);
     return router.push({ path: url, query: params });
   },

+ 1 - 1
yudao-ui-admin/src/store/modules/permission.js

@@ -86,7 +86,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
 }
 
 function filterChildren(childrenMap, lastRouter = false) {
-  var children = []
+  let children = []
   childrenMap.forEach((el, index) => {
     if (el.children && el.children.length) {
       if (el.component === 'ParentView' && !lastRouter) {

+ 1 - 1
yudao-ui-admin/src/store/modules/user.js

@@ -1,4 +1,4 @@
-import {login, logout, getInfo, socialLogin, socialBindLogin, smsLogin} from '@/api/login'
+import {login, logout, getInfo, socialLogin, smsLogin} from '@/api/login'
 import {setToken, removeToken} from '@/utils/auth'
 
 const user = {

+ 15 - 16
yudao-ui-admin/src/utils/index.js

@@ -4,14 +4,14 @@ import { parseTime } from './ruoyi'
  * 表格时间格式化
  */
 export function formatDate(cellValue) {
-  if (cellValue == null || cellValue == "") return "";
-  var date = new Date(cellValue)
-  var year = date.getFullYear()
-  var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
-  var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
-  var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
-  var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
-  var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
+  if (cellValue == null || cellValue === "") return "";
+  const date = new Date(cellValue)
+  const year = date.getFullYear()
+  const month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
+  const day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
+  const hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
+  const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
+  const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
   return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
 }
 
@@ -78,13 +78,13 @@ export function getQueryObject(url) {
 }
 
 /**
- * @param {string} input value
- * @returns {number} output value
+ * @param str
+ * @param str
  */
 export function byteLength(str) {
   // returns the byte length of an utf8 string
   let s = str.length
-  for (var i = str.length - 1; i >= 0; i--) {
+  for (let i = str.length - 1; i >= 0; i--) {
     const code = str.charCodeAt(i)
     if (code > 0x7f && code <= 0x7ff) s++
     else if (code > 0x7ff && code <= 0xffff) s += 2
@@ -136,8 +136,7 @@ export function param2Obj(url) {
     const index = v.indexOf('=')
     if (index !== -1) {
       const name = v.substring(0, index)
-      const val = v.substring(index + 1, v.length)
-      obj[name] = val
+      obj[name] = v.substring(index + 1, v.length)
     }
   })
   return obj
@@ -330,7 +329,7 @@ export function createUniqueString() {
 
 /**
  * Check if an element has a class
- * @param {HTMLElement} elm
+ * @param ele
  * @param {string} cls
  * @returns {boolean}
  */
@@ -340,7 +339,7 @@ export function hasClass(ele, cls) {
 
 /**
  * Add class to element
- * @param {HTMLElement} elm
+ * @param ele
  * @param {string} cls
  */
 export function addClass(ele, cls) {
@@ -349,7 +348,7 @@ export function addClass(ele, cls) {
 
 /**
  * Remove class from element
- * @param {HTMLElement} elm
+ * @param ele
  * @param {string} cls
  */
 export function removeClass(ele, cls) {

+ 5 - 9
yudao-ui-admin/src/utils/permission.js

@@ -15,10 +15,8 @@ export function checkPermi(value) {
       return all_permission === permission || permissionDatas.includes(permission)
     })
 
-    if (!hasPermission) {
-      return false
-    }
-    return true
+    return hasPermission;
+
   } else {
     console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
     return false
@@ -40,12 +38,10 @@ export function checkRole(value) {
       return super_admin === role || permissionRoles.includes(role)
     })
 
-    if (!hasRole) {
-      return false
-    }
-    return true
+    return hasRole;
+
   } else {
     console.error(`need roles! Like checkRole="['admin','editor']"`)
     return false
   }
-}
+}

+ 2 - 2
yudao-ui-admin/src/utils/request.js

@@ -49,12 +49,12 @@ service.interceptors.request.use(config => {
     let url = config.url + '?';
     for (const propName of Object.keys(config.params)) {
       const value = config.params[propName];
-      var part = encodeURIComponent(propName) + "=";
+      const part = encodeURIComponent(propName) + '='
       if (value !== null && typeof(value) !== "undefined") {
         if (typeof value === 'object') {
           for (const key of Object.keys(value)) {
             let params = propName + '[' + key + ']';
-            var subPart = encodeURIComponent(params) + "=";
+            const subPart = encodeURIComponent(params) + '='
             url += subPart + encodeURIComponent(value[key]) + "&";
           }
         } else {

+ 8 - 6
yudao-ui-admin/src/utils/ruoyi.js

@@ -18,7 +18,7 @@ export function parseTime(time, pattern) {
     if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
       time = parseInt(time)
     } else if (typeof time === 'string') {
-      time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm),'');
+      time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),'');
     }
     if ((typeof time === 'number') && (time.toString().length === 10)) {
       time = time * 1000
@@ -34,7 +34,7 @@ export function parseTime(time, pattern) {
     s: date.getSeconds(),
     a: date.getDay()
   }
-  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
+  const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
     let value = formatObj[key]
     // Note: getDay() returns 0 on Sunday
     if (key === 'a') {
@@ -102,9 +102,11 @@ export function addBeginAndEndTime(params, dateRange, propName) {
 
 // 字符串格式化(%s )
 export function sprintf(str) {
-  var args = arguments, flag = true, i = 1;
+  const args = arguments
+  let flag = true
+  const i = 1
   str = str.replace(/%s/g, function () {
-    var arg = args[i++];
+    const arg = args[i++]
     if (typeof arg === 'undefined') {
       flag = false;
       return '';
@@ -116,7 +118,7 @@ export function sprintf(str) {
 
 // 转换字符串,undefined,null等转化为""
 export function praseStrEmpty(str) {
-  if (!str || str == "undefined" || str == "null") {
+  if (!str || str === "undefined" || str === "null") {
     return "";
   }
   return str;
@@ -244,7 +246,7 @@ export function getPath(path) {
  * @returns
  */
  export function divide(divisor, dividend) {
-  if(divisor == null || dividend == null || dividend == 0){
+  if(divisor == null || dividend == null || dividend === 0){
     return null;
   }
   return Math.floor(divisor/dividend*100)/100;

+ 6 - 4
yudao-ui-admin/src/utils/scroll-to.js

@@ -8,8 +8,10 @@ Math.easeInOutQuad = function(t, b, c, d) {
 }
 
 // requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
-var requestAnimFrame = (function() {
-  return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) }
+const requestAnimFrame = (function() {
+  return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
+    window.setTimeout(callback, 1000 / 60)
+  }
 })()
 
 /**
@@ -37,11 +39,11 @@ export function scrollTo(to, duration, callback) {
   const increment = 20
   let currentTime = 0
   duration = (typeof (duration) === 'undefined') ? 500 : duration
-  var animateScroll = function() {
+  const animateScroll = function() {
     // increment the time
     currentTime += increment
     // find the value with the quadratic in-out easing function
-    var val = Math.easeInOutQuad(currentTime, start, change, duration)
+    const val = Math.easeInOutQuad(currentTime, start, change, duration)
     // move the document.body
     move(val)
     // do the animation unless its over

+ 3 - 5
yudao-ui-admin/src/utils/validate.js

@@ -56,7 +56,7 @@ export function validAlphabets(str) {
  * @returns {Boolean}
  */
 export function validEmail(email) {
-  const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
+  const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
   return reg.test(email)
 }
 
@@ -65,10 +65,8 @@ export function validEmail(email) {
  * @returns {Boolean}
  */
 export function isString(str) {
-  if (typeof str === 'string' || str instanceof String) {
-    return true
-  }
-  return false
+  return typeof str === 'string' || str instanceof String;
+
 }
 
 /**

+ 0 - 1
yudao-ui-admin/src/views/bpm/definition/index.vue

@@ -76,7 +76,6 @@
 <script>
 import {getProcessDefinitionBpmnXML, getProcessDefinitionPage} from "@/api/bpm/definition";
 import {DICT_TYPE, getDictDatas} from "@/utils/dict";
-import {getForm} from "@/api/bpm/form";
 import {decodeFields} from "@/utils/formGenerator";
 import Parser from '@/components/parser/Parser'
 import taskAssignRuleDialog from "../taskAssignRule/taskAssignRuleDialog";

+ 1 - 3
yudao-ui-admin/src/views/bpm/form/formEditor.vue

@@ -151,9 +151,7 @@ import RightPanel from '@/views/infra/build/RightPanel'
 import {
   inputComponents, selectComponents, layoutComponents, formConf
 } from '@/components/generator/config'
-import {
-  exportDefault, beautifierConf, isNumberStr, titleCase, deepClone, isObjectObject
-} from '@/utils/index'
+import {beautifierConf, titleCase, deepClone, isObjectObject} from '@/utils'
 import {
   makeUpHtml, vueTemplate, vueScript, cssStyle
 } from '@/components/generator/html'

+ 1 - 1
yudao-ui-admin/src/views/bpm/oa/leave/index.vue

@@ -159,7 +159,7 @@ export default {
         type: 'warning',
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, // 判断非空,且非空格
+        inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
         inputErrorMessage: "取消原因不能为空",
       }).then(({ value }) => {
         return cancelProcessInstance(id, value);

+ 2 - 2
yudao-ui-admin/src/views/bpm/processInstance/detail.vue

@@ -110,8 +110,8 @@ import {DICT_TYPE, getDictDatas} from "@/utils/dict";
 import store from "@/store";
 import {decodeFields} from "@/utils/formGenerator";
 import Parser from '@/components/parser/Parser'
-import {createProcessInstance, getProcessInstance} from "@/api/bpm/processInstance";
-import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssignee,backTask} from "@/api/bpm/task";
+import {getProcessInstance} from "@/api/bpm/processInstance";
+import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssignee} from "@/api/bpm/task";
 import {getDate} from "@/utils/dateUtils";
 import {listSimpleUsers} from "@/api/system/user";
 import {getActivityList} from "@/api/bpm/activity";

+ 1 - 1
yudao-ui-admin/src/views/bpm/processInstance/index.vue

@@ -164,7 +164,7 @@ export default {
         type: 'warning',
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, // 判断非空,且非空格
+        inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
         inputErrorMessage: "取消原因不能为空",
       }).then(({ value }) => {
         return cancelProcessInstance(id, value);

+ 0 - 1
yudao-ui-admin/src/views/bpm/task/todo.vue

@@ -50,7 +50,6 @@
 
 <script>
 import {getTodoTaskPage} from '@/api/bpm/task'
-import {listSimpleUsers} from "@/api/system/user";
 
 export default {
   name: "Todo",

+ 1 - 2
yudao-ui-admin/src/views/dashboard/PanelGroup.vue

@@ -143,8 +143,7 @@ export default {
     .card-panel-description {
       float: right;
       font-weight: bold;
-      margin: 26px;
-      margin-left: 0px;
+      margin: 26px 26px 26px 0;
 
       .card-panel-text {
         line-height: 18px;

+ 1 - 1
yudao-ui-admin/src/views/infra/build/ResourceDialog.vue

@@ -60,7 +60,7 @@
   </div>
 </template>
 <script>
-import { deepClone } from '@/utils/index'
+import { deepClone } from '@/utils'
 
 export default {
   components: {},

+ 2 - 2
yudao-ui-admin/src/views/infra/build/RightPanel.vue

@@ -651,10 +651,10 @@
 <script>
 import { isArray } from 'util'
 import TreeNodeDialog from './TreeNodeDialog'
-import { isNumberStr } from '@/utils/index'
+import { isNumberStr } from '@/utils'
 import IconsDialog from './IconsDialog'
 import {
-  inputComponents, selectComponents, layoutComponents
+  inputComponents, selectComponents
 } from '@/components/generator/config'
 import { saveFormConf } from '@/utils/db'
 

+ 1 - 1
yudao-ui-admin/src/views/infra/build/TreeNodeDialog.vue

@@ -71,7 +71,7 @@
   </div>
 </template>
 <script>
-import { isNumberStr } from '@/utils/index'
+import { isNumberStr } from '@/utils'
 import { getTreeNodeId, saveTreeNodeId } from '@/utils/db'
 
 const id = getTreeNodeId()

+ 2 - 2
yudao-ui-admin/src/views/infra/build/index.vue

@@ -133,8 +133,8 @@ import {
   inputComponents, selectComponents, layoutComponents, formConf
 } from '@/components/generator/config'
 import {
-  exportDefault, beautifierConf, isNumberStr, titleCase, deepClone
-} from '@/utils/index'
+  beautifierConf, titleCase, deepClone
+} from '@/utils'
 import {
   makeUpHtml, vueTemplate, vueScript, cssStyle
 } from '@/components/generator/html'

+ 4 - 4
yudao-ui-admin/src/views/infra/codegen/genInfoForm.vue

@@ -105,7 +105,7 @@
         </el-form-item>
       </el-col>
 
-      <el-col :span="24" v-if="info.genType == '1'">
+      <el-col :span="24" v-if="info.genType === '1'">
         <el-form-item prop="genPath">
           <span slot="label">
             自定义路径
@@ -128,7 +128,7 @@
       </el-col>
     </el-row>
 
-    <el-row v-show="info.tplCategory == 'tree'">
+    <el-row v-show="info.tplCategory === 'tree'">
       <h4 class="form-header">其他信息</h4>
       <el-col :span="12">
         <el-form-item>
@@ -185,7 +185,7 @@
         </el-form-item>
       </el-col>
     </el-row>
-    <el-row v-show="info.tplCategory == 'sub'">
+    <el-row v-show="info.tplCategory === 'sub'">
       <h4 class="form-header">关联信息</h4>
       <el-col :span="12">
         <el-form-item>
@@ -314,7 +314,7 @@ export default {
     },
     /** 设置关联外键 */
     setSubTableColumns(value) {
-      for (var item in this.tables) {
+      for (let item in this.tables) {
         const name = this.tables[item].tableName;
         if (value === name) {
           this.subColumns = this.tables[item].columns;

+ 1 - 1
yudao-ui-admin/src/views/infra/codegen/index.vue

@@ -209,7 +209,7 @@ export default {
     highlightedCode(item) {
       // const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
       // var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
-      var language = item.filePath.substring(item.filePath.lastIndexOf(".") + 1);
+      const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1)
       const result = hljs.highlight(language, item.code || "", true);
       return result.value || '&nbsp;';
     },

+ 1 - 1
yudao-ui-admin/src/views/infra/redis/index.vue

@@ -13,7 +13,7 @@
                   <td><div class="cell">Redis版本</div></td>
                   <td><div class="cell" v-if="cache.info">{{ cache.info.redis_version }}</div></td>
                   <td><div class="cell">运行模式</div></td>
-                  <td><div class="cell" v-if="cache.info">{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}</div></td>
+                  <td><div class="cell" v-if="cache.info">{{ cache.info.redis_mode === "standalone" ? "单机" : "集群" }}</div></td>
                   <td><div class="cell">端口</div></td>
                   <td><div class="cell" v-if="cache.info">{{ cache.info.tcp_port }}</div></td>
                   <td><div class="cell">客户端数</div></td>

+ 3 - 3
yudao-ui-admin/src/views/login.vue

@@ -1,4 +1,4 @@
-<template>
+<template xmlns="">
   <div class="container">
     <div class="logo"></div>
     <!-- 登录区域 -->
@@ -150,7 +150,7 @@ export default {
           {required: true, trigger: "blur", message: "手机号不能为空"},
           {
             validator: function (rule, value, callback) {
-              if (/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/.test(value) === false) {
+              if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
                 callback(new Error("手机号格式错误"));
               } else {
                 callback();
@@ -285,7 +285,7 @@ export default {
 
 .oauth-login {
   display: flex;
-  align-items: cen;
+  align-items: center;
   cursor:pointer;
 }
 .oauth-login-item {

+ 0 - 1
yudao-ui-admin/src/views/mall/market/banner/index.vue

@@ -107,7 +107,6 @@
 import {
   createBanner,
   deleteBanner,
-  exportBannerExcel,
   getBanner,
   getBannerPage,
   updateBanner

+ 0 - 2
yudao-ui-admin/src/views/mall/product/category/index.vue

@@ -98,7 +98,6 @@
 import {
   createProductCategory,
   deleteProductCategory,
-  exportCategoryExcel,
   getProductCategory,
   getProductCategoryList,
   updateProductCategory
@@ -106,7 +105,6 @@ import {
 import Editor from '@/components/Editor';
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import IconSelect from "@/components/IconSelect";
 import ImageUpload from '@/components/ImageUpload';
 import {CommonStatusEnum} from "@/utils/constants";
 

+ 3 - 3
yudao-ui-admin/src/views/mall/product/property/index.vue

@@ -254,7 +254,7 @@ export default {
         }).catch(() => {});
     },
     removePropertyValue(item) {
-      var index = this.form.propertyValueList.indexOf(item)
+      const index = this.form.propertyValueList.indexOf(item)
       if (index !== -1) {
         this.form.propertyValueList.splice(index, 1)
       }
@@ -266,9 +266,9 @@ export default {
     },
     formatList(list) {
       let str = ''
-      for (var i = 0; i < list.length; i++) {
+      for (let i = 0; i < list.length; i++) {
         str += list[i].name;
-        if(i != list.length-1){
+        if(i !== list.length-1){
           str+="/";
         }
       }

+ 18 - 21
yudao-ui-admin/src/views/mall/product/spu/save.vue

@@ -67,7 +67,7 @@
           <!-- 规格明细 -->
           <el-form-item label="规格明细">
             <el-table :data="ratesForm.rates" border style="width: 100%" ref="ratesTable">
-              <template v-if="ratesForm.spec == 2">
+              <template v-if="ratesForm.spec === 2">
                 <el-table-column :key="index" v-for="(item, index) in dynamicSpec.filter(v => v.specName !== undefined)"
                                  :label="item.specName">
                   <template v-slot="scope">
@@ -118,13 +118,13 @@
               <el-table-column label="库存" :render-header="addRedStar" key="95">
                 <template v-slot="scope">
                   <el-form-item :prop="'rates.'+ scope.$index + '.stock'" :rules="[{required: true, trigger: 'change'}]">
-                    <el-input v-model="scope.row.stock" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
+                    <el-input v-model="scope.row.stock" oninput="value=value.replace(/^(0+)|\D+/g,'')"></el-input>
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column label="预警库存" key="96">
                 <template v-slot="scope">
-                  <el-input v-model="scope.row.warnStock" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
+                  <el-input v-model="scope.row.warnStock" oninput="value=value.replace(/^(0+)|\D+/g,'')"></el-input>
                 </template>
               </el-table-column>
               <el-table-column label="体积" key="97">
@@ -145,8 +145,8 @@
                <template v-if="ratesForm.spec === 2">
                 <el-table-column fixed="right" label="操作" width="50" key="100">
                   <template v-slot="scope">
-                    <el-button @click="scope.row.status = 1" type="text" size="small" v-show="scope.row.status == undefined || scope.row.status == 0 ">禁用</el-button>
-                    <el-button @click="scope.row.status = 0" type="text" size="small" v-show="scope.row.status == 1">启用</el-button>
+                    <el-button @click="scope.row.status = 1" type="text" size="small" v-show="scope.row.status == 0 ">禁用</el-button>
+                    <el-button @click="scope.row.status = 0" type="text" size="small" v-show="scope.row.status === 1">启用</el-button>
                   </template>
                 </el-table-column>
               </template>
@@ -154,7 +154,7 @@
           </el-form-item>
           <el-form-item label="虚拟销量" prop="virtualSalesCount">
             <!-- TODO @Luowenfeng:使用 input 类型即可 -->
-            <el-input v-model="baseForm.virtualSalesCount" placeholder="请输入虚拟销量" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"/>
+            <el-input v-model="baseForm.virtualSalesCount" placeholder="请输入虚拟销量" oninput="value=value.replace(/^(0+)|\D+/g,'')"/>
           </el-form-item>
         </el-form>
       </el-tab-pane>
@@ -172,7 +172,7 @@
       <el-tab-pane label="高级设置" name="fourth">
         <el-form ref="fourth" :model="baseForm" :rules="rules" label-width="100px" style="width: 95%">
           <el-form-item label="排序字段">
-            <el-input v-model="baseForm.sort" placeholder="请输入排序字段" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"/>
+            <el-input v-model="baseForm.sort" placeholder="请输入排序字段" oninput="value=value.replace(/^(0+)|\D+/g,'')"/>
           </el-form-item>
            <el-form-item label="是否展示库存" prop="showStock">
              <el-radio-group v-model="baseForm.showStock">
@@ -271,7 +271,7 @@ export default {
     this.getListBrand();
     this.getListCategory();
     this.getPropertyPageList();
-    if(this.type == 'upd'){
+    if(this.type === 'upd'){
       this.updateType(this.obj.id)
     }
   },
@@ -297,7 +297,7 @@ export default {
     },
     changeRadio() {
       this.$refs.ratesTable.doLayout();
-      if (this.ratesForm.spec == 1) {
+      if (this.ratesForm.spec === 1) {
         this.ratesForm.rates = [{}]
       } else {
         this.ratesForm.rates = []
@@ -363,7 +363,7 @@ export default {
       })
 
       // 动态规格调整字段
-      if (this.ratesForm.spec == 2) {
+      if (this.ratesForm.spec === 2) {
         rates.forEach(r => {
           let properties = []
             Array.of(r.spec).forEach(s => {
@@ -374,7 +374,7 @@ export default {
                   obj = Array.of(s);
                }
               obj.forEach((v, i) => {
-                let specValue = this.dynamicSpec[i].specValue.find(o => o.name == v);
+                let specValue = this.dynamicSpec[i].specValue.find(o => o.name === v);
                 let propertie = {};
                 propertie.propertyId = this.dynamicSpec[i].specId;
                 propertie.valueId = specValue.id;
@@ -422,9 +422,9 @@ export default {
       });
     },
     changeSpec(val) {
-      let obj = this.propertyPageList.find(o => o.id == val);
+      let obj = this.propertyPageList.find(o => o.id === val);
       let dynamicSpec = this.dynamicSpec;
-      let spec = dynamicSpec.find(o => o.specId == val)
+      let spec = dynamicSpec.find(o => o.specId === val)
       spec.specId = obj.id;
       spec.specName = obj.name;
       spec.specValue = obj.propertyValueList;
@@ -451,7 +451,7 @@ export default {
               r.price = this.divide(r.price, 100)
               r.costPrice = this.divide(r.costPrice, 100)
             })
-            if(this.ratesForm.spec == 2){
+            if(this.ratesForm.spec === 2){
               data.productPropertyViews.forEach(p=>{
                 let obj = {};
                 obj.specId = p.propertyId;
@@ -462,7 +462,7 @@ export default {
               data.skus.forEach(s=>{
                 s.spec = [];
                 s.properties.forEach(sp=>{
-                  let spec = data.productPropertyViews.find(o=>o.propertyId == sp.propertyId).propertyValues.find(v=>v.id == sp.valueId).name;
+                  let spec = data.productPropertyViews.find(o=>o.propertyId === sp.propertyId).propertyValues.find(v=>v.id === sp.valueId).name;
                    s.spec.push(spec)
                 })
               })
@@ -483,12 +483,10 @@ export default {
 .dynamic-spec {
   background-color: #f2f2f2;
   width: 85%;
-  margin: auto;
-  margin-bottom: 10px;
+  margin: auto auto 10px;
 
   .spec-header {
-    padding: 30px;
-    padding-bottom: 20px;
+    padding: 30px 30px 20px;
 
     .spec-name {
       display: inline;
@@ -501,9 +499,8 @@ export default {
 
   .spec-values {
     width: 84%;
-    padding: 25px;
     margin: auto;
-    padding-top: 5px;
+    padding: 5px 25px 25px;
 
     .spec-value {
       display: inline-block;

+ 0 - 1
yudao-ui-admin/src/views/pay/order/index.vue

@@ -219,7 +219,6 @@ import {getOrder, getOrderPage, exportOrderExcel} from "@/api/pay/order";
 import {getMerchantListByName} from "@/api/pay/merchant";
 import {getAppListByMerchantId} from "@/api/pay/app";
 import {DICT_TYPE, getDictDatas} from "@/utils/dict";
-import {PayOrderNotifyStatusEnum, PayOrderRefundStatusEnum, PayOrderStatusEnum} from "@/utils/constants";
 import { getNowDateTime} from "@/utils/ruoyi";
 
 const defaultOrderDetail = {

+ 1 - 1
yudao-ui-admin/src/views/sso.vue

@@ -175,7 +175,7 @@ export default {
 @import "~@/assets/styles/login.scss";
 .oauth-login {
   display: flex;
-  align-items: cen;
+  align-items: center;
   cursor:pointer;
 }
 .oauth-login-item {

+ 1 - 1
yudao-ui-admin/src/views/system/dept/index.vue

@@ -167,7 +167,7 @@ export default {
         ],
         phone: [
           {
-            pattern: /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/,
+            pattern: /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
             message: "请输入正确的手机号码",
             trigger: "blur"
           }

+ 0 - 1
yudao-ui-admin/src/views/system/role/index.vue

@@ -167,7 +167,6 @@
 import {
   addRole,
   changeRoleStatus,
-  dataScope,
   delRole,
   exportRole,
   getRole,

+ 1 - 2
yudao-ui-admin/src/views/system/sms/smsChannel.vue

@@ -107,8 +107,7 @@
 </template>
 
 <script>
-import { createSmsChannel, updateSmsChannel, deleteSmsChannel, getSmsChannel, getSmsChannelPage,
-  getSimpleSmsChannels } from "@/api/system/sms/smsChannel";
+import { createSmsChannel, updateSmsChannel, deleteSmsChannel, getSmsChannel, getSmsChannelPage } from "@/api/system/sms/smsChannel";
 
 export default {
   name: "SmsChannel",

+ 1 - 1
yudao-ui-admin/src/views/system/tenantPackage/index.vue

@@ -91,7 +91,7 @@
 
 <script>
 import { createTenantPackage, updateTenantPackage, deleteTenantPackage, getTenantPackage, getTenantPackagePage} from "@/api/system/tenantPackage";
-import {CommonStatusEnum, SystemMenuTypeEnum} from "@/utils/constants";
+import {CommonStatusEnum} from "@/utils/constants";
 import {listSimpleMenus} from "@/api/system/menu";
 
 export default {

+ 1 - 1
yudao-ui-admin/src/views/system/user/index.vue

@@ -343,7 +343,7 @@ export default {
         ],
         mobile: [
           {
-            pattern: /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/,
+            pattern: /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
             message: "请输入正确的手机号码",
             trigger: "blur"
           }

+ 1 - 1
yudao-ui-admin/src/views/system/user/profile/userAvatar.vue

@@ -109,7 +109,7 @@ export default {
     },
     // 上传预处理
     beforeUpload(file) {
-      if (file.type.indexOf("image/") == -1) {
+      if (file.type.indexOf("image/") === -1) {
         this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
       } else {
         const reader = new FileReader();

+ 1 - 1
yudao-ui-admin/src/views/system/user/profile/userInfo.vue

@@ -49,7 +49,7 @@ export default {
         mobile: [
           { required: true, message: "手机号码不能为空", trigger: "blur" },
           {
-            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            pattern: /^1[3|456789][0-9]\d{8}$/,
             message: "请输入正确的手机号码",
             trigger: "blur"
           }

+ 17 - 13
yudao-ui-admin/yarn.lock

@@ -5504,6 +5504,11 @@ image-size@^0.5.1:
   resolved "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
   integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==
 
+immutable@^4.0.0:
+  version "4.1.0"
+  resolved "https://registry.npmmirror.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef"
+  integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==
+
 import-cwd@^2.0.0:
   version "2.1.0"
   resolved "https://registry.npmmirror.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
@@ -8560,23 +8565,22 @@ safe-regex@^1.1.0:
   resolved "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
   integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
 
-sass-loader@10.1.1:
-  version "10.1.1"
-  resolved "https://registry.npmmirror.com/sass-loader/-/sass-loader-10.1.1.tgz#4ddd5a3d7638e7949065dd6e9c7c04037f7e663d"
-  integrity sha512-W6gVDXAd5hR/WHsPicvZdjAWHBcEJ44UahgxcIE196fW2ong0ZHMPO1kZuI5q0VlvMQZh32gpv69PLWQm70qrw==
+sass-loader@13.1.0:
+  version "13.1.0"
+  resolved "https://registry.npmmirror.com/sass-loader/-/sass-loader-13.1.0.tgz#e5b9acf14199a9bc6eaed7a0b8b23951c2cebf6f"
+  integrity sha512-tZS1RJQ2n2+QNyf3CCAo1H562WjL/5AM6Gi8YcPVVoNxQX8d19mx8E+8fRrMWsyc93ZL6Q8vZDSM0FHVTJaVnQ==
   dependencies:
     klona "^2.0.4"
-    loader-utils "^2.0.0"
     neo-async "^2.6.2"
-    schema-utils "^3.0.0"
-    semver "^7.3.2"
 
-sass@1.32.13:
-  version "1.32.13"
-  resolved "https://registry.npmmirror.com/sass/-/sass-1.32.13.tgz#8d29c849e625a415bce71609c7cf95e15f74ed00"
-  integrity sha512-dEgI9nShraqP7cXQH+lEXVf73WOPCse0QlFzSD8k+1TcOxCMwVXfQlr0jtoluZysQOyJGnfr21dLvYKDJq8HkA==
+sass@1.56.0:
+  version "1.56.0"
+  resolved "https://registry.npmmirror.com/sass/-/sass-1.56.0.tgz#134032075a3223c8d49cb5c35e091e5ba1de8e0a"
+  integrity sha512-WFJ9XrpkcnqZcYuLRJh5qiV6ibQOR4AezleeEjTjMsCocYW59dEG19U3fwTTXxzi2Ed3yjPBp727hbbj53pHFw==
   dependencies:
     chokidar ">=3.0.0 <4.0.0"
+    immutable "^4.0.0"
+    source-map-js ">=0.6.2 <2.0.0"
 
 sax@^1.2.4, sax@~1.2.4:
   version "1.2.4"
@@ -8673,7 +8677,7 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0:
   resolved "https://registry.npmmirror.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
   integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
 
-semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.6:
+semver@^7.2.1, semver@^7.3.5, semver@^7.3.6:
   version "7.3.8"
   resolved "https://registry.npmmirror.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
   integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
@@ -8933,7 +8937,7 @@ source-list-map@^2.0.0:
   resolved "https://registry.npmmirror.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
   integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
 
-source-map-js@^1.0.2:
+"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2:
   version "1.0.2"
   resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
   integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==

Some files were not shown because too many files changed in this diff