Compare 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'"-->
|
<!-- onerror="this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"-->
|
||||||
<!-- alt=""-->
|
<!-- alt=""-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<img class="avatar" v-if="getSrc(message)" :src="getSrc(message)" alt="" />
|
<img class="avatar" :src="avatarError ? defaultAvatar : (message?.avatar || defaultAvatar)" @error="onAvatarError" alt="" />
|
||||||
<img class="avatar" v-else src="@/assets/image/default_avatar.png" alt="" />
|
|
||||||
<main class="message-area">
|
<main class="message-area">
|
||||||
<label class="name" v-if="message.flow === 'in' && message.conversationType === 'GROUP'">
|
<label class="name" v-if="message.flow === 'in' && message.conversationType === 'GROUP'">
|
||||||
{{ message.nameCard || message.nick || message.from }}
|
{{ message.nameCard || message.nick || message.from }}
|
||||||
@@ -86,6 +85,7 @@
|
|||||||
import MessageReference from './message-reference.vue';
|
import MessageReference from './message-reference.vue';
|
||||||
import { Message } from '../interface';
|
import { Message } from '../interface';
|
||||||
import { TUIEnv } from '../../../../../TUIKit/TUIPlugin';
|
import { TUIEnv } from '../../../../../TUIKit/TUIPlugin';
|
||||||
|
import defaultAvatar from '@/assets/image/default_avatar.png';
|
||||||
import MessageEmojiReact from './message-emoji-react.vue';
|
import MessageEmojiReact from './message-emoji-react.vue';
|
||||||
import TIM from '../../../../TUICore/tim/index';
|
import TIM from '../../../../TUICore/tim/index';
|
||||||
|
|
||||||
@@ -145,6 +145,15 @@
|
|||||||
needEmojiReact: false,
|
needEmojiReact: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 追踪头像加载失败状态,避免 watchEffect 重置时覆盖 @error 的修复
|
||||||
|
const avatarError = ref(false);
|
||||||
|
watch(() => (props.data as any)?.ID, () => {
|
||||||
|
avatarError.value = false;
|
||||||
|
});
|
||||||
|
const onAvatarError = () => {
|
||||||
|
avatarError.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
data.type = constant;
|
data.type = constant;
|
||||||
data.messagesList = props.messagesList;
|
data.messagesList = props.messagesList;
|
||||||
@@ -376,6 +385,9 @@
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
getSrc,
|
getSrc,
|
||||||
|
defaultAvatar,
|
||||||
|
avatarError,
|
||||||
|
onAvatarError,
|
||||||
...toRefs(data),
|
...toRefs(data),
|
||||||
toggleDialog,
|
toggleDialog,
|
||||||
htmlRefHook,
|
htmlRefHook,
|
||||||
|
|||||||
@@ -269,14 +269,16 @@ export function handleLocationMessageShowContext(item: any) {
|
|||||||
};
|
};
|
||||||
location.lon = item.payload.longitude.toFixed(6);
|
location.lon = item.payload.longitude.toFixed(6);
|
||||||
location.lat = item.payload.latitude.toFixed(6);
|
location.lat = item.payload.latitude.toFixed(6);
|
||||||
|
// 跳转高德地图标记点页面
|
||||||
location.href =
|
location.href =
|
||||||
'https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&' +
|
'https://uri.amap.com/marker?' +
|
||||||
`pointx=${location.lon}&pointy=${location.lat}&name=${item.payload.description}`;
|
`position=${location.lon},${location.lat}&name=${item.payload.description}&src=mypage&coordinate=gaode&callnative=0`;
|
||||||
|
// 高德静态地图图片
|
||||||
location.url =
|
location.url =
|
||||||
'https://apis.map.qq.com/ws/staticmap/v2/?' +
|
'https://restapi.amap.com/v3/staticmap?' +
|
||||||
`center=${location.lat},${location.lon}&zoom=10&size=300*150&maptype=roadmap&` +
|
`location=${location.lon},${location.lat}&zoom=10&size=300*150&` +
|
||||||
`markers=size:large|color:0xFFCCFF|label:k|${location.lat},${location.lon}&` +
|
`markers=large,,A:${location.lon},${location.lat}&` +
|
||||||
'key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD';
|
'key=8498ba3ba280654a7f6891b617f7d6ef';
|
||||||
location.description = item.payload.description;
|
location.description = item.payload.description;
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ module.exports = {
|
|||||||
outputDir: '../public/static/im-web',
|
outputDir: '../public/static/im-web',
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
lintOnSave: false,
|
lintOnSave: false,
|
||||||
|
transpileDependencies: ['element-plus', 'vue-router', '@ctrl/tinycolor'],
|
||||||
chainWebpack: (config) => {
|
chainWebpack: (config) => {
|
||||||
config.resolve.alias.set('@', resolve('src')).set('tim', resolve('src/tim.js'));
|
config.resolve.alias.set('@', resolve('src')).set('tim', resolve('src/tim.js'));
|
||||||
// 删除预加载
|
// 删除预加载
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48" version="1.1">
|
|
||||||
<title>ic_back_white</title>
|
|
||||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
||||||
<g id="02.-查看信息-示例好友" transform="translate(-32.000000, -200.000000)">
|
|
||||||
<g id="编组-6" transform="translate(0.000000, 176.000000)">
|
|
||||||
<g id="ic_back_white" transform="translate(32.000000, 24.000000)">
|
|
||||||
<g id="ic_back_black" fill="#444444" fill-rule="nonzero">
|
|
||||||
<path d="M9.51231071,24 L23.5198286,38.7290411 C23.785378,39.0082689 23.7753168,39.4496082 23.4973187,39.7164448 L21.6255915,41.5130226 C21.3466827,41.7807332 20.9035602,41.7716553 20.6358496,41.4927466 C20.6351032,41.491969 20.6343586,41.4911896 20.6336157,41.4904085 L4.45876399,24.4823948 C4.2017544,24.2121467 4.2017544,23.7878533 4.45876399,23.5176052 L20.6336157,6.50959152 C20.900035,6.22944906 21.3431109,6.21832422 21.6232533,6.48474351 C21.6240344,6.48548634 21.6248138,6.48623097 21.6255915,6.48697741 L23.4973187,8.28355524 C23.7753168,8.55039175 23.785378,8.99173114 23.5198286,9.27095893 L9.51231071,24 L9.51231071,24 Z" id="Path-2"></path>
|
|
||||||
</g>
|
|
||||||
<rect id="矩形" x="0" y="0" width="48" height="48"></rect>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
|
|
||||||
<title>清除</title>
|
|
||||||
<g id="页面-2备份" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
||||||
<g id="创建群聊" transform="translate(-1243.000000, -413.000000)">
|
|
||||||
<g id="Group-1364" transform="translate(650.000000, 343.000000)">
|
|
||||||
<g id="Group-1363" transform="translate(290.000000, 46.000000)">
|
|
||||||
<g id="Group-1358" transform="translate(0.000000, 24.000000)">
|
|
||||||
<g id="清除" transform="translate(303.000000, 0.000000)">
|
|
||||||
<path d="M0,0 L16,0 L16,16 L0,16 L0,0 Z" id="矩形"></path>
|
|
||||||
<path d="M1,8 C1,11.8659999 4.13400006,15 8,15 C11.8659999,15 15,11.8659999 15,8 C15,4.13400006 11.8659999,1 8,1 L8,1 C4.13400006,1 1,4.13400006 1,8 Z" fill="#999999"></path>
|
|
||||||
<g id="编组" transform="translate(8.000000, 8.000000) rotate(-315.000000) translate(-8.000000, -8.000000) translate(4.000000, 4.000000)" fill="#FFFFFF">
|
|
||||||
<rect id="矩形备份" transform="translate(4.000000, 4.000000) rotate(-90.000000) translate(-4.000000, -4.000000) " x="1.8189894e-12" y="3.5" width="8" height="1" rx="0.5"></rect>
|
|
||||||
<rect id="矩形备份" transform="translate(4.000000, 4.000000) rotate(-360.000000) translate(-4.000000, -4.000000) " x="0" y="3.5" width="8" height="1" rx="0.5"></rect>
|
|
||||||
</g>
|
|
||||||
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 783 B After Width: | Height: | Size: 783 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |
|
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 711 B |
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 517 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 937 B After Width: | Height: | Size: 937 B |
|
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 647 B |
@@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
|
|
||||||
<title>编组 14</title>
|
|
||||||
<defs>
|
|
||||||
<filter x="-10.6%" y="-5.4%" width="121.2%" height="110.9%" filterUnits="objectBoundingBox" id="filter-1">
|
|
||||||
<feOffset dx="0" dy="7" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
|
||||||
<feGaussianBlur stdDeviation="10" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
|
||||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
|
||||||
<feMerge>
|
|
||||||
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
|
||||||
<feMergeNode in="SourceGraphic"></feMergeNode>
|
|
||||||
</feMerge>
|
|
||||||
</filter>
|
|
||||||
</defs>
|
|
||||||
<g id="new" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
||||||
<g id="自定义消息" transform="translate(-458.000000, -318.000000)">
|
|
||||||
<g id="编组-32" filter="url(#filter-1)" transform="translate(44.000000, 60.000000)">
|
|
||||||
<g id="编组-24" transform="translate(30.000000, 250.000000)">
|
|
||||||
<g id="编组-14" transform="translate(384.000000, 8.000000)">
|
|
||||||
<circle id="椭圆形" fill="#006EFF" fill-rule="nonzero" cx="8" cy="8" r="8"></circle>
|
|
||||||
<polyline id="路径-4" stroke="#FFFFFF" stroke-width="2" transform="translate(8.042641, 6.242641) rotate(-315.000000) translate(-8.042641, -6.242641) " points="6.04264069 10.2426407 10.0426407 10.2426407 10.0426407 2.24264069"></polyline>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 281 B |
@@ -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.0de947d6.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 baseFontSize 浏览器默认字体大小 [注]浏览器最小字体为12像素,所以该值必需大于等于12
|
||||||
* @param baseWidth 设计稿的尺寸
|
* @param baseWidth 设计稿的尺寸
|
||||||
@@ -53,4 +53,4 @@
|
|||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
};</script><script src="js/vendors~app.de88239f.js"></script><script src="js/app.8ff38855.js"></script></body></html>
|
};</script><script src="js/vendors~app.b38bf4ff.js"></script><script src="js/app.2f662ea4.js"></script></body></html>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<BasicModal v-bind="$attrs" @register="register" :title="modalTitle" width="1200px" @ok="handleOk" destroyOnClose @visible-change="visibleChange">
|
<BasicModal v-bind="$attrs" @register="register" :title="modalTitle" width="1200px" @ok="handleOk" destroyOnClose @visible-change="visibleChange">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :md="7" :sm="24">
|
<a-col :md="7" :sm="24">
|
||||||
<a-card :style="{ minHeight: '613px', overflow: 'auto' }">
|
<a-card :style="{ height: '613px', overflowY: 'auto' }">
|
||||||
<!--组织机构-->
|
<!--组织机构-->
|
||||||
<BasicTree
|
<BasicTree
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
import { getToken } from '/@/utils/auth';
|
import { getToken } from '/@/utils/auth';
|
||||||
import { useLoading } from '/@/components/Loading';
|
import { useLoading } from '/@/components/Loading';
|
||||||
import { useGlobSetting } from '/@/hooks/setting';
|
import { useGlobSetting } from '/@/hooks/setting';
|
||||||
const { viteOutUrl } = useGlobSetting();
|
const { viteOutUrl, apiUrl } = useGlobSetting();
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'BasicMenu',
|
name: 'BasicMenu',
|
||||||
@@ -130,16 +130,16 @@
|
|||||||
async function handleMenuClick({ item, key }: { item: any; key: string; keyPath: string[] }) {
|
async function handleMenuClick({ item, key }: { item: any; key: string; keyPath: string[] }) {
|
||||||
if (item.title === '健康银行') {
|
if (item.title === '健康银行') {
|
||||||
open();
|
open();
|
||||||
const url = viteOutUrl;
|
|
||||||
console.log(url);
|
|
||||||
console.log(useGlobSetting());
|
|
||||||
await defHttp
|
await defHttp
|
||||||
.get({
|
.get({
|
||||||
url: '/health-system/api/sys/encryptInfo',
|
url: '/health-system/api/sys/encryptInfo',
|
||||||
params: {
|
params: {
|
||||||
str: {
|
str: {
|
||||||
scheme: url.split('://')[0],
|
scheme: apiUrl.split('://')[0],
|
||||||
host: url.split('://')[1],
|
host:
|
||||||
|
apiUrl.split('://')[1].indexOf(':') !== -1
|
||||||
|
? apiUrl.split('://')[1].substring(0, apiUrl.split('://')[1].indexOf(':'))
|
||||||
|
: apiUrl.split('://')[1],
|
||||||
tokenF: getToken(),
|
tokenF: getToken(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
fontSize: props.size ?? '30px',
|
fontSize: props.size ?? '30px',
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
transition: 'opacity 0.5s',
|
transition: 'opacity 0.5s',
|
||||||
display: 'none',
|
display: 'block',
|
||||||
});
|
});
|
||||||
|
|
||||||
const bodyStyle = ref({
|
const bodyStyle = ref({
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ export const formSchema: FormSchema[] = [
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
bizPath: 'img',
|
||||||
fileMax: 1,
|
fileMax: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -266,6 +266,8 @@ export const formSchema: FormSchema[] = [
|
|||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
// rules: [{ required: true, message: '请选择头像' }],
|
// rules: [{ required: true, message: '请选择头像' }],
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
text: '上传头像',
|
||||||
|
bizPath: 'avatar',
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -190,6 +190,8 @@ export const formSchema: FormSchema[] = [
|
|||||||
label: '头像',
|
label: '头像',
|
||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
text: '上传头像',
|
||||||
|
bizPath: 'avatar',
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ export const formSchema: FormSchema[] = [
|
|||||||
field: 'img',
|
field: 'img',
|
||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
bizPath: 'img',
|
||||||
fileMax: 1,
|
fileMax: 1,
|
||||||
},
|
},
|
||||||
rules: [{ required: false }],
|
rules: [{ required: false }],
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
/>
|
/>
|
||||||
<div class="bottom-top">
|
<div class="bottom-top">
|
||||||
<div class="top-title"> <img :src="aedP" alt="" /> {{ showWindowInfo?.name }} </div>
|
<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="top-title-describe"> {{ showWindowInfo?.installAddress ? showWindowInfo?.installAddress : '无' }} </div>
|
||||||
<div class="table-list">
|
<div class="table-list">
|
||||||
<div class="label-d"> 设备厂家: </div>
|
<div class="label-d"> 设备厂家: </div>
|
||||||
@@ -411,6 +411,17 @@
|
|||||||
window.open(getFileAccessHttpUrl(v), '_blank');
|
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) {
|
function getName(val, list) {
|
||||||
if (!val && val !== 0) return '';
|
if (!val && val !== 0) return '';
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ export const getFormSchema = () => {
|
|||||||
component: 'JUpload',
|
component: 'JUpload',
|
||||||
componentProps: () => {
|
componentProps: () => {
|
||||||
return {
|
return {
|
||||||
|
bizPath: 'video',
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
accept: '.mp4,video/mp4',
|
accept: '.mp4,video/mp4',
|
||||||
tipText: '支持MP4格式,最大200M',
|
tipText: '支持MP4格式,最大200M',
|
||||||
@@ -319,6 +320,7 @@ export const getFormSchema = () => {
|
|||||||
component: 'JUpload',
|
component: 'JUpload',
|
||||||
componentProps: () => {
|
componentProps: () => {
|
||||||
return {
|
return {
|
||||||
|
bizPath: 'bizfile',
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
accept: 'application/pdf',
|
accept: 'application/pdf',
|
||||||
tipText: '仅支持PDF格式文件,最大200M',
|
tipText: '仅支持PDF格式文件,最大200M',
|
||||||
|
|||||||
@@ -212,17 +212,17 @@
|
|||||||
const [registerTable, { reload, getForm, getDataSource, setTableData }] = tableContext;
|
const [registerTable, { reload, getForm, getDataSource, setTableData }] = tableContext;
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
:deep(.ant-table-cell-fix-left, .ant-table-cell-fix-right) {
|
//:deep(.ant-table-cell-fix-left, .ant-table-cell-fix-right) {
|
||||||
position: relative;
|
// position: relative;
|
||||||
border-bottom: none !important;
|
// //border-bottom: none !important;
|
||||||
|
// border-bottom: 2px solid #f0f0f0 !important;
|
||||||
&:after {
|
// &:after {
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
content: '';
|
// content: '';
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
top: 0;
|
// top: 0;
|
||||||
left: 0;
|
// left: 0;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
// border-bottom: 1px solid #f0f0f0;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -172,7 +172,13 @@
|
|||||||
loadingVisible.value = false;
|
loadingVisible.value = false;
|
||||||
};
|
};
|
||||||
window.onmessage = async (msg) => {
|
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) {
|
switch (result.code) {
|
||||||
case 'closeLoading':
|
case 'closeLoading':
|
||||||
closeLoading();
|
closeLoading();
|
||||||
|
|||||||
@@ -141,6 +141,8 @@ export const formSchema = function (showGoodAt: boolean): FormSchema[] {
|
|||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
required: true,
|
required: true,
|
||||||
componentProps: () => ({
|
componentProps: () => ({
|
||||||
|
text: '上传头像',
|
||||||
|
bizPath: 'avatar',
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts" name="bindRecords-name">
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { bindRecordColumns, bindRecordSchema } from '/@/views/healthMonitor/healMonitorManage/monitorToll/bindRecords/bindRecords.data';
|
import { bindRecordColumns, bindRecordSchema } from '/@/views/healthMonitor/healMonitorManage/monitorToll/bindRecords/bindRecords.data';
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
</BasicForm>
|
</BasicForm>
|
||||||
<template #footer v-if="title !== '查看'">
|
<template #footer v-if="title !== '查看'">
|
||||||
<a-button @click="handleCanel">取消</a-button>
|
<a-button @click="handleCanel">取消</a-button>
|
||||||
<a-button type="primary" @click="handleSubmit(1)">保存并发送</a-button>
|
<a-button type="primary" :loading="submitting" :disabled="submitting" @click="handleSubmit(1)">保存并发送</a-button>
|
||||||
<a-button type="primary" @click="handleSubmit(2)">保存</a-button>
|
<a-button type="primary" :loading="submitting" :disabled="submitting" @click="handleSubmit(2)">保存</a-button>
|
||||||
</template>
|
</template>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
<ChooseSome
|
<ChooseSome
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register', 'success', 'userData']);
|
const emit = defineEmits(['register', 'success', 'userData']);
|
||||||
const isUpdate = ref(true);
|
const isUpdate = ref(true);
|
||||||
|
const submitting = ref(false);
|
||||||
const [examinationModal, { openDrawer }] = useDrawer();
|
const [examinationModal, { openDrawer }] = useDrawer();
|
||||||
//设置标题
|
//设置标题
|
||||||
const title = ref(String);
|
const title = ref(String);
|
||||||
@@ -100,6 +101,7 @@
|
|||||||
//表单提交事件
|
//表单提交事件
|
||||||
async function handleSubmit(type: number) {
|
async function handleSubmit(type: number) {
|
||||||
try {
|
try {
|
||||||
|
submitting.value = true;
|
||||||
let values = await validate();
|
let values = await validate();
|
||||||
setModalProps({ confirmLoading: true });
|
setModalProps({ confirmLoading: true });
|
||||||
//提交表单
|
//提交表单
|
||||||
@@ -109,6 +111,7 @@
|
|||||||
//刷新列表
|
//刷新列表
|
||||||
emit('success');
|
emit('success');
|
||||||
} finally {
|
} finally {
|
||||||
|
submitting.value = false;
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<notification-news-modal @register="registerModal" @success="handleSuccess" />
|
<notification-news-modal @register="registerModal" @success="handleSuccess" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts" name="healthMonitor-notificationNews">
|
||||||
import { BasicTable, TableAction } from '/@/components/Table';
|
import { BasicTable, TableAction } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { list, deleteOne, batchDelete, queryByID, reSend } from './notificationNews.api';
|
import { list, deleteOne, batchDelete, queryByID, reSend } from './notificationNews.api';
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
<!-- <div>数据日期:{{ userInfo.dataDate }}</div>-->
|
<!-- <div>数据日期:{{ userInfo.dataDate }}</div>-->
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 75%">
|
<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">
|
<div style="display: flex; font-size: 20px; align-items: center">
|
||||||
<a-button size="small" @click="changeDate('0')">
|
<a-button size="small" @click="changeDate('0')">
|
||||||
<LeftOutlined />
|
<LeftOutlined />
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
@change="changeValue"
|
@change="changeValue"
|
||||||
:allow-clear="false"
|
:allow-clear="false"
|
||||||
|
dropdownClassName="personal-data-no-other-month"
|
||||||
style="opacity: 0; z-index: 99; position: absolute; top: 0; left: 0"
|
style="opacity: 0; z-index: 99; position: absolute; top: 0; left: 0"
|
||||||
>
|
>
|
||||||
<template #dateRender="{ current }">
|
<template #dateRender="{ current }">
|
||||||
@@ -47,23 +49,27 @@
|
|||||||
</BasicModal>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="personalDataModal">
|
<script setup lang="ts" name="personalDataModal">
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch, onMounted, onUnmounted, nextTick } from 'vue';
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||||
import AllLook from '/@/views/healthMonitor/healMonitorManage/monitorToll/userInfo/componets/allLook.vue';
|
import AllLook from '/@/views/healthMonitor/healMonitorManage/monitorToll/userInfo/componets/allLook.vue';
|
||||||
import { getDetail, userDataDayByMonth } from '/@/views/healthMonitor/healMonitorManage/monitorToll/personalData/personalData.api';
|
import { getDetail, userDataDayByMonth } from '/@/views/healthMonitor/healMonitorManage/monitorToll/personalData/personalData.api';
|
||||||
import dayjs from 'dayjs';
|
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';
|
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
|
||||||
const userInfo = ref({});
|
const userInfo = ref({});
|
||||||
const infoData = ref({});
|
const infoData = ref({});
|
||||||
const userId = ref('');
|
const userId = ref('');
|
||||||
const haveInfo = ref('');
|
const haveInfo = ref('');
|
||||||
const nowDate = ref(dayjs());
|
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'));
|
const isRight = computed(() => dayjs(nowDate.value).format('YYYY-MM-DD') != dayjs().format('YYYY-MM-DD'));
|
||||||
//表单赋值
|
//表单赋值
|
||||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
||||||
userInfo.value = data.record;
|
userInfo.value = data.record;
|
||||||
userId.value = data.record.userId;
|
userId.value = data.record.userId;
|
||||||
|
// 重置已加载年份,避免上次切换年份的残留状态
|
||||||
|
loadedYear.value = dayjs().format('YYYY');
|
||||||
await userDataDayByMonth({ userId: data.record.userId, year: dayjs().format('YYYY') }).then((res) => {
|
await userDataDayByMonth({ userId: data.record.userId, year: dayjs().format('YYYY') }).then((res) => {
|
||||||
let year = dayjs().format('YYYY');
|
let year = dayjs().format('YYYY');
|
||||||
let month = '';
|
let month = '';
|
||||||
@@ -94,6 +100,8 @@
|
|||||||
|
|
||||||
function getDisabled(current) {
|
function getDisabled(current) {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
|
// 年份不匹配时不渲染 bgc
|
||||||
|
if (dayjs(current).format('YYYY') !== loadedYear.value) return false;
|
||||||
|
|
||||||
for (let i = 0; i < Object.keys(haveInfo.value).length; i++) {
|
for (let i = 0; i < Object.keys(haveInfo.value).length; i++) {
|
||||||
if (Object.keys(haveInfo.value)[i] == dayjs(current).format('MM') * 1) {
|
if (Object.keys(haveInfo.value)[i] == dayjs(current).format('MM') * 1) {
|
||||||
@@ -109,15 +117,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getInfo() {
|
async function getInfo() {
|
||||||
|
const dateStr = dayjs(nowDate.value).format('YYYY-MM-DD');
|
||||||
await getDetail({
|
await getDetail({
|
||||||
userId: userId.value,
|
userId: userId.value,
|
||||||
dataDate: dayjs(nowDate.value).format('YYYY-MM-DD'),
|
dataDate: dateStr,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// openModal(true, {
|
|
||||||
// record,
|
|
||||||
// dataInfo: res,
|
|
||||||
// });
|
|
||||||
infoData.value = res;
|
infoData.value = res;
|
||||||
|
// API 返回空数据时行内提示,否则清空提示
|
||||||
|
if (!res || Object.keys(res).length === 0) {
|
||||||
|
noDataTip.value = `【${dateStr}】暂无监测数据`;
|
||||||
|
} else {
|
||||||
|
noDataTip.value = '';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +143,9 @@
|
|||||||
if (getDisabled(nowDate.value)) {
|
if (getDisabled(nowDate.value)) {
|
||||||
getInfo();
|
getInfo();
|
||||||
} else {
|
} else {
|
||||||
message.info('当日暂无监测数据');
|
// 本地记录无数据:清空展示数据并行内提示具体日期
|
||||||
|
infoData.value = {};
|
||||||
|
noDataTip.value = `【${dayjs(nowDate.value).format('YYYY-MM-DD')}】暂无监测数据`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +161,31 @@
|
|||||||
function changeValue() {
|
function changeValue() {
|
||||||
getInfo();
|
getInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加载指定年份的 bgc 标记数据
|
||||||
|
async function loadYearData(year: string) {
|
||||||
|
if (year === loadedYear.value) return;
|
||||||
|
await userDataDayByMonth({ userId: userId.value, year }).then((res) => {
|
||||||
|
haveInfo.value = res;
|
||||||
|
loadedYear.value = year;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 监听面板内点击,DOM 更新后从年份按钮读取当前展示的年份
|
||||||
|
function onPickerPanelClick(e: MouseEvent) {
|
||||||
|
const panel = document.querySelector('.personal-data-no-other-month');
|
||||||
|
if (!panel?.contains(e.target as Node)) return;
|
||||||
|
nextTick(() => {
|
||||||
|
const yearBtn = panel.querySelector('.ant-picker-year-btn');
|
||||||
|
if (!yearBtn) return;
|
||||||
|
// 按钮文本可能为 "2024年" 或 "2024",提取4位数字
|
||||||
|
const year = yearBtn.textContent?.replace(/[^0-9]/g, '').slice(0, 4) || '';
|
||||||
|
if (year.length === 4) loadYearData(year);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => document.addEventListener('click', onPickerPanelClick));
|
||||||
|
onUnmounted(() => document.removeEventListener('click', onPickerPanelClick));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@@ -185,3 +223,11 @@
|
|||||||
cursor: pointer !important;
|
cursor: pointer !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* 隐藏日历面板中非当前月份的日期格,仅对该 picker 生效 */
|
||||||
|
.personal-data-no-other-month .ant-picker-cell:not(.ant-picker-cell-in-view) {
|
||||||
|
visibility: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -151,13 +151,39 @@ export const columnsNew: BasicColumn[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '分配设备数',
|
title: '已分配设备数',
|
||||||
dataIndex: ['assignedDeviceNums'],
|
dataIndex: ['assignedDeviceNums'],
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
if (!text) return 0;
|
if (!text) return 0;
|
||||||
return text;
|
return text;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '未分配设备数',
|
||||||
|
dataIndex: 'undistributedDeviceNums',
|
||||||
|
customRender: ({ record }) => {
|
||||||
|
const total = record.totalAssignedDeviceNums ?? 0;
|
||||||
|
const assigned = record.assignedDeviceNums ?? 0;
|
||||||
|
return Math.max(0, total - assigned);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '已绑定设备数',
|
||||||
|
dataIndex: ['assignedDeviceNums'],
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
if (!text) return 0;
|
||||||
|
return text;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '未绑定设备数',
|
||||||
|
dataIndex: 'undistributedDeviceNums',
|
||||||
|
customRender: ({ record }) => {
|
||||||
|
const total = record.totalAssignedDeviceNums ?? 0;
|
||||||
|
const assigned = record.assignedDeviceNums ?? 0;
|
||||||
|
return Math.max(0, total - assigned);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '佩戴人员数',
|
title: '佩戴人员数',
|
||||||
dataIndex: ['assignedUserNums'],
|
dataIndex: ['assignedUserNums'],
|
||||||
@@ -166,6 +192,15 @@ export const columnsNew: BasicColumn[] = [
|
|||||||
return text;
|
return text;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '关爱人员佩戴人数',
|
||||||
|
dataIndex: ['careWearNums'],
|
||||||
|
width: 150,
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
if (!text) return 0;
|
||||||
|
return text;
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '未佩戴人员数',
|
title: '未佩戴人员数',
|
||||||
dataIndex: ['undistributedUserNums'],
|
dataIndex: ['undistributedUserNums'],
|
||||||
@@ -174,6 +209,47 @@ export const columnsNew: BasicColumn[] = [
|
|||||||
return text;
|
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: '心率异常人数',
|
title: '心率异常人数',
|
||||||
dataIndex: ['heartRateNums'],
|
dataIndex: ['heartRateNums'],
|
||||||
@@ -206,6 +282,7 @@ export const columnsNew: BasicColumn[] = [
|
|||||||
return text;
|
return text;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const startTime = dayjs().subtract(6, 'day').format('YYYY-MM-DD');
|
const startTime = dayjs().subtract(6, 'day').format('YYYY-MM-DD');
|
||||||
@@ -350,6 +427,16 @@ export const detailColumns = (arr: BasicColumn[] = []) => {
|
|||||||
title: '手表所属单位',
|
title: '手表所属单位',
|
||||||
dataIndex: 'watchOrgName',
|
dataIndex: 'watchOrgName',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '非关爱人员',
|
||||||
|
dataIndex: 'nonCareFlag',
|
||||||
|
width: 100,
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
if (text === 1) return '是';
|
||||||
|
if (text === 0) return '否';
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
},
|
||||||
...arr,
|
...arr,
|
||||||
{
|
{
|
||||||
title: '应佩戴天数',
|
title: '应佩戴天数',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<user-info-modal @register="registerModal" />
|
<user-info-modal @register="registerModal" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts" name="userInfoList-name">
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { columns, searchSchema } from '/@/views/healthMonitor/healMonitorManage/monitorToll/userInfo/userInfo.data';
|
import { columns, searchSchema } from '/@/views/healthMonitor/healMonitorManage/monitorToll/userInfo/userInfo.data';
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export const formSchema: FormSchema[] = [
|
|||||||
dynamicDisabled: ({ values }) => {
|
dynamicDisabled: ({ values }) => {
|
||||||
return !!values.id;
|
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: '描述',
|
label: '描述',
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export const formSchemas: FormSchema[] = [
|
|||||||
field: 'templateCode',
|
field: 'templateCode',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
dynamicRules: ({ model, schema }) => {
|
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,
|
dynamicDisabled: (params) => !!params.values.id,
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
//表单数据
|
//表单数据
|
||||||
|
// @ts-ignore
|
||||||
|
// @ts-ignore
|
||||||
export const formSchema: FormSchema[] = [
|
export const formSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
label: '序号',
|
label: '序号',
|
||||||
@@ -91,6 +93,10 @@ export const formSchema: FormSchema[] = [
|
|||||||
label: '图片',
|
label: '图片',
|
||||||
field: 'photoUrl',
|
field: 'photoUrl',
|
||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
|
componentProps: {
|
||||||
|
bizPath: 'img',
|
||||||
|
maxCount: 1,
|
||||||
|
},
|
||||||
rules: [{ required: true, message: '请上传图片' }],
|
rules: [{ required: true, message: '请上传图片' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -85,6 +85,13 @@ export const columns: BasicColumn[] = [
|
|||||||
dataIndex: ['departTree', '3'],
|
dataIndex: ['departTree', '3'],
|
||||||
width: 180,
|
width: 180,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '非关爱人员',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: ['extension', 'nonCareFlag'],
|
||||||
|
width: 100,
|
||||||
|
slots: { customRender: 'nonCareTag' },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '出生日期',
|
title: '出生日期',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -160,6 +167,17 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
field: 'phone',
|
field: 'phone',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '非关爱人员',
|
||||||
|
field: 'nonCareFlag',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: [
|
||||||
|
{ label: '否', value: 0 },
|
||||||
|
{ label: '是', value: 1 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '单位名称',
|
label: '单位名称',
|
||||||
field: 'orgCode',
|
field: 'orgCode',
|
||||||
@@ -311,7 +329,7 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
dynamicRules: ({ model, schema }) => {
|
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 };
|
rule[0] = { ...rule[0], required: false };
|
||||||
return rule;
|
return rule;
|
||||||
},
|
},
|
||||||
@@ -330,6 +348,8 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
|||||||
field: 'avatar',
|
field: 'avatar',
|
||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
text: '上传头像',
|
||||||
|
bizPath: 'avatar',
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -674,28 +694,44 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
|||||||
label: '关爱联络员姓名',
|
label: '关爱联络员姓名',
|
||||||
field: 'careLiaisonName',
|
field: 'careLiaisonName',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
show: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '关爱联络员职务',
|
label: '关爱联络员职务',
|
||||||
field: 'careLiaisonJob',
|
field: 'careLiaisonJob',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
show: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '关爱联络员电话',
|
label: '关爱联络员电话',
|
||||||
field: 'careLiaisonPhone',
|
field: 'careLiaisonPhone',
|
||||||
component: 'Input',
|
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: '急救人员姓名',
|
label: '急救人员姓名',
|
||||||
field: 'lifeguardName',
|
field: 'lifeguardName',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
show: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '急救人员电话',
|
label: '急救人员电话',
|
||||||
field: 'lifeguardPhone',
|
field: 'lifeguardPhone',
|
||||||
component: 'Input',
|
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: '',
|
label: '',
|
||||||
|
|||||||
@@ -109,6 +109,10 @@
|
|||||||
{{ record.status_dictText }}
|
{{ record.status_dictText }}
|
||||||
</Tag>
|
</Tag>
|
||||||
</template>
|
</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>
|
</BasicTable>
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
<HealthUserEmployeeExDrawer :showFooter="showFooter" @register="registerDrawer" @success="handleSuccess" />
|
<HealthUserEmployeeExDrawer :showFooter="showFooter" @register="registerDrawer" @success="handleSuccess" />
|
||||||
|
|||||||
@@ -207,6 +207,8 @@ export const formSchema: FormSchema[] = [
|
|||||||
label: '头像',
|
label: '头像',
|
||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
text: '上传头像',
|
||||||
|
bizPath: 'avatar',
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -141,6 +141,8 @@ export const formSchema = function (showGoodAt: boolean): FormSchema[] {
|
|||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
required: true,
|
required: true,
|
||||||
componentProps: () => ({
|
componentProps: () => ({
|
||||||
|
text: '上传头像',
|
||||||
|
bizPath: 'avatar',
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ export const formSchema: FormSchema[] = [
|
|||||||
},
|
},
|
||||||
dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
if (model.id) {
|
if (model.id) {
|
||||||
return rules.duplicateCheckRule('sys_user', 'username', model, schema, true);
|
return rules.duplicateCheckRule('QH_SYS_USER', 'username', model, schema, true);
|
||||||
} else {
|
} else {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
@@ -266,7 +266,7 @@ export const formSchema: FormSchema[] = [
|
|||||||
field: 'workNo',
|
field: 'workNo',
|
||||||
required: true,
|
required: true,
|
||||||
component: 'Input',
|
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: '职务',
|
label: '职务',
|
||||||
@@ -379,7 +379,7 @@ export const formSchema: FormSchema[] = [
|
|||||||
field: 'email',
|
field: 'email',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
dynamicRules: ({ model, schema }) => {
|
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',
|
component: 'Input',
|
||||||
dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
return [
|
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: '手机号码格式有误' },
|
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
const validatorRules: Record<string, Rule[]> = {
|
const validatorRules: Record<string, Rule[]> = {
|
||||||
email: [
|
email: [
|
||||||
{ ...rules.duplicateCheckRule('sys_user', 'email', formState, { label: '邮箱' })[0] },
|
{ ...rules.duplicateCheckRule('QH_SYS_USER', 'email', formState, { label: '邮箱' })[0] },
|
||||||
{ required: true, type: 'email', message: '邮箱格式不正确' },
|
{ required: true, type: 'email', message: '邮箱格式不正确' },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
const validatorRules: Record<string, Rule[]> = {
|
const validatorRules: Record<string, Rule[]> = {
|
||||||
phone: [
|
phone: [
|
||||||
{ ...rules.duplicateCheckRule('sys_user', 'phone', formState, { label: '手机号' })[0] },
|
{ ...rules.duplicateCheckRule('QH_SYS_USER', 'phone', formState, { label: '手机号' })[0] },
|
||||||
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
|
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
|
||||||
],
|
],
|
||||||
smscode: [{ required: true, message: '请输入验证码' }],
|
smscode: [{ required: true, message: '请输入验证码' }],
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ export const itemFormSchema: FormSchema[] = [
|
|||||||
component: 'JUpload',
|
component: 'JUpload',
|
||||||
componentProps: () => {
|
componentProps: () => {
|
||||||
return {
|
return {
|
||||||
|
bizPath: 'appfile',
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||