浏览代码

药品开单合理性

1178232204@qq.com 3 年之前
父节点
当前提交
258ac354ec
共有 1 个文件被更改,包括 37 次插入22 次删除
  1. 37 22
      src/components/knowledgeExtra/AddNewRule.vue

+ 37 - 22
src/components/knowledgeExtra/AddNewRule.vue

@@ -275,7 +275,8 @@ export default {
         parLenCode: '',
         klRuleByIdSub: []
       },
-      rules: formRules
+      rules: formRules,
+      dragDel: null
     };
   },
   created() {
@@ -664,26 +665,28 @@ export default {
       if (dragDel.length > 0) {
         if (index == 0) {
           const date = new Date().valueOf();
-          newGroupList = [{
-            groupId: date,
-            groupChildId: 'child' + new Date().valueOf(),
-            baseTypes: this.baseTypeList,
-            baseTermTypeList: [],
-            conceptList: [],
-            subDescription: '',
-            parRuleType: '',
-            subConceptId: '',
-            subType: '',
-            subMaxOperator: '',
-            subMaxUnit: '',
-            subMaxValue: '',
-            subMinOperator: '',
-            subMinUnit: '',
-            subMinValue: '',
-            subEqValue: '',
-            subLenCode: '',
-            dataType: ''
-          }];
+          newGroupList = [
+            {
+              groupId: date,
+              groupChildId: 'child' + new Date().valueOf(),
+              baseTypes: this.baseTypeList,
+              baseTermTypeList: [],
+              conceptList: [],
+              subDescription: '',
+              parRuleType: '',
+              subConceptId: '',
+              subType: '',
+              subMaxOperator: '',
+              subMaxUnit: '',
+              subMaxValue: '',
+              subMinOperator: '',
+              subMinUnit: '',
+              subMinValue: '',
+              subEqValue: '',
+              subLenCode: '',
+              dataType: ''
+            }
+          ];
         } else if (index == 0 || index == 1) {
           newGroupList = this.form.klRuleByIdSub.filter((item, i) => {
             return i == 0;
@@ -795,6 +798,19 @@ export default {
       });
     },
     childSubCodeChange(val, index, numTypes) {
+      const dragDel =
+        localStorage
+          .getItem('zskDragDict')
+          .match(new RegExp(this.ruleTermCodeStrs, 'g')) || [];
+      if (dragDel.length > 0 && index == 1 && this.form.klRuleByIdSub.length == 3 && this.form.klRuleByIdSub[2].subType == 1) {
+        const klRuleByIdSub = this.form.klRuleByIdSub[index+1]
+        klRuleByIdSub.baseTermTypeList.filter(it=>{
+          console.log(it.remark.split('|')[1]);
+        })
+      }
+      if (dragDel.length > 0 && index == 1) {
+        this.dragDel = val;
+      }
       if ((numTypes + ',').indexOf(val + ',') > -1) {
         this.$set(this.form.klRuleByIdSub[index], 'dataType', '1');
       } else {
@@ -808,7 +824,6 @@ export default {
     'form.klRuleByIdSub': {
       handler(val) {
         this.form.klRuleByIdSub.forEach((item, i, arr) => {
-        
           if (i == 0) {
             item.rowIndex = 1;
           } else if (item.groupId == arr[i - 1].groupId) {