XMLWAN пре 4 година
родитељ
комит
a18f97ffdb
2 измењених фајлова са 43 додато и 62 уклоњено
  1. 42 61
      src/xt_pages/user/components/EditGroupAdvice.vue
  2. 1 1
      src/xt_pages/user/doctorAdvice.vue

+ 42 - 61
src/xt_pages/user/components/EditGroupAdvice.vue Прегледај датотеку

@@ -202,6 +202,8 @@
202 202
       </el-form>
203 203
     </el-dialog>
204 204
 
205
+
206
+   <!-- 编辑选则医嘱模版 -->
205 207
     <el-dialog
206 208
       title="选择医嘱模板"
207 209
       :visible.sync="templateFormVisible"
@@ -331,6 +333,8 @@
331 333
         </el-button>
332 334
       </div>
333 335
     </el-dialog>
336
+
337
+
334 338
     <el-dialog
335 339
       title="选择医嘱模板"
336 340
       :visible.sync="oldTemplateFormVisible"
@@ -852,33 +856,6 @@ export default {
852 856
           this.nameForm.advice_name = arr[0]
853 857
        }
854 858
 
855
-      //  if(typeof(this.nameForm.advice_name) == "string"){
856
-         
857
-      //     this.nameForm.advice_name == this.nameForm.advice_name
858
-      // }
859
-
860
-      // if(typeof(this.nameForm.advice_name) == "number"){
861
-      //     var drug_name = ""
862
-      //     var name = ""
863
-      //     var way = 0
864
-      //     this.nameForm.drug_id = this.nameForm.advice_name
865
-      //     for(let i=0;i<this.medicals.length;i++){
866
-      //       if(this.nameForm.advice_name == this.medicals[i].id){
867
-      //         name = this.medicals[i].drug_name
868
-      //         way  = this.medicals[i].way
869
-      //       }
870
-      //     }
871
-      //     if(way == 1){
872
-      //       drug_name = name
873
-      //     }
874
-      //     if(way == 2){
875
-      //       var arr = name.split("(自备药)")
876
-      //       drug_name = arr[0]
877
-      //     }
878
-          
879
-      //     this.nameForm.advice_name = drug_name
880
-      //     this.nameForm.way = way
881
-      // }
882 859
       var _this = this;
