Browse Source

Merge branch 'vue_statistics_branch' of http://git.shengws.com/csx/Vue_New into vue_statistics_branch

csx 4 years ago
parent
commit
154dfeb802

+ 53 - 0
src/api/common/common.js View File

@@ -77,3 +77,56 @@ export function DeleteConfiguration(id, params) {
77 77
     params: params
78 78
   })
79 79
 }
80
+
81
+export function getAllInspectionData(params) {
82
+  return request({
83
+    url: 'com/api/getallinspectiondata',
84
+    method: 'get',
85
+    params: params
86
+  })
87
+}
88
+
89
+export function SaveCheckConfiguration(data) {
90
+  console.log('data', data)
91
+  return request({
92
+    url: '/com/api/savecheckconfiguration',
93
+    method: 'post',
94
+    data: data
95
+  })
96
+}
97
+
98
+export function getAllCheckList(page, limit) {
99
+  const params = {
100
+    page: page,
101
+    limit: limit
102
+  }
103
+  return request({
104
+    url: '/com/api/getallchecklist',
105
+    method: 'get',
106
+    params: params
107
+  })
108
+}
109
+
110
+export function getCheckDetail(id, params) {
111
+  return request({
112
+    url: '/com/api/getcheckdetail?id=' + id,
113
+    method: 'get',
114
+    params: params
115
+  })
116
+}
117
+
118
+export function UpdateCheck(id, data) {
119
+  return request({
120
+    url: '/com/api/updatecheck?id=' + id,
121
+    method: 'post',
122
+    data: data
123
+  })
124
+}
125
+
126
+export function DeleteCheck(id, params) {
127
+  return request({
128
+    url: '/com/api/deletecheck?id=' + id,
129
+    method: 'delete',
130
+    params: params
131
+  })
132
+}

+ 18 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue View File

@@ -86,13 +86,13 @@
86 86
           (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-左') > -1 ? true : false" showValue="左"></label-box>
87 87
               <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-右') > -1 ? true : false" showValue="右"></label-box>)部位
88 88
           &nbsp;
89
-          <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内') > -1 ? true : false" showValue="颈内"></label-box>
89
+          <label-box :isChecked="getPartName(predialysis.blood_access_part_id).indexOf('颈内') > -1 ? true : false" showValue="颈内"></label-box>
90 90
           &nbsp;
91
-          <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('锁骨下') > -1 ? true : false" showValue="锁骨下"></label-box>
91
+          <label-box :isChecked="getPartName(predialysis.blood_access_part_id).indexOf('锁骨下') > -1 ? true : false" showValue="锁骨下"></label-box>
92 92
           &nbsp;
93
-          <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('股') > -1 ? true : false" showValue="股"></label-box>
93
+          <label-box :isChecked="getPartName(predialysis.blood_access_part_id).indexOf('股') > -1 ? true : false" showValue="股"></label-box>
94 94
           &nbsp;
95
-          <label-box :isChecked="['内瘘-左','内瘘-右','中心静脉置管-左','中心静脉置管-右','颈内','锁骨下','股'].indexOf(predialysis.blood_access_part_opera_name) == -1? true : false" showValue="其他"></label-box>
95
+          <label-box :isChecked="getPartName(predialysis.blood_access_part_id).indexOf('其他') > -1? true : false" showValue="其他"></label-box>
96 96
           &nbsp;
97 97
         </div>
98 98
       </div>
@@ -1202,6 +1202,13 @@ export default {
1202 1202
           // checker: 0,
1203 1203
         }
1204 1204
       );
1205
+    },
1206
+    getPartName(id) {
1207
+      for (let i = 0; i < this.vascularAccess.length; i++) {
1208
+        if (this.vascularAccess[i].id == id) {
1209
+          return this.vascularAccess[i].name;
1210
+        }
1211
+      }
1205 1212
     }
1206 1213
   },
