See999 4 years ago
parent
commit
4104037faa

+ 2 - 2
config/dev.env.js View File

@@ -6,8 +6,8 @@
6 6
 module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9
-  BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  // BASE_API:'"http://localhost:9531"',
9
+  // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
+  BASE_API:'"http://localhost:9531"',
11 11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 13
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 2
config/index.js View File

@@ -19,8 +19,8 @@ module.exports = {
19 19
 
20 20
     // host: 'xt.test.sgjyun.com',
21 21
     // host: 'xt.kuyicloud.com',
22
-    host: 'xt.test.sgjyun.com',
23
-    // host:'localhost',
22
+    // host: 'xt.test.sgjyun.com',
23
+    host:'localhost',
24 24
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
25 25
     autoOpenBrowser: true,
26 26
     errorOverlay: true,

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

@@ -73,7 +73,36 @@ export function UpdateConfiguration(id, data) {
73 73
 export function DeleteConfiguration(id, params) {
74 74
   return request({
75 75
     url: 'com/api/deleteconfiguration?id=' + id,
76
+    method: 'delete',
77
+    params: params
78
+  })
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',
76 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',
77 106
     params: params
78 107
   })
79 108
 }

+ 86 - 19
src/xt_pages/qcd/checkStatistical.vue View File

@@ -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: {

+ 6 - 4
src/xt_pages/qcd/statisticalConfiguration.vue View File

@@ -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>
@@ -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,9 +328,11 @@ 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
+           console.log("msg",msg)
335
+           this.configuraData.splice(index,1)
334 336
           }
335 337
         });
336 338
       });

+ 2 - 2
src/xt_pages/user/patients.vue View File

@@ -79,8 +79,8 @@
79 79
         <br/>
80 80
         <br/>
81 81
         <span>{{getContent(item)}}</span>
82
-        <span style="color:blue" @click="generateTxt(item)">点击</span>
83
-        <span>查看详情</span>
82
+        <span >点击</span>
83
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
84 84
         <br/>
85 85
         <br/>
86 86
       </div>

+ 8 - 6
src/xt_pages/workforce/appointment.vue View File

@@ -28,8 +28,8 @@
28 28
         <br/>
29 29
         <br/>
30 30
         <span>{{getContent(item)}}</span>
31
-        <span style="color:blue" @click="generateTxt(item)">点击</span>
32
-        <span>查看详情</span>
31
+        <span >点击</span>
32
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
33 33
         <br/>
34 34
         <br/>
35 35
       </div>
@@ -635,10 +635,10 @@
635 635
         let deviceNumber = []
636 636
 
637 637
         for (let i = 0; i < results.length; i++) {
638
-          if (results[i + 1] && results[i + 1]['区号'] != undefined) {
638
+          if (results[i + 1]) {
639 639
             zones.push(results[i + 1]['区号'])
640 640
           }
641
-          if (results[i + 1] && results[i + 1]['机号'] != undefined) {
641
+          if (results[i + 1]) {
642 642
             deviceNumber.push(results[i + 1]['机号'])
643 643
           }
644 644
 
@@ -656,6 +656,8 @@
656 656
           return cur
657 657
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
658 658
 
659
+
660
+
659 661
         var total_zones = []
660 662
         var total_device_number = []
661 663
 
@@ -678,11 +680,11 @@
678 680
           }
679 681
         }
680 682
 
681
-        console.log(deviceNumber)
682
-        console.log(total_device_number)
683
+
683 684
 
684 685
         for (let i = 0; i < deviceNumber.length; i++) {
685 686
           if (!total_device_number.includes(deviceNumber[i])) {
687
+            console.log(deviceNumber[i])
686 688
             is_device_number = false
687 689
           }
688 690
         }

+ 7 - 4
src/xt_pages/workforce/template.vue View File

@@ -29,8 +29,8 @@
29 29
         <br/>
30 30
         <br/>
31 31
         <span>{{getContent(item)}}</span>
32
-        <span style="color:blue"  @click="generateTxt(item)">点击</span>
33
-        <span>查看详情</span>
32
+        <span>点击</span>
33
+        <span  style="color:blue" @click="generateTxt(item)">查看详情</span>
34 34
         <br/>
35 35
         <br/>
36 36
       </div>
@@ -532,10 +532,10 @@
532 532
         let deviceNumber = []
533 533
 
534 534
         for (let i = 0; i < results.length; i++) {
535
-          if (results[i + 1] && results[i + 1]['区号'] != undefined) {
535
+          if (results[i + 1] ) {
536 536
             zones.push(results[i + 1]['区号'])
537 537
           }
538
-          if (results[i + 1] && results[i + 1]['机号'] != undefined) {
538
+          if (results[i + 1] ) {
539 539
             deviceNumber.push(results[i + 1]['机号'])
540 540
           }
541 541
 
@@ -552,6 +552,9 @@
552 552
           obj2[next] ? '' : obj2[next] = true && cur.push(next)
553 553
           return cur
554 554
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
555
+        console.log("1111111111")
556
+        console.log(deviceNumber)
557
+        console.log("1111111111")
555 558
 
556 559
         var total_zones = []
557 560
         var total_device_number = []