|
@@ -26,8 +26,8 @@
|
26
|
26
|
</el-table-column>
|
27
|
27
|
<el-table-column label="操作" width="180">
|
28
|
28
|
<template slot-scope="scope">
|
29
|
|
- <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
30
|
|
- <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
|
29
|
+ <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
|
|
30
|
+ <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
|
31
|
31
|
</template>
|
32
|
32
|
</el-table-column>
|
33
|
33
|
</el-table>
|
|
@@ -73,23 +73,28 @@
|
73
|
73
|
|
74
|
74
|
|
75
|
75
|
<el-dialog title="编辑" :visible.sync="editDialog">
|
76
|
|
- <el-form :model="form">
|
77
|
|
- <el-form-item label="检查大项" :label-width="formLabelWidth">
|
78
|
|
- <el-select v-model="form.region" placeholder="请选择检查大项">
|
79
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
80
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
76
|
+ <el-form :model="editform" ref="editform" :rules="rules">
|
|
77
|
+ <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
|
|
78
|
+ <el-select v-model="editform.inspectionMajor" placeholder="请选择活动区域">
|
|
79
|
+ <el-option
|
|
80
|
+ v-for="it in InspectionMajor"
|
|
81
|
+ :key="it.project_id"
|
|
82
|
+ :value="it.project_id"
|
|
83
|
+ :label="it.project_name"
|
|
84
|
+ >
|
|
85
|
+ </el-option>
|
81
|
86
|
</el-select>
|
82
|
87
|
</el-form-item>
|
83
|
|
- <el-form-item label="检查频次(天)" :label-width="formLabelWidth">
|
84
|
|
- <el-input style="width:200px" v-model="form.name"></el-input>
|
|
88
|
+ <el-form-item label="检查频次(天)" :label-width="formLabelWidth" required prop="frequency">
|
|
89
|
+ <el-input style="width:200px" v-model="editform.frequency"></el-input>
|
85
|
90
|
</el-form-item>
|
86
|
|
- <el-form-item label="排序" :label-width="formLabelWidth">
|
87
|
|
- <el-input style="width:200px" v-model="form.name"></el-input>
|
|
91
|
+ <el-form-item label="排序" :label-width="formLabelWidth" >
|
|
92
|
+ <el-input style="width:200px" v-model="editform.sort"></el-input>
|
88
|
93
|
</el-form-item>
|
89
|
94
|
</el-form>
|
90
|
95
|
<div slot="footer" class="dialog-footer">
|
91
|
96
|
<el-button @click="editDialog = false">取 消</el-button>
|
92
|
|
- <el-button type="primary" @click="editDialog = false">确 定</el-button>
|
|
97
|
+ <el-button type="primary" @click="UpdateCheck('editform')">保存</el-button>
|
93
|
98
|
</div>
|
94
|
99
|
</el-dialog>
|
95
|
100
|
</div>
|
|
@@ -103,7 +108,7 @@ import { GetOICData } from "@/api/qcd";
|
103
|
108
|
import PieChart from "../qcd/components/BarChart";
|
104
|
109
|
import { uParseTime } from "@/utils/tools";
|
105
|
110
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
106
|
|
-import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList} from "@/api/common/common"
|
|
111
|
+import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList,getCheckDetail,UpdateCheck,DeleteCheck} from "@/api/common/common"
|
107
|
112
|
export default {
|
108
|
113
|
name: "dialysisTotal",
|
109
|
114
|
data() {
|
|
@@ -122,6 +127,12 @@ export default {
|
122
|
127
|
frequency:"",
|
123
|
128
|
sort:"",
|
124
|
129
|
},
|
|
130
|
+ editform:{
|
|
131
|
+ id:0,
|
|
132
|
+ inspectionMajor:"",
|
|
133
|
+ frequency:"",
|
|
134
|
+ sort:"",
|
|
135
|
+ },
|
125
|
136
|
InspectionMajor:[],
|
126
|
137
|
rules: {
|
127
|
138
|
inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
|
|
@@ -144,8 +155,18 @@ export default {
|
144
|
155
|
this.$router.push({ path: "/qcd/patientanalysis/statisticalConfig" });
|
145
|
156
|
}
|
146
|
157
|
},
|
147
|
|
- handleEdit() {
|
|
158
|
+ handleEdit(id) {
|
148
|
159
|
this.editDialog = true;
|
|
160
|
+ getCheckDetail(id).then(response=>{
|
|
161
|
+ if(response.data.state == 1){
|
|
162
|
+ var checkdetail = response.data.data.checkdetail
|
|
163
|
+ console.log("checkdetail",checkdetail)
|
|
164
|
+ this.editform.id = checkdetail.id
|
|
165
|
+ this.editform.inspectionMajor = checkdetail.inspection_major
|
|
166
|
+ this.editform.frequency = checkdetail.inspection_frequency
|
|
167
|
+ this.editform.sort = checkdetail.sort
|
|
168
|
+ }
|
|
169
|
+ })
|
149
|
170
|
},
|
150
|
171
|
getAllInspectionData(){
|
151
|
172
|
getAllInspectionData().then(response=>{
|
|
@@ -198,6 +219,46 @@ export default {
|
198
|
219
|
console.log("total",this.total)
|
199
|
220
|
}
|
200
|
221
|
})
|
|
222
|
+ },
|
|
223
|
+ UpdateCheck(formName){
|
|
224
|
+ var sort = this.editform.sort
|
|
225
|
+ var sorts = parseInt(sort)
|
|
226
|
+ this.editform.sort = sorts
|
|
227
|
+ this.$refs[formName].validate(valid=>{
|
|
228
|
+ if(valid){
|
|
229
|
+ UpdateCheck(this.editform.id,this.editform).then(response=>{
|
|
230
|
+
|
|
231
|
+ if(response.data.state == 1){
|
|
232
|
+ var configuration = response.data.data.configuration
|
|
233
|
+ this.editDialog = false
|
|
234
|
+ this.getAllCheckList()
|
|
235
|
+ this.$message.success("保存成功")
|
|
236
|
+ }else{
|
|
237
|
+ this.$message.error("检验检查项已存在")
|
|
238
|
+ }
|
|
239
|
+ })
|
|
240
|
+ }
|
|
241
|
+ })
|
|
242
|
+ },
|
|
243
|
+ handleDelete(id,index){
|
|
244
|
+ this.$confirm(
|
|
245
|
+ "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
|
|
246
|
+ "删除提示",
|
|
247
|
+ {
|
|
248
|
+ dangerouslyUseHTMLString: true,
|
|
249
|
+ confirmButtonText: "确定",
|
|
250
|
+ cancelButtonText: "取消",
|
|
251
|
+ type: "warning"
|
|
252
|
+ }
|
|
253
|
+ ).then(() => {
|
|
254
|
+ DeleteCheck(id,index).then(response => {
|
|
255
|
+ if (response.data.state === 1) {
|
|
256
|
+ var msg = response.data.data.msg
|
|
257
|
+ console.log("msg",msg)
|
|
258
|
+ this.checkList.splice(index,1)
|
|
259
|
+ }
|
|
260
|
+ });
|
|
261
|
+ });
|
201
|
262
|
}
|
202
|
263
|
},
|
203
|
264
|
components: {
|