1207 1214
   watch: {
@@ -1249,6 +1256,13 @@ export default {
1249 1256
     this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
1250 1257
     this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
1251 1258
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1259
+    var vascularAccess = getDataConfig("hemodialysis", "vascular_access");
1260
+    this.vascularAccess = vascularAccess;
1261
+    //console.log("hhe", vascularAccess);
1262
+    console.log(
1263
+      "血管通路部位",
1264
+      getDataConfig("hemodialysis", "vascular_access")
1265
+    );
1252 1266
 
1253 1267
     var bloodAccessParOpera = getDataConfig(
1254 1268
       "hemodialysis",

+ 183 - 58
src/xt_pages/qcd/checkStatistical.vue View File

@@ -14,57 +14,87 @@
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
-              <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
24
-              <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>
25 31
             </template>
26 32
           </el-table-column>
27 33
         </el-table>
34
+
35
+          <el-pagination
36
+              @size-change="handleSizeChange"
37
+              @current-change="handleCurrentChange"
38
+              :page-sizes="[10, 20, 30, 100]"
39
+              :page-size="10"
40
+              background
41
+              style="margin-top:20px;float: right"
42
+              layout="total, sizes, prev, pager, next, jumper"
43
+              :total="total">
44
+          </el-pagination>
28 45
       </div>
29 46
 
30 47
       <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>
48
+        <el-form :model="form" ref="form" :rules="rules">
49
+          <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
50
+            <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域">
51
+                <el-option
52
+                  v-for="it in InspectionMajor"
53
+                  :key="it.project_id"
54
+                  :value="it.project_id"
55
+                  :label="it.project_name"
56
+                  >
57
+                </el-option>
36 58
             </el-select>
37 59
           </el-form-item>
38
-          <el-form-item label="检查频次(天)" :label-width="formLabelWidth">
39
-            <el-input style="width:200px" v-model="form.name"></el-input>
60
+          <el-form-item label="检查频次(天)" :label-width="formLabelWidth" required prop="frequency">
61
+            <el-input style="width:200px" v-model="form.frequency"></el-input>
40 62
           </el-form-item>
41 63
           <el-form-item label="排序" :label-width="formLabelWidth">
42
-            <el-input style="width:200px" v-model="form.name"></el-input>
64
+            <el-input style="width:200px" v-model="form.sort"></el-input>
43 65
           </el-form-item>
44 66
         </el-form>
45 67
         <div slot="footer" class="dialog-footer">
46 68
           <el-button @click="newDialog = false">取 消</el-button>
47
-          <el-button type="primary" @click="newDialog = false">确 定</el-button>
69
+          <el-button type="primary" @click="SaveCheckConfiguration('form')">保存</el-button>
48 70
         </div>
49 71
       </el-dialog>
72
+
73
+
74
+
50 75
       <el-dialog title="编辑" :visible.sync="editDialog">
51
-        <el-form :model="form">
52
-          <el-form-item label="检查大项" :label-width="formLabelWidth">
53
-            <el-select v-model="form.region" placeholder="请选择活动区域">
54
-              <el-option label="区域一" value="shanghai"></el-option>
55
-              <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>
56 86
             </el-select>
57 87
           </el-form-item>
58
-          <el-form-item label="检查频次(天)" :label-width="formLabelWidth">
59
-            <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>
60 90
           </el-form-item>
61
-          <el-form-item label="排序" :label-width="formLabelWidth">
62
-            <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>
63 93
           </el-form-item>
64 94
         </el-form>
65 95
         <div slot="footer" class="dialog-footer">
66 96
           <el-button @click="editDialog = false">取 消</el-button>
67
-          <el-button type="primary" @click="editDialog = false">确 定</el-button>
97
+          <el-button type="primary" @click="UpdateCheck('editform')">保存</el-button>
68 98
         </div>
69 99
       </el-dialog>
70 100
     </div>
@@ -78,6 +108,7 @@ import { GetOICData } from "@/api/qcd";
78 108
 import PieChart from "../qcd/components/BarChart";
79 109
 import { uParseTime } from "@/utils/tools";
80 110
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
111
+import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList,getCheckDetail,UpdateCheck,DeleteCheck} from "@/api/common/common"
81 112
 export default {
82 113
   name: "dialysisTotal",
83 114
   data() {
@@ -88,52 +119,146 @@ export default {
88 119
         { path: false, name: "检验检查统计配置" }
89 120
       ],
90 121
       tabActiveName: "query",
91
-      tableData: [
92
-        {
93
-          date: "2016-05-02",
94
-          name: "王小虎",
95
-          address: "上海市普陀区金沙江路 1518 弄"
96
-        },
97
-        {
98
-          date: "2016-05-04",
99
-          name: "王小虎",
100
-          address: "上海市普陀区金沙江路 1517 弄"
101
-        },
102
-        {
103
-          date: "2016-05-01",
104
-          name: "王小虎",
105
-          address: "上海市普陀区金沙江路 1519 弄"
106
-        },
107
-        {
108
-          date: "2016-05-03",
109
-          name: "王小虎",
110
-          address: "上海市普陀区金沙江路 1516 弄"
111
-        }
112
-      ],
113 122
       newDialog: false,
114 123
       editDialog: false,
115 124
       formLabelWidth: "120px",
116 125
       form: {
117
-        name: "",
118
-        region: "",
119
-        date1: "",
120
-        date2: "",
121
-        delivery: false,
122
-        type: [],
123
-        resource: "",
124
-        desc: ""
125
-      }
126
+        inspectionMajor:"",
127
+        frequency:"",
128
+        sort:"",
129
+      },
130
+      editform:{
131
+        id:0,
132
+        inspectionMajor:"",
133
+        frequency:"",
134
+        sort:"",
135
+      },
136
+     InspectionMajor:[],
137
+     rules: {
138
+        inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
139
+        frequency: [{ required: true, message: "检查频次不能为空" }],
140
+      },
141
+      limit:10,
142
+      page:1,
143
+      total:0,
144
+      checkList:[],
126 145
     };
127 146
   },
128
-  created() {},
147
+  created() {
148
+    //获取大项
149
+    this.getAllInspectionData(),
150
+    this.getAllCheckList()
151
+  },
129 152
   methods: {
130 153
     handleTabClick(tab, event) {
131 154
       if (this.tabActiveName == "control") {
132 155
         this.$router.push({ path: "/qcd/patientanalysis/statisticalConfig" });
133 156
       }
134 157
     },
135
-    handleEdit() {
158
+    handleEdit(id) {
136 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
+       })
170
+    },
171
+    getAllInspectionData(){
172
+      getAllInspectionData().then(response=>{
173
+        if(response.data.state == 1){
174
+          var inspection =  response.data.data.inspection
175
+          //console.log("列表",inspection)
176
+          this.InspectionMajor = inspection
177
+        }
178
+      })
179
+    },
180
+    //新增
181
+    SaveCheckConfiguration(formName){
182
+       this.$refs[formName].validate(valid=>{
183
+         if(valid){
184
+           SaveCheckConfiguration(this.form).then(response=>{
185
+              if(response.data.state === 1){
186
+                var configuration =  response.data.data.configuration
187
+                this.$message.success("保存成功")
188
+                this.newDialog = false
189
+                this.form.inspectionMajor = ""
190
+                this.form.frequency = ""
191
+                this.form.sort = ""
192
+              }else{
193
+                this.$message.error("检验检查项已存在,不能重复添加")
194
+              }
195
+           })
196
+         }
197
+       })
198
+    },
199
+    handleSizeChange(limit) {
200
+      this.limit = limit;
201
+      this.getAllCheckList()
202
+    },
203
+    handleCurrentChange(page) {
204
+      this.page = page;
205
+      this.getAllCheckList()
206
+    },
207
+    getAllCheckList(){
208
+      getAllCheckList(this.page,this.limit).then(response=>{
209
+        if(response.data.state == 1){
210
+          var checklist = response.data.data.checklist
211
+          for(let i=0;i<checklist.length;i++){
212
+            if(checklist[i].sort == 0){
213
+              checklist[i].sort = ""
214
+            }
215
+          }
216
+          console.log("列表",checklist)
217
+          this.checkList = checklist
218
+          this.total = response.data.data.total
219
+          console.log("total",this.total)
220
+        }
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
+      });
137 262
     }
138 263
   },
