【原创毕设】基于springboot+vue前后端分离的的乡村振兴微信小程序-02详细介绍,文章后半部分有 系统截图
、 功能详解
、 思维导图
、 视频演示
。
本系统采用前后端分离的开发模式,前端使用Vue.js框架进行开发,后端使用Spring Boot框架,数据库采用MySQL。系统实现了家政服务的在线预约、服务评价、人员管理、订单管理等功能,为用户提供了便捷的家政服务体验。
代码注释详细
(示例):
<template>
<div class="page_root" id="root_index">
<div class="warp">
<div class="container-fluid">
<el-row>
<!-- <el-col :span="4">-->
<!-- <mm_label bg_color="bg_blue" icon="el-icon-s-order" :url="url_order_count" unit="笔"-->
<!-- title="待处理订单"></mm_label>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <mm_label bg_color="bg_yellow" icon="el-icon-sold-out" :url="url_goods_count" unit="件"-->
<!-- title="出售商品"></mm_label>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <mm_label bg_color="bg_cyan" icon="el-icon-money" :url="url_order_day_price" unit="元"-->
<!-- title="日营业额"></mm_label>-->
<!-- </el-col>-->
<el-col :span="4">
<mm_label bg_color="bg_purple" icon="el-icon-user-solid" :url="url_user_count" unit="人"
title="用户数量"></mm_label>
</el-col>
</el-row>
<el-row>
<!--<el-col :span="8">
<div class="card chart">
<pieChart v-if="list_goods_count.length" :list="list_goods_count" :title="'商品分类统计图'"
:type="'数量(占比)'"></pieChart>
<div v-if="!list_goods_count.length">订单没有符合条件的数据</div>
</div>
</el-col>
<el-col :span="8">
<div class="card chart" >
<barChart v-if="list_goods_sum.length" :list="list_goods_sum" :title="'商品年销量统计图'">
</barChart>
<div v-if="!list_goods_sum.length">订单没有符合条件的数据</div>
</div>
</el-col>
<el-col :span="8">
<div class="card chart" >
<lineChart v-if="list_goods_price.length" :list="list_goods_price" :title="'商品销售额统计图'">
</lineChart>
<div v-if="!list_goods_price.length">订单没有符合条件的数据</div>
</div>
</el-col>-->
</el-row>
</div>
</div>
</div>
</template>
<script>
import mixin from "@/mixins/page.js";
import pieChart from "@/components/charts/pie_chart";
import barChart from "@/components/charts/bar_chart";
import newBarChart from "@/components/charts/new_bar_chart";
import lineChart from "@/components/charts/line_chart";
import newLineChart from "@/components/charts/new_line_chart";
import mm_label from "@/components/mm_label.vue";
export default {
mixins: [mixin],
name: "Home",
components: {
pieChart,
barChart,
newBarChart,
lineChart,
newLineChart,
mm_label
},
data() {
return {
isAdmin: false,
recognitionType: "",
activeName: "third",
/*list_goods_count: [],
list_goods_sum: [],
list_goods_price: [],*/
url_order_count: "~/api/order/count?state=2",
url_order_day_price: this.url_orderDayPrice(),
url_goods_count: "~/api/goods/count?",
url_user_count: "~/api/user/count?",
};
},
created() {
this.getUserInfo();
/*this.get_goods_count();
this.get_goods_sum_group();
this.get_goods_sum_price();*/
},
mounted() {},
methods: {
async get_nickname(list,flag){
if (flag) {
for (let i=0;i<list.length;i++){
await this.$get(
"~/api/user/get_obj?user_id="+list[i],
null,
(json) => {
if (json.result) {
list[i] = json.result.obj.nickname;
}
});
}
}else {
for (let i=0;i<list.length;i++){
await this.$get(
"~/api/user/get_obj?user_id="+list[i].name,
null,
(json) => {
if (json.result) {
list[i].name = json.result.obj.nickname;
}
});
}
}
},
// 获取商品数量分类统计图
/*get_goods_count() {
this.$get("~/api/goods/count_group?groupby=type", null, (json) => {
if (json.result) {
var list = json.result.list;
this.list_goods_count = list.map((o) => {
return {
name: o.type,
value: o.count,
};
});
}
});
},
// 获取销量七天报
get_goods_sum_group() {
for (var i = 6; i >= 0; i--) {
this.get_goods_sum_group_sub(this.list_goods_sum, i);
}
},
// 获取X天销量
async get_goods_sum_group_sub(list, day) {
var now = new Date();
var time = now.addDays(-day).toStr("yyyy-MM-dd");
await this.$get(
`~/api/order/sum_group?field=price&groupby=type&create_time_min= 00:00:00&create_time_max= 23:59:59`,
null,
(json) => {
if (json.result) {
json.result.list.map((o) => {
list.push({
time,
value: o.sum,
name: o.type,
})
});
}
});
},
// 获取销售七天报
get_goods_sum_price() {
for (var i = 6; i >= 0; i--) {
this.get_goods_sum_price_sub(this.list_goods_price, i);
}
},
// 获取X天销售
async get_goods_sum_price_sub(list, day) {
var now = new Date();
var time = now.addDays(-day).toStr("yyyy-MM-dd");
await this.$get(
`~/api/order/sum_group?field=price_count&groupby=type&create_time_min= 00:00:00&create_time_max= 23:59:59`,
null,
(json) => {
if (json.result) {
json.result.list.map((o) => {
list.push({
time,
value: o.sum,
name: o.type,
})
});
}
}
);
},*/
// 获取当天销售额
url_orderDayPrice() {
var date = new Date();
// 获取当前日期
var time = date.toStr("yyyy-MM-dd");
var create_time_min = time + " 00:00:00";
var create_time_max = time + " 23:59:59";
var ret = "~/api/order/sum?field=price_count&create_time_min=" + create_time_min + "&create_time_max=" +
create_time_max;
return ret;
},
getUserInfo(){
let userGroup = window.localStorage.getItem('user_group');
if(userGroup){
let _userGroup =JSON.parse(userGroup);
let _info = JSON.parse(_userGroup.value);
this.isAdmin = _info["user_group"] == "管理员" ? true : false;
}
}
},
computed:{
recognitionHeight(){
if(this.recognitionType === "face"){
return "1070px"
}else{
return "1180px"
}
},
recognitionUrl(){
if(this.recognitionType === "face"){
return "https://www.sk-ai.com/Experience/face-compare"
}else{
return "https://www.sk-ai.com/Experience/recognition?type="
}
}
}
};
</script>
<style scoped="scoped">
.chart {
display: block;
width: 100%;
height: 400px;
padding: 1rem;
position: relative;
}
.el-col {
padding: 0.5rem;
}
.card {
overflow: hidden;
}
.iframe_box ,.iframe_box_change{
width: 100%;
height: 1180px;
position: relative;
margin-top: 25px;
}
.iframe_box_change{
height: 580px;
padding-top: 50px;
}
.iframe_box .iframe_box_content, .iframe_box_change .iframe_box_content{
width: 100%;
height: 100%;
}
.iframe_box_top{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100px;
font-size: 25px;
line-height: 100px;
background: #fff;
z-index: 99999999;
padding-left: 50px;
}
</style>
前端架构:前端采用Vue.js框架,结合Element UI等UI组件库,实现页面的快速开发。通过Axios库与后端进行数据交互,实现数据的动态展示和更新。 后端架构:后端采用Spring Boot框架,利用其快速开发、易于集成的特点,实现业务逻辑的处理和数据的持久化。通过MyBatis或JPA等持久层框架与MySQL数据库进行交互,确保数据的准确性和安全性。
本系统采用MySQL数据库进行数据的存储和管理。数据库设计包括用户表、服务项目表、订单表、评价表、人员表等,通过合理的数据表设计和关联关系,实现数据的高效存储和查询。
在开发过程中,我们遵循了软件开发的最佳实践,进行了详细的需求分析、系统设计、编码实现和测试验证。通过单元测试、集成测试和系统测试,确保系统的稳定性和可靠性。
为了节省篇幅,放部分截图,可看系统视频演示
【原创毕设】基于springboot+vue的乡村振兴微信小程序