883 860
       this.$refs[formName].validate(valid => {
884 861
         if (valid) {
@@ -1718,7 +1695,10 @@ export default {
1718 1695
         }
1719 1696
       }
1720 1697
     },
1698
+
1699
+
1721 1700
     newAddTempForm() {
1701
+      console.log("9999888")
1722 1702
       this.allSelectedTemplate = [];
1723 1703
       var thisRowKey = 0;
1724 1704
       for (const indexs in this.adviceTemplateMaps) {
@@ -1727,36 +1707,25 @@ export default {
1727 1707
           if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1728 1708
             thisRowKey++;
1729 1709
             var item = {
1730
-              advice_name:
1731
-                adviceTemplate.DoctorAdviceTemplate[index].advice_name,
1732
-              advice_desc:
1733
-                adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
1734
-              single_dose:
1735
-                "" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
1736
-              single_dose_unit:
1737
-                adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
1738
-              drug_spec:
1739
-                "" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
1740
-              drug_spec_unit:
1741
-                adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
1742
-              prescribing_number:
1743
-                "" +
1744
-                adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
1745
-              prescribing_number_unit:
1746
-                adviceTemplate.DoctorAdviceTemplate[index]
1747
-                  .prescribing_number_unit,
1748
-              delivery_way:
1749
-                adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1750
-              execution_frequency:
1751
-                adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1710
+              advice_name:adviceTemplate.DoctorAdviceTemplate[index].advice_name,
1711
+              advice_desc:adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
1712
+              single_dose:"" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
1713
+              single_dose_unit:adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
1714
+              drug_spec:"" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
1715
+              drug_spec_unit:adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
1716
+              prescribing_number:"" +adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
1717
+              prescribing_number_unit:adviceTemplate.DoctorAdviceTemplate[index].prescribing_number_unit,
1718
+              delivery_way:adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1719
+              execution_frequency:adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1752 1720
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1753 1721
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1754 1722
               day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
1755
-              frequency_type:
1756
-                adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
1723
+              frequency_type:adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
1757 1724
               week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
1758 1725
               template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
1759
-
1726
+              way:adviceTemplate.DoctorAdviceTemplate[index].way,
1727
+              drug_id:adviceTemplate.DoctorAdviceTemplate[index].drug_id,
1728
+              drug_name_id:adviceTemplate.DoctorAdviceTemplate[index].drug_name_id,
1760 1729
               isEdit: 0,
1761 1730
               id: 0,
1762 1731
               children: [],
@@ -1785,6 +1754,9 @@ export default {
1785 1754
                     children[key].prescribing_number_unit,
1786 1755
                   delivery_way: children[key].delivery_way,
1787 1756
                   execution_frequency: children[key].execution_frequency,
1757
+                  way:children[key].way,
1758
+                  drug_id:children[key].drug_id,
1759
+                  drug_name_id:children[key].drug_name_id,
1788 1760
                   isEdit: 0,
1789 1761
                   id: 0,
1790 1762
                   children: [],
@@ -1836,19 +1808,17 @@ export default {
1836 1808
           single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
1837 1809
           drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
1838 1810
           drug_spec_unit: this.allSelectedTemplate[index].drug_spec_unit,
1839
-          prescribing_number:
1840
-            "" + this.allSelectedTemplate[index].prescribing_number,
1841
-          prescribing_number_unit: this.allSelectedTemplate[index]
1842
-            .prescribing_number_unit,
1811
+          prescribing_number:"" + this.allSelectedTemplate[index].prescribing_number,
1812
+          prescribing_number_unit: this.allSelectedTemplate[index].prescribing_number_unit,
1843 1813
           delivery_way: this.allSelectedTemplate[index].delivery_way,
1844
-          execution_frequency: this.allSelectedTemplate[index]
1845
-            .execution_frequency,
1846
-
1814
+          execution_frequency: this.allSelectedTemplate[index].execution_frequency,
1847 1815
           day_count: this.allSelectedTemplate[index].day_count.toString(),
1848 1816
           frequency_type: this.allSelectedTemplate[index].frequency_type,
1849 1817
           week_days: this.allSelectedTemplate[index].week_days,
1850 1818
           template_id: this.allSelectedTemplate[index].template_id,
1851
-
1819
+          way:this.allSelectedTemplate[index].way,
1820
+          drug_id:this.allSelectedTemplate[index].drug_id,
1821
+          drug_name_id:this.allSelectedTemplate[index].drug_name_id,
1852 1822
           isEdit: 0,
1853 1823
           id: 0,
1854 1824
           children: [],
@@ -1872,6 +1842,9 @@ export default {
1872 1842
                 prescribing_number_unit: children[key].prescribing_number_unit,
1873 1843
                 delivery_way: children[key].delivery_way,
1874 1844
                 execution_frequency: children[key].execution_frequency,
1845
+                way:children[key].way,
1846
+                drug_id:children[key].drug_id,
1847
+                drug_name_id:children[key].drug_name_id,
1875 1848
                 isEdit: 0,
1876 1849
                 id: 0,
1877 1850
                 children: [],
@@ -1972,7 +1945,9 @@ export default {
1972 1945
               frequency_type: groups[index].frequency_type,
1973 1946
               week_day: groups[index].week_day,
1974 1947
               template_id: groups[index].template_id,
1975
-
1948
+              way:groups[index].way,
1949
+              drug_id:groups[index].drug_id,
1950
+              drug_name_id:groups[index].drug_name_id,
1976 1951
               isEdit: 0,
1977 1952
               index: 0,
1978 1953
               id: groups[index].id,
@@ -2000,6 +1975,9 @@ export default {
2000 1975
                   isEdit: 0,
2001 1976
                   index: 0,
2002 1977
                   id: childMap[item.id][key].id,
1978
+                  drug_id:childMap[item.id][key].drug_id,
1979
+                  way:childMap[item.id][key].way,
1980
+                  drug_name_id:childMap[item.id][key].drug_name_id,
2003 1981
                   children: [],
2004 1982
                   parent_row: item.row_key,
2005 1983
                   row_key: this.editRowKey
@@ -2508,6 +2486,9 @@ export default {
2508 2486
       },
2509 2487
       handleSelect1(){
2510 2488
         
2489
+      },
2490
+      handleSelect(){
2491
+
2511 2492
       },
2512 2493
 
2513 2494
        querySearch(queryString, cb) {

+ 1 - 1
src/xt_pages/user/doctorAdvice.vue Прегледај датотеку

@@ -2997,7 +2997,7 @@ export default {
2997 2997
         remark: groups[0].remark,
2998 2998
         groupno: groupno
2999 2999
       };
3000
-      console.log("2222",groups[0]);
3000
+      console.log("触发了吗----------",groups[0]);
3001 3001
 
3002 3002
       var childMap = {};
3003 3003
       for (const index in groups) {