fix: BUG修改

This commit is contained in:
kun 2024-05-27 21:49:43 +08:00
parent 81cb377413
commit 80ce6ee3e6
4 changed files with 42 additions and 29 deletions

View File

@ -83,9 +83,9 @@
{{ $t("message.carManage.temporaryCarRecord") }} {{ $t("message.carManage.temporaryCarRecord") }}
</div> </div>
<div class="blockContent"> <div class="blockContent">
<vue-scroll> <vue-scroll style="height: 100%">
<!-- height="300" --> <!-- height="300" -->
<el-table :data="carCompareList" class="tables"> <el-table :data="carCompareList">
<el-table-column prop="enterpriseName" label="企业名称"> <el-table-column prop="enterpriseName" label="企业名称">
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
@ -104,14 +104,14 @@
</el-table-column> </el-table-column>
<!-- 车辆类型 --> <!-- 车辆类型 -->
<el-table-column <el-table-column
prop="carType" prop="carModuleType"
:label="$t('message.carManage.carType')" :label="$t('message.carManage.carType')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.carType scope.row.carModuleType
? carDataTypeList[scope.row.carType - 1].name ? carDataTypeList[scope.row.carModuleType - 1].name
? carDataTypeList[scope.row.carType - 1].name ? carDataTypeList[scope.row.carModuleType - 1].name
: "外来车" : "外来车"
: "外来车" : "外来车"
}} }}
@ -265,13 +265,13 @@ export default {
wlcInNum: 0, wlcInNum: 0,
cqcInNum: 0, cqcInNum: 0,
gdcInNum: 0, gdcInNum: 0,
lscInNum: 0 lscInNum: 0,
}, },
totalCarNum: { totalCarNum: {
gdcNum: 0, gdcNum: 0,
cqcNum: 0, cqcNum: 0,
lscNum: 0 lscNum: 0,
} },
}; };
}, },
mounted() { mounted() {
@ -280,14 +280,15 @@ export default {
this.selectCarStatisticsRecordFn(); this.selectCarStatisticsRecordFn();
this.selectCarPassRecordInOutCount(); this.selectCarPassRecordInOutCount();
this.getCarPassRecordList(); this.getCarPassRecordList();
this.carNumCharts(this.$refs.carNumChart);
}, },
methods: { methods: {
selectCarStatisticsNumFn() { selectCarStatisticsNumFn() {
let that = this;
selectCarStatisticsNumApi({ selectCarStatisticsNumApi({
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
}).then((res) => { }).then((res) => {
this.totalCarNum = res.result; that.totalCarNum = { ...res.result };
that.carNumCharts(that.$refs.carNumChart);
}); });
}, },
selectCarStatisticsRecordFn() { selectCarStatisticsRecordFn() {
@ -319,7 +320,7 @@ export default {
getCarPassRecordList() { getCarPassRecordList() {
getCarPassRecordListApi({ getCarPassRecordListApi({
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
type: 1, carModuleType: 2,
}).then((res) => { }).then((res) => {
this.carCompareList = res.result; this.carCompareList = res.result;
setTimeout(() => { setTimeout(() => {
@ -358,6 +359,7 @@ export default {
getCarCompareList() {}, getCarCompareList() {},
//--- //---
carNumCharts(el) { carNumCharts(el) {
console.log(this.totalCarNum, 888999);
let that = this; let that = this;
let numChart = echarts.init(el); let numChart = echarts.init(el);
// ageChart.clear(); // ageChart.clear();
@ -375,19 +377,26 @@ export default {
name: "车辆数量", name: "车辆数量",
type: "pie", type: "pie",
radius: ["50%", "65%"], radius: ["50%", "65%"],
center: ['50%', '40%'], center: ["52%", "40%"],
minAngle: 75, //
startAngle: 360, //
labelLine: {
normal: {
length: 5,
},
},
label: { label: {
formatter: "{b|{b}}\n{c}", formatter: "{b|{b}}\n{c|{c}}",
rich: { rich: {
b: { b: {
// width: 200,
color: "#415058", color: "#415058",
lineHeight: 20, lineHeight: 20,
align: "left",
}, },
c: { c: {
color: "#415058", color: "#415058",
lineHeight: 20, lineHeight: 20,
align: "left", // align: "right",
}, },
}, },
}, },

View File

@ -113,14 +113,14 @@
<el-table-column prop="carColor" label="车辆颜色"> </el-table-column> <el-table-column prop="carColor" label="车辆颜色"> </el-table-column>
<!-- 车辆类型 --> <!-- 车辆类型 -->
<el-table-column <el-table-column
prop="carType" prop="carModuleType"
:label="$t('message.carManage.carType')" :label="$t('message.carManage.carType')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.carType scope.row.carModuleType
? carTypeList[scope.row.carType - 1].name ? carTypeList[scope.row.carModuleType - 1].name
? carTypeList[scope.row.carType - 1].name ? carTypeList[scope.row.carModuleType - 1].name
: "外来车" : "外来车"
: "外来车" : "外来车"
}} }}
@ -358,7 +358,7 @@ export default {
this.formInline.startTime = ""; this.formInline.startTime = "";
} }
let data = this.formInline; let data = this.formInline;
data.carType = this.isBlack data.carModuleType = this.isBlack
data.projectSn = this.projectSn; data.projectSn = this.projectSn;
data.pageNo = this.pageNo; data.pageNo = this.pageNo;
data.pageSize = this.pageSize; data.pageSize = this.pageSize;

View File

@ -1544,7 +1544,8 @@ export default {
} }
.gantt-box { .gantt-box {
box-sizing: border-box; box-sizing: border-box;
flex: 1; // flex: 1;
width: calc(100% - 350px);
height: 100%; height: 100%;
padding: 18px; padding: 18px;
background: #ffffff; background: #ffffff;
@ -1594,7 +1595,7 @@ export default {
} }
.gantt-chart { .gantt-chart {
height: calc(100% - 60px); height: calc(100% - 94px);
overflow: hidden; overflow: hidden;
.table { .table {

View File

@ -95,15 +95,15 @@
> --> > -->
</div> </div>
</div> </div>
<div class="header"> <!-- <div class="header">
<!-- 未开始 进行中 已完成 已逾期 4-29 wpf 新增注释 --> 未开始 进行中 已完成 已逾期 4-29 wpf 新增注释
<!-- <div class="left-content"> <div class="left-content">
<div class="item" v-for="(item, index) in headerList" :key="index"> <div class="item" v-for="(item, index) in headerList" :key="index">
<div class="color-block" :style="{ background: item.color }"></div> <div class="color-block" :style="{ background: item.color }"></div>
<div class="label">{{ item.label }}</div> <div class="label">{{ item.label }}</div>
</div> </div>
</div> --> </div>
</div> </div> -->
<!-- 甘特图 --> <!-- 甘特图 -->
<div class="gantt-chart" v-if="projects.length > 0"> <div class="gantt-chart" v-if="projects.length > 0">
<div class="table" @scroll="handleScroll"> <div class="table" @scroll="handleScroll">
@ -1745,7 +1745,8 @@ export default {
} }
.gantt-box { .gantt-box {
box-sizing: border-box; box-sizing: border-box;
flex: 1; // flex: 1;
width: 100%;
height: 100%; height: 100%;
padding: 18px; padding: 18px;
background: #ffffff; background: #ffffff;
@ -1795,7 +1796,9 @@ export default {
} }
.gantt-chart { .gantt-chart {
width: 100%;
height: calc(100% - 60px); height: calc(100% - 60px);
margin-top: 20px;
overflow: hidden; overflow: hidden;
.table { .table {