Explorar el Código

设备管理上正式

XMLWAN hace 4 años
padre
commit
7e6fca0937

+ 16 - 0
src/api/manage.js Ver fichero

@@ -657,3 +657,19 @@ export function DeleteMode(id, params) {
657 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 Ver fichero

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

+ 22 - 4
src/xt_pages/management/home.vue Ver fichero

@@ -958,12 +958,13 @@
958 958
                                   </el-col>
959 959
                                   <el-col :span="8">
960 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 962
                                            <el-option
963 963
                                             v-for="item in bedZoneThree"
964 964
                                            :key="item.id"
965 965
                                            :label="item.name"
966
-                                           :value="item.id">
966
+                                           :value="item.id"
967
+                                           >
967 968
                                           </el-option>
968 969
                                         </el-select>
969 970
                                      </el-form-item>
@@ -972,7 +973,7 @@
972 973
                                 <el-row>
973 974
                                     <el-col :span="8">
974 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 977
                                           <el-option v-for="item in this.bedNumberTwo" :key="item.id" :label="item.number" :value="item.id"></el-option>
977 978
                                         </el-select>
978 979
                                      </el-form-item>
@@ -2051,7 +2052,7 @@
2051 2052
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2052 2053
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2053 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 2056
   import { uParseTime } from '@/utils/tools'
2056 2057
   import { getToken } from '@/api/qiniu'
2057 2058
   import PlanForm from './components/PlanForm'
@@ -4243,6 +4244,23 @@ export default {
4243 4244
           var mode = response.data.data.mode
4244 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 4266
     created() {

+ 3 - 0
src/xt_pages/mode/index.vue Ver fichero

@@ -194,8 +194,11 @@ export default {
194 194
       ).then(() => {
195 195
         DeleteMode(id, index).then(response => {
196 196
           if (response.data.state === 1) {
197
+            // eslint-disable-next-line no-unused-vars
197 198
             var msg = response.data.data.msg;
198 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 Ver fichero

@@ -128,7 +128,6 @@
128 128
         fit
129 129
         highlight-current-row
130 130
         @select="selectAdvice"
131
-        @selection-change="changeAdvice"
132 131
         style="width: 100%;margin-top: 10px;"
133 132
         :cell-class-name="adviceNameShow"
134 133
       >
@@ -3170,11 +3169,12 @@ export default {
3170 3169
       });
3171 3170
     },
3172 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 3179
     groupClassName({ row, rowIndex }) {
3180 3180
       row.index = rowIndex;
@@ -3190,6 +3190,13 @@ export default {
3190 3190
       this.groupSelectRow = row;
3191 3191
     },
3192 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 3200
       if (this.adviceType != 3) {
3194 3201
         this.lstableData = [];
3195 3202
       } else if (this.adviceType != 1) {