|
@@ -14,10 +14,16 @@
|
14
|
14
|
</el-col>
|
15
|
15
|
</el-row>
|
16
|
16
|
<div class="configTable">
|
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>
|
|
17
|
+ <el-table :data="checkList" border style="width: 100%">
|
|
18
|
+ <el-table-column prop="date" label="检验检查项" width="180">
|
|
19
|
+ <template slot-scope="scope">{{ scope.row.project_name }}</template>
|
|
20
|
+ </el-table-column>
|
|
21
|
+ <el-table-column prop="name" label="检查频次(天)" width="180">
|
|
22
|
+ <template slot-scope="scope">{{ scope.row.inspection_frequency }}</template>
|
|
23
|
+ </el-table-column>
|
|
24
|
+ <el-table-column prop="address" label="排序">
|
|
25
|
+ <template slot-scope="scope">{{ scope.row.sort }}</template>
|
|
26
|
+ </el-table-column>
|
21
|
27
|
<el-table-column label="操作" width="180">
|
22
|
28
|
<template slot-scope="scope">
|
23
|
29
|
<el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
@@ -41,7 +47,7 @@
|
41
|
47
|
<el-dialog title="新增" :visible.sync="newDialog">
|
42
|
48
|
<el-form :model="form" ref="form" :rules="rules">
|
43
|
49
|
<el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
|
44
|
|
- <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域" @change="changeInspectionMonior">
|
|
50
|
+ <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域">
|
45
|
51
|
<el-option
|
46
|
52
|
v-for="it in InspectionMajor"
|
47
|
53
|
:key="it.project_id"
|
|
@@ -108,28 +114,6 @@ export default {
|
108
|
114
|
{ path: false, name: "检验检查统计配置" }
|
109
|
115
|
],
|
110
|
116
|
tabActiveName: "query",
|
111
|
|
- tableData: [
|
112
|
|
- {
|
113
|
|
- date: "2016-05-02",
|
114
|
|
- name: "王小虎",
|
115
|
|
- address: "上海市普陀区金沙江路 1518 弄"
|
116
|
|
- },
|
117
|
|
- {
|
118
|
|
- date: "2016-05-04",
|
119
|
|
- name: "王小虎",
|
120
|
|
- address: "上海市普陀区金沙江路 1517 弄"
|
121
|
|
- },
|
122
|
|
- {
|
123
|
|
- date: "2016-05-01",
|
124
|
|
- name: "王小虎",
|
125
|
|
- address: "上海市普陀区金沙江路 1519 弄"
|
126
|
|
- },
|
127
|
|
- {
|
128
|
|
- date: "2016-05-03",
|
129
|
|
- name: "王小虎",
|
130
|
|
- address: "上海市普陀区金沙江路 1516 弄"
|
131
|
|
- }
|
132
|
|
- ],
|
133
|
117
|
newDialog: false,
|
134
|
118
|
editDialog: false,
|
135
|
119
|
formLabelWidth: "120px",
|
|
@@ -146,6 +130,7 @@ export default {
|
146
|
130
|
limit:10,
|
147
|
131
|
page:1,
|
148
|
132
|
total:0,
|
|
133
|
+ checkList:[],
|
149
|
134
|
};
|
150
|
135
|
},
|
151
|
136
|
created() {
|
|
@@ -166,7 +151,7 @@ export default {
|
166
|
151
|
getAllInspectionData().then(response=>{
|
167
|
152
|
if(response.data.state == 1){
|
168
|
153
|
var inspection = response.data.data.inspection
|
169
|
|
- console.log("列表",inspection)
|
|
154
|
+ //console.log("列表",inspection)
|
170
|
155
|
this.InspectionMajor = inspection
|
171
|
156
|
}
|
172
|
157
|
})
|
|
@@ -192,14 +177,26 @@ export default {
|
192
|
177
|
},
|
193
|
178
|
handleSizeChange(limit) {
|
194
|
179
|
this.limit = limit;
|
195
|
|
-
|
|
180
|
+ this.getAllCheckList()
|
196
|
181
|
},
|
197
|
182
|
handleCurrentChange(page) {
|
198
|
183
|
this.page = page;
|
199
|
|
-
|
|
184
|
+ this.getAllCheckList()
|
200
|
185
|
},
|
201
|
186
|
getAllCheckList(){
|
202
|
187
|
getAllCheckList(this.page,this.limit).then(response=>{
|
|
188
|
+ if(response.data.state == 1){
|
|
189
|
+ var checklist = response.data.data.checklist
|
|
190
|
+ for(let i=0;i<checklist.length;i++){
|
|
191
|
+ if(checklist[i].sort == 0){
|
|
192
|
+ checklist[i].sort = ""
|
|
193
|
+ }
|
|
194
|
+ }
|
|
195
|
+ console.log("列表",checklist)
|
|
196
|
+ this.checkList = checklist
|
|
197
|
+ this.total = response.data.data.total
|
|
198
|
+ console.log("total",this.total)
|
|
199
|
+ }
|
203
|
200
|
})
|
204
|
201
|
}
|
205
|
202
|
},
|