Browse Source

bug修复

hbchen 1 year ago
parent
commit
29ed35360a
1 changed files with 39 additions and 37 deletions
  1. 39 37
      src/views/rai_manage/components/addChoiceness.vue

+ 39 - 37
src/views/rai_manage/components/addChoiceness.vue

@@ -440,6 +440,8 @@ export default {
               IndustrialManagementName: arr.IndustryName,
               IndustrialSubjectId: arr.IndustrialSubjectId + "",
               IndustrialSubjectName: arr.SubjectName,
+              CompanyLabel: item.List[this.editNum].CompanyLabel && item.List[this.editNum].CompanyLabel.length>0?
+                            item.List[this.editNum].CompanyLabel : [{ name: "", value: item.List.length + 1 }],
               OverviewArticleId: overviewList.ArticleId,
               OverviewArticleTitle: overviewList.Title,
               IsShowOverviewArticle: overviewList.IsShowOverviewArticle,
@@ -576,43 +578,43 @@ export default {
         }
       });
     },
-  },
-  // 拖拽排序更新
-  sortChange({ oldIndex, newIndex }) {
-    this.industryIndex = this.sortChangeFun(this.industryIndex, oldIndex, newIndex);
-  },
-  //标的拖拽排序更新
-  ificationSortChange({ oldIndex, newIndex }) {
-    this.ificationIndustrial = this.sortChangeFun(this.ificationIndustrial, oldIndex, newIndex);
-  },
-  // 排序更新后的逻辑
-  sortChangeFun(currentIndex, oldIndex, newIndex) {
-    console.log({ currentIndex, oldIndex, newIndex });
-    let bigger, smaller;
-    if (oldIndex > newIndex) {
-      bigger = oldIndex;
-      smaller = newIndex;
-    } else {
-      bigger = newIndex;
-      smaller = oldIndex;
-    }
-    // 当前算中tab的排序 小于较小的 大于较大的 则不用做变动
-    if (currentIndex < smaller || currentIndex > bigger) return currentIndex;
-    // 移动的是当前选中的
-    if (currentIndex == oldIndex) return newIndex;
-    if (oldIndex > newIndex) {
-      // 向左移 加加
-      currentIndex++;
-    } else if (oldIndex < newIndex) {
-      // 向右移 减减
-      currentIndex--;
-    }
-    return currentIndex;
-  },
-  onMove(e) {
-    // 返回false表示不允许停靠
-    return !!e.relatedContext.element;
-  },
+    // 拖拽排序更新
+    sortChange({ oldIndex, newIndex }) {
+      this.industryIndex = this.sortChangeFun(this.industryIndex, oldIndex, newIndex);
+    },
+    //标的拖拽排序更新
+    ificationSortChange({ oldIndex, newIndex }) {
+      this.ificationIndustrial = this.sortChangeFun(this.ificationIndustrial, oldIndex, newIndex);
+    },
+    // 排序更新后的逻辑
+    sortChangeFun(currentIndex, oldIndex, newIndex) {
+      console.log({ currentIndex, oldIndex, newIndex });
+      let bigger, smaller;
+      if (oldIndex > newIndex) {
+        bigger = oldIndex;
+        smaller = newIndex;
+      } else {
+        bigger = newIndex;
+        smaller = oldIndex;
+      }
+      // 当前算中tab的排序 小于较小的 大于较大的 则不用做变动
+      if (currentIndex < smaller || currentIndex > bigger) return currentIndex;
+      // 移动的是当前选中的
+      if (currentIndex == oldIndex) return newIndex;
+      if (oldIndex > newIndex) {
+        // 向左移 加加
+        currentIndex++;
+      } else if (oldIndex < newIndex) {
+        // 向右移 减减
+        currentIndex--;
+      }
+      return currentIndex;
+    },
+    onMove(e) {
+      // 返回false表示不允许停靠
+      return !!e.relatedContext.element;
+    },
+  }
 };
 </script>
 <style lang="scss">