|
|
|
@ -17,20 +17,23 @@ |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24"> |
|
|
|
|
<el-form-item label="会议主题" prop="meetingSubject"> |
|
|
|
|
<el-input v-model="form.meetingSubject" placeholder="请输入会议主题" /> |
|
|
|
|
<el-input v-model="form.meetingSubject" placeholder="请输入会议主题" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24"> |
|
|
|
|
<el-tree-select |
|
|
|
|
v-model="form.nodeId" |
|
|
|
|
:data="peroidList" |
|
|
|
|
:props="defaultProps" |
|
|
|
|
:render-after-expand="false" |
|
|
|
|
:default-expand-all="false" |
|
|
|
|
check-strictly |
|
|
|
|
placeholder="选择OKR节点" |
|
|
|
|
style="width: 100%" |
|
|
|
|
/> |
|
|
|
|
<el-form-item label="okr节点" prop="nodeId"> |
|
|
|
|
<el-tree-select |
|
|
|
|
v-model="form.nodeId" |
|
|
|
|
:data="peroidList" |
|
|
|
|
:props="defaultProps" |
|
|
|
|
:render-after-expand="false" |
|
|
|
|
:default-expand-all="false" |
|
|
|
|
check-strictly |
|
|
|
|
clearable |
|
|
|
|
placeholder="选择OKR节点" |
|
|
|
|
style="width: 100%" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="6" :lg="6" :md="12" :sm="12" :xs="24"> |
|
|
|
|
<el-form-item label="会议时间" prop="startTime"> |
|
|
|
@ -56,7 +59,7 @@ |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="6" :lg="6" :md="12" :sm="12" :xs="24"> |
|
|
|
|
<el-form-item label="会议地点" prop="meetingRoom"> |
|
|
|
|
<el-input v-model="form.meetingRoom" placeholder="请输入会议地点" /> |
|
|
|
|
<el-input v-model="form.meetingRoom" placeholder="请输入会议地点" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="6" :lg="6" :md="12" :sm="12" :xs="24"> |
|
|
|
@ -64,6 +67,7 @@ |
|
|
|
|
<el-select v-model="form.status" placeholder="请选择会议状态" style="width: 100%"> |
|
|
|
|
<el-option label="未开始" value="1" /> |
|
|
|
|
<el-option label="已结束" value="2" /> |
|
|
|
|
<el-option label="已取消" value="3" disabled /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -146,8 +150,8 @@ const defaultProps = { |
|
|
|
|
|
|
|
|
|
const isDetail = route.query.isDetail |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
getOptions() |
|
|
|
|
onMounted(async () => { |
|
|
|
|
await getOptions() |
|
|
|
|
if (route.params.id && route.params.id != 0) { |
|
|
|
|
// 这里可以调用API获取会议详情数据 |
|
|
|
|
getMeetingInfo(route.params.id) |
|
|
|
@ -158,18 +162,31 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
|
const peroidList = ref([]) |
|
|
|
|
function getOptions() { |
|
|
|
|
// 获取OKR节点数据 |
|
|
|
|
getAllNodeTree().then((resp) => { |
|
|
|
|
peroidList.value = listToTree(resp?.tree || [], { |
|
|
|
|
id: 'nodeId', |
|
|
|
|
pid: 'parentId', |
|
|
|
|
children: 'children' |
|
|
|
|
return Promise.all([getAllNodeTree(), getEmployeeSimpleList()]) |
|
|
|
|
.then(([okrResp, employeeResp]) => { |
|
|
|
|
peroidList.value = listToTree(okrResp?.tree || [], { |
|
|
|
|
id: 'nodeId', |
|
|
|
|
pid: 'parentId', |
|
|
|
|
children: 'children' |
|
|
|
|
}) |
|
|
|
|
userOptions.value = employeeResp.map((it) => ({ ...it, id: it.id + '' })) |
|
|
|
|
// handleUserChange() |
|
|
|
|
}) |
|
|
|
|
.catch((error) => { |
|
|
|
|
console.error('获取数据失败:', error) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
// 获取人员数据 |
|
|
|
|
getEmployeeSimpleList().then((data) => { |
|
|
|
|
userOptions.value = data.map((it) => ({ ...it, id: it.id + '' })) |
|
|
|
|
}) |
|
|
|
|
// // 获取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({ |
|
|
|
@ -258,6 +275,7 @@ async function submit() { |
|
|
|
|
message.error('预约会议时,会议内容不能为空') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
form.value.actualUsers = [] |
|
|
|
|
// 新增会议 |
|
|
|
|
await MeetingApi.createMeeting(form.value) |
|
|
|
|
message.success('会议创建成功') |
|
|
|
|