|
@@ -93,16 +93,16 @@
|
93
|
93
|
</template>
|
94
|
94
|
|
95
|
95
|
<script>
|
96
|
|
-import { parseTime } from "@/utils";
|
|
96
|
+import { parseTime } from '@/utils'
|
97
|
97
|
|
98
|
98
|
export default {
|
99
|
|
- name: "statOrder",
|
100
|
|
- data() {
|
|
99
|
+ name: 'statOrder',
|
|
100
|
+ data () {
|
101
|
101
|
return {
|
102
|
|
- title: "临时医嘱 ",
|
|
102
|
+ title: '临时医嘱 ',
|
103
|
103
|
template_id: 0,
|
104
|
104
|
tableDate: []
|
105
|
|
- };
|
|
105
|
+ }
|
106
|
106
|
},
|
107
|
107
|
props: {
|
108
|
108
|
doctor_map: {
|
|
@@ -111,93 +111,94 @@ export default {
|
111
|
111
|
advice_groups: {
|
112
|
112
|
type: Array,
|
113
|
113
|
default: () => {
|
114
|
|
- return [];
|
|
114
|
+ return []
|
115
|
115
|
}
|
116
|
116
|
}
|
117
|
117
|
},
|
118
|
118
|
|
119
|
119
|
methods: {
|
120
|
|
- setAdvices(advices) {
|
|
120
|
+ setAdvices (advices) {
|
121
|
121
|
if (advices == null) {
|
122
|
|
- advices = [];
|
|
122
|
+ advices = []
|
123
|
123
|
}
|
124
|
|
- this.tableDate.splice(0, this.tableDate.length);
|
125
|
|
- this.tableDate.push(...advices);
|
|
124
|
+ this.tableDate.splice(0, this.tableDate.length)
|
|
125
|
+ this.tableDate.push(...advices)
|
126
|
126
|
},
|
127
|
|
- parseTime(time, layout) {
|
|
127
|
+ parseTime (time, layout) {
|
128
|
128
|
if (time == 0) {
|
129
|
|
- return "";
|
|
129
|
+ return ''
|
130
|
130
|
}
|
131
|
|
- return parseTime(time, layout);
|
|
131
|
+ return parseTime(time, layout)
|
132
|
132
|
},
|
133
|
|
- createMedicalOrder(row) {
|
|
133
|
+ createMedicalOrder (row) {
|
134
|
134
|
if (row.parent_id > 0) {
|
135
|
|
- var spliceIndex = -1;
|
|
135
|
+ var spliceIndex = -1
|
136
|
136
|
for (let index = this.tableDate.length - 1; ; index--) {
|
137
|
137
|
if (this.tableDate[index].parent_id === row.parent_id) {
|
138
|
|
- spliceIndex = index;
|
139
|
|
- break;
|
|
138
|
+ spliceIndex = index
|
|
139
|
+ break
|
140
|
140
|
} else if (this.tableDate[index].id === row.parent_id) {
|
141
|
|
- spliceIndex = index;
|
142
|
|
- break;
|
|
141
|
+ spliceIndex = index
|
|
142
|
+ break
|
143
|
143
|
}
|
144
|
144
|
}
|
145
|
145
|
if (spliceIndex > -1) {
|
146
|
|
- spliceIndex += 1;
|
|
146
|
+ spliceIndex += 1
|
147
|
147
|
if (spliceIndex === this.tableDate.length) {
|
148
|
|
- this.tableDate.push(row);
|
|
148
|
+ this.tableDate.push(row)
|
149
|
149
|
} else {
|
150
|
|
- var swapData = this.tableDate.splice(spliceIndex);
|
151
|
|
- this.tableDate.push(row);
|
152
|
|
- 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)
|
153
|
153
|
}
|
154
|
154
|
}
|
155
|
155
|
} else {
|
156
|
|
- this.tableDate.unshift(row);
|
|
156
|
+ this.tableDate.unshift(row)
|
157
|
157
|
}
|
158
|
158
|
},
|
159
|
|
- delMedicalOrder(row) {
|
|
159
|
+ delMedicalOrder (row) {
|
160
|
160
|
if (row.parent_id > 0) {
|
161
|
|
- var rslen = this.tableDate.length;
|
|
161
|
+ var rslen = this.tableDate.length
|
162
|
162
|
for (let i = 0; i < rslen; i++) {
|
163
|
163
|
if (this.tableDate[i].id == row.id) {
|
164
|
|
- this.tableDate.splice(i, 1);
|
165
|
|
- break;
|
|
164
|
+ this.tableDate.splice(i, 1)
|
|
165
|
+ break
|
166
|
166
|
}
|
167
|
167
|
}
|
168
|
168
|
} else {
|
169
|
|
- var resetTableData = this.tableDate;
|
170
|
|
- this.tableDate = [];
|
171
|
|
- var that = this;
|
172
|
|
- var rslen = resetTableData.length;
|
|
169
|
+ var resetTableData = this.tableDate
|
|
170
|
+ this.tableDate = []
|
|
171
|
+ var that = this
|
|
172
|
+ var rslen = resetTableData.length
|
173
|
173
|
for (let i = 0; i < rslen; i++) {
|
174
|
174
|
if (
|
175
|
175
|
resetTableData[i].id != row.id &&
|
176
|
176
|
resetTableData[i].parent_id != row.id
|
177
|
177
|
) {
|
178
|
|
- that.tableDate.push(resetTableData[i]);
|
|
178
|
+ that.tableDate.push(resetTableData[i])
|
179
|
179
|
}
|
180
|
180
|
}
|
181
|
181
|
}
|
182
|
182
|
},
|
183
|
|
- executionMedicalOrder(row) {
|
184
|
|
- var alen = this.tableDate.length;
|
|
183
|
+ executionMedicalOrder (row) {
|
|
184
|
+ var alen = this.tableDate.length
|
185
|
185
|
for (let index = 0; index < alen; index++) {
|
186
|
186
|
if (this.tableDate[index].id == row.id) {
|
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;
|
|
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
|
192
|
192
|
}
|
193
|
193
|
}
|
194
|
194
|
}
|
195
|
195
|
},
|
196
|
|
- created() {
|
197
|
|
- this.template_id = this.$store.getters.user.template_info.template_id;
|
198
|
|
- console.log("this是什么东西", this.advice_groups);
|
|
196
|
+ created () {
|
|
197
|
+ this.template_id = this.$store.getters.user.template_info.template_id
|
|
198
|
+ console.log('this是什么东西', this.advice_groups)
|
199
|
199
|
}
|
200
|
|
-};
|
|
200
|
+}
|
|
201
|
+
|
201
|
202
|
</script>
|
202
|
203
|
|
203
|
204
|
<style rel="stylesheet/scss" lang="scss" scoped>
|