reaper 4 éve
szülő
commit
dd26c53aad
1 módosított fájl, 30 hozzáadás és 10 törlés
  1. 30 10
      src/components/knowledgeExtra/AddDevKnow.vue

+ 30 - 10
src/components/knowledgeExtra/AddDevKnow.vue

@@ -70,7 +70,10 @@
             >
               静态信息
               <img
-                @click.stop="AssesTabSHow = true"
+                @click.stop="
+                  AssesTabSHow = true;
+                  AssesComSHow = true;
+                "
                 src="@/images/tab_add.png"
                 alt=""
                 v-if="!AssesTabSHow && AssesComSHow"
@@ -389,7 +392,16 @@ export default {
         .then((res) => {
           if (res.data.code == "0") {
             const data = res.data.data;
-            this.scaleData = data.scale;
+            console.log('??????12121',data.scale);
+            if (data.scale) {
+              console.log("!!!!!11111");
+              this.scaleData = data.scale;
+              this.AssesTabSHow = true;
+            } else {
+              console.log("!!!!!!!");
+              this.AssesTabSHow = false;
+              // this.AssesComSHow = false;
+            }
             if (this.form.typeId === 82 || this.form.typeId === 83) {
               // console.log('data',data)
               this.form.fileList =
@@ -432,10 +444,8 @@ export default {
                       disabled: true
                     };
                   });
-              } else {
-                this.staticTabShow = false;
-                this.tabActiveChange("two");
               }
+              console.log("!!!!!!!!dawdaces", data.scale);
             }
           }
         })
@@ -521,6 +531,7 @@ export default {
       })
         .then(() => {
           this.AssesTabSHow = false;
+          this.AssesComSHow = false;
           this.tabActiveChange("one");
           this.tabErrMsg = null;
         })
@@ -743,6 +754,7 @@ export default {
       let all = [];
       let goOn = true,
         it = null;
+      let assessRule = false;
       let viewHeight = 0; // 定位到表单校验的高度
       let viewHeightArr = []; // 表单校验出错高度的所有数组
       let outIsVia = true; // 外层验证是否通过
@@ -858,14 +870,15 @@ export default {
           }
           console.log("cErrArr", cErrArr[0]);
           let domTop = this.$refs.assessRef.getDom(cErrArr[0]);
-          console.log('domTop',domTop);
+          console.log("domTop", domTop);
         } else if (cErrIndex == -1 && fErrIndex != -1) {
           this.tabActive = "one";
           this.tabErrMsg = `"静态知识"`;
+        } else {
+          assessRule = true;
         }
       });
-
-      if (!goOn) {
+      if (this.staticTabShow && !goOn) {
         if (this.staticTabShow) {
           var div = this.$refs["elscrollbar"].$refs["wrap"];
           if (outIsVia) {
@@ -883,6 +896,8 @@ export default {
         return;
       }
 
+      if (!assessRule) return;
+
       //通过必填验证,提交保存
 
       let param = [];
@@ -937,7 +952,9 @@ export default {
         }
         param = paramsAll;
         // 评估内容的数据
-        if (this.AssesComSHow) {
+        param.scale = {}
+        console.log(this.AssesComSHow);
+        if (this.AssesComSHow && this.AssesTabSHow) {
           const assessParam = this.$refs.assessRef.formtParams();
           param.scale = assessParam;
           param.scale.conceptId = this.toAssesTermId;
@@ -949,9 +966,11 @@ export default {
       // this.showSaveDialog(param,'是否'+(this.isEdit?'修改':'保存')+'该静态知识?');
       console.log("param-------");
       console.dir(param);
-      return;
+      // return;
+      console.log("this.isEdit", this.isEdit);
       if (!this.isEdit) {
         // 新增页面
+        console.log("!!!");
         this.saveDisable = true;
         this.sendSaveOrEdit(param);
         return;
@@ -970,6 +989,7 @@ export default {
 
     //保存编辑 接口
     sendSaveOrEdit(param) {
+      console.log("???????");
       this.isCopy && (param.id = undefined);
       param.source = 1; //0:医院端  1:云平台
       api