|
@@ -88,7 +88,7 @@
|
88
|
88
|
type="primary"
|
89
|
89
|
icon="el-icon-edit-outline"
|
90
|
90
|
@click="openEdit()"
|
91
|
|
- :disabled="itemDate ? false : true"
|
|
91
|
+ :disabled="itemDateShow ? false : true"
|
92
|
92
|
>修改
|
93
|
93
|
</el-button
|
94
|
94
|
>
|
|
@@ -113,9 +113,12 @@
|
113
|
113
|
</div>
|
114
|
114
|
<div v-if="!isPic">
|
115
|
115
|
<el-table
|
|
116
|
+ highlight-current-row
|
|
117
|
+ @current-change="handleCurrentChangeOne"
|
116
|
118
|
:header-cell-style="{
|
117
|
119
|
backgroundColor: 'rgb(245, 247, 250)',
|
118
|
120
|
color: '#606266'
|
|
121
|
+
|
119
|
122
|
}"
|
120
|
123
|
:row-style="{ color: '#303133' }"
|
121
|
124
|
:data="tabileList"
|
|
@@ -183,17 +186,6 @@
|
183
|
186
|
|
184
|
187
|
</div>
|
185
|
188
|
|
186
|
|
- <!-- <el-pagination
|
187
|
|
- align="right"
|
188
|
|
- @current-change="handleCurrentChangePage"
|
189
|
|
- :current-page="queryParams.page"
|
190
|
|
- :page-size="1"
|
191
|
|
- background
|
192
|
|
- style="margin-top:20px;"
|
193
|
|
- layout="total, prev, pager, next, jumper"
|
194
|
|
- :total="total"
|
195
|
|
- >
|
196
|
|
- </el-pagination> -->
|
197
|
189
|
</el-col>
|
198
|
190
|
</el-row>
|
199
|
191
|
</div>
|
|
@@ -218,11 +210,6 @@
|
218
|
210
|
</el-form-item>
|
219
|
211
|
</el-col>
|
220
|
212
|
|
221
|
|
- <!-- <el-col :span="24">-->
|
222
|
|
- <!-- <p style="margin-top:20px;">是否弹窗提醒:-->
|
223
|
|
- <!-- <el-switch v-model="is_open"></el-switch>-->
|
224
|
|
- <!-- </p>-->
|
225
|
|
- <!-- </el-col>-->
|
226
|
213
|
</el-row>
|
227
|
214
|
</el-form>
|
228
|
215
|
<div slot="footer" class="dialog-footer">
|
|
@@ -281,7 +268,7 @@
|
281
|
268
|
</el-col>
|
282
|
269
|
<el-col :span="7">
|
283
|
270
|
<el-form-item
|
284
|
|
- label="检验日期"
|
|
271
|
+ label="检验日期222"
|
285
|
272
|
prop="inspect_date"
|
286
|
273
|
:rules="[
|
287
|
274
|
{ required: true, message: '请输入检验日期', trigger: 'blur' }
|
|
@@ -463,7 +450,8 @@
|
463
|
450
|
fetchPatientInspections,
|
464
|
451
|
setRemind,
|
465
|
452
|
setRemindDialog,
|
466
|
|
- getNewInspectionList
|
|
453
|
+ getNewInspectionList,
|
|
454
|
+ getNewInspectionDetailList
|
467
|
455
|
} from '@/api/inspection'
|
468
|
456
|
import { getFileExtension, uParseTime } from '@/utils/tools'
|
469
|
457
|
|
|
@@ -523,7 +511,9 @@
|
523
|
511
|
org_id:0,
|
524
|
512
|
rowList:[],
|
525
|
513
|
tabileList:[],
|
526
|
|
- inspectionList:[]
|
|
514
|
+ inspectionList:[],
|
|
515
|
+ inspectionData:[],
|
|
516
|
+ itemDateShow:false
|
527
|
517
|
}
|
528
|
518
|
},
|
529
|
519
|
methods: {
|
|
@@ -729,84 +719,31 @@
|
729
|
719
|
this.dialogRemindFormVisible = false
|
730
|
720
|
}
|
731
|
721
|
})
|
732
|
|
- }, openEdit() {
|
733
|
|
-
|
734
|
|
- if (this.project == null) {
|
735
|
|
- this.$message.error('请先选择项目')
|
736
|
|
- return false
|
737
|
|
- }
|
738
|
|
- if(this.isPic){
|
739
|
|
- this.form.pic_method = 'edit'
|
740
|
|
- this.formTitle = '修改' + this.project.project_name
|
741
|
|
- this.form.project_id = this.project.project_id
|
742
|
|
- this.form.inspect_date = this.itemDate
|
743
|
|
- this.form.old_inspect_date = this.itemDate
|
744
|
|
- this.form.imgs = []
|
745
|
|
- this.form.delete_imgs = []
|
746
|
|
- for(var index in this.inspections){
|
747
|
|
- this.form.imgs.push({
|
748
|
|
- id: this.inspections[index].id,
|
749
|
|
- img_url: this.inspections[index].inspect_value,
|
750
|
|
- desc: this.inspections[index].item_name
|
751
|
|
- })
|
752
|
|
- }
|
753
|
|
- console.log(this.form.imgs)
|
754
|
|
- this.dialogPicFormVisible = true
|
755
|
|
- }else{
|
756
|
|
- console.log("22222")
|
757
|
|
- this.form.method = 'edit'
|
|
722
|
+ },
|
|
723
|
+
|
|
724
|
+ openEdit(){
|
|
725
|
+ this.form.formItem = []
|
|
726
|
+ if(this.inspectionData!=null){
|
758
|
727
|
this.formTitle = '修改' + this.project.project_name
|
759
|
|
- this.form.project_id = this.project.project_id
|
760
|
|
- this.form.inspect_date = this.itemDate
|
761
|
|
- this.form.old_inspect_date = this.itemDate
|
762
|
|
- if(this.form.project_id == 14) {
|
763
|
|
- this.form.remind_cycle = this.patient_info.remind_cycle
|
764
|
|
- }else{
|
765
|
|
- this.form.remind_cycle =""
|
766
|
|
- }
|
767
|
|
- console.log(this.form.remind_cycle)
|
768
|
|
-
|
769
|
|
-
|
770
|
|
- this.form.formItem = []
|
771
|
|
- console.log("hhhhhhhhhhhhh",this.project.inspection_reference)
|
772
|
|
- console.log("inspectionsMap",this.inspectionsMap)
|
773
|
|
- for (var index in this.project.inspection_reference) {
|
774
|
|
- if(this.org_id ==10138){
|
775
|
|
- this.form.formItem.push({
|
776
|
|
- id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
|
777
|
|
- project_id: this.project.inspection_reference[index].project_id,
|
778
|
|
- project_name: this.project.inspection_reference[index].project_name,
|
779
|
|
- item_id: this.project.inspection_reference[index].id,
|
780
|
|
- item: this.project.inspection_reference[index].item,
|
781
|
|
- item_name: this.project.inspection_reference[index].item_name,
|
782
|
|
- range_type: this.project.inspection_reference[index].range_type,
|
783
|
|
- value: this.project.inspection_reference[index].item_id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].item_id].inspect_value : '',
|
784
|
|
- select_options: this.project.inspection_reference[index].range_options.split(','),
|
785
|
|
- unit: this.project.inspection_reference[index].unit,
|
786
|
|
- item_id:parseInt(this.project.inspection_reference[index].item_id) ,
|
787
|
|
- })
|
788
|
|
- }else{
|
789
|
|
- this.form.formItem.push({
|
790
|
|
- id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
|
791
|
|
- project_id: this.project.inspection_reference[index].project_id,
|
792
|
|
- project_name: this.project.inspection_reference[index].project_name,
|
793
|
|
- item_id: this.project.inspection_reference[index].id,
|
794
|
|
- item: this.project.inspection_reference[index].item,
|
795
|
|
- item_name: this.project.inspection_reference[index].item_name,
|
796
|
|
- range_type: this.project.inspection_reference[index].range_type,
|
797
|
|
- value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
|
798
|
|
- select_options: this.project.inspection_reference[index].range_options.split(','),
|
799
|
|
- unit: this.project.inspection_reference[index].unit
|
800
|
|
- })
|
801
|
|
- }
|
802
|
|
-
|
|
728
|
+
|
|
729
|
+ for(let i=0;i<this.inspectionData.length;i++){
|
|
730
|
+ console.log("类型====================",this.inspectionData[i].inspect_type)
|
|
731
|
+ var obj = {id:0,project_id:0,project_name:"",item_id:0,item_name:"",range_type:"",value:"",unit:"",item_id:0}
|
|
732
|
+ obj.id=this.inspectionData[i].id,
|
|
733
|
+ obj.project_id=this.inspectionData[i].project_id
|
|
734
|
+ obj.project_name=this.inspectionData[i].project_name
|
|
735
|
+ obj.item_id = this.inspectionData[i].item_id
|
|
736
|
+ obj.item_name = this.inspectionData[i].item_name
|
|
737
|
+ obj.range_type = this.inspectionData[i].inspect_type
|
|
738
|
+ obj.value = this.inspectionData[i].inspect_value
|
|
739
|
+ obj.unit = this.inspectionData[i].unit
|
|
740
|
+ this.form.formItem.push(obj)
|
803
|
741
|
}
|
804
|
|
- console.log(this.form.formItem)
|
805
|
|
- this.dialogFormVisible = true
|
806
|
|
-
|
807
|
742
|
}
|
808
|
|
-
|
809
|
|
- },setRemindDialog(){
|
|
743
|
+ console.log("this.form.formItem-----------------------",this.form.formItem)
|
|
744
|
+ this.dialogFormVisible = true
|
|
745
|
+ },
|
|
746
|
+ setRemindDialog(){
|
810
|
747
|
this.dialogRemindDialogFormVisible = true
|
811
|
748
|
|
812
|
749
|
|
|
@@ -832,11 +769,6 @@
|
832
|
769
|
this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
|
833
|
770
|
this.form.formItem = []
|
834
|
771
|
for (var index in this.project.inspection_reference) {
|
835
|
|
- // var formItem = this.project.inspection_reference[index];
|
836
|
|
- // formItem["value"] = '';
|
837
|
|
- // if (formItem.range_type==2) {
|
838
|
|
- // formItem["select_options"] = formItem.range_options.split(",");
|
839
|
|
- // }
|
840
|
772
|
this.form.formItem.push({
|
841
|
773
|
id: 0,
|
842
|
774
|
project_id: this.project.inspection_reference[index].project_id,
|
|
@@ -893,86 +825,94 @@
|
893
|
825
|
console.log('form.formItem', this.form.formItem)
|
894
|
826
|
this.dialogFormVisible = true
|
895
|
827
|
},
|
896
|
|
- submitEdit(formName) {
|
897
|
|
- this.$refs[formName].validate(valid => {
|
898
|
|
- if (valid) {
|
899
|
|
- this.formLoading = true
|
900
|
|
- if (this.form.formItem.length == 0) {
|
901
|
|
- this.$message.error('未填写项目')
|
902
|
|
- return false
|
903
|
|
- }
|
904
|
|
- for (var index in this.form.formItem) {
|
905
|
|
- this.form.formItem[index].value = '' + this.form.formItem[index].value
|
906
|
|
- }
|
907
|
|
-
|
908
|
|
- EditPatientInspection(this.patientID, this.form, this.form.remind_cycle, this.form.inspect_date, this.form.project_id).then(response => {
|
909
|
|
- if (response.data.state == 1) {
|
910
|
|
- this.$notify({
|
911
|
|
- title: '成功',
|
912
|
|
- message: '修改成功',
|
913
|
|
- type: 'success',
|
914
|
|
- duration: 2000
|
915
|
|
- })
|
916
|
|
- this.patient_info.remind_cycle =
|
917
|
|
- response.data.data.remind_cycle
|
918
|
|
- this.itemDate = this.form.inspect_date
|
919
|
|
- this.items = []
|
920
|
|
- var inspections = response.data.data.inspections
|
921
|
|
- this.inspections = response.data.data.inspections
|
922
|
|
- if (inspections == null) {
|
923
|
|
- this.inspections = []
|
924
|
|
- return false
|
925
|
|
- }
|
926
|
|
- var inspectionsMap = {}
|
927
|
|
- this.inspectionsMap = {}
|
928
|
|
- for (var index in inspections) {
|
929
|
|
- inspectionsMap[inspections[index].item_id] =
|
930
|
|
- inspections[index]
|
931
|
|
- this.inspectionsMap[inspections[index].item_id] =
|
932
|
|
- inspections[index]
|
933
|
|
- }
|
934
|
|
- var items = this.project.inspection_reference
|
935
|
|
- console.log('itmes', items)
|
936
|
|
- for (var index in items) {
|
937
|
|
- if (items[index].id in inspectionsMap) {
|
938
|
|
- var item = {}
|
939
|
|
- for (var key in items[index]) {
|
940
|
|
- item[key] = items[index][key]
|
941
|
|
- }
|
942
|
|
- item.value = inspectionsMap[items[index].id].inspect_value
|
943
|
|
- item.value_direction = ''
|
944
|
|
- if (item.range_type == 1) {
|
945
|
|
- var value = parseFloat(item.value)
|
946
|
|
- var range_min = parseFloat(item.range_min)
|
947
|
|
- var range_max = parseFloat(item.range_max)
|
948
|
|
- if (value < range_min) {
|
949
|
|
- item.value_direction = '↓'
|
950
|
|
- } else if (value > range_max) {
|
951
|
|
- item.value_direction = '↑'
|
952
|
|
- }
|
953
|
|
- }
|
954
|
|
- this.items.push(item)
|
955
|
|
- }
|
956
|
|
- }
|
957
|
|
-
|
958
|
|
- this.resetForm(formName)
|
959
|
|
- this.dialogFormVisible = false
|
960
|
|
- } else {
|
961
|
|
- this.$message.error(response.data.msg)
|
962
|
|
- return false
|
963
|
|
- }
|
964
|
|
- })
|
965
|
|
- .catch(v => {
|
966
|
|
- this.$message.error(v)
|
967
|
|
- return false
|
968
|
|
- })
|
969
|
|
- this.formLoading = false
|
970
|
|
- return false
|
971
|
|
- } else {
|
972
|
|
- return false
|
973
|
|
- }
|
|
828
|
+ // submitEdit(formName) {
|
|
829
|
+ // this.$refs[formName].validate(valid => {
|
|
830
|
+ // if (valid) {
|
|
831
|
+ // this.formLoading = true
|
|
832
|
+ // if (this.form.formItem.length == 0) {
|
|
833
|
+ // this.$message.error('未填写项目')
|
|
834
|
+ // return false
|
|
835
|
+ // }
|
|
836
|
+ // for (var index in this.form.formItem) {
|
|
837
|
+ // this.form.formItem[index].value = '' + this.form.formItem[index].value
|
|
838
|
+ // }
|
|
839
|
+
|
|
840
|
+ // EditPatientInspection(this.patientID, this.form, this.form.remind_cycle, this.form.inspect_date, this.form.project_id).then(response => {
|
|
841
|
+ // if (response.data.state == 1) {
|
|
842
|
+ // this.$notify({
|
|
843
|
+ // title: '成功',
|
|
844
|
+ // message: '修改成功',
|
|
845
|
+ // type: 'success',
|
|
846
|
+ // duration: 2000
|
|
847
|
+ // })
|
|
848
|
+ // this.patient_info.remind_cycle =
|
|
849
|
+ // response.data.data.remind_cycle
|
|
850
|
+ // this.itemDate = this.form.inspect_date
|
|
851
|
+ // this.items = []
|
|
852
|
+ // var inspections = response.data.data.inspections
|
|
853
|
+ // this.inspections = response.data.data.inspections
|
|
854
|
+ // if (inspections == null) {
|
|
855
|
+ // this.inspections = []
|
|
856
|
+ // return false
|
|
857
|
+ // }
|
|
858
|
+ // var inspectionsMap = {}
|
|
859
|
+ // this.inspectionsMap = {}
|
|
860
|
+ // for (var index in inspections) {
|
|
861
|
+ // inspectionsMap[inspections[index].item_id] =
|
|
862
|
+ // inspections[index]
|
|
863
|
+ // this.inspectionsMap[inspections[index].item_id] =
|
|
864
|
+ // inspections[index]
|
|
865
|
+ // }
|
|
866
|
+ // var items = this.project.inspection_reference
|
|
867
|
+ // console.log('itmes', items)
|
|
868
|
+ // for (var index in items) {
|
|
869
|
+ // if (items[index].id in inspectionsMap) {
|
|
870
|
+ // var item = {}
|
|
871
|
+ // for (var key in items[index]) {
|
|
872
|
+ // item[key] = items[index][key]
|
|
873
|
+ // }
|
|
874
|
+ // item.value = inspectionsMap[items[index].id].inspect_value
|
|
875
|
+ // item.value_direction = ''
|
|
876
|
+ // if (item.range_type == 1) {
|
|
877
|
+ // var value = parseFloat(item.value)
|
|
878
|
+ // var range_min = parseFloat(item.range_min)
|
|
879
|
+ // var range_max = parseFloat(item.range_max)
|
|
880
|
+ // if (value < range_min) {
|
|
881
|
+ // item.value_direction = '↓'
|
|
882
|
+ // } else if (value > range_max) {
|
|
883
|
+ // item.value_direction = '↑'
|
|
884
|
+ // }
|
|
885
|
+ // }
|
|
886
|
+ // this.items.push(item)
|
|
887
|
+ // }
|
|
888
|
+ // }
|
|
889
|
+
|
|
890
|
+ // this.resetForm(formName)
|
|
891
|
+ // this.dialogFormVisible = false
|
|
892
|
+ // } else {
|
|
893
|
+ // this.$message.error(response.data.msg)
|
|
894
|
+ // return false
|
|
895
|
+ // }
|
|
896
|
+ // })
|
|
897
|
+ // .catch(v => {
|
|
898
|
+ // this.$message.error(v)
|
|
899
|
+ // return false
|
|
900
|
+ // })
|
|
901
|
+ // this.formLoading = false
|
|
902
|
+ // return false
|
|
903
|
+ // } else {
|
|
904
|
+ // return false
|
|
905
|
+ // }
|
|
906
|
+ // })
|
|
907
|
+ // },
|
|
908
|
+ submitEdit(){
|
|
909
|
+
|
|
910
|
+ console.log("hhahahahh",this.form.formItem)
|
|
911
|
+ EditPatientNewInspection().then(response=>{
|
|
912
|
+
|
974
|
913
|
})
|
975
|
914
|
},
|
|
915
|
+
|
976
|
916
|
submitNew(formName) {
|
977
|
917
|
this.$refs[formName].validate(valid => {
|
978
|
918
|
if (valid) {
|
|
@@ -1154,27 +1094,7 @@
|
1154
|
1094
|
}
|
1155
|
1095
|
}
|
1156
|
1096
|
this.total += 1
|
1157
|
|
- // var inspections = response.data.data.inspections
|
1158
|
|
- // this.inspections = response.data.data.inspections
|
1159
|
|
- // if (inspections == null) {
|
1160
|
|
- // this.inspections = []
|
1161
|
|
- // return false
|
1162
|
|
- // }
|
1163
|
|
- // var inspectionsMap = {}
|
1164
|
|
- // this.inspectionsMap = {}
|
1165
|
|
- //
|
1166
|
|
- // var items = this.project.inspection_reference
|
1167
|
|
- // for (var index in items) {
|
1168
|
|
- // if (items[index].id in inspectionsMap) {
|
1169
|
|
- // var item = {}
|
1170
|
|
- // for (var key in items[index]) {
|
1171
|
|
- // item[key] = items[index][key]
|
1172
|
|
- // }
|
1173
|
|
- // item.value = inspectionsMap[items[index].id].inspect_value
|
1174
|
|
- // item.value_direction = ''
|
1175
|
|
- // this.items.push(item)
|
1176
|
|
- // }
|
1177
|
|
- // }
|
|
1097
|
+
|
1178
|
1098
|
this.dialogPicFormVisible = false
|
1179
|
1099
|
this.queryParams.patient = this.patientID
|
1180
|
1100
|
this.queryParams.project_id = this.project.project_id
|
|
@@ -1239,7 +1159,7 @@
|
1239
|
1159
|
|
1240
|
1160
|
|
1241
|
1161
|
this.getNewInspectionList(this.queryParams)
|
1242
|
|
- this.fetchPatientInspections(this.queryParams)
|
|
1162
|
+ // this.fetchPatientInspections(this.queryParams)
|
1243
|
1163
|
|
1244
|
1164
|
}
|
1245
|
1165
|
},
|
|
@@ -1252,7 +1172,7 @@
|
1252
|
1172
|
fetchPatientInspections(params) {
|
1253
|
1173
|
this.items = []
|
1254
|
1174
|
this.isPic = false
|
1255
|
|
- console.log("params------------------",params)
|
|
1175
|
+
|
1256
|
1176
|
fetchPatientInspections(params)
|
1257
|
1177
|
.then(response => {
|
1258
|
1178
|
if (response.data.state == 1) {
|
|
@@ -1375,22 +1295,21 @@
|
1375
|
1295
|
},
|
1376
|
1296
|
|
1377
|
1297
|
getNewInspectionList(params){
|
1378
|
|
- console.log("params-----",params)
|
1379
|
1298
|
getNewInspectionList(params).then(response=>{
|
1380
|
1299
|
if(response.data.state == 1){
|
1381
|
1300
|
var list = response.data.data.list
|
1382
|
|
- console.log("list=====================",list)
|
|
1301
|
+
|
1383
|
1302
|
this.isPic = false
|
1384
|
1303
|
this.tabileList = list
|
1385
|
1304
|
|
1386
|
1305
|
var inspectionGroup = response.data.data.inspectionGroup
|
1387
|
1306
|
|
1388
|
1307
|
this.rowList = inspectionGroup
|
1389
|
|
- console.log("inspectionGroup",inspectionGroup)
|
|
1308
|
+
|
1390
|
1309
|
var inspection = response.data.data.inspection
|
1391
|
1310
|
|
1392
|
1311
|
this.inspectionList = inspection
|
1393
|
|
- console.log("inspection-------------",inspection)
|
|
1312
|
+
|
1394
|
1313
|
this.pageLoading = false
|
1395
|
1314
|
this.itemLoading = false
|
1396
|
1315
|
this.formLoading = false
|
|
@@ -1405,6 +1324,23 @@
|
1405
|
1324
|
}
|
1406
|
1325
|
}
|
1407
|
1326
|
return inspect_value
|
|
1327
|
+ },
|
|
1328
|
+ handleCurrentChangeOne(val){
|
|
1329
|
+
|
|
1330
|
+ var params = {
|
|
1331
|
+ patient_id:this.patientID,
|
|
1332
|
+ project_id:val.project_id,
|
|
1333
|
+ inspect_date:val.inspect_date,
|
|
1334
|
+ }
|
|
1335
|
+ getNewInspectionDetailList(params).then(response=>{
|
|
1336
|
+ if(response.data.state == 1){
|
|
1337
|
+ var inspection = response.data.data.inspection
|
|
1338
|
+ this.itemDateShow = true
|
|
1339
|
+ this.inspectionData = inspection
|
|
1340
|
+ this.form.inspect_date = uParseTime(val.inspect_date, '{y}-{m}-{d} {h}:{i}')
|
|
1341
|
+
|
|
1342
|
+ }
|
|
1343
|
+ })
|
1408
|
1344
|
}
|
1409
|
1345
|
},
|
1410
|
1346
|
created() {
|