|
@@ -25,28 +25,47 @@
|
25
|
25
|
</template>
|
26
|
26
|
</el-table-column>
|
27
|
27
|
</el-table>
|
|
28
|
+
|
|
29
|
+ <el-pagination
|
|
30
|
+ @size-change="handleSizeChange"
|
|
31
|
+ @current-change="handleCurrentChange"
|
|
32
|
+ :page-sizes="[10, 20, 30, 100]"
|
|
33
|
+ :page-size="10"
|
|
34
|
+ background
|
|
35
|
+ style="margin-top:20px;float: right"
|
|
36
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
37
|
+ :total="total">
|
|
38
|
+ </el-pagination>
|
28
|
39
|
</div>
|
29
|
40
|
|
30
|
41
|
<el-dialog title="新增" :visible.sync="newDialog">
|
31
|
|
- <el-form :model="form">
|
32
|
|
- <el-form-item label="检查大项" :label-width="formLabelWidth">
|
33
|
|
- <el-select v-model="form.region" placeholder="请选择检查大项">
|
34
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
35
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
42
|
+ <el-form :model="form" ref="form" :rules="rules">
|
|
43
|
+ <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
|
|
44
|
+ <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域" @change="changeInspectionMonior">
|
|
45
|
+ <el-option
|
|
46
|
+ v-for="it in InspectionMajor"
|
|
47
|
+ :key="it.project_id"
|
|
48
|
+ :value="it.project_id"
|
|
49
|
+ :label="it.project_name"
|
|
50
|
+ >
|
|
51
|
+ </el-option>
|
36
|
52
|
</el-select>
|
37
|
53
|
</el-form-item>
|
38
|
|
- <el-form-item label="检查频次(天)" :label-width="formLabelWidth">
|
39
|
|
- <el-input style="width:200px" v-model="form.name"></el-input>
|
|
54
|
+ <el-form-item label="检查频次(天)" :label-width="formLabelWidth" required prop="frequency">
|
|
55
|
+ <el-input style="width:200px" v-model="form.frequency"></el-input>
|
40
|
56
|
</el-form-item>
|
41
|
57
|
<el-form-item label="排序" :label-width="formLabelWidth">
|
42
|
|
- <el-input style="width:200px" v-model="form.name"></el-input>
|
|
58
|
+ <el-input style="width:200px" v-model="form.sort"></el-input>
|
43
|
59
|
</el-form-item>
|
44
|
60
|
</el-form>
|
45
|
61
|
<div slot="footer" class="dialog-footer">
|
46
|
62
|
<el-button @click="newDialog = false">取 消</el-button>
|
47
|
|
- <el-button type="primary" @click="newDialog = false">确 定</el-button>
|
|
63
|
+ <el-button type="primary" @click="SaveCheckConfiguration('form')">保存</el-button>
|
48
|
64
|
</div>
|
49
|
65
|
</el-dialog>
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
50
|
69
|
<el-dialog title="编辑" :visible.sync="editDialog">
|
51
|
70
|
<el-form :model="form">
|
52
|
71
|
<el-form-item label="检查大项" :label-width="formLabelWidth">
|
|
@@ -78,6 +97,7 @@ import { GetOICData } from "@/api/qcd";
|
78
|
97
|
import PieChart from "../qcd/components/BarChart";
|
79
|
98
|
import { uParseTime } from "@/utils/tools";
|
80
|
99
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
100
|
+import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList} from "@/api/common/common"
|
81
|
101
|
export default {
|
82
|
102
|
name: "dialysisTotal",
|
83
|
103
|
data() {
|
|
@@ -114,18 +134,25 @@ export default {
|
114
|
134
|
editDialog: false,
|
115
|
135
|
formLabelWidth: "120px",
|
116
|
136
|
form: {
|
117
|
|
- name: "",
|
118
|
|
- region: "",
|
119
|
|
- date1: "",
|
120
|
|
- date2: "",
|
121
|
|
- delivery: false,
|
122
|
|
- type: [],
|
123
|
|
- resource: "",
|
124
|
|
- desc: ""
|
125
|
|
- }
|
|
137
|
+ inspectionMajor:"",
|
|
138
|
+ frequency:"",
|
|
139
|
+ sort:"",
|
|
140
|
+ },
|
|
141
|
+ InspectionMajor:[],
|
|
142
|
+ rules: {
|
|
143
|
+ inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
|
|
144
|
+ frequency: [{ required: true, message: "检查频次不能为空" }],
|
|
145
|
+ },
|
|
146
|
+ limit:10,
|
|
147
|
+ page:1,
|
|
148
|
+ total:0,
|
126
|
149
|
};
|
127
|
150
|
},
|
128
|
|
- created() {},
|
|
151
|
+ created() {
|
|
152
|
+ //获取大项
|
|
153
|
+ this.getAllInspectionData(),
|
|
154
|
+ this.getAllCheckList()
|
|
155
|
+ },
|
129
|
156
|
methods: {
|
130
|
157
|
handleTabClick(tab, event) {
|
131
|
158
|
if (this.tabActiveName == "control") {
|
|
@@ -134,6 +161,46 @@ export default {
|
134
|
161
|
},
|
135
|
162
|
handleEdit() {
|
136
|
163
|
this.editDialog = true;
|
|
164
|
+ },
|
|
165
|
+ getAllInspectionData(){
|
|
166
|
+ getAllInspectionData().then(response=>{
|
|
167
|
+ if(response.data.state == 1){
|
|
168
|
+ var inspection = response.data.data.inspection
|
|
169
|
+ console.log("列表",inspection)
|
|
170
|
+ this.InspectionMajor = inspection
|
|
171
|
+ }
|
|
172
|
+ })
|
|
173
|
+ },
|
|
174
|
+ //新增
|
|
175
|
+ SaveCheckConfiguration(formName){
|
|
176
|
+ this.$refs[formName].validate(valid=>{
|
|
177
|
+ if(valid){
|
|
178
|
+ SaveCheckConfiguration(this.form).then(response=>{
|
|
179
|
+ if(response.data.state === 1){
|
|
180
|
+ var configuration = response.data.data.configuration
|
|
181
|
+ this.$message.success("保存成功")
|
|
182
|
+ this.newDialog = false
|
|
183
|
+ this.form.inspectionMajor = ""
|
|
184
|
+ this.form.frequency = ""
|
|
185
|
+ this.form.sort = ""
|
|
186
|
+ }else{
|
|
187
|
+ this.$message.error("检验检查项已存在,不能重复添加")
|
|
188
|
+ }
|
|
189
|
+ })
|
|
190
|
+ }
|
|
191
|
+ })
|
|
192
|
+ },
|
|
193
|
+ handleSizeChange(limit) {
|
|
194
|
+ this.limit = limit;
|
|
195
|
+
|
|
196
|
+ },
|
|
197
|
+ handleCurrentChange(page) {
|
|
198
|
+ this.page = page;
|
|
199
|
+
|
|
200
|
+ },
|
|
201
|
+ getAllCheckList(){
|
|
202
|
+ getAllCheckList(this.page,this.limit).then(response=>{
|
|
203
|
+ })
|
137
|
204
|
}
|
138
|
205
|
},
|
139
|
206
|
components: {
|