修改后台默认主页内容

This commit is contained in:
xiao-fajia 2024-07-29 19:21:36 +08:00
parent 5f7fa198ca
commit cff0b3d326
14 changed files with 534 additions and 141 deletions

View File

@ -0,0 +1,45 @@
package com.ruoyi.cms.controller;
import com.ruoyi.cms.domain.vo.ServerVo;
import com.ruoyi.cms.service.IndexInfoService;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 统计系统
*/
@RequestMapping("/indexInfo")
@RestController
public class IndexInfoController extends BaseController {
@Autowired
private IndexInfoService infoService;
@Autowired
private RuoYiConfig ruoYiConfig;
/**
* 统计栏目内容大赛参数人数
* @return
*/
@GetMapping()
public AjaxResult getIndexInfo(){
return success(infoService.getSiteStat());
}
/**
* 系统信息
*/
@GetMapping("/server")
public AjaxResult getServerInfo(){
ServerVo serverVo = new ServerVo();
serverVo.setName(ruoYiConfig.getName());
serverVo.setVersion(ruoYiConfig.getVersion());
return success(serverVo);
}
}

View File

@ -0,0 +1,13 @@
package com.ruoyi.cms.domain.vo;
import lombok.Data;
@Data
public class ServerVo {
/** 项目名称 */
private String name;
/** 版本 */
private String version;
}

View File

@ -0,0 +1,23 @@
package com.ruoyi.cms.domain.vo;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 统计类
*/
@Data
public class SiteStatVo extends BaseEntity {
/** 栏目数量 */
private Long categoryCount;
/** 文章数量 */
private Long contentCount;
/** 大赛数量 */
private Long competitionCount;
/** 参赛人员数量 */
private Long studentCount;
}

View File

@ -0,0 +1,12 @@
package com.ruoyi.cms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.cms.domain.vo.SiteStatVo;
/**
* 统计系统
*/
public interface IndexInfoService {
public SiteStatVo getSiteStat();
}

View File

@ -0,0 +1,42 @@
package com.ruoyi.cms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.cms.domain.CmsCategory;
import com.ruoyi.cms.domain.CmsContent;
import com.ruoyi.cms.domain.HitCompetition;
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
import com.ruoyi.cms.domain.vo.SiteStatVo;
import com.ruoyi.cms.mapper.CmsCategoryMapper;
import com.ruoyi.cms.mapper.CmsContentMapper;
import com.ruoyi.cms.mapper.HitCompetitionMapper;
import com.ruoyi.cms.mapper.HitRegistrationStudentInfoMapper;
import com.ruoyi.cms.service.IndexInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class IndexInfoServiceImpl implements IndexInfoService {
@Autowired
private CmsContentMapper contentMapper;
@Autowired
private CmsCategoryMapper categoryMapper;
@Autowired
private HitCompetitionMapper competitionMapper;
@Autowired
private HitRegistrationStudentInfoMapper studentInfoMapper;
@Override
public SiteStatVo getSiteStat() {
SiteStatVo siteStatVo = new SiteStatVo();
siteStatVo.setCategoryCount(categoryMapper.selectCount(new QueryWrapper<CmsCategory>().eq("is_disable", 0)));
siteStatVo.setContentCount(contentMapper.selectCount(new QueryWrapper<CmsContent>().eq("del_flag", 0)));
siteStatVo.setCompetitionCount(competitionMapper.selectCount(new QueryWrapper<HitCompetition>()));
siteStatVo.setStudentCount(studentInfoMapper.selectCount(new QueryWrapper<HitRegistrationStudentInfo>()));
return siteStatVo;
}
}

View File

@ -1,9 +1,9 @@
# 项目相关配置 # 项目相关配置
ruoyi: ruoyi:
# 名称 # 名称
name: RuoYi name: 后台管理系统
# 版本 # 版本
version: 3.8.8 version: 1.2.1
# 版权年份 # 版权年份
copyrightYear: 2024 copyrightYear: 2024
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath

View File

@ -1,9 +1,9 @@
# 项目相关配置 # 项目相关配置
ruoyi: ruoyi:
# 名称 # 名称
name: RuoYi name: 后台管理系统
# 版本 # 版本
version: 3.8.8 version: 1.2.1
# 版权年份 # 版权年份
copyrightYear: 2024 copyrightYear: 2024
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath

View File

