Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fa2e605a5 | ||
|
|
a47c2c7400 | ||
|
|
8e7b857dbd | ||
|
|
8044ce0461 | ||
|
|
592ffe1f50 | ||
|
|
eeb1496483 | ||
|
|
3da41ae2d3 | ||
|
|
7106e99a7b | ||
|
|
c1a56aefd9 | ||
|
|
4f848e7ce9 | ||
|
|
a9db38e5e1 | ||
|
|
80627d24c0 | ||
|
|
a24c936cde | ||
|
|
5db0c7effc | ||
|
|
28707b346e | ||
|
|
8eff9119c7 |
@@ -6,8 +6,7 @@
|
||||
<!-- onerror="this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"-->
|
||||
<!-- alt=""-->
|
||||
<!-- />-->
|
||||
<img class="avatar" v-if="getSrc(message)" :src="getSrc(message)" alt="" />
|
||||
<img class="avatar" v-else src="@/assets/image/default_avatar.png" alt="" />
|
||||
<img class="avatar" :src="avatarError ? defaultAvatar : (message?.avatar || defaultAvatar)" @error="onAvatarError" alt="" />
|
||||
<main class="message-area">
|
||||
<label class="name" v-if="message.flow === 'in' && message.conversationType === 'GROUP'">
|
||||
{{ message.nameCard || message.nick || message.from }}
|
||||
@@ -86,6 +85,7 @@
|
||||
import MessageReference from './message-reference.vue';
|
||||
import { Message } from '../interface';
|
||||
import { TUIEnv } from '../../../../../TUIKit/TUIPlugin';
|
||||
import defaultAvatar from '@/assets/image/default_avatar.png';
|
||||
import MessageEmojiReact from './message-emoji-react.vue';
|
||||
import TIM from '../../../../TUICore/tim/index';
|
||||
|
||||
@@ -145,6 +145,15 @@
|
||||
needEmojiReact: false,
|
||||
});
|
||||
|
||||
// 追踪头像加载失败状态,避免 watchEffect 重置时覆盖 @error 的修复
|
||||
const avatarError = ref(false);
|
||||
watch(() => (props.data as any)?.ID, () => {
|
||||
avatarError.value = false;
|
||||
});
|
||||
const onAvatarError = () => {
|
||||
avatarError.value = true;
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
data.type = constant;
|
||||
data.messagesList = props.messagesList;
|
||||
@@ -376,6 +385,9 @@
|
||||
|
||||
return {
|
||||
getSrc,
|
||||
defaultAvatar,
|
||||
avatarError,
|
||||
onAvatarError,
|
||||
...toRefs(data),
|
||||
toggleDialog,
|
||||
htmlRefHook,
|
||||
|
||||
@@ -9,6 +9,7 @@ module.exports = {
|
||||
outputDir: '../public/static/im-web',
|
||||
productionSourceMap: false,
|
||||
lintOnSave: false,
|
||||
transpileDependencies: ['element-plus', 'vue-router', '@ctrl/tinycolor'],
|
||||
chainWebpack: (config) => {
|
||||
config.resolve.alias.set('@', resolve('src')).set('tim', resolve('src/tim.js'));
|
||||
// 删除预加载
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="icon" href="faviconnew.png"><title>即时通信</title><link href="css/vendors~app.03806786.css" rel="stylesheet"><link href="css/app.12928813.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but 腾讯云即时通信 Web-IM doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="./TCaptcha.js"></script><script src="./aegis.min.js"></script><script>/**
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="icon" href="faviconnew.png"><title>即时通信</title><link href="css/vendors~app.28a73048.css" rel="stylesheet"><link href="css/app.7113887a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but 腾讯云即时通信 Web-IM doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="./TCaptcha.js"></script><script src="./aegis.min.js"></script><script>/**
|
||||
* 根据基础字体大小 和 效果图宽度设置 根节点字体大小
|
||||
* @param baseFontSize 浏览器默认字体大小 [注]浏览器最小字体为12像素,所以该值必需大于等于12
|
||||
* @param baseWidth 设计稿的尺寸
|
||||
@@ -53,4 +53,4 @@
|
||||
},
|
||||
false
|
||||
);
|
||||
};</script><script src="js/vendors~app.de88239f.js"></script><script src="js/app.0cb3a231.js"></script></body></html>
|
||||
};</script><script src="js/vendors~app.b38bf4ff.js"></script><script src="js/app.2f662ea4.js"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+120
-121
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
<BasicModal v-bind="$attrs" @register="register" :title="modalTitle" width="1200px" @ok="handleOk" destroyOnClose @visible-change="visibleChange">
|
||||
<a-row :gutter="10">
|
||||
<a-col :md="7" :sm="24">
|
||||
<a-card :style="{ minHeight: '613px', overflow: 'auto' }">
|
||||
<a-card :style="{ height: '613px', overflowY: 'auto' }">
|
||||
<!--组织机构-->
|
||||
<BasicTree
|
||||
ref="treeRef"
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
import { getToken } from '/@/utils/auth';
|
||||
import { useLoading } from '/@/components/Loading';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import qs from 'qs';
|
||||
const { viteOutUrl, apiUrl } = useGlobSetting();
|
||||
|
||||
export default defineComponent({
|
||||
@@ -135,14 +134,14 @@
|
||||
.get({
|
||||
url: '/health-system/api/sys/encryptInfo',
|
||||
params: {
|
||||
str: qs.stringify({
|
||||
str: {
|
||||
scheme: apiUrl.split('://')[0],
|
||||
host:
|
||||
apiUrl.split('://')[1].indexOf(':') !== -1
|
||||
? apiUrl.split('://')[1].substring(0, apiUrl.split('://')[1].indexOf(':'))
|
||||
: apiUrl.split('://')[1],
|
||||
tokenF: getToken(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
fontSize: props.size ?? '30px',
|
||||
opacity: 0.5,
|
||||
transition: 'opacity 0.5s',
|
||||
display: 'none',
|
||||
display: 'block',
|
||||
});
|
||||
|
||||
const bodyStyle = ref({
|
||||
|
||||
@@ -102,6 +102,7 @@ export const formSchema: FormSchema[] = [
|
||||
field: 'image',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
bizPath: 'img',
|
||||
fileMax: 1,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -266,6 +266,8 @@ export const formSchema: FormSchema[] = [
|
||||
component: 'JImageUpload',
|
||||
// rules: [{ required: true, message: '请选择头像' }],
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
//@ts-ignore
|
||||
maxCount: 1,
|
||||
},
|
||||
|
||||
@@ -190,6 +190,8 @@ export const formSchema: FormSchema[] = [
|
||||
label: '头像',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
// @ts-ignore
|
||||
maxCount: 1,
|
||||
},
|
||||
|
||||
@@ -169,6 +169,7 @@ export const formSchema: FormSchema[] = [
|
||||
field: 'img',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
bizPath: 'img',
|
||||
fileMax: 1,
|
||||
},
|
||||
rules: [{ required: false }],
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/>
|
||||
<div class="bottom-top">
|
||||
<div class="top-title"> <img :src="aedP" alt="" /> {{ showWindowInfo?.name }} </div>
|
||||
<div class="top-title-bottom"> 距离{{ showWindowInfo?.dis ? showWindowInfo?.dis : 0 }}m </div>
|
||||
<div class="top-title-bottom"> 距离{{ formatDistance(showWindowInfo?.dis) }} </div>
|
||||
<div class="top-title-describe"> {{ showWindowInfo?.installAddress ? showWindowInfo?.installAddress : '无' }} </div>
|
||||
<div class="table-list">
|
||||
<div class="label-d"> 设备厂家: </div>
|
||||
@@ -411,6 +411,17 @@
|
||||
window.open(getFileAccessHttpUrl(v), '_blank');
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化距离:超过1000米换算为千米,保留两位小数
|
||||
*/
|
||||
function formatDistance(dis) {
|
||||
if (!dis) return '0m';
|
||||
if (dis >= 1000) {
|
||||
return (dis / 1000).toFixed(2) + 'km';
|
||||
}
|
||||
return dis + 'm';
|
||||
}
|
||||
|
||||
function getName(val, list) {
|
||||
if (!val && val !== 0) return '';
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
|
||||
@@ -306,6 +306,7 @@ export const getFormSchema = () => {
|
||||
component: 'JUpload',
|
||||
componentProps: () => {
|
||||
return {
|
||||
bizPath: 'video',
|
||||
maxCount: 1,
|
||||
accept: '.mp4,video/mp4',
|
||||
tipText: '支持MP4格式,最大200M',
|
||||
@@ -319,6 +320,7 @@ export const getFormSchema = () => {
|
||||
component: 'JUpload',
|
||||
componentProps: () => {
|
||||
return {
|
||||
bizPath: 'bizfile',
|
||||
maxCount: 1,
|
||||
accept: 'application/pdf',
|
||||
tipText: '仅支持PDF格式文件,最大200M',
|
||||
|
||||
@@ -212,17 +212,17 @@
|
||||
const [registerTable, { reload, getForm, getDataSource, setTableData }] = tableContext;
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
:deep(.ant-table-cell-fix-left, .ant-table-cell-fix-right) {
|
||||
position: relative;
|
||||
border-bottom: none !important;
|
||||
|
||||
&:after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
}
|
||||
//:deep(.ant-table-cell-fix-left, .ant-table-cell-fix-right) {
|
||||
// position: relative;
|
||||
// //border-bottom: none !important;
|
||||
// border-bottom: 2px solid #f0f0f0 !important;
|
||||
// &:after {
|
||||
// position: absolute;
|
||||
// content: '';
|
||||
// width: 100%;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// border-bottom: 1px solid #f0f0f0;
|
||||
// }
|
||||
//}
|
||||
</style>
|
||||
|
||||
@@ -172,7 +172,13 @@
|
||||
loadingVisible.value = false;
|
||||
};
|
||||
window.onmessage = async (msg) => {
|
||||
const result = JSON.parse(msg.data);
|
||||
if (!msg.data || typeof msg.data !== 'string') return;
|
||||
let result: any;
|
||||
try {
|
||||
result = JSON.parse(msg.data);
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
switch (result.code) {
|
||||
case 'closeLoading':
|
||||
closeLoading();
|
||||
|
||||
@@ -141,6 +141,8 @@ export const formSchema = function (showGoodAt: boolean): FormSchema[] {
|
||||
component: 'JImageUpload',
|
||||
required: true,
|
||||
componentProps: () => ({
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
}),
|
||||
},
|
||||
|
||||
+5
-2
@@ -7,8 +7,8 @@
|
||||
</BasicForm>
|
||||
<template #footer v-if="title !== '查看'">
|
||||
<a-button @click="handleCanel">取消</a-button>
|
||||
<a-button type="primary" @click="handleSubmit(1)">保存并发送</a-button>
|
||||
<a-button type="primary" @click="handleSubmit(2)">保存</a-button>
|
||||
<a-button type="primary" :loading="submitting" :disabled="submitting" @click="handleSubmit(1)">保存并发送</a-button>
|
||||
<a-button type="primary" :loading="submitting" :disabled="submitting" @click="handleSubmit(2)">保存</a-button>
|
||||
</template>
|
||||
</BasicModal>
|
||||
<ChooseSome
|
||||
@@ -35,6 +35,7 @@
|
||||
// Emits声明
|
||||
const emit = defineEmits(['register', 'success', 'userData']);
|
||||
const isUpdate = ref(true);
|
||||
const submitting = ref(false);
|
||||
const [examinationModal, { openDrawer }] = useDrawer();
|
||||
//设置标题
|
||||
const title = ref(String);
|
||||
@@ -100,6 +101,7 @@
|
||||
//表单提交事件
|
||||
async function handleSubmit(type: number) {
|
||||
try {
|
||||
submitting.value = true;
|
||||
let values = await validate();
|
||||
setModalProps({ confirmLoading: true });
|
||||
//提交表单
|
||||
@@ -109,6 +111,7 @@
|
||||
//刷新列表
|
||||
emit('success');
|
||||
} finally {
|
||||
submitting.value = false;
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
|
||||
+18
-11
@@ -10,7 +10,8 @@
|
||||
<!-- <div>数据日期:{{ userInfo.dataDate }}</div>-->
|
||||
</div>
|
||||
<div style="width: 75%">
|
||||
<div style="display: flex; justify-content: flex-end; padding-right: 30px">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; padding-right: 30px">
|
||||
<div style="color: #faad14; font-size: 13px; padding-left: 4px">{{ noDataTip }}</div>
|
||||
<div style="display: flex; font-size: 20px; align-items: center">
|
||||
<a-button size="small" @click="changeDate('0')">
|
||||
<LeftOutlined />
|
||||
@@ -53,13 +54,14 @@
|
||||
import AllLook from '/@/views/healthMonitor/healMonitorManage/monitorToll/userInfo/componets/allLook.vue';
|
||||
import { getDetail, userDataDayByMonth } from '/@/views/healthMonitor/healMonitorManage/monitorToll/personalData/personalData.api';
|
||||
import dayjs from 'dayjs';
|
||||
import { Menu, message } from 'ant-design-vue';
|
||||
import { Menu } from 'ant-design-vue';
|
||||
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
|
||||
const userInfo = ref({});
|
||||
const infoData = ref({});
|
||||
const userId = ref('');
|
||||
const haveInfo = ref('');
|
||||
const nowDate = ref(dayjs());
|
||||
const noDataTip = ref('');
|
||||
const loadedYear = ref(dayjs().format('YYYY'));
|
||||
const isRight = computed(() => dayjs(nowDate.value).format('YYYY-MM-DD') != dayjs().format('YYYY-MM-DD'));
|
||||
//表单赋值
|
||||
@@ -115,15 +117,18 @@
|
||||
}
|
||||
|
||||
async function getInfo() {
|
||||
const dateStr = dayjs(nowDate.value).format('YYYY-MM-DD');
|
||||
await getDetail({
|
||||
userId: userId.value,
|
||||
dataDate: dayjs(nowDate.value).format('YYYY-MM-DD'),
|
||||
dataDate: dateStr,
|
||||
}).then((res) => {
|
||||
// openModal(true, {
|
||||
// record,
|
||||
// dataInfo: res,
|
||||
// });
|
||||
infoData.value = res;
|
||||
// API 返回空数据时行内提示,否则清空提示
|
||||
if (!res || Object.keys(res).length === 0) {
|
||||
noDataTip.value = `【${dateStr}】暂无监测数据`;
|
||||
} else {
|
||||
noDataTip.value = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -138,7 +143,9 @@
|
||||
if (getDisabled(nowDate.value)) {
|
||||
getInfo();
|
||||
} else {
|
||||
message.info('当日暂无监测数据');
|
||||
// 本地记录无数据:清空展示数据并行内提示具体日期
|
||||
infoData.value = {};
|
||||
noDataTip.value = `【${dayjs(nowDate.value).format('YYYY-MM-DD')}】暂无监测数据`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,9 +225,9 @@
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/* 隐藏日历面板中非当前月份的日期格,仅对该 picker 生效 */
|
||||
.personal-data-no-other-month .ant-picker-cell:not(.ant-picker-cell-in-view) {
|
||||
/* 隐藏日历面板中非当前月份的日期格,仅对该 picker 生效 */
|
||||
.personal-data-no-other-month .ant-picker-cell:not(.ant-picker-cell-in-view) {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+66
-10
@@ -3,7 +3,6 @@ import { message } from 'ant-design-vue';
|
||||
import { allSecondaryDepartsNew, getThirdDepartsNew } from '/@/utils/system/api';
|
||||
import moment from 'moment';
|
||||
import dayjs from 'dayjs';
|
||||
import { h } from 'vue';
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
@@ -134,10 +133,6 @@ export const columnsNew: BasicColumn[] = [
|
||||
{
|
||||
title: '单位名称',
|
||||
dataIndex: ['orgCodeName'],
|
||||
customRender: ({ text, record }) => {
|
||||
const isRed = record?.orgCode?.length === 3;
|
||||
return h('span', { style: isRed ? { color: 'red' } : {} }, text);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '部门名称',
|
||||
@@ -165,14 +160,14 @@ export const columnsNew: BasicColumn[] = [
|
||||
},
|
||||
{
|
||||
title: '未分配设备数',
|
||||
dataIndex: 'unassignedDeviceNums',
|
||||
dataIndex: 'undistributedDeviceNums',
|
||||
customRender: ({ record }) => {
|
||||
const total = record.totalAssignedDeviceNums ?? 0;
|
||||
const assigned = record.assignedDeviceNums ?? 0;
|
||||
return total - assigned;
|
||||
return Math.max(0, total - assigned);
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
title: '已绑定设备数',
|
||||
dataIndex: ['assignedDeviceNums'],
|
||||
customRender: ({ text }) => {
|
||||
@@ -182,11 +177,11 @@ export const columnsNew: BasicColumn[] = [
|
||||
},
|
||||
{
|
||||
title: '未绑定设备数',
|
||||
dataIndex: 'unassignedDeviceNums',
|
||||
dataIndex: 'undistributedDeviceNums',
|
||||
customRender: ({ record }) => {
|
||||
const total = record.totalAssignedDeviceNums ?? 0;
|
||||
const assigned = record.assignedDeviceNums ?? 0;
|
||||
return total - assigned;
|
||||
return Math.max(0, total - assigned);
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -197,6 +192,15 @@ export const columnsNew: BasicColumn[] = [
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '关爱人员佩戴人数',
|
||||
dataIndex: ['careWearNums'],
|
||||
width: 150,
|
||||
customRender: ({ text }) => {
|
||||
if (!text) return 0;
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '未佩戴人员数',
|
||||
dataIndex: ['undistributedUserNums'],
|
||||
@@ -205,6 +209,47 @@ export const columnsNew: BasicColumn[] = [
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '关爱人员未佩戴人数',
|
||||
dataIndex: ['careUnwearNums'],
|
||||
width: 160,
|
||||
customRender: ({ text }) => {
|
||||
if (!text) return 0;
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '关爱人员未佩戴人数\n(仅计入统计日期起期已绑定的人数)',
|
||||
dataIndex: ['careUnwearAtStartNums'],
|
||||
width: 180,
|
||||
customHeaderCell: () => {
|
||||
return {
|
||||
style: {
|
||||
whiteSpace: 'pre-wrap',
|
||||
},
|
||||
};
|
||||
},
|
||||
customRender: ({ text }) => {
|
||||
if (!text) return 0;
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '非关爱人员数量',
|
||||
dataIndex: ['nonCareNums'],
|
||||
customRender: ({ text }) => {
|
||||
if (!text) return 0;
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '关爱人员数量',
|
||||
dataIndex: ['careNums'],
|
||||
customRender: ({ text }) => {
|
||||
if (!text) return 0;
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '心率异常人数',
|
||||
dataIndex: ['heartRateNums'],
|
||||
@@ -237,6 +282,7 @@ export const columnsNew: BasicColumn[] = [
|
||||
return text;
|
||||
},
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
const startTime = dayjs().subtract(6, 'day').format('YYYY-MM-DD');
|
||||
@@ -381,6 +427,16 @@ export const detailColumns = (arr: BasicColumn[] = []) => {
|
||||
title: '手表所属单位',
|
||||
dataIndex: 'watchOrgName',
|
||||
},
|
||||
{
|
||||
title: '非关爱人员',
|
||||
dataIndex: 'nonCareFlag',
|
||||
width: 100,
|
||||
customRender: ({ text }) => {
|
||||
if (text === 1) return '是';
|
||||
if (text === 0) return '否';
|
||||
return '';
|
||||
},
|
||||
},
|
||||
...arr,
|
||||
{
|
||||
title: '应佩戴天数',
|
||||
|
||||
+1
-4
@@ -88,23 +88,20 @@
|
||||
|
||||
const [registerTable, { reload, getForm }] = tableContext;
|
||||
function getTableAction(record: any) {
|
||||
let orgCodeLenth = record?.orgCode?.length;
|
||||
let flag = record?.orgCodeLeafName == '-';
|
||||
return [
|
||||
{
|
||||
label: '明细',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
disabled: orgCodeLenth < 6,
|
||||
},
|
||||
{
|
||||
label: '明细导出',
|
||||
onClick: handleExport.bind(null, record),
|
||||
disabled: orgCodeLenth < 6,
|
||||
},
|
||||
{
|
||||
label: '周报',
|
||||
onClick: handleWeekReport.bind(null, record),
|
||||
disabled: !flag || orgCodeLenth < 6,
|
||||
disabled: !flag,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@
|
||||
// orgCodeSecond:data.record?.orgCode
|
||||
});
|
||||
bindUserId.value = data.record?.bindUserId;
|
||||
paramsInfo.value = { orgCode: 'A01' };
|
||||
paramsInfo.value = { orgCode: data.record?.orgCode };
|
||||
await clearValidate();
|
||||
// 隐藏底部时禁用整个表单
|
||||
await setProps({ disabled: !data?.showFooter });
|
||||
|
||||
+54
-87
@@ -211,16 +211,21 @@ export const formSchema: FormSchema[] = [
|
||||
field: 'deptId',
|
||||
required: true,
|
||||
component: 'ApiSelect',
|
||||
defaultValue: '1683768826307096578',
|
||||
show: false,
|
||||
componentProps: () => {
|
||||
componentProps: ({ formModel }) => {
|
||||
const { getVal: getVal1, disabled: disabled1 } = initD();
|
||||
getVal1('id');
|
||||
return {
|
||||
api: allSecondaryDepartsNew,
|
||||
resultField: 'result',
|
||||
labelField: 'departName',
|
||||
immediate: true,
|
||||
valueField: 'id',
|
||||
disabled: true,
|
||||
disabled: disabled1,
|
||||
afterFetch: (res: any) => {
|
||||
if (res.length === 1) {
|
||||
formModel.deptId = res[0].id;
|
||||
}
|
||||
},
|
||||
getPopupContainer: () => document.body,
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any): boolean => {
|
||||
@@ -321,40 +326,40 @@ export const rkFormSchema: FormSchema[] = [
|
||||
required: true,
|
||||
slot: 'file',
|
||||
},
|
||||
// {
|
||||
// label: '单位名称',
|
||||
// field: 'deptId',
|
||||
// component: 'ApiSelect',
|
||||
// required: true,
|
||||
// componentProps: ({ formModel, schema }) => {
|
||||
// const { getVal, disabled } = initD();
|
||||
// getVal('id');
|
||||
// return {
|
||||
// api: allSecondaryDepartsNew,
|
||||
// resultField: 'list',
|
||||
// labelField: 'departName',
|
||||
// valueField: 'id',
|
||||
// immediate: true,
|
||||
// onChange: (val: any) => {
|
||||
// if (val) {
|
||||
// formModel['orgId'] = '';
|
||||
// }
|
||||
// },
|
||||
// onDeselect: () => {
|
||||
// formModel.deptId = '';
|
||||
// formModel['orgId'] = '';
|
||||
// },
|
||||
// showSearch: true,
|
||||
// filterOption: (input: string, option: any): boolean => {
|
||||
// const str: string = input.toLowerCase();
|
||||
// return option.label.toLowerCase().indexOf(str) >= 0;
|
||||
// },
|
||||
// disabled: disabled,
|
||||
// getPopupContainer: () => document.body,
|
||||
// };
|
||||
// },
|
||||
// },
|
||||
/*{
|
||||
{
|
||||
label: '单位名称',
|
||||
field: 'deptId',
|
||||
component: 'ApiSelect',
|
||||
required: true,
|
||||
componentProps: ({ formModel, schema }) => {
|
||||
const { getVal, disabled } = initD();
|
||||
getVal('id');
|
||||
return {
|
||||
api: allSecondaryDepartsNew,
|
||||
resultField: 'list',
|
||||
labelField: 'departName',
|
||||
valueField: 'id',
|
||||
immediate: true,
|
||||
onChange: (val: any) => {
|
||||
if (val) {
|
||||
formModel['orgId'] = '';
|
||||
}
|
||||
},
|
||||
onDeselect: () => {
|
||||
formModel.deptId = '';
|
||||
formModel['orgId'] = '';
|
||||
},
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any): boolean => {
|
||||
const str: string = input.toLowerCase();
|
||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
||||
},
|
||||
disabled: disabled,
|
||||
getPopupContainer: () => document.body,
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '部门名称',
|
||||
field: 'orgId',
|
||||
component: 'ApiSelect',
|
||||
@@ -385,7 +390,7 @@ export const rkFormSchema: FormSchema[] = [
|
||||
};
|
||||
},
|
||||
show: false,
|
||||
},*/
|
||||
},
|
||||
];
|
||||
// 绑定导入
|
||||
export const bindUserFormSchema: FormSchema[] = [
|
||||
@@ -721,11 +726,6 @@ export const mColumns: BasicColumn[] = [
|
||||
dataIndex: 'realname',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '单位名称',
|
||||
dataIndex: ['secondDepart', 'departName'],
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '部门名称',
|
||||
dataIndex: ['depart', 'departName'],
|
||||
@@ -737,7 +737,7 @@ export const mColumns: BasicColumn[] = [
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
export const mSearchFormSchema = (orgCode = 'orgCode', orgCode1 = 'orgCode1', threeOrgCode = 'threeOrgCode') => {
|
||||
export const mSearchFormSchema = (orgCode) => {
|
||||
const schemaInfo: FormSchema[] = [
|
||||
{
|
||||
label: '员工姓名',
|
||||
@@ -746,66 +746,33 @@ export const mSearchFormSchema = (orgCode = 'orgCode', orgCode1 = 'orgCode1', th
|
||||
},
|
||||
|
||||
{
|
||||
label: '单位名称',
|
||||
field: orgCode1,
|
||||
component: 'ApiSelect',
|
||||
componentProps: ({ formModel, schema }) => {
|
||||
return {
|
||||
api: allSecondaryDepartsNew,
|
||||
resultField: 'list',
|
||||
labelField: 'departName',
|
||||
valueField: 'orgCode',
|
||||
placeholder: '请选择单位',
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any): boolean => {
|
||||
const str: string = input.trim().toLowerCase();
|
||||
return option.departName.toLowerCase().indexOf(str) >= 0;
|
||||
},
|
||||
onChange: (val) => {
|
||||
// 选中单位时,orgCode 赋值为单位的 orgCode,并清空部门
|
||||
formModel[orgCode] = val || '';
|
||||
formModel[threeOrgCode] = '';
|
||||
},
|
||||
onDeselect: () => {
|
||||
formModel[orgCode] = '';
|
||||
formModel[orgCode1] = '';
|
||||
formModel[threeOrgCode] = '';
|
||||
},
|
||||
};
|
||||
},
|
||||
label: '单位',
|
||||
field: 'orgCode',
|
||||
component: 'Input',
|
||||
defaultValue: orgCode,
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: '部门名称',
|
||||
field: threeOrgCode,
|
||||
field: 'threeOrgCode',
|
||||
component: 'ApiSelect',
|
||||
componentProps: ({ formModel }) => {
|
||||
console.log(formModel, '11111111111');
|
||||
return {
|
||||
api: getThirdDepartsNew,
|
||||
resultField: 'list',
|
||||
labelField: 'departName',
|
||||
valueField: 'orgCode',
|
||||
placeholder: '请选择部门',
|
||||
showSearch: true,
|
||||
params: {
|
||||
idOrCode: formModel[orgCode1] || '12313',
|
||||
idOrCode: formModel?.orgCode || '12313',
|
||||
},
|
||||
valueField: 'orgCode',
|
||||
immediate: true,
|
||||
style: {
|
||||
width: '195px',
|
||||
},
|
||||
onChange: (val) => {
|
||||
// 选中部门时覆盖 orgCode,清空时回退到单位的 orgCode
|
||||
formModel[orgCode] = val || formModel[orgCode1] || '';
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
field: orgCode,
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: '员工编号',
|
||||
field: 'workNo',
|
||||
|
||||
@@ -168,30 +168,32 @@
|
||||
let xArr: any[] = [];
|
||||
let yArr: any[] = [];
|
||||
res.timePeriods &&
|
||||
res.timePeriods.forEach((item) => {
|
||||
res.timePeriods.map((item) => {
|
||||
switch (item.flag) {
|
||||
case 1:
|
||||
// 浅睡
|
||||
yArr.push(1, 1, null);
|
||||
yArr.push(1);
|
||||
yArr.push(1);
|
||||
break;
|
||||
case 3:
|
||||
// 深睡
|
||||
yArr.push(0, 0, null);
|
||||
yArr.push(0);
|
||||
yArr.push(0);
|
||||
break;
|
||||
case 4:
|
||||
// 清醒
|
||||
yArr.push(3, 3, null);
|
||||
yArr.push(3);
|
||||
yArr.push(3);
|
||||
break;
|
||||
case 5:
|
||||
// 零星小睡
|
||||
yArr.push(2, 2, null);
|
||||
yArr.push(2);
|
||||
yArr.push(2);
|
||||
break;
|
||||
}
|
||||
xArr.push(dayjs(item.start).format('HH:mm'), dayjs(item.end).format('HH:mm'), '');
|
||||
xArr.push(dayjs(item.start).format('HH:mm'));
|
||||
xArr.push(dayjs(item.end).format('HH:mm'));
|
||||
});
|
||||
// 去掉最后多余的 null
|
||||
if (yArr.length > 0) yArr.pop();
|
||||
if (xArr.length > 0) xArr.pop();
|
||||
const option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
||||
@@ -73,7 +73,7 @@ export const formSchema: FormSchema[] = [
|
||||
dynamicDisabled: ({ values }) => {
|
||||
return !!values.id;
|
||||
},
|
||||
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_dict', 'dict_code', model, schema, true),
|
||||
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('QH_SYS_DICT', 'dict_code', model, schema, true),
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
|
||||
@@ -77,7 +77,7 @@ export const formSchemas: FormSchema[] = [
|
||||
field: 'templateCode',
|
||||
component: 'Input',
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [...rules.duplicateCheckRule('sys_sms_template', 'template_code', model, schema, true)];
|
||||
return [...rules.duplicateCheckRule('QH_SYS_SMS_TEMPLATE', 'template_code', model, schema, true)];
|
||||
},
|
||||
// 编辑模式下不可修改编码
|
||||
dynamicDisabled: (params) => !!params.values.id,
|
||||
|
||||
@@ -74,6 +74,8 @@ export const searchFormSchema: FormSchema[] = [
|
||||
},
|
||||
];
|
||||
//表单数据
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '序号',
|
||||
@@ -91,6 +93,10 @@ export const formSchema: FormSchema[] = [
|
||||
label: '图片',
|
||||
field: 'photoUrl',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
bizPath: 'img',
|
||||
maxCount: 1,
|
||||
},
|
||||
rules: [{ required: true, message: '请上传图片' }],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -85,6 +85,13 @@ export const columns: BasicColumn[] = [
|
||||
dataIndex: ['departTree', '3'],
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '非关爱人员',
|
||||
align: 'center',
|
||||
dataIndex: ['extension', 'nonCareFlag'],
|
||||
width: 100,
|
||||
slots: { customRender: 'nonCareTag' },
|
||||
},
|
||||
{
|
||||
title: '出生日期',
|
||||
align: 'center',
|
||||
@@ -160,6 +167,17 @@ export const searchFormSchema: FormSchema[] = [
|
||||
field: 'phone',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '非关爱人员',
|
||||
field: 'nonCareFlag',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '是', value: 1 },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '单位名称',
|
||||
field: 'orgCode',
|
||||
@@ -311,7 +329,7 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
||||
};
|
||||
},
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
let rule = rules.duplicateCheckRuleAndDelFlag('health_user_employee_ex', 'emp_sysno', 'false', model, schema, false);
|
||||
let rule = rules.duplicateCheckRuleAndDelFlag('QH_HLT_USER_EMPLOYEE_EX', 'EMP_SYSNO', 'false', model, schema, false);
|
||||
rule[0] = { ...rule[0], required: false };
|
||||
return rule;
|
||||
},
|
||||
@@ -330,6 +348,8 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
||||
field: 'avatar',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
},
|
||||
},
|
||||
@@ -674,28 +694,44 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
||||
label: '关爱联络员姓名',
|
||||
field: 'careLiaisonName',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: '关爱联络员职务',
|
||||
field: 'careLiaisonJob',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: '关爱联络员电话',
|
||||
field: 'careLiaisonPhone',
|
||||
component: 'Input',
|
||||
rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误', trigger: 'blur' }],
|
||||
// rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误', trigger: 'blur' }],
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: '急救人员姓名',
|
||||
field: 'lifeguardName',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: '急救人员电话',
|
||||
field: 'lifeguardPhone',
|
||||
component: 'Input',
|
||||
rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误', trigger: 'blur' }],
|
||||
// rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误', trigger: 'blur' }],
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: '非关爱人员',
|
||||
field: 'nonCareFlag',
|
||||
component: 'RadioButtonGroup',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '是', value: 1 },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
|
||||
@@ -109,6 +109,10 @@
|
||||
{{ record.status_dictText }}
|
||||
</Tag>
|
||||
</template>
|
||||
<template #nonCareTag="{ record }">
|
||||
<Tag v-if="record.extension?.nonCareFlag === 1" color="orange">是</Tag>
|
||||
<Tag v-else-if="record.extension?.nonCareFlag === 0" color="blue">否</Tag>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<HealthUserEmployeeExDrawer :showFooter="showFooter" @register="registerDrawer" @success="handleSuccess" />
|
||||
|
||||
@@ -207,6 +207,8 @@ export const formSchema: FormSchema[] = [
|
||||
label: '头像',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -141,6 +141,8 @@ export const formSchema = function (showGoodAt: boolean): FormSchema[] {
|
||||
component: 'JImageUpload',
|
||||
required: true,
|
||||
componentProps: () => ({
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -219,7 +219,7 @@ export const formSchema: FormSchema[] = [
|
||||
},
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
if (model.id) {
|
||||
return rules.duplicateCheckRule('sys_user', 'username', model, schema, true);
|
||||
return rules.duplicateCheckRule('QH_SYS_USER', 'username', model, schema, true);
|
||||
} else {
|
||||
return Promise.resolve();
|
||||
}
|
||||
@@ -266,7 +266,7 @@ export const formSchema: FormSchema[] = [
|
||||
field: 'workNo',
|
||||
required: true,
|
||||
component: 'Input',
|
||||
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'work_no', model, schema, true),
|
||||
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('QH_SYS_USER', 'work_no', model, schema, true),
|
||||
},
|
||||
{
|
||||
label: '职务',
|
||||
@@ -379,7 +379,7 @@ export const formSchema: FormSchema[] = [
|
||||
field: 'email',
|
||||
component: 'Input',
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [{ ...rules.duplicateCheckRule('sys_user', 'email', model, schema, true)[0] }, { ...rules.rule('email', false)[0] }];
|
||||
return [{ ...rules.duplicateCheckRule('QH_SYS_USER', 'email', model, schema, true)[0] }, { ...rules.rule('email', false)[0] }];
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -388,7 +388,7 @@ export const formSchema: FormSchema[] = [
|
||||
component: 'Input',
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [
|
||||
{ ...rules.duplicateCheckRule('sys_user', 'phone', model, schema, true)[0] },
|
||||
{ ...rules.duplicateCheckRule('QH_SYS_USER', 'phone', model, schema, true)[0] },
|
||||
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
|
||||
];
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
const validatorRules: Record<string, Rule[]> = {
|
||||
email: [
|
||||
{ ...rules.duplicateCheckRule('sys_user', 'email', formState, { label: '邮箱' })[0] },
|
||||
{ ...rules.duplicateCheckRule('QH_SYS_USER', 'email', formState, { label: '邮箱' })[0] },
|
||||
{ required: true, type: 'email', message: '邮箱格式不正确' },
|
||||
],
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
const validatorRules: Record<string, Rule[]> = {
|
||||
phone: [
|
||||
{ ...rules.duplicateCheckRule('sys_user', 'phone', formState, { label: '手机号' })[0] },
|
||||
{ ...rules.duplicateCheckRule('QH_SYS_USER', 'phone', formState, { label: '手机号' })[0] },
|
||||
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
|
||||
],
|
||||
smscode: [{ required: true, message: '请输入验证码' }],
|
||||
|
||||
@@ -154,6 +154,7 @@ export const itemFormSchema: FormSchema[] = [
|
||||
component: 'JUpload',
|
||||
componentProps: () => {
|
||||
return {
|
||||
bizPath: 'appfile',
|
||||
maxCount: 1,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user