|
@@ -515,7 +515,7 @@
|
515
|
515
|
<el-col :span="24">
|
516
|
516
|
<el-form-item :label="edit_advice_name" required prop="advice_name">
|
517
|
517
|
<!-- <el-input v-model="templateFormEdit.advice_name"></el-input> -->
|
518
|
|
- <el-select
|
|
518
|
+ <!-- <el-select
|
519
|
519
|
v-model="templateFormEdit.advice_name"
|
520
|
520
|
filterable
|
521
|
521
|
clearable
|
|
@@ -530,7 +530,16 @@
|
530
|
530
|
:label="item.drug_name"
|
531
|
531
|
:value="item.drug_name"
|
532
|
532
|
></el-option>
|
533
|
|
- </el-select>
|
|
533
|
+ </el-select> -->
|
|
534
|
+ <el-autocomplete
|
|
535
|
+ style="width:100%;"
|
|
536
|
+ class="inline-input"
|
|
537
|
+ v-model="templateFormEdit.advice_name"
|
|
538
|
+ :fetch-suggestions="querySearch"
|
|
539
|
+ placeholder="请输入内容"
|
|
540
|
+ @select="handleSelect"
|
|
541
|
+ @input="changeDrugNameTwo"
|
|
542
|
+ ></el-autocomplete>
|
534
|
543
|
</el-form-item>
|
535
|
544
|
</el-col>
|
536
|
545
|
<el-col :span="15">
|
|
@@ -538,7 +547,7 @@
|
538
|
547
|
<el-form-item label="药品规格 :" prop="advice_desc">
|
539
|
548
|
<el-col :span="8">
|
540
|
549
|
<!-- <el-input v-model="templateFormEdit.advice_desc"></el-input> -->
|
541
|
|
- <el-select
|
|
550
|
+ <!-- <el-select
|
542
|
551
|
v-model="templateFormEdit.advice_desc"
|
543
|
552
|
filterable
|
544
|
553
|
clearable
|
|
@@ -553,7 +562,17 @@
|
553
|
562
|
:label="item.drug_spec"
|
554
|
563
|
:value="item.drug_spec"
|
555
|
564
|
></el-option>
|
556
|
|
- </el-select>
|
|
565
|
+ </el-select> -->
|
|
566
|
+
|
|
567
|
+ <el-autocomplete
|
|
568
|
+ style="width:100px;"
|
|
569
|
+ class="inline-input"
|
|
570
|
+ v-model="templateFormEdit.advice_desc"
|
|
571
|
+ :fetch-suggestions="querySearch1"
|
|
572
|
+ placeholder="请输入内容"
|
|
573
|
+ @select="handleSelect1"
|
|
574
|
+ @input="changeDrugDescTwo"
|
|
575
|
+ ></el-autocomplete>
|
557
|
576
|
</el-col>
|
558
|
577
|
<el-col class="line" :span="1"> </el-col>
|
559
|
578
|
<el-col :span="14">
|
|
@@ -787,7 +806,7 @@
|
787
|
806
|
<el-col :span="24">
|
788
|
807
|
<el-form-item label="医嘱内容 :" required prop="advice_name">
|
789
|
808
|
<!-- <el-input v-model="templateForm.advice_name"></el-input> -->
|
790
|
|
- <el-select
|
|
809
|
+ <!-- <el-select
|
791
|
810
|
v-model="templateForm.advice_name"
|
792
|
811
|
filterable
|
793
|
812
|
clearable
|
|
@@ -802,7 +821,17 @@
|
802
|
821
|
:label="item.drug_name"
|
803
|
822
|
:value="item.drug_name"
|
804
|
823
|
></el-option>
|
805
|
|
- </el-select>
|
|
824
|
+ </el-select> -->
|
|
825
|
+
|
|
826
|
+ <el-autocomplete
|
|
827
|
+ style="width:100%;"
|
|
828
|
+ class="inline-input"
|
|
829
|
+ v-model="templateForm.advice_name"
|
|
830
|
+ :fetch-suggestions="querySearch"
|
|
831
|
+ placeholder="请输入内容"
|
|
832
|
+ @select="handleSelect"
|
|
833
|
+ @input="changeDrugName"
|
|
834
|
+ ></el-autocomplete>
|
806
|
835
|
</el-form-item>
|
807
|
836
|
</el-col>
|
808
|
837
|
<el-col :span="12">
|
|
@@ -810,7 +839,7 @@
|
810
|
839
|
<el-form-item label="药品规格 :" prop="advice_desc">
|
811
|
840
|
<el-col :span="9">
|
812
|
841
|
<!-- <el-input v-model="templateForm.advice_desc"></el-input> -->
|
813
|
|
- <el-select
|
|
842
|
+ <!-- <el-select
|
814
|
843
|
v-model="templateForm.advice_desc"
|
815
|
844
|
filterable
|
816
|
845
|
clearable
|
|
@@ -824,7 +853,17 @@
|
824
|
853
|
:label="item.drug_spec"
|
825
|
854
|
:value="item.drug_spec"
|
826
|
855
|
></el-option>
|
827
|
|
- </el-select>
|
|
856
|
+ </el-select> -->
|
|
857
|
+
|
|
858
|
+ <el-autocomplete
|
|
859
|
+ style="width:100px;"
|
|
860
|
+ class="inline-input"
|
|
861
|
+ v-model="templateForm.advice_desc"
|
|
862
|
+ :fetch-suggestions="querySearch1"
|
|
863
|
+ placeholder="请输入内容"
|
|
864
|
+ @select="handleSelect1"
|
|
865
|
+ @input="changeDrugDesc"
|
|
866
|
+ ></el-autocomplete>
|
828
|
867
|
</el-col>
|
829
|
868
|
<el-col class="line" :span="1"> </el-col>
|
830
|
869
|
<el-col :span="14">
|
|
@@ -1395,8 +1434,8 @@
|
1395
|
1434
|
delivery_way: '',
|
1396
|
1435
|
execution_frequency: '',
|
1397
|
1436
|
id: 0,
|
1398
|
|
- drug_id:"",
|
1399
|
|
- way:""
|
|
1437
|
+ drug_id:0,
|
|
1438
|
+ way:0
|
1400
|
1439
|
},
|
1401
|
1440
|
dialogConfigVisible:false,
|
1402
|
1441
|
templateFormEdit: {
|
|
@@ -1463,7 +1502,7 @@
|
1463
|
1502
|
current_drug_spec: "",
|
1464
|
1503
|
drug_id: 0,
|
1465
|
1504
|
src_type:"",
|
1466
|
|
- way:""
|
|
1505
|
+ way:0
|
1467
|
1506
|
}
|
1468
|
1507
|
},
|
1469
|
1508
|
created() {
|
|
@@ -2153,8 +2192,8 @@
|
2153
|
2192
|
|
2154
|
2193
|
//编辑医嘱
|
2155
|
2194
|
submitEditTemplate(formName) {
|
2156
|
|
-
|
2157
|
|
- var drug_id = ""
|
|
2195
|
+
|
|
2196
|
+ var drug_id = 0
|
2158
|
2197
|
for(let i=0;i<this.all_drug.length;i++){
|
2159
|
2198
|
if(this.templateFormEdit.advice_name == this.all_drug[i].drug_name){
|
2160
|
2199
|
drug_id = this.all_drug[i].id
|
|
@@ -2162,13 +2201,14 @@
|
2162
|
2201
|
}
|
2163
|
2202
|
this.templateFormEdit.drug_id = drug_id
|
2164
|
2203
|
|
2165
|
|
-
|
|
2204
|
+ console.log("2222",this.templateFormEdit)
|
2166
|
2205
|
this.$refs[formName].validate(valid => {
|
|
2206
|
+
|
2167
|
2207
|
this.templateFormEdit.single_dose = parseFloat(this.templateFormEdit.single_dose)
|
2168
|
2208
|
this.templateFormEdit.prescribing_number = parseFloat(this.templateFormEdit.prescribing_number)
|
2169
|
2209
|
|
2170
|
2210
|
if (isNaN(this.templateFormEdit.single_dose)) {
|
2171
|
|
- this.templateFormEdit.single_dose = 0
|
|
2211
|
+ this.templateFormEdit.single_dose = 0
|
2172
|
2212
|
}
|
2173
|
2213
|
if (isNaN(this.templateFormEdit.prescribing_number)) {
|
2174
|
2214
|
this.templateFormEdit.prescribing_number = 0
|
|
@@ -2847,7 +2887,38 @@
|
2847
|
2887
|
}
|
2848
|
2888
|
}
|
2849
|
2889
|
},
|
|
2890
|
+
|
2850
|
2891
|
|
|
2892
|
+ querySearch(queryString, cb) {
|
|
2893
|
+ console.log('queryString',queryString)
|
|
2894
|
+ var restaurants = this.all_drug;
|
|
2895
|
+ restaurants.map(item => {
|
|
2896
|
+ item.value = item.drug_name
|
|
2897
|
+ })
|
|
2898
|
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
|
2899
|
+ // 调用 callback 返回建议列表的数据
|
|
2900
|
+ console.log('results',results)
|
|
2901
|
+ cb(results);
|
|
2902
|
+ },
|
|
2903
|
+
|
|
2904
|
+ createFilter(queryString) {
|
|
2905
|
+ return (restaurant) => {
|
|
2906
|
+ return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
|
2907
|
+ };
|
|
2908
|
+ },
|
|
2909
|
+
|
|
2910
|
+ querySearch1(queryString, cb) {
|
|
2911
|
+ console.log('queryString',queryString)
|
|
2912
|
+ var restaurants = this.drugSpec;
|
|
2913
|
+ console.log(restaurants)
|
|
2914
|
+ restaurants.map(item => {
|
|
2915
|
+ item.value = item.drug_spec
|
|
2916
|
+ })
|
|
2917
|
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
|
2918
|
+ // 调用 callback 返回建议列表的数据
|
|
2919
|
+ console.log('results',results)
|
|
2920
|
+ cb(results);
|
|
2921
|
+ },
|
2851
|
2922
|
}
|
2852
|
2923
|
}
|
2853
|
2924
|
</script>
|