XMLWAN 4 vuotta sitten
vanhempi
commit
a18f97ffdb

+ 42 - 61
src/xt_pages/user/components/EditGroupAdvice.vue Näytä tiedosto

202
       </el-form>
202
       </el-form>
203
     </el-dialog>
203
     </el-dialog>
204
 
204
 
205
+
206
+   <!-- 编辑选则医嘱模版 -->
205
     <el-dialog
207
     <el-dialog
206
       title="选择医嘱模板"
208
       title="选择医嘱模板"
207
       :visible.sync="templateFormVisible"
209
       :visible.sync="templateFormVisible"
331
         </el-button>
333
         </el-button>
332
       </div>
334
       </div>
333
     </el-dialog>
335
     </el-dialog>
336
+
337
+
334
     <el-dialog
338
     <el-dialog
335
       title="选择医嘱模板"
339
       title="选择医嘱模板"
336
       :visible.sync="oldTemplateFormVisible"
340
       :visible.sync="oldTemplateFormVisible"
852
           this.nameForm.advice_name = arr[0]
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
       var _this = this;
859
       var _this = this;
883
       this.$refs[formName].validate(valid => {
860
       this.$refs[formName].validate(valid => {
884
         if (valid) {
861
         if (valid) {
1718
         }
1695
         }
1719
       }
1696
       }
1720
     },
1697
     },
1698
+
1699
+
1721
     newAddTempForm() {
1700
     newAddTempForm() {
1701
+      console.log("9999888")
1722
       this.allSelectedTemplate = [];
1702
       this.allSelectedTemplate = [];
1723
       var thisRowKey = 0;
1703
       var thisRowKey = 0;
1724
       for (const indexs in this.adviceTemplateMaps) {
1704
       for (const indexs in this.adviceTemplateMaps) {
1727
           if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1707
           if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1728
             thisRowKey++;
1708
             thisRowKey++;
1729
             var item = {
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
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1720
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1753
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1721
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1754
               day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
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
               week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
1724
               week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
1758
               template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
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
               isEdit: 0,
1729
               isEdit: 0,
1761
               id: 0,
1730
               id: 0,
1762
               children: [],
1731
               children: [],
1785
                     children[key].prescribing_number_unit,
1754
                     children[key].prescribing_number_unit,
1786
                   delivery_way: children[key].delivery_way,
1755
                   delivery_way: children[key].delivery_way,
1787
                   execution_frequency: children[key].execution_frequency,
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
                   isEdit: 0,
1760
                   isEdit: 0,
1789
                   id: 0,
1761
                   id: 0,
1790
                   children: [],
1762
                   children: [],
1836
           single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
1808
           single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
1837
           drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
1809
           drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
1838
           drug_spec_unit: this.allSelectedTemplate[index].drug_spec_unit,
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
           delivery_way: this.allSelectedTemplate[index].delivery_way,
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
           day_count: this.allSelectedTemplate[index].day_count.toString(),
1815
           day_count: this.allSelectedTemplate[index].day_count.toString(),
1848
           frequency_type: this.allSelectedTemplate[index].frequency_type,
1816
           frequency_type: this.allSelectedTemplate[index].frequency_type,
1849
           week_days: this.allSelectedTemplate[index].week_days,
1817
           week_days: this.allSelectedTemplate[index].week_days,
1850
           template_id: this.allSelectedTemplate[index].template_id,
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
           isEdit: 0,
1822
           isEdit: 0,
1853
           id: 0,
1823
           id: 0,
1854
           children: [],
1824
           children: [],
1872
                 prescribing_number_unit: children[key].prescribing_number_unit,
1842
                 prescribing_number_unit: children[key].prescribing_number_unit,
1873
                 delivery_way: children[key].delivery_way,
1843
                 delivery_way: children[key].delivery_way,
1874
                 execution_frequency: children[key].execution_frequency,
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
                 isEdit: 0,
1848
                 isEdit: 0,
1876
                 id: 0,
1849
                 id: 0,
1877
                 children: [],
1850
                 children: [],
1972
               frequency_type: groups[index].frequency_type,
1945
               frequency_type: groups[index].frequency_type,
1973
               week_day: groups[index].week_day,
1946
               week_day: groups[index].week_day,
1974
               template_id: groups[index].template_id,
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
               isEdit: 0,
1951
               isEdit: 0,
1977
               index: 0,
1952
               index: 0,
1978
               id: groups[index].id,
1953
               id: groups[index].id,
2000
                   isEdit: 0,
1975
                   isEdit: 0,
2001
                   index: 0,
1976
                   index: 0,
2002
                   id: childMap[item.id][key].id,
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
                   children: [],
1981
                   children: [],
2004
                   parent_row: item.row_key,
1982
                   parent_row: item.row_key,
2005
                   row_key: this.editRowKey
1983
                   row_key: this.editRowKey
2508
       },
2486
       },
2509
       handleSelect1(){
2487
       handleSelect1(){
2510
         
2488
         
2489
+      },
2490
+      handleSelect(){
2491
+
2511
       },
2492
       },
2512
 
2493
 
2513
        querySearch(queryString, cb) {
2494
        querySearch(queryString, cb) {

+ 1 - 1
src/xt_pages/user/doctorAdvice.vue Näytä tiedosto

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