|
@@ -33,59 +33,24 @@
|
|
|
/>
|
|
|
</ag-grid-layout>
|
|
|
<!--编辑表单-->
|
|
|
- <el-dialog title="改绑" :visible.sync="formshow" width="70%">
|
|
|
+ <el-dialog v-if="formshow" title="改绑" :visible.sync="formshow" width="70%">
|
|
|
<div style="width:100%;margin:0 auto;height: 400px;">
|
|
|
<el-form label-width="120px" style="min-width: 100%;float:left;">
|
|
|
- <table border="1" class="tablewen">
|
|
|
- <tr>
|
|
|
- <td class="td1">设备别名:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.name }}</span></td>
|
|
|
- <td class="td1">设备状态:</td>
|
|
|
- <td class="td2">
|
|
|
- <span v-if="deviceInfo.status===1">已启用</span>
|
|
|
- <span v-else>未启用</span>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="td1">绑定人:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.member_name }}</span></td>
|
|
|
- <td class="td1">设备型号:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.model }}</span></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="td1">有线物理地址:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.eth_mac }}</span></td>
|
|
|
- <td class="td1">有线IP地址:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.eth_ip }}</span></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="td1">出厂编号:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.code }}</span></td>
|
|
|
- <td class="td1">SIP账号:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.sip_id }}</span></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="td1">软件版本:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.soft_ver }}</span></td>
|
|
|
- <td class="td1">硬件版本:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.hard_ver }}</span></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="td1">WIFI物理地址:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.wifi_mac }}</span></td>
|
|
|
- <td class="td1">WIFIIP地址:</td>
|
|
|
- <td class="td2"><span>{{ deviceInfo.wifi_ip }}</span></td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- <el-form-item v-for="(item, index) in nurses" :key="index" :label="item[0]">
|
|
|
+ <el-form-item label="设备标识码">
|
|
|
+ {{ deviceInfo.eth_mac }}
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-for="(item, index) in nurses" :key="index" :label="item[0]" v-if="item[0] !== '管理员'">
|
|
|
<el-radio-group v-model="deviceInfo.member_id">
|
|
|
- <el-radio v-for="(t, i) in item[1]" :key="i" :label="t.member_id" :disabled="!deviceInfo.member_id === t.member_id && !t.device_id">
|
|
|
+ <el-radio v-for="(t, i) in item[1]" :key="i" :label="t.member_id" :disabled="deviceInfo.member_id !== t.member_id && t.device_id !== null">
|
|
|
<i class="el-icon-user-solid" style="color: #b59abf;margin-top: 5px" />{{ t.clerk_name }}
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
+ <div v-if="deviceInfo.role_id">
|
|
|
+ <nurse-watch-frame :device-id="deviceInfo.id" :role-id="deviceInfo.role_id" />
|
|
|
+ </div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="formshow = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
|
|
@@ -100,12 +65,13 @@ import { unixToDate } from '@/utils/Foundation'
|
|
|
import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
|
|
|
import { DeviceUrl } from '@/utils/domain'
|
|
|
import * as clerk_API from '@/api/ncs_clerk'
|
|
|
-import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender"
|
|
|
-import RadioFilter from "@/components/AgGridCustomFilter/RadioFilter";
|
|
|
+import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
|
|
|
+import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
|
|
|
+import nurseWatchFrame from '@/views/hospitalFrame/nurse_watch_frame'
|
|
|
|
|
|
export default {
|
|
|
name: 'Index',
|
|
|
- components: { ButtonCellRender, RadioFilter },
|
|
|
+ components: { ButtonCellRender, RadioFilter, nurseWatchFrame },
|
|
|
data: function() {
|
|
|
return {
|
|
|
/** 表格数据 */
|
|
@@ -195,11 +161,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- headerName: '编辑', field: 'shop_id',
|
|
|
+ headerName: '换班', field: 'shop_id',
|
|
|
+ cellRendererFramework: 'ButtonCellRender',
|
|
|
+ cellRendererParams: {
|
|
|
+ onClick: this.huanban,
|
|
|
+ label: '换班',
|
|
|
+ buttonType: 'success',
|
|
|
+ buttonSize: 'mini'
|
|
|
+ },
|
|
|
+ filter: false,
|
|
|
+ pinned: 'right',
|
|
|
+ lockPinned: true,
|
|
|
+ minWidth: 100,
|
|
|
+ resizable: false,
|
|
|
+ sortable: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: '管理', field: 'shop_id',
|
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
|
cellRendererParams: {
|
|
|
onClick: this.handEdit,
|
|
|
- label: '编辑',
|
|
|
+ label: '管理',
|
|
|
buttonType: 'primary',
|
|
|
buttonSize: 'mini'
|
|
|
},
|
|
@@ -321,7 +303,6 @@ export default {
|
|
|
}
|
|
|
const params = this.MixinClone(this.deviceInfo)
|
|
|
const clerk = this.clerks.find(res => res.member_id === params.member_id)
|
|
|
- console.log('clerk=', clerk)
|
|
|
const sendData = {
|
|
|
id: params.id,
|
|
|
member_id: params.member_id,
|
|
@@ -424,7 +405,6 @@ export default {
|
|
|
const groupData = groupBy(res, item => item.role_name)
|
|
|
if (Object.entries(groupData).length > 0) {
|
|
|
_this.nurses = Object.entries(groupData)
|
|
|
- console.log(_this.nurses)
|
|
|
// Object.entries(groupData).forEach(item => {
|
|
|
// if (item[0] === '护士') {
|
|
|
// _this.nurses = item[1]
|
|
@@ -439,6 +419,12 @@ export default {
|
|
|
} else {
|
|
|
this.$message.error('请先设置适用人')
|
|
|
}
|
|
|
+ },
|
|
|
+ huanban(row) {
|
|
|
+ this.formshow = true
|
|
|
+ this.deviceInfo = row
|
|
|
+ this.role_id = this.deviceInfo.role_id
|
|
|
+ this.getEmployees()
|
|
|
}
|
|
|
}
|
|
|
}
|