diff --git a/src/api/okr/okr.js b/src/api/okr/okr.js index 09edcd4..46b2619 100644 --- a/src/api/okr/okr.js +++ b/src/api/okr/okr.js @@ -143,3 +143,12 @@ export const getChannelOptions = () => { // headers: { 'instance-id': 1016 } }) } + +// 获取统计表中的合计信息 +export const getOkrStatisticsTotal = (params) => { + return request.get({ + url: '/admin-api/okr/node/data/count', + params + // headers: { 'instance-id': 1016 } + }) +} diff --git a/src/router/modules/static.ts b/src/router/modules/static.ts index e33943f..0faa34c 100644 --- a/src/router/modules/static.ts +++ b/src/router/modules/static.ts @@ -35,7 +35,33 @@ const staticRouter: AppCustomRouteRecordRaw[] = [ visible: true, alwaysShow: true, redirect: '' + }, + { + icon: 'ep:data-line', + path: 'okr-analysis', + name: 'Okr统计', + componentName: 'OkrAnalysis', + component: 'OKR/Analysis/index', + meta: { + title: 'Okr统计' + }, + visible: true, + alwaysShow: true, + redirect: '' } + // { + // icon: 'ep:data-board', + // path: 'okr-metting', + // name: '会议管理', + // componentName: 'OkrMetting', + // component: 'OKR/Meeting/index', + // meta: { + // title: '会议管理' + // }, + // visible: true, + // alwaysShow: true, + // redirect: '' + // } ], meta: { title: 'OKR', diff --git a/src/styles/index.scss b/src/styles/index.scss index f4e9f17..318e27f 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -97,4 +97,13 @@ /* 去除 Firefox 中的指示器 */ .el-input__inner[type='number'] { -moz-appearance: textfield; +} +.el-drawer__header { + padding: 16px 16px 8px 16px !important; + margin: 0 !important; + line-height: 24px !important; + font-size: 18px !important; + color: #303133 !important; + box-sizing: border-box !important; + // border-bottom: 1px solid #e8e8e8 !important; } \ No newline at end of file diff --git a/src/utils/tableObjectSpanMethod.js b/src/utils/tableObjectSpanMethod.js deleted file mode 100644 index 2dabd28..0000000 --- a/src/utils/tableObjectSpanMethod.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @Author: River_qiu - * @Date: 2021/11/18 - */ -// 表格单元格合并多列 -let [spanObj, pos] = [{}, {}] -//spanObj 存储每个key 对应的合并值 -//pos 存储的是 key合并值得索引 大概吧 -export const dataMethod = (data, isH, allColumns = []) => { - //循环数据(行) - for (let i in data) { - let dataI = data[i] - //循环数据内对象,查看有多少key - if (allColumns.length > 0) { - let preProp = undefined - // dataI.historyValue = - // 循环列数据 - for (let index = 0; index < allColumns.length; index++) { - let j = allColumns[index] - if (i == 0) { - // 第一行,每列至少展示1行 - spanObj[j] = [1] - pos[j] = 0 - } else { - if (index == 0) { - data[i].historyValue = '' - data[i - 1].historyValue = '' - } else { - data[i].historyValue += data[i][preProp] - data[i - 1].historyValue += data[i - 1][preProp] - } - // e: 当前行数据,k:上一行数据 - let [e, k] = [dataI, data[i - 1]] - // 判断上一行数据是否存在 - // 空数据不合并 - // 前一列值相同并且不为空或者为第一列 - // 存在当前的列的值与上一行是否一样 - // 判断是否有数组规定只允许那几列需要合并单元格的 - if ( - k && - e[j] && - (!preProp || (e.historyValue && e.historyValue == k.historyValue)) && - e[j] == k[j] && - (!isH || isH.length == 0 || isH.includes(j)) - ) { - //如果上一级和当前一级相当,数组就加1 数组后面就添加一个0 - spanObj[j][pos[j]] += 1 - spanObj[j].push(0) - } else { - spanObj[j].push(1) - pos[j] = i - } - preProp = j - } - } - } else { - for (let j in dataI) { - //如果只有一条数据时默认为1即可,无需合并 - if (i == 0) { - spanObj[j] = [1] - pos[j] = 0 - } else { - let [e, k] = [dataI, data[i - 1]] - //判断上一级别是否存在 , - //存在当前的key是否和上级别的key是否一样 - //判断是否有数组规定只允许那几列需要合并单元格的 - if (k && e[j] && k[j] && e[j] == k[j] && (!isH || isH.length == 0 || isH.includes(j))) { - //如果上一级和当前一级相当,数组就加1 数组后面就添加一个0 - spanObj[j][pos[j]] += 1 - spanObj[j].push(0) - } else { - spanObj[j].push(1) - pos[j] = i - } - } - } - } - } - return spanObj -} diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index 7beecf8..65b9205 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -1,7 +1,96 @@ + +const { t } = useI18n() +const userStore = useUserStore() +const router = useRouter() // 路由对象 +const loading = ref(false) +const avatar = userStore.getUser.avatar ? userStore.getUser.avatar : avatarImg +const username = userStore.getUser.nickname - +function getWaitTargetCount() { + getWaitCount({}).then((res) => { + waitCount.value = res + }) +} + +const waitCount = ref({ + dayEndAgentWorkNum: 0, + myAgentWorkNum: 0, + urgeAgentWorkNum: 0, + notifyNum: 0 +}) + +const getAllApi = async () => { + await getWaitTargetCount() + loading.value = false +} + +onMounted(() => { + getAllApi() +}) + + + diff --git a/src/views/OKR/Analysis/index.vue b/src/views/OKR/Analysis/index.vue index 3b8d285..3bed8cf 100644 --- a/src/views/OKR/Analysis/index.vue +++ b/src/views/OKR/Analysis/index.vue @@ -1,6 +1,6 @@ - + diff --git a/src/views/OKR/Management/Components/DialogOkr.vue b/src/views/OKR/Management/Components/DialogOkr.vue index cabb65c..05a9d0a 100644 --- a/src/views/OKR/Management/Components/DialogOkr.vue +++ b/src/views/OKR/Management/Components/DialogOkr.vue @@ -143,7 +143,7 @@ - +
@@ -178,7 +178,7 @@
- 新增评论 + 新增笔谈