Browse Source

设备管理上正式

XMLWAN 4 years ago
parent
commit
7e6fca0937

+ 16 - 0
src/api/manage.js View File

657
     params: params
657
     params: params
658
   })
658
   })
659
 }
659
 }
660
+
661
+export function selectChange(id, params) {
662
+  return request({
663
+    url: '/api/manage/selectchange?id=' + id,
664
+    method: 'get',
665
+    params: params
666
+  })
667
+}
668
+
669
+export function selectBed(id, params) {
670
+  return request({
671
+    url: '/api/manage/selectbed?id=' + id,
672
+    method: 'get',
673
+    params: params
674
+  })
675
+}

+ 5 - 5
src/xt_pages/management/components/UserForm.vue View File

23
           style="width:145px"
23
           style="width:145px"
24
         ></el-date-picker>
24
         ></el-date-picker>
25
       </el-col>
25
       </el-col>
26
-       <el-col :span="4">
26
+      <el-col :span="4">
27
         <span class="machineClass">分区:</span>
27
         <span class="machineClass">分区:</span>
28
         <el-select style="width:90px" v-model="form.zone" @change="changeBed">
28
         <el-select style="width:90px" v-model="form.zone" @change="changeBed">
29
           <el-option
29
           <el-option
61
       <el-col :span="3">
61
       <el-col :span="3">
62
         <el-button size="small" @click="BatchDelete">批量删除</el-button>
62
         <el-button size="small" @click="BatchDelete">批量删除</el-button>
63
       </el-col>
63
       </el-col>
64
-       <el-col :span="6" class="a">
64
+      <el-col :span="6" class="a">
65
         <el-button @click="printCard">打印</el-button>
65
         <el-button @click="printCard">打印</el-button>
66
       </el-col>
66
       </el-col>
67
     </el-row>
67
     </el-row>
272
             </el-form-item>
272
             </el-form-item>
273
           </el-col>
273
           </el-col>
274
           <el-col :span="8">
274
           <el-col :span="8">
275
-            <el-form-item label="分区2:">
275
+            <el-form-item label="分区:">
276
               <el-select v-model="userform.zone" placeholder="请选择" class="a">
276
               <el-select v-model="userform.zone" placeholder="请选择" class="a">
277
                 <el-option
277
                 <el-option
278
                   v-for="item in zones"
278
                   v-for="item in zones"
2240
 .machineClass {
2240
 .machineClass {
2241
   font-size: 14px;
2241
   font-size: 14px;
2242
 }
2242
 }
2243
-.c{
2244
-  margin-bottom:10px;
2243
+.c {
2244
+  margin-bottom: 10px;
2245
 }
2245
 }
2246
 </style>
2246
 </style>

+ 22 - 4
src/xt_pages/management/home.vue View File

958
                                   </el-col>
958
                                   </el-col>
959
                                   <el-col :span="8">
959
                                   <el-col :span="8">
960
                                      <el-form-item label="分区:" required prop="zone">
960
                                      <el-form-item label="分区:" required prop="zone">
961
-                                         <el-select v-model="userform.zone" placeholder="请选择" class="a">
961
+                                         <el-select v-model="userform.zone" placeholder="请选择" class="a"  @change="selectChange">
962
                                            <el-option
962
                                            <el-option
963
                                             v-for="item in bedZoneThree"
963
                                             v-for="item in bedZoneThree"
964
                                            :key="item.id"
964
                                            :key="item.id"
965
                                            :label="item.name"
965
                                            :label="item.name"
966
-                                           :value="item.id">
966
+                                           :value="item.id"
967
+                                           >
967
                                           </el-option>
968
                                           </el-option>
968
                                         </el-select>
969
                                         </el-select>
969
                                      </el-form-item>
970
                                      </el-form-item>
972
                                 <el-row>
973
                                 <el-row>
973
                                     <el-col :span="8">
974
                                     <el-col :span="8">
974
                                         <el-form-item label="机位号:" required prop="bed_number">
975
                                         <el-form-item label="机位号:" required prop="bed_number">
975
-                                        <el-select style="width:150px" v-model="userform.bed_number">
976
+                                        <el-select style="width:150px" v-model="userform.bed_number" @change="selectBed">
976
                                           <el-option v-for="item in this.bedNumberTwo" :key="item.id" :label="item.number" :value="item.id"></el-option>
