From c34623287c57afc22575091966f9dc3f0b440e92 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Mon, 4 Aug 2025 17:21:38 +0800 Subject: [PATCH 1/6] sc --- src/views/Clue/Order/Comp/MallOrderList.vue | 2 +- src/views/OKR/Meeting/MeetingInfo.vue | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/views/Clue/Order/Comp/MallOrderList.vue b/src/views/Clue/Order/Comp/MallOrderList.vue index e20a70c..85ad1b1 100644 --- a/src/views/Clue/Order/Comp/MallOrderList.vue +++ b/src/views/Clue/Order/Comp/MallOrderList.vue @@ -510,7 +510,7 @@ async function handleChangeProdoce(row) { }) message.success('修改成功') // 刷新列表 - getTableList() + // getTableList() } catch { // 取消后,进行恢复按钮 row.isProduced = !row.isProduced diff --git a/src/views/OKR/Meeting/MeetingInfo.vue b/src/views/OKR/Meeting/MeetingInfo.vue index a23a78e..93b5fa2 100644 --- a/src/views/OKR/Meeting/MeetingInfo.vue +++ b/src/views/OKR/Meeting/MeetingInfo.vue @@ -121,9 +121,15 @@ - - {{ form.meetingSummary }} + + + @@ -152,6 +158,10 @@ const route = useRoute() const message = useMessage() const tagsViewStore = useTagsViewStore() +const toolbarConfig = { + toolbarKeys: [] +} + const defaultProps = { value: 'nodeId', label: 'nodeName', From 6ebe33e48cb9910115330985293cdcee0e75a54d Mon Sep 17 00:00:00 2001 From: qsh <> Date: Fri, 8 Aug 2025 11:03:30 +0800 Subject: [PATCH 2/6] sc --- src/views/Clue/Order/Comp/MallSettle.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/Clue/Order/Comp/MallSettle.vue b/src/views/Clue/Order/Comp/MallSettle.vue index e6d00af..bb95bab 100644 --- a/src/views/Clue/Order/Comp/MallSettle.vue +++ b/src/views/Clue/Order/Comp/MallSettle.vue @@ -246,6 +246,16 @@ {{ settleAmount }} + + + @@ -269,7 +279,7 @@ import * as SettleApi from '@/api/clue/settle' import { getSupplierSimpleList } from '@/api/school/setting/supplier' import { removeNullField } from '@/utils/index' -import { dateFormatter } from '@/utils/formatTime' +import { dateFormatter, formatDate } from '@/utils/formatTime' const message = useMessage() // 消息弹窗 @@ -394,6 +404,7 @@ function batchSettle() { showDailog.value = true form.value = { settlementIds: selectList.value.map((it) => it.settlementId), + settlementDate: formatDate(new Date(), 'YYYY-MM-DD'), reamrk: undefined } settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0) From 9b323b68f97d484fcde8ab98c8025623324168c6 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Mon, 11 Aug 2025 23:50:45 +0800 Subject: [PATCH 3/6] sc --- src/api/okr/meeting.js | 16 ++ src/components/Editor/src/Editor.vue | 2 +- src/views/Basic/Dept/DeptForm.vue | 11 +- src/views/OKR/Meeting/MeetingInfo.vue | 318 +++++++++++++++++++++----- src/views/OKR/Meeting/index.vue | 10 + 5 files changed, 296 insertions(+), 61 deletions(-) diff --git a/src/api/okr/meeting.js b/src/api/okr/meeting.js index 6cdaad4..df17772 100644 --- a/src/api/okr/meeting.js +++ b/src/api/okr/meeting.js @@ -43,3 +43,19 @@ export const getMeetingPage = (params) => { // headers: { 'instance-id': 1016 } }) } + +// 刷新微信群列表 +export const refreshWxGroupList = () => { + return request.get({ + url: '/admin-api/system/wx/reFreshWeChatGroupList' + // headers: { 'instance-id': 1016 } + }) +} + +// 获取微信群聊列表 +export const getWxGroupList = () => { + return request.get({ + url: '/admin-api/system/wx/getWeChatGroupList' + // headers: { 'instance-id': 1016 } + }) +} diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index 22df80b..24a1e45 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -21,7 +21,7 @@ const props = defineProps({ height: propTypes.oneOfType([Number, String]).def('40vh'), editorConfig: { type: Object as PropType>, - default: () => undefined + default: () => ({}) }, readonly: propTypes.bool.def(false), modelValue: propTypes.string.def(''), diff --git a/src/views/Basic/Dept/DeptForm.vue b/src/views/Basic/Dept/DeptForm.vue index e96642b..7c1f3eb 100644 --- a/src/views/Basic/Dept/DeptForm.vue +++ b/src/views/Basic/Dept/DeptForm.vue @@ -1,5 +1,5 @@ - + - + - + diff --git a/src/views/OKR/Meeting/MeetingInfo.vue b/src/views/OKR/Meeting/MeetingInfo.vue index 93b5fa2..410a255 100644 --- a/src/views/OKR/Meeting/MeetingInfo.vue +++ b/src/views/OKR/Meeting/MeetingInfo.vue @@ -1,9 +1,12 @@ - + {{ form.meetingId ? '修改会议' : '新增会议' }} - 保存 + + 保存至草稿 + 保存 + @@ -106,7 +108,7 @@ - + @@ -114,32 +116,111 @@ - - - - + + + + + + + + + - - - - - + + + + + + + + + 创建待办 + 不创建待办 + + + + + + + + + + + + + + 注:如果选择创建待办,请选择执行人及截止日期,默认每天9:00循环提醒,可于待办中修改 + + + + + + + + + @@ -153,14 +234,12 @@ import * as MeetingApi from '@/api/okr/meeting' import { formatDate } from '@/utils/formatTime' import { getEmployeeSimpleList } from '@/api/pers/employee' import { useTagsViewStore } from '@/store/modules/tagsView' +import { useUserStore } from '@/store/modules/user' const route = useRoute() const message = useMessage() const tagsViewStore = useTagsViewStore() - -const toolbarConfig = { - toolbarKeys: [] -} +const userStore = useUserStore() const defaultProps = { value: 'nodeId', @@ -169,14 +248,33 @@ const defaultProps = { } const isDetail = route.query.isDetail +const currentUserId = ref(undefined) +const currentContentId = ref(0) // 默认选中第一个标签页 +const summaryIdx = ref(0) // 会议纪要的索引 + +const toolbarConfig = { + toolbarKeys: [] +} onMounted(async () => { + getWxGroupOptions() await getOptions() if (route.params.id && route.params.id != 0) { // 这里可以调用API获取会议详情数据 getMeetingInfo(route.params.id) } else { - console.error('会议不存在') + form.value.meetingContentList = [ + { + userId: userStore.getUser.id + '', + userName: userStore.getUser.nickname, + userMeetingContentList: [ + { + content: '' + } + ] + } + ] + currentContentId.value = 0 } }) @@ -190,23 +288,13 @@ function getOptions() { children: 'children' }) userOptions.value = employeeResp.map((it) => ({ ...it, id: it.id + '' })) - // handleUserChange() + form.value.expectUsers = [userStore.getUser.id + ''] // 默认添加当前用户为预约参会人员 + // form.value.actualUsers = [userStore.getUser.id + ''] + currentUserId.value = userStore.getUser.id + '' // 默认选中当前用户 }) .catch((error) => { console.error('获取数据失败:', error) }) - // // 获取OKR节点数据 - // getAllNodeTree().then((resp) => { - // peroidList.value = listToTree(resp?.tree || [], { - // id: 'nodeId', - // pid: 'parentId', - // children: 'children' - // }) - // }) - // // 获取人员数据 - // getEmployeeSimpleList().then((data) => { - // userOptions.value = data.map((it) => ({ ...it, id: it.id + '' })) - // }) } const form = ref({ @@ -221,7 +309,9 @@ const form = ref({ status: '1', meetingContent: '', meetingSummary: '', - absentReason: '' + absentReason: '', + meetingContentList: [], + meetingSummaryList: [] }) const rules = { meetingSubject: [{ required: true, message: '请输入会议主题', trigger: 'blur' }], @@ -249,15 +339,37 @@ const getMeetingInfo = async (meetingId) => { const resp = await MeetingApi.getMeetingDetail({ meetingId }) loading.value = false if (resp) { + let summaryList = [] + if (resp.meetingSummaryList && resp.meetingSummaryList.length > 0) { + summaryList = resp.meetingSummaryList.map((item) => ({ + ...item, + isCreateAgentWork: !!item.isCreateAgentWork, + agentUserList: item.agentUserList ? item.agentUserList.map((it) => it + '') : [] + })) + } else { + summaryList = [ + { + summary: resp.meetingSummary || '', + agentUserList: [], + endDate: '', + isCreateAgentWork: true + } + ] + } + form.value = { ...form.value, ...resp, startTime: formatDate(resp.startTime, 'YYYY-MM-DD HH:mm'), expectEndTime: formatDate(resp.expectEndTime, 'YYYY-MM-DD HH:mm'), expectUsers: resp.expectUsers || [], - actualUsers: resp.actualUsers || [] + actualUsers: resp.actualUsers || [], + meetingSummaryList: summaryList } - handleUserChange() + currentContentId.value = 0 + expectUserOptions.value = userOptions.value.filter((user) => + form.value.expectUsers.some((it) => it == user.id) + ) } } catch (error) { loading.value = false @@ -265,7 +377,61 @@ const getMeetingInfo = async (meetingId) => { } } -function handleUserChange() { +const groupOptions = ref([]) + +function getWxGroupOptions() { + MeetingApi.refreshWxGroupList().then(() => { + MeetingApi.getWxGroupList() + .then((resp) => { + groupOptions.value = resp || [] + }) + .catch((error) => { + console.error('获取微信群列表失败:', error) + }) + }) +} + +function userTabChange() { + currentContentId.value = 0 +} + +function handleTabsEdit(targetName, action) { + if (action === 'add') { + form.value.meetingContentList.forEach((item) => { + if (item.userId == currentUserId.value) { + item.userMeetingContentList.push({ + content: '' + }) + } + }) + } else if (action === 'remove') { + form.value.meetingContentList.forEach((item) => { + if (item.userId == currentUserId.value) { + item.userMeetingContentList.splice(targetName, 1) + // 如果删除的是当前选中的标签页,则切换到下一个标签页 + if (currentContentId.value == targetName) { + currentContentId.value = targetName - 1 + } + } + }) + } +} + +function meetingSummaryEdit(targetName, action) { + if (action === 'add') { + form.value.meetingSummaryList.push({ + summary: '', + agentUserList: [], + endDate: '', + isCreateAgentWork: true + }) + } else if (action === 'remove') { + form.value.meetingSummaryList.splice(targetName, 1) + summaryIdx.value = targetName - 1 + } +} + +function handleUserChange(val) { // 当预约参会人员变化时,更新实际参会人员选项 expectUserOptions.value = userOptions.value.filter((user) => form.value.expectUsers.some((it) => it == user.id) @@ -273,30 +439,68 @@ function handleUserChange() { if (!isDetail) { form.value.actualUsers = [...form.value.expectUsers] } + // 先过滤掉不存在的参会人员 + form.value.meetingContentList = form.value.meetingContentList.filter((item) => { + return val.some((it) => it == item.userId) + }) + // 再补充新增的 + val.map((item) => { + if (!form.value.meetingContentList.some((it) => it.userId == item)) { + form.value.meetingContentList.push({ + userId: item, + userName: userOptions.value.find((it) => it.id == item).name, + userMeetingContentList: [ + { + content: '' + } + ] + }) + } + }) } const router = useRouter() -async function submit() { +async function submit(isDraft = false) { // 校验表单 if (!formRef.value) return const valid = await formRef.value.validate() if (!valid) return try { + form.value.isDraft = isDraft // 提交表单数据 if (form.value.meetingId) { - if (form.value.status == 2 && !form.value.meetingSummary) { + if ( + form.value.status == 2 && + form.value.meetingSummaryList.some((it) => it.summary.trim() == '') + ) { message.error('会议结束时,会议纪要不能为空') return + } else { + let text = '' + form.value.meetingSummaryList.map((item, index) => { + if (form.value.meetingSummaryList.length > 1) { + text += '会议纪要' + (index + 1) + ':' + } + text += item.summary + if (item.isCreateAgentWork) { + text += `执行人:` + item.agentUserList.map((it) => { + if (it) { + text += `${userOptions.value.find((user) => user.id == it).name} ` + } + }) + text += '' + text += `截止日期:${item.endDate}` + } + text += '' + }) + form.value.meetingSummary = text } // 更新会议 await MeetingApi.updateMeeting(form.value) message.success('会议更新成功') } else { - if (form.value.status == 1 && !form.value.meetingContent) { - message.error('预约会议时,会议内容不能为空') - return - } form.value.actualUsers = [] // 新增会议 await MeetingApi.createMeeting(form.value) diff --git a/src/views/OKR/Meeting/index.vue b/src/views/OKR/Meeting/index.vue index 9034ba5..ceed43a 100644 --- a/src/views/OKR/Meeting/index.vue +++ b/src/views/OKR/Meeting/index.vue @@ -11,6 +11,15 @@ @keyup.enter="handleSearch" /> + + + Date: Tue, 12 Aug 2025 11:17:07 +0800 Subject: [PATCH 4/6] sc --- src/views/OKR/Meeting/MeetingInfo.vue | 49 ++++++++++++++++---- src/views/OKR/Wait/Components/DialogWait.vue | 6 ++- src/views/OKR/Wait/index.vue | 13 ++++++ 3 files changed, 57 insertions(+), 11 deletions(-) diff --git a/src/views/OKR/Meeting/MeetingInfo.vue b/src/views/OKR/Meeting/MeetingInfo.vue index 410a255..cb6a49d 100644 --- a/src/views/OKR/Meeting/MeetingInfo.vue +++ b/src/views/OKR/Meeting/MeetingInfo.vue @@ -124,12 +124,7 @@ :name="item.userId + ''" /> - + @@ -147,13 +142,13 @@ - + import { listToTree } from '@/utils/tree' import { getAllNodeTree } from '@/api/okr/okr' +import { getWaitPage } from '@/api/okr/wait' import * as MeetingApi from '@/api/okr/meeting' import { formatDate } from '@/utils/formatTime' import { getEmployeeSimpleList } from '@/api/pers/employee' @@ -275,6 +271,7 @@ onMounted(async () => { } ] currentContentId.value = 0 + searchUserWait([userStore.getUser.id]) } }) @@ -431,6 +428,7 @@ function meetingSummaryEdit(targetName, action) { } } +const checkedUsers = ref([]) function handleUserChange(val) { // 当预约参会人员变化时,更新实际参会人员选项 expectUserOptions.value = userOptions.value.filter((user) => @@ -457,6 +455,39 @@ function handleUserChange(val) { }) } }) + if (!form.value.meetingId) { + searchUserWait(val) + } +} + +function searchUserWait(val) { + val.map((item) => { + if (!checkedUsers.value.includes(item)) { + checkedUsers.value.push(item) + // 新增会议时,根据参会人员拉取代办事项 + getWaitPage({ + pageNo: 1, + pageSize: -1, + workUserId: item, + creator: userStore.getUser.id, + completeStatus: 1 + }).then((resp) => { + joinContent(resp.list) + }) + } + }) +} + +function joinContent(arr) { + arr.map((wait) => { + let text = '未完成事项:' + wait.title + '' + text += wait.content + text += `执行人:${wait.userNameStr}` + text += `截止日期:${formatDate(wait.endDate, 'YYYY-MM-DD')}` + text += '' + form.value.meetingContentList[0].userMeetingContentList[0].content = + text + form.value.meetingContentList[0].userMeetingContentList[0].content + }) } const router = useRouter() diff --git a/src/views/OKR/Wait/Components/DialogWait.vue b/src/views/OKR/Wait/Components/DialogWait.vue index 25c1697..cd3510a 100644 --- a/src/views/OKR/Wait/Components/DialogWait.vue +++ b/src/views/OKR/Wait/Components/DialogWait.vue @@ -4,7 +4,7 @@ 修改 + + 详情 + { deleteWait(row.workId).then(() => { From 831c343448c1b7a94d85d41d722a1547c43ac575 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Tue, 12 Aug 2025 17:35:37 +0800 Subject: [PATCH 5/6] sc --- src/hooks/web/useCrudSchemas.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/web/useCrudSchemas.ts b/src/hooks/web/useCrudSchemas.ts index 5708a67..f1e6043 100644 --- a/src/hooks/web/useCrudSchemas.ts +++ b/src/hooks/web/useCrudSchemas.ts @@ -276,6 +276,7 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[ } if (schemaItem.form?.component == 'Editor') { descriptionsSchemaItem.span = 2 + descriptionsSchemaItem.isEditor = true } if (schemaItem.dictType) { descriptionsSchemaItem.dictType = schemaItem.dictType From cb2deeb142e12c8eac465b604d6081003dd50bde Mon Sep 17 00:00:00 2001 From: qsh <> Date: Wed, 13 Aug 2025 10:11:46 +0800 Subject: [PATCH 6/6] sc --- src/views/MiniMall/Purchase/Comp/DialogAdd.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/MiniMall/Purchase/Comp/DialogAdd.vue b/src/views/MiniMall/Purchase/Comp/DialogAdd.vue index 9c672aa..84a02f0 100644 --- a/src/views/MiniMall/Purchase/Comp/DialogAdd.vue +++ b/src/views/MiniMall/Purchase/Comp/DialogAdd.vue @@ -33,9 +33,9 @@
会议纪要' + (index + 1) + ':
执行人:` + item.agentUserList.map((it) => { + if (it) { + text += `${userOptions.value.find((user) => user.id == it).name} ` + } + }) + text += '
截止日期:${item.endDate}
未完成事项:' + wait.title + '
执行人:${wait.userNameStr}
截止日期:${formatDate(wait.endDate, 'YYYY-MM-DD')}