浏览代码

打印单

XMLWAN 5 年前
父节点
当前提交
359447cba4
共有 2 个文件被更改,包括 47 次插入35 次删除
  1. 14 6
      src/api/common/common.js
  2. 33 29
      src/xt_pages/qcd/statisticalConfiguration.vue

+ 14 - 6
src/api/common/common.js 查看文件

4
 export function getInspectionMajor(params) {
4
 export function getInspectionMajor(params) {
5
   return request({
5
   return request({
6
     url: '/com/api/getinspectionmajor',
6
     url: '/com/api/getinspectionmajor',
7
-    methods: 'get',
7
+    method: 'get',
8
     params: params
8
     params: params
9
   })
9
   })
10
 }
10
 }
12
 export function getInspectionMinor(id, params) {
12
 export function getInspectionMinor(id, params) {
13
   return request({
13
   return request({
14
     url: '/com/api/getinspectionminor?id=' + id,
14
     url: '/com/api/getinspectionminor?id=' + id,
15
-    methods: 'get',
15
+    method: 'get',
16
     params: params
16
     params: params
17
   })
17
   })
18
 }
18
 }
20
 export function getInspectionRange(id, params) {
20
 export function getInspectionRange(id, params) {
21
   return request({
21
   return request({
22
     url: '/com/api/getinspectionrange?id=' + id,
22
     url: '/com/api/getinspectionrange?id=' + id,
23
-    methods: 'get',
23
+    method: 'get',
24
     params: params
24
     params: params
25
   })
25
   })
26
 }
26
 }
27
 
27
 
28
-export function saveInspection(data) {
28
+export function saveConfiguration(data) {
29
   console.log('data', data)
29
   console.log('data', data)
30
   return request({
30
   return request({
31
-    url: '/com/api/saveinspction',
32
-    methods: 'post',
31
+    url: '/com/api/saveconfiguration',
32
+    method: 'post',
33
     data: data
33
     data: data
34
   })
34
   })
35
 }
35
 }
36
+
37
+export function getConfigurationList(params) {
38
+  return request({
39
+    url: 'com/api/getconfigurationlist',
40
+    method: 'get',
41
+    params: params
42
+  })
43
+}

+ 33 - 29
src/xt_pages/qcd/statisticalConfiguration.vue 查看文件

14
         </el-col>
14
         </el-col>
15
       </el-row>
15
       </el-row>
16
       <div class="configTable">
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>
21
-           <el-table-column prop="address" label="单位"></el-table-column>
17
+        <el-table :data="configuraData" border style="width: 100%">
18
+          <el-table-column prop="date" label="检验检查大项" width="180">
19
+              <template slot-scope="scope">{{ scope.row.inspection_major }}</template>
20
+          </el-table-column>
21
+          <el-table-column prop="name" label="检查小项" width="180">
22
+             <template slot-scope="scope">{{ scope.row.inspection_minor }}</template>
23
+          </el-table-column>
24
+          <el-table-column prop="address" label="范围">
25
+             <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
26
+          </el-table-column>
27
+           <el-table-column prop="address" label="单位">
28
+              <template slot-scope="scope">{{ scope.row.min_range }}</template>
29
+            </el-table-column>
22
             <el-table-column prop="address" label="排序"></el-table-column>
30
             <el-table-column prop="address" label="排序"></el-table-column>
23
           <el-table-column label="操作" width="180">
31
           <el-table-column label="操作" width="180">
24
             <template slot-scope="scope">
32
             <template slot-scope="scope">
116
 import PieChart from "../qcd/components/BarChart";
124
 import PieChart from "../qcd/components/BarChart";
117
 import { uParseTime } from "@/utils/tools";
125
 import { uParseTime } from "@/utils/tools";
118
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
126
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
119
-import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveInspection }from "@/api/common/common";
127
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList }from "@/api/common/common";
120
 export default {
128
 export default {
121
   name: "dialysisTotal",
129
   name: "dialysisTotal",
122
   data() {
130
   data() {
129
       tabActiveName: "control",
137
       tabActiveName: "control",
130
       InspectionMajor:[],
138
       InspectionMajor:[],
131
       InspectionMinor:[],
139
       InspectionMinor:[],
132
-      tableData: [
133
-        {
134
-          date: "2016-05-02",
135
-          name: "王小虎",
136
-          address: "上海市普陀区金沙江路 1518 弄"
137
-        },
138
-        {
139
-          date: "2016-05-04",
140
-          name: "王小虎",
141
-          address: "上海市普陀区金沙江路 1517 弄"
142
-        },
143
-        {
144
-          date: "2016-05-01",
145
-          name: "王小虎",
146
-          address: "上海市普陀区金沙江路 1519 弄"
147
-        },
148
-        {
149
-          date: "2016-05-03",
150
-          name: "王小虎",
151
-          address: "上海市普陀区金沙江路 1516 弄"
152
-        }
153
-      ],
140
+      configuraData: [],
154
       newDialog: false,
141
       newDialog: false,
155
       editDialog: false,
142
       editDialog: false,
156
       formLabelWidth: "120px",
143
       formLabelWidth: "120px",
214
     saveInspection(formName){
201
     saveInspection(formName){
215
       this.$refs[formName].validate(valid=>{
202
       this.$refs[formName].validate(valid=>{
216
         if(valid){
203
         if(valid){
217
-          saveInspection(this.form).then(response=>{
204
+          saveConfiguration(this.form).then(response=>{
218
             if(response.data.state == 1){
205
             if(response.data.state == 1){
219
              var standard = response.data.data.standard
206
              var standard = response.data.data.standard
220
              this.$message.success("保存成功")
207
              this.$message.success("保存成功")
208
+             this.newDialog = false
209
+             this.form.inspectionMajor = ""
210
+             this.form.inspectionMinor = ""
211
+             this.form.large_range = ""
212
+             this.form.min_range = ""
213
+             this.form.sort = ""
221
             }
214
             }
222
           })
215
           })
223
         }
216
         }
224
       })
217
       })
218
+    },
219
+    getConfigurationList(){
220
+      getConfigurationList().then(response=>{
221
+        if(response.data.state === 1){
222
+          var configurationlist = response.data.data.configurationlist
223
+          console.log("列表",configurationlist)
224
+          this.configuraData = configurationlist
225
+        }
226
+      })
225
     }
227
     }
226
   },
228
   },
227
   components: {
229
   components: {
231
    created() {
233
    created() {
232
      //获取检查大项数据来源
234
      //获取检查大项数据来源
233
        this.getInspectionMajor()
235
        this.getInspectionMajor()
236
+    //获取表格里面的数据
237
+    this.getConfigurationList()
234
    },
238
    },
235
 };
239
 };
236
 </script>
240
 </script>