1178232204@qq.com hace 3 años
padre
commit
2adb27aa46

+ 22 - 20
src/components/common/HomePage.vue

@@ -89,9 +89,9 @@ export default {
   components: {
     "lt-badge": LtBadge,
     "lt-menu": LtMenu,
-    console: Console
+    console: Console,
   },
-  data: function () {
+  data: function() {
     return {
       menuWrappers: null,
       organization: null,
@@ -104,22 +104,22 @@ export default {
       versionInfo: "",
       isNewV: false,
       version: null, //版本信息接口返回的数据
-      onshow: true
+      onshow: true,
     };
   },
   computed: {
-    getRole: function () {
+    getRole: function() {
       return this.userLoginDTO && this.userLoginDTO.type == "0"
         ? "user"
         : "admin";
-    }
+    },
   },
   created() {
     //获取菜单
     this.getMenuList();
   },
   watch: {
-    $route: function (to, from) {
+    $route: function(to, from) {
       if (from.name == "login") {
         this.getMenuList();
       }
@@ -128,21 +128,23 @@ export default {
         this.menuWrappers = [];
         this.isNewV = false;
       }
-    }
+    },
   },
   mounted() {
-    let elSide = document.querySelector(".el-aside"),
-      tabWidth = document.querySelector(".collect-left");
-    tabWidth.style.left = elSide.offsetWidth - 36 + "px";
-    window.onresize = () => {
-      return (() => {
-        tabWidth.style.left = elSide.offsetWidth - 36 + "px";
-      })();
-    };
+    // let elSide = document.querySelector(".el-aside"),
+    //   tabWidth = document.querySelector(".collect-left");
+    // tabWidth.style.left = elSide.offsetWidth - 36 + "px";
+    // window.onresize = () => {
+    //   return (() => {
+    //     tabWidth.style.left = elSide.offsetWidth - 36 + "px";
+    //   })();
+    // };
   },
   methods: {
     collect() {
+      let tabWidth = document.querySelector(".collect-left");
       this.onshow = !this.onshow;
+      tabWidth.style.left = this.onshow ? 300 - 36 + "px" : 300 + "px";
     },
     getMenuList() {
       api
@@ -263,8 +265,8 @@ export default {
       localStorage.removeItem("token");
       localStorage.removeItem("menuPath");
       this.$router.push({ path: "/" });
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -282,7 +284,7 @@ export default {
   width: 36px;
   height: 32px;
   position: fixed;
-  // left: calc(20% - 36px);
+  left: 264px;
   top: 65%;
   z-index: 20;
 }
@@ -314,7 +316,7 @@ export default {
 .version {
   position: fixed;
   bottom: 0;
-  width: @aside-width;
+  width: 300px;
   min-width: 270px;
   font-size: 12px;
   /*text-indent: 50px;*/
@@ -372,4 +374,4 @@ export default {
 .el-button {
   margin-left: 15px;
 }
-</style>
+</style>

+ 12 - 7
src/components/knowledgeExtra/AddNewRule.vue

@@ -726,6 +726,7 @@ export default {
           });
         }
       }
+      console.log(screenArr);
       this.$set(
         this.form.klRuleByIdSub[index],
         "baseTermTypeList",
@@ -913,6 +914,8 @@ export default {
             }
           }
           newGroupList = klRuleByIdSub;
+          this.dragVal = null;
+          this.dragArr = null;
         } else {
           newGroupList = this.form.klRuleByIdSub.filter(
             (item) => item.groupChildId != groupChildId
@@ -1018,17 +1021,23 @@ export default {
         }
       });
     },
-    childSubCodeChange(val, index, numTypes, groupId, key) {
+    childSubCodeChange(val, index, numTypes, groupId, key, code) {
       const dragDel =
         localStorage
           .getItem("zskDragDict")
           .match(new RegExp(this.ruleTermCodeStrs, "g")) || [];
       const subobj = this.baseTypeList.find((it) => it.type == 1);
       let obj = this.form.klRuleByIdSub;
+      let type;
       const len = this.form.klRuleByIdSub.filter((item, i) => {
         return item.groupId == groupId;
       });
       const inx = key % 3 == 2 ? index - 1 : key % 3 == 1 ? index + 1 : index;
+      if (key == 1 && len[2]) {
+        type = len[2].subLenCode == "" ? false : true;
+      } else if (key == 2) {
+        type = len[1].subLenCode == "" ? false : true;
+      }
       //判断药品合理性总条数是否大于1条,是否存在第二条或第三条类型为1,存在触发互斥
       if (
         //判断3条规则是否都已选中
@@ -1037,13 +1046,9 @@ export default {
         index > 0 &&
         key > 0
       ) {
-        if (
-          len.length == 3 &&
-          len[1].subLenCode != "" &&
-          len[2].subLenCode != ""
-        ) {
+        if (len.length == 3 && type) {
           //判断是否存在符合互斥条件的两条出具,若存在,置空另一条出具
-          if (this.dragArr.indexOf(this.dragVal) > -1) {
+          if (code != "" && this.dragArr.indexOf(val) > -1) {
             //剂型给药途径互斥判断
             const arr = this.baseTypeList.filter((it) => {
               return it.type == 1;

+ 6 - 4
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -262,7 +262,7 @@
               :ref="`klRuleByIdSub[${scope.$index}].subLenCode`"
               @change="subCodeChange($event, scope.$index,scope.row.groupId,scope.row.key)"
               @focus="
-                setTheRef($event, `klRuleByIdSub[${scope.$index}].subLenCode`)
+                setTheRef($event, `klRuleByIdSub[${scope.$index}].subLenCode`,scope.row.subLenCode)
               "
             >
               <el-option
@@ -567,7 +567,8 @@ export default {
         { name: '>=', key: '>=' }
       ],
       rules: tableRules,
-      theRef: null
+      theRef: null,
+      code:''
     };
   },
   methods: {
@@ -719,13 +720,14 @@ export default {
       this.$emit('subTypeChange', e, index,groupId,key);
     },
     //
-    setTheRef(e, val) {
+    setTheRef(e, val,code) {
       this.theRef = val;
+      this.code = code?code:''
     },
     // 规则术语类型
     subCodeChange(val, index,groupId,key) {
       //基础规则术语类型修改
-      this.$emit('childSubCodeChange', val, index, this.numTypes,groupId,key);
+      this.$emit('childSubCodeChange', val, index, this.numTypes,groupId,key,this.code);
     },
     clearConcept(index) {
       this.$emit('childClearConcept', index);

+ 1 - 2
src/less/common.less

@@ -38,8 +38,7 @@
 
 .el-aside {
   background: #fff;
-  min-width: @aside-min-width;
-  width: @aside-width !important;
+  width: 300px;
   min-height: 220px;
   border-right: 1px @gray solid;
   height: 100%;