|
@@ -14,8 +14,9 @@ import TenantVisit from '@/layout/components/TenantVisit/index.vue'
|
|
|
import { useAppStore } from '@/store/modules/app'
|
|
import { useAppStore } from '@/store/modules/app'
|
|
|
import { useDesign } from '@/hooks/web/useDesign'
|
|
import { useDesign } from '@/hooks/web/useDesign'
|
|
|
import { checkPermi } from '@/utils/permission'
|
|
import { checkPermi } from '@/utils/permission'
|
|
|
|
|
+import * as Agent from '@/api/system/notify/agent/index'
|
|
|
// 先导入图片
|
|
// 先导入图片
|
|
|
-import todoIcon from '../../assets/images/topTodo.png';
|
|
|
|
|
|
|
+import todoIcon from '../../assets/images/topTodo.png'
|
|
|
|
|
|
|
|
const { getPrefixCls, variables } = useDesign()
|
|
const { getPrefixCls, variables } = useDesign()
|
|
|
|
|
|
|
@@ -58,6 +59,21 @@ export default defineComponent({
|
|
|
// 代办数量
|
|
// 代办数量
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const documentTodos = ref(0)
|
|
const documentTodos = ref(0)
|
|
|
|
|
+ const queryParams = reactive({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: -1,
|
|
|
|
|
+ queryType: '0', // 默认全部
|
|
|
|
|
+ startTime: '',
|
|
|
|
|
+ endTime: ''
|
|
|
|
|
+ })
|
|
|
|
|
+ onMounted(() => {
|
|
|
|
|
+ getAgentNum()
|
|
|
|
|
+ })
|
|
|
|
|
+ const getAgentNum = async () => {
|
|
|
|
|
+ const agentData = await Agent.getMyAgent(queryParams)
|
|
|
|
|
+ documentTodos.value = agentData.handleAgent.length
|
|
|
|
|
+ console.log(agentData, 'agentData')
|
|
|
|
|
+ }
|
|
|
// 代办:处理跳转逻辑
|
|
// 代办:处理跳转逻辑
|
|
|
const handleNewPageJump = () => {
|
|
const handleNewPageJump = () => {
|
|
|
router.push({ name: 'Agent' })
|
|
router.push({ name: 'Agent' })
|
|
@@ -81,11 +97,11 @@ export default defineComponent({
|
|
|
</div>
|
|
</div>
|
|
|
) : undefined}
|
|
) : undefined}
|
|
|
<div class="h-full flex items-center">
|
|
<div class="h-full flex items-center">
|
|
|
- {hasTenantVisitPermission.value ? <TenantVisit/> : undefined}
|
|
|
|
|
|
|
+ {hasTenantVisitPermission.value ? <TenantVisit /> : undefined}
|
|
|
{screenfull.value ? (
|
|
{screenfull.value ? (
|
|
|
<Screenfull class="custom-hover" color="var(--top-header-text-color)"></Screenfull>
|
|
<Screenfull class="custom-hover" color="var(--top-header-text-color)"></Screenfull>
|
|
|
) : undefined}
|
|
) : undefined}
|
|
|
- {search.value ? <RouterSearch isModal={false}/> : undefined}
|
|
|
|
|
|
|
+ {search.value ? <RouterSearch isModal={false} /> : undefined}
|
|
|
{size.value ? (
|
|
{size.value ? (
|
|
|
<SizeDropdown class="custom-hover" color="var(--top-header-text-color)"></SizeDropdown>
|
|
<SizeDropdown class="custom-hover" color="var(--top-header-text-color)"></SizeDropdown>
|
|
|
) : undefined}
|
|
) : undefined}
|
|
@@ -98,14 +114,9 @@ export default defineComponent({
|
|
|
{message.value ? (
|
|
{message.value ? (
|
|
|
<Message class="custom-hover" color="var(--top-header-text-color)"></Message>
|
|
<Message class="custom-hover" color="var(--top-header-text-color)"></Message>
|
|
|
) : undefined}
|
|
) : undefined}
|
|
|
- <div
|
|
|
|
|
- class="custom-hover p-2 cursor-pointer"
|
|
|
|
|
- onClick={handleNewPageJump}
|
|
|
|
|
- title="待办"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div class="custom-hover p-2 cursor-pointer" onClick={handleNewPageJump} title="待办">
|
|
|
{documentTodos.value > 0 ? (
|
|
{documentTodos.value > 0 ? (
|
|
|
- <ElBadge value={documentTodos.value} max={10} class="item">
|
|
|
|
|
- // 然后在模板中使用
|
|
|
|
|
|
|
+ <ElBadge value={documentTodos.value} max={10} class="itemAgent" badge-style="">
|
|
|
<img
|
|
<img
|
|
|
src={todoIcon}
|
|
src={todoIcon}
|
|
|
style="width: 1.2em; height: 1.2em; vertical-align: middle;"
|
|
style="width: 1.2em; height: 1.2em; vertical-align: middle;"
|
|
@@ -113,7 +124,6 @@ export default defineComponent({
|
|
|
/>
|
|
/>
|
|
|
</ElBadge>
|
|
</ElBadge>
|
|
|
) : (
|
|
) : (
|
|
|
- // 然后在模板中使用
|
|
|
|
|
<img
|
|
<img
|
|
|
src={todoIcon}
|
|
src={todoIcon}
|
|
|
style="width: 1.2em; height: 1.2em; vertical-align: middle;"
|
|
style="width: 1.2em; height: 1.2em; vertical-align: middle;"
|
|
@@ -140,4 +150,8 @@ $prefix-cls: #{$namespace}-tool-header;
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
margin-right: 40px;
|
|
margin-right: 40px;
|
|
|
}
|
|
}
|
|
|
|
|
+.itemAgent {
|
|
|
|
|
+ margin-top: -8px;
|
|
|
|
|
+ margin-right: 30px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|