数据总览页面修改
This commit is contained in:
parent
8d356872a7
commit
85f970da9e
|
|
@ -0,0 +1,29 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 实时查询供应商评分-排名
|
||||
export function supplierScorePageApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/ims-supplier-score-rule/page',
|
||||
method: 'get',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -200,8 +200,8 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.panel-group {
|
||||
// margin-top: 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
|
||||
.card-panel-col {
|
||||
margin-bottom: 10px;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,16 @@
|
|||
<template>
|
||||
<div class="dashboard-editor-container">
|
||||
<h3 style="font-weight: 600;">数据总览</h3>
|
||||
<div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;padding: 0 10px;">
|
||||
<h3 style="font-weight: 600;">数据总览</h3>
|
||||
<div style="background: #fff;">
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick" type="card">
|
||||
<el-tab-pane label="本周" name="1"></el-tab-pane>
|
||||
<el-tab-pane label="本月" name="2"></el-tab-pane>
|
||||
<el-tab-pane label="累计" name="3"></el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<panel-group :topData="topAreaOptions"/>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
|
@ -66,6 +76,10 @@ import { getDataScreeningModelApi,
|
|||
getThisMonthSDishSalesRankingApi,
|
||||
getProportionOfOrderTypesApi
|
||||
} from "@/api/index";
|
||||
import {
|
||||
supplierScorePageApi
|
||||
} from "@/api/foodManage/index";
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
|
|
@ -125,6 +139,7 @@ export default {
|
|||
type1:1,
|
||||
type2:1,
|
||||
type3:1,
|
||||
activeName:'1',
|
||||
myCharts1:null,
|
||||
myCharts2:null,
|
||||
myCharts3:null,
|
||||
|
|
@ -157,16 +172,14 @@ export default {
|
|||
}, 500);
|
||||
}
|
||||
},
|
||||
handleTabClick(){
|
||||
console.log(this.activeName)
|
||||
},
|
||||
getTopData(){
|
||||
getDataScreeningModelApi({}).then((response) => {
|
||||
this.topAreaOptions = response.data.data;
|
||||
});
|
||||
},
|
||||
changType1(e){
|
||||
console.log(this.type1)
|
||||
this.InitEChartsOne()
|
||||
this.myCharts1.resize();
|
||||
},
|
||||
InitEChartsOne() {
|
||||
let chartData=[]
|
||||
// let weekDate=["周一","周二","周三","周四","周五","周六","周日"]
|
||||
|
|
@ -287,11 +300,6 @@ export default {
|
|||
this.myCharts1.setOption(option)
|
||||
});
|
||||
},
|
||||
changType2(e){
|
||||
console.log(this.type2)
|
||||
this.InitEChartsTwo()
|
||||
this.myCharts2.resize();
|
||||
},
|
||||
InitEChartsTwo() {
|
||||
let chartData=[]
|
||||
// let weekDate=["周一","周二","周三","周四","周五","周六","周日"]
|
||||
|
|
@ -412,6 +420,11 @@ export default {
|
|||
this.myCharts2.setOption(option)
|
||||
});
|
||||
},
|
||||
changType3(e){
|
||||
console.log(this.type3)
|
||||
this.InitEChartsThree()
|
||||
this.myCharts3.resize();
|
||||
},
|
||||
InitEChartsThree() {
|
||||
var getName = [];
|
||||
var getValue = [];
|
||||
|
|
@ -430,7 +443,7 @@ export default {
|
|||
var option = {
|
||||
backgroundColor: "#fff",
|
||||
grid: {
|
||||
left: "10%",
|
||||
left: "2%",
|
||||
right: "2%",
|
||||
bottom: "2%",
|
||||
top: "10%",
|
||||
|
|
@ -465,6 +478,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
@ -583,7 +597,7 @@ export default {
|
|||
zlevel: 1,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 30,
|
||||
barBorderRadius: 20,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
|
||||
{
|
||||
offset: 0,
|
||||
|
|
@ -596,19 +610,19 @@ export default {
|
|||
]),
|
||||
},
|
||||
},
|
||||
barWidth: 14,
|
||||
barWidth: 12,
|
||||
data: getValue,
|
||||
},
|
||||
{
|
||||
name: "背景",
|
||||
type: "bar",
|
||||
barWidth: 14,
|
||||
barWidth: 12,
|
||||
barGap: "-100%",
|
||||
data: getMax,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "rgba(224, 233, 255, 1)",
|
||||
barBorderRadius: 30,
|
||||
barBorderRadius: 20,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -622,11 +636,6 @@ export default {
|
|||
// });
|
||||
});
|
||||
},
|
||||
changType3(e){
|
||||
console.log(this.type3)
|
||||
this.InitEChartsFour()
|
||||
this.myCharts4.resize();
|
||||
},
|
||||
InitEChartsFour() {
|
||||
var chartData=[]
|
||||
getProportionOfOrderTypesApi({type:this.type3}).then((response) => {
|
||||
|
|
@ -737,7 +746,7 @@ export default {
|
|||
name: "标题",
|
||||
type: "pie",
|
||||
center: ["35%", "50%"],
|
||||
radius: ["65%", "90%"],
|
||||
radius: ["60%", "80%"],
|
||||
clockwise: false, //饼图的扇区是否是顺时针排布
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
|
|
@ -772,11 +781,11 @@ export default {
|
|||
var getName = [];
|
||||
var getValue = [];
|
||||
var chartData=[]
|
||||
getThisMonthSDishSalesRankingApi().then((response) => {
|
||||
chartData = response.data.slice(0, 10);
|
||||
supplierScorePageApi({"pageNum": 1,"pageSize": 10}).then((response) => {
|
||||
chartData = response.rows.slice(0, 10);
|
||||
chartData.forEach((item,index)=>{
|
||||
getName.push(item.name)
|
||||
getValue.push(item.num)
|
||||
getName.push(item.supplierName)
|
||||
getValue.push(item.totalScore)
|
||||
})
|
||||
var max = Math.max.apply(null, getValue);
|
||||
var getMax = [];
|
||||
|
|
@ -786,7 +795,7 @@ export default {
|
|||
var option = {
|
||||
backgroundColor: "#fff",
|
||||
grid: {
|
||||
left: "10%",
|
||||
left: "2%",
|
||||
right: "2%",
|
||||
bottom: "2%",
|
||||
top: "10%",
|
||||
|
|
@ -821,6 +830,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
@ -913,7 +923,7 @@ export default {
|
|||
{
|
||||
type: "category",
|
||||
inverse: true,
|
||||
offset: -20,
|
||||
offset: -10,
|
||||
axisTick: "none",
|
||||
axisLine: "none",
|
||||
show: true,
|
||||
|
|
@ -939,7 +949,7 @@ export default {
|
|||
zlevel: 1,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 30,
|
||||
barBorderRadius: 20,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
|
||||
{
|
||||
offset: 0,
|
||||
|
|
@ -952,19 +962,19 @@ export default {
|
|||
]),
|
||||
},
|
||||
},
|
||||
barWidth: 14,
|
||||
barWidth: 12,
|
||||
data: getValue,
|
||||
},
|
||||
{
|
||||
name: "背景",
|
||||
type: "bar",
|
||||
barWidth: 14,
|
||||
barWidth: 12,
|
||||
barGap: "-100%",
|
||||
data: getMax,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "rgba(224, 233, 255, 1)",
|
||||
barBorderRadius: 30,
|
||||
barBorderRadius: 20,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -1088,7 +1098,7 @@ export default {
|
|||
name: "标题",
|
||||
type: "pie",
|
||||
center: ["35%", "50%"],
|
||||
radius: ["65%", "90%"],
|
||||
radius: ["60%", "80%"],
|
||||
clockwise: false, //饼图的扇区是否是顺时针排布
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
|
|
@ -1124,6 +1134,10 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-tabs__header{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.dashboard-editor-container {
|
||||
padding: 15px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
|
@ -38,7 +37,6 @@
|
|||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -56,7 +54,7 @@
|
|||
<el-table-column label="订单数量分数" align="center" prop="orderNumScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="订单金额分数" align="center" prop="orderAmountScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="总分" align="center" prop="totalScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
@ -211,9 +209,7 @@ export default {
|
|||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [
|
||||
{supplierName:'111',areaName:'111'},{supplierName:'222',areaName:'222'},
|
||||
],
|
||||
tableListData: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
|
|
@ -418,7 +414,6 @@ export default {
|
|||
this.resetForm("form");
|
||||
},
|
||||
//item->评分项目(如:交货及时率) sub->评分区间(如 0%-10%)
|
||||
|
||||
handleAdd(item){
|
||||
let sub = item.sectionVOList[item.sectionVOList.length-1]
|
||||
if(!sub.rightValue||!sub.sectionScore){
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ export default {
|
|||
var option = {
|
||||
backgroundColor: "#fff",
|
||||
grid: {
|
||||
left: "10%",
|
||||
left: "5%",
|
||||
right: "2%",
|
||||
bottom: "2%",
|
||||
top: "10%",
|
||||
|
|
@ -446,6 +446,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
value = value.length > 8 ? value.slice(0, 8) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ export default {
|
|||
var option = {
|
||||
backgroundColor: "#fff",
|
||||
grid: {
|
||||
left: "10%",
|
||||
left: "5%",
|
||||
right: "2%",
|
||||
bottom: "2%",
|
||||
top: "10%",
|
||||
|
|
@ -607,6 +607,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
// value = value.length > 6 ? value.slice(0, 6) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
@ -779,7 +780,7 @@ export default {
|
|||
var option = {
|
||||
backgroundColor: "#fff",
|
||||
grid: {
|
||||
left: "10%",
|
||||
left: "5%",
|
||||
right: "2%",
|
||||
bottom: "2%",
|
||||
top: "10%",
|
||||
|
|
@ -814,6 +815,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
// value = value.length > 6 ? value.slice(0, 6) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
@ -986,7 +988,7 @@ export default {
|
|||
var option = {
|
||||
backgroundColor: "#fff",
|
||||
grid: {
|
||||
left: "10%",
|
||||
left: "5%",
|
||||
right: "2%",
|
||||
bottom: "2%",
|
||||
top: "10%",
|
||||
|
|
@ -1021,6 +1023,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
// value = value.length > 6 ? value.slice(0, 6) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ module.exports = {
|
|||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://192.168.2.75:48380`,//旭
|
||||
target: `http://192.168.0.244:48380`,//测试
|
||||
// target: `http://192.168.1.176:48380`,//测试
|
||||
// target: `http://192.168.0.176:48380`,//刘鑫
|
||||
// target: `http://192.168.0.44:48380`,//测试
|
||||
// target: `http://192.168.0.176:48380`,//
|
||||
changeOrigin: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue