新增查看页面
This commit is contained in:
22
web-vue/packages/biz/api/biz/myWork.ts
Normal file
22
web-vue/packages/biz/api/biz/myWork.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author gaoxq
|
||||
*/
|
||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { BasicModel } from '@jeesite/core/api/model/baseModel';
|
||||
const { adminPath } = useGlobSetting();
|
||||
|
||||
export interface MyWorkInfo extends BasicModel<MyWorkInfo> {
|
||||
notifyNums?: number;
|
||||
notifyAllNums?: number;
|
||||
projectNums?: number;
|
||||
projectAllNums?: number;
|
||||
calendarNums?: number;
|
||||
calendarAllNums?: number;
|
||||
teamNums?: number;
|
||||
}
|
||||
|
||||
export const bizMyWorkInfoList = () =>
|
||||
defHttp.get<MyWorkInfo>({ url: adminPath + '/biz/myWork/list'});
|
||||
@@ -16,7 +16,15 @@
|
||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<BasicForm @register="registerForm" />
|
||||
<BasicForm @register="registerForm">
|
||||
<template #remarks="{ model, field }">
|
||||
<WangEditor
|
||||
v-model:value="model[field]"
|
||||
:bizKey="record.id"
|
||||
:height="300"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup name="ViewsBizListItemForm">
|
||||
@@ -25,6 +33,7 @@
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizListItem, bizListItemSave, bizListItemForm } from '@jeesite/biz/api/biz/listItem';
|
||||
@@ -46,7 +55,7 @@
|
||||
|
||||
const inputFormSchemas: FormSchema<BizListItem>[] = [
|
||||
{
|
||||
label: t('通知标题'),
|
||||
label: t('标题名称'),
|
||||
field: 'title',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
@@ -117,6 +126,7 @@
|
||||
field: 'description',
|
||||
component: 'InputTextArea',
|
||||
required: true,
|
||||
slot: 'remarks',
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
];
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('通知标题'),
|
||||
label: t('标题名称'),
|
||||
field: 'title',
|
||||
component: 'Input',
|
||||
},
|
||||
@@ -145,7 +145,7 @@
|
||||
slot: 'slotBizAvatar',
|
||||
},
|
||||
{
|
||||
title: t('通知标题'),
|
||||
title: t('标题名称'),
|
||||
dataIndex: 'title',
|
||||
key: 'a.title',
|
||||
sorter: true,
|
||||
|
||||
@@ -15,7 +15,15 @@
|
||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<BasicForm @register="registerForm" />
|
||||
<BasicForm @register="registerForm">
|
||||
<template #remarks="{ model, field }">
|
||||
<WangEditor
|
||||
v-model:value="model[field]"
|
||||
:bizKey="record.id"
|
||||
:height="300"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup name="ViewsBizListItemForm">
|
||||
@@ -24,6 +32,7 @@
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizListItem, bizListItemSave, bizListItemForm } from '@jeesite/biz/api/biz/listItem';
|
||||
@@ -45,7 +54,7 @@
|
||||
|
||||
const inputFormSchemas: FormSchema<BizListItem>[] = [
|
||||
{
|
||||
label: t('通知标题'),
|
||||
label: t('标题名称'),
|
||||
field: 'title',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
@@ -117,6 +126,7 @@
|
||||
field: 'description',
|
||||
component: 'InputTextArea',
|
||||
dynamicDisabled: true,
|
||||
slot: 'remarks',
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
];
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<BasicForm @register="registerForm" >
|
||||
<template #remarks>
|
||||
<div
|
||||
v-html="record?.meetingContent"
|
||||
style="border: 1px solid #dcdcdc; max-height: 300px; overflow-y: auto; line-height: 1.8; white-space: pre-wrap; padding: 8px; border-radius: 4px;"
|
||||
>
|
||||
</div>
|
||||
<template #remarks="{ model, field }">
|
||||
<WangEditor
|
||||
v-model:value="model[field]"
|
||||
:bizKey="record.id"
|
||||
:height="300"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicModal>
|
||||
@@ -32,6 +32,7 @@
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizMeetingInfo, bizMeetingInfoSave, bizMeetingInfoForm } from '@jeesite/biz/api/biz/meetingInfo';
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<BasicForm @register="registerForm" >
|
||||
<template #remarks>
|
||||
<div
|
||||
v-html="record?.requirementDescription"
|
||||
style="border: 1px solid #dcdcdc; max-height: 300px; overflow-y: auto; line-height: 1.8; white-space: pre-wrap; padding: 8px; border-radius: 4px;"
|
||||
<template #remarks="{ model, field }">
|
||||
<WangEditor
|
||||
v-model:value="model[field]"
|
||||
:bizKey="record.id"
|
||||
:height="300"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
@@ -31,6 +32,7 @@
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizAreaSource, bizAreaSourceTreeData } from '@jeesite/biz/api/biz/areaSource';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<span class="info-item">类型:{{ getTypeText(NoticeList?.type) }}</span>
|
||||
</div>
|
||||
<div class="detail-content">
|
||||
<pre class="db-content">{{ NoticeList?.description || '无内容' }}</pre>
|
||||
<div class="text-content" v-html="NoticeList?.description || '无内容'"></div>
|
||||
</div>
|
||||
<div v-if="NoticeList?.type === '3'" class="todo-opinion">
|
||||
<div class="opinion-card card">
|
||||
@@ -132,9 +132,9 @@
|
||||
.detail-container {
|
||||
background-color: #f0f8ff; /* 统一淡蓝色背景 */
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
min-height: 400px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
min-height: 55vh;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@@ -178,17 +178,18 @@
|
||||
background-color: #ffffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #d1e7ff;
|
||||
max-height: 200px;
|
||||
height: 200px;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.db-content {
|
||||
.text-content {
|
||||
margin: 0;
|
||||
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
color: #333;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 待办意见容器 */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
$props.titleRows && $props.titleRows > 0 ? { rows: $props.titleRows, tooltip: !!item.title } : false
|
||||
"
|
||||
:content="item.title"
|
||||
@click="openModal(true, item)"
|
||||
@click="openModal(true, item)"
|
||||
/>
|
||||
<div class="extra" v-if="item.extra">
|
||||
<a-tag class="tag" :color="item.color">
|
||||
@@ -34,15 +34,21 @@
|
||||
<template #description>
|
||||
<div>
|
||||
<div class="description" v-if="item.description">
|
||||
<a-typography-paragraph
|
||||
style="width: 100%; margin-bottom: 0 !important"
|
||||
:ellipsis="
|
||||
$props.descRows && $props.descRows > 0
|
||||
? { rows: $props.descRows, tooltip: !!item.description }
|
||||
: false
|
||||
"
|
||||
:content="item.description"
|
||||
/>
|
||||
<a-tooltip placement="bottom" :mouseEnterDelay="0.3">
|
||||
<template #title>
|
||||
<div v-html="item.description" style="max-width: 400px; white-space: pre-wrap;"></div>
|
||||
</template>
|
||||
<a-typography-paragraph
|
||||
style="width: 100%; margin-bottom: 0 !important"
|
||||
:ellipsis="
|
||||
$props.descRows && $props.descRows > 0
|
||||
? { rows: $props.descRows, tooltip: false }
|
||||
: false
|
||||
"
|
||||
>
|
||||
<span v-html="item.description"></span>
|
||||
</a-typography-paragraph>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<div class="datetime">
|
||||
{{ item.datetime }}
|
||||
@@ -60,7 +66,7 @@
|
||||
import { BizListItem, tabListDataAll } from '@jeesite/biz/api/biz/listItem';
|
||||
import { useDesign } from '@jeesite/core/hooks/web/useDesign';
|
||||
import { useModal } from '@jeesite/core/components/Modal';
|
||||
import { List, Avatar, Tag, Typography } from 'ant-design-vue';
|
||||
import { List, Avatar, Tag, Typography, Tooltip } from 'ant-design-vue';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { isNumber } from '@jeesite/core/utils/is';
|
||||
import Modal from './NoticeInfo.vue';
|
||||
@@ -77,12 +83,12 @@
|
||||
AListItemMeta: List.Item.Meta,
|
||||
ATypographyParagraph: Typography.Paragraph,
|
||||
[Tag.name as string]: Tag,
|
||||
[Tooltip.name as string]: Tooltip, // 关键修改4:注册Tooltip组件
|
||||
Icon,
|
||||
Modal,
|
||||
Modal,
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
// 更新列表项类型为扩展后的字符串版本
|
||||
type: Array as PropType<ExtendedBizListItem[]>,
|
||||
default: () => [],
|
||||
},
|
||||
@@ -108,28 +114,28 @@
|
||||
},
|
||||
emits: ['update:currentPage'],
|
||||
setup(props, { emit }) {
|
||||
|
||||
const [register, { openModal }] = useModal();
|
||||
|
||||
|
||||
const [register, { openModal }] = useModal();
|
||||
|
||||
const { prefixCls } = useDesign('header-notify-list');
|
||||
const current = ref(props.currentPage || 1);
|
||||
|
||||
|
||||
const getData = computed<ExtendedBizListItem[]>(() => {
|
||||
const { pageSize, list } = props;
|
||||
if (pageSize === false) return [];
|
||||
let size = isNumber(pageSize) ? pageSize : 5;
|
||||
return list.slice(size * (unref(current) - 1), size * unref(current));
|
||||
});
|
||||
|
||||
|
||||
watch(
|
||||
() => props.currentPage,
|
||||
(v) => {
|
||||
current.value = v;
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
const isTitleClickable = computed(() => !!props.onTitleClick);
|
||||
|
||||
|
||||
const getPagination = computed(() => {
|
||||
const { list, pageSize } = props;
|
||||
if ((pageSize as number) > 0 && list && list.length > (pageSize as number)) {
|
||||
@@ -148,19 +154,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
// 更新函数参数类型
|
||||
function handleTitleClick(item: ExtendedBizListItem) {
|
||||
props.onTitleClick && props.onTitleClick(item);
|
||||
}
|
||||
return {
|
||||
prefixCls,
|
||||
getPagination,
|
||||
getData,
|
||||
handleTitleClick,
|
||||
isTitleClickable,
|
||||
register,
|
||||
openModal,
|
||||
};
|
||||
return {
|
||||
prefixCls,
|
||||
getPagination,
|
||||
getData,
|
||||
handleTitleClick,
|
||||
isTitleClickable,
|
||||
register,
|
||||
openModal,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -223,6 +228,7 @@
|
||||
.description {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.datetime {
|
||||
@@ -232,4 +238,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -5,31 +5,50 @@
|
||||
<h1 class="text-md md:text-lg">您好, {{ userinfo.userName }}, 开始您一天的工作吧!</h1>
|
||||
<span class="text-secondary"> 今日晴,20℃ - 32℃! </span>
|
||||
</div>
|
||||
<div class="mt-4 flex flex-1 justify-end md:mt-0">
|
||||
<div class="flex flex-col justify-center text-right">
|
||||
<div class="mt-4 flex flex-1 justify-end items-center md:mt-0 gap-x-8 md:gap-x-16">
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<span class="text-secondary"> 待办 </span>
|
||||
<span class="text-2xl">2/10</span>
|
||||
<span class="text-2xl mt-1">{{ workInfo?.notifyNums }}/{{ workInfo?.notifyAllNums }}</span>
|
||||
</div>
|
||||
|
||||
<div class="mx-12 flex flex-col justify-center text-right md:mx-16">
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<span class="text-secondary"> 日程 </span>
|
||||
<span class="text-2xl mt-1">{{ workInfo?.calendarNums }}/{{ workInfo?.calendarAllNums }}</span>
|
||||
</div>
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<span class="text-secondary"> 项目 </span>
|
||||
<span class="text-2xl">8</span>
|
||||
<span class="text-2xl mt-1">{{ workInfo?.projectNums }}/{{ workInfo?.projectAllNums }}</span>
|
||||
</div>
|
||||
<div class="mr-4 flex flex-col justify-center text-right md:mr-10">
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<span class="text-secondary"> 团队 </span>
|
||||
<span class="text-2xl">300</span>
|
||||
<span class="text-2xl mt-1">{{ workInfo?.teamNums }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { Avatar } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useUserStore } from '@jeesite/core/store/modules/user';
|
||||
import headerImg from '@jeesite/assets/images/header.jpg';
|
||||
|
||||
import { MyWorkInfo, bizMyWorkInfoList } from '@jeesite/biz/api/biz/myWork';
|
||||
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const userinfo = computed(() => userStore.getUserInfo);
|
||||
</script>
|
||||
|
||||
const workInfo = ref<MyWorkInfo>();
|
||||
|
||||
const workList = async () => {
|
||||
try {
|
||||
const result = await bizMyWorkInfoList();
|
||||
workInfo.value = result;
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
workList();
|
||||
});
|
||||
</script>
|
||||
@@ -16,7 +16,15 @@
|
||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<BasicForm @register="registerForm" />
|
||||
<BasicForm @register="registerForm">
|
||||
<template #remarks="{ model, field }">
|
||||
<WangEditor
|
||||
v-model:value="model[field]"
|
||||
:bizKey="record.id"
|
||||
:height="300"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup name="ViewsBizListItemForm">
|
||||
@@ -25,6 +33,7 @@
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { BizListItem, bizListItemSave, bizListItemForm } from '@jeesite/biz/api/biz/listItem';
|
||||
@@ -89,6 +98,14 @@
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: t('内容信息'),
|
||||
field: 'description',
|
||||
component: 'InputTextArea',
|
||||
required: true,
|
||||
slot: 'remarks',
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('待办意见'),
|
||||
field: 'extraDesc',
|
||||
|
||||
@@ -68,6 +68,16 @@
|
||||
showTime: { format: 'HH:mm' },
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('是否关闭'),
|
||||
field: 'clickClose',
|
||||
defaultValue: '0',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'is_open',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('待办标题'),
|
||||
field: 'title',
|
||||
@@ -87,15 +97,6 @@
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('是否关闭'),
|
||||
field: 'clickClose',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'is_open',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('是否删除'),
|
||||
field: 'titleDelete',
|
||||
@@ -152,14 +153,6 @@
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'is_open',
|
||||
},
|
||||
{
|
||||
title: t('内容信息'),
|
||||
dataIndex: 'description',
|
||||
key: 'a.description',
|
||||
sorter: true,
|
||||
width: 225,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('待办意见'),
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
width: 100%;
|
||||
background-color: #e8f4f8;
|
||||
display: flex;
|
||||
flex-direction: column; // 垂直布局
|
||||
overflow: hidden; // 防止内容溢出
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
padding: 0 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user