新增待办信息
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
<span class="info-item">时间:{{ NoticeList?.createTime || '-' }}</span>
|
||||
<span class="info-item">类型:{{ getTypeText(NoticeList?.type) }}</span>
|
||||
</div>
|
||||
<!-- 优化后的内容展示区域 -->
|
||||
<div class="detail-content">
|
||||
<pre class="db-content">{{ NoticeList?.description || '无内容' }}</pre>
|
||||
</div>
|
||||
@@ -43,22 +42,34 @@
|
||||
import { defineComponent, ref, onMounted, onUnmounted } from 'vue';
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { bizListItemSflow, BizListItem } from '@jeesite/biz/api/biz/listItem';
|
||||
import { bizListItemSflow, bizListItemList, BizListItem, TabItem } from '@jeesite/biz/api/biz/listItem';
|
||||
|
||||
export default defineComponent({
|
||||
components: { BasicModal },
|
||||
emits: ['modalClose'],
|
||||
setup(props, { emit }) {
|
||||
|
||||
|
||||
const TodoValue = ref();
|
||||
const NoticeList = ref();
|
||||
const NoticeList = ref<BizListItem>();
|
||||
const getDataList = async ( params: any) => {
|
||||
try {
|
||||
const result = await bizListItemList(params);
|
||||
NoticeList.value = result.bizListItem || [];
|
||||
TodoValue.value = result.bizListItem.extraDesc|| '';
|
||||
} catch (error) {
|
||||
NoticeList.value = undefined ;
|
||||
console.error('获取数据失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
// 模态框注册
|
||||
const [register, { closeModal }] = useModalInner(async (data: any) => {
|
||||
if (!data) return;
|
||||
NoticeList.value = Array.isArray(data) ? data[0] : data;
|
||||
TodoValue.value = NoticeList.value.extraDesc|| '';
|
||||
const params = {
|
||||
id : data.id
|
||||
}
|
||||
await getDataList(params);
|
||||
});
|
||||
|
||||
const getTypeText = (type: string) => {
|
||||
@@ -120,9 +131,9 @@
|
||||
/* 主容器样式 - 淡蓝色系优化 */
|
||||
.detail-container {
|
||||
background-color: #f0f8ff; /* 统一淡蓝色背景 */
|
||||
padding: 20px;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
min-height: 200px;
|
||||
min-height: 400px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
$props.titleRows && $props.titleRows > 0 ? { rows: $props.titleRows, tooltip: !!item.title } : false
|
||||
"
|
||||
:content="item.title"
|
||||
@click="openModal(true, item)"
|
||||
/>
|
||||
<div class="extra" v-if="item.extra">
|
||||
<a-tag class="tag" :color="item.color">
|
||||
@@ -52,14 +53,17 @@
|
||||
</a-list-item>
|
||||
</template>
|
||||
</a-list>
|
||||
<Modal @register="register" />
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, PropType, ref, watch, unref } from 'vue';
|
||||
import { BizListItem } from '@jeesite/biz/api/biz/listItem';
|
||||
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 { Icon } from '@jeesite/core/components/Icon';
|
||||
import { isNumber } from '@jeesite/core/utils/is';
|
||||
import Modal from './NoticeInfo.vue';
|
||||
|
||||
interface ExtendedBizListItem extends BizListItem {
|
||||
titleDelete?: '0' | '1' | string;
|
||||
@@ -74,6 +78,7 @@
|
||||
ATypographyParagraph: Typography.Paragraph,
|
||||
[Tag.name as string]: Tag,
|
||||
Icon,
|
||||
Modal,
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
@@ -103,6 +108,9 @@
|
||||
},
|
||||
emits: ['update:currentPage'],
|
||||
setup(props, { emit }) {
|
||||
|
||||
const [register, { openModal }] = useModal();
|
||||
|
||||
const { prefixCls } = useDesign('header-notify-list');
|
||||
const current = ref(props.currentPage || 1);
|
||||
|
||||
@@ -144,8 +152,15 @@
|
||||
function handleTitleClick(item: ExtendedBizListItem) {
|
||||
props.onTitleClick && props.onTitleClick(item);
|
||||
}
|
||||
|
||||
return { prefixCls, getPagination, getData, handleTitleClick, isTitleClickable };
|
||||
return {
|
||||
prefixCls,
|
||||
getPagination,
|
||||
getData,
|
||||
handleTitleClick,
|
||||
isTitleClickable,
|
||||
register,
|
||||
openModal,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -9,33 +9,29 @@
|
||||
<template v-for="item in listData" :key="item.key">
|
||||
<TabPane>
|
||||
<template #tab>
|
||||
{{ item.name }}
|
||||
<span @click="getDataList()">{{ item.name }}</span>
|
||||
<span v-if="item.list.length !== 0">({{ item.list.length }})</span>
|
||||
</template>
|
||||
<NoticeList :list="item.list" v-if="item.list.length > 0" @click="openModal(true, item.list)" />
|
||||
<NoticeList :list="item.list" />
|
||||
</TabPane>
|
||||
</template>
|
||||
</Tabs>
|
||||
</template>
|
||||
</Popover>
|
||||
</div>
|
||||
<Modal @register="register" @modalClose="getDataList()" />
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, onMounted, ref } from 'vue';
|
||||
import { Popover, Tabs, Badge } from 'ant-design-vue';
|
||||
import { BellOutlined } from '@ant-design/icons-vue';
|
||||
import NoticeList from './NoticeList.vue';
|
||||
import { useModal } from '@jeesite/core/components/Modal';
|
||||
import { useDesign } from '@jeesite/core/hooks/web/useDesign';
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { tabListDataAll, bizListItemSflow, TabItem, BizListItem } from '@jeesite/biz/api/biz/listItem';
|
||||
import Modal from './NoticeInfo.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: { Popover, BellOutlined, Tabs, TabPane: Tabs.TabPane, Badge, NoticeList, Modal },
|
||||
components: { Popover, BellOutlined, Tabs, TabPane: Tabs.TabPane, Badge, NoticeList },
|
||||
setup() {
|
||||
const [register, { openModal }] = useModal();
|
||||
|
||||
const { prefixCls } = useDesign('header-notify');
|
||||
const listData = ref<TabItem[]>([]);
|
||||
@@ -65,8 +61,6 @@
|
||||
prefixCls,
|
||||
listData,
|
||||
count,
|
||||
register,
|
||||
openModal,
|
||||
numberStyle: {},
|
||||
getDataList,
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
|
||||
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
||||
import { BizCalendarSchedule, bizCalendarScheduleSave, bizCalendarScheduleForm } from '@jeesite/biz/api/biz/calendarSchedule';
|
||||
|
||||
const emit = defineEmits(['success', 'register']);
|
||||
@@ -168,7 +168,11 @@
|
||||
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
const data = await validate();
|
||||
const orgData = await validate();
|
||||
const data = {
|
||||
... orgData,
|
||||
updateTime: formatToDateTime(new Date()) ,
|
||||
}
|
||||
setModalProps({ confirmLoading: true });
|
||||
const params: any = {
|
||||
isNewRecord: record.value.isNewRecord,
|
||||
|
||||
Reference in New Issue
Block a user