|
@@ -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">  {{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
|
};
|