@ -21,19 +21,47 @@
<result property="publishDate" column="publish_date"/> <result property="publishDate" column="publish_date"/>
<result property="offlineDate" column="offline_date"/> <result property="offlineDate" column="offline_date"/>
<result property="isAccessory" column="is_accessory"/> <result property="isAccessory" column="is_accessory"/>
<result property="accessoryUrl" column="accessory_url" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler" /> <result property="accessoryUrl" column="accessory_url" javaType="java.util.List"
typeHandler="com.ruoyi.system.handler.MysqlTypeHandler"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
<result property="imageUrl" column="image_url" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler"/> <result property="imageUrl" column="image_url" javaType="java.util.List"
<result property="videoUrl" column="video_url" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler"/> typeHandler="com.ruoyi.system.handler.MysqlTypeHandler"/>
<result property="videoUrl" column="video_url" javaType="java.util.List"
typeHandler="com.ruoyi.system.handler.MysqlTypeHandler"/>
</resultMap> </resultMap>
<sql id="selectCmsContentVo"> <sql id="selectCmsContentVo">
select id, category_id, content_type,image_url, video_url, content_title, content_img, content_detail, source, source_url, original, author, editor, summary, status, publish_date, offline_date, is_accessory, accessory_url, remark, del_flag, create_time, create_by, update_time, update_by from cms_content select id,
category_id,
content_type,
image_url,
video_url,
content_title,
content_img,
content_detail,
source,
source_url,
original,
author,
editor,
summary,
status,
publish_date,
offline_date,
is_accessory,
accessory_url,
remark,
del_flag,
create_time,
create_by,
update_time,
update_by
from cms_content
</sql> </sql>
<select id="selectCmsContentList" parameterType="CmsContent" resultMap="CmsContentResult"> <select id="selectCmsContentList" parameterType="CmsContent" resultMap="CmsContentResult">
@ -41,7 +69,9 @@
<where> <where>
<if test="categoryId != null ">and category_id = #{categoryId}</if> <if test="categoryId != null ">and category_id = #{categoryId}</if>
<if test="contentType != null ">and content_type = #{contentType}</if> <if test="contentType != null ">and content_type = #{contentType}</if>
<if test="contentTitle != null and contentTitle != ''"> and content_title like concat('%', #{contentTitle}, '%')</if> <if test="contentTitle != null and contentTitle != ''">and content_title like concat('%', #{contentTitle},
'%')
</if>
<if test="contentImg != null and contentImg != ''">and content_img = #{contentImg}</if> <if test="contentImg != null and contentImg != ''">and content_img = #{contentImg}</if>
<if test="contentDetail != null and contentDetail != ''">and content_detail = #{contentDetail}</if> <if test="contentDetail != null and contentDetail != ''">and content_detail = #{contentDetail}</if>
<if test="source != null and source != ''">and source = #{source}</if> <if test="source != null and source != ''">and source = #{source}</if>
@ -111,51 +141,59 @@
<if test="publishDate != null">#{publishDate},</if> <if test="publishDate != null">#{publishDate},</if>
<if test="offlineDate != null">#{offlineDate},</if> <if test="offlineDate != null">#{offlineDate},</if>
<if test="isAccessory != null and isAccessory != ''">#{isAccessory},</if> <if test="isAccessory != null and isAccessory != ''">#{isAccessory},</if>
<if test="accessoryUrl != null and accessoryUrl.size() != 0">#{accessoryUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if> <if test="accessoryUrl != null and accessoryUrl.size() != 0">
#{accessoryUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},
</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="delFlag != null">#{delFlag},</if> <if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="imageUrl != null and imageUrl.size() != 0">#{imageUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if> <if test="imageUrl != null and imageUrl.size() != 0">
<if test="videoUrl != null and videoUrl.size() != 0">#{videoUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if> #{imageUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},
</if>
<if test="videoUrl != null and videoUrl.size() != 0">
#{videoUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateCmsContent" parameterType="CmsContent"> <update id="updateCmsContent" parameterType="CmsContent">
update cms_content update cms_content
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="categoryId != null">category_id = #{categoryId},</if> category_id = #{categoryId},
<if test="contentType != null">content_type = #{contentType},</if> content_type = #{contentType},
<if test="contentTitle != null and contentTitle != ''">content_title = #{contentTitle},</if> content_title = #{contentTitle},
<if test="contentImg != null and contentImg != ''">content_img = #{contentImg},</if> content_img = #{contentImg},
<if test="contentDetail != null and contentDetail != '' ">content_detail = #{contentDetail},</if> content_detail = #{contentDetail},
<if test="source != null and source != ''">source = #{source},</if> source = #{source},
<if test="sourceUrl != null and sourceUrl != ''">source_url = #{sourceUrl},</if> source_url = #{sourceUrl},
<if test="original != null and original != ''">original = #{original},</if> original = #{original},
<if test="author != null and author != ''">author = #{author},</if> author = #{author},
<if test="editor != null and editor != ''">editor = #{editor},</if> editor = #{editor},
<if test="summary != null and summary != ''">summary = #{summary},</if> summary = #{summary},
<if test="status != null and status != ''">status = #{status},</if> status = #{status},
<if test="publishDate != null">publish_date = #{publishDate},</if> publish_date = #{publishDate},
<if test="offlineDate != null">offline_date = #{offlineDate},</if> offline_date = #{offlineDate},
<if test="isAccessory != null and isAccessory != ''">is_accessory = #{isAccessory},</if> is_accessory = #{isAccessory},
<if test="accessoryUrl != null and accessoryUrl.size() != 0">accessory_url = #{accessoryUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if> accessory_url = #{accessoryUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},
<if test="remark != null">remark = #{remark},</if> remark = #{remark},
<if test="delFlag != null">del_flag = #{delFlag},</if> del_flag = #{delFlag},
<if test="createTime != null">create_time = #{createTime},</if> create_time = #{createTime},
<if test="createBy != null">create_by = #{createBy},</if> create_by = #{createBy},
<if test="updateTime != null">update_time = #{updateTime},</if> update_time = #{updateTime},
<if test="updateBy != null">update_by = #{updateBy},</if> update_by = #{updateBy},
<if test="imageUrl != null and imageUrl.size() != 0">image_url = #{imageUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if> image_url = #{imageUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},
<if test="videoUrl != null and videoUrl.size() != 0">video_url = #{videoUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if> video_url = #{videoUrl,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteCmsContentById" parameterType="Long"> <delete id="deleteCmsContentById" parameterType="Long">
delete from cms_content where id = #{id} delete
from cms_content
where id = #{id}
</delete> </delete>
<delete id="deleteCmsContentByIds" parameterType="String"> <delete id="deleteCmsContentByIds" parameterType="String">

