parent
b4f52db747
commit
e3330f7dae
14 changed files with 191 additions and 47 deletions
@ -0,0 +1,9 @@ |
||||
package org.jeecg.modules.demo.expert.entity; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class ExpdefVo { |
||||
private String name; |
||||
private Integer number; |
||||
} |
@ -1,34 +1,79 @@ |
||||
<template> |
||||
<Card title="项目" v-bind="$attrs"> |
||||
<template #extra> |
||||
<a-button type="link" size="small">更多</a-button> |
||||
</template> |
||||
<!-- <template #extra>--> |
||||
<!-- </template>--> |
||||
|
||||
<template v-for="item in items" :key="item"> |
||||
<!-- <template >--> |
||||
<CardGrid class="!md:w-1/3 !w-full"> |
||||
<span class="flex"> |
||||
<Icon :icon="item.icon" :color="item.color" size="30" /> |
||||
<span class="text-lg ml-4">{{ item.title }}</span> |
||||
<span class="text-lg ml-4">已经注册的专家总数</span> |
||||
</span> |
||||
<div class="flex mt-2 h-10 text-secondary"> {{ item.desc }} </div> |
||||
<div class="flex justify-between text-secondary"> |
||||
<span>{{ item.group }}</span> |
||||
<span>{{ item.date }}</span> |
||||
|
||||
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item1 }}</span> |
||||
</div> |
||||
</CardGrid> |
||||
</template> |
||||
<CardGrid class="!md:w-1/3 !w-full"> |
||||
<span class="flex"> |
||||
<span class="text-lg ml-4">状态异常的专家数</span> |
||||
</span> |
||||
<div class="flex justify-between text-secondary"> |
||||
|
||||
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item3 }}</span> |
||||
</div> |
||||
</CardGrid> |
||||
<CardGrid class="!md:w-1/3 !w-full"> |
||||
<span class="flex"> |
||||
<span class="text-lg ml-4">状态正常的专家数</span> |
||||
</span> |
||||
<div class="flex justify-between text-secondary"> |
||||
|
||||
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item2 }}</span> |
||||
</div> |
||||
</CardGrid> |
||||
|
||||
<!-- </template>--> |
||||
</Card> |
||||
</template> |
||||
<script lang="ts"> |
||||
import { defineComponent } from 'vue'; |
||||
import { defineComponent, ref } from 'vue'; |
||||
import { Card } from 'ant-design-vue'; |
||||
import { Icon } from '/@/components/Icon'; |
||||
import { groupItems } from './data'; |
||||
|
||||
import { getDataListApi,getDataListApizc,getDataListApiyc } from './api'; |
||||
export default defineComponent({ |
||||
components: { Card, CardGrid: Card.Grid, Icon }, |
||||
setup() { |
||||
return { items: groupItems }; |
||||
const item1 = ref("0"); |
||||
function item01(){ |
||||
getDataListApi().then(res => { |
||||
item1.value = res |
||||
console.log("-----------------",item1.value) |
||||
})} |
||||
item01(); |
||||
|
||||
const item2 = ref("0"); |
||||
function item02(){ |
||||
getDataListApizc().then(res => { |
||||
item2.value = res |
||||
console.log("++++++++++++++++++++++",item2.value) |
||||
})} |
||||
item02(); |
||||
|
||||
const item3 = ref("0"); |
||||
function item03(){ |
||||
getDataListApiyc().then(res => { |
||||
item3.value = res |
||||
console.log("++++++++++++++++++++++",item3.value) |
||||
})} |
||||
item03(); |
||||
|
||||
|
||||
return {item1,item2,item3} |
||||
|
||||
|
||||
}, |
||||
}); |
||||
|
||||
|
||||
|
||||
</script> |
||||
|
@ -0,0 +1,27 @@ |
||||
import { defHttp } from '/src/utils/http/axios'; |
||||
import { useMessage } from "/src/hooks/web/useMessage"; |
||||
|
||||
const { createConfirm } = useMessage(); |
||||
|
||||
enum Api { |
||||
dataList = '/expert/expert/expdatanumber', |
||||
zclist = '/expert/expert/expdatanumberzc', |
||||
lyzjlist = '/expert/expert/expdatanumberdiffect', |
||||
} |
||||
|
||||
export function getDataListApi() { |
||||
return defHttp.get({ url: Api.dataList }); |
||||
} |
||||
|
||||
|
||||
export function getDataListApizc() { |
||||
return defHttp.get({ url: Api.zclist }); |
||||
} |
||||
|
||||
export function getDataListApiyc() { |
||||
return defHttp.get({ url: Api.yclist }); |
||||
} |
||||
|
||||
export function expdatanumberdiffect() { |
||||
return defHttp.get({ url: Api.lyzjlist }); |
||||
} |
Loading…
Reference in new issue