|
@@ -633,11 +633,30 @@
|
|
|
this.btnLoading = true;
|
|
this.btnLoading = true;
|
|
|
|
|
|
|
|
this.formData.recordRulesCycleList =
|
|
this.formData.recordRulesCycleList =
|
|
|
- this.$refs.cycleMultipleRef.recordRulesCycleList.map(
|
|
|
|
|
- (i, index) => {
|
|
|
|
|
|
|
+ this.$refs.cycleMultipleRef.recordRulesCycleList
|
|
|
|
|
+ .map((i) => {
|
|
|
|
|
+ // 根据月日时分排序计算权重排序
|
|
|
|
|
+ let sortNum = 0;
|
|
|
|
|
+ if (i.month) {
|
|
|
|
|
+ sortNum += i.month * 60 * 24 * 30;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (i.day) {
|
|
|
|
|
+ sortNum += i.day * 60 * 24;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (i.hour) {
|
|
|
|
|
+ sortNum += i.hour * 60;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (i.minute) {
|
|
|
|
|
+ sortNum += i.minute * 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return { ...i, sortNum };
|
|
|
|
|
+ })
|
|
|
|
|
+ .sort((a, b) => a.sortNum - b.sortNum)
|
|
|
|
|
+ .map((i, index) => {
|
|
|
return { ...i, sortNum: index + 1 };
|
|
return { ...i, sortNum: index + 1 };
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
const body = { ...this.formData };
|
|
const body = { ...this.formData };
|
|
|
|
|
|
|
@@ -685,11 +704,30 @@
|
|
|
try {
|
|
try {
|
|
|
this.btnLoading = true;
|
|
this.btnLoading = true;
|
|
|
this.formData.recordRulesCycleList =
|
|
this.formData.recordRulesCycleList =
|
|
|
- this.$refs.cycleMultipleRef.recordRulesCycleList.map(
|
|
|
|
|
- (i, index) => {
|
|
|
|
|
|
|
+ this.$refs.cycleMultipleRef.recordRulesCycleList
|
|
|
|
|
+ .map((i) => {
|
|
|
|
|
+ // 根据月日时分排序计算权重排序
|
|
|
|
|
+ let sortNum = 0;
|
|
|
|
|
+ if (i.month) {
|
|
|
|
|
+ sortNum += i.month * 60 * 24 * 30;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (i.day) {
|
|
|
|
|
+ sortNum += i.day * 60 * 24;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (i.hour) {
|
|
|
|
|
+ sortNum += i.hour * 60;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (i.minute) {
|
|
|
|
|
+ sortNum += i.minute * 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return { ...i, sortNum };
|
|
|
|
|
+ })
|
|
|
|
|
+ .sort((a, b) => a.sortNum - b.sortNum)
|
|
|
|
|
+ .map((i, index) => {
|
|
|
return { ...i, sortNum: index + 1 };
|
|
return { ...i, sortNum: index + 1 };
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
const body = { ...this.formData };
|
|
const body = { ...this.formData };
|
|
|
|
|
|