|
@@ -125,230 +125,230 @@
|
125
|
125
|
</template>
|
126
|
126
|
|
127
|
127
|
<script>
|
128
|
|
-import { getDataConfig } from "@/utils/data";
|
129
|
|
-import { postTreatmentsummary } from "@/api/dialysis";
|
130
|
|
-import { uParseTime } from "@/utils/tools";
|
131
|
|
-import store from "@/store";
|
132
|
|
-import request from "@/utils/request";
|
|
128
|
+import { getDataConfig } from '@/utils/data'
|
|
129
|
+import { postTreatmentsummary } from '@/api/dialysis'
|
|
130
|
+import { uParseTime } from '@/utils/tools'
|
|
131
|
+import store from '@/store'
|
|
132
|
+import request from '@/utils/request'
|
133
|
133
|
|
134
|
134
|
export default {
|
135
|
|
- name: "treatmentSummaryDialog",
|
|
135
|
+ name: 'treatmentSummaryDialog',
|
136
|
136
|
|
137
|
137
|
props: {
|
138
|
138
|
treatment_summary: {
|
139
|
139
|
// 治疗小结
|
140
|
140
|
type: Object,
|
141
|
141
|
default: () => {
|
142
|
|
- return { id: 0 };
|
|
142
|
+ return { id: 0 }
|
143
|
143
|
}
|
144
|
144
|
},
|
145
|
145
|
patient: {
|
146
|
146
|
// 患者信息
|
147
|
147
|
type: Object,
|
148
|
148
|
default: () => {
|
149
|
|
- return { id: 0 };
|
|
149
|
+ return { id: 0 }
|
150
|
150
|
}
|
151
|
151
|
}
|
152
|
152
|
},
|
153
|
153
|
data() {
|
154
|
154
|
return {
|
155
|
|
- showTxt: "",
|
|
155
|
+ showTxt: '',
|
156
|
156
|
hasPermission: true,
|
157
|
|
- value: "",
|
158
|
|
- value2: "",
|
159
|
|
- value3: "",
|
160
|
|
- value4: "",
|
|
157
|
+ value: '',
|
|
158
|
+ value2: '',
|
|
159
|
+ value3: '',
|
|
160
|
+ value4: '',
|
161
|
161
|
isVisibility: false,
|
162
|
|
- record_date: "",
|
|
162
|
+ record_date: '',
|
163
|
163
|
education: [],
|
164
|
164
|
summary: [],
|
165
|
165
|
nursingRecord: [],
|
166
|
166
|
specialRecord: [],
|
167
|
167
|
treatmentSummary: {
|
168
|
|
- mission: "",
|
169
|
|
- dialysis_summary: "",
|
170
|
|
- sj_nurse: "",
|
171
|
|
- zl_nurse: "",
|
172
|
|
- hd_nurse: "",
|
173
|
|
- xj_nurse: "",
|
174
|
|
- zl_doctor: "",
|
175
|
|
- nursing_record: "",
|
176
|
|
- special_record: ""
|
|
168
|
+ mission: '',
|
|
169
|
+ dialysis_summary: '',
|
|
170
|
+ sj_nurse: '',
|
|
171
|
+ zl_nurse: '',
|
|
172
|
+ hd_nurse: '',
|
|
173
|
+ xj_nurse: '',
|
|
174
|
+ zl_doctor: '',
|
|
175
|
+ nursing_record: '',
|
|
176
|
+ special_record: ''
|
177
|
177
|
}
|
178
|
|
- };
|
|
178
|
+ }
|
179
|
179
|
},
|
180
|
180
|
methods: {
|
181
|
181
|
show(record) {
|
182
|
|
- this.isVisibility = true;
|
183
|
|
- this.record = record;
|
184
|
|
- console.log("治疗小结", record);
|
185
|
|
- this.getPermission();
|
|
182
|
+ this.isVisibility = true
|
|
183
|
+ this.record = record
|
|
184
|
+ console.log('治疗小结', record)
|
|
185
|
+ this.getPermission()
|
186
|
186
|
},
|
187
|
187
|
hide() {
|
188
|
|
- this.isVisibility = false;
|
|
188
|
+ this.isVisibility = false
|
189
|
189
|
},
|
190
|
190
|
dialysisAfterTeachSelectChange: function(values) {
|
191
|
|
- if (this.treatmentSummary.mission == "") {
|
192
|
|
- this.treatmentSummary.mission = values;
|
|
191
|
+ if (this.treatmentSummary.mission == '') {
|
|
192
|
+ this.treatmentSummary.mission = values
|
193
|
193
|
} else {
|
194
|
194
|
if (this.treatmentSummary.mission.indexOf(values) == -1) {
|
195
|
195
|
if (
|
196
|
196
|
this.treatmentSummary.mission
|
197
|
197
|
.charAt(this.treatmentSummary.mission.length - 1)
|
198
|
|
- .indexOf("。") == -1
|
|
198
|
+ .indexOf('。') == -1
|
199
|
199
|
) {
|
200
|
200
|
this.treatmentSummary.mission =
|
201
|
|
- this.treatmentSummary.mission + "," + values;
|
|
201
|
+ this.treatmentSummary.mission + ',' + values
|
202
|
202
|
} else {
|
203
|
203
|
this.treatmentSummary.mission =
|
204
|
|
- this.treatmentSummary.mission + values;
|
|
204
|
+ this.treatmentSummary.mission + values
|
205
|
205
|
}
|
206
|
206
|
}
|
207
|
207
|
}
|
208
|
208
|
},
|
209
|
209
|
dialysisSummarySelectChange: function(values) {
|
210
|
|
- if (this.treatmentSummary.dialysis_summary == "") {
|
211
|
|
- this.treatmentSummary.dialysis_summary = values;
|
|
210
|
+ if (this.treatmentSummary.dialysis_summary == '') {
|
|
211
|
+ this.treatmentSummary.dialysis_summary = values
|
212
|
212
|
} else {
|
213
|
213
|
if (this.treatmentSummary.dialysis_summary.indexOf(values) == -1) {
|
214
|
214
|
if (
|
215
|
215
|
this.treatmentSummary.dialysis_summary
|
216
|
216
|
.charAt(this.treatmentSummary.dialysis_summary.length - 1)
|
217
|
|
- .indexOf("。") == -1
|
|
217
|
+ .indexOf('。') == -1
|
218
|
218
|
) {
|
219
|
219
|
this.treatmentSummary.dialysis_summary =
|
220
|
|
- this.treatmentSummary.dialysis_summary + "," + values;
|
|
220
|
+ this.treatmentSummary.dialysis_summary + ',' + values
|
221
|
221
|
} else {
|
222
|
222
|
this.treatmentSummary.dialysis_summary =
|
223
|
|
- this.treatmentSummary.dialysis_summary + "," + values;
|
|
223
|
+ this.treatmentSummary.dialysis_summary + ',' + values
|
224
|
224
|
this.treatmentSummary.dialysis_summary =
|
225
|
|
- this.treatmentSummary.dialysis_summary + values;
|
|
225
|
+ this.treatmentSummary.dialysis_summary + values
|
226
|
226
|
}
|
227
|
227
|
}
|
228
|
228
|
}
|
229
|
229
|
},
|
230
|
230
|
dialysisNusingRecordSelectChange: function(values) {
|
231
|
|
- if (this.treatmentSummary.nursing_record == "") {
|
232
|
|
- this.treatmentSummary.nursing_record = values;
|
|
231
|
+ if (this.treatmentSummary.nursing_record == '') {
|
|
232
|
+ this.treatmentSummary.nursing_record = values
|
233
|
233
|
} else {
|
234
|
234
|
if (this.treatmentSummary.nursing_record.indexOf(values) == -1) {
|
235
|
235
|
if (
|
236
|
236
|
this.treatmentSummary.nursing_record
|
237
|
237
|
.charAt(this.treatmentSummary.nursing_record.length - 1)
|
238
|
|
- .indexOf("。") == -1
|
|
238
|
+ .indexOf('。') == -1
|
239
|
239
|
) {
|
240
|
240
|
this.treatmentSummary.nursing_record =
|
241
|
|
- this.treatmentSummary.nursing_record + "," + values;
|
|
241
|
+ this.treatmentSummary.nursing_record + ',' + values
|
242
|
242
|
} else {
|
243
|
243
|
this.treatmentSummary.nursing_record =
|
244
|
|
- this.treatmentSummary.nursing_record + "," + values;
|
|
244
|
+ this.treatmentSummary.nursing_record + ',' + values
|
245
|
245
|
this.treatmentSummary.nursing_record =
|
246
|
|
- this.treatmentSummary.nursing_record + values;
|
|
246
|
+ this.treatmentSummary.nursing_record + values
|
247
|
247
|
}
|
248
|
248
|
}
|
249
|
249
|
}
|
250
|
250
|
},
|
251
|
251
|
dialysisSpecialRecordSelectChange(values) {
|
252
|
|
- if (this.treatmentSummary.special_record == "") {
|
253
|
|
- this.treatmentSummary.special_record = values;
|
|
252
|
+ if (this.treatmentSummary.special_record == '') {
|
|
253
|
+ this.treatmentSummary.special_record = values
|
254
|
254
|
} else {
|
255
|
255
|
if (this.treatmentSummary.special_record.indexOf(values) == -1) {
|
256
|
256
|
if (
|
257
|
257
|
this.treatmentSummary.special_record
|
258
|
258
|
.charAt(this.treatmentSummary.special_record.length - 1)
|
259
|
|
- .indexOf("。") == -1
|
|
259
|
+ .indexOf('。') == -1
|
260
|
260
|
) {
|
261
|
261
|
this.treatmentSummary.special_record =
|
262
|
|
- this.treatmentSummary.special_record + "," + values;
|
|
262
|
+ this.treatmentSummary.special_record + ',' + values
|
263
|
263
|
} else {
|
264
|
264
|
this.treatmentSummary.special_record =
|
265
|
|
- this.treatmentSummary.special_record + "," + values;
|
|
265
|
+ this.treatmentSummary.special_record + ',' + values
|
266
|
266
|
this.treatmentSummary.special_record =
|
267
|
|
- this.treatmentSummary.special_record + values;
|
|
267
|
+ this.treatmentSummary.special_record + values
|
268
|
268
|
}
|
269
|
269
|
}
|
270
|
270
|
}
|
271
|
271
|
},
|
272
|
272
|
handleCancle: function() {
|
273
|
|
- this.isVisibility = false;
|
|
273
|
+ this.isVisibility = false
|
274
|
274
|
},
|
275
|
275
|
handleComfirm: function() {
|
276
|
|
- const ParamsQuery = this.treatmentSummary;
|
277
|
|
- ParamsQuery["patient"] = this.patient.id;
|
278
|
|
- ParamsQuery["record_date"] = this.record_date;
|
279
|
|
- ParamsQuery["mode"] = "1";
|
|
276
|
+ const ParamsQuery = this.treatmentSummary
|
|
277
|
+ ParamsQuery['patient'] = this.patient.id
|
|
278
|
+ ParamsQuery['record_date'] = this.record_date
|
|
279
|
+ ParamsQuery['mode'] = '1'
|
280
|
280
|
if (this.treatment_summary.id > 0) {
|
281
|
|
- ParamsQuery["mode"] = "2";
|
|
281
|
+ ParamsQuery['mode'] = '2'
|
282
|
282
|
if (
|
283
|
283
|
this.treatment_summary.creater != this.$store.getters.xt_user.user.id
|
284
|
284
|
) {
|
285
|
|
- ParamsQuery["mode"] = "3";
|
|
285
|
+ ParamsQuery['mode'] = '3'
|
286
|
286
|
}
|
287
|
287
|
}
|
288
|
288
|
postTreatmentsummary(ParamsQuery).then(response => {
|
289
|
289
|
if (response.data.state == 0) {
|
290
|
|
- this.$message.error(response.data.msg);
|
291
|
|
- return false;
|
|
290
|
+ this.$message.error(response.data.msg)
|
|
291
|
+ return false
|
292
|
292
|
} else {
|
293
|
293
|
this.$notify({
|
294
|
|
- title: "成功",
|
295
|
|
- message: "提交成功",
|
296
|
|
- type: "success",
|
|
294
|
+ title: '成功',
|
|
295
|
+ message: '提交成功',
|
|
296
|
+ type: 'success',
|
297
|
297
|
duration: 2000
|
298
|
|
- });
|
|
298
|
+ })
|
299
|
299
|
|
300
|
|
- const summary_resp = response.data.data.summary;
|
|
300
|
+ const summary_resp = response.data.data.summary
|
301
|
301
|
// prop
|
302
|
|
- var treatment_summary = this.treatment_summary;
|
|
302
|
+ var treatment_summary = this.treatment_summary
|
303
|
303
|
for (var index in summary_resp) {
|
304
|
304
|
// treatment_summary[index] = summary_resp[index];
|
305
|
|
- this.$set(treatment_summary, index, summary_resp[index]);
|
|
305
|
+ this.$set(treatment_summary, index, summary_resp[index])
|
306
|
306
|
}
|
307
|
307
|
|
308
|
|
- this.hide();
|
|
308
|
+ this.hide()
|
309
|
309
|
}
|
310
|
|
- });
|
|
310
|
+ })
|
311
|
311
|
},
|
312
|
312
|
getPermission() {
|
313
|
313
|
request
|
314
|
|
- .get("/api/func_per/get", {
|
|
314
|
+ .get('/api/func_per/get', {
|
315
|
315
|
params: {
|
316
|
|
- create_url: "/api/dialysis/treatmentsummary?mode=1",
|
317
|
|
- modify_url: "/api/dialysis/treatmentsummary?mode=2",
|
318
|
|
- modify_other_url: "/api/dialysis/treatmentsummary?mode=3",
|
|
316
|
+ create_url: '/api/dialysis/treatmentsummary?mode=1',
|
|
317
|
+ modify_url: '/api/dialysis/treatmentsummary?mode=2',
|
|
318
|
+ modify_other_url: '/api/dialysis/treatmentsummary?mode=3',
|
319
|
319
|
module: 9
|
320
|
320
|
}
|
321
|
321
|
})
|
322
|
322
|
.then(res => {
|
323
|
323
|
if (res.data.state == 0) {
|
324
|
|
- this.hasPermission = false;
|
|
324
|
+ this.hasPermission = false
|
325
|
325
|
} else if (res.data.state == 1) {
|
326
|
|
- if (this.record.id != "" && this.record.creater != 0) {
|
327
|
|
- //有数据
|
|
326
|
+ if (this.record.id != '' && this.record.creater != 0) {
|
|
327
|
+ // 有数据
|
328
|
328
|
if (this.record.creater == this.$store.getters.user.admin.id) {
|
329
|
|
- //创建人是自己
|
|
329
|
+ // 创建人是自己
|
330
|
330
|
if (res.data.data.is_has_modify == false) {
|
331
|
|
- this.hasPermission = false;
|
332
|
|
- this.showTxt = "你没有修改治疗小结权限";
|
|
331
|
+ this.hasPermission = false
|
|
332
|
+ this.showTxt = '你没有修改治疗小结权限'
|
333
|
333
|
}
|
334
|
334
|
} else {
|
335
|
|
- //创建人不是自己
|
|
335
|
+ // 创建人不是自己
|
336
|
336
|
if (res.data.data.is_has_modify_other == false) {
|
337
|
|
- this.hasPermission = false;
|
338
|
|
- this.showTxt = "你没有修改他人治疗小结权限";
|
|
337
|
+ this.hasPermission = false
|
|
338
|
+ this.showTxt = '你没有修改他人治疗小结权限'
|
339
|
339
|
}
|
340
|
340
|
}
|
341
|
|
- } else if (this.record.id == "" || this.record.creater == 0) {
|
|
341
|
+ } else if (this.record.id == '' || this.record.creater == 0) {
|
342
|
342
|
if (res.data.data.is_has_create == false) {
|
343
|
|
- this.hasPermission = false;
|
344
|
|
- this.showTxt = "你没有新增治疗小结权限";
|
|
343
|
+ this.hasPermission = false
|
|
344
|
+ this.showTxt = '你没有新增治疗小结权限'
|
345
|
345
|
}
|
346
|
346
|
}
|
347
|
347
|
}
|
348
|
|
- });
|
|
348
|
+ })
|
349
|
349
|
},
|
350
|
350
|
isShow(name) {
|
351
|
|
- var filedList = store.getters.xt_user.fileds;
|
|
351
|
+ var filedList = store.getters.xt_user.fileds
|
352
|
352
|
|
353
|
353
|
for (let i = 0; i < filedList.length; i++) {
|
354
|
354
|
if (
|
|
@@ -356,34 +356,34 @@ export default {
|
356
|
356
|
filedList[i].filed_name_cn == name &&
|
357
|
357
|
filedList[i].is_show == 1
|
358
|
358
|
) {
|
359
|
|
- return true;
|
|
359
|
+ return true
|
360
|
360
|
}
|
361
|
361
|
}
|
362
|
|
- return false;
|
|
362
|
+ return false
|
363
|
363
|
}
|
364
|
364
|
},
|
365
|
365
|
watch: {
|
366
|
366
|
isVisibility(val) {},
|
367
|
|
- "treatment_summary.id": function() {
|
|
367
|
+ 'treatment_summary.id': function() {
|
368
|
368
|
if (this.treatment_summary.id > 0) {
|
369
|
369
|
for (var index in this.treatmentSummary) {
|
370
|
|
- this.treatmentSummary[index] = this.treatment_summary[index];
|
|
370
|
+ this.treatmentSummary[index] = this.treatment_summary[index]
|
371
|
371
|
}
|
372
|
372
|
}
|
373
|
373
|
}
|
374
|
374
|
},
|
375
|
375
|
created() {
|
376
|
|
- this.education = getDataConfig("education", "education");
|
377
|
|
- this.summary = getDataConfig("summary", "summary");
|
|
376
|
+ this.education = getDataConfig('education', 'education')
|
|
377
|
+ this.summary = getDataConfig('summary', 'summary')
|
378
|
378
|
|
379
|
|
- this.nursingRecord = getDataConfig("nursing_record", "nursing_record");
|
|
379
|
+ this.nursingRecord = getDataConfig('nursing_record', 'nursing_record')
|
380
|
380
|
|
381
|
|
- this.specialRecord = getDataConfig("special_record", "special_record");
|
|
381
|
+ this.specialRecord = getDataConfig('special_record', 'special_record')
|
382
|
382
|
|
383
|
|
- var date = this.$route.query && this.$route.query.date;
|
384
|
|
- this.record_date = uParseTime(date, "{y}-{m}-{d}");
|
|
383
|
+ var date = this.$route.query && this.$route.query.date
|
|
384
|
+ this.record_date = uParseTime(date, '{y}-{m}-{d}')
|
385
|
385
|
}
|
386
|
|
-};
|
|
386
|
+}
|
387
|
387
|
</script>
|
388
|
388
|
|
389
|
389
|
<style scoped>
|