deason 5 anni fa
parent
commit
9d2874a398

+ 5 - 5
src/modules/questions/views/InsertBluePaperStructureInfo.vue

@@ -106,7 +106,7 @@
               <div class="el_table_inner_left">
                 <p
                   class="class-a"
-                  :class="{ 'class-b': scope.row.propertyParentId != 0 }"
+                  :class="{ 'class-b': scope.row.propertyParentId != '0' }"
                 >
                   {{ scope.row.propertyName }}
                 </p>
@@ -454,7 +454,7 @@ export default {
           disable: false
         };
         //判断父节点
-        if (property.parentId == 0) {
+        if (property.parentId == "0") {
           //判断父节点下面有没有  子节点
           for (let propertySon of this.properties) {
             //如果有子节点,就不能输入
@@ -552,7 +552,7 @@ export default {
           parseInt(row.noPublicMedium) +
           parseInt(row.noPublicDifficulty);
         //父节点总和计算
-        if (row.propertyParentId != 0) {
+        if (row.propertyParentId != "0") {
           var publicSimple = 0;
           var publicMedium = 0;
           var publicDifficulty = 0;
@@ -658,7 +658,7 @@ export default {
         //计算总数
         for (let coursePropertyNumber of _this.coursePropertyNumberDtos) {
           //父节点相加即可
-          if (coursePropertyNumber.propertyParentId === 0) {
+          if (coursePropertyNumber.propertyParentId == "0") {
             number = parseInt(coursePropertyNumber.number) + number;
           }
         }
@@ -775,7 +775,7 @@ export default {
       } else {
         this.question.difficulty = "难";
       }
-      if (row.propertyParentId != 0) {
+      if (row.propertyParentId != "0") {
         this.question.firstPropertyId = row.propertyParentId;
         this.question.secondPropertyId = row.propertyId;
       } else {

+ 4 - 4
src/modules/questions/views/PropertyInfo.vue

@@ -198,7 +198,7 @@ export default {
       console.log(object);
       this.showButton = false;
       //判断选中节点,如果是父节点,可以新增二级
-      if (object.parentId === 0) {
+      if (object.parentId == "0") {
         this.showSonButtton = false;
         this.showMoveButtton = false;
       } else {
@@ -251,7 +251,7 @@ export default {
       this.property = {
         id: "",
         name: "",
-        parentId: 0,
+        parentId: "0",
         number: "",
         coursePropertyId: this.coursePropertyId,
         remark: ""
@@ -282,7 +282,7 @@ export default {
     updateProperty() {
       this.title = "修改属性";
       //判断是父节点还是子节点
-      if (this.property.parentId === 0) {
+      if (this.property.parentId == "0") {
         this.propertyForm.parentName = this.property.name;
         this.propertyForm.remark = this.property.remark;
         this.sonName = false;
@@ -297,7 +297,7 @@ export default {
     },
     //保存
     submit() {
-      if (this.property.parentId === 0) {
+      if (this.property.parentId == "0") {
         //非空判断
         if (!this.propertyForm.parentName) {
           this.showParentName = true;