Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_vue
This commit is contained in:
commit
1e7241af3a
|
|
@ -247,6 +247,18 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="7" tab="头像">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="头像" v-bind="validateInfos.headPath"
|
||||
id="BizEmployeesInfoForm-headPath" name="headPath" :labelCol="labelCol3">
|
||||
<j-image-upload v-if="!!formData.headPath" text="无" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
:value="opeMediaAddress + formData.headPath" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
@ -347,6 +359,7 @@ const formData = reactive<Record<string, any>>({
|
|||
startTime: '',
|
||||
endTime: '',
|
||||
currentAddress: '',
|
||||
headPath: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
|
||||
|
|
|
|||
|
|
@ -107,14 +107,16 @@
|
|||
<NuBaseInfoAddModal ref="registerAddModal" @success="handleSuccess"></NuBaseInfoAddModal>
|
||||
<BaseWlsbListModal ref="wlsbModal" ></BaseWlsbListModal>
|
||||
<CameraPreviewModal ref="previewModal"></CameraPreviewModal>
|
||||
<!-- 设备预览 -->
|
||||
<IotDevicesModall ref="iotDevicesModal"></IotDevicesModall>
|
||||
<!--角色菜单授权抽屉-->
|
||||
<RolePermissionDrawer @register="rolePermissionDrawer" />
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<CkfzrModal ref="registerCkfzrModal" @success="handleSuccess" />
|
||||
<!-- 出入库详情 -->
|
||||
<BlWarehouseMaterialInfoListModal ref="registerCrkModal" @success="handleSuccess" />
|
||||
<!-- 停用时停用设备 -->
|
||||
<IotDevicesTyModall ref="iotDevicesTyModal" @success="handleTingyong"></IotDevicesTyModall>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -126,6 +128,7 @@
|
|||
import BaseWlsbListModal from './components/BaseWlsbListModal.vue'
|
||||
import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPreviewModal.vue'
|
||||
import IotDevicesModall from '/@/views/biz/nuBaseInfo/iotDevices/IotDevicesModal.vue'
|
||||
import IotDevicesTyModall from '/@/views/biz/nuBaseInfo/iotDevices/IotDevicesTyModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
|
@ -144,8 +147,8 @@ const logoUrl = 'https://www.focusnu.com/devops/resource/img/logo.png'; // 替
|
|||
const { createMessage } = useMessage();
|
||||
|
||||
const formRef = ref();
|
||||
const previewModal = ref();
|
||||
const iotDevicesModal = ref();
|
||||
const iotDevicesTyModal = ref();
|
||||
const wlsbModal = ref();
|
||||
const registerCkfzrModal = ref();
|
||||
const registerCrkModal = ref();
|
||||
|
|
@ -194,7 +197,9 @@ function handleChangeValidateStatus(record,checked) {
|
|||
if (checked) {
|
||||
handleQiyong(record);
|
||||
} else {
|
||||
handleTingyong(record);
|
||||
iotDevicesTyModal.value.disableSubmit = false;
|
||||
iotDevicesTyModal.value.init(record);
|
||||
// handleTingyong(record);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -251,6 +256,7 @@ function handleChangeValidateStatus(record,checked) {
|
|||
* 停用
|
||||
*/
|
||||
async function handleTingyong(record) {
|
||||
console.log("🚀 ~ handleTingyong ~ record:", record)
|
||||
record.status = 5;
|
||||
await hldyQyty(record, true).then((res) => {
|
||||
if (res.success) {
|
||||
|
|
@ -261,13 +267,6 @@ function handleChangeValidateStatus(record,checked) {
|
|||
reload();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 预览
|
||||
*/
|
||||
function handlePreview(record: Recordable) {
|
||||
previewModal.value.disableSubmit = true;
|
||||
previewModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
|
|
@ -295,7 +294,6 @@ function handleChangeValidateStatus(record,checked) {
|
|||
|
||||
function reload() {
|
||||
defHttp.get({url: '/nuBaseInfo/nuBaseInfo/qyList',params:queryParam}).then(res => {
|
||||
console.log("🌊 ~ reload ~ res1111111:", res)
|
||||
tableData.value = res.records;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,33 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'deviceStatus_dictText'
|
||||
},
|
||||
];
|
||||
|
||||
export const columnsTy: BasicColumn[] = [
|
||||
{
|
||||
title: '设备标识',
|
||||
align: "center",
|
||||
dataIndex: 'deviceIndex'
|
||||
},
|
||||
{
|
||||
title: '设备型号',
|
||||
align: "center",
|
||||
dataIndex: 'deviceModel'
|
||||
},
|
||||
{
|
||||
title: '设备维度',
|
||||
align: "center",
|
||||
dataIndex: 'dimension'
|
||||
},
|
||||
{
|
||||
title: '设备类型',
|
||||
align: "center",
|
||||
dataIndex: 'deviceType_dictText'
|
||||
},
|
||||
{
|
||||
title: '在线状态',
|
||||
align: "center",
|
||||
dataIndex: 'deviceStatus_dictText'
|
||||
},
|
||||
];
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
deviceType: {title: '设备类型',order: 0,view: 'text', type: 'string',},
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPrev
|
|||
canResize:false,
|
||||
useSearchForm: false,
|
||||
showIndexColumn: true,
|
||||
immediate: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
|
|
@ -213,6 +214,7 @@ function handlePreview(record: Recordable) {
|
|||
|
||||
function init() {
|
||||
//初始化
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
|
|
|||
|
|
@ -0,0 +1,211 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="nuId">
|
||||
<template #label><span title="区域编码">区域编码</span></template>
|
||||
<a-input placeholder="请输入区域编码" v-model:value="queryParam.nuId" disabled></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="nuName">
|
||||
<template #label><span title="区域名称">区域名称</span></template>
|
||||
<a-input placeholder="请输入区域名称" v-model:value="queryParam.nuName" disabled></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :lg="6">
|
||||
<a-form-item name="dimension">
|
||||
<template #label><span title="设备维度">设备维度</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.dimension" :showLabel="false" dictCode="dimension" placeholder="请选择设备纬度" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="deviceType">
|
||||
<template #label><span title="设备类型">设备类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.deviceType" :showLabel="false" dictCode="tplink_device_type" placeholder="请选择设备类型" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="deviceStatus">
|
||||
<template #label><span title="在线状态">在线状态</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.deviceStatus" :showLabel="false" dictCode="tplink_status" placeholder="请选择在线状态" />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<!-- <a-col :lg="9" :md="9" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</span>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
||||
<div style="margin-top: 10px;padding: 14px;background-color: white;">
|
||||
<span style="font-size: 16px;color:red;font-weight: 700;">提示:您停用区域【{{queryParam.nuName}}】,将释放所有设备,请慎重操作!</span>
|
||||
</div>
|
||||
<!-- 表单区域 -->
|
||||
<IotDevicesModal ref="registerModal" @success="handleSuccess"></IotDevicesModal>
|
||||
|
||||
<CameraPreviewModal ref="previewModal"></CameraPreviewModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="iotDevices-iotDevices" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columnsTy, superQuerySchema } from './IotDevices.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './IotDevices.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import IotDevicesModal from './components/IotDevicesModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPreviewModal.vue'
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const nuInfo = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const previewModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '物联设备预览',
|
||||
api: list,
|
||||
columns:columnsTy,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
showIndexColumn: true,
|
||||
immediate:false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "物联设备预览",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:8,
|
||||
xl:8,
|
||||
xxl:8
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 16,
|
||||
});
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 摄像头预览
|
||||
*/
|
||||
function handlePreview(record: Recordable) {
|
||||
previewModal.value.disableSubmit = true;
|
||||
previewModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '预览',
|
||||
onClick: handlePreview.bind(null, record),
|
||||
ifShow: () => {
|
||||
return record.deviceType == 'SURVEILLANCECAMERA';
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
console.log("🚀 ~ init ~ record:", record)
|
||||
nuInfo.value = record;
|
||||
queryParam.nuId = record.nuId;
|
||||
queryParam.nuName = record.nuName;
|
||||
reload();
|
||||
}
|
||||
|
||||
function tyFun() {
|
||||
emit('ok', nuInfo.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
tyFun
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" bodyStyle="padding:14px;"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<IotDevicesList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></IotDevicesList>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">停用</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import IotDevicesList from './IotDevicesTyList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(1200);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function init(record) {
|
||||
title.value = '区域停用';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.init(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.tyFun();
|
||||
}
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(record) {
|
||||
handleCancel();
|
||||
emit('success',record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -21,12 +21,12 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
title: '长者性别',
|
||||
align: 'center',
|
||||
dataIndex: 'sex',
|
||||
},
|
||||
{
|
||||
title: '年龄',
|
||||
title: '长者年龄',
|
||||
align: 'center',
|
||||
dataIndex: 'age',
|
||||
},
|
||||
|
|
@ -57,6 +57,7 @@ export const auditHisColumns: BasicColumn[] = [
|
|||
title: 'NUID',
|
||||
align: 'center',
|
||||
dataIndex: 'nuId',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '护理单元',
|
||||
|
|
@ -67,6 +68,7 @@ export const auditHisColumns: BasicColumn[] = [
|
|||
title: '长者姓名',
|
||||
align: 'center',
|
||||
dataIndex: 'name',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
|
|
@ -84,6 +86,7 @@ export const auditHisColumns: BasicColumn[] = [
|
|||
title: '监护人姓名',
|
||||
align: 'center',
|
||||
dataIndex: 'guardianName',
|
||||
width: 100,
|
||||
},
|
||||
// {
|
||||
// title: '关系',
|
||||
|
|
@ -94,6 +97,17 @@ export const auditHisColumns: BasicColumn[] = [
|
|||
title: '监护人电话',
|
||||
align: 'center',
|
||||
dataIndex: 'guardianPhone',
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
title: '审核类型',
|
||||
align: 'center',
|
||||
dataIndex: 'guardianPhone',
|
||||
customRender: function ({ text }) {
|
||||
return '变更';
|
||||
},
|
||||
width: 100,
|
||||
|
||||
},
|
||||
{
|
||||
title: '审核时间',
|
||||
|
|
|
|||
|
|
@ -154,14 +154,14 @@ function getTableAction(record) {
|
|||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '护理流程',
|
||||
onClick: handleHllc.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '优先派单',
|
||||
onClick: handleAssignCaregiver.bind(null, record),
|
||||
}
|
||||
// {
|
||||
// label: '护理流程',
|
||||
// onClick: handleHllc.bind(null, record),
|
||||
// },
|
||||
// {
|
||||
// label: '优先派单',
|
||||
// onClick: handleAssignCaregiver.bind(null, record),
|
||||
// }
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,11 @@ enum Api {
|
|||
edit = '/iot/tplink/cameraInfo/edit',
|
||||
rebootDevice = '/iot/tplink/cameraInfo/rebootDevice',
|
||||
previewUrl = '/iot/tplink/cameraInfo/getPreviewUrl',
|
||||
getDeviceDetails = '/iot/tplink/cameraInfo/getDeviceDetails',
|
||||
getImageCommon = '/iot/tplink/cameraInfo/getImageCommon',
|
||||
setImageCommon = '/iot/tplink/cameraInfo/setImageCommon',
|
||||
getImageSwitch = '/iot/tplink/cameraInfo/getImageSwitch',
|
||||
setImageSwitch = '/iot/tplink/cameraInfo/setImageSwitch',
|
||||
getOsdCapability = '/iot/tplink/cameraInfo/getOsdCapability',
|
||||
getOsd = '/iot/tplink/cameraInfo/getOsd',
|
||||
setOsd = '/iot/tplink/cameraInfo/setOsd',
|
||||
|
|
@ -112,6 +115,12 @@ export const rebootDevice = (params) => {
|
|||
return defHttp.post({ url: Api.rebootDevice, params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备信息
|
||||
* @param params
|
||||
*/
|
||||
export const getDeviceDetails = (params) => defHttp.get({ url: Api.getDeviceDetails, params });
|
||||
|
||||
/**
|
||||
* 获取画面基本信息
|
||||
* @param params
|
||||
|
|
@ -124,6 +133,18 @@ export const getImageCommon = (params) => defHttp.post({ url: Api.getImageCommon
|
|||
*/
|
||||
export const setImageCommon = (params) => defHttp.post({ url: Api.setImageCommon, params });
|
||||
|
||||
/**
|
||||
* 获取画面基本信息
|
||||
* @param params
|
||||
*/
|
||||
export const getImageSwitch = (params) => defHttp.post({ url: Api.getImageSwitch, params });
|
||||
|
||||
/**
|
||||
* 设置画面基本信息
|
||||
* @param params
|
||||
*/
|
||||
export const setImageSwitch = (params) => defHttp.post({ url: Api.setImageSwitch, params });
|
||||
|
||||
/**
|
||||
* 获取OSD能力集参数
|
||||
* @param params
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<template #title>
|
||||
<a-row style="font-weight: normal;">
|
||||
<a-col :span="18">
|
||||
<div style="font-size: 14px;">SN:<span style="font-weight: bold;">{{ item.sn ? item.sn : '未配置' }}</span></div>
|
||||
<div style="font-size: 14px;">SN:<span style="font-weight: bold;">{{ item.mac ? item.mac : '未配置' }}</span></div>
|
||||
<div style="font-size: 12px;">设备名称:{{ item.deviceName }}</div>
|
||||
</a-col>
|
||||
<a-col :span="6" style="display: flex; justify-content: flex-end;">
|
||||
|
|
@ -105,11 +105,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="iot-nuIotCameraInfo" setup>
|
||||
import { ref, reactive, createVNode, h, onMounted, watch, unref } from 'vue';
|
||||
import { ref, reactive, createVNode, h, onMounted, watch, unref,nextTick } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, searchFormSchema } from '../camera.data';
|
||||
import { getImageCommon, list } from '../camera.api';
|
||||
import { getDeviceDetails, list } from '../camera.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useDrawer } from "@/components/Drawer";
|
||||
import { useRouter } from 'vue-router';
|
||||
|
|
@ -166,16 +166,23 @@ function handlePreview(record: Recordable) {
|
|||
if (record.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
getImageCommon({
|
||||
"deviceIndex": record.deviceIndex,
|
||||
"type": "switch"
|
||||
// getImageCommon({
|
||||
// "deviceIndex": record.deviceIndex,
|
||||
// "type": "switch"
|
||||
// }).then(res => {
|
||||
// previewModal.value.disableSubmit = true;
|
||||
// previewModal.value.edit(record);
|
||||
// }).catch(res => {
|
||||
// reload();
|
||||
// });
|
||||
getDeviceDetails({
|
||||
"deviceIndex": record.deviceIndex
|
||||
}).then(res => {
|
||||
previewModal.value.disableSubmit = true;
|
||||
previewModal.value.edit(record);
|
||||
}).catch(res => {
|
||||
}).catch(res=>{
|
||||
reload();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -188,21 +195,43 @@ function handleSuccess() {
|
|||
/**
|
||||
* 画面配置
|
||||
*/
|
||||
// function handlePicConfig(record) {
|
||||
// var params = {
|
||||
// deviceIndex: record.deviceIndex,
|
||||
// parentId: record.parentId,
|
||||
// multitrans: record.multitrans,
|
||||
// projectId: record.projectId,
|
||||
// regionId: record.regionId,
|
||||
// ip: record.ip
|
||||
// }
|
||||
// cameraPictureConfigModal.value.disableSubmit = true;
|
||||
// cameraPictureConfigModal.value.edit(params);
|
||||
// }
|
||||
function handlePicConfig(record) {
|
||||
var params = {
|
||||
deviceIndex: record.deviceIndex,
|
||||
parentId: record.parentId,
|
||||
multitrans: record.multitrans,
|
||||
projectId: record.projectId,
|
||||
regionId: record.regionId,
|
||||
ip: record.ip
|
||||
if (record.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
cameraPictureConfigModal.value.disableSubmit = true;
|
||||
cameraPictureConfigModal.value.edit(params);
|
||||
|
||||
getDeviceDetails({
|
||||
"deviceIndex": record.deviceIndex
|
||||
}).then(res => {
|
||||
var params = {
|
||||
deviceIndex: record.deviceIndex,
|
||||
deviceName: record.deviceName,
|
||||
parentId: record.parentId,
|
||||
multitrans: record.multitrans,
|
||||
projectId: record.projectId,
|
||||
regionId: record.regionId,
|
||||
ip: record.ip
|
||||
}
|
||||
nextTick(()=>{
|
||||
cameraPictureConfigModal.value.disableSubmit = true;
|
||||
cameraPictureConfigModal.value.edit(params);
|
||||
})
|
||||
}).catch(res=>{
|
||||
reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 左侧树选择后触发
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<span class="buttonSpan jtImg" @click="screenshot"><span style="margin-left:30px;">截图</span></span>
|
||||
<span class="buttonSpan bjImg" @click="manualAlarm"><span style="margin-left:30px;">报警</span></span>
|
||||
|
||||
|
||||
<a-popover >
|
||||
<template #content>
|
||||
<div style="text-align: center;">
|
||||
|
|
@ -166,10 +166,10 @@ import { useMessage } from '/@/hooks/web/useMessage';
|
|||
import { getValueType } from '/@/utils';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import {
|
||||
getImageCommon,
|
||||
getImageSwitch,
|
||||
getMultitransUrl,
|
||||
getPreviewUrl,
|
||||
setImageCommon,
|
||||
setImageSwitch,
|
||||
testAudio,
|
||||
motionCtrl
|
||||
} from "../camera.api";
|
||||
|
|
@ -340,7 +340,7 @@ function getSwitch() {
|
|||
if (formData.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
getImageCommon({
|
||||
getImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch"
|
||||
}).then(res => {
|
||||
|
|
@ -354,7 +354,7 @@ function getSwitch() {
|
|||
function changeSwitch(attr, value) {
|
||||
let param = {};
|
||||
param[attr] = value;
|
||||
setImageCommon({
|
||||
setImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch",
|
||||
"param": param
|
||||
|
|
|
|||
|
|
@ -79,12 +79,11 @@ import { useMessage } from '@/hooks/web/useMessage';
|
|||
import { getValueType } from '@/utils';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import {
|
||||
getImageCommon,
|
||||
getImageSwitch,
|
||||
setImageSwitch,
|
||||
getMultitransUrl,
|
||||
getPreviewUrl,
|
||||
setImageCommon,
|
||||
testAudio,
|
||||
motionCtrl
|
||||
testAudio
|
||||
} from "../camera.api";
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -300,7 +299,7 @@ function getSwitch() {
|
|||
if (formData.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
getImageCommon({
|
||||
getImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch"
|
||||
}).then(res => {
|
||||
|
|
@ -314,7 +313,7 @@ function getSwitch() {
|
|||
function changeSwitch(attr, value) {
|
||||
let param = {};
|
||||
param[attr] = value;
|
||||
setImageCommon({
|
||||
setImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch",
|
||||
"param": param
|
||||
|
|
|
|||
|
|
@ -16,12 +16,7 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: 'SN',
|
||||
align: "center",
|
||||
dataIndex: 'address'
|
||||
},
|
||||
{
|
||||
title: '采集器号',
|
||||
align: "center",
|
||||
dataIndex: 'cid'
|
||||
dataIndex: 'sn'
|
||||
},
|
||||
{
|
||||
title: '设备状态',
|
||||
|
|
@ -39,24 +34,6 @@ export const columns: BasicColumn[] = [
|
|||
return record.online?(record.online=='true'?'在线':'离线'):'';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '信号强度',
|
||||
align: "center",
|
||||
dataIndex: 'csq',
|
||||
customRender:({record})=>{
|
||||
if(record.csq){
|
||||
if(record.csq < 10){
|
||||
return '低';
|
||||
}else if(record.csq > 20){
|
||||
return '高';
|
||||
}else{
|
||||
return '中';
|
||||
}
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '用电量KWH',
|
||||
align: "center",
|
||||
|
|
@ -67,16 +44,6 @@ export const columns: BasicColumn[] = [
|
|||
align: "center",
|
||||
dataIndex: 'readTime'
|
||||
},
|
||||
{
|
||||
title: '上次上线时间',
|
||||
align: "center",
|
||||
dataIndex: 'connectTime'
|
||||
},
|
||||
{
|
||||
title: '上次掉线时间',
|
||||
align: "center",
|
||||
dataIndex: 'disconnectTime'
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
align: "center",
|
||||
|
|
@ -107,7 +74,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
},
|
||||
{
|
||||
label: 'SN',
|
||||
field: 'address',
|
||||
field: 'sn',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
|
|
@ -137,18 +104,4 @@ export const searchFormSchema: FormSchema[] = [
|
|||
},
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
label: '信号强度',
|
||||
field: 'csq',
|
||||
component: 'JDictSelectTag',
|
||||
componentProps: {
|
||||
placeholder: '请选择强度',
|
||||
options: [
|
||||
{ label: '高', value: '1' },
|
||||
{ label: '中', value: '2' },
|
||||
{ label: '低', value: '3' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
:wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="address">
|
||||
<a-form-item name="sn">
|
||||
<template #label><span title="SN">SN</span></template>
|
||||
<j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear :type="'default'"></j-input>
|
||||
<j-input placeholder="请输入SN" v-model:value="queryParam.sn" allow-clear :type="'default'"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
|
|
@ -146,8 +146,7 @@ function searchReset() {
|
|||
// 抄电表
|
||||
async function handleRead(record) {
|
||||
const params = {
|
||||
'cid': record.cid,
|
||||
'address': record.address,
|
||||
'sn': record.sn,
|
||||
};
|
||||
await eleRead(params);
|
||||
setTimeout(() => {
|
||||
|
|
@ -168,9 +167,8 @@ async function handleControlLz(record) {
|
|||
return;
|
||||
}
|
||||
const params = {
|
||||
'cid': record.cid,
|
||||
'address': record.address,
|
||||
'type': '10',
|
||||
'sn' : record.sn,
|
||||
'type': '10'
|
||||
};
|
||||
await eleControl(params);
|
||||
setTimeout(() => {
|
||||
|
|
@ -191,9 +189,8 @@ async function handleControlHz(record) {
|
|||
return;
|
||||
}
|
||||
const params = {
|
||||
'cid': record.cid,
|
||||
'address': record.address,
|
||||
'type': '11',
|
||||
'sn' : record.sn,
|
||||
'type': '11'
|
||||
};
|
||||
await eleControl(params);
|
||||
setTimeout(() => {
|
||||
|
|
@ -204,8 +201,7 @@ async function handleControlHz(record) {
|
|||
// 电表清零
|
||||
async function handleReset(record) {
|
||||
const params = {
|
||||
'cid': record.cid,
|
||||
'address': record.address,
|
||||
'sn' : record.sn
|
||||
};
|
||||
await eleReset(params);
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue