|
@@ -33,7 +33,7 @@
|
33
|
33
|
<el-table-column label="操作" width="180">
|
34
|
34
|
<template slot-scope="scope">
|
35
|
35
|
<el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
|
36
|
|
- <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
|
36
|
+ <el-button size="mini" type="danger" @click="handleDelete(scope.row.id)">删除</el-button>
|
37
|
37
|
</template>
|
38
|
38
|
</el-table-column>
|
39
|
39
|
</el-table>
|
|
@@ -88,42 +88,45 @@
|
88
|
88
|
<el-button type="primary" @click="saveInspection('form')">保存</el-button>
|
89
|
89
|
</div>
|
90
|
90
|
</el-dialog>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
91
|
94
|
<el-dialog title="编辑" :visible.sync="editDialog">
|
92
|
|
- <el-form :model="form">
|
93
|
|
- <el-form-item label="检查大项" :label-width="formLabelWidth">
|
94
|
|
- <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域">
|
|
95
|
+ <el-form :model="editform" ref="editform" :rules="rules">
|
|
96
|
+ <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
|
|
97
|
+ <el-select v-model="editform.inspectionMajor" placeholder="请选择活动区域" @change="changeInspectionTwo">
|
95
|
98
|
<el-option
|
96
|
99
|
v-for="patient in InspectionMajor"
|
97
|
|
- :key="patient.id"
|
98
|
|
- :value="patient.id"
|
|
100
|
+ :key="patient.project_id"
|
|
101
|
+ :value="patient.project_id"
|
99
|
102
|
:label="patient.project_name"
|
100
|
103
|
>
|
101
|
104
|
</el-option>
|
102
|
105
|
</el-select>
|
103
|
106
|
</el-form-item>
|
104
|
|
- <el-form-item label="检查小项" :label-width="formLabelWidth">
|
105
|
|
- <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域">
|
|
107
|
+ <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
|
|
108
|
+ <el-select v-model="editform.inspectionMinor" placeholder="请选择活动区域" @change="changeInspectionMonior">
|
106
|
109
|
<el-option
|
107
|
|
- v-for="item in InspectionMinor"
|
108
|
|
- :key="item.project_id"
|
109
|
|
- :value="item.project_id"
|
|
110
|
+ v-for="item in InspectionMinorTwo"
|
|
111
|
+ :key="item.id"
|
|
112
|
+ :value="item.id"
|
110
|
113
|
:label="item.item_name"
|
111
|
114
|
>
|
112
|
115
|
</el-option>
|
113
|
116
|
</el-select>
|
114
|
117
|
</el-form-item>
|
115
|
|
- <el-form-item label="指控范围" :label-width="formLabelWidth">
|
116
|
|
- <el-input style="width:200px" v-model="form.min_range"></el-input>
|
|
118
|
+ <el-form-item label="指控范围" :label-width="formLabelWidth" required prop="large_range">
|
|
119
|
+ <el-input style="width:200px" v-model="editform.min_range"></el-input>
|
117
|
120
|
-
|
118
|
|
- <el-input style="width:200px" v-model="form.large_range"></el-input>
|
|
121
|
+ <el-input style="width:200px" v-model="editform.large_range"></el-input>
|
119
|
122
|
</el-form-item>
|
120
|
123
|
<el-form-item label="排序" :label-width="formLabelWidth">
|
121
|
|
- <el-input style="width:200px" v-model="form.sort"></el-input>
|
|
124
|
+ <el-input style="width:200px" v-model="editform.sort"></el-input>
|
122
|
125
|
</el-form-item>
|
123
|
126
|
</el-form>
|
124
|
127
|
<div slot="footer" class="dialog-footer">
|
125
|
128
|
<el-button @click="editDialog = false">取 消</el-button>
|
126
|
|
- <el-button type="primary" @click="editDialog = false">保存</el-button>
|
|
129
|
+ <el-button type="primary" @click="EditConfiguration('editform')">保存</el-button>
|
127
|
130
|
</div>
|
128
|
131
|
</el-dialog>
|
129
|
132
|
</div>
|
|
@@ -137,7 +140,7 @@ import { GetOICData } from "@/api/qcd";
|
137
|
140
|
import PieChart from "../qcd/components/BarChart";
|
138
|
141
|
import { uParseTime } from "@/utils/tools";
|
139
|
142
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
140
|
|
-import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList }from "@/api/common/common";
|
|
143
|
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration }from "@/api/common/common";
|
141
|
144
|
export default {
|
142
|
145
|
name: "dialysisTotal",
|
143
|
146
|
data() {
|
|
@@ -150,6 +153,7 @@ export default {
|
150
|
153
|
tabActiveName: "control",
|
151
|
154
|
InspectionMajor:[],
|
152
|
155
|
InspectionMinor:[],
|
|
156
|
+ InspectionMinorTwo:[],
|
153
|
157
|
configuraData: [],
|
154
|
158
|
newDialog: false,
|
155
|
159
|
editDialog: false,
|
|
@@ -161,6 +165,14 @@ export default {
|
161
|
165
|
large_range: "",
|
162
|
166
|
sort:"",
|
163
|
167
|
},
|
|
168
|
+ editform:{
|
|
169
|
+ id:0,
|
|
170
|
+ inspectionMajor: "",
|
|
171
|
+ inspectionMinor: "",
|
|
172
|
+ min_range: "",
|
|
173
|
+ large_range: "",
|
|
174
|
+ sort:"",
|
|
175
|
+ },
|
164
|
176
|
rules: {
|
165
|
177
|
inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
|
166
|
178
|
inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
|
|
@@ -177,10 +189,20 @@ export default {
|
177
|
189
|
this.$router.push({ path: "/qcd/patientanalysis/checkStatistical" });
|
178
|
190
|
}
|
179
|
191
|
},
|
|
192
|
+
|
|
193
|
+ //编辑
|
180
|
194
|
handleEdit(id) {
|
181
|
195
|
this.editDialog = true;
|
182
|
196
|
getConfigurationDetail(id).then(response=>{
|
183
|
197
|
if(response.data.state == 1){
|
|
198
|
+ var configurationdetail = response.data.data.configurationdetail
|
|
199
|
+ console.log("详情",configurationdetail)
|
|
200
|
+ this.editform.id = configurationdetail.id
|
|
201
|
+ this.editform.inspectionMajor = configurationdetail.inspection_major
|
|
202
|
+ this.editform.inspectionMinor = configurationdetail.inspection_minor
|
|
203
|
+ this.editform.large_range = configurationdetail.large_range
|
|
204
|
+ this.editform.min_range = configurationdetail.min_range
|
|
205
|
+ this.editform.sort = configurationdetail.sort
|
184
|
206
|
}
|
185
|
207
|
})
|
186
|
208
|
},
|
|
@@ -190,23 +212,32 @@ export default {
|
190
|
212
|
getInspectionMajor().then(response=>{
|
191
|
213
|
if(response.data.state == 1){
|
192
|
214
|
var inspection = response.data.data.inspection
|
193
|
|
- console.log("inspection",inspection)
|
|
215
|
+ console.log("大项",inspection)
|
194
|
216
|
this.InspectionMajor = inspection
|
195
|
|
-
|
|
217
|
+
|
196
|
218
|
}
|
197
|
219
|
})
|
198
|
220
|
},
|
199
|
221
|
//获取小项
|
200
|
222
|
changeInspection(id){
|
201
|
|
- console.log("id----",id)
|
202
|
223
|
getInspectionMinor(id).then(response=>{
|
203
|
224
|
if(response.data.state == 1){
|
204
|
225
|
var inspection = response.data.data.inspection
|
205
|
|
- console.log("inspection",inspection)
|
|
226
|
+ console.log("小项",inspection)
|
206
|
227
|
this.InspectionMinor = inspection
|
207
|
228
|
}
|
208
|
229
|
})
|
209
|
230
|
},
|
|
231
|
+ changeInspectionTwo(id){
|
|
232
|
+ this.InspectionMinorTwo = []
|
|
233
|
+ getInspectionMinor(id).then(response=>{
|
|
234
|
+ if(response.data.state == 1){
|
|
235
|
+ var inspection = response.data.data.inspection
|
|
236
|
+ console.log("小项",inspection)
|
|
237
|
+ this.InspectionMinorTwo = inspection
|
|
238
|
+ }
|
|
239
|
+ })
|
|
240
|
+ },
|
210
|
241
|
// 获取指控范围
|
211
|
242
|
changeInspectionMonior(id){
|
212
|
243
|
getInspectionRange(id).then(response=>{
|
|
@@ -261,7 +292,49 @@ export default {
|
261
|
292
|
this.total = total
|
262
|
293
|
}
|
263
|
294
|
})
|
264
|
|
- }
|
|
295
|
+ },
|
|
296
|
+ //获取小项
|
|
297
|
+ getAllInspectionMinor(){
|
|
298
|
+ getAllInspectionMinor().then(response=>{
|
|
299
|
+ if(response.data.state == 1){
|
|
300
|
+ var minor = response.data.data.minor
|
|
301
|
+ this.InspectionMinorTwo = minor
|
|
302
|
+ console.log("minor",minor)
|
|
303
|
+ }
|
|
304
|
+ })
|
|
305
|
+ },
|
|
306
|
+ EditConfiguration(formName){
|
|
307
|
+ var sorts = this.editform.sort
|
|
308
|
+ var sort = parseInt(sorts)
|
|
309
|
+ this.editform.sort = sort
|
|
310
|
+ UpdateConfiguration(this.editform.id,this.editform).then(response=>{
|
|
311
|
+ if(response.data.state == 1){
|
|
312
|
+ var standard = response.data.data.standard
|
|
313
|
+ console.log("standard",standard)
|
|
314
|
+ this.$message.success("保存成功")
|
|
315
|
+ this.editDialog = false
|
|
316
|
+ this.getConfigurationList()
|
|
317
|
+ }
|
|
318
|
+ })
|
|
319
|
+ },
|
|
320
|
+ handleDelete(id) {
|
|
321
|
+ this.$confirm(
|
|
322
|
+ "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
|
|
323
|
+ "删除提示",
|
|
324
|
+ {
|
|
325
|
+ dangerouslyUseHTMLString: true,
|
|
326
|
+ confirmButtonText: "确定",
|
|
327
|
+ cancelButtonText: "取消",
|
|
328
|
+ type: "warning"
|
|
329
|
+ }
|
|
330
|
+ ).then(() => {
|
|
331
|
+ DeleteConfiguration(id).then(response => {
|
|
332
|
+ if (response.data.state === 1) {
|
|
333
|
+
|
|
334
|
+ }
|
|
335
|
+ });
|
|
336
|
+ });
|
|
337
|
+ },
|
265
|
338
|
},
|
266
|
339
|
components: {
|
267
|
340
|
PieChart,
|
|
@@ -272,7 +345,10 @@ export default {
|
272
|
345
|
this.getInspectionMajor()
|
273
|
346
|
//获取表格里面的数据
|
274
|
347
|
this.getConfigurationList()
|
|
348
|
+ //获取所有小项的数据
|
|
349
|
+ this.getAllInspectionMinor()
|
275
|
350
|
},
|
|
351
|
+
|
276
|
352
|
};
|
277
|
353
|
</script>
|
278
|
354
|
<style lang="scss">
|