139 264
   components: {

+ 1 - 6
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue View File

@@ -64,12 +64,7 @@
64 64
               <line-chart :options="chart"></line-chart>
65 65
             </div>
66 66
             <div class="cell clearfix" style="margin:0;margin-bottom:10px">
67
-              <div class="tableTitle" style="margin:0 20px 0 0;">统计表</div>
68
-              <el-input v-model="input" placeholder="收缩压" style="width: 80px;"></el-input>&nbsp;-&nbsp;
69
-              <el-input v-model="input" placeholder="收缩压" style="width: 80px;"></el-input>&nbsp;/&nbsp;
70
-              <el-input v-model="input" placeholder="舒张压" style="width: 80px;"></el-input>&nbsp;-&nbsp;
71
-              <el-input v-model="input" placeholder="舒张压" style="width: 80px;"></el-input>
72
-              <el-button type="primary">查询</el-button>
67
+              <div class="tableTitle">统计表</div>
73 68
             </div>
74 69
             <div>
75 70
               <el-table :data="tableData1" style="width: 100%" border>

+ 10 - 10
src/xt_pages/qcd/statisticalConfiguration.vue View File

@@ -18,7 +18,7 @@
18 18
           <el-table-column prop="date" label="检验检查大项" width="180">
19 19
               <template slot-scope="scope">{{ scope.row.project_name }}</template>
20 20
           </el-table-column>
21
-          <el-table-column prop="name" label="检查小项" width="180">
21
+          <el-table-column prop="name" label="检查小项" width="300">
22 22
              <template slot-scope="scope">{{ scope.row.item_name }}</template>
23 23
           </el-table-column>
24 24
           <el-table-column prop="address" label="范围">
@@ -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.row.id)">删除</el-button>
36
+              <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
37 37
             </template>
