|
@@ -55,21 +55,12 @@
|
55
|
55
|
</div>
|
56
|
56
|
<div class="NoData" v-show="advice_groups.length == 0">
|
57
|
57
|
<img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt />
|
58
|
|
-<<<<<<< .mine
|
59
|
|
- </div> -->
|
60
|
|
- <el-table :data="tableDate" border style="width: 100%">
|
61
|
|
- <el-table-column fixed label="开嘱医生" width="100">
|
62
|
|
- <template slot-scope="scope">
|
63
|
|
- {{doctor_map[scope.row.advice_doctor] != undefined ? doctor_map[scope.row.advice_doctor].name : ""}}
|
64
|
|
- </template>
|
65
|
|
-=======
|
66
|
58
|
</div>-->
|
67
|
59
|
<el-table :data="tableDate" border style="width: 100%">
|
68
|
60
|
<el-table-column fixed label="开嘱医生" width="100">
|
69
|
61
|
<template
|
70
|
62
|
slot-scope="scope"
|
71
|
63
|
>{{doctor_map[scope.row.advice_doctor] != undefined ? doctor_map[scope.row.advice_doctor].name : ""}}</template>
|
72
|
|
->>>>>>> .theirs
|
73
|
64
|
</el-table-column>
|
74
|
65
|
<el-table-column label="开始时间" width="100" type="index">
|
75
|
66
|
<template slot-scope="scope">{{parseTime(scope.row.start_time, "{m}-{d} {h}:{i}")}}</template>
|
|
@@ -102,16 +93,16 @@
|
102
|
93
|
</template>
|
103
|
94
|
|
104
|
95
|
<script>
|
105
|
|
-import { parseTime } from "@/utils";
|
|
96
|
+import { parseTime } from '@/utils'
|
106
|
97
|
|
107
|
98
|
export default {
|
108
|
|
- name: "statOrder",
|
109
|
|
- data() {
|
|
99
|
+ name: 'statOrder',
|
|
100
|
+ data () {
|
110
|
101
|
return {
|
111
|
|
- title: "临时医嘱 ",
|
|
102
|
+ title: '临时医嘱 ',
|
112
|
103
|
template_id: 0,
|
113
|
104
|
tableDate: []
|
114
|
|
- };
|
|
105
|
+ }
|
115
|
106
|
},
|
116
|
107
|
props: {
|
117
|
108
|
doctor_map: {
|
|
@@ -120,105 +111,94 @@ export default {
|
120
|
111
|
advice_groups: {
|
121
|
112
|
type: Array,
|
122
|
113
|
default: () => {
|
123
|
|
- return [];
|
|
114
|
+ return []
|
124
|
115
|
}
|
125
|
|
- },
|
|
116
|
+ }
|
126
|
117
|
},
|
127
|
118
|
|
128
|
119
|
methods: {
|
129
|
|
- setAdvices(advices) {
|
|
120
|
+ setAdvices (advices) {
|
130
|
121
|
if (advices == null) {
|
131
|
|
- advices = [];
|
|
122
|
+ advices = []
|
132
|
123
|
}
|
133
|
|
- this.tableDate.splice(0, this.tableDate.length);
|
134
|
|
- this.tableDate.push(...advices);
|
|
124
|
+ this.tableDate.splice(0, this.tableDate.length)
|
|
125
|
+ this.tableDate.push(...advices)
|
135
|
126
|
},
|
136
|
|
- parseTime(time, layout) {
|
|
127
|
+ parseTime (time, layout) {
|
137
|
128
|
if (time == 0) {
|
138
|
|
- return "";
|
|
129
|
+ return ''
|
139
|
130
|
}
|
140
|
|
- return parseTime(time, layout);
|
|
131
|
+ return parseTime(time, layout)
|
141
|
132
|
},
|
142
|
|
- createMedicalOrder(row) {
|
|
133
|
+ createMedicalOrder (row) {
|
143
|
134
|
if (row.parent_id > 0) {
|
144
|
|
- var spliceIndex = -1;
|
|
135
|
+ var spliceIndex = -1
|
145
|
136
|
for (let index = this.tableDate.length - 1; ; index--) {
|
146
|
137
|
if (this.tableDate[index].parent_id === row.parent_id) {
|
147
|
|
- spliceIndex = index;
|
148
|
|
- break;
|
|
138
|
+ spliceIndex = index
|
|
139
|
+ break
|
149
|
140
|
} else if (this.tableDate[index].id === row.parent_id) {
|
150
|
|
- spliceIndex = index;
|
151
|
|
- break;
|
|
141
|
+ spliceIndex = index
|
|
142
|
+ break
|
152
|
143
|
}
|
153
|
144
|
}
|
154
|
145
|
if (spliceIndex > -1) {
|
155
|
|
- spliceIndex += 1;
|
|
146
|
+ spliceIndex += 1
|
156
|
147
|
if (spliceIndex === this.tableDate.length) {
|
157
|
|
- this.tableDate.push(row);
|
|
148
|
+ this.tableDate.push(row)
|
158
|
149
|
} else {
|
159
|
|
- var swapData = this.tableDate.splice(spliceIndex);
|
160
|
|
- this.tableDate.push(row);
|
161
|
|
- this.tableDate = this.tableDate.concat(swapData);
|
|
150
|
+ var swapData = this.tableDate.splice(spliceIndex)
|
|
151
|
+ this.tableDate.push(row)
|
|
152
|
+ this.tableDate = this.tableDate.concat(swapData)
|
162
|
153
|
}
|
163
|
154
|
}
|
164
|
155
|
} else {
|
165
|
|
- this.tableDate.unshift(row);
|
|
156
|
+ this.tableDate.unshift(row)
|
166
|
157
|
}
|
167
|
158
|
},
|
168
|
|
- delMedicalOrder(row) {
|
|
159
|
+ delMedicalOrder (row) {
|
169
|
160
|
if (row.parent_id > 0) {
|
170
|
|
- var rslen = this.tableDate.length;
|
|
161
|
+ var rslen = this.tableDate.length
|
171
|
162
|
for (let i = 0; i < rslen; i++) {
|
172
|
163
|
if (this.tableDate[i].id == row.id) {
|
173
|
|
- this.tableDate.splice(i, 1);
|
174
|
|
- break;
|
|
164
|
+ this.tableDate.splice(i, 1)
|
|
165
|
+ break
|
175
|
166
|
}
|
176
|
167
|
}
|
177
|
168
|
} else {
|
178
|
|
- var resetTableData = this.tableDate;
|
179
|
|
- this.tableDate = [];
|
180
|
|
- var that = this;
|
181
|
|
- var rslen = resetTableData.length;
|
|
169
|
+ var resetTableData = this.tableDate
|
|
170
|
+ this.tableDate = []
|
|
171
|
+ var that = this
|
|
172
|
+ var rslen = resetTableData.length
|
182
|
173
|
for (let i = 0; i < rslen; i++) {
|
183
|
174
|
if (
|
184
|
175
|
resetTableData[i].id != row.id &&
|
185
|
176
|
resetTableData[i].parent_id != row.id
|
186
|
177
|
) {
|
187
|
|
- that.tableDate.push(resetTableData[i]);
|
|
178
|
+ that.tableDate.push(resetTableData[i])
|
188
|
179
|
}
|
189
|
180
|
}
|
190
|
181
|
}
|
191
|
182
|
},
|
192
|
|
- executionMedicalOrder(row) {
|
193
|
|
- var alen = this.tableDate.length;
|
|
183
|
+ executionMedicalOrder (row) {
|
|
184
|
+ var alen = this.tableDate.length
|
194
|
185
|
for (let index = 0; index < alen; index++) {
|
195
|
186
|
if (this.tableDate[index].id == row.id) {
|
196
|
|
- this.tableDate[index].execution_state = 1;
|
197
|
|
- this.tableDate[index].execution_staff = row.execution_staff;
|
198
|
|
- this.tableDate[index].execution_time = row.execution_time;
|
199
|
|
- this.tableDate[index].checker = row.checker;
|
200
|
|
- break;
|
|
187
|
+ this.tableDate[index].execution_state = 1
|
|
188
|
+ this.tableDate[index].execution_staff = row.execution_staff
|
|
189
|
+ this.tableDate[index].execution_time = row.execution_time
|
|
190
|
+ this.tableDate[index].checker = row.checker
|
|
191
|
+ break
|
201
|
192
|
}
|
202
|
193
|
}
|
203
|
194
|
}
|
204
|
195
|
},
|
205
|
|
-<<<<<<< .mine
|
206
|
196
|
created () {
|
207
|
197
|
this.template_id = this.$store.getters.user.template_info.template_id
|
208
|
198
|
console.log('this是什么东西', this.advice_groups)
|
209
|
|
-=======
|
210
|
|
- created() {
|
211
|
|
- this.template_id = this.$store.getters.user.template_info.template_id;
|
212
|
|
- console.log("this是什么东西", this.advice_groups);
|
213
|
|
->>>>>>> .theirs
|
214
|
199
|
}
|
215
|
|
-<<<<<<< .mine
|
216
|
|
-
|
217
|
200
|
}
|
218
|
|
-=======
|
219
|
|
-};
|
220
|
201
|
|
221
|
|
->>>>>>> .theirs
|
222
|
202
|
</script>
|
223
|
203
|
|
224
|
204
|
<style rel="stylesheet/scss" lang="scss" scoped>
|