977
                                           <el-option v-for="item in this.bedNumberTwo" :key="item.id" :label="item.number" :value="item.id"></el-option>
977
                                         </el-select>
978
                                         </el-select>
978
                                      </el-form-item>
979
                                      </el-form-item>
2051
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2052
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2052
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2053
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2053
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2054
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2054
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode } from '@/api/manage'
2055
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed } from '@/api/manage'
2055
   import { uParseTime } from '@/utils/tools'
2056
   import { uParseTime } from '@/utils/tools'
2056
   import { getToken } from '@/api/qiniu'
2057
   import { getToken } from '@/api/qiniu'
2057
   import PlanForm from './components/PlanForm'
2058
   import PlanForm from './components/PlanForm'
4243
           var mode = response.data.data.mode
4244
           var mode = response.data.data.mode
4244
           this.deviceMode = mode
4245
           this.deviceMode = mode
4245
         })
4246
         })
4247
+      },
4248
+      selectChange(id) {
4249
+        selectChange(id).then(response => {
4250
+          if (response.data.state === 1) {
4251
+            this.userform.bed_number = ''
4252
+            var change = response.data.data.change
4253
+            this.bedNumberTwo = change
4254
+            // console.log('change', change)
4255
+          }
4256
+        })
4257
+      },
4258
+      selectBed(id) {
4259
+        selectBed(id).then(response => {
4260
+          if (response.data.state === 1) {
4261
+            var zone = response.data.data.zone
4262
+          }
4263
+        })
4246
       }
4264
       }
4247
     },
4265
     },
4248
     created() {
4266
     created() {

+ 3 - 0
src/xt_pages/mode/index.vue View File

194
       ).then(() => {
194
       ).then(() => {
195
         DeleteMode(id, index).then(response => {
195
         DeleteMode(id, index).then(response => {
196
           if (response.data.state === 1) {
196
           if (response.data.state === 1) {
197
+            // eslint-disable-next-line no-unused-vars
197
             var msg = response.data.data.msg;
198
             var msg = response.data.data.msg;
198
             this.tableData.splice(index, 1);
199
             this.tableData.splice(index, 1);
200
+          } else {
201
+            this.$message.error("该型号已绑定设备,不能删除");
199
           }
202
           }
200
         });
203
         });
201
       });
204
       });

+ 13 - 6
src/xt_pages/user/doctorAdvice.vue View File

128
         fit
128
         fit
129
         highlight-current-row
129
         highlight-current-row
130
         @select="selectAdvice"
130
         @select="selectAdvice"
131
-        @selection-change="changeAdvice"
132
         style="width: 100%;margin-top: 10px;"
131
         style="width: 100%;margin-top: 10px;"
133
         :cell-class-name="adviceNameShow"
132
         :cell-class-name="adviceNameShow"
134
       >
133
       >
3170
       });
3169
       });
3171
     },
3170
     },
3172
     changeAdvice(selection) {
3171
     changeAdvice(selection) {
3173
-      if (this.adviceType == 3) {
3174
-        this.lstableData = selection;
3175
-      } else if (this.adviceType == 1) {
3176
-        this.cqtableData = this.adviceTableData;
3177
-      }
3172
+      console.log("溶剂", selection);
3173
+      // if (this.adviceType == 3) {
3174
+      //   this.lstableData = selection
3175
+      // } else if (this.adviceType == 1) {
3176
+      //   this.cqtableData.push = selection
3177
+      // }
3178
     },
3178
     },
3179
     groupClassName({ row, rowIndex }) {
3179
     groupClassName({ row, rowIndex }) {
3180
       row.index = rowIndex;
3180
       row.index = rowIndex;
3190
       this.groupSelectRow = row;
3190
       this.groupSelectRow = row;
3191
     },
3191
     },
3192
     selectAdvice(selection, row) {
3192
     selectAdvice(selection, row) {
3193
+      console.log("row", row);
3194
+      console.log("selection");
3195
+      if (this.adviceType == 3) {
3196
+        this.lstableData = selection;
3197
+      } else if (this.adviceType == 1) {
3198
+        this.cqtableData = selection;
3199
+      }
3193
       if (this.adviceType != 3) {
3200
       if (this.adviceType != 3) {
3194
         this.lstableData = [];
3201
         this.lstableData = [];
3195
       } else if (this.adviceType != 1) {
3202
       } else if (this.adviceType != 1) {