38 38
           </el-table-column>
39 39
         </el-table>
@@ -53,7 +53,7 @@
53 53
       <el-dialog title="新增" :visible.sync="newDialog">
54 54
         <el-form :model="form" ref="form" :rules="rules">
55 55
           <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
56
-            <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域" @change="changeInspection">
56
+            <el-select v-model="form.inspectionMajor" placeholder="请选择检查大项" @change="changeInspection">
57 57
                <el-option
58 58
                   v-for="item in InspectionMajor"
59 59
                   :key="item.project_id"
@@ -64,7 +64,7 @@
64 64
             </el-select>
65 65
           </el-form-item>
66 66
           <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
67
-            <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域" @change="changeInspectionMonior">
67
+            <el-select v-model="form.inspectionMinor" placeholder="请选择检查小项" @change="changeInspectionMonior">
68 68
                 <el-option
69 69
                   v-for="it in InspectionMinor"
70 70
                   :key="it.id"
@@ -85,7 +85,7 @@
85 85
         </el-form>
86 86
         <div slot="footer" class="dialog-footer">
87 87
           <el-button @click="newDialog = false">取 消</el-button>
88
-          <el-button type="primary" @click="saveInspection('form')">保存</el-button>
88
+          <el-button type="primary" @click="saveInspection('form')">保 存</el-button>
89 89
         </div>
90 90
       </el-dialog>
91 91
 
@@ -94,7 +94,7 @@
94 94
       <el-dialog title="编辑" :visible.sync="editDialog">
95 95
         <el-form :model="editform" ref="editform" :rules="rules">
96 96
           <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
97
-            <el-select v-model="editform.inspectionMajor" placeholder="请选择活动区域" @change="changeInspectionTwo">
97
+            <el-select v-model="editform.inspectionMajor" placeholder="请选择检查大项" @change="changeInspectionTwo">
98 98
               <el-option
99 99
                   v-for="patient in InspectionMajor"
100 100
                   :key="patient.project_id"
@@ -105,7 +105,7 @@
105 105
             </el-select>
106 106
           </el-form-item>
107 107
           <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
108
-            <el-select v-model="editform.inspectionMinor" placeholder="请选择活动区域"  @change="changeInspectionMonior">
108
+            <el-select v-model="editform.inspectionMinor" placeholder="请选择检查小项"  @change="changeInspectionMonior">
109 109
                <el-option
110 110
                   v-for="item in InspectionMinorTwo"
111 111
                   :key="item.id"
@@ -126,7 +126,7 @@
126 126
         </el-form>
127 127
         <div slot="footer" class="dialog-footer">
128 128
           <el-button @click="editDialog = false">取 消</el-button>
129
-          <el-button type="primary" @click="EditConfiguration('editform')">保存</el-button>
129
+          <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
130 130
         </div>
131 131
       </el-dialog>
132 132
     </div>
@@ -317,7 +317,7 @@ export default {
317 317
         }
318 318
       })
319 319
     },
320
-   handleDelete(id) {
320
+   handleDelete(id,index) {
321 321
       this.$confirm(
322 322
         "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
323 323
         "删除提示",
@@ -328,7 +328,7 @@ export default {
328 328
           type: "warning"
329 329
         }
330 330
       ).then(() => {
331
-        DeleteConfiguration(id).then(response => {
331
+        DeleteConfiguration(id,index).then(response => {
332 332
           if (response.data.state === 1) {
333 333
            var msg =  response.data.data.msg
334 334
            console.log("msg",msg)