Compare commits
21 Commits
241810d1c8
...
projects/m
| Author | SHA1 | Date | |
|---|---|---|---|
| b31b67d2ed | |||
| fc21359f8f | |||
| be6d84daf5 | |||
| daaec2417c | |||
| dcf4f6c392 | |||
| d27e56cd7f | |||
|
|
445ebe339d | ||
|
|
353e3e0f35 | ||
| ea29a33c2a | |||
|
|
d5673f3c9f | ||
|
|
3064722052 | ||
|
|
dfe52cbac5 | ||
| 68e386333b | |||
|
|
96d55b5a57 | ||
|
|
fb74340f0f | ||
| b1ddfa5c0d | |||
|
|
f7b151f9aa | ||
|
|
51938926d3 | ||
| 588037c45c | |||
|
|
354031f119 | ||
|
|
44c5271b5a |
@@ -289,7 +289,7 @@ function splitCurrentAndPreviousB(factoryListResponse) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
|
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
|
||||||
console.log('工厂',targetListResponse);
|
console.log('工厂',preData);
|
||||||
|
|
||||||
// 初始数据
|
// 初始数据
|
||||||
const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
|
const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
|
||||||
@@ -343,17 +343,24 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
|
|||||||
// componentYieldRate: 0.73,
|
// componentYieldRate: 0.73,
|
||||||
// },
|
// },
|
||||||
// ];
|
// ];
|
||||||
if (preData && preData[0] != null) {
|
if (preData) {
|
||||||
for (const factory of preData) {
|
for (const factory of preData) {
|
||||||
const fId = getPreFactoryId(factory);
|
const fId = getPreFactoryId(factory)
|
||||||
|
console.log('factory',factory.previousYearOee);
|
||||||
// chipInvest.previous[fId] = factory.previousYearInputNumber;
|
// chipInvest.previous[fId] = factory.previousYearInputNumber;
|
||||||
// chipOeeRate.current[fId] = factory.oee;
|
// chipOeeRate.current[fId] = factory.oee;
|
||||||
chipOeeRate.previous[fId] = factory.previousYearOee;
|
if (factory.previousGlassType === 0) {
|
||||||
|
chipOeeRate.previous[fId] = factory.previousYearOee;
|
||||||
|
}
|
||||||
|
// chipOeeRate.previous[fId] = factory.previousYearOee;
|
||||||
// 转化效率
|
// 转化效率
|
||||||
transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ;
|
if (factory.previousGlassType === 1) {
|
||||||
|
transformRate.previous[fId] = factory.previousYearComponentConversionEfficiency;
|
||||||
|
}
|
||||||
|
// transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ;
|
||||||
// 芯片良率 与 标准组件良率
|
// 芯片良率 与 标准组件良率
|
||||||
if (![0, 1].includes(factory.glassType)) continue;
|
if (![0, 1].includes(factory.previousGlassType)) continue;
|
||||||
const _t = [chipRate, stdRate][factory.glassType]
|
const _t = [chipRate, stdRate][factory.previousGlassType]
|
||||||
// _t.current[fId] = factory.yieldRate ;
|
// _t.current[fId] = factory.yieldRate ;
|
||||||
_t.previous[fId] = factory.previousYearYieldRate ;
|
_t.previous[fId] = factory.previousYearYieldRate ;
|
||||||
// }
|
// }
|
||||||
@@ -393,6 +400,7 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
|
|||||||
_t.current[fId] = factory.yieldRate ;
|
_t.current[fId] = factory.yieldRate ;
|
||||||
// _t.previous[fId] = factory.previousYearYieldRate ;
|
// _t.previous[fId] = factory.previousYearYieldRate ;
|
||||||
}
|
}
|
||||||
|
console.log('chipOeeRate',stdRate);
|
||||||
// console.log('chipOeeRate',chipOeeRate);
|
// console.log('chipOeeRate',chipOeeRate);
|
||||||
return {
|
return {
|
||||||
chipOeeRate,
|
chipOeeRate,
|
||||||
|
|||||||
@@ -63,14 +63,22 @@ export default {
|
|||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
handleExport() {
|
handleExport() {
|
||||||
exportFactoryDataExcel({
|
if (this.period != 1) {
|
||||||
factoryId: this.companyId,
|
exportFactoryDataExcel({
|
||||||
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
factoryId: this.companyId,
|
||||||
compare: this.than === '同比' ? 1 : 2
|
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
||||||
}).then(response => {
|
compare: this.than === '同比' ? 1 : 2
|
||||||
this.$download.excel(response, `${this.companyName}生产数据.xls`);
|
}).then(response => {
|
||||||
// this.exportLoading = false;
|
this.$download.excel(response, `${this.companyName}生产数据.xls`);
|
||||||
}).catch(() => { });
|
// this.exportLoading = false;
|
||||||
|
}).catch(() => { });
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '为日的情况下没有导出功能',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
toggleFullScreen() {
|
toggleFullScreen() {
|
||||||
this.isFullscreen = !this.isFullscreen;
|
this.isFullscreen = !this.isFullscreen;
|
||||||
|
|||||||
@@ -65,21 +65,26 @@ export default {
|
|||||||
items = [
|
items = [
|
||||||
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '日' && this.than === '环比') {
|
} else if (this.period === '日' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '同比') {
|
} else if (this.period === '周' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
|
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '环比') {
|
} else if (this.period === '周' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `上周`, color: "#12f7f1" },
|
{ label: `上周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '月' && this.than === '同比') {
|
} else if (this.period === '月' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -141,14 +146,6 @@ export default {
|
|||||||
// console.log('chipOee', chipOeeRate)
|
// console.log('chipOee', chipOeeRate)
|
||||||
let dataList = null
|
let dataList = null
|
||||||
switch (this.period) {
|
switch (this.period) {
|
||||||
case "日":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = chipOeeRate?.previous;
|
|
||||||
dataList[1] = chipOeeRate?.current;
|
|
||||||
case "周":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = chipOeeRate?.previous;
|
|
||||||
dataList[1] = chipOeeRate?.current;
|
|
||||||
default:
|
default:
|
||||||
dataList = [];
|
dataList = [];
|
||||||
dataList[0] = chipOeeRate?.previous;
|
dataList[0] = chipOeeRate?.previous;
|
||||||
@@ -191,6 +188,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '日' && than === '环比') {
|
} else if (period === '日' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -203,6 +205,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '同比') {
|
} else if (period === '周' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -215,6 +222,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '环比') {
|
} else if (period === '周' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -227,6 +239,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '月' && than === '同比') {
|
} else if (period === '月' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
|
|||||||
@@ -65,21 +65,26 @@ export default {
|
|||||||
items = [
|
items = [
|
||||||
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
|
|
||||||
];
|
];
|
||||||
} else if (this.period === '日' && this.than === '环比') {
|
} else if (this.period === '日' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '同比') {
|
} else if (this.period === '周' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '环比') {
|
} else if (this.period === '周' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `上周`, color: "#12f7f1" },
|
{ label: `上周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '月' && this.than === '同比') {
|
} else if (this.period === '月' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -112,17 +117,9 @@ export default {
|
|||||||
series() {
|
series() {
|
||||||
// console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
|
// console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
|
||||||
const transformRate = this.transformRate
|
const transformRate = this.transformRate
|
||||||
// console.log('chipOee', chipOeeRate)
|
console.log('chipOee', transformRate)
|
||||||
let dataList = null;
|
let dataList = null;
|
||||||
switch (this.period) {
|
switch (this.period) {
|
||||||
case "日":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = transformRate.previous;
|
|
||||||
dataList[1] = transformRate.current;
|
|
||||||
case "周":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = transformRate.previous;
|
|
||||||
dataList[1] = transformRate.current;
|
|
||||||
default:
|
default:
|
||||||
dataList = [];
|
dataList = [];
|
||||||
dataList[0] = transformRate.previous;
|
dataList[0] = transformRate.previous;
|
||||||
@@ -182,6 +179,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '日' && than === '环比') {
|
} else if (period === '日' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -194,6 +196,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '同比') {
|
} else if (period === '周' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -206,6 +213,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '环比') {
|
} else if (period === '周' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@@ -218,6 +230,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '月' && than === '同比') {
|
} else if (period === '月' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ export default {
|
|||||||
color: this.color == 1 ? "#4CF0E8" : "#1065ff",
|
color: this.color == 1 ? "#4CF0E8" : "#1065ff",
|
||||||
titleValue,
|
titleValue,
|
||||||
subtitle,
|
subtitle,
|
||||||
|
yesterday,
|
||||||
currentName: items[0].label,
|
currentName: items[0].label,
|
||||||
preName: items[1].label,
|
preName: items[1].label,
|
||||||
previousSum: vt[0],
|
previousSum: vt[0],
|
||||||
|
|||||||
@@ -47,12 +47,12 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
dataRate() {
|
dataRate() {
|
||||||
// if (this.current != 0 && this.target != 0) {
|
// if (this.current != 0 && this.target != 0) {
|
||||||
console.log( '1111111111', this.current, this.target);
|
console.log( '1111111111', this.current, this.target,this.previous);
|
||||||
return this.current == 0 && this.target == 0
|
return this.current == 0 && this.target == 0
|
||||||
? 0
|
? 0
|
||||||
: this.current != 0 && this.target != 0
|
: this.current != 0 && this.target != 0
|
||||||
? `${((this.current / this.target) * 100).toFixed(2)}%`
|
? `${((this.current / this.target) * 100).toFixed(2)}%`
|
||||||
: this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? this.current + '%' : this.previous >=100 ? 100 + '%' : this.previous + '%';
|
: this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? this.current + '%' : 0 + '%'
|
||||||
// } else if(this.previous != 0) {
|
// } else if(this.previous != 0) {
|
||||||
// return this.previous + '%'
|
// return this.previous + '%'
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-07 10:25:10
|
* @Date: 2024-05-07 10:25:10
|
||||||
* @LastEditTime: 2024-06-14 09:58:01
|
* @LastEditTime: 2024-06-27 09:13:38
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -11,21 +11,21 @@
|
|||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="period == '周'" class="std-rate-item">
|
<div v-else-if="period == '周'" class="std-rate-item">
|
||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="period == '月'" class="std-rate-item">
|
<div v-else-if="period == '月'" class="std-rate-item">
|
||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,10 +42,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import CityName from "./CityName.vue";
|
import CityName from "./CityName.vue";
|
||||||
import ProgressBar from "./ProgressBar.vue";
|
import ProgressBar from "./ProgressBar.vue";
|
||||||
|
import preProgressBar from "./preProgressBar.vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StdRateItem",
|
name: "StdRateItem",
|
||||||
components: { CityName, ProgressBar },
|
components: { CityName, ProgressBar, preProgressBar },
|
||||||
props: {
|
props: {
|
||||||
city: {
|
city: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|||||||
@@ -0,0 +1,130 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-06-27 09:12:54
|
||||||
|
* @LastEditTime: 2024-06-27 09:14:21
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="progress-bar" :data-title="title" :data-rate="previous + '%'">
|
||||||
|
<div class="progress-bar__rate" :style="{ width: dataRate == '-' ? 0 : dataRate }"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "ProgressBar",
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
target: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
previous: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
current: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
// total: {
|
||||||
|
// type: Number,
|
||||||
|
// default: 0,
|
||||||
|
// },
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
dataRate() {
|
||||||
|
// if (this.current != 0 && this.target != 0) {
|
||||||
|
// console.log( '1111111111', this.current, this.target,this.previous);
|
||||||
|
return this.previous >=100 ? 100 + '%' : this.previous + '%';
|
||||||
|
// } else if(this.previous != 0) {
|
||||||
|
// return this.previous + '%'
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.progress-bar {
|
||||||
|
height: 10px;
|
||||||
|
background-color: #002f6b;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: attr(data-title);
|
||||||
|
display: inline-block;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -200%;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: attr(data-rate);
|
||||||
|
display: inline-block;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -200%;
|
||||||
|
right: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
&:after {
|
||||||
|
color: #11eae3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(2) {
|
||||||
|
&:after {
|
||||||
|
color: #0e65fd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar__rate {
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: linear-gradient(to right,
|
||||||
|
#004c5e11 10%,
|
||||||
|
#004c5e,
|
||||||
|
#0ac0c0,
|
||||||
|
#11eae3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
.progress-bar__rate {
|
||||||
|
background: linear-gradient(to right,
|
||||||
|
#004c5e11 10%,
|
||||||
|
#004c5e,
|
||||||
|
#0ac0c0,
|
||||||
|
#11eae3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(2) {
|
||||||
|
.progress-bar__rate {
|
||||||
|
background: linear-gradient(to right, #0048a811, #0048a8, #0e65fd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -6,6 +6,7 @@ export default ({
|
|||||||
targetSum,
|
targetSum,
|
||||||
currentName,
|
currentName,
|
||||||
preName,
|
preName,
|
||||||
|
yesterday,
|
||||||
}) => ({
|
}) => ({
|
||||||
grid: {
|
grid: {
|
||||||
left: 300,
|
left: 300,
|
||||||
@@ -25,7 +26,7 @@ export default ({
|
|||||||
fontSize: 26,
|
fontSize: 26,
|
||||||
color: "#fffd",
|
color: "#fffd",
|
||||||
},
|
},
|
||||||
subtext: `\u2002${subtitle}\u2002`,
|
subtext: `\u2002${yesterday + '日良率'}\u2002`,
|
||||||
subtextStyle: {
|
subtextStyle: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 100,
|
fontWeight: 100,
|
||||||
|
|||||||
@@ -134,11 +134,11 @@ export default {
|
|||||||
if (preData && preData[0] != null) {
|
if (preData && preData[0] != null) {
|
||||||
for (const factory of preData) {
|
for (const factory of preData) {
|
||||||
if (factory.previousGlassType === 0) {
|
if (factory.previousGlassType === 0) {
|
||||||
preDataDetail[1] = factory.previousYearOutputNumber
|
preDataDetail[1] = factory.previousOutputNumber
|
||||||
} else if (factory.previousGlassType === 1) {
|
} else if (factory.previousGlassType === 1) {
|
||||||
preDataDetail[2] = factory.previousYearOutputNumber
|
preDataDetail[2] = factory.previousOutputNumber
|
||||||
} else if (factory.previousYearOutputNumber === 2) {
|
} else if (factory.previousGlassType === 2) {
|
||||||
currentDataDetail[3] = factory.outputNumber
|
preDataDetail[3] = factory.previousOutputNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,16 +132,17 @@ export default {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (preData && preData[0] != null) {
|
if (preData) {
|
||||||
for (const factory of preData) {
|
for (const factory of preData) {
|
||||||
if (factory.previousGlassType === 0) {
|
if (factory.previousGlassType === 0) {
|
||||||
preDataDetail[1] = factory.previousYearOutputNumber
|
console.log('factory', factory)
|
||||||
|
preDataDetail[1] = factory.previousOutputNumber
|
||||||
} else if (factory.previousGlassType === 1) {
|
} else if (factory.previousGlassType === 1) {
|
||||||
preDataDetail[2] = factory.previousYearOutputNumber
|
preDataDetail[2] = factory.previousOutputNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (targetListResponse && targetListResponse[0] != null) {
|
if (targetListResponse) {
|
||||||
for (const factory of targetListResponse) {
|
for (const factory of targetListResponse) {
|
||||||
targetDataDetail[0] = factory.ftoInput
|
targetDataDetail[0] = factory.ftoInput
|
||||||
// if (factory.previousGlassType === 0) {
|
// if (factory.previousGlassType === 0) {
|
||||||
@@ -153,7 +154,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log('ftoInvest',ftoInvest)
|
// console.log('ftoInvest',ftoInvest)
|
||||||
if (factoryListResponse && factoryListResponse[0] != null) {
|
if (factoryListResponse) {
|
||||||
for (const factory of factoryListResponse) {
|
for (const factory of factoryListResponse) {
|
||||||
// targetDataDetail[0] = factory.ftoInput
|
// targetDataDetail[0] = factory.ftoInput
|
||||||
if (factory.glassType === 0) {
|
if (factory.glassType === 0) {
|
||||||
@@ -163,6 +164,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(' this.factoryData.preDataDetail', preDataDetail);
|
||||||
this.factoryData.preDataDetail = preDataDetail
|
this.factoryData.preDataDetail = preDataDetail
|
||||||
this.factoryData.currentDataDetail = currentDataDetail
|
this.factoryData.currentDataDetail = currentDataDetail
|
||||||
this.factoryData.targetDataDetail = targetDataDetail
|
this.factoryData.targetDataDetail = targetDataDetail
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-06-25 08:59:33
|
* @LastEditTime: 2024-06-26 13:39:22
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -116,6 +116,8 @@
|
|||||||
<p class="title">标准组件平均功率(W)</p>
|
<p class="title">标准组件平均功率(W)</p>
|
||||||
<p class="text">{{ dataForm.componentAveragePower }}</p>
|
<p class="text">{{ dataForm.componentAveragePower }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">标准组件转化效率</p>
|
<p class="title">标准组件转化效率</p>
|
||||||
<p class="text">{{ dataForm.componentTransRate }}</p>
|
<p class="text">{{ dataForm.componentTransRate }}</p>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-06-26 11:00:11
|
* @LastEditTime: 2024-06-27 14:56:20
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -210,7 +210,7 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'factory',
|
prop: 'factory',
|
||||||
label: '工厂名称',
|
label: '工厂名称',
|
||||||
filter: (val) => [val],
|
filter: (val) => factoryList[val],
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-06-17 17:03:17
|
* @LastEditTime: 2024-06-27 14:50:21
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -76,15 +76,44 @@
|
|||||||
<p class="text">{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' + dataForm.endDate[2] : '' }}</p>
|
<p class="text">{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' + dataForm.endDate[2] : '' }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider></el-divider>
|
<div style="width: 100%; padding: 0 32px"><el-divider style="margin: 0"></el-divider></div>
|
||||||
<div class="chartDiv">
|
<el-row :gutter="0" style="margin: 20px 32px">
|
||||||
<div ref="bar" :style="{ height: '30vh', width: '40vw' }" />
|
<el-col :span="8">
|
||||||
<div ref="pie" :style="{ height: '30vh', width: '40vw' }" />
|
<div>
|
||||||
</div>
|
<small-title slot="title" :no-padding="true">
|
||||||
<div class="chartDiv">
|
产品良率
|
||||||
<div ref="equipmentLine" :style="{ height: '30vh', width: '40vw' }" />
|
</small-title>
|
||||||
<div ref="line" v-show="dataForm.orderStatus === 2" :style="{ height: '30vh', width: '40vw' }" />
|
<div ref="pie" :style="{ height: '40vh', width: '100%' }" />
|
||||||
</div>
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16">
|
||||||
|
<div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
|
||||||
|
<small-title slot="title" :no-padding="true">
|
||||||
|
历史趋势
|
||||||
|
</small-title>
|
||||||
|
<div ref="line" v-show="dataForm.orderStatus === 2" :style="{ height: '40vh', width: '50vw' }" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div style="width: 100%; padding: 0 32px"><el-divider style="margin: 0"></el-divider></div>
|
||||||
|
<el-row :gutter="0" style="margin: 20px 32px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div>
|
||||||
|
<small-title slot="title" :no-padding="true">
|
||||||
|
生产明细
|
||||||
|
</small-title>
|
||||||
|
<div ref="bar" :style="{ height: '40vh', width: '100%' }" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16">
|
||||||
|
<div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
|
||||||
|
<small-title slot="title" :no-padding="true">
|
||||||
|
待制品分布
|
||||||
|
</small-title>
|
||||||
|
<div ref="equipmentLine" :style="{ height: '40vh', width: '50vw' }" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
@@ -118,7 +147,8 @@ export default {
|
|||||||
barChart: null,
|
barChart: null,
|
||||||
equipmentLineChart: null,
|
equipmentLineChart: null,
|
||||||
visible: false,
|
visible: false,
|
||||||
dataForm: {}
|
dataForm: {},
|
||||||
|
colorList: ['#3E8EF7', '#69E6D8', '#F7C739'] // pie颜色
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -227,38 +257,47 @@ export default {
|
|||||||
initChart(barData) {
|
initChart(barData) {
|
||||||
this.barChart = echarts.init(this.$refs['bar'])
|
this.barChart = echarts.init(this.$refs['bar'])
|
||||||
this.barChart.setOption({
|
this.barChart.setOption({
|
||||||
title: {
|
// title: {
|
||||||
text: '生产明细',
|
// text: '生产明细',
|
||||||
left: 'center'
|
// left: 'center'
|
||||||
// subtext: 'Fake Data'
|
// // subtext: 'Fake Data'
|
||||||
},
|
// },
|
||||||
|
color: ['#3E8EF7'],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: 'axis'
|
||||||
},
|
},
|
||||||
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
|
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
|
||||||
calculable: true,
|
calculable: true,
|
||||||
grid: {
|
grid: {
|
||||||
top: '20%',
|
top: '15%',
|
||||||
left: "1%",
|
left: 0,
|
||||||
right: "3%",
|
right: '10%',
|
||||||
bottom: "1%",
|
bottom: 0,
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
|
data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
rotate:45
|
rotate: 25
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value'
|
type: 'value',
|
||||||
|
name: '单位/片',
|
||||||
|
axisLine: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: barData,
|
data: barData,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: '40%'
|
barWidth: '40%',
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, true)
|
}, true)
|
||||||
@@ -266,8 +305,9 @@ export default {
|
|||||||
initPieChart(pieData) {
|
initPieChart(pieData) {
|
||||||
this.pieChart = echarts.init(this.$refs['pie'])
|
this.pieChart = echarts.init(this.$refs['pie'])
|
||||||
this.pieChart.setOption({
|
this.pieChart.setOption({
|
||||||
|
color: ['#3E8EF7', '#69E6D8', '#F7C739'],
|
||||||
title: {
|
title: {
|
||||||
text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : '产品良率 -',
|
// text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : '产品良率 -',
|
||||||
left: 'center'
|
left: 'center'
|
||||||
// subtext: 'Fake Data'
|
// subtext: 'Fake Data'
|
||||||
},
|
},
|
||||||
@@ -275,31 +315,31 @@ export default {
|
|||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
top: '5%',
|
bottom: 0,
|
||||||
left: 'right',
|
left: 'center'
|
||||||
orient: 'vertical'
|
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
// name: 'Access From',
|
// name: 'Access From',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['40%', '70%'],
|
radius: ['50%', '70%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
|
data: pieData,
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: true,
|
||||||
position: 'center'
|
position: 'outside',
|
||||||
},
|
formatter: '{d|{d}%} \n {b|{b}}',
|
||||||
emphasis: {
|
rich: {
|
||||||
label: {
|
d: {
|
||||||
show: false,
|
color: 'inherit', // 系列色
|
||||||
fontSize: 40,
|
verticalAlign: 'top'
|
||||||
fontWeight: 'bold'
|
},
|
||||||
|
b: {
|
||||||
|
color: '#8C8C8C',
|
||||||
|
verticalAlign: 'top'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
labelLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
data: pieData
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, true)
|
}, true)
|
||||||
@@ -307,39 +347,48 @@ export default {
|
|||||||
initEqLineChart(xAxisList, yAxisList) {
|
initEqLineChart(xAxisList, yAxisList) {
|
||||||
this.equipmentLineChart = echarts.init(this.$refs['equipmentLine'])
|
this.equipmentLineChart = echarts.init(this.$refs['equipmentLine'])
|
||||||
this.equipmentLineChart.setOption({
|
this.equipmentLineChart.setOption({
|
||||||
title: {
|
// title: {
|
||||||
text: '待制品分布',
|
// text: '待制品分布',
|
||||||
left: 'center'
|
// left: 'center'
|
||||||
// subtext: 'Fake Data'
|
// // subtext: 'Fake Data'
|
||||||
},
|
// },
|
||||||
|
color: ['#3E8EF7'],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: 'axis'
|
||||||
},
|
},
|
||||||
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
|
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
|
||||||
calculable: true,
|
calculable: true,
|
||||||
grid: {
|
grid: {
|
||||||
top: '20%',
|
top: '15%',
|
||||||
left: "1%",
|
left: 0,
|
||||||
right: "3%",
|
right: 0,
|
||||||
bottom: "1%",
|
bottom: 0,
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: xAxisList,
|
data: xAxisList,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
rotate:45,
|
rotate: 25
|
||||||
// width: '10%'
|
// width: '10%'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value'
|
type: 'value',
|
||||||
|
name: '单位/片',
|
||||||
|
axisLine: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: yAxisList,
|
data: yAxisList,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: '50%'
|
barWidth: '50%',
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, true)
|
}, true)
|
||||||
@@ -347,27 +396,39 @@ export default {
|
|||||||
initLineChart(xAxisList, seriesList) {
|
initLineChart(xAxisList, seriesList) {
|
||||||
this.lineChart = echarts.init(this.$refs['line'])
|
this.lineChart = echarts.init(this.$refs['line'])
|
||||||
this.lineChart.setOption({
|
this.lineChart.setOption({
|
||||||
title: {
|
color: ['#3E8EF7'],
|
||||||
text: '历史趋势',
|
|
||||||
left: 'center' // 设置标题居中
|
|
||||||
},
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
|
grid: {
|
||||||
|
top: '15%',
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: xAxisList,
|
data: xAxisList,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
rotate:45
|
rotate: 25
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value'
|
type: 'value',
|
||||||
|
name: '单位/片',
|
||||||
|
axisLine: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: seriesList,
|
data: seriesList,
|
||||||
type: 'line'
|
type: 'line',
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, true)
|
}, true)
|
||||||
@@ -381,14 +442,8 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chartDiv {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
|
||||||
padding: 5px;
|
|
||||||
padding-left: 30px;
|
|
||||||
}
|
|
||||||
.drawer >>> .el-drawer {
|
.drawer >>> .el-drawer {
|
||||||
border-radius: 8px 0 0 8px;
|
border-radius: 8px 0 0 8px;
|
||||||
}
|
}
|
||||||
@@ -405,7 +460,8 @@ export default {
|
|||||||
}
|
}
|
||||||
.detailBox p {
|
.detailBox p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 32px;
|
padding-left: 32px;
|
||||||
|
/* padding: 0 32px; */
|
||||||
}
|
}
|
||||||
.detailBox .title {
|
.detailBox .title {
|
||||||
/* width: 56px; */
|
/* width: 56px; */
|
||||||
@@ -427,6 +483,8 @@ export default {
|
|||||||
}
|
}
|
||||||
.detailBox {
|
.detailBox {
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
width: 99%;
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
/* width: 99%; */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -30,7 +30,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 图 -->
|
<!-- 图 -->
|
||||||
<div>
|
<div>
|
||||||
<div style="display: inline-block; width: 79%; vertical-align: top">
|
<div
|
||||||
|
style="
|
||||||
|
display: inline-block;
|
||||||
|
width: 79%;
|
||||||
|
vertical-align: top;
|
||||||
|
padding-right: 20px;
|
||||||
|
"
|
||||||
|
>
|
||||||
<base-chart
|
<base-chart
|
||||||
v-show="this.chartMsg1.series[0].data.length > 0"
|
v-show="this.chartMsg1.series[0].data.length > 0"
|
||||||
:chartHeight="chartHeight"
|
:chartHeight="chartHeight"
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
"<br/>" +
|
"<br/>" +
|
||||||
`${
|
`${
|
||||||
params[i].seriesType === "line"
|
params[i].seriesType === "line"
|
||||||
? '<img width="10" height="10" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
|
? '<img width="11" height="11" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
|
||||||
: `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
|
: `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
|
||||||
}` +
|
}` +
|
||||||
`<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
|
`<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-06-19 15:28:34
|
* @Date: 2024-06-19 15:28:34
|
||||||
* @LastEditTime: 2024-06-26 10:42:16
|
* @LastEditTime: 2024-06-27 10:40:57
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -87,11 +87,32 @@ export default {
|
|||||||
// 设置滚动条类型
|
// 设置滚动条类型
|
||||||
type: "slider",
|
type: "slider",
|
||||||
// 设置背景颜色
|
// 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
backgroundColor: "#F7F7F7",
|
||||||
|
// handleStyle: {
|
||||||
|
// color: '#D6D6D6'
|
||||||
|
// },
|
||||||
|
handleStyle: {
|
||||||
|
borderColor: '#EBEBEB',
|
||||||
|
color: '#EBEBEB'
|
||||||
|
},
|
||||||
|
moveHandleStyle: {
|
||||||
|
borderColor: '#EBEBEB',
|
||||||
|
color: '#EBEBEB'
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
handleStyle: {
|
||||||
|
borderColor: '#D6D6D6',
|
||||||
|
color: '#D6D6D6'
|
||||||
|
},
|
||||||
|
moveHandleStyle: {
|
||||||
|
borderColor: '#D6D6D6',
|
||||||
|
color: '#D6D6D6'
|
||||||
|
}
|
||||||
|
},
|
||||||
// 设置选中范围的填充颜色
|
// 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
fillerColor: "#F7F7F7",
|
||||||
// 设置边框颜色
|
// 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
borderColor: "#F7F7F7",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// 数据窗口范围的起始数值
|
||||||
@@ -102,9 +123,9 @@ export default {
|
|||||||
// 即不会影响其他轴的数据范围
|
// 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
width: "100%",
|
||||||
// 设置滚动条高度
|
// 设置滚动条高度
|
||||||
height: 8,
|
height: 3,
|
||||||
// 设置滚动条显示位置
|
// 设置滚动条显示位置
|
||||||
left: "center",
|
left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
@@ -112,7 +133,7 @@ export default {
|
|||||||
// 控制手柄的尺寸
|
// 控制手柄的尺寸
|
||||||
handleSize: 0,
|
handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
bottom: 14,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// 没有下面这块的话,只能拖动滚动条,
|
||||||
@@ -124,7 +145,6 @@ export default {
|
|||||||
moveOnMouseMove: true,
|
moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
moveOnMouseWheel: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-06-20 16:13:36
|
* @Date: 2024-06-20 16:13:36
|
||||||
* @LastEditTime: 2024-06-26 14:48:49
|
* @LastEditTime: 2024-06-27 09:51:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -36,7 +36,7 @@ export default {
|
|||||||
color: [],
|
color: [],
|
||||||
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
||||||
grid: {
|
grid: {
|
||||||
left: -60,
|
left: 20,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 31,
|
bottom: 31,
|
||||||
top: 30,
|
top: 30,
|
||||||
@@ -80,52 +80,52 @@ export default {
|
|||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataZoom: [//滚动条
|
// dataZoom: [//滚动条
|
||||||
{
|
// {
|
||||||
// 设置滚动条的隐藏与显示
|
// // 设置滚动条的隐藏与显示
|
||||||
show: true,
|
// show: true,
|
||||||
// 设置滚动条类型
|
// // 设置滚动条类型
|
||||||
type: "slider",
|
// type: "slider",
|
||||||
// 设置背景颜色
|
// // 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
// backgroundColor: "rgb(19, 63, 100)",
|
||||||
// 设置选中范围的填充颜色
|
// // 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
// fillerColor: "rgb(16, 171, 198)",
|
||||||
// 设置边框颜色
|
// // 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
// borderColor: "rgb(19, 63, 100)",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// // 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
// showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// // 数据窗口范围的起始数值
|
||||||
startValue: 0,
|
// startValue: 0,
|
||||||
// 数据窗口范围的结束数值(一页显示多少条数据)
|
// // 数据窗口范围的结束数值(一页显示多少条数据)
|
||||||
endValue: 5,
|
// endValue: 5,
|
||||||
// empty:当前数据窗口外的数据,被设置为空。
|
// // empty:当前数据窗口外的数据,被设置为空。
|
||||||
// 即不会影响其他轴的数据范围
|
// // 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
// filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// // 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
// width: "50%",
|
||||||
// 设置滚动条高度
|
// // 设置滚动条高度
|
||||||
height: 8,
|
// height: 8,
|
||||||
// 设置滚动条显示位置
|
// // 设置滚动条显示位置
|
||||||
left: "center",
|
// left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// // 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
zoomLoxk: true,
|
// zoomLoxk: true,
|
||||||
// 控制手柄的尺寸
|
// // 控制手柄的尺寸
|
||||||
handleSize: 0,
|
// handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// // dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
// bottom: 3,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// // 没有下面这块的话,只能拖动滚动条,
|
||||||
// 鼠标滚轮在区域内不能控制外部滚动条
|
// // 鼠标滚轮在区域内不能控制外部滚动条
|
||||||
type: "inside",
|
// type: "inside",
|
||||||
// 滚轮是否触发缩放
|
// // 滚轮是否触发缩放
|
||||||
zoomOnMouseWheel: false,
|
// zoomOnMouseWheel: false,
|
||||||
// 鼠标滚轮触发滚动
|
// // 鼠标滚轮触发滚动
|
||||||
moveOnMouseMove: true,
|
// moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
// moveOnMouseWheel: true,
|
||||||
},
|
// },
|
||||||
|
|
||||||
],
|
// ],
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
},
|
},
|
||||||
@@ -136,6 +136,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 300,
|
default: 300,
|
||||||
},
|
},
|
||||||
|
gridLeft: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
type: {
|
type: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 2,
|
default: 2,
|
||||||
@@ -166,7 +170,12 @@ export default {
|
|||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
this.chartHeight = newVal;
|
this.chartHeight = newVal;
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// gridLeft(val) {
|
||||||
|
// console.log(val)
|
||||||
|
|
||||||
|
// },
|
||||||
type() {
|
type() {
|
||||||
this.canvasReset();
|
this.canvasReset();
|
||||||
},
|
},
|
||||||
@@ -190,6 +199,12 @@ export default {
|
|||||||
}, 500)();
|
}, 500)();
|
||||||
},
|
},
|
||||||
getMes() {
|
getMes() {
|
||||||
|
console.log(this.gridLeft)
|
||||||
|
if (this.gridLeft === false) {
|
||||||
|
this.option.grid.left = 20
|
||||||
|
} else {
|
||||||
|
this.option.grid.left = -80
|
||||||
|
}
|
||||||
// console.log('222222', this.chartMsg);
|
// console.log('222222', this.chartMsg);
|
||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
this.myChart.dispose();
|
this.myChart.dispose();
|
||||||
@@ -197,7 +212,7 @@ export default {
|
|||||||
var chartDom = document.getElementById(this.chartId);
|
var chartDom = document.getElementById(this.chartId);
|
||||||
this.myChart = echarts.init(chartDom);
|
this.myChart = echarts.init(chartDom);
|
||||||
this.option.color = this.chartMsg.color;
|
this.option.color = this.chartMsg.color;
|
||||||
this.option.xAxis.data = this.chartMsg.xData;
|
this.option.xAxis.data = this.chartMsg.xData
|
||||||
// this.option.yAxis.name = this.chartMsg.yName;
|
// this.option.yAxis.name = this.chartMsg.yName;
|
||||||
|
|
||||||
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
|
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-06-20 16:13:52
|
* @Date: 2024-06-20 16:13:52
|
||||||
* @LastEditTime: 2024-06-25 10:49:34
|
* @LastEditTime: 2024-06-27 09:55:02
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -80,52 +80,52 @@ export default {
|
|||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataZoom: [//滚动条
|
// dataZoom: [//滚动条
|
||||||
{
|
// {
|
||||||
// 设置滚动条的隐藏与显示
|
// // 设置滚动条的隐藏与显示
|
||||||
show: true,
|
// show: true,
|
||||||
// 设置滚动条类型
|
// // 设置滚动条类型
|
||||||
type: "slider",
|
// type: "slider",
|
||||||
// 设置背景颜色
|
// // 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
// backgroundColor: "rgb(19, 63, 100)",
|
||||||
// 设置选中范围的填充颜色
|
// // 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
// fillerColor: "rgb(16, 171, 198)",
|
||||||
// 设置边框颜色
|
// // 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
// borderColor: "rgb(19, 63, 100)",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// // 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
// showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// // 数据窗口范围的起始数值
|
||||||
startValue: 0,
|
// startValue: 0,
|
||||||
// 数据窗口范围的结束数值(一页显示多少条数据)
|
// // 数据窗口范围的结束数值(一页显示多少条数据)
|
||||||
endValue: 5,
|
// endValue: 5,
|
||||||
// empty:当前数据窗口外的数据,被设置为空。
|
// // empty:当前数据窗口外的数据,被设置为空。
|
||||||
// 即不会影响其他轴的数据范围
|
// // 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
// filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// // 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
// width: "50%",
|
||||||
// 设置滚动条高度
|
// // 设置滚动条高度
|
||||||
height: 8,
|
// height: 8,
|
||||||
// 设置滚动条显示位置
|
// // 设置滚动条显示位置
|
||||||
left: "center",
|
// left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// // 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
zoomLoxk: true,
|
// zoomLoxk: true,
|
||||||
// 控制手柄的尺寸
|
// // 控制手柄的尺寸
|
||||||
handleSize: 0,
|
// handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// // dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
// bottom: 3,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// // 没有下面这块的话,只能拖动滚动条,
|
||||||
// 鼠标滚轮在区域内不能控制外部滚动条
|
// // 鼠标滚轮在区域内不能控制外部滚动条
|
||||||
type: "inside",
|
// type: "inside",
|
||||||
// 滚轮是否触发缩放
|
// // 滚轮是否触发缩放
|
||||||
zoomOnMouseWheel: false,
|
// zoomOnMouseWheel: false,
|
||||||
// 鼠标滚轮触发滚动
|
// // 鼠标滚轮触发滚动
|
||||||
moveOnMouseMove: true,
|
// moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
// moveOnMouseWheel: true,
|
||||||
},
|
// },
|
||||||
|
|
||||||
],
|
// ],
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-06-21 09:05:14
|
* @Date: 2024-06-21 09:05:14
|
||||||
* @LastEditTime: 2024-06-26 14:49:15
|
* @LastEditTime: 2024-06-27 10:59:40
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -98,52 +98,51 @@ export default {
|
|||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataZoom: [//滚动条
|
// dataZoom: [//滚动条
|
||||||
{
|
// {
|
||||||
// 设置滚动条的隐藏与显示
|
// // 设置滚动条的隐藏与显示
|
||||||
show: true,
|
// show: true,
|
||||||
// 设置滚动条类型
|
// // 设置滚动条类型
|
||||||
type: "slider",
|
// type: "slider",
|
||||||
// 设置背景颜色
|
// // 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
// backgroundColor: "#F7F7F7",
|
||||||
// 设置选中范围的填充颜色
|
// // 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
// fillerColor: "#EBEBEB",
|
||||||
// 设置边框颜色
|
// // 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
// borderColor: "#F7F7F7",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// // 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
// showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// // 数据窗口范围的起始数值
|
||||||
startValue: 0,
|
// startValue: 0,
|
||||||
// 数据窗口范围的结束数值(一页显示多少条数据)
|
// // 数据窗口范围的结束数值(一页显示多少条数据)
|
||||||
endValue: 5,
|
// endValue: 5,
|
||||||
// empty:当前数据窗口外的数据,被设置为空。
|
// // empty:当前数据窗口外的数据,被设置为空。
|
||||||
// 即不会影响其他轴的数据范围
|
// // 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
// filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// // 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
// width: "100%",
|
||||||
// 设置滚动条高度
|
// // 设置滚动条高度
|
||||||
height: 8,
|
// height: 8,
|
||||||
// 设置滚动条显示位置
|
// // 设置滚动条显示位置
|
||||||
left: "center",
|
// left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// // 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
zoomLoxk: true,
|
// zoomLoxk: true,
|
||||||
// 控制手柄的尺寸
|
// // 控制手柄的尺寸
|
||||||
handleSize: 0,
|
// handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// // dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
// bottom: 3,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// // 没有下面这块的话,只能拖动滚动条,
|
||||||
// 鼠标滚轮在区域内不能控制外部滚动条
|
// // 鼠标滚轮在区域内不能控制外部滚动条
|
||||||
type: "inside",
|
// type: "inside",
|
||||||
// 滚轮是否触发缩放
|
// // 滚轮是否触发缩放
|
||||||
zoomOnMouseWheel: false,
|
// zoomOnMouseWheel: false,
|
||||||
// 鼠标滚轮触发滚动
|
// // 鼠标滚轮触发滚动
|
||||||
moveOnMouseMove: true,
|
// moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
// moveOnMouseWheel: true,
|
||||||
},
|
// },
|
||||||
|
// ],
|
||||||
],
|
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -176,12 +176,12 @@ export default {
|
|||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/MW",
|
name: "单位/MW",
|
||||||
// splitNumber: 5,
|
// splitNumber: 5,
|
||||||
min: function (value) {//取最小值向下取整为最小刻度
|
// min: function (value) {//取最小值向下取整为最小刻度
|
||||||
return 0
|
// return 0
|
||||||
},
|
// },
|
||||||
max: function (value) {//取最大值向上取整为最大刻度
|
// max: function (value) {//取最大值向上取整为最大刻度
|
||||||
return Math.ceil(value.max)
|
// return Math.ceil(value.max)
|
||||||
},
|
// },
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@@ -192,12 +192,12 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
min: 0,
|
// min: 0,
|
||||||
max: 100,
|
// max: 100,
|
||||||
// scale: true,
|
// scale: true,
|
||||||
interval: 25,//间隔
|
// interval: 25,//间隔
|
||||||
// inverse: true,
|
// inverse: true,
|
||||||
splitNumber: 5,
|
// splitNumber: 5,
|
||||||
name: "单位/%",
|
name: "单位/%",
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@@ -248,15 +248,15 @@ export default {
|
|||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/片",
|
name: "单位/片",
|
||||||
min: function (value) {//取最小值向下取整为最小刻度
|
// min: function (value) {//取最小值向下取整为最小刻度
|
||||||
return 0
|
// return 0
|
||||||
},
|
// },
|
||||||
max: function (value) {//取最大值向上取整为最大刻度
|
// max: function (value) {//取最大值向上取整为最大刻度
|
||||||
return Math.ceil(value.max)
|
// return Math.ceil(value.max)
|
||||||
},
|
// },
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
// splitNumber: 5,
|
// splitNumber: 5,
|
||||||
scale: true,
|
// scale: true,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: "right",
|
align: "right",
|
||||||
@@ -269,10 +269,10 @@ export default {
|
|||||||
name: "单位/%",
|
name: "单位/%",
|
||||||
scale: true,
|
scale: true,
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
min: 0,
|
// min: 0,
|
||||||
max: 100,
|
// max: 100,
|
||||||
// scale: true,
|
// scale: true,
|
||||||
interval: 25,//间隔
|
// interval: 25,//间隔
|
||||||
// splitNumber: 5,
|
// splitNumber: 5,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@@ -521,6 +521,7 @@ export default {
|
|||||||
this.chartMsg.series[2].data = []
|
this.chartMsg.series[2].data = []
|
||||||
this.chartMsgYearTarget.series[0].data = []
|
this.chartMsgYearTarget.series[0].data = []
|
||||||
this.chartMsgYearTarget.series[1].data = []
|
this.chartMsgYearTarget.series[1].data = []
|
||||||
|
this.title = ''
|
||||||
if (!this.listQuery.beginTime && !this.listQuery.endTime) {
|
if (!this.listQuery.beginTime && !this.listQuery.endTime) {
|
||||||
return this.$message('请选择起止时间')
|
return this.$message('请选择起止时间')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="margin-top: 30px">
|
<el-col :span="6" style="margin-top: 30px">
|
||||||
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
||||||
:chartMsg="chartMsgTarget" :chartId="'chartTarget'" :chartNum="chartNum" />
|
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartTarget'" :chartNum="chartNum" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="blueTip">
|
<div class="blueTip">
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="margin-top: 30px">
|
<el-col :span="6" style="margin-top: 30px">
|
||||||
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
||||||
:chartMsg="chartMsgTarget" :chartId="'chartDayTarget'" :chartNum="chartNum" />
|
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartDayTarget'" :chartNum="chartNum" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="6">
|
<!-- <el-col :span="6">
|
||||||
<div class="blueTip">
|
<div class="blueTip">
|
||||||
@@ -103,8 +103,8 @@
|
|||||||
:chartId="chartId" :chartNum="chartNum" />
|
:chartId="chartId" :chartNum="chartNum" />
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
|
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size"
|
||||||
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
|
:table-data="tableData" :max-height="tableH" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="containerBottom">
|
<!-- <div class="containerBottom">
|
||||||
|
|
||||||
@@ -130,6 +130,7 @@ export default {
|
|||||||
currentMenu: '邯郸',
|
currentMenu: '邯郸',
|
||||||
end: undefined,
|
end: undefined,
|
||||||
title: '',
|
title: '',
|
||||||
|
gridLeft:true,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 999,
|
pageSize: 999,
|
||||||
@@ -529,7 +530,11 @@ export default {
|
|||||||
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
|
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
|
||||||
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
|
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
|
||||||
if (this.listQuery.type === 2) {
|
if (this.listQuery.type === 2) {
|
||||||
|
if (res.data.list.length === 3) {
|
||||||
|
this.gridLeft = false
|
||||||
|
} else {
|
||||||
|
this.gridLeft = true
|
||||||
|
}
|
||||||
// res.data.list.forEach((ele) => {
|
// res.data.list.forEach((ele) => {
|
||||||
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
|
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
|
||||||
// let i = index + 1
|
// let i = index + 1
|
||||||
@@ -693,6 +698,11 @@ export default {
|
|||||||
})
|
})
|
||||||
// })
|
// })
|
||||||
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
|
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
|
||||||
|
if (res.data.list.length === 2) {
|
||||||
|
this.gridLeft = false
|
||||||
|
} else {
|
||||||
|
this.gridLeft = true
|
||||||
|
}
|
||||||
// res.data.list.forEach((ele) => {
|
// res.data.list.forEach((ele) => {
|
||||||
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
|
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
|
||||||
// let i = index + 1
|
// let i = index + 1
|
||||||
|
|||||||
@@ -64,7 +64,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="margin-top: 30px">
|
<el-col :span="6" style="margin-top: 30px">
|
||||||
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
||||||
:chartMsg="chartMsgTarget" ref="dayTargetChart" :chartId=" 'chartTarget'" :chartNum="chartNum" />
|
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" ref="dayTargetChart" :chartId=" 'chartTarget'"
|
||||||
|
:chartNum="chartNum" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="blueTip">
|
<div class="blueTip">
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="margin-top: 30px">
|
<el-col :span="6" style="margin-top: 30px">
|
||||||
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
||||||
:chartMsg="chartMsgTarget" :chartId=" 'chartDayTarget'" :chartNum="chartNum" />
|
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId=" 'chartDayTarget'" :chartNum="chartNum" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="6">
|
<!-- <el-col :span="6">
|
||||||
<div class="blueTip">
|
<div class="blueTip">
|
||||||
@@ -129,6 +130,7 @@ export default {
|
|||||||
currentMenu:'邯郸',
|
currentMenu:'邯郸',
|
||||||
end: undefined,
|
end: undefined,
|
||||||
title: '',
|
title: '',
|
||||||
|
gridLeft:true,
|
||||||
showTable:false,
|
showTable:false,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -673,6 +675,11 @@ export default {
|
|||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
if (this.listQuery.type === 2) {
|
if (this.listQuery.type === 2) {
|
||||||
|
if (res.data.list.length === 3) {
|
||||||
|
this.gridLeft = false
|
||||||
|
} else {
|
||||||
|
this.gridLeft = true
|
||||||
|
}
|
||||||
console.log(res.data.list.length);
|
console.log(res.data.list.length);
|
||||||
// res.data.list.forEach((ele) => {
|
// res.data.list.forEach((ele) => {
|
||||||
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
|
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
|
||||||
@@ -948,6 +955,11 @@ export default {
|
|||||||
})
|
})
|
||||||
// })
|
// })
|
||||||
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
|
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
|
||||||
|
if (res.data.list.length === 2) {
|
||||||
|
this.gridLeft = false
|
||||||
|
} else {
|
||||||
|
this.gridLeft = true
|
||||||
|
}
|
||||||
// console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
|
// console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
|
||||||
// res.data.list.forEach((ele) => {
|
// res.data.list.forEach((ele) => {
|
||||||
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
|
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
|
||||||
|
|||||||
@@ -174,12 +174,12 @@ export default {
|
|||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/片",
|
name: "单位/片",
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
min: function (value) {//取最小值向下取整为最小刻度
|
// min: function (value) {//取最小值向下取整为最小刻度
|
||||||
return Math.floor(value.min)
|
// return Math.floor(value.min)
|
||||||
},
|
// },
|
||||||
max: function (value) {//取最大值向上取整为最大刻度
|
// max: function (value) {//取最大值向上取整为最大刻度
|
||||||
return Math.ceil(value.max)
|
// return Math.ceil(value.max)
|
||||||
},
|
// },
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@@ -191,10 +191,10 @@ export default {
|
|||||||
type: 'value',
|
type: 'value',
|
||||||
// inverse: true,
|
// inverse: true,
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
min: 0,
|
// min: 0,
|
||||||
max: 100,
|
// max: 100,
|
||||||
// scale: true,
|
// scale: true,
|
||||||
interval: 25,//间隔
|
// interval: 25,//间隔
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
name: "单位/%",
|
name: "单位/%",
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
@@ -246,15 +246,15 @@ export default {
|
|||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/片",
|
name: "单位/片",
|
||||||
min: function (value) {//取最小值向下取整为最小刻度
|
// min: function (value) {//取最小值向下取整为最小刻度
|
||||||
return Math.floor(value.min)
|
// return Math.floor(value.min)
|
||||||
},
|
// },
|
||||||
max: function (value) {//取最大值向上取整为最大刻度
|
// max: function (value) {//取最大值向上取整为最大刻度
|
||||||
return Math.ceil(value.max)
|
// return Math.ceil(value.max)
|
||||||
},
|
// },
|
||||||
alignTicks:true,
|
alignTicks:true,
|
||||||
splitNumber: 4,
|
// splitNumber: 4,
|
||||||
scale: true,
|
// scale: true,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: "right",
|
align: "right",
|
||||||
@@ -266,10 +266,10 @@ export default {
|
|||||||
// inverse: true,
|
// inverse: true,
|
||||||
name: "单位/%",
|
name: "单位/%",
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
min: 0,
|
// min: 0,
|
||||||
max:100,
|
// max:100,
|
||||||
// scale: true,
|
// scale: true,
|
||||||
interval: 25,//间隔
|
// interval: 25,//间隔
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|||||||
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
<!-- 添加或修改菜单对话框 -->
|
<!-- 添加或修改菜单对话框 -->
|
||||||
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
|
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="上级菜单">
|
<el-form-item label="上级菜单">
|
||||||
@@ -205,6 +205,7 @@
|
|||||||
v-model="form.sort"
|
v-model="form.sort"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -331,8 +332,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
@@ -437,6 +438,12 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi("system:menu:create")
|
||||||
|
? {
|
||||||
|
type: "add",
|
||||||
|
btnName: "新增",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
this.$auth.hasPermi("system:menu:update")
|
this.$auth.hasPermi("system:menu:update")
|
||||||
? {
|
? {
|
||||||
type: "edit",
|
type: "edit",
|
||||||
@@ -449,12 +456,6 @@ export default {
|
|||||||
btnName: "删除",
|
btnName: "删除",
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi("system:menu:create")
|
|
||||||
? {
|
|
||||||
type: "add",
|
|
||||||
btnName: "新增",
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableProps,
|
tableProps,
|
||||||
heightNum: 210,
|
heightNum: 210,
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
{{ parseTime(form.startTime) }} | {{ form.duration }} ms
|
{{ parseTime(form.startTime) }} | {{ form.duration }} ms
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<el-form-item label="操作结果:">
|
<el-form-item label="操作结果:">
|
||||||
<div v-if="form.resultCode === 0">
|
<div v-if="form.resultCode === 0">
|
||||||
正常 | {{ form.resultData }}
|
正常 | {{ form.resultData }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="user-container">
|
||||||
<!-- <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" />
|
<!-- <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" />
|
||||||
<doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" />
|
<doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" />
|
||||||
<doc-alert
|
<doc-alert
|
||||||
@@ -8,40 +8,43 @@
|
|||||||
/> -->
|
/> -->
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="8" class="user-box">
|
||||||
<!--部门数据-->
|
<!--部门数据-->
|
||||||
<el-col :span="4" :xs="24">
|
<el-col :span="4" :xs="24">
|
||||||
<div class="head-container">
|
<div class="user-box-left">
|
||||||
<el-input
|
<div class="head-container">
|
||||||
v-model="deptName"
|
<el-input
|
||||||
placeholder="请输入部门名称"
|
v-model="deptName"
|
||||||
clearable
|
placeholder="请输入部门名称"
|
||||||
size="small"
|
clearable
|
||||||
prefix-icon="el-icon-search"
|
size="small"
|
||||||
style="margin-bottom: 20px"
|
prefix-icon="el-icon-search"
|
||||||
/>
|
style="margin-bottom: 20px"
|
||||||
</div>
|
/>
|
||||||
<div class="head-container">
|
</div>
|
||||||
<el-tree
|
<div class="head-container">
|
||||||
:data="deptOptions"
|
<el-tree
|
||||||
:props="defaultProps"
|
:data="deptOptions"
|
||||||
:expand-on-click-node="false"
|
:props="defaultProps"
|
||||||
:filter-node-method="filterNode"
|
:expand-on-click-node="false"
|
||||||
ref="tree"
|
:filter-node-method="filterNode"
|
||||||
default-expand-all
|
ref="tree"
|
||||||
highlight-current
|
default-expand-all
|
||||||
@node-click="handleNodeClick"
|
highlight-current
|
||||||
/>
|
@node-click="handleNodeClick"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!--用户数据-->
|
<!--用户数据-->
|
||||||
<el-col :span="20" :xs="24">
|
<el-col :span="20" :xs="24">
|
||||||
<search-bar
|
<div class="user-box-right">
|
||||||
:formConfigs="formConfig"
|
<search-bar
|
||||||
ref="searchBarForm"
|
:formConfigs="formConfig"
|
||||||
@headBtnClick="buttonClick"
|
ref="userSearchBarForm"
|
||||||
/>
|
@headBtnClick="buttonClick"
|
||||||
<!-- <el-form
|
/>
|
||||||
|
<!-- <el-form
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
ref="queryForm"
|
ref="queryForm"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -104,7 +107,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
|
|
||||||
<!-- <el-row :gutter="10" class="mb8">
|
<!-- <el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -144,25 +147,25 @@
|
|||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row> -->
|
</el-row> -->
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table
|
||||||
:page="queryParams.pageNo"
|
:page="queryParams.pageNo"
|
||||||
:limit="queryParams.pageSize"
|
:limit="queryParams.pageSize"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:table-data="userList"
|
:table-data="userList"
|
||||||
:max-height="tableH"
|
:max-height="tableH"
|
||||||
@emitFun="handleStatusChange"
|
@emitFun="handleStatusChange"
|
||||||
>
|
>
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="220"
|
:width="220"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick"
|
@clickBtn="handleClick"
|
||||||
/>
|
/>
|
||||||
</base-table>
|
</base-table>
|
||||||
<!-- <el-table v-loading="loading" :data="userList">
|
<!-- <el-table v-loading="loading" :data="userList">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="用户编号"
|
label="用户编号"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -288,18 +291,19 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table> -->
|
</el-table> -->
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
:page.sync="queryParams.pageNo"
|
:page.sync="queryParams.pageNo"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
:total="total"
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
|
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户昵称" prop="nickname">
|
<el-form-item label="用户昵称" prop="nickname">
|
||||||
@@ -412,8 +416,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
@@ -448,7 +452,7 @@
|
|||||||
:underline="false"
|
:underline="false"
|
||||||
style="font-size: 12px; vertical-align: baseline"
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
@click="importTemplate"
|
@click="importTemplate"
|
||||||
>下载模板</el-link
|
>导出模板</el-link
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -606,6 +610,11 @@ export default {
|
|||||||
name: "search",
|
name: "search",
|
||||||
color: "primary",
|
color: "primary",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "重置",
|
||||||
|
name: "cancel",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermiOr([
|
type: this.$auth.hasPermiOr([
|
||||||
"system:user:create",
|
"system:user:create",
|
||||||
@@ -615,18 +624,11 @@ export default {
|
|||||||
? "separate"
|
? "separate"
|
||||||
: "",
|
: "",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi("system:user:create") ? "button" : "",
|
|
||||||
btnName: "新增",
|
|
||||||
name: "addNew",
|
|
||||||
color: "success",
|
|
||||||
plain: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi("system:user:import") ? "button" : "",
|
type: this.$auth.hasPermi("system:user:import") ? "button" : "",
|
||||||
btnName: "导入",
|
btnName: "导入",
|
||||||
name: "import",
|
name: "import",
|
||||||
color: "warning",
|
color: "primary",
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -636,20 +638,15 @@ export default {
|
|||||||
color: "primary",
|
color: "primary",
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi("system:user:create") ? "button" : "",
|
||||||
|
btnName: "新增",
|
||||||
|
name: "addNew",
|
||||||
|
color: "success",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi("system:user:update")
|
|
||||||
? {
|
|
||||||
type: "edit",
|
|
||||||
btnName: "修改",
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi("system:user:delete")
|
|
||||||
? {
|
|
||||||
type: "delete",
|
|
||||||
btnName: "删除",
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi("system:user:update-password")
|
this.$auth.hasPermi("system:user:update-password")
|
||||||
? {
|
? {
|
||||||
type: "reset",
|
type: "reset",
|
||||||
@@ -662,6 +659,18 @@ export default {
|
|||||||
btnName: "分配角色",
|
btnName: "分配角色",
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:user:update")
|
||||||
|
? {
|
||||||
|
type: "edit",
|
||||||
|
btnName: "修改",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:user:delete")
|
||||||
|
? {
|
||||||
|
type: "delete",
|
||||||
|
btnName: "删除",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableProps,
|
tableProps,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -803,6 +812,15 @@ export default {
|
|||||||
case "search":
|
case "search":
|
||||||
this.handleQuery(val);
|
this.handleQuery(val);
|
||||||
break;
|
break;
|
||||||
|
case "cancel":
|
||||||
|
this.$refs["userSearchBarForm"].resetForm();
|
||||||
|
this.queryParams.pageNo = 1;
|
||||||
|
this.queryParams.username = "";
|
||||||
|
this.queryParams.mobile = "";
|
||||||
|
this.queryParams.status = "";
|
||||||
|
this.queryParams.createTime = [];
|
||||||
|
this.getList();
|
||||||
|
break;
|
||||||
case "addNew":
|
case "addNew":
|
||||||
this.handleAdd();
|
this.handleAdd();
|
||||||
break;
|
break;
|
||||||
@@ -1033,7 +1051,7 @@ export default {
|
|||||||
this.upload.title = "用户导入";
|
this.upload.title = "用户导入";
|
||||||
this.upload.open = true;
|
this.upload.open = true;
|
||||||
},
|
},
|
||||||
/** 下载模板操作 */
|
/** 导出模板操作 */
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
importTemplate().then((response) => {
|
importTemplate().then((response) => {
|
||||||
this.$download.excel(response, "用户导入模板.xls");
|
this.$download.excel(response, "用户导入模板.xls");
|
||||||
@@ -1090,11 +1108,19 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-container {
|
.user-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh - 120px - 8px);
|
height: calc(100vh - 120px - 8px);
|
||||||
background-color: #fff;
|
background-color: #f2f4f9;
|
||||||
border-radius: 8px;
|
|
||||||
padding: 8px;
|
.user-box {
|
||||||
|
.user-box-left,
|
||||||
|
.user-box-right {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
height: calc(100vh - 128px);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user