This commit is contained in:
zk
2023-12-27 18:00:39 +08:00
parent 63eb01d641
commit 36f484d028
13 changed files with 231 additions and 136 deletions
@@ -80,12 +80,6 @@ export function useFooterTable() {
key: 'userCount',
extData: {},
},
// {
// name: '入库设备数量',
// value: '',
// key: 'deviceNum',
// extData: {},
// },
{
name: '佩戴手表人数',
value: '',
@@ -104,12 +98,6 @@ export function useFooterTable() {
key: 'thirtyDayNum',
extData: {},
},
{
name: '近一年活跃人数',
value: '',
key: 'yearDayNum',
extData: {},
},
]);
function setFooterList(res: any) {
@@ -148,6 +136,18 @@ export function useAlarmDetail() {
value: '',
key: 'orgName2',
},
{
name: '位置',
value: '',
key: '',
customRender: (record) => {
if (record?.lat) {
return `${record.lat},${record.lon}`;
} else {
return '未知位置';
}
},
},
]);
const detailRight = ref([
{
@@ -175,10 +175,18 @@ export function useAlarmDetail() {
function setDetail(res) {
if (res) {
detailLeft.value.forEach((item) => {
item.value = res[item.key];
if (item.customRender) {
item.value = res;
} else {
item.value = res[item.key];
}
});
detailRight.value.forEach((item) => {
item.value = res[item.key];
if (item.customRender) {
item.value = res;
} else {
item.value = res[item.key];
}
});
}
}
@@ -238,7 +246,7 @@ export function useTree() {
export const columns = [
{
title: '员工名',
title: '员工名',
dataIndex: 'realName',
align: 'center',
key: 'realName',
@@ -248,18 +256,21 @@ export const columns = [
dataIndex: 'orgName',
align: 'center',
key: 'orgName',
ellipsis: true,
},
{
title: '部门名称',
dataIndex: 'orgName1',
align: 'center',
key: 'orgName1',
ellipsis: true,
},
{
title: '工具编码',
dataIndex: 'watchNo',
align: 'center',
key: 'watchNo',
ellipsis: true,
},
{
title: '心率(次/分)',
@@ -314,14 +325,41 @@ export const columns = [
];
export function useChangeTable() {
const refresh = ref(true)
const refresh = ref(true);
function setRefresh() {
refresh.value = !refresh.value
refresh.value = !refresh.value;
}
return {
refresh,
setRefresh
}
setRefresh,
};
}
export function infoContent(res) {
return `
<div class="watch-modal">
<div class="modal-row">
<span class="label">部门名称:</span>
<span class="text">${res?.orgName}</span>
</div>
<div class="modal-row">
<span class="label">部门人数:</span>
<span class="text">${res?.userCount}</span>
</div>
<div class="modal-row">
<span class="label">佩戴手表人数:</span>
<span class="text">${res?.allotDeviceNum}</span>
</div>
<div class="modal-row">
<span class="label">近一周活跃人数:</span>
<span class="text">${res?.sevenDayNum}</span>
</div>
<div class="modal-row">
<span class="label">近一月人数:</span>
<span class="text">${res?.thirtyDayNum}</span>
</div>
</div>
`;
}