Compare commits
10 Commits
main
...
2ed18556c1
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ed18556c1 | |||
| b05e42f9c7 | |||
| 6d08fd8390 | |||
| 1413ce44c7 | |||
| 5d88d06707 | |||
| f0afdcf18e | |||
| b019400409 | |||
| 69a496dc6e | |||
| 7c7bf51518 | |||
| 65dae80239 |
@@ -4,9 +4,10 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
# VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
VITE_BASE_URL='http://47.98.161.246:48080'
|
# VITE_BASE_URL='http://47.98.161.246:48080'
|
||||||
|
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||||
#VITE_BASE_URL='http://114.215.207.150:48080'
|
#VITE_BASE_URL='http://114.215.207.150:48080'
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
|
|||||||
2
.env.dev
2
.env.dev
@@ -4,8 +4,10 @@ VITE_NODE_ENV=production
|
|||||||
VITE_DEV=false
|
VITE_DEV=false
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
|
#VITE_BASE_URL='http://47.98.161.246:48080'
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||||
|
|
||||||
|
|||||||
@@ -43,19 +43,3 @@ export const getMeetingPage = (params) => {
|
|||||||
// headers: { 'instance-id': 1016 }
|
// 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 }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -49,10 +49,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
})
|
})
|
||||||
const redirectPath = from.query.redirect || to.path
|
const redirectPath = from.query.redirect || to.path
|
||||||
const redirect = decodeURIComponent(redirectPath)
|
const redirect = decodeURIComponent(redirectPath)
|
||||||
const nextData =
|
const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect }
|
||||||
to.path === redirect
|
|
||||||
? { ...to, replace: true, query: to.query }
|
|
||||||
: { path: redirect, query: to.query }
|
|
||||||
next(nextData)
|
next(nextData)
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
@@ -62,23 +59,10 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
const tenantId = getTenantId() || to.query?.tenantId
|
const tenantId = getTenantId()
|
||||||
const appId = getAppId() || to.query?.appId
|
const appId = getAppId()
|
||||||
if (tenantId && appId) {
|
if (tenantId && appId) {
|
||||||
let redirectPath = to.fullPath
|
next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||||
const p = to.fullPath.split('?')
|
|
||||||
if (p.length > 1) {
|
|
||||||
// 过滤掉query参数中的tenantId和appId
|
|
||||||
redirectPath =
|
|
||||||
p[0] +
|
|
||||||
'?' +
|
|
||||||
p[1]
|
|
||||||
.split('&')
|
|
||||||
.filter((item) => !item.startsWith('tenantId=') && !item.startsWith('appId='))
|
|
||||||
.join('&')
|
|
||||||
}
|
|
||||||
|
|
||||||
next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${redirectPath}`) // 否则全部重定向到登录页
|
|
||||||
} else {
|
} else {
|
||||||
// next(`/login?redirect=${to.fullPath}`)
|
// next(`/login?redirect=${to.fullPath}`)
|
||||||
// 否则全部重定向到平台登陆页
|
// 否则全部重定向到平台登陆页
|
||||||
|
|||||||
@@ -139,16 +139,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
noTagsView: true
|
noTagsView: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/meeting-summary',
|
|
||||||
component: () => import('@/views/OKR/Meeting/MeetingSummary.vue'),
|
|
||||||
name: 'MeetingSummary',
|
|
||||||
meta: {
|
|
||||||
hidden: true,
|
|
||||||
title: '会议纪要',
|
|
||||||
noTagsView: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/sso',
|
path: '/sso',
|
||||||
component: () => import('@/views/Login/Login.vue'),
|
component: () => import('@/views/Login/Login.vue'),
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="formData.leaderUserId"
|
v-model="formData.leaderUserId"
|
||||||
clearable
|
clearable
|
||||||
multiple
|
|
||||||
filterable
|
filterable
|
||||||
placeholder="请输入负责人"
|
placeholder="请输入负责人"
|
||||||
>
|
>
|
||||||
@@ -137,17 +136,13 @@ const open = async (type: string, id?: number) => {
|
|||||||
try {
|
try {
|
||||||
formData.value = await DeptApi.getDept(id)
|
formData.value = await DeptApi.getDept(id)
|
||||||
formData.value.remark = formData.value.remark || ''
|
formData.value.remark = formData.value.remark || ''
|
||||||
formData.value.leaderUserId = formData.value.leaderUserId?.map((it) => it + '') || []
|
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获得用户列表
|
// 获得用户列表
|
||||||
getEmployeeSimpleList().then((data) => {
|
getEmployeeSimpleList().then((data) => {
|
||||||
employeeOptions.value = data.map((it) => ({
|
employeeOptions.value = data
|
||||||
...it,
|
|
||||||
id: it.id + ''
|
|
||||||
}))
|
|
||||||
})
|
})
|
||||||
//实例
|
//实例
|
||||||
getSimpleAppList().then((data) => {
|
getSimpleAppList().then((data) => {
|
||||||
@@ -191,7 +186,7 @@ const resetForm = () => {
|
|||||||
parentId: undefined,
|
parentId: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
leaderUserId: [],
|
leaderUserId: undefined,
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
instanceId: undefined
|
instanceId: undefined
|
||||||
|
|||||||
@@ -267,18 +267,14 @@ async function getList() {
|
|||||||
return pre.concat(cur.userDingAttendanceRespVOList)
|
return pre.concat(cur.userDingAttendanceRespVOList)
|
||||||
}, [])
|
}, [])
|
||||||
} else {
|
} else {
|
||||||
tableList.value = data.list.map((it, index) => {
|
tableList.value = data.list.map((it, index) => ({
|
||||||
const arr = it.userDingAttendanceRespVOList.filter((user) => user.needAttendance)
|
|
||||||
return {
|
|
||||||
...it,
|
...it,
|
||||||
userDingAttendanceRespVOList: multiFieldSort(arr, [
|
userDingAttendanceRespVOList: it.userDingAttendanceRespVOList.sort((pre, cur) =>
|
||||||
{ key: 'dept' },
|
pre.employeeName.localeCompare(cur.employeeName)
|
||||||
{ key: 'employeeName' }
|
),
|
||||||
]),
|
|
||||||
id: index + 1,
|
id: index + 1,
|
||||||
edit: it.status == 1 ? '2' : '0'
|
edit: it.status == 1 ? '2' : '0'
|
||||||
}
|
}))
|
||||||
})
|
|
||||||
}
|
}
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -288,32 +284,6 @@ async function getList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function multiFieldSort(arr, fields) {
|
|
||||||
return arr.sort((a, b) => {
|
|
||||||
// 遍历每个排序字段
|
|
||||||
for (const field of fields) {
|
|
||||||
const { key, order = 'asc' } = field
|
|
||||||
const valueA = a[key]
|
|
||||||
const valueB = b[key]
|
|
||||||
|
|
||||||
// 处理不同类型的比较
|
|
||||||
let compareResult
|
|
||||||
if (typeof valueA === 'number' && typeof valueB === 'number') {
|
|
||||||
compareResult = valueA - valueB // 数字比较
|
|
||||||
} else {
|
|
||||||
compareResult = String(valueA).localeCompare(String(valueB)) // 字符串比较(兼容其他类型)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果当前字段值不相等,直接返回比较结果(根据排序方向调整)
|
|
||||||
if (compareResult !== 0) {
|
|
||||||
return order === 'desc' ? -compareResult : compareResult
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 所有字段都相等,保持原有顺序
|
|
||||||
return 0
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function spanMethod({ row, columnIndex }) {
|
function spanMethod({ row, columnIndex }) {
|
||||||
if (row.userDingAttendanceRespVOList && row.userDingAttendanceRespVOList.length > 0) {
|
if (row.userDingAttendanceRespVOList && row.userDingAttendanceRespVOList.length > 0) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
|
|||||||
@@ -392,10 +392,9 @@ async function getList() {
|
|||||||
} else {
|
} else {
|
||||||
tableList.value = data.list.map((it, index) => ({
|
tableList.value = data.list.map((it, index) => ({
|
||||||
...it,
|
...it,
|
||||||
userSalaryGrantRespVOList: multiFieldSort(it.userSalaryGrantRespVOList, [
|
userSalaryGrantRespVOList: it.userSalaryGrantRespVOList.sort((pre, cur) =>
|
||||||
{ key: 'dept' },
|
pre.name.localeCompare(cur.name)
|
||||||
{ key: 'name' }
|
),
|
||||||
]),
|
|
||||||
id: index + 1,
|
id: index + 1,
|
||||||
edit: it.status == 1 ? '2' : '0'
|
edit: it.status == 1 ? '2' : '0'
|
||||||
}))
|
}))
|
||||||
@@ -408,32 +407,6 @@ async function getList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function multiFieldSort(arr, fields) {
|
|
||||||
return arr.sort((a, b) => {
|
|
||||||
// 遍历每个排序字段
|
|
||||||
for (const field of fields) {
|
|
||||||
const { key, order = 'asc' } = field
|
|
||||||
const valueA = a[key]
|
|
||||||
const valueB = b[key]
|
|
||||||
|
|
||||||
// 处理不同类型的比较
|
|
||||||
let compareResult
|
|
||||||
if (typeof valueA === 'number' && typeof valueB === 'number') {
|
|
||||||
compareResult = valueA - valueB // 数字比较
|
|
||||||
} else {
|
|
||||||
compareResult = String(valueA).localeCompare(String(valueB)) // 字符串比较(兼容其他类型)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果当前字段值不相等,直接返回比较结果(根据排序方向调整)
|
|
||||||
if (compareResult !== 0) {
|
|
||||||
return order === 'desc' ? -compareResult : compareResult
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 所有字段都相等,保持原有顺序
|
|
||||||
return 0
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const createSalaryRef = ref()
|
const createSalaryRef = ref()
|
||||||
function craeteSalary() {
|
function craeteSalary() {
|
||||||
createSalaryRef.value.open()
|
createSalaryRef.value.open()
|
||||||
|
|||||||
@@ -127,8 +127,6 @@ const formLogin = ref()
|
|||||||
const { validForm } = useFormValid(formLogin)
|
const { validForm } = useFormValid(formLogin)
|
||||||
const { setLoginState, getLoginState } = useLoginState()
|
const { setLoginState, getLoginState } = useLoginState()
|
||||||
const { currentRoute, push } = useRouter()
|
const { currentRoute, push } = useRouter()
|
||||||
const route = useRoute()
|
|
||||||
|
|
||||||
const permissionStore = usePermissionStore()
|
const permissionStore = usePermissionStore()
|
||||||
const redirect = ref('')
|
const redirect = ref('')
|
||||||
const loginLoading = ref(false)
|
const loginLoading = ref(false)
|
||||||
@@ -219,12 +217,9 @@ const handleLogin = async (params) => {
|
|||||||
if (redirect.value.indexOf('sso') !== -1) {
|
if (redirect.value.indexOf('sso') !== -1) {
|
||||||
window.location.href = window.location.href.replace('/login?redirect=', '')
|
window.location.href = window.location.href.replace('/login?redirect=', '')
|
||||||
} else {
|
} else {
|
||||||
push({
|
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
||||||
path: redirect.value || permissionStore.addRouters[0].path,
|
|
||||||
query: route.redirectedFrom?.query
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch {
|
||||||
loginLoading.value = false
|
loginLoading.value = false
|
||||||
} finally {
|
} finally {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -234,12 +229,10 @@ const handleLogin = async (params) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// const routerParams = ref(undefined)
|
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value,
|
() => currentRoute.value,
|
||||||
(route1) => {
|
(route) => {
|
||||||
redirect.value = route1?.redirectedFrom?.path
|
redirect.value = route?.query?.redirect
|
||||||
// routerParams.value = route?.redirectedFrom?.query
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true
|
immediate: true
|
||||||
|
|||||||
@@ -3,10 +3,7 @@
|
|||||||
<!-- <el-affix postion="top" :offset="95" v-if="!isDetail"> -->
|
<!-- <el-affix postion="top" :offset="95" v-if="!isDetail"> -->
|
||||||
<div class="flex justify-between mb-4 bg-white" v-if="!isDetail">
|
<div class="flex justify-between mb-4 bg-white" v-if="!isDetail">
|
||||||
<b class="text-20px">{{ form.meetingId ? '修改会议' : '新增会议' }}</b>
|
<b class="text-20px">{{ form.meetingId ? '修改会议' : '新增会议' }}</b>
|
||||||
<div>
|
<el-button type="success" @click="submit()">保存</el-button>
|
||||||
<el-button @click="submit(true)">保存至草稿</el-button>
|
|
||||||
<el-button type="success" @click="submit(false)">保存</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- </el-affix> -->
|
<!-- </el-affix> -->
|
||||||
<el-form
|
<el-form
|
||||||
@@ -79,6 +76,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="form.expectUsers"
|
v-model="form.expectUsers"
|
||||||
placeholder="选择参会人员"
|
placeholder="选择参会人员"
|
||||||
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
multiple
|
multiple
|
||||||
@@ -89,7 +87,7 @@
|
|||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:disabled="item.status == 1 || item.id == userStore.getUser.id"
|
:disabled="item.status == 1"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -108,7 +106,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" :offset="0" v-if="form.meetingId && !isAllActived">
|
<el-col :span="24" :offset="0" v-if="!isAllActived">
|
||||||
<el-form-item label="缺席原因" prop="absentReason">
|
<el-form-item label="缺席原因" prop="absentReason">
|
||||||
<el-input v-model="form.absentReason" placeholder="请输入缺席原因" />
|
<el-input v-model="form.absentReason" placeholder="请输入缺席原因" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -116,106 +114,26 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24">
|
<el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24">
|
||||||
<el-tabs v-model="currentUserId" tab-position="top" @tab-click="userTabChange">
|
<el-form-item label="会议内容" prop="meetingContent">
|
||||||
<el-tab-pane
|
<div v-if="!!isDetail" v-dompurify-html="form.meetingContent" class="w-full"></div>
|
||||||
v-for="item in form.meetingContentList"
|
<Editor v-else v-model="form.meetingContent" height="500px" style="width: 100%" />
|
||||||
:key="item.userId"
|
</el-form-item>
|
||||||
:label="item.userName"
|
|
||||||
:name="item.userId + ''"
|
|
||||||
/>
|
|
||||||
</el-tabs>
|
|
||||||
<el-tabs v-model="currentContentId" tab-position="left" addable @edit="handleTabsEdit">
|
|
||||||
<el-tab-pane
|
|
||||||
v-for="(item, index) in form.meetingContentList.find(
|
|
||||||
(it) => it.userId == currentUserId
|
|
||||||
)?.userMeetingContentList"
|
|
||||||
:key="index"
|
|
||||||
:label="'内容' + (index + 1)"
|
|
||||||
:name="index"
|
|
||||||
:closable="index > 0"
|
|
||||||
>
|
|
||||||
<div v-if="!!isDetail" v-dompurify-html="item.content" class="w-full"></div>
|
|
||||||
<Editor v-else v-model="item.content" height="500px" style="width: 100%" />
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" v-if="!!form.meetingId">
|
<el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" v-if="!!form.meetingId">
|
||||||
<div v-if="!!isDetail" v-dompurify-html="form.meetingSummary" class="w-full"></div>
|
<el-form-item label="会议纪要" prop="meetingSummary" label-width="80px">
|
||||||
<div v-else>
|
<!-- <div v-if="!!isDetail" v-dompurify-html="form.meetingSummary" class="w-full"></div>
|
||||||
<el-tabs v-model="summaryIdx" addable @edit="meetingSummaryEdit">
|
<Editor v-else v-model="form.meetingSummary" height="500px" /> -->
|
||||||
<el-tab-pane
|
<div v-if="!!isDetail" class="w-full">{{ form.meetingSummary }}</div>
|
||||||
v-for="(item, index) in form.meetingSummaryList"
|
<el-input
|
||||||
:key="index"
|
v-else
|
||||||
:label="`会议纪要${index || ''}`"
|
v-model="form.meetingSummary"
|
||||||
:name="index"
|
type="textarea"
|
||||||
:closable="index > 0"
|
|
||||||
>
|
|
||||||
<Editor
|
|
||||||
v-model="item.summary"
|
|
||||||
:toolbarConfig="toolbarConfig"
|
|
||||||
height="350px"
|
|
||||||
placeholder="请输入会议纪要"
|
placeholder="请输入会议纪要"
|
||||||
style="width: 100%"
|
:maxlength="-1"
|
||||||
|
:show-word-limit="false"
|
||||||
|
:autosize="{ minRows: 20 }"
|
||||||
/>
|
/>
|
||||||
<div class="mt-10px">
|
|
||||||
<el-form-item label="是否创建待办" label-width="auto">
|
|
||||||
<el-radio-group v-model="item.isCreateAgentWork">
|
|
||||||
<el-radio :label="true" :value="true"> 创建待办 </el-radio>
|
|
||||||
<el-radio :label="false" :value="false"> 不创建待办 </el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
|
||||||
<div class="flex items-center" v-if="item.isCreateAgentWork">
|
|
||||||
<el-select
|
|
||||||
class="flex-1"
|
|
||||||
v-model="item.agentUserList"
|
|
||||||
placeholder="选择执行人"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
multiple
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="it in userOptions"
|
|
||||||
:key="it.id"
|
|
||||||
:label="it.name"
|
|
||||||
:value="it.id"
|
|
||||||
:disabled="it.status == 1"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-date-picker
|
|
||||||
class="flex-1 ml-10px"
|
|
||||||
v-model="item.endDate"
|
|
||||||
type="date"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
placeholder="选择截止时间"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
<el-divider />
|
|
||||||
<div class="text-black text-12px">
|
|
||||||
注:如果选择创建待办,请选择执行人及截止日期,默认每天9:00循环提醒,可于待办中修改
|
|
||||||
</div>
|
|
||||||
<div class="mt-10px">
|
|
||||||
<el-form-item label="会议纪要发送至群聊:" label-width="auto">
|
|
||||||
<el-select
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
v-model="form.wxId"
|
|
||||||
placeholder="请输入群聊名称"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in groupOptions"
|
|
||||||
:key="item.wxGroupId"
|
|
||||||
:label="item.wxGroupName"
|
|
||||||
:value="item.wxGroupId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -225,17 +143,14 @@
|
|||||||
<script setup name="MeetingInfo">
|
<script setup name="MeetingInfo">
|
||||||
import { listToTree } from '@/utils/tree'
|
import { listToTree } from '@/utils/tree'
|
||||||
import { getAllNodeTree } from '@/api/okr/okr'
|
import { getAllNodeTree } from '@/api/okr/okr'
|
||||||
import { getWaitPage } from '@/api/okr/wait'
|
|
||||||
import * as MeetingApi from '@/api/okr/meeting'
|
import * as MeetingApi from '@/api/okr/meeting'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { getEmployeeSimpleList } from '@/api/pers/employee'
|
import { getEmployeeSimpleList } from '@/api/pers/employee'
|
||||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const tagsViewStore = useTagsViewStore()
|
const tagsViewStore = useTagsViewStore()
|
||||||
const userStore = useUserStore()
|
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
value: 'nodeId',
|
value: 'nodeId',
|
||||||
@@ -244,34 +159,14 @@ const defaultProps = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isDetail = route.query.isDetail
|
const isDetail = route.query.isDetail
|
||||||
const currentUserId = ref(undefined)
|
|
||||||
const currentContentId = ref(0) // 默认选中第一个标签页
|
|
||||||
const summaryIdx = ref(0) // 会议纪要的索引
|
|
||||||
|
|
||||||
const toolbarConfig = {
|
|
||||||
toolbarKeys: []
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getWxGroupOptions()
|
|
||||||
await getOptions()
|
await getOptions()
|
||||||
if (route.params.id && route.params.id != 0) {
|
if (route.params.id && route.params.id != 0) {
|
||||||
// 这里可以调用API获取会议详情数据
|
// 这里可以调用API获取会议详情数据
|
||||||
getMeetingInfo(route.params.id)
|
getMeetingInfo(route.params.id)
|
||||||
} else {
|
} else {
|
||||||
form.value.meetingContentList = [
|
console.error('会议不存在')
|
||||||
{
|
|
||||||
userId: userStore.getUser.id + '',
|
|
||||||
userName: userStore.getUser.nickname,
|
|
||||||
userMeetingContentList: [
|
|
||||||
{
|
|
||||||
content: ''
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
currentContentId.value = 0
|
|
||||||
searchUserWait([userStore.getUser.id])
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -285,13 +180,23 @@ function getOptions() {
|
|||||||
children: 'children'
|
children: 'children'
|
||||||
})
|
})
|
||||||
userOptions.value = employeeResp.map((it) => ({ ...it, id: it.id + '' }))
|
userOptions.value = employeeResp.map((it) => ({ ...it, id: it.id + '' }))
|
||||||
form.value.expectUsers = [userStore.getUser.id + ''] // 默认添加当前用户为预约参会人员
|
// handleUserChange()
|
||||||
// form.value.actualUsers = [userStore.getUser.id + '']
|
|
||||||
currentUserId.value = userStore.getUser.id + '' // 默认选中当前用户
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('获取数据失败:', 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({
|
const form = ref({
|
||||||
@@ -306,9 +211,7 @@ const form = ref({
|
|||||||
status: '1',
|
status: '1',
|
||||||
meetingContent: '',
|
meetingContent: '',
|
||||||
meetingSummary: '',
|
meetingSummary: '',
|
||||||
absentReason: '',
|
absentReason: ''
|
||||||
meetingContentList: [],
|
|
||||||
meetingSummaryList: []
|
|
||||||
})
|
})
|
||||||
const rules = {
|
const rules = {
|
||||||
meetingSubject: [{ required: true, message: '请输入会议主题', trigger: 'blur' }],
|
meetingSubject: [{ required: true, message: '请输入会议主题', trigger: 'blur' }],
|
||||||
@@ -336,37 +239,15 @@ const getMeetingInfo = async (meetingId) => {
|
|||||||
const resp = await MeetingApi.getMeetingDetail({ meetingId })
|
const resp = await MeetingApi.getMeetingDetail({ meetingId })
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (resp) {
|
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 = {
|
||||||
...form.value,
|
...form.value,
|
||||||
...resp,
|
...resp,
|
||||||
startTime: formatDate(resp.startTime, 'YYYY-MM-DD HH:mm'),
|
startTime: formatDate(resp.startTime, 'YYYY-MM-DD HH:mm'),
|
||||||
expectEndTime: formatDate(resp.expectEndTime, 'YYYY-MM-DD HH:mm'),
|
expectEndTime: formatDate(resp.expectEndTime, 'YYYY-MM-DD HH:mm'),
|
||||||
expectUsers: resp.expectUsers || [],
|
expectUsers: resp.expectUsers || [],
|
||||||
actualUsers: resp.actualUsers || [],
|
actualUsers: resp.actualUsers || []
|
||||||
meetingSummaryList: summaryList
|
|
||||||
}
|
}
|
||||||
currentContentId.value = 0
|
handleUserChange()
|
||||||
expectUserOptions.value = userOptions.value.filter((user) =>
|
|
||||||
form.value.expectUsers.some((it) => it == user.id)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@@ -374,62 +255,7 @@ const getMeetingInfo = async (meetingId) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const groupOptions = ref([])
|
function handleUserChange() {
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const checkedUsers = ref([])
|
|
||||||
function handleUserChange(val) {
|
|
||||||
// 当预约参会人员变化时,更新实际参会人员选项
|
// 当预约参会人员变化时,更新实际参会人员选项
|
||||||
expectUserOptions.value = userOptions.value.filter((user) =>
|
expectUserOptions.value = userOptions.value.filter((user) =>
|
||||||
form.value.expectUsers.some((it) => it == user.id)
|
form.value.expectUsers.some((it) => it == user.id)
|
||||||
@@ -437,101 +263,30 @@ function handleUserChange(val) {
|
|||||||
if (!isDetail) {
|
if (!isDetail) {
|
||||||
form.value.actualUsers = [...form.value.expectUsers]
|
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: ''
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
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 = '<p>未完成事项:' + wait.title + '</p>'
|
|
||||||
text += wait.content
|
|
||||||
text += `<p>执行人:${wait.userNameStr}</p>`
|
|
||||||
text += `<p>截止日期:${formatDate(wait.endDate, 'YYYY-MM-DD')}</p>`
|
|
||||||
text += '<p><br></p>'
|
|
||||||
form.value.meetingContentList[0].userMeetingContentList[0].content =
|
|
||||||
text + form.value.meetingContentList[0].userMeetingContentList[0].content
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
async function submit(isDraft = false) {
|
async function submit() {
|
||||||
// 校验表单
|
// 校验表单
|
||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
const valid = await formRef.value.validate()
|
const valid = await formRef.value.validate()
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
form.value.isDraft = isDraft
|
|
||||||
// 提交表单数据
|
// 提交表单数据
|
||||||
if (form.value.meetingId) {
|
if (form.value.meetingId) {
|
||||||
if (
|
if (form.value.status == 2 && !form.value.meetingSummary) {
|
||||||
form.value.status == 2 &&
|
|
||||||
form.value.meetingSummaryList.some((it) => it.summary.trim() == '')
|
|
||||||
) {
|
|
||||||
message.error('会议结束时,会议纪要不能为空')
|
message.error('会议结束时,会议纪要不能为空')
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
let text = ''
|
|
||||||
form.value.meetingSummaryList.map((item, index) => {
|
|
||||||
if (form.value.meetingSummaryList.length > 1) {
|
|
||||||
text += '<p>会议纪要' + (index + 1) + ':</p>'
|
|
||||||
}
|
|
||||||
text += item.summary
|
|
||||||
if (item.isCreateAgentWork) {
|
|
||||||
text += `<p>执行人:`
|
|
||||||
item.agentUserList.map((it) => {
|
|
||||||
if (it) {
|
|
||||||
text += `${userOptions.value.find((user) => user.id == it).name} `
|
|
||||||
}
|
|
||||||
})
|
|
||||||
text += '</p>'
|
|
||||||
text += `<p>截止日期:${item.endDate}</p>`
|
|
||||||
}
|
|
||||||
text += '<p><br></p>'
|
|
||||||
})
|
|
||||||
form.value.meetingSummary = text
|
|
||||||
}
|
}
|
||||||
// 更新会议
|
// 更新会议
|
||||||
await MeetingApi.updateMeeting(form.value)
|
await MeetingApi.updateMeeting(form.value)
|
||||||
message.success('会议更新成功')
|
message.success('会议更新成功')
|
||||||
} else {
|
} else {
|
||||||
|
if (form.value.status == 1 && !form.value.meetingContent) {
|
||||||
|
message.error('预约会议时,会议内容不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
form.value.actualUsers = []
|
form.value.actualUsers = []
|
||||||
// 新增会议
|
// 新增会议
|
||||||
await MeetingApi.createMeeting(form.value)
|
await MeetingApi.createMeeting(form.value)
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-descriptions :column="1" border label-width="90px" class="w-full">
|
|
||||||
<el-descriptions-item label="会议主题">{{ meetingInfo.meetingSubject }}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="会议时间">{{ meetingInfo.startTime }}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="发起人">{{ meetingInfo.creatorName }}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="会议纪要">
|
|
||||||
<div v-dompurify-html="meetingInfo.meetingSummary"></div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="MeettingSummary">
|
|
||||||
import { getMeetingDetail } from '@/api/okr/meeting'
|
|
||||||
import { formatDate } from '@/utils/formatTime'
|
|
||||||
|
|
||||||
const route = useRoute()
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
if (route.query.id && route.query.id != 0) {
|
|
||||||
// 这里可以调用API获取会议详情数据
|
|
||||||
getMeetingInfo(route.query.id)
|
|
||||||
} else {
|
|
||||||
console.error('会议不存在')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const meetingInfo = ref({})
|
|
||||||
const getMeetingInfo = async (meetingId) => {
|
|
||||||
try {
|
|
||||||
// 调用API获取会议详情
|
|
||||||
const resp = await getMeetingDetail({ meetingId })
|
|
||||||
if (resp) {
|
|
||||||
meetingInfo.value = {
|
|
||||||
meetingSubject: resp.meetingSubject,
|
|
||||||
meetingSummary: resp.meetingSummary,
|
|
||||||
startTime: formatDate(resp.startTime, 'YYYY-MM-DD HH:mm'),
|
|
||||||
creatorName: resp.creatorName
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取会议详情失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
@@ -11,15 +11,6 @@
|
|||||||
@keyup.enter="handleSearch"
|
@keyup.enter="handleSearch"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
|
||||||
<el-input
|
|
||||||
v-model="searchForm.creator"
|
|
||||||
placeholder="发起人"
|
|
||||||
style="width: 120px"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleSearch"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.status"
|
v-model="searchForm.status"
|
||||||
@@ -67,7 +58,6 @@
|
|||||||
<el-table-column prop="meetingSubject" label="会议主题" />
|
<el-table-column prop="meetingSubject" label="会议主题" />
|
||||||
<el-table-column prop="startTime" label="会议时间" width="170px" />
|
<el-table-column prop="startTime" label="会议时间" width="170px" />
|
||||||
<el-table-column prop="meetingRoom" label="会议地点" width="140px" />
|
<el-table-column prop="meetingRoom" label="会议地点" width="140px" />
|
||||||
<el-table-column prop="creatorName" label="发起人" width="100px" />
|
|
||||||
<el-table-column prop="expectEndTime" label="预计结束时间" width="170px" />
|
<el-table-column prop="expectEndTime" label="预计结束时间" width="170px" />
|
||||||
<el-table-column prop="expectUserName" label="预约参会人员" />
|
<el-table-column prop="expectUserName" label="预约参会人员" />
|
||||||
<el-table-column prop="actualUserName" label="实际参会人员" />
|
<el-table-column prop="actualUserName" label="实际参会人员" />
|
||||||
@@ -127,7 +117,6 @@ const message = useMessage()
|
|||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
meetingSubject: undefined,
|
meetingSubject: undefined,
|
||||||
creator: undefined,
|
|
||||||
status: '1',
|
status: '1',
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
nodeId: undefined,
|
nodeId: undefined,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<el-form
|
<el-form
|
||||||
:model="form"
|
:model="form"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:disabled="['do', 'detail'].includes(formType)"
|
:disabled="formType == 'do'"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
@@ -239,9 +239,7 @@ const followList = ref([])
|
|||||||
|
|
||||||
function open(type, id) {
|
function open(type, id) {
|
||||||
show.value = true
|
show.value = true
|
||||||
title.value = { create: '新增待办', update: '修改待办', do: '更新待办进度', detail: '待办详情' }[
|
title.value = { create: '新增待办', update: '修改待办', do: '更新待办进度' }[type]
|
||||||
type
|
|
||||||
]
|
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
if (id) {
|
if (id) {
|
||||||
|
|||||||
@@ -139,15 +139,6 @@
|
|||||||
>
|
>
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
v-if="row.completeStatus == 2"
|
|
||||||
style="padding: 0; margin-right: 10px; margin-left: 0"
|
|
||||||
type="primary"
|
|
||||||
text
|
|
||||||
@click="handleDetail(row)"
|
|
||||||
>
|
|
||||||
详情
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="row.creator == currentUserId && row.completeStatus == 1"
|
v-if="row.creator == currentUserId && row.completeStatus == 1"
|
||||||
style="padding: 0; margin-right: 10px; margin-left: 0"
|
style="padding: 0; margin-right: 10px; margin-left: 0"
|
||||||
@@ -280,10 +271,6 @@ function handleEdit(row) {
|
|||||||
waitDialogRef.value.open('update', row.workId)
|
waitDialogRef.value.open('update', row.workId)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDetail(row) {
|
|
||||||
waitDialogRef.value.open('detail', row.workId)
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
message.confirm('确定删除待办事项吗?').then(() => {
|
message.confirm('确定删除待办事项吗?').then(() => {
|
||||||
deleteWait(row.workId).then(() => {
|
deleteWait(row.workId).then(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user