瀏覽代碼

Merge branch 'master' of http://git.wdklian.com/allen/ncs_ui

* 'master' of http://git.wdklian.com/allen/ncs_ui:
  优化界面显示
wuyunfeng 4 年之前
父節點
當前提交
02ac33549a
共有 4 個文件被更改,包括 23 次插入14 次删除
  1. 1 1
      src/layout/components/Sidebar/index.vue
  2. 1 1
      src/router/index.js
  3. 19 11
      src/views/customer/list.vue
  4. 2 1
      src/views/ncs-device/index.vue

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -12,7 +12,7 @@
         :collapse-transition="false"
         mode="vertical"
       >
-        <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
+        <sidebar-item v-for="(route, index) in permission_routes" :key="index" :item="route" :base-path="route.path" />
       </el-menu>
     </el-scrollbar>
   </div>

+ 1 - 1
src/router/index.js

@@ -108,7 +108,7 @@ export const partRoutes = [
         path: 'hospitalFrame',
         component: () => import('@/views/hospitalFrame/hospitalFrame'),
         name: 'hospitalFrame',
-        meta: { title: '医院结构', icon: 'component', noCache: true }
+        meta: { title: '医院结构', icon: 'el-icon-s-shop', noCache: true }
       }
     ]
   },

+ 19 - 11
src/views/customer/list.vue

@@ -19,6 +19,7 @@
         </el-form-item>
       </el-form>
     </div>
+    
     <en-table-layout
       :toolbar = false
       @selection-change="selectFun"
@@ -37,11 +38,12 @@
         <el-table-column prop="sex" label="性别" align="center" width="70" :formatter="formatterSex"></el-table-column>
         <el-table-column prop="in_date" label="住院时间" align="center" :formatter="formatterDate" min-width="190"></el-table-column>
         <el-table-column prop="status" label="状态" align="center" :formatter="formatterStatus" width="100"></el-table-column>
+        <el-table-column prop="full_name" label="病床" align="center" width="120"></el-table-column>
         <el-table-column label="操作" width="220">
           <template slot-scope="scope">
             <el-button type="primary" size="mini" @click="handleAdd(scope.row.id,scope.row.frame_id)">编辑</el-button>
-            <el-button v-if="!scope.row.status" type="warning" size="mini" @click="handlerEdit(scope.row.id, 1)">换床</el-button>
-            <el-button v-if="!scope.row.status" size="mini" @click="handlerEdit(scope.row.id, 2)">出院</el-button>
+            <el-button v-if="!scope.row.status" type="warning" size="mini" @click="handlerEdit(scope.row.id, scope.row.full_name, 1)">换床</el-button>
+            <el-button v-if="!scope.row.status" size="mini" @click="handlerEdit(scope.row.id, scope.row.full_name, 2)">出院</el-button>
           </template>
         </el-table-column>
       </template>
@@ -66,11 +68,15 @@
 
     <el-dialog title="换床" :visible.sync="formshow" :append-to-body="true" width="80%">
       <el-form ref="editForm" label-width="140px">
-        <el-form-item label="病床">
-          <el-select v-model="changeFrameId" placeholder="请选择病床" clearable>
-            <el-option v-for="(item, index) in frameList" :label="item.name+'床'" :value="item.id" :key="index" />
-          </el-select>
+        <el-form-item label="当前病床:"><svg-icon icon-class="bed" style="color: #9aaabf;margin-top: 5px" />{{ full_name }}</el-form-item>
+        <el-form-item label="可换病床:">
+          <el-radio-group v-model="changeFrameId">
+            <el-radio v-for="(item, index) in frameList" :label="item.id" :key="index">
+              <svg-icon icon-class="bed" style="color: #9aaabf;margin-top: 5px" />{{ item.full_name }}
+            </el-radio>
+          </el-radio-group>
         </el-form-item>
+
         <el-form-item>
           <el-button type="primary" @click="updateFrameId">确定换床</el-button>
         </el-form-item>
@@ -115,7 +121,8 @@
         frameId: null,
         callingType: null,
         frameList: [],
-        searchStr: null
+        searchStr: null,
+        full_name: ''
       }
     },
     mounted() {
@@ -129,7 +136,7 @@
       /** 加载设备信息列表 */
       GET_List() {
         this.loading = true
-        this.params.fixedCondition += ' and part_id = ' + this.$store.getters.partId
+        this.params.fixedCondition += ' and nc.part_id = ' + this.$store.getters.partId
         API_customer.getList(this.params).then(res => {
           this.loading = false
           this.tableData = res.data
@@ -150,7 +157,7 @@
       changeStatus(value) {
         delete this.params.fixedCondition
         if (value) {
-          this.params.fixedCondition = ' status=' + value
+          this.params.fixedCondition = ' nc.status=' + value
         } else {
           this.params.fixedCondition = ' 1 = 1'
         }
@@ -191,8 +198,9 @@
         this.customerId = id
         this.frameId = frame_id
       },
-      handlerEdit(id, type) {
+      handlerEdit(id, name,  type) {
         this.customerId = id
+        this.full_name = name
         if (type === 1) {
           API_hospitalFrame.getSickbedByPartId(this.$store.getters.partId).then(res=> {
             this.frameList = res
@@ -274,7 +282,7 @@
       clickSearch() {
         delete this.params.fixedCondition
         if (this.searchStr != null && this.searchStr != '') {
-          this.params.fixedCondition = " ( named like concat('%','" + this.searchStr + "','%') or card_no like concat('%','" + this.searchStr + "','%')) "
+          this.params.fixedCondition = " ( nc.named like concat('%','" + this.searchStr + "','%') or nc.card_no like concat('%','" + this.searchStr + "','%')) "
         } else {
           this.params.fixedCondition = ' 1 = 1'
         }

+ 2 - 1
src/views/ncs-device/index.vue

@@ -42,6 +42,7 @@
             <span :class="scope.row.status===1?'green-text':'red-text'">{{ scope.row.status===1?'已启用':'未启用' }}</span>
           </template>
         </el-table-column>
+        <el-table-column prop="full_name" sortable="custom" label="所属位置" width="140" align="center" />
         <el-table-column prop="eth_mac" sortable="custom" label="有线物理地址" width="160" align="center" />
         <el-table-column prop="eth_ip" sortable="custom" label="有线IP地址" width="160" align="center" />
         <el-table-column prop="model" sortable="custom" label="设备型号" width="160" align="center" />
@@ -116,7 +117,7 @@ export default {
       params: {
         page_size: 20,
         page_no: 1,
-        fixedCondition: 'part_id=' + this.$store.getters.partId,
+        fixedCondition: ' nd.part_id=' + this.$store.getters.partId,
         sort: 'id',
         dir: 'desc'
       },