sc
This commit is contained in:
@@ -39,11 +39,11 @@ const staticRouter: AppCustomRouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
icon: 'ep:data-line',
|
icon: 'ep:data-line',
|
||||||
path: 'okr-analysis',
|
path: 'okr-analysis',
|
||||||
name: 'Okr统计',
|
name: 'OKR统计',
|
||||||
componentName: 'OkrAnalysis',
|
componentName: 'OkrAnalysis',
|
||||||
component: 'OKR/Analysis/index',
|
component: 'OKR/Analysis/index',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Okr统计'
|
title: 'OKR统计'
|
||||||
},
|
},
|
||||||
visible: true,
|
visible: true,
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<el-affix postion="top" :offset="95">
|
<el-affix postion="top" :offset="95">
|
||||||
<div class="flex justify-between mb-4 bg-white">
|
<div class="flex justify-between mb-4 bg-white">
|
||||||
<b class="text-20px">{{ form.id ? '修改会议' : '新增会议' }}</b>
|
<b class="text-20px">{{ form.id ? '修改会议' : '新增会议' }}</b>
|
||||||
<el-button v-if="form.status == '未开始'" type="success" @click="submit()">保存</el-button>
|
<el-button type="success" @click="submit()">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-affix>
|
</el-affix>
|
||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="120px">
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="120px">
|
||||||
@@ -14,9 +14,16 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
||||||
<el-form-item label="OKR节点" prop="okrNodeName">
|
<el-tree-select
|
||||||
<el-input v-model="form.okrNodeName" placeholder="请输入OKR节点" />
|
v-model="form.nodeId"
|
||||||
</el-form-item>
|
:data="peroidList"
|
||||||
|
:props="defaultProps"
|
||||||
|
:render-after-expand="false"
|
||||||
|
:default-expand-all="false"
|
||||||
|
check-strictly
|
||||||
|
placeholder="选择OKR节点"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xl="6" :lg="6" :md="12" :sm="12" :xs="24">
|
<el-col :xl="6" :lg="6" :md="12" :sm="12" :xs="24">
|
||||||
<el-form-item label="会议时间" prop="startDate">
|
<el-form-item label="会议时间" prop="startDate">
|
||||||
@@ -97,13 +104,15 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
||||||
<el-form-item label="会议内容" prop="content">
|
<el-form-item label="会议内容:" prop="content">
|
||||||
<Editor v-model="form.content" height="500px" />
|
<div v-if="isDetail" v-dompurify-html="form.content" class="w-full"></div>
|
||||||
|
<Editor v-else v-model="form.content" height="500px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
||||||
<el-form-item label="会议纪要" prop="minutes">
|
<el-form-item label="会议纪要:" prop="minutes">
|
||||||
<Editor v-model="form.minutes" height="500px" />
|
<div v-if="isDetail" v-dompurify-html="form.minutes" class="w-full"></div>
|
||||||
|
<Editor v-else v-model="form.minutes" height="500px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -112,9 +121,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="MeetingInfo">
|
<script setup name="MeetingInfo">
|
||||||
|
import { listToTree } from '@/utils/tree'
|
||||||
|
import { getAllNodeTree } from '@/api/okr/okr'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
const defaultProps = {
|
||||||
|
value: 'nodeId',
|
||||||
|
label: 'nodeName',
|
||||||
|
children: 'children'
|
||||||
|
}
|
||||||
|
|
||||||
|
const isDetail = route.query.isDetail
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
if (route.params.id && route.params.id != 0) {
|
if (route.params.id && route.params.id != 0) {
|
||||||
// 模拟获取会议详情
|
// 模拟获取会议详情
|
||||||
// 这里可以调用API获取会议详情数据
|
// 这里可以调用API获取会议详情数据
|
||||||
@@ -123,6 +143,19 @@ onMounted(() => {
|
|||||||
console.error('会议ID不存在')
|
console.error('会议ID不存在')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const peroidList = ref([])
|
||||||
|
function getOptions() {
|
||||||
|
// 模拟获取OKR节点数据
|
||||||
|
getAllNodeTree().then((resp) => {
|
||||||
|
peroidList.value = listToTree(resp?.tree || [], {
|
||||||
|
id: 'nodeId',
|
||||||
|
pid: 'parentId',
|
||||||
|
children: 'children'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
id: 0,
|
id: 0,
|
||||||
subject: '',
|
subject: '',
|
||||||
@@ -175,7 +208,9 @@ const getMeetingInfo = () => {
|
|||||||
expectUsers: ['张三', '李四', '王五'],
|
expectUsers: ['张三', '李四', '王五'],
|
||||||
actualUsers: ['张三', '李四'],
|
actualUsers: ['张三', '李四'],
|
||||||
okrNodeName: 'OKR节点1',
|
okrNodeName: 'OKR节点1',
|
||||||
status: '未开始'
|
status: '未开始',
|
||||||
|
content: '<p>会议内容示例</p> <p><img src="https://picsum.photos/200/300" alt=""></p>',
|
||||||
|
minutes: '<p>会议纪要示例</p>'
|
||||||
}
|
}
|
||||||
handleUserChange()
|
handleUserChange()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<!-- 搜索条件:主题、会议状态、会议时间(时间段)、选择OKR节点 -->
|
<!-- 搜索条件:主题、会议状态、会议时间(时间段)、选择OKR节点 -->
|
||||||
<el-form :model="searchForm" inline label-width="0">
|
<el-form :model="searchForm" inline label-width="0">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.subject" placeholder="会议主题" />
|
<el-input v-model="searchForm.subject" placeholder="会议主题" style="width: 200px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.status" placeholder="会议状态" style="width: 120px">
|
<el-select v-model="searchForm.status" placeholder="会议状态" style="width: 150px">
|
||||||
<el-option label="未开始" :value="1" />
|
<el-option label="未开始" :value="1" />
|
||||||
<el-option label="已结束" :value="2" />
|
<el-option label="已结束" :value="2" />
|
||||||
<el-option label="已取消" :value="3" />
|
<el-option label="已取消" :value="3" />
|
||||||
@@ -23,10 +23,17 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.nodeId" placeholder="选择OKR节点" style="width: 220px">
|
<el-tree-select
|
||||||
<el-option label="OKR节点1" :value="1" />
|
v-model="searchForm.nodeId"
|
||||||
<el-option label="OKR节点2" :value="2" />
|
:data="peroidList"
|
||||||
</el-select>
|
:props="defaultProps"
|
||||||
|
:render-after-expand="false"
|
||||||
|
:default-expand-all="false"
|
||||||
|
check-strictly
|
||||||
|
placeholder="选择OKR节点"
|
||||||
|
style="width: 300px"
|
||||||
|
@change="handleSearch"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleSearch">查询</el-button>
|
<el-button @click="handleSearch">查询</el-button>
|
||||||
@@ -54,11 +61,16 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="140">
|
<el-table-column fixed="right" label="操作" width="140">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" style="padding: 0" text @click="handleEdit(row.id)">
|
<template v-if="row.status == '未开始'">
|
||||||
修改
|
<el-button type="primary" style="padding: 0" text @click="handleEdit(row.id)">
|
||||||
</el-button>
|
修改
|
||||||
<el-button type="danger" text style="padding: 0" @click="handleCancel(row)">
|
</el-button>
|
||||||
取消
|
<el-button type="danger" text style="padding: 0" @click="handleCancel(row)">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<el-button v-else type="primary" style="padding: 0" text @click="handleDetail(row.id)">
|
||||||
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -73,21 +85,44 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Meeting">
|
<script setup name="Meeting">
|
||||||
|
import { listToTree } from '@/utils/tree'
|
||||||
|
// import { formatDate } from '@/utils/formatTime'
|
||||||
|
import { getAllNodeTree } from '@/api/okr/okr'
|
||||||
|
|
||||||
|
const defaultProps = {
|
||||||
|
value: 'nodeId',
|
||||||
|
label: 'nodeName',
|
||||||
|
children: 'children'
|
||||||
|
}
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
subject: '',
|
subject: '',
|
||||||
status: 1,
|
status: 1,
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
|
nodeId: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 50
|
pageSize: 50
|
||||||
})
|
})
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
handleSearch()
|
handleSearch()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const peroidList = ref([])
|
||||||
|
function getOptions() {
|
||||||
|
// 模拟获取OKR节点数据
|
||||||
|
getAllNodeTree().then((resp) => {
|
||||||
|
peroidList.value = listToTree(resp?.tree || [], {
|
||||||
|
id: 'nodeId',
|
||||||
|
pid: 'parentId',
|
||||||
|
children: 'children'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableList = ref([])
|
const tableList = ref([])
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
@@ -144,6 +179,18 @@ const handleEdit = (id) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleDetail = (id) => {
|
||||||
|
router.push({
|
||||||
|
name: `MeetingInfo`,
|
||||||
|
params: {
|
||||||
|
id
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
isDetail: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const handleCancel = async (row) => {
|
const handleCancel = async (row) => {
|
||||||
try {
|
try {
|
||||||
await message.confirm('是否确认取消该会议?')
|
await message.confirm('是否确认取消该会议?')
|
||||||
|
|||||||
Reference in New Issue
Block a user