This commit is contained in:
xiaofajia 2024-10-23 21:20:38 +08:00
commit c941368473
8 changed files with 223 additions and 409 deletions

View File

@ -46,7 +46,7 @@ export function getServicePackagePage(query) {
// 获取服务套餐精简信息列表
export function getServicePackageList() {
return request({
url: '/system/service-package/get-simple-list',
url: '/system/service-package/getPackageListByTenantId',
method: 'get'
})
}

View File

@ -39,7 +39,7 @@ export default {
if (isExternal(real_src)) {
return real_src;
}
console.log(process.env.VUE_APP_IMAGE_URL + real_src,42)
return process.env.VUE_APP_IMAGE_URL + real_src;
},
realSrcList() {

View File

@ -106,7 +106,7 @@ export default {
async logout() {
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/index');
window.location.href = "http://159.75.168.143:82/yudao-admin/login";
})
}).catch(() => {});
}

View File

@ -228,6 +228,7 @@ export function getBasePath() {
export function getPath(path) {
// 基础路径,必须以 / 结尾
let basePath = getBasePath();
console.log(basePath,"basePath")
if (!basePath.endsWith('/')) {
return basePath + '/';
}

View File

@ -247,7 +247,10 @@ export default {
//
formRules: {
cusName: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
{ required: true, message: '请输入客户名称', trigger: 'blur' },
],
sex:[
{ required: true, message: '请选择客户性别', trigger: 'blur' },
],
typeCode: [
{ required: true, message: '请选择客户类型', trigger: 'change' },
@ -261,9 +264,6 @@ export default {
inviterType: [
{ required: true, message: '请选择注册方式', trigger: 'change' },
],
memberLevelId:[
{ required: true, message: '请选择会员', trigger: 'change' },
],
},
//
sexDictDatas: getDictDatas(DICT_TYPE.DICT_SYS_USER_SEX),

View File

@ -1,31 +1,81 @@
<template>
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" />
<div>
<el-row>
<el-col v-for="item in serviceList" :span="4">
<image-preview :width="300" :height="300" :src="item.coverImg"></image-preview>
{{ item.name }}
</el-col>
</el-row>
<div style="margin-top: 30px">
<el-row :gutter="20">
<el-col :span="12">
<div>
<div style="font-size: 30px;margin-bottom: 30px">资产临期提醒</div>
<el-table
:data="warnList"
stripe
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
<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>
</div>
</template>
@ -35,6 +85,8 @@ import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
import {getServicePackageList} from "@/api/system/servicePackage";
import {getMyNotifyMessagePage, getUnreadNotifyMessageList} from "@/api/system/notify/message";
const lineChartData = {
newVisitis: {
@ -66,12 +118,42 @@ export default {
},
data() {
return {
lineChartData: lineChartData.newVisitis
lineChartData: lineChartData.newVisitis,
serviceList: [],
warnList: [],
messageList: [],
queryParams: {
pageNo: 1,
pageSize: 10
},
messageQueryParams: {
pageNo: 1,
pageSize: 10
},
messageTotal: 0
}
},
created() {
this.getServiceList()
this.getNotifyMessage()
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
},
getNotifyMessage() {
//
getMyNotifyMessagePage(this.messageQueryParams).then(response => {
this.messageList = response.data.list;
this.messageTotal = response.data.total;
});
},
getServiceList() {
getServicePackageList(this.queryParams).then(response => {
this.serviceList = response.data;
});
}
}
}
@ -90,7 +172,7 @@ export default {
}
}
@media (max-width:1024px) {
@media (max-width: 1024px) {
.chart-wrapper {
padding: 8px;
}

View File

@ -1,14 +1,14 @@
<template>
<div class="cont">
<div class="top_">
<div>车辆维修数据分析</div>
</div>
<!-- -->
<div class="top_">
<div>车辆维修数据分析</div>
</div>
<!-- -->
<div class="content_">
<div class="c_left">
<div class="six_box">
<div class="s_title">
客户来源分析
客户来源
</div>
<div class="echaets_box">
<div id="khly" style="width: 400px; height: 267px;"></div>
@ -16,71 +16,36 @@
</div>
<div class="six_box">
<div class="s_title">
月工单数量走势
</div>
<div class="echaets_box">
<div id="gdslzs" style="width: 400px; height: 267px;"></div>
月工单数据来源
</div>
<div class="echaets_box"></div>
</div>
<div class="six_box">
<div class="s_title">
支付渠道统计
</div>
<div class="echaets_box">
<div id="zfqdtj" style="width: 400px; height: 267px;"></div>
</div>
<div class="echaets_box"></div>
</div>
</div>
<div class="c_cont">
<div class="tab_">
<div @click="countOrAmount()" class="tab_buttom tab_acvit">数量</div>
<div @click="countOrAmount()" class="tab_buttom">金额</div>
<div class="tab_buttom tab_acvit" >数量</div>
<div class="tab_buttom">金额</div>
</div>
<div v-if="isCount" class="tab_bt">
<div class="tab_bt">
<div class="yb_">
<div class="yb_title">工单总数</div>
<div class="numlist">
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
<!-- {{index}}-->
<!-- </div>-->
<div class="num_box">
{{ statistics.totalCount }}
</div>
<div class="num_box" v-for="(item,index) in 6" :key="index">
{{index}}
</div>
</div>
</div>
<div class="yb_">
<div class="yb_title">今日工单</div>
<div class="numlist">
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
<!-- {{index}}-->
<!-- </div>-->
<div class="num_box">
{{ statistics.todayCount }}
</div>
</div>
</div>
</div>
<div v-else class="tab_bt">
<div class="yb_">
<div class="yb_title">工单总金额</div>
<div class="numlist">
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
<!-- {{index}}-->
<!-- </div>-->
<div class="num_box">
{{ statistics.totalAmount }}
</div>
</div>
</div>
<div class="yb_">
<div class="yb_title">今日工单金额</div>
<div class="numlist">
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
<!-- {{index}}-->
<!-- </div>-->
<div class="num_box">
{{ statistics.todayAmount }}
<div class="num_box" v-for="(item,index) in 6" :key="index">
{{index}}
</div>
</div>
</div>
@ -91,8 +56,8 @@
<img src="./imgs/1.png" style="width: 60px;height: 60px">
</div>
<div>
<div class="f_size">{{ statusTickets[3].name }}</div>
<div class="f_num">{{ statusTickets[3].value }}</div>
<div class="f_size">未派工</div>
<div class="f_num">2082</div>
</div>
</div>
<div class="f_box">
@ -100,8 +65,8 @@
<img src="./imgs/2.png" style="width: 60px;height: 60px">
</div>
<div>
<div class="f_size">{{ statusTickets[4].name }}</div>
<div class="f_num">{{ statusTickets[4].value }}</div>
<div class="f_size">施工中</div>
<div class="f_num">2082</div>
</div>
</div>
<div class="f_box">
@ -109,8 +74,8 @@
<img src="./imgs/3.png" style="width: 60px;height: 60px">
</div>
<div>
<div class="f_size">{{ statusTickets[0].name }}</div>
<div class="f_num">{{ statusTickets[0].value }}</div>
<div class="f_size">未结账</div>
<div class="f_num">2082</div>
</div>
</div>
<div class="f_box">
@ -118,8 +83,8 @@
<img src="./imgs/4.png" style="width: 60px;height: 60px">
</div>
<div>
<div class="f_size">{{ statusTickets[1].name }}</div>
<div class="f_num">{{ statusTickets[1].value }}</div>
<div class="f_size">已结账</div>
<div class="f_num">2082</div>
</div>
</div>
<div class="f_box">
@ -127,13 +92,13 @@
<img src="./imgs/5.png" style="width: 60px;height: 60px">
</div>
<div>
<div class="f_size">{{ statusTickets[5].name }}</div>
<div class="f_num">{{ statusTickets[5].value }}</div>
<div class="f_size">挂账</div>
<div class="f_num">2082</div>
</div>
</div>
</div>
<div class="co_title">
今日工单
最新工单
</div>
<div class="list_long">
<div class="long_title">
@ -143,13 +108,14 @@
<div class="l_four">创建时间</div>
</div>
<div class="ot_vox">
<div class="long_box" v-for="(item,index) in todayTickets" :key="index">
<div class="l_one">{{ item.ticketNo }}</div>
<div class="l_two">{{ item.userName }}</div>
<div class="l_three">{{ item.adviserName }}</div>
<div class="l_four">{{ parseTime(item.createTime) }}</div>
<div class="long_box" v-for="(item,index) in 16" :key="index">
<div class="l_one">1209840149750105501</div>
<div class="l_two">张三</div>
<div class="l_three">李向东</div>
<div class="l_four">2024-10-20 12:00</div>
</div>
</div>
</div>
</div>
<div class="c_right">
@ -157,36 +123,19 @@
<div class="s_title">
维修类型统计
</div>
<div class="echaets_box">
<div id="wxlxtj" style="width: 400px; height: 267px;"></div>
</div>
<div class="echaets_box"></div>
</div>
<div class="six_box">
<div class="s_title">
月工单金额走势
</div>
<div class="echaets_box">
<div id="gdjezs" style="width: 400px; height: 267px;"></div>
</div>
<div class="echaets_box"></div>
</div>
<div class="six_box">
<div class="s_title">
维修工人排行
</div>
<div class="echaets_box">
<div class="list_long">
<div class="long_title">
<div class="l_one">姓名</div>
<div class="l_two">服务工单数</div>
</div>
<div class="ot_vox">
<div class="long_box" v-for="(item,index) in workers" :key="index">
<div class="l_one">{{ item.name }}</div>
<div class="l_two">{{ item.value }}</div>
</div>
</div>
</div>
</div>
<div class="echaets_box"></div>
</div>
</div>
</div>
@ -196,267 +145,70 @@
<script>
import * as echarts from 'echarts';
import * as RepairBigScreenApi from '@/views/repair/screen/api/repairBigScreen';
export default {
name: 'Index',
components: {},
components: {
},
data() {
return {
//
statistics: {},
//
statusTickets: [],
//
isCount: true,
//
todayTickets: [],
//
workers: []
}
},
created() {
//
this.ticketStatistics()
//
this.ticketStatusCount()
//
this.listTicketToday()
//
this.listWorks()
},
mounted() {
//
this.customerSource();
//
this.ticketMainCount()
//
this.ticketMainAmount()
//
this.ticketMainPayWay()
//
this.repairTypeStatistics()
this.echaerCar();
},
methods: {
countOrAmount() {
this.isCount = !this.isCount
},
echaerCar(){
var chartDom = document.getElementById('khly');
var myChart = echarts.init(chartDom);
var option;
option = {
// legend: {
// top: 'bottom'
// },
toolbox: {
show: true,
/**
* 客户来源分析饼图
*/
async customerSource() {
const res = await RepairBigScreenApi.customerSource();
var chartDom = document.getElementById('khly');
var myChart = echarts.init(chartDom);
var option;
option = {
toolbox: {
show: true,
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
series: [
{
name: '客户来源分析',
type: 'pie',
radius: [20, 100],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: {
borderRadius: 2
},
data: res.data,
}
]
};
option && myChart.setOption(option);
},
/**
* 月工单数量走势
*/
async ticketMainCount() {
const res = await RepairBigScreenApi.ticketMainCount();
var chartDom = document.getElementById('gdslzs');
var myChart = echarts.init(chartDom, 'dark');
var option;
option = {
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: res.data.xData
},
yAxis: {
type: 'value'
},
series: [
{
data: res.data.data,
type: 'line',
smooth: true
}
]
};
option && myChart.setOption(option);
},
/**
* 月工单金额走势
*/
async ticketMainAmount() {
const res = await RepairBigScreenApi.ticketMainAmount();
var chartDom = document.getElementById('gdjezs');
var myChart = echarts.init(chartDom, 'dark');
var option;
option = {
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: res.data.xData
},
yAxis: {
type: 'value'
},
series: [
{
data: res.data.data,
type: 'line',
smooth: true
}
]
};
option && myChart.setOption(option);
},
/**
* 支付渠道统计
*/
async ticketMainPayWay() {
const res = await RepairBigScreenApi.ticketMainPayWay();
var chartDom = document.getElementById('zfqdtj');
var myChart = echarts.init(chartDom, 'dark');
var option;
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'category',
data: res.data.xData
},
yAxis: {
type: 'value'
},
series: [
{
data: res.data.data,
type: 'bar'
}
]
};
option && myChart.setOption(option);
},
/**
* 维修类型相关统计分析饼图
*/
async repairTypeStatistics() {
const res = await RepairBigScreenApi.repairTypeStatistics();
var chartDom = document.getElementById('wxlxtj');
var myChart = echarts.init(chartDom, 'dark');
var option;
option = {
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [
{
name: '维修类型统计',
name: 'Nightingale Chart',
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
padAngle: 5,
radius: [20, 100],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: {
borderRadius: 10
borderRadius: 2
},
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: res.data
data: [
{ value: 40, name: '救援' },
{ value: 38, name: '线下' },
{ value: 32, name: '小程序预约' },
]
}
]
};
option && myChart.setOption(option);
},
/**
* 单总数今日工单工单总金额今日工单金额
*/
async ticketStatistics() {
const res = await RepairBigScreenApi.ticketStatistics();
this.statistics = res.data
},
/**
* 工单状态数量统计
*/
async ticketStatusCount() {
const res = await RepairBigScreenApi.ticketStatusCount();
this.statusTickets = res.data
},
/**
* 今日工单
*/
async listTicketToday() {
const res = await RepairBigScreenApi.listTicketToday();
this.todayTickets = res.data
},
/**
* 维修工人排行
*/
async listWorks() {
const res = await RepairBigScreenApi.listWorks();
this.workers = res.data
}
}
}
</script>
<style lang="scss" scoped>
.cont {
.cont{
background: #020F32;
//background: url("./imgs/back.png") no-repeat;
background-size: 100% 100%;
width: 100%;
height: 100vh;
}
.top_ {
.top_{
width: 100%;
height: 86px;
background: url("./imgs/top.png") no-repeat;
@ -469,23 +221,19 @@ export default {
font-weight: bold;
margin-bottom: 15px;
}
.content_ {
.content_{
width: 100%;
display: flex;
//align-items: center;
justify-content: space-between;
}
.c_left {
.c_left{
width: 25%;
}
.c_cont {
.c_cont{
width: 50%;
}
.tab_ {
.tab_{
display: flex;
align-items: center;
justify-content: center;
@ -494,15 +242,13 @@ export default {
color: #FFFFFF;
margin: 15px auto;
}
.yb_title {
.yb_title{
text-align: center;
font-size: 18px;
color: #FFFFFF;
margin: 15px auto;
}
.tab_bt {
.tab_bt{
display: flex;
align-items: center;
justify-content: center;
@ -511,8 +257,7 @@ export default {
box-sizing: border-box;
padding-bottom: 20px;
}
.tab_buttom {
.tab_buttom{
width: 120px;
height: 32px;
@ -521,21 +266,18 @@ export default {
align-items: center;
justify-content: center;
}
yb_title {
yb_title{
font-size: 16px;
color: #FFFFFF;
text-align: center;
width: 100%;
}
.numlist {
.numlist{
display: flex;
align-items: center;
justify-content: center;
}
.num_box {
.num_box{
width: 38px;
height: 50px;
border-radius: 0px 0px 0px 0px;
@ -546,48 +288,40 @@ yb_title {
justify-content: center;
background: url("./imgs/numbcak.png") no-repeat;
background-size: 100% 100%;
color: #FFFFFF;
color: #FFFFFF;
margin: 0px 10px;
}
.yb_ {
.yb_{
width: 50%;
}
.tab_acvit {
.tab_acvit{
background: #0174F6 !important;
}
.five_box {
.five_box{
display: flex;
align-items: center;
justify-content: space-around;
margin: 30px auto;
}
.f_size {
.f_size{
font-size: 14px;
color: #FFFFFF;
}
.f_num {
.f_num{
font-weight: bold;
font-size: 24px;
color: #FFFFFF;
}
.img_left {
.img_left{
width: 60px;
height: 60px;
margin-right: 10px;
}
.f_box {
.f_box{
display: flex;
align-items: center;
}
.co_title {
.co_title{
width: 100%;
height: 32px;
background: url("./imgs/c_title.png") no-repeat;
@ -598,8 +332,7 @@ yb_title {
box-sizing: border-box;
padding-left: 40px;
}
.s_title {
.s_title{
width: 90%;
height: 32px;
background: url("./imgs/title.png") no-repeat;
@ -611,60 +344,53 @@ yb_title {
padding-left: 40px;
margin: 0px auto;
}
.echaets_box {
.echaets_box{
width: 90%;
height: 267px;
margin: 0px auto;
border-bottom: 1px solid #0174F6;
}
.list_long {
.list_long{
width: 100%;
height: 563px;
}
.l_one {
.l_one{
width: 30%;
text-align: left;
font-size: 18px;
color: rgba(255, 255, 255, 0.7);
color: rgba(255,255,255,0.7);
overflow: hidden;
box-sizing: border-box;
padding-left: 35px;
}
.l_two {
.l_two{
width: 20%;
text-align: center;
font-size: 18px;
color: rgba(255, 255, 255, 0.7);
color: rgba(255,255,255,0.7);
overflow: hidden;
}
.l_three {
.l_three{
width: 20%;
text-align: center;
font-size: 18px;
color: rgba(255, 255, 255, 0.7);
color: rgba(255,255,255,0.7);
overflow: hidden;
}
.l_four {
.l_four{
width: 30%;
text-align: right;
font-size: 18px;
color: rgba(255, 255, 255, 0.7);
color: rgba(255,255,255,0.7);
overflow: hidden;
box-sizing: border-box;
padding-right: 35px;
}
.long_title {
.long_title{
width: 100%;
height: 58px;
background: rgba(1, 116, 246, 0.1);
background: rgba(1,116,246,0.1);
background: url("./imgs/c_list.png") no-repeat;
background-size: 100% 100%;
display: flex;
@ -672,29 +398,25 @@ yb_title {
justify-content: space-between;
margin: 10px auto;
}
.ot_vox {
.ot_vox{
width: 100%;
height: 500px;
overflow: auto;
scrollbar-width: none;
}
.long_box {
.long_box{
width: 100%;
height: 58px;
background: rgba(1, 116, 246, 0.1);
background: rgba(1,116,246,0.1);
display: flex;
align-items: center;
justify-content: space-between;
margin: 10px auto;
}
.six_box {
.six_box{
margin-bottom: 15px;
}
.c_right {
.c_right{
width: 25%;
}

View File

@ -39,6 +39,11 @@
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="icon" align="center" prop="coverImg" width="100">
<template v-slot="scope">
<image-preview :src="scope.row.coverImg"></image-preview>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
@ -67,6 +72,10 @@
<el-form-item label="服务套餐名" prop="name">
<el-input v-model="form.name" placeholder="请输入服务套餐名" />
</el-form-item>
<el-form-item label="icon" prop="coverImg">
<image-upload :limit="1" v-model="form.coverImg" />
</el-form-item>
<el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event)">展开/折叠</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event)">全选/全不选</el-checkbox>