系统首页

This commit is contained in:
许允枞 2024-10-23 16:16:22 +08:00
parent 73c0a25054
commit bc5ef39a31

View File

@ -1,35 +1,80 @@
<template> <template>
<div > <div>
<el-row> <el-row>
<el-col v-for="item in serviceList" :span="4"> <el-col v-for="item in serviceList" :span="4">
<image-preview :width="300" :height="300" :src="item.coverImg"></image-preview> <image-preview :width="300" :height="300" :src="item.coverImg"></image-preview>
{{item.name}} {{ item.name }}
</el-col> </el-col>
</el-row> </el-row>
<el-table <div style="margin-top: 30px">
:data="warnList" <el-row :gutter="20">
stripe <el-col :span="12">
style="width: 100%"> <div>
<el-table-column <div style="font-size: 30px;margin-bottom: 30px">资产临期提醒</div>
prop="date" <el-table
label="日期" :data="warnList"
width="180"> stripe
</el-table-column> style="width: 100%">
<el-table-column <el-table-column
prop="name" prop="date"
label="姓名" label="日期"
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="name"
label="地址"> label="姓名"
</el-table-column> width="180">
</el-table> </el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-col>
<el-col :span="12">
<div>
<div style="font-size: 30px;margin-bottom: 30px">消息通知</div>
<el-table
:data="messageList"
stripe
style="width: 100%">
<el-table-column
prop="templateNickname"
label="发送人"
width="120">
</el-table-column>
<el-table-column label="发送时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="templateType" width="80">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE" :value="scope.row.templateType" />
</template>
</el-table-column>
<el-table-column
prop="templateContent"
label="内容">
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="messageTotal > 0" :total="messageTotal" :page.sync="messageQueryParams.pageNo"
:limit.sync="messageQueryParams.pageSize"
@pagination="getNotifyMessage"
/>
</div>
</el-col>
</el-row>
</div>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div> </div>
</template> </template>
@ -41,6 +86,7 @@ import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart' import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart' import BarChart from './dashboard/BarChart'
import {getServicePackageList} from "@/api/system/servicePackage"; import {getServicePackageList} from "@/api/system/servicePackage";
import {getMyNotifyMessagePage, getUnreadNotifyMessageList} from "@/api/system/notify/message";
const lineChartData = { const lineChartData = {
newVisitis: { newVisitis: {
@ -73,23 +119,36 @@ export default {
data() { data() {
return { return {
lineChartData: lineChartData.newVisitis, lineChartData: lineChartData.newVisitis,
serviceList:[], serviceList: [],
warnList:[], warnList: [],
messageList:[], messageList: [],
queryParams:{ queryParams: {
pageNo:1, pageNo: 1,
pageSize:10 pageSize: 10
} },
messageQueryParams: {
pageNo: 1,
pageSize: 10
},
messageTotal: 0
} }
}, },
created() { created() {
this.getServiceList() this.getServiceList()
this.getNotifyMessage()
}, },
methods: { methods: {
handleSetLineChartData(type) { handleSetLineChartData(type) {
this.lineChartData = lineChartData[type] this.lineChartData = lineChartData[type]
}, },
getServiceList(){ getNotifyMessage() {
//
getMyNotifyMessagePage(this.messageQueryParams).then(response => {
this.messageList = response.data.list;
this.messageTotal = response.data.total;
});
},
getServiceList() {
getServicePackageList(this.queryParams).then(response => { getServicePackageList(this.queryParams).then(response => {
this.serviceList = response.data; this.serviceList = response.data;
@ -113,7 +172,7 @@ export default {
} }
} }
@media (max-width:1024px) { @media (max-width: 1024px) {
.chart-wrapper { .chart-wrapper {
padding: 8px; padding: 8px;
} }