zhengchengwu 5 years ago
parent
commit
ed45b248ce

+ 8 - 0
src/api/advice.js View File

@@ -245,6 +245,14 @@ export function CreateSubAdvice(params){
245 245
 }
246 246
 
247 247
 
248
+export function updateTemplateName(params) {
249
+  return request({
250
+    url: '/api/template/modify',
251
+    method: 'post',
252
+    params: params
253
+  })
254
+}
255
+
248 256
 
249 257
 
250 258
 

BIN
src/assets/img/data.jpg View File


+ 8 - 0
src/styles/index.scss View File

@@ -293,3 +293,11 @@ code {
293 293
 .el-dialog__body{
294 294
   padding: 10px 20px !important;
295 295
 }
296
+
297
+.NoData{
298
+  width: 200px;
299
+  margin:  0 auto;
300
+  img{
301
+    width: 100%;
302
+  }
303
+}

+ 54 - 30
src/xt_pages/data/druguseTemplate.vue View File

@@ -135,12 +135,14 @@
135 135
                   size="mini"
136 136
                   v-if="isShow(scope.$index, scope.row)"
137 137
                   @click="handleUpdateAdviceTemplate(scope.row, scope.$index)"
138
-                >编辑</el-button>
138
+                >编辑
139
+                </el-button>
139 140
                 <el-button
140 141
                   size="mini"
141 142
                   type="danger"
142 143
                   @click="handleDeleteAdviceTemplate(scope.row, scope.$index)"
143
-                >  删除</el-button>
144
+                > 删除
145
+                </el-button>
144 146
               </template>
145 147
             </el-table-column>
146 148
 
@@ -227,8 +229,8 @@
227 229
                 </el-col>
228 230
                 <el-col :span="12">
229 231
 
230
-                  <el-form-item label="规格"  prop="advice_desc">
231
-                    <el-input v-model="templateForm.advice_desc" ></el-input>
232
+                  <el-form-item label="规格" prop="advice_desc">
233
+                    <el-input v-model="templateForm.advice_desc"></el-input>
232 234
                   </el-form-item>
233 235
 
234 236
 
@@ -366,9 +368,9 @@
366 368
 
367 369
                 </el-col>
368 370
                 <el-col :span="12">
369
-                <el-form-item label="规格"  prop="advice_desc">
370
-                  <el-input v-model="templateFormEdit.advice_desc" ></el-input>
371
-                </el-form-item>
371
+                  <el-form-item label="规格" prop="advice_desc">
372
+                    <el-input v-model="templateFormEdit.advice_desc"></el-input>
373
+                  </el-form-item>
372 374
                   <!-- <el-form-item label="药品规格 :" prop="drug_spec">
373 375
                     <el-col :span="8">
374 376
                       <el-input v-model="templateFormEdit.drug_spec"></el-input>
@@ -495,7 +497,7 @@
495 497
             <div>
496 498
               <el-form ref="form" :model="form" :rule="formRules" label-width="100px">
497 499
                 <el-form-item label="模版名称" style="width: 300px" prop="name">
498
-                  <el-input disabled :value="current_template_name" ></el-input>
500
+                  <el-input v-model="form.name" ></el-input>
499 501
                 </el-form-item>
500 502
               </el-form>
501 503
 
@@ -508,7 +510,7 @@
508 510
 
509 511
 
510 512
               <el-table ref="table" :data="adviceTableDataTwo" border highlight-current-row max-height="300">
511
-                <el-table-column label="医嘱内容"  >
513
+                <el-table-column label="医嘱内容">
512 514
                   <template slot-scope="scope">
513 515
                     <span v-if="scope.row.parent_id == 0">{{scope.row.advice_name}}</span>
514 516
                     <span v-if="scope.row.parent_id > 0"> &emsp;{{scope.row.advice_name}}</span>
@@ -548,7 +550,7 @@
548 550
             </div>
549 551
             <div slot="footer" class="dialog-footer">
550 552
               <el-button @click="cancelTableHandleTwo">取消</el-button>
551
-              <el-button type="primary" @click="cancelTableHandleTwo">确 定</el-button>
553
+              <el-button type="primary" @click="modifyTemplateName">确 定</el-button>
552 554
             </div>
553 555
           </el-dialog>
554 556
           <el-dialog title="新增医嘱" :visible.sync="templateFormTwoVisible" width="700px">
@@ -565,7 +567,7 @@
565 567
               <el-row>
566 568
                 <el-col :span="12">
567 569
                   <el-form-item label="规格 :" required prop="advice_desc">
568
-                    <el-input v-model="templateForm.advice_desc" ></el-input>
570
+                    <el-input v-model="templateForm.advice_desc"></el-input>
569 571
                   </el-form-item>
570 572
                   <!-- <el-form-item label="药品规格 :" prop="drug_spec">
571 573
                     <el-col :span="8">
@@ -960,6 +962,7 @@
960 962
 
961 963
 <style>
962 964
   @import "../../../static/css/table_row.css";
965
+
963 966
   .tab-container {
964 967
     margin: 30px;
965 968
   }
@@ -987,7 +990,8 @@
987 990
     UpdateAdviceTemplate,
988 991
     UpdateDrugDic,
989 992
     UpdateDrugWay,
990
-    UpdateExecutionFrequency
993
+    UpdateExecutionFrequency,
994
+    updateTemplateName,
991 995
   } from "@/api/advice";
992 996
 
993 997
   import {getDataConfig} from '@/utils/data';
@@ -1002,10 +1006,10 @@
1002 1006
         currentObject: {},
1003 1007
         tempArr: [],
1004 1008
         sameRowArr: [],
1005
-        advice_content_name:"",
1009
+        advice_content_name: "",
1006 1010
         table_current_index: -1,
1007 1011
         adviceTableData: [],
1008
-        templateName:"",
1012
+        templateName: "",
1009 1013
         adviceTableDataTwo: [],
1010 1014
         table_current_index_two: -1,
1011 1015
         currentIndex: -1,
@@ -1019,7 +1023,7 @@
1019 1023
         templateFormVisible: false,
1020 1024
         templateTableTwoVisible: false,
1021 1025
         templateEditFormVisible: false,
1022
-        edit_advice_name:"",
1026
+        edit_advice_name: "",
1023 1027
         templateTableVisible: false,
1024 1028
         templateFormTwoVisible: false,
1025 1029
         templateEditFormTwoVisible: false,
@@ -1180,7 +1184,7 @@
1180 1184
       },
1181 1185
       newRecordAction() {
1182 1186
         this.dialogTitle = "新增医嘱内容"
1183
-        this.advice_content_name ="医嘱内容"
1187
+        this.advice_content_name = "医嘱内容"
1184 1188
         this.isEdit = false;
1185 1189
         this.parent_id = 0;
1186 1190
         this.isAddChild = false
@@ -2014,7 +2018,7 @@
2014 2018
         }
2015 2019
       }, cellMouseEnter: function (row, column, cell, event) {
2016 2020
 
2017
-        if(column.label == "模版名称"){
2021
+        if (column.label == "模版名称") {
2018 2022
           this.sameRowArr.forEach((arr, i) => {
2019 2023
             if (arr.indexOf(row.index) != -1) {
2020 2024
               this.hoverOrderArr = arr
@@ -2022,7 +2026,7 @@
2022 2026
           })
2023 2027
 
2024 2028
 
2025
-        }else if(column.label == "操作"){
2029
+        } else if (column.label == "操作") {
2026 2030
           this.sameRowArr.forEach((arr, i) => {
2027 2031
             if (arr.indexOf(row.index) != -1) {
2028 2032
               this.hoverOrderArr = arr
@@ -2030,20 +2034,18 @@
2030 2034
           })
2031 2035
 
2032 2036
 
2033
-        }else{
2037
+        } else {
2034 2038
 
2035 2039
           this.hoverOrderArr = []
2036 2040
 
2037 2041
 
2038
-
2039 2042
         }
2040 2043
 
2041 2044
 
2042
-
2043 2045
       }, cellMouseLeave: function (row, column, cell, event) {
2044 2046
         this.hoverOrderArr = []
2045 2047
       }, openEdit(index, row) {
2046
-        this.hoverOrderArr =  []
2048
+        this.hoverOrderArr = []
2047 2049
         this.currentIndex = index
2048 2050
         this.templateFormEdit.drug_spec_unit = row.drug_spec_unit
2049 2051
         this.templateFormEdit.drug_spec = row.drug_spec
@@ -2058,10 +2060,10 @@
2058 2060
         this.templateFormEdit.id = row.id
2059 2061
         this.templateFormEdit.parent_id = row.parent_id
2060 2062
         this.templateEditFormVisible = true
2061
-        if(row.parent_id > 0){
2063
+        if (row.parent_id > 0) {
2062 2064
           this.editDialogTitle = "编辑子药"
2063 2065
           this.edit_advice_name = "子药名称"
2064
-        }else{
2066
+        } else {
2065 2067
 
2066 2068
           this.editDialogTitle = "编辑医嘱"
2067 2069
           this.edit_advice_name = "医嘱内容"
@@ -2129,7 +2131,7 @@
2129 2131
           });
2130 2132
         }).catch(() => {
2131 2133
         });
2132
-      },openDeleteChild(index, row){
2134
+      }, openDeleteChild(index, row) {
2133 2135
         this.hoverOrderArr = []
2134 2136
 
2135 2137
         this.$confirm('删除子药', '是否删除该子药', {
@@ -2259,17 +2261,39 @@
2259 2261
       }, handleUpdateAdviceTemplate(row, index) {
2260 2262
         this.current_template_id = row.template_id
2261 2263
         this.current_template_name = row.name
2264
+        this.form.name = row.name
2262 2265
         this.templateTableTwoVisible = true;
2263 2266
         this.adviceTableDataTwo = []
2264
-        for (let i = 0; i < this.adviceTemplates.length; i++){
2265
-          if(this.adviceTemplates[i].template_id == row.template_id){
2267
+        for (let i = 0; i < this.adviceTemplates.length; i++) {
2268
+          if (this.adviceTemplates[i].template_id == row.template_id) {
2266 2269
             this.adviceTableDataTwo.push(this.adviceTemplates[i]);
2267 2270
           }
2268 2271
         }
2272
+      }, modifyTemplateName() {
2273
+        let params = {
2274
+          template_name: this.form.name,
2275
+          template_id: this.current_template_id,
2276
+        }
2277
+        updateTemplateName(params).then(response => {
2278
+          if (response.data.state == 0) {
2279
+            this.$message.error(response.data.msg);
2280
+            return false;
2281
+          } else {
2282
+            this.$notify({
2283
+              title: "成功",
2284
+              message: "修改成功",
2285
+              type: "success",
2286
+              duration: 2000
2287
+            });
2288
+            this.templateTableTwoVisible = false;
2269 2289
 
2270
-
2271
-
2272
-
2290
+            for (let i = 0; i < this.adviceTemplates.length; i++) {
2291
+                if(this.adviceTemplates[i].template_id == this.current_template_id){
2292
+                  this.adviceTemplates[i].name = response.data.data.template_name
2293
+                }
2294
+            }
2295
+          }
2296
+        });
2273 2297
       }
2274 2298
     }
2275 2299
   };

+ 3 - 3
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

@@ -1319,7 +1319,7 @@
1319 1319
         let tempPrescribingNumberDesc = ""
1320 1320
 
1321 1321
         if(row.single_dose){
1322
-          tempSingleDoseDesc ="  "+row.single_dose + "" + row.single_dose_unit
1322
+          tempSingleDoseDesc =' 单次用量 '+"  "+row.single_dose + "" + row.single_dose_unit
1323 1323
         }
1324 1324
         // if(row.drug_spec){
1325 1325
         //   tempDrugSpecDesc = "  "+row.drug_spec + "" + row.drug_spec_unit
@@ -1330,12 +1330,12 @@
1330 1330
 
1331 1331
         if(isChild == 1){ //不是子药
1332 1332
 
1333
-          return row.advice_name + row.advice_desc+tempDrugSpecDesc+tempPrescribingNumberDesc+ ' 单次用量 ' +tempSingleDoseDesc+" "+row.delivery_way+" "+row.execution_frequency
1333
+          return row.advice_name + row.advice_desc+tempDrugSpecDesc+tempPrescribingNumberDesc +tempSingleDoseDesc+" "+row.delivery_way+" "+row.execution_frequency
1334 1334
 
1335 1335
         }else{ //是子药
1336 1336
 
1337 1337
 
1338
-          return row.advice_name + row.advice_desc+tempDrugSpecDesc+tempPrescribingNumberDesc+' 单次用量 ' +tempSingleDoseDesc
1338
+          return row.advice_name + row.advice_desc+tempDrugSpecDesc+tempPrescribingNumberDesc + tempSingleDoseDesc
1339 1339
         }
1340 1340
 
1341 1341
 

+ 1 - 1
src/xt_pages/dialysis/details/statOrder.vue View File

@@ -23,7 +23,7 @@
23 23
           <span >{{advice.advice_desc}}</span>
24 24
           <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
25 25
           <span v-if="advice.prescribing_number">* {{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
26
-          <span v-if="advice.single_dose">单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
26
+          <span v-if="advice.single_dose != 0">单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
27 27
           <span >{{advice.delivery_way}}</span>
28 28
           <span >{{advice.execution_frequency}}</span>
29 29
         </td>

+ 2 - 2
src/xt_pages/user/doctorAdvice.vue View File

@@ -735,7 +735,7 @@
735 735
                                 <span >{{advice.advice_desc}}</span>
736 736
                                 <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
737 737
                                 <span v-if="advice.prescribing_number">*{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
738
-                                <span v-if="advice.single_dose">单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
738
+                                <span v-if="advice.single_dose != 0"> 单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
739 739
                                 <span >{{advice.delivery_way}}</span>
740 740
                                 <span >{{advice.execution_frequency}}</span>
741 741
                         </td>
@@ -844,7 +844,7 @@
844 844
                                 <span >{{advice.advice_desc}}</span>
845 845
                                 <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
846 846
                                 <span v-if="advice.prescribing_number">*{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
847
-                                <span v-if="advice.single_dose">单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
847
+                                <span v-if="advice.single_dose != 0">单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
848 848
                                 <span >{{advice.delivery_way}}</span>
849 849
                                 <span >{{advice.execution_frequency}}</span>
850 850
                         </td>