Browse Source

开发出所时间、分娩方式、亲属出生日期,修改病人管理、用户管理的操作配置文件

vothin 3 years ago
parent
commit
42a78e8f12

+ 20 - 0
languages/zh-CN.js

@@ -1,3 +1,4 @@
+const i18n = require("@/utils/i18n");
 module.exports = {
   action: {
     home: '首页',
@@ -154,6 +155,8 @@ module.exports = {
     IDCard: '身份证号',
     birthday: '生日',
     choiceBirthday: '选择日期',
+    birthday2: '出生日期',
+    choiceBirthday2: '选择出生日期',
     address: '详细地址',
     addressInputMsg: '最长50个字符',
     homeAddress: '家庭住址',
@@ -312,6 +315,7 @@ module.exports = {
     day: '天',
     inDate: '入住日期',
     outDate: '离开时间',
+    outDate2: '出所时间',
     choiceDate: '选择日期',
     to: '至',
     today: '至今',
@@ -331,8 +335,10 @@ module.exports = {
     choiceFrame: '请选择床位',
     illnessDesc: '用户情况简述',
     illnessDesc2: '用户简介',
+    illnessDesc3: '分娩方式',
     patientIllnessDesc: '病况描述',
     inputIllnessDesc: '请输入文本内容,长度2~50',
+    choiceIllnessDesc: '请选择分娩方式',
     advice: '医嘱',
     inputAdvice: '请输入文本内容,长度2~50',
     doctor: '责任医生',
@@ -350,6 +356,7 @@ module.exports = {
     inputCustomerRelativeTrueName: '请输入亲属姓名',
     relativeName: '关系',
     inputRelativeName: '请输入亲属关系 如:朋友',
+    choiceRelativeName: '请选择亲属关系',
     vital: '体征',
     remark: '备注',
     remarks: '备注内容:',
@@ -829,5 +836,18 @@ module.exports = {
     CHANNELIM: '频道留言',
     LOCATION: '定位',
     UNKNOWN: '未知'
+  },
+  relativeNameType: {
+    CHILDREN: '孩子',
+    HUSBAND: '丈夫',
+    WIFE: '妻子',
+    FATHER: '父亲',
+    MOTHER: '母亲',
+    RELATIVE: '亲属',
+    FRIEND: '朋友'
+  },
+  childbirthType: {
+    SPONTANEOUS_LABOR: '顺产',
+    CAESAREAN_BIRTH: '剖腹产'
   }
 }

+ 8 - 0
src/api/user.js

@@ -61,6 +61,14 @@ export function add(params) {
   })
 }
 
+export function addRelative(params) {
+  return request({
+    url: '/Mgr/member/add_relative',
+    method: 'POST',
+    data: params
+  })
+}
+
 export function remove(params) {
   const ids = params.toString()
   return request({

+ 9 - 0
src/utils/enum/ChildbirthTypeEnum.js

@@ -0,0 +1,9 @@
+import createEnum from '@/utils/enum/createEnum'
+import i18n from '@/utils/i18n'
+
+export const CHILDBIRTH_TYPE = createEnum(
+  {
+    SPONTANEOUS_LABOR: ['顺产', i18n.t('childbirthType.SPONTANEOUS_LABOR')],
+    CAESAREAN_BIRTH: ['剖腹产', i18n.t('childbirthType.CAESAREAN_BIRTH')]
+  }
+)

+ 14 - 0
src/utils/enum/RelativeNameTypeEnum

@@ -0,0 +1,14 @@
+import createEnum from '@/utils/enum/createEnum'
+import i18n from '@/utils/i18n'
+
+export const RELATIVE_NAME_TYPE = createEnum(
+    {
+        CHILDREN: [ '孩子', i18n.t('relativeNameType.CHILDREN') ],
+        HUSBAND: [ '丈夫', i18n.t('relativeNameType.HUSBAND') ],
+        WIFE: [ '妻子', i18n.t('relativeNameType.WIFE') ],
+        FATHER: [ '父亲', i18n.t('relativeNameType.FATHER') ],
+        MOTHER: [ '母亲', i18n.t('relativeNameType.MOTHER') ],
+        RELATIVE: [ '亲属', i18n.t('relativeNameType.RELATIVE') ],
+        FRIEND: [ '朋友', i18n.t('relativeNameType.FRIEND') ],
+    }
+)

+ 82 - 15
src/views/customer/components/customerManager.vue

@@ -98,11 +98,14 @@
                       :editable="false"
                       value-format="timestamp"
                       :placeholder="this.$t('member.choiceBirthday')"
-                      :picker-options="{disabledDate(time) { return time.getTime() > Date.now() }}"
+                      :picker-options="{ disabledDate(time) { return time.getTime() > Date.now() }}"
                       @change="birthdayChange"
                     />
                   </el-form-item>
                 </el-col>
+              </el-row>
+
+              <el-row>
                 <el-col :span="12">
                   <el-form-item :label="this.$t('customerManage.inDate')" prop="in_date">
                     <el-date-picker
@@ -112,11 +115,26 @@
                       value-format="timestamp"
                       :default-value="new Date()"
                       :placeholder="this.$t('customerManage.choiceDate')"
-                      :picker-options="{disabledDate(time) { return time.getTime() > Date.now() }}"
+                      :picker-options="{ disabledDate(time) { return time.getTime() > Date.now() }}"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item :label="this.$t('customerManage.outDate2')" prop="out_date">
+                    <el-date-picker
+                      v-model="formmodel.out_date"
+                      type="date"
+                      :editable="false"
+                      value-format="timestamp"
+                      :default-value="new Date()"
+                      :placeholder="this.$t('customerManage.choiceDate')"
+                      :picker-options="{ disabledDate(time) { return time.getTime() <= formmodel.in_date }}"
                     />
                   </el-form-item>
                 </el-col>
+              </el-row>
 
+              <el-row>
                 <el-col :span="12">
                   <el-form-item :label="this.$t('customerManage.idType')">
                     <el-radio v-model="formmodel.id_type" label="身份证">{{ this.$t('customerManage.idCard') }}</el-radio>
@@ -148,15 +166,18 @@
                       </el-form-item>
                     </el-col>
                   </el-row>
-                  <el-form-item :label="this.$t('customerManage.illnessDesc')">
-                    <el-input
-                      v-model="formmodel.illness_desc"
-                      type="textarea"
-                      :autosize="{ minRows: 2, maxRows: 4}"
-                      :minlength="2"
-                      :maxlength="50"
-                      :placeholder="this.$t('customerManage.inputIllnessDesc')"
-                    />
+                  <el-form-item :label="this.$t('customerManage.illnessDesc3')">
+<!--                    <el-input-->
+<!--                      v-model="formmodel.illness_desc"-->
+<!--                      type="textarea"-->
+<!--                      :autosize="{ minRows: 2, maxRows: 4}"-->
+<!--                      :minlength="2"-->
+<!--                      :maxlength="50"-->
+<!--                      :placeholder="this.$t('customerManage.inputIllnessDesc')"-->
+<!--                    />-->
+                    <el-select v-model="formmodel.illness_desc" :placeholder="this.$t('customerManage.choiceIllnessDesc')" clearable>
+                      <el-option v-for="(item, index) in Object.keys(childbirthTypeEnum)" :key="index" :label="childbirthTypeEnum[item]" :value="item" />
+                    </el-select>
                   </el-form-item>
                 </el-col>
                 <el-col :span="8">
@@ -253,6 +274,7 @@
                   prop="relative_name"
                   :label="this.$t('customerManage.relativeName')"
                   width="180"
+                  :formatter="formatterRelativeName"
               />
               <el-table-column
                   prop="mobile"
@@ -277,8 +299,11 @@
                 </el-col>
                 <el-col :span="12">
                   <el-form-item :label="this.$t('customerManage.relativeName')" prop="relative_name">
-                    <el-input v-model="relativeFormModel.relative_name" clearable
-                              :placeholder="this.$t('customerManage.inputRelativeName')" :maxlength="20" />
+<!--                    <el-input v-model="relativeFormModel.relative_name" clearable-->
+<!--                              :placeholder="this.$t('customerManage.inputRelativeName')" :maxlength="20" />-->
+                    <el-select v-model="relativeFormModel.relative_name" :placeholder="this.$t('customerManage.choiceRelativeName')" clearable  @change="relativeNameChange">
+                      <el-option v-for="(item, index) in Object.keys(relativeNameTypeEnum)" :key="index" :label="relativeNameTypeEnum[item]" :value="item" />
+                    </el-select>
                   </el-form-item>
                 </el-col>
               </el-row>
@@ -295,6 +320,20 @@
                     <el-input v-model="relativeFormModel.mobile" clearable :placeholder="this.$t('member.inputMobile')" :maxlength="20" />
                   </el-form-item>
                 </el-col>
+                <el-col :span="12">
+                  <el-form-item v-if="isChild"
+                      :label="this.$t('member.birthday2')" prop="birthday">
+                    <el-date-picker
+                        v-model="relativeFormModel.birthday"
+                        type="date"
+                        :editable="false"
+                        value-format="timestamp"
+                        :placeholder="this.$t('member.choiceBirthday2')"
+                        :picker-options="{ disabledDate(time) { return time.getTime() > Date.now() }}"
+                        @change="birthdayChange"
+                    />
+                  </el-form-item>
+                </el-col>
               </el-row>
               <el-form-item>
                 <el-button type="primary" @click="addRelative">{{ this.$t('action.add') }}</el-button>
@@ -504,6 +543,8 @@ import { FRAME_TYPE } from '@/utils/enum/FrameTypeEnum'
 import vitalSignLog from '@/views/vital-sign/log'
 import vueQr from 'vue-qr'
 import * as API_SystemConfig from '@/api/ncs_systemconfig'
+import {RELATIVE_NAME_TYPE} from "@/utils/enum/RelativeNameTypeEnum";
+import {CHILDBIRTH_TYPE} from "@/utils/enum/ChildbirthTypeEnum";
 const serverUrl = domain.serverUrl
 export default {
   name: 'CustomerManager',
@@ -672,7 +713,10 @@ export default {
         { key: this.$t('customerManage.customerStatusFalse'), value: 1, color: 'red' }
       ],
       detailsVisible: false,
-      qrCode: null
+      qrCode: null,
+      relativeNameTypeEnum: RELATIVE_NAME_TYPE.getValueList(),
+      childbirthTypeEnum: CHILDBIRTH_TYPE.getValueList(),
+      isChild: false,
     }
   },
   computed: {
@@ -989,6 +1033,7 @@ export default {
         id_type: '身份证',
         age_unit: '岁',
         in_date: (new Date()).valueOf(),
+        out_date: (new Date()).valueOf(),
         mobile: '',
         part_id: this.$store.getters.partId
       }
@@ -1138,6 +1183,9 @@ export default {
           if (this.formmodel.in_date) {
             this.$set(this.formmodel, 'in_date', this.formmodel.in_date / 1000) // 将毫秒数转换成秒
           }
+          if (this.formmodel.out_date) {
+            this.$set(this.formmodel, 'out_date', this.formmodel.out_date / 1000) // 将毫秒数转换成秒
+          }
           if (this.formmodel.birthday) {
             this.$set(this.formmodel, 'birthday', this.formmodel.birthday / 1000) // 将毫秒数转换成秒
           }
@@ -1213,6 +1261,9 @@ export default {
       if (this.formmodel.in_date) {
         this.$set(this.formmodel, 'in_date', this.formmodel.in_date * 1000)
       }
+      if (this.formmodel.out_date) {
+        this.$set(this.formmodel, 'out_date', this.formmodel.out_date * 1000)
+      }
       if (this.formmodel.birthday) {
         this.$set(this.formmodel, 'birthday', this.formmodel.birthday * 1000)
       }
@@ -1332,7 +1383,10 @@ export default {
       this.$refs['relativeForm'].validate(valid => {
         if (valid) {
           this.relativeFormModel.relative_id = this.formmodel.member_id
-          API_User.add(this.relativeFormModel).then(res => {
+          if (this.relativeFormModel.birthday) {
+            this.$set(this.relativeFormModel, 'birthday', this.relativeFormModel.birthday / 1000) // 将毫秒数转换成秒
+          }
+          API_User.addRelative(this.relativeFormModel).then(res => {
             this.relativeFormModel = {
               sex: 0,
               true_name: null,
@@ -1382,6 +1436,19 @@ export default {
         return this.$t('member.unknown')
       }
     },
+    formatterRelativeName(row) {
+      return RELATIVE_NAME_TYPE.getDescFromValue(row.relative_name) ? RELATIVE_NAME_TYPE.getDescFromValue(row.relative_name) : row.relative_name
+    },
+    relativeNameChange(val) {
+      if (val === RELATIVE_NAME_TYPE.CHILDREN) {
+        this.relativeRules.mobile[0].required = false
+        this.relativeRules.mobile[0].validator = (rule, value, callback) => { callback() }
+        this.isChild = true
+      } else {
+        this.relativeRules.mobile[0].required = true
+        this.isChild = false
+      }
+    },
     /** 信息变化后操作,如床位状态改变,传入的空间结构变化了 **/
     infoChanged() {
       this.getEmptyBeds().then(() => {

+ 117 - 77
src/views/customer/components/elderlyCareManager.vue

@@ -44,7 +44,7 @@
         <el-dialog :visible.sync="customerFormVisible" :title="this.$t('customerManage.customerInfo')" class="customer-dialog" width="70%">
             <el-tabs v-model="activeName" type="border-card" tab-position="bottom" width="50%" @tab-click="handleClick">
                 <el-tab-pane :label="this.$t('customerManage.baseInfo')" name="customerBaseInfo">
-                    <div style="height: 590px">
+                    <div>
                         <el-form ref="editForm" :model="formmodel" :rules="rules" label-width="120px">
                             <el-row>
                                 <el-col :span="12">
@@ -481,6 +481,7 @@
     // 养老院版,有责任医生(监护人),责任护工选项 无护理参数
     import {AG_GRID_LOCALE_CN} from '@/utils/AgGridVueLocaleCn'
     import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
+    import ButtonCellRenderList from '@/components/AgGridCellRender/ButtonCellRenderList'
     import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
     import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
     import * as API_Customer from '@/api/ncs_customer'
@@ -500,7 +501,7 @@
     const serverUrl = domain.serverUrl
     export default {
         name: 'ElderlyCareManager',
-        components: {ButtonCellRender, ListFilter, RadioFilter, vitalSignLog, myMap},
+        components: {ButtonCellRenderList, ButtonCellRender, ListFilter, RadioFilter, vitalSignLog, myMap},
         filters: {
             unixDateFilter(val) {
                 return unixToDate(val)
@@ -724,12 +725,12 @@
                 {
                     headerName: this.$t('customerManage.ageUnit'), field: 'age_unit', sortable: true, filter: 'agTextColumnFilter', width: 130
                 },
-                {headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: this.$t('customerManage.idType'), field: 'id_type', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', width: 160},
-                {headerName: this.$t('customerManage.frame'), field: 'full_name', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260},
+                {   headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: true, filter: 'agTextColumnFilter' },
+                {   headerName: this.$t('customerManage.idType'), field: 'id_type', sortable: true, filter: 'agTextColumnFilter' },
+                {   headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', width: 160 },
+                {   headerName: this.$t('customerManage.frame'), field: 'full_name', sortable: true, filter: 'agTextColumnFilter' },
+                {   headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter'},
+                {   headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260 },
 
                 {
                     headerName: this.$t('customerManage.inDate'),
@@ -757,79 +758,118 @@
                         }
                     }
                 },
-                {
-                    headerName: this.$t('action.edit'), field: 'id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: {
+              { headerName: this.$t('action.handle'), field: 'id',
+                cellRendererFramework: 'ButtonCellRenderList',
+                cellRendererParams: param => {
+                  return {
+                    list: [
+                      {
                         onClick: this.handleEdit,
                         label: this.$t('action.edit'),
                         buttonType: 'primary',
                         buttonSize: 'mini'
-                    },
-                    filter: false,
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 80,
-                    resizable: false,
-                    sortable: false
-                },
-                {
-                    headerName: this.$t('customerManage.outBed2'), field: 'id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: param => {
-                        return {
-                            onClick: this.handleOut,
-                            label: this.$t('customerManage.outBed3'),
-                            buttonType: 'warning',
-                            buttonSize: 'mini',
-                            disabled: param.data['status'] !== 0
-                        }
-                    },
-                    filter: false,
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 100,
-                    resizable: false,
-                    sortable: false
-                },
-                {
-                    headerName: this.$t('customerManage.changeBed2'), field: 'id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: param => {
-                        return {
-                            onClick: this.handleChangeBed,
-                            label: this.$t('customerManage.changeBed3'),
-                            buttonType: 'success',
-                            buttonSize: 'mini',
-                            disabled: param.data['status'] !== 0
-                        }
-                    },
-                    filter: false,
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 100,
-                    resizable: false,
-                    sortable: false
+                      },
+                      {
+                        onClick: this.handleOut,
+                        label: this.$t('customerManage.outBed2'),
+                        buttonType: 'warning',
+                        buttonSize: 'mini',
+                        disabled: param.data['status'] !== 0
+                      },
+                      {
+                        onClick: this.handleChangeBed,
+                        label: this.$t('customerManage.changeBed2'),
+                        buttonType: 'success',
+                        buttonSize: 'mini',
+                        disabled: param.data['status'] !== 0
+                      },{
+                        onClick: this.deleteSingle,
+                        label: this.$t('action.delete'),
+                        buttonType: 'danger',
+                        buttonSize: 'mini',
+                        disabled: param.data['member_name'] === 'superadmin'
+                      }
+                    ]}
                 },
-                {
-                    headerName: this.$t('action.delete'), field: 'shop_id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: param => {
-                        return {
-                            onClick: this.deleteSingle,
-                            label: this.$t('action.delete'),
-                            buttonType: 'danger',
-                            buttonSize: 'mini',
-                            disabled: param.data['member_name'] === 'superadmin'
-                        }
-                    },
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 80,
-                    resizable: false,
-                    filter: false,
-                    sortable: false
-                }
+                filter: false,
+                pinned: 'right',
+                lockPinned: true,
+                minWidth: 305,
+                resizable: false,
+                sortable: false },
+                // {
+                //     headerName: this.$t('action.edit'), field: 'id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: {
+                //         onClick: this.handleEdit,
+                //         label: this.$t('action.edit'),
+                //         buttonType: 'primary',
+                //         buttonSize: 'mini'
+                //     },
+                //     filter: false,
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 80,
+                //     resizable: false,
+                //     sortable: false
+                // },
+                // {
+                //     headerName: this.$t('customerManage.outBed2'), field: 'id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: param => {
+                //         return {
+                //             onClick: this.handleOut,
+                //             label: this.$t('customerManage.outBed3'),
+                //             buttonType: 'warning',
+                //             buttonSize: 'mini',
+                //             disabled: param.data['status'] !== 0
+                //         }
+                //     },
+                //     filter: false,
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 100,
+                //     resizable: false,
+                //     sortable: false
+                // },
+                // {
+                //     headerName: this.$t('customerManage.changeBed2'), field: 'id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: param => {
+                //         return {
+                //             onClick: this.handleChangeBed,
+                //             label: this.$t('customerManage.changeBed3'),
+                //             buttonType: 'success',
+                //             buttonSize: 'mini',
+                //             disabled: param.data['status'] !== 0
+                //         }
+                //     },
+                //     filter: false,
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 100,
+                //     resizable: false,
+                //     sortable: false
+                // },
+                // {
+                //     headerName: this.$t('action.delete'), field: 'shop_id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: param => {
+                //         return {
+                //             onClick: this.deleteSingle,
+                //             label: this.$t('action.delete'),
+                //             buttonType: 'danger',
+                //             buttonSize: 'mini',
+                //             disabled: param.data['member_name'] === 'superadmin'
+                //         }
+                //     },
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 80,
+                //     resizable: false,
+                //     filter: false,
+                //     sortable: false
+                // }
             ]
             this.defaultColDef = {
                 // filter: 'agTextColumnFilter',
@@ -1333,7 +1373,7 @@
                 this.$refs['relativeForm'].validate(valid => {
                     if (valid) {
                         this.relativeFormModel.relative_id = this.formmodel.member_id
-                        API_User.add(this.relativeFormModel).then(res => {
+                        API_User.addRelative(this.relativeFormModel).then(res => {
                             this.relativeFormModel = {
                                 sex: 0,
                                 true_name: null,

+ 123 - 83
src/views/customer/components/patientManager.vue

@@ -492,6 +492,7 @@
     // 医院版,有责任医生,责任护士,责任护工选项 有护理项参数
     import {AG_GRID_LOCALE_CN} from '@/utils/AgGridVueLocaleCn'
     import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
+    import ButtonCellRenderList from '@/components/AgGridCellRender/ButtonCellRenderList'
     import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
     import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
     import * as API_Customer from '@/api/ncs_customer'
@@ -511,7 +512,7 @@
     const serverUrl = domain.serverUrl
     export default {
         name: 'PatientManager',
-        components: {ButtonCellRender, ListFilter, RadioFilter, vitalSignLog, vueQr },
+        components: { ButtonCellRenderList, ButtonCellRender, ListFilter, RadioFilter, vitalSignLog, vueQr },
         filters: {
             unixDateFilter(val) {
                 return unixToDate(val)
@@ -709,9 +710,9 @@
                     resizable: false,
                     valueGetter: this.hashValueGetter
                 },
-                {headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100},
-                {headerName: this.$t('customerManage.named'), field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160},
-                {headerName: this.$t('customerManage.nickname'), field: 'nickname', sortable: true, filter: 'agTextColumnFilter', width: 130},
+                {   headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100},
+                {   headerName: this.$t('customerManage.named'), field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160},
+                {   headerName: this.$t('customerManage.nickname'), field: 'nickname', sortable: true, filter: 'agTextColumnFilter', width: 130},
                 {
                     headerName: this.$t('customerManage.customerStatus'), field: 'status', sortable: true, filterFramework: 'RadioFilter', width: 130,
                     filterParams: {
@@ -782,79 +783,118 @@
                         }
                     }
                 },
-                {
-                    headerName: this.$t('action.edit'), field: 'id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: {
+                // {
+                //     headerName: this.$t('action.edit'), field: 'id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: {
+                //         onClick: this.handleEdit,
+                //         label: this.$t('action.edit'),
+                //         buttonType: 'primary',
+                //         buttonSize: 'mini'
+                //     },
+                //     filter: false,
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 80,
+                //     resizable: false,
+                //     sortable: false
+                // },
+                // {
+                //     headerName: this.$t('customerManage.outBed'), field: 'id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: param => {
+                //         return {
+                //             onClick: this.handleOut,
+                //             label: this.$t('customerManage.outBed'),
+                //             buttonType: 'warning',
+                //             buttonSize: 'mini',
+                //             disabled: param.data['status'] !== 0
+                //         }
+                //     },
+                //     filter: false,
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 80,
+                //     resizable: false,
+                //     sortable: false
+                // },
+                // {
+                //     headerName: this.$t('customerManage.changeBed'), field: 'id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: param => {
+                //         return {
+                //             onClick: this.handleChangeBed,
+                //             label: this.$t('customerManage.changeBed'),
+                //             buttonType: 'success',
+                //             buttonSize: 'mini',
+                //             disabled: param.data['status'] !== 0
+                //         }
+                //     },
+                //     filter: false,
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 80,
+                //     resizable: false,
+                //     sortable: false
+                // },
+                // {
+                //     headerName: this.$t('action.delete'), field: 'shop_id',
+                //     cellRendererFramework: 'ButtonCellRender',
+                //     cellRendererParams: param => {
+                //         return {
+                //             onClick: this.deleteSingle,
+                //             label: this.$t('action.delete'),
+                //             buttonType: 'danger',
+                //             buttonSize: 'mini',
+                //             disabled: param.data['member_name'] === 'superadmin'
+                //         }
+                //     },
+                //     pinned: 'right',
+                //     lockPinned: true,
+                //     width: 80,
+                //     resizable: false,
+                //     filter: false,
+                //     sortable: false
+                // }
+              { headerName: this.$t('action.handle'), field: 'id',
+                cellRendererFramework: 'ButtonCellRenderList',
+                cellRendererParams: param => {
+                  return {
+                    list: [
+                      {
                         onClick: this.handleEdit,
                         label: this.$t('action.edit'),
                         buttonType: 'primary',
                         buttonSize: 'mini'
-                    },
-                    filter: false,
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 80,
-                    resizable: false,
-                    sortable: false
+                      },
+                      {
+                        onClick: this.handleOut,
+                        label: this.$t('customerManage.outBed'),
+                        buttonType: 'warning',
+                        buttonSize: 'mini',
+                        disabled: param.data['status'] !== 0
+                      },
+                      {
+                        onClick: this.handleChangeBed,
+                        label: this.$t('customerManage.changeBed'),
+                        buttonType: 'success',
+                        buttonSize: 'mini',
+                        disabled: param.data['status'] !== 0
+                      },{
+                        onClick: this.deleteSingle,
+                        label: this.$t('action.delete'),
+                        buttonType: 'danger',
+                        buttonSize: 'mini',
+                        disabled: param.data['member_name'] === 'superadmin'
+                      }
+                    ]}
                 },
-                {
-                    headerName: this.$t('customerManage.outBed'), field: 'id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: param => {
-                        return {
-                            onClick: this.handleOut,
-                            label: this.$t('customerManage.outBed'),
-                            buttonType: 'warning',
-                            buttonSize: 'mini',
-                            disabled: param.data['status'] !== 0
-                        }
-                    },
-                    filter: false,
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 80,
-                    resizable: false,
-                    sortable: false
-                },
-                {
-                    headerName: this.$t('customerManage.changeBed'), field: 'id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: param => {
-                        return {
-                            onClick: this.handleChangeBed,
-                            label: this.$t('customerManage.changeBed'),
-                            buttonType: 'success',
-                            buttonSize: 'mini',
-                            disabled: param.data['status'] !== 0
-                        }
-                    },
-                    filter: false,
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 80,
-                    resizable: false,
-                    sortable: false
-                },
-                {
-                    headerName: this.$t('action.delete'), field: 'shop_id',
-                    cellRendererFramework: 'ButtonCellRender',
-                    cellRendererParams: param => {
-                        return {
-                            onClick: this.deleteSingle,
-                            label: this.$t('action.delete'),
-                            buttonType: 'danger',
-                            buttonSize: 'mini',
-                            disabled: param.data['member_name'] === 'superadmin'
-                        }
-                    },
-                    pinned: 'right',
-                    lockPinned: true,
-                    width: 80,
-                    resizable: false,
-                    filter: false,
-                    sortable: false
-                }
+                filter: false,
+                pinned: 'right',
+                lockPinned: true,
+                minWidth: 260,
+                resizable: false,
+                sortable: false },
             ]
             this.defaultColDef = {
                 // filter: 'agTextColumnFilter',
@@ -1347,7 +1387,7 @@
                 this.$refs['relativeForm'].validate(valid => {
                     if (valid) {
                         this.relativeFormModel.relative_id = this.formmodel.member_id
-                        API_User.add(this.relativeFormModel).then(res => {
+                        API_User.addRelative(this.relativeFormModel).then(res => {
                             this.relativeFormModel = {
                                 sex: 0,
                                 true_name: null,
@@ -1511,16 +1551,16 @@
             async deleteMembers(ids) {
                 API_User.remove(ids)
             },
-            getQrCode() {
-              API_User.getUnionId(this.formmodel.member_id).then(r => {
-                this.qrCode = 'http://m.wdklian.com/care/apk/care.user?type=USER_LOGIN&uid=' + r
-              })
-            }
-        },
-        getCloud() {
-          API_SystemConfig.cloud().then(r => {
-            this.isCloud = r
-          })
+          getQrCode() {
+            API_User.getUnionId(this.formmodel.member_id).then(r => {
+              this.qrCode = 'http://m.wdklian.com/care/apk/care.user?type=USER_LOGIN&uid=' + r
+            })
+          },
+          getCloud() {
+            API_SystemConfig.cloud().then(r => {
+              this.isCloud = r
+            })
+          }
         }
     }
 </script>

+ 1 - 1
src/views/hospital/ncs_customer/customerManager.vue

@@ -1242,7 +1242,7 @@ export default {
       this.$refs['relativeForm'].validate(valid => {
         if (valid) {
           this.relativeFormModel.relative_id = this.formmodel.member_id
-          API_User.add(this.relativeFormModel).then(res => {
+          API_User.addRelative(this.relativeFormModel).then(res => {
             this.relativeFormModel = {
               sex: 0,
               true_name: null,

+ 2 - 4
src/views/hospital/ncs_device/deviceManager.vue

@@ -739,8 +739,7 @@ export default {
           val === DEVICE_TYPE.SIMULATE_DOOR_LIGHT
       this.isVitalSigns = val === DEVICE_TYPE.VITAL_SIGNS_DEVICE
       this.hasSosDeviceSettings = val === DEVICE_TYPE.ALARM_BODY_INDUCTIVE ||
-          val === DEVICE_TYPE.DOOR_LOCK ||
-          val === DEVICE_TYPE.ALARM_RESTRAINT_BAND
+          val === DEVICE_TYPE.DOOR_LOCK
       this.isLedDevice = val === DEVICE_TYPE.LED_SCREEN ||
           val === DEVICE_TYPE.LCD_SCREEN
     },
@@ -824,8 +823,7 @@ export default {
           params.device_type === DEVICE_TYPE.SIMULATE_DOOR_LIGHT
       this.isVitalSigns = params.device_type === DEVICE_TYPE.VITAL_SIGNS_DEVICE
       this.hasSosDeviceSettings = params.device_type === DEVICE_TYPE.ALARM_BODY_INDUCTIVE ||
-          params.device_type === DEVICE_TYPE.DOOR_LOCK ||
-          params.device_type === DEVICE_TYPE.ALARM_RESTRAINT_BAND
+          params.device_type === DEVICE_TYPE.DOOR_LOCK
       this.isLedDevice = params.device_type === DEVICE_TYPE.LED_SCREEN ||
           params.device_type === DEVICE_TYPE.LCD_SCREEN
       this.deviceModel = {