|
@@ -15,9 +15,11 @@
|
15
|
15
|
</el-row>
|
16
|
16
|
<div class="configTable">
|
17
|
17
|
<el-table :data="tableData" border style="width: 100%">
|
18
|
|
- <el-table-column prop="date" label="日期" width="180"></el-table-column>
|
19
|
|
- <el-table-column prop="name" label="姓名" width="180"></el-table-column>
|
20
|
|
- <el-table-column prop="address" label="地址"></el-table-column>
|
|
18
|
+ <el-table-column prop="date" label="检验检查大项" width="180"></el-table-column>
|
|
19
|
+ <el-table-column prop="name" label="检查小项" width="180"></el-table-column>
|
|
20
|
+ <el-table-column prop="address" label="范围"></el-table-column>
|
|
21
|
+ <el-table-column prop="address" label="单位"></el-table-column>
|
|
22
|
+ <el-table-column prop="address" label="排序"></el-table-column>
|
21
|
23
|
<el-table-column label="操作" width="180">
|
22
|
24
|
<template slot-scope="scope">
|
23
|
25
|
<el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
@@ -28,30 +30,30 @@
|
28
|
30
|
</div>
|
29
|
31
|
|
30
|
32
|
<el-dialog title="新增" :visible.sync="newDialog">
|
31
|
|
- <el-form :model="form" ref="form">
|
32
|
|
- <el-form-item label="检查大项" :label-width="formLabelWidth">
|
33
|
|
- <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域">
|
|
33
|
+ <el-form :model="form" ref="form" :rules="rules">
|
|
34
|
+ <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
|
|
35
|
+ <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域" @change="changeInspection">
|
34
|
36
|
<el-option
|
35
|
|
- v-for="patient in InspectionMajor"
|
36
|
|
- :key="patient.id"
|
37
|
|
- :value="patient.id"
|
38
|
|
- :label="patient.name"
|
|
37
|
+ v-for="item in InspectionMajor"
|
|
38
|
+ :key="item.project_id"
|
|
39
|
+ :value="item.project_id"
|
|
40
|
+ :label="item.project_name"
|
39
|
41
|
>
|
40
|
42
|
</el-option>
|
41
|
43
|
</el-select>
|
42
|
44
|
</el-form-item>
|
43
|
|
- <el-form-item label="检查小项" :label-width="formLabelWidth">
|
44
|
|
- <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域">
|
|
45
|
+ <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
|
|
46
|
+ <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域" @change="changeInspectionMonior">
|
45
|
47
|
<el-option
|
46
|
|
- v-for="patient in InspectionMinor"
|
47
|
|
- :key="patient.id"
|
48
|
|
- :value="patient.id"
|
49
|
|
- :label="patient.name"
|
|
48
|
+ v-for="it in InspectionMinor"
|
|
49
|
+ :key="it.id"
|
|
50
|
+ :value="it.id"
|
|
51
|
+ :label="it.item_name"
|
50
|
52
|
>
|
51
|
53
|
</el-option>
|
52
|
54
|
</el-select>
|
53
|
55
|
</el-form-item>
|
54
|
|
- <el-form-item label="指控范围" :label-width="formLabelWidth">
|
|
56
|
+ <el-form-item label="指控范围" :label-width="formLabelWidth" required prop="large_range">
|
55
|
57
|
<el-input style="width:200px" v-model="form.min_range"></el-input>
|
56
|
58
|
-
|
57
|
59
|
<el-input style="width:200px" v-model="form.large_range"></el-input>
|
|
@@ -62,7 +64,7 @@
|
62
|
64
|
</el-form>
|
63
|
65
|
<div slot="footer" class="dialog-footer">
|
64
|
66
|
<el-button @click="newDialog = false">取 消</el-button>
|
65
|
|
- <el-button type="primary" @click="newDialog = false">保存</el-button>
|
|
67
|
+ <el-button type="primary" @click="saveInspection('form')">保存</el-button>
|
66
|
68
|
</div>
|
67
|
69
|
</el-dialog>
|
68
|
70
|
<el-dialog title="编辑" :visible.sync="editDialog">
|
|
@@ -73,7 +75,7 @@
|
73
|
75
|
v-for="patient in InspectionMajor"
|
74
|
76
|
:key="patient.id"
|
75
|
77
|
:value="patient.id"
|
76
|
|
- :label="patient.name"
|
|
78
|
+ :label="patient.project_name"
|
77
|
79
|
>
|
78
|
80
|
</el-option>
|
79
|
81
|
</el-select>
|
|
@@ -81,10 +83,10 @@
|
81
|
83
|
<el-form-item label="检查小项" :label-width="formLabelWidth">
|
82
|
84
|
<el-select v-model="form.inspectionMinor" placeholder="请选择活动区域">
|
83
|
85
|
<el-option
|
84
|
|
- v-for="patient in InspectionMinor"
|
85
|
|
- :key="patient.id"
|
86
|
|
- :value="patient.id"
|
87
|
|
- :label="patient.name"
|
|
86
|
+ v-for="item in InspectionMinor"
|
|
87
|
+ :key="item.project_id"
|
|
88
|
+ :value="item.project_id"
|
|
89
|
+ :label="item.item_name"
|
88
|
90
|
>
|
89
|
91
|
</el-option>
|
90
|
92
|
</el-select>
|
|
@@ -114,6 +116,7 @@ import { GetOICData } from "@/api/qcd";
|
114
|
116
|
import PieChart from "../qcd/components/BarChart";
|
115
|
117
|
import { uParseTime } from "@/utils/tools";
|
116
|
118
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
119
|
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveInspection }from "@/api/common/common";
|
117
|
120
|
export default {
|
118
|
121
|
name: "dialysisTotal",
|
119
|
122
|
data() {
|
|
@@ -157,14 +160,14 @@ export default {
|
157
|
160
|
min_range: "",
|
158
|
161
|
large_range: "",
|
159
|
162
|
sort:"",
|
160
|
|
- delivery: false,
|
161
|
|
- type: [],
|
162
|
|
- resource: "",
|
163
|
|
- desc: ""
|
|
163
|
+ },
|
|
164
|
+ rules: {
|
|
165
|
+ inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
|
|
166
|
+ inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
|
|
167
|
+ large_range:[{required:true,message:"指控范围不能为空"}]
|
164
|
168
|
}
|
165
|
169
|
};
|
166
|
170
|
},
|
167
|
|
- created() {},
|
168
|
171
|
methods: {
|
169
|
172
|
handleTabClick(tab, event) {
|
170
|
173
|
if (this.tabActiveName == "query") {
|
|
@@ -173,12 +176,58 @@ export default {
|
173
|
176
|
},
|
174
|
177
|
handleEdit() {
|
175
|
178
|
this.editDialog = true;
|
|
179
|
+ },
|
|
180
|
+
|
|
181
|
+ //获取大项数据来源
|
|
182
|
+ getInspectionMajor(){
|
|
183
|
+ getInspectionMajor().then(response=>{
|
|
184
|
+ if(response.data.state == 1){
|
|
185
|
+ var inspection = response.data.data.inspection
|
|
186
|
+ console.log("inspection",inspection)
|
|
187
|
+ this.InspectionMajor = inspection
|
|
188
|
+
|
|
189
|
+ }
|
|
190
|
+ })
|
|
191
|
+ },
|
|
192
|
+ //获取小项
|
|
193
|
+ changeInspection(id){
|
|
194
|
+ console.log("id----",id)
|
|
195
|
+ getInspectionMinor(id).then(response=>{
|
|
196
|
+ if(response.data.state == 1){
|
|
197
|
+ var inspection = response.data.data.inspection
|
|
198
|
+ console.log("inspection",inspection)
|
|
199
|
+ this.InspectionMinor = inspection
|
|
200
|
+ }
|
|
201
|
+ })
|
|
202
|
+ },
|
|
203
|
+ // 获取指控范围
|
|
204
|
+ changeInspectionMonior(id){
|
|
205
|
+ getInspectionRange(id).then(response=>{
|
|
206
|
+ if(response.data.state == 1){
|
|
207
|
+ var inspectionRange = response.data.data.inspectionRange
|
|
208
|
+ console.log("inspectionRange",inspectionRange)
|
|
209
|
+ this.form.min_range = inspectionRange.range_min
|
|
210
|
+ this.form.large_range = inspectionRange.range_max
|
|
211
|
+ }
|
|
212
|
+ })
|
|
213
|
+ },
|
|
214
|
+ saveInspection(formName){
|
|
215
|
+ this.$refs[formName].validate(valid=>{
|
|
216
|
+ if(valid){
|
|
217
|
+ saveInspection(this.form).then(response=>{
|
|
218
|
+ })
|
|
219
|
+ }
|
|
220
|
+ })
|
176
|
221
|
}
|
177
|
222
|
},
|
178
|
223
|
components: {
|
179
|
224
|
PieChart,
|
180
|
225
|
BreadCrumb
|
181
|
|
- }
|
|
226
|
+ },
|
|
227
|
+ created() {
|
|
228
|
+ //获取检查大项数据来源
|
|
229
|
+ this.getInspectionMajor()
|
|
230
|
+ },
|
182
|
231
|
};
|
183
|
232
|
</script>
|
184
|
233
|
<style lang="scss">
|