zhengchengwu 5 年之前
父節點
當前提交
ed45b248ce

+ 8 - 0
src/api/advice.js 查看文件

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
 

二進制
src/assets/img/data.jpg 查看文件


+ 8 - 0
src/styles/index.scss 查看文件

293
 .el-dialog__body{
293
 .el-dialog__body{
294
   padding: 10px 20px !important;
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 查看文件

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

1319
         let tempPrescribingNumberDesc = ""
1319
         let tempPrescribingNumberDesc = ""
1320
 
1320
 
1321
         if(row.single_dose){
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
         // if(row.drug_spec){
1324
         // if(row.drug_spec){
1325
         //   tempDrugSpecDesc = "  "+row.drug_spec + "" + row.drug_spec_unit
1325
         //   tempDrugSpecDesc = "  "+row.drug_spec + "" + row.drug_spec_unit
1330
 
1330
 
1331
         if(isChild == 1){ //不是子药
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
         }else{ //是子药
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 查看文件

23
           <span >{{advice.advice_desc}}</span>
23
           <span >{{advice.advice_desc}}</span>
24
           <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
24
           <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
25
           <span v-if="advice.prescribing_number">* {{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
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
           <span >{{advice.delivery_way}}</span>
27
           <span >{{advice.delivery_way}}</span>
28
           <span >{{advice.execution_frequency}}</span>
28
           <span >{{advice.execution_frequency}}</span>
29
         </td>
29
         </td>

+ 2 - 2
src/xt_pages/user/doctorAdvice.vue 查看文件

735
                                 <span >{{advice.advice_desc}}</span>
735
                                 <span >{{advice.advice_desc}}</span>
736
                                 <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
736
                                 <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
737
                                 <span v-if="advice.prescribing_number">*{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
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
                                 <span >{{advice.delivery_way}}</span>
739
                                 <span >{{advice.delivery_way}}</span>
740
                                 <span >{{advice.execution_frequency}}</span>
740
                                 <span >{{advice.execution_frequency}}</span>
741
                         </td>
741
                         </td>
844
                                 <span >{{advice.advice_desc}}</span>
844
                                 <span >{{advice.advice_desc}}</span>
845
                                 <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
845
                                 <!-- <span v-if="advice.drug_spec">{{advice.drug_spec}}{{advice.drug_spec_unit}}</span> -->
846
                                 <span v-if="advice.prescribing_number">*{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
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
                                 <span >{{advice.delivery_way}}</span>
848
                                 <span >{{advice.delivery_way}}</span>
849
                                 <span >{{advice.execution_frequency}}</span>
849
                                 <span >{{advice.execution_frequency}}</span>
850
                         </td>
850
                         </td>