View File

@ -0,0 +1,16 @@
import request from "@/utils/request";
export function getSiteStatData() {
return request({
url: '/indexInfo',
method: 'get'
})
}
export function getCmsConfiguration() {
return request({
url: '/indexInfo/server',
method: 'get'
})
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM7 6H11V10H7V6ZM7 12H17V14H7V12ZM7 16H17V18H7V16ZM13 7H17V9H13V7Z"></path></svg>

After

Width:  |  Height:  |  Size: 287 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 2C10.5523 2 11 2.44772 11 3V7C11 7.55228 10.5523 8 10 8H8V10H13V9C13 8.44772 13.4477 8 14 8H20C20.5523 8 21 8.44772 21 9V13C21 13.5523 20.5523 14 20 14H14C13.4477 14 13 13.5523 13 13V12H8V18H13V17C13 16.4477 13.4477 16 14 16H20C20.5523 16 21 16.4477 21 17V21C21 21.5523 20.5523 22 20 22H14C13.4477 22 13 21.5523 13 21V20H7C6.44772 20 6 19.5523 6 19V8H4C3.44772 8 3 7.55228 3 7V3C3 2.44772 3.44772 2 4 2H10ZM19 18H15V20H19V18ZM19 10H15V12H19V10ZM9 4H5V6H9V4Z"></path></svg>

After

Width:  |  Height:  |  Size: 545 B

View File

@ -0,0 +1,216 @@
<template>
<div class="site-container mb10">
<el-card shadow="hover">
<div slot="header" class="clearfix">
<span>数据统计</span>
</div>
<div class="body">
<el-row :gutter="15" class="mt10">
<el-col :span="6">
<el-card shadow="hover" v-loading="siteStatLoading">
<el-row>
<el-col :span="8">
<svg-icon icon-class="treelog" class-name="cc-card-panel-icon" />
</el-col>
<el-col :span="16">
<el-statistic title="栏目数">
<template slot="formatter"> {{ siteStat.categoryCount }} </template>
</el-statistic>
</el-col>
</el-row>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" v-loading="siteStatLoading">
<el-row>
<el-col :span="8">
<svg-icon icon-class="content" class-name="cc-card-panel-icon" />
</el-col>
<el-col :span="16">
<el-statistic title="内容数">
<template slot="formatter"> {{ siteStat.contentCount }} </template>
</el-statistic>
</el-col>
</el-row>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" v-loading="siteStatLoading">
<el-row>
<el-col :span="8">
<svg-icon icon-class="druid" class-name="cc-card-panel-icon" />
</el-col>
<el-col :span="16">
<el-statistic title="大赛数">
<template slot="formatter"> {{ siteStat.competitionCount }} </template>
</el-statistic>
</el-col>
</el-row>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" v-loading="siteStatLoading">
<el-row>
<el-col :span="8">
<svg-icon icon-class="form" class-name="cc-card-panel-icon" />
</el-col>
<el-col :span="16">
<el-statistic title="参赛人数">
<template slot="formatter"> {{ siteStat.studentCount }} </template>
</el-statistic>
</el-col>
</el-row>
</el-card>
</el-col>
</el-row>
</div>
</el-card>
</div>
</template>
<style scoped>
</style>
<script>
import { getSiteStatData } from "@/api/cms/indexInfo";
export default {
name: "CMSSiteStatOverview",
data () {
return {
loading: false,
siteStatLoading: false,
siteStat: {
categoryCount: 0,
contentCount: 0,
competitionCount: 0,
studentCount: 0,
}
};
},
created() {
this.loadSiteStatData();
},
methods: {
loadSiteStatData() {
this.siteStatLoading = true;
getSiteStatData().then(response => {
this.siteStatLoading = false
this.siteStat = response.data
})
}
}
};
</script>
<style lang="scss" scoped>
.cc-card-panel-icon {
font-size: 48px;
color: #40c9c6
}
.panel-group {
margin-top: 18px;
.card-panel-col {
margin-bottom: 32px;
}
.card-panel {
height: 108px;
cursor: pointer;
font-size: 12px;
position: relative;
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05);
&:hover {
.card-panel-icon-wrapper {
color: #fff;
}
.icon-people {
background: #40c9c6;
}
.icon-message {
background: #36a3f7;
}
.icon-money {
background: #f4516c;
}
.icon-shopping {
background: #34bfa3
}
}
.icon-people {
color: #40c9c6;
}
.icon-message {
color: #36a3f7;
}
.icon-money {
color: #f4516c;
}
.icon-shopping {
color: #34bfa3
}
.card-panel-icon-wrapper {
float: left;
margin: 14px 0 0 14px;
padding: 16px;
transition: all 0.38s ease-out;
border-radius: 6px;
}
.card-panel-icon {
float: left;
font-size: 48px;
}
.card-panel-description {
float: right;
font-weight: bold;
margin: 26px;
margin-left: 0px;
.card-panel-text {
line-height: 18px;
color: rgba(0, 0, 0, 0.45);
font-size: 16px;
margin-bottom: 12px;
}
.card-panel-num {
font-size: 20px;
}
}
}
}
@media (max-width:550px) {
.card-panel-description {
display: none;
}
.card-panel-icon-wrapper {
float: none !important;
width: 100%;
height: 100%;
margin: 0 !important;
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important;
}
}
}
</style>

View File

@ -1,68 +1,44 @@
<!--<template>--> <template>
<!-- <div class="dashboard-container">--> <div class="dashboard-container">
<!-- <el-card shadow="hover" class="mb10">--> <el-card shadow="hover" class="mb10">
<!-- <div slot="header" class="clearfix">--> <div slot="header" class="clearfix">
<!-- <span>应用信息</span>--> <span>应用信息</span>
<!-- </div>--> </div>
<!--&lt;!&ndash; <div class="el-table el-table&#45;&#45;enable-row-hover el-table&#45;&#45;medium">&ndash;&gt;--> <div class="el-table el-table--enable-row-hover el-table--medium">
<!--&lt;!&ndash; <table cellspacing="0" style="width: 100%;">&ndash;&gt;--> <table cellspacing="0" style="width: 100%;">
<!--&lt;!&ndash; <tbody>&ndash;&gt;--> <tbody>
<!--&lt;!&ndash; <tr>&ndash;&gt;--> <tr>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell attrname">{{ $t('Monitor.Server.AppName') }}</div></td>&ndash;&gt;--> <td class="el-table__cell is-leaf"><div class="cell attrname">应用名称</div></td>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell">{{ serverInfo.app.name }} [ {{ serverInfo.app.alias }} ] </div></td>&ndash;&gt;--> <td class="el-table__cell is-leaf"><div class="cell">{{config.name}}</div></td>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell attrname">{{ $t('Monitor.Server.AppVersion') }}</div></td>&ndash;&gt;--> <td class="el-table__cell is-leaf"><div class="cell attrname">应用版本号</div></td>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell">{{ serverInfo.app.version }}</div></td>&ndash;&gt;--> <td class="el-table__cell is-leaf"><div class="cell">{{ config.version }}</div></td>
<!--&lt;!&ndash; </tr>&ndash;&gt;--> </tr>
<!--&lt;!&ndash; <tr>&ndash;&gt;--> </tbody>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell attrname">{{ $t('Monitor.Server.JVMStartTime') }}</div></td>&ndash;&gt;--> </table>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell">{{ serverInfo.startTime }}</div></td>&ndash;&gt;--> </div>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell attrname">{{ $t('Monitor.Server.JVMRunTime') }}</div></td>&ndash;&gt;--> </el-card>
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell">{{ serverInfo.runTime }}</div></td>&ndash;&gt;-->
<!--&lt;!&ndash; </tr>&ndash;&gt;-->
<!--&lt;!&ndash; <tr>&ndash;&gt;-->
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell attrname">{{ $t('CMS.Dashboard.PublishStrategy') }}</div></td>&ndash;&gt;-->
<!--&lt;!&ndash; <td class="el-table__cell is-leaf" colspan="3"><div class="cell">{{ config.publishStrategy }}</div></td>&ndash;&gt;-->
<!--&lt;!&ndash; </tr>&ndash;&gt;-->
<!--&lt;!&ndash; <tr>&ndash;&gt;-->
<!--&lt;!&ndash; <td class="el-table__cell is-leaf"><div class="cell attrname">{{ $t('CMS.Dashboard.ResourceRoot') }}</div></td>&ndash;&gt;-->
<!--&lt;!&ndash; <td class="el-table__cell is-leaf" colspan="3"><div class="cell">{{ config.resourceRoot }}</div></td>&ndash;&gt;-->
<!--&lt;!&ndash; </tr>&ndash;&gt;-->
<!--&lt;!&ndash; </tbody>&ndash;&gt;-->
<!--&lt;!&ndash; </table>&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!-- </el-card>-->
<!-- </div>--> </div>
<!--</template>--> </template>
<!--<script>--> <script>
<!--import { getDashboardServerInfo } from "@/api/monitor/server";--> import {getCmsConfiguration} from '@/api/cms/indexInfo'
<!--import { getCmsConfiguration } from "@/api/contentcore/dashboard";-->
<!--export default {--> export default {
<!-- name: "ServerInfoDashboard",--> name: "ServerInfoDashboard",
<!-- data () {--> data () {
<!-- return {--> return {
<!-- serverInfo: {--> config:{}
<!-- app: {}--> };
<!-- },--> },
<!-- config:{}--> created() {
<!-- };--> this.loadServerInfo();
<!-- },--> },
<!-- created() {--> methods: {
<!-- this.loadServerInfo();--> loadServerInfo() {
<!-- this.loadCmsConfiguration();--> getCmsConfiguration().then(response => {
<!-- },--> this.config = response.data;
<!-- methods: {--> })
<!-- loadServerInfo() {--> },
<!-- getDashboardServerInfo().then(response => {--> }
<!-- this.serverInfo = response.data;--> };
<!-- })--> </script>
<!-- },-->
<!-- loadCmsConfiguration() {-->
<!-- getCmsConfiguration().then(response => {-->
<!-- this.config = response.data;-->
<!-- })-->
<!-- }-->
<!-- }-->
<!--};-->
<!--</script>-->

View File

@ -4,9 +4,15 @@
<el-col :span="24"> <el-col :span="24">
<user-info></user-info> <user-info></user-info>
</el-col> </el-col>
<el-col :span="24">
<cms-info></cms-info>
</el-col>
<el-col :span="24"> <el-col :span="24">
<shortcut></shortcut> <shortcut></shortcut>
</el-col> </el-col>
<el-col :span="24">
<server-info></server-info>
</el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
@ -14,12 +20,16 @@
<script> <script>
import SysUserInfo from '@/views/dashboard/userInfo' import SysUserInfo from '@/views/dashboard/userInfo'
import SysShortcut from '@/views/dashboard/shortcut' import SysShortcut from '@/views/dashboard/shortcut'
import CmsInfo from '@/views/dashboard/cmsInfo'
import ServerInfo from '@/views/dashboard/serverInfo'
export default { export default {
name: 'Index', name: 'Index',
components: { components: {
'user-info': SysUserInfo, 'user-info': SysUserInfo,
'shortcut': SysShortcut, 'shortcut': SysShortcut,
'cms-info': CmsInfo,
'server-info': ServerInfo
}, },
} }
</script> </script>