Merge pull request 'projects/mescc/zhp' (#84) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #84
This commit is contained in:
朱菊兰 2024-07-05 14:08:40 +08:00
commit 798ea2d90d
20 changed files with 258 additions and 137 deletions

View File

@ -1,3 +1,10 @@
<!--
* @Author: zhp
* @Date: 2024-06-03 15:38:31
* @LastEditTime: 2024-07-04 10:44:35
* @LastEditors: zhp
* @Description:
-->
<template> <template>
<el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll"> <el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">
<slot /> <slot />
@ -17,7 +24,9 @@ export default {
computed: { computed: {
scrollWrapper() { scrollWrapper() {
return this.$refs.scrollContainer.$refs.wrap return this.$refs.scrollContainer.$refs.wrap
} },
},
watch: {
}, },
mounted() { mounted() {
this.scrollWrapper.addEventListener('scroll', this.emitScroll, true) this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)

View File

@ -1,9 +1,10 @@
<template> <template>
<div id="tags-view-container" class="tags-view-container"> <div ref="tagsViewContainer" id="tags-view-container" class="tags-view-container">
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
<router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''" <router-link v-for="tag in visitedViews" ref="tag" :key="tag.path"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item" :class="isActive(tag) ? 'active' : ''" :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
:style="activeStyle(tag)" @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" tag="span" class="tags-view-item" :style="activeStyle(tag)"
@click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent.native="openMenu(tag, $event)"> @contextmenu.prevent.native="openMenu(tag, $event)">
{{ tag.title }} {{ tag.title }}
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" /> <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
@ -36,6 +37,13 @@ export default {
} }
}, },
computed: { computed: {
changeColor() {
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main') {
return true
} else {
return false
}
},
visitedViews() { visitedViews() {
return this.$store.state.tagsView.visitedViews return this.$store.state.tagsView.visitedViews
}, },
@ -44,9 +52,28 @@ export default {
}, },
theme() { theme() {
return this.$store.state.settings.theme; return this.$store.state.settings.theme;
} },
}, },
watch: { watch: {
changeColor(val) {
// if (val == true) {
// this.$refs.tagsViewContainer.style.backgroundColor = 'rgba(0, 21, 41, 1)'
// var tag = document.getElementsByClassName("tags-view-item")
// console.log('tag', tag)
// for (let i in tag) {
// tag[i].classList.add("changeColor")
// // tag[i].classList.remove("default")
// }
// console.log('this.$refs.scrollContainer', this.$refs.tag);
// } else {
// this.$refs.tagsViewContainer.style.backgroundColor = ''
// var tag = document.getElementsByClassName("tags-view-item")
// for (let i in tag) {
// // tag[i].classList.remove("changeColor")
// // tag[i].classList.add("default")
// }
// }
},
$route() { $route() {
this.addTags() this.addTags()
this.moveToCurrentTag() this.moveToCurrentTag()
@ -60,6 +87,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.$route, this.changeColor);
this.initTags() this.initTags()
this.addTags() this.addTags()
}, },
@ -230,6 +258,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// :root{
// --theme-color: rgba(0, 0, 0, 0.45);
// --theme-background: #f4f4f4ff;
// }
.changeColor{
--theme-background: rgba(0, 59, 115, 1);
--theme-color: rgba(255, 255, 255, 1);
}
.tags-view-container { .tags-view-container {
height: 42px; height: 42px;
width: 100%; width: 100%;
@ -245,8 +281,8 @@ export default {
cursor: pointer; cursor: pointer;
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
color: rgba(0, 0, 0, 0.45); color: var(--theme-color,rgba(0, 0, 0, 0.45));
background: #F4F4F4FF; background:var(--theme-background,#f4f4f4ff);
padding: 0 8px 0 12px; padding: 0 8px 0 12px;
font-size: 14px; font-size: 14px;
letter-spacing: 1px; letter-spacing: 1px;
@ -331,7 +367,7 @@ export default {
.el-icon-close { .el-icon-close {
&:hover { &:hover {
background-color: #fff; background-color: #fff;
color: #409eff; color: rgba(62, 142, 247, 1);
} }
} }
} }

View File

@ -39,6 +39,13 @@ export default {
needTagsView: state => state.settings.tagsView, needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader fixedHeader: state => state.settings.fixedHeader
}), }),
changeColor() {
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main') {
return true
} else {
return false
}
},
classObj() { classObj() {
return { return {
hideSidebar: !this.sidebar.opened, hideSidebar: !this.sidebar.opened,
@ -51,6 +58,21 @@ export default {
return variables; return variables;
} }
}, },
watch: {
// changeColor(val) {
// if (val == true) {
// var tag = document.getElementsByClassName("main-container")
// console.log('tag', tag);
// tag.style.backgroundColor = 'rgba(0, 21, 41, 1)'
// } else {
// var tag = document.getElementsByClassName("main-container")
// // for (let i in tag) {
// tag.style.backgroundColor = ''
// // tag[i].classList.add("default")
// // }
// }
// },
},
methods: { methods: {
handleClickOutside() { handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 13:22:43 * @Date: 2024-05-07 13:22:43
* @LastEditTime: 2024-07-03 14:08:44 * @LastEditTime: 2024-07-05 09:50:14
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -83,7 +83,7 @@ export default {
"<br/>" + "<br/>" +
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${color}'></span>` + `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:14px;'>${params[i].seriesName}</span>` + `<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value ? params[i].value + '片' : 0 + '片'}</span>`; `<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value ? params[i].value + '%' : 0 + '%'}</span>`;
} }
return res; return res;
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-23 15:50:44 * @Date: 2024-05-23 15:50:44
* @LastEditTime: 2024-07-03 14:08:12 * @LastEditTime: 2024-07-05 09:49:35
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -83,7 +83,7 @@ export default {
"<br/>" + "<br/>" +
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${color}'></span>` + `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:14px;'>${params[i].seriesName}</span>` + `<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value ? params[i].value + '片' : 0 + '片'}</span>`; `<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value ? params[i].value + '%' : 0 + '%'}</span>`;
} }
return res; return res;
}, },

View File

@ -88,7 +88,7 @@ export default {
updateThan(val) { updateThan(val) {
console.log(val); console.log(val);
this.than = val; this.than = val;
// this.getMes(); this.getMes()
}, },
updatePeriod(val) { updatePeriod(val) {
this.period = val; this.period = val;

View File

@ -42,10 +42,11 @@ export default {
return { return {
factoryId: 4, // factoryId: 4, //
cityOptions: [ cityOptions: [
"瑞昌",
// "", // "",
"邯郸", "邯郸",
// "", // "",
"瑞昌",
// "", // "",
// "", // "",
// "", // "",

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-26 13:39:22 * @LastEditTime: 2024-07-05 13:28:38
* @LastEditors: DY * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
@ -45,7 +45,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片总功率(MW)</p> <p class="title">芯片总功率(MW)</p>
<p class="text">{{ dataForm.chipTotalPower }}</p> <p class="text">{{ dataForm.chipTotalPower.toFixed(2) }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
@ -73,7 +73,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片产能利用率(%)</p> <p class="title">芯片产能利用率(%)</p>
<p class="text">{{ dataForm.chipCapacityUtilizationRate }}</p> <p class="text">{{ parseFloat(dataForm.chipCapacityUtilizationRate.toFixed(2)) }}</p>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -102,11 +102,11 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件总功率(MW)</p> <p class="title">标准组件总功率(MW)</p>
<p class="text">{{ dataForm.componentTotalPower }}</p> <p class="text">{{ parseFloat(dataForm.componentTotalPower.toFixed(2)) }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">封装产能利用率(%)</p> <p class="title">封装产能利用率(%)</p>
<p class="text">{{ dataForm.componentCapacityUtilizationRate }}</p> <p class="text">{{ parseFloat(dataForm.componentCapacityUtilizationRate.toFixed(2)) }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件人均产量(/)</p> <p class="title">标准组件人均产量(/)</p>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-04 09:28:31 * @LastEditTime: 2024-07-05 09:21:12
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -10,7 +10,7 @@
<div class="app-container" style="padding: 16px 24px 0; height: auto; flex-grow: 1;"> <div class="app-container" style="padding: 16px 24px 0; height: auto; flex-grow: 1;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="type"> <el-form-item label="时间维度" prop="type">
<el-select v-model="listQuery.type" size="small" clearable placeholder="请选择"> <el-select @change="changType" v-model="listQuery.type" size="small" clearable placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -261,6 +261,11 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
changType() {
this.listQuery.endDate = null
this.listQuery.startDate = null
this.listQuery.reportTime = null
},
otherMethods(val) { otherMethods(val) {
this.detailOrUpdateVisible = true; this.detailOrUpdateVisible = true;
this.addOrEditTitle = "详情"; this.addOrEditTitle = "详情";
@ -354,7 +359,7 @@ export default {
this.$message.warning('请选择时间维度!') this.$message.warning('请选择时间维度!')
return return
} }
if (this.listQuery.startDate === undefined) { if (!this.listQuery.startDate) {
this.$message.warning('请选择时间范围!') this.$message.warning('请选择时间范围!')
} else { } else {
await getProduceDataPage(this.listQuery).then(res => { await getProduceDataPage(this.listQuery).then(res => {
@ -364,7 +369,6 @@ export default {
this.listQuery.total = res.data.total this.listQuery.total = res.data.total
} }
}) })
// //
await getproddata(this.listQuery).then(resp => { await getproddata(this.listQuery).then(resp => {
if (resp.data?.length > 0) { if (resp.data?.length > 0) {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-27 14:50:21 * @LastEditTime: 2024-07-05 09:31:40
* @LastEditors: DY * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
@ -69,14 +69,18 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">开始时间</p> <p class="title">开始时间</p>
<p class="text">{{ dataForm.startDate?.length > 0 ? dataForm.startDate[0] + '-' + dataForm.startDate[1] + '-' + dataForm.startDate[2] : '' }}</p> <p class="text">{{ dataForm.startDate?.length > 0 ? dataForm.startDate[0] + '-' + dataForm.startDate[1] + '-'
+ dataForm.startDate[2] : '' }}</p>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">完成时间</p> <p class="title">完成时间</p>
<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>
<div style="width: 100%; padding: 0 32px"><el-divider style="margin: 0"></el-divider></div> <div style="width: 100%; padding: 0 32px">
<el-divider style="margin: 0"></el-divider>
</div>
<el-row :gutter="0" style="margin: 20px 32px"> <el-row :gutter="0" style="margin: 20px 32px">
<el-col :span="8"> <el-col :span="8">
<div> <div>
@ -89,13 +93,15 @@
<el-col :span="16"> <el-col :span="16">
<div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px"> <div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
历史趋势 待制品分布
</small-title> </small-title>
<div ref="line" v-show="dataForm.orderStatus === 2" :style="{ height: '40vh', width: '50vw' }" /> <div ref="equipmentLine" :style="{ height: '40vh', width: '50vw' }" />
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div style="width: 100%; padding: 0 32px"><el-divider style="margin: 0"></el-divider></div> <div style="width: 100%; padding: 0 32px">
<el-divider style="margin: 0"></el-divider>
</div>
<el-row :gutter="0" style="margin: 20px 32px"> <el-row :gutter="0" style="margin: 20px 32px">
<el-col :span="8"> <el-col :span="8">
<div> <div>
@ -106,11 +112,12 @@
</div> </div>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px"> <div v-show="dataForm.orderStatus === 2"
style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
待制品分布 历史趋势
</small-title> </small-title>
<div ref="equipmentLine" :style="{ height: '40vh', width: '50vw' }" /> <div ref="line" :style="{ height: '40vh', width: '50vw' }" />
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -167,17 +174,17 @@ export default {
const pdf = new jsPDF('l', 'pt', 'a4'); const pdf = new jsPDF('l', 'pt', 'a4');
const canvas = document.createElement('canvas') const canvas = document.createElement('canvas')
const element = this.$refs['detail']; const element = this.$refs['detail'];
const width = pdf.internal.pageSize.getWidth() const width = pdf.internal.pageSize.getWidth()
const height = pdf.internal.pageSize.getHeight() const height = pdf.internal.pageSize.getHeight()
canvas.width = width * 2 canvas.width = width * 2
canvas.height = height * 2 canvas.height = height * 2
canvas.style.width = width + 'px' canvas.style.width = width + 'px'
canvas.style.height = height + 'px' canvas.style.height = height + 'px'
const options = { const options = {
// scale: 2, // scale: 2,
dpi: 300, dpi: 300,
@ -193,9 +200,9 @@ export default {
}, },
init(id) { init(id) {
this.visible = true this.visible = true
this.$nextTick(() => { // this.$nextTick(() => {
this.initLineChart() // this.initLineChart()
}) // })
if (id) { if (id) {
getWorkOrderDetail(id).then(res => { getWorkOrderDetail(id).then(res => {
if (res.code === 0) { if (res.code === 0) {
@ -225,7 +232,7 @@ export default {
// this.initEqLineChart(xAxisList, yAxisList) // this.initEqLineChart(xAxisList, yAxisList)
// } // }
// }) // })
} }
}, },
trend() { trend() {
@ -248,9 +255,9 @@ export default {
this.initChart(barList) this.initChart(barList)
// //
const pieList = [ const pieList = [
{ value: data.actualProduction, name: '实际产出' }, { value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' },
{ value: data.wasteNum, name: '废品数量' }, { value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' },
{ value: data.reworkNum, name: '待再加工数量' } { value: data.reworkNum ? data.reworkNum :0, name: '待再加工数量' }
] ]
this.initPieChart(pieList) this.initPieChart(pieList)
}, },
@ -266,11 +273,11 @@ export default {
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: '15%', top: '15%',
left: 0, left: 20,
right: '10%', right: '10%',
bottom: 0, bottom: 0,
containLabel: true containLabel: true
@ -328,7 +335,14 @@ export default {
label: { label: {
show: true, show: true,
position: 'outside', position: 'outside',
formatter: '{d|{d}%} \n {b|{b}}', formatter: (params) => {
console.log(params)
let res = ''
// for (let i in params) {
res += `${params.percent ? params.percent : 0}% \n ${params.name}`
// }
return res
},
rich: { rich: {
d: { d: {
color: 'inherit', // color: 'inherit', //
@ -356,11 +370,11 @@ export default {
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: '15%', top: '15%',
left: 0, left: 30,
right: 0, right: 0,
bottom: 0, bottom: 0,
containLabel: true containLabel: true

View File

@ -176,13 +176,13 @@ export default {
{ {
prop: "queryValue", prop: "queryValue",
label: msg.queryColumn, label: msg.queryColumn,
filter: (val) => (val || val === 0 ? val : "-"), filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
minWidth: 150, minWidth: 150,
}, },
{ {
prop: "target", prop: "target",
label: msg.targetColumn, label: msg.targetColumn,
filter: (val) => (val || val === 0 ? val : "-"), filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
minWidth: 150, minWidth: 150,
}, },
]; ];
@ -231,12 +231,12 @@ export default {
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
if (val[i].unit !== "㎡") { if (val[i].unit !== "㎡") {
xData1.push(val[i].item); xData1.push(val[i].item);
barData1.push(val[i].target || 0); barData1.push(parseFloat(val[i].target.toFixed(2)) || 0);
barData2.push(val[i].queryValue || 0); barData2.push(parseFloat(val[i].queryValue.toFixed(2)) || 0);
} else { } else {
xData2.push(val[i].item); xData2.push(val[i].item);
barData3.push(val[i].target || 0); barData3.push(parseFloat(val[i].target.toFixed(2)) || 0);
barData4.push(val[i].queryValue || 0); barData4.push(parseFloat(val[i].queryValue.toFixed(2)) || 0);
} }
} }
this.chartMsg1.xData = xData1; this.chartMsg1.xData = xData1;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-19 15:28:34 * @Date: 2024-06-19 15:28:34
* @LastEditTime: 2024-07-02 08:41:11 * @LastEditTime: 2024-07-05 13:43:22
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -63,8 +63,9 @@ export default {
: params[i].seriesName === "转化效率" : params[i].seriesName === "转化效率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%" ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1 : params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i].value : 0) + "MW" ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片" : params[i].seriesName.search('BIPV') != -1
? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "㎡" : (params[i].value ? params[i].value : 0) + "片"
}</span>`; }</span>`;
} }
return res; return res;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-20 16:13:36 * @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-07-02 08:40:56 * @LastEditTime: 2024-07-05 13:47:02
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -59,12 +59,13 @@ export default {
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` + `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%" ? (params[i].data.titleValue ? parseFloat(params[i].data.titleValue.toFixed(2)) : 0.0) + "%"
: params[i].seriesName === "转化效率" : params[i].seriesName === "转化效率"
? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%" ? (params[i].data.titleValue ? parseFloat(params[i].data.titleValue.toFixed(2)) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1 : params[i].seriesName.search('总功率') != -1
? (params[i].data.titleValue ? params[i].data.titleValue : 0) + "MW" ? (params[i].data.titleValue ? parseFloat(params[i].data.titleValue.toFixed(2)) : 0) + "MW"
: (params[i].data.titleValue ? params[i].data.titleValue : 0) + "片" : params[i].seriesName.search('BIPV') != -1
? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "㎡" : (params[i].data.titleValue ? params[i].data.titleValue : 0) + "片"
}</span>`; }</span>`;
} }
return res; return res;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-20 16:13:52 * @Date: 2024-06-20 16:13:52
* @LastEditTime: 2024-07-02 08:41:23 * @LastEditTime: 2024-07-05 13:48:12
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -51,7 +51,7 @@ export default {
}, },
}, },
formatter: function (params) { formatter: function (params) {
// console.log('params', params); console.log('params', params);
var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`; var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) { for (var i = 0, l = params.length; i < l; i++) {
res += res +=
@ -61,10 +61,11 @@ export default {
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%" ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName === "转化效率" : params[i].seriesName === "转化效率"
? params[i].value+ "%" ? parseFloat(params[i].value.toFixed(2)) + "%"
: params[i].seriesName.search('总功率') != -1 : params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW" ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片" : params[i].seriesName.search('BIPV') != -1
? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "㎡":(params[i].value ? params[i].value : 0) + "片"
}</span>`; }</span>`;
} }
return res; return res;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-21 09:05:14 * @Date: 2024-06-21 09:05:14
* @LastEditTime: 2024-07-03 16:07:42 * @LastEditTime: 2024-07-05 13:49:59
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -61,11 +61,11 @@ export default {
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[0].color}'></span>` + `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[0].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[0].axisValueLabel}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[0].axisValueLabel}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[0].name === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[0].name === "综合良率"
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%" ? (params[0].value ? parseFloat(params[0].value.toFixed(2)) : 0.0) + "%"
: params[0].name === "转化效率" : params[0].name === "转化效率"
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%" ? (params[0].value ? parseFloat(params[0].value.toFixed(2)) : 0.0) + "%"
: params[0].axisValueLabel.search('总功率') != -1 : params[0].axisValueLabel.search('总功率') != -1
? (params[0].value ? params[0].value : 0) + "MW" ? (params[0].value ? parseFloat(params[0].value.toFixed(2)) : 0) + "MW"
: (params[0].value ? params[0].value : 0) + "片" : (params[0].value ? params[0].value : 0) + "片"
}</span>`; }</span>`;
// } // }
@ -75,11 +75,11 @@ export default {
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[1].color}'></span>` + `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[1].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[1].axisValueLabel}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[1].axisValueLabel}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[1].name === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[1].name === "综合良率"
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%" ? (params[1].value ? parseFloat(params[1].value.toFixed(2)) : 0.0) + "%"
: params[1].name === "转化效率" : params[1].name === "转化效率"
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%" ? (params[1].value ? parseFloat(params[1].value.toFixed(2)) : 0.0) + "%"
: params[1].axisValueLabel.search('总功率') != -1 : params[1].axisValueLabel.search('总功率') != -1
? (params[1].value ? params[1].value : 0) + "MW" ? (params[1].value ? parseFloat(params[1].value.toFixed(2)) : 0) + "MW"
: (params[1].value ? params[1].value : 0) + "片" : (params[1].value ? params[1].value : 0) + "片"
}</span>`; }</span>`;
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-01 14:43:42 * @LastEditTime: 2024-07-05 13:24:58
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -357,10 +357,6 @@ export default {
type: '芯片', type: '芯片',
item: '芯片良率', item: '芯片良率',
unit: '%' unit: '%'
}, {
type: '芯片',
item: '芯片产量',
unit: '片'
}, { }, {
type: '芯片', type: '芯片',
item: '芯片总功率', item: '芯片总功率',
@ -429,7 +425,7 @@ export default {
{ {
type: 'BIPV', type: 'BIPV',
item: 'BIPV产量', item: 'BIPV产量',
unit: 'm2' unit: ''
}, },
{ {
type: 'BIPV', type: 'BIPV',
@ -439,7 +435,7 @@ export default {
{ {
type: 'BIPV', type: 'BIPV',
item: '人均产量', item: '人均产量',
unit: 'm2/人' unit: '/人'
}, },
{ {
type: 'BIPV', type: 'BIPV',
@ -462,6 +458,7 @@ export default {
// this.chartMsg.xData.push(ele.titleValue) // this.chartMsg.xData.push(ele.titleValue)
this.otherProps.push({ this.otherProps.push({
label: ele.titleValue, label: ele.titleValue,
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
prop: 'value' + i prop: 'value' + i
}) })
}) })
@ -470,36 +467,32 @@ export default {
let i = index + 1 let i = index + 1
let m = 'value' + i let m = 'value' + i
// ele.productYieldDataVOList.forEach((item) => { // ele.productYieldDataVOList.forEach((item) => {
dataArr[0]['' + m + ''] = item.ftoInput dataArr[0]['' + m + ''] = item.ftoInput
// dataArr[0].factory = item.factory === 1 ? '' : '' dataArr[1]['' + m + ''] = item.chipYield
// dataArr[1].factory = item.factory === 1 ? '' : '' dataArr[2]['' + m + ''] = item.chipAveragePower
// dataArr[2].factory = item.factory === 1 ? '' : '' dataArr[3]['' + m + ''] = item.chipYieldRate
// dataArr[3].factory = item.factory === 1 ? '' : '' dataArr[4]['' + m + ''] = item.chipTotalPower
dataArr[1]['' + m + ''] = item.chipInput dataArr[5]['' + m + ''] = item.chipCssMarriageRate
dataArr[2]['' + m + ''] = item.chipYield dataArr[6]['' + m + ''] = item.chipOee
dataArr[3]['' + m + ''] = item.chipYieldRate dataArr[7]['' + m + ''] = item.chipCapacityUtilizationRate
dataArr[4]['' + m + ''] = item.chipAveragePower dataArr[8]['' + m + ''] = item.chipAnnualAverageProduction
dataArr[5]['' + m + ''] = item.chipTotalPower dataArr[9]['' + m + ''] = item.chipBom
dataArr[6]['' + m + ''] = item.chipCssMarriageRate dataArr[10]['' + m + ''] = item.componentYield
dataArr[7]['' + m + ''] = item.chipOee dataArr[11]['' + m + ''] = item.componentAveragePower
dataArr[8]['' + m + ''] = item.chipCapacityUtilizationRate dataArr[12]['' + m + ''] = item.componentYieldRate
dataArr[9]['' + m + ''] = item.chipAnnualAverageProduction dataArr[13]['' + m + ''] = item.componentTotalPower
dataArr[10]['' + m + ''] = item.chipBom dataArr[14]['' + m + ''] = item.componentOee
dataArr[11]['' + m + ''] = item.componentYield dataArr[15]['' + m + ''] = item.componentCapacityUtilizationRate
dataArr[12]['' + m + ''] = item.componentAveragePower dataArr[16]['' + m + ''] = item.componentAnnualAverageProduction
dataArr[13]['' + m + ''] = item.componentYieldRate dataArr[17]['' + m + ''] = item.componentBom
dataArr[14]['' + m + ''] = item.componentTotalPower dataArr[18]['' + m + ''] = item.bipvChipUsage
dataArr[15]['' + m + ''] = item.componentOee dataArr[19]['' + m + ''] = item.bipvProductOutput
dataArr[16]['' + m + ''] = item.componentCapacityUtilizationRate dataArr[20]['' + m + ''] = item.bipvChipUtilizationRate
dataArr[17]['' + m + ''] = item.componentAnnualAverageProduction dataArr[21]['' + m + ''] = item.bipvAnnualAverageProduction
dataArr[18]['' + m + ''] = item.componentBom dataArr[22]['' + m + ''] = item.bipvOeeMaterialCost
dataArr[19]['' + m + ''] = item.bipvChipUsage dataArr[23]['' + m + ''] = item.bipvInsideMaterialCost
dataArr[20]['' + m + ''] = item.bipvProductOutput dataArr[24]['' + m + ''] = item.bipvComprehensiveMaterialCost
dataArr[21]['' + m + ''] = item.bipvChipUtilizationRate // dataArr[25]['' + m + ''] = item.bipvComprehensiveMaterialCost
dataArr[22]['' + m + ''] = item.bipvAnnualAverageProduction
dataArr[23]['' + m + ''] = item.bipvOeeMaterialCost
dataArr[24]['' + m + ''] = item.bipvInsideMaterialCost
dataArr[25]['' + m + ''] = item.bipvComprehensiveMaterialCost
// }) // })
// ele.titleValue // ele.titleValue

View File

@ -566,6 +566,7 @@ export default {
this.chartMsg.xData.push(ele.reportTimep) this.chartMsg.xData.push(ele.reportTimep)
this.otherProps.push({ this.otherProps.push({
label: ele.reportTimep, label: ele.reportTimep,
filter: (val) => (val || val === 0 ? val : "-"),
prop: 'value' + i prop: 'value' + i
}) })
}) })
@ -614,18 +615,27 @@ export default {
this.chartMsgYearTarget.series[0].data = [ this.chartMsgYearTarget.series[0].data = [
{ {
value: res.data[0].yearTarget.chipTotalPower, value: res.data[0].yearTarget.chipTotalPower,
label: {
color: '#8EF0AB'
},
itemStyle: { itemStyle: {
color: '#8EF0AB' color: '#8EF0AB'
} }
}, },
{ {
value: res.data[0].yearTarget.componentTotalPower, value: res.data[0].yearTarget.componentTotalPower,
label: {
color: '#288AFF'
},
itemStyle: { itemStyle: {
color: '#288AFF' color: '#288AFF'
} }
}, },
{ {
value: null, value: null,
label: {
color: '#64BDFF'
},
itemStyle: { itemStyle: {
color: '#64BDFF' color: '#64BDFF'
} }
@ -633,18 +643,27 @@ export default {
this.chartMsgYearTarget.series[1].data = [ this.chartMsgYearTarget.series[1].data = [
{ {
value: null, value: null,
label: {
color: '#8EF0AB'
},
itemStyle: { itemStyle: {
color: '#8EF0AB' color: '#8EF0AB'
} }
}, },
{ {
value: null, value: null,
label: {
color: '#288AFF'
},
itemStyle: { itemStyle: {
color: '#288AFF' color: '#288AFF'
} }
}, },
{ {
value: res.data[0].yearTarget.componentConversionEfficiency, value: res.data[0].yearTarget.componentConversionEfficiency,
label: {
color: '#64BDFF'
},
itemStyle: { itemStyle: {
color: '#64BDFF' color: '#64BDFF'
} }

View File

@ -198,7 +198,7 @@ export default {
position: [-18, -16], position: [-18, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value return parseFloat(params.value.toFixed(2))
}, },
}, },
}, },
@ -212,7 +212,7 @@ export default {
position: [0, -16], position: [0, -16],
color: "#288AFF", color: "#288AFF",
formatter: function (params) { formatter: function (params) {
return params.value return parseFloat(params.value.toFixed(2))
}, },
}, },
}, },
@ -261,10 +261,10 @@ export default {
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [-30, -16], position: [-10, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value return parseFloat(params.value.toFixed(2))
}, },
}, },
}, },
@ -279,7 +279,7 @@ export default {
position: [0, -16], position: [0, -16],
color: "#288AFF", color: "#288AFF",
formatter: function (params) { formatter: function (params) {
return params.value return parseFloat(params.value.toFixed(2))
}, },
}, },
}, },
@ -516,6 +516,7 @@ export default {
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " ")) // this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.otherProps.push({ this.otherProps.push({
label: ele.titleValue, label: ele.titleValue,
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
prop: 'value' + i prop: 'value' + i
}) })
}) })
@ -637,7 +638,7 @@ export default {
position: [-18, -16], position: [-18, -16],
color: "rgba(104,196,131)", color: "rgba(104,196,131)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value.toFixed(2)
}, },
}, },
}, { }, {
@ -657,7 +658,7 @@ export default {
position: [-18, -16], position: [-18, -16],
color: "rgba(104,196,131,.5)", color: "rgba(104,196,131,.5)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value.toFixed(2)
}, },
}, },
}) })
@ -666,9 +667,6 @@ export default {
stack: 'b', stack: 'b',
data: [ data: [
{ name: "标准组件总功率完成值", value: obj.componentTotalPower,titleValue:obj.componentTotalPower }, { name: "标准组件总功率完成值", value: obj.componentTotalPower,titleValue:obj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
@ -677,7 +675,7 @@ export default {
position: [0, -16], position: [0, -16],
color: "rgba(40,138,255)", color: "rgba(40,138,255)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value.toFixed(2)
}, },
}, },
}, { }, {
@ -697,15 +695,12 @@ export default {
position: [0, -16], position: [0, -16],
color: "rgba(40,138,255,.5)", color: "rgba(40,138,255,.5)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value.toFixed(2)
}, },
}, },
}) })
console.log('arr', chip,std) console.log('arr', chip,std)
this.chartMsgTarget.series = [...chip, ...std] this.chartMsgTarget.series = [...chip, ...std]
// arr.forEach((ele) => {
// })
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => { res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
// let i = index + 1 // let i = index + 1
this.chartMsgYearTarget.xData.push(ele.titleValue) this.chartMsgYearTarget.xData.push(ele.titleValue)

View File

@ -390,7 +390,7 @@ export default {
{ {
factory: null, factory: null,
item: 'BIPV产量', item: 'BIPV产量',
unit: 'm2' unit: ''
},] },]
} else { } else {
return [{ return [{
@ -647,6 +647,7 @@ export default {
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " ")) // this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.otherProps.push({ this.otherProps.push({
label: ele.titleValue, label: ele.titleValue,
filter: (val) => (val || val === 0 ? val : "-"),
prop: 'value' + i prop: 'value' + i
}) })
}) })
@ -832,7 +833,7 @@ export default {
label: { label: {
show: true, show: true,
color: "rgba(40,138,255)", color: "rgba(40,138,255)",
position: [-18, -16], position: [-10, -16],
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -852,7 +853,7 @@ export default {
// barGap: '-100%', // barGap: '-100%',
label: { label: {
show: true, show: true,
position: [-18, -16], position: [-10, -16],
color: "rgba(40,138,255,.2)", color: "rgba(40,138,255,.2)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value

View File

@ -146,13 +146,12 @@ export default {
chartHeight: this.tableHeight(137) / 2 - 111, chartHeight: this.tableHeight(137) / 2 - 111,
tableH: this.tableHeight(137) / 2 - 70, tableH: this.tableHeight(137) / 2 - 70,
legendList: [ legendList: [
{ {id: 2, name: "FTO投入", type: 1, color: "#8EF0AB" },
id: 1, name: "综合良率", type: 2, color: "#FFCE6A" },
{
id: 2, name: "FTO投入", type: 1, color: "#8EF0AB" },
{ id: 3, name: "芯片产量", type: 1, color: "#288AFF" }, { id: 3, name: "芯片产量", type: 1, color: "#288AFF" },
{ id: 4, name: "标准组件产量", type: 1, color: "#64BDFF" },
{ {
id: 4, name: "标准组件产量", type: 1, color: "#64BDFF" }, id: 1, name: "综合良率", type: 2, color: "#FFCE6A"
},
], ],
legendListTarget: [ legendListTarget: [
{ {
@ -587,6 +586,7 @@ export default {
this.chartMsg.xData.push(ele.titleValue) this.chartMsg.xData.push(ele.titleValue)
this.otherProps.push({ this.otherProps.push({
label: ele.titleValue, label: ele.titleValue,
filter: (val) => (val || val === 0 ? val : "-"),
prop: 'value' + i prop: 'value' + i
}) })
}) })
@ -601,24 +601,36 @@ export default {
this.chartMsgYearTarget.series[0].data = [ this.chartMsgYearTarget.series[0].data = [
{ {
value: item.ftoInput, value: item.ftoInput,
label: {
color: '#8EF0AB'
},
itemStyle: { itemStyle: {
color: '#8EF0AB' color: '#8EF0AB'
} }
}, },
{ {
value: item.chipYield, value: item.chipYield,
label: {
color: '#288AFF'
},
itemStyle: { itemStyle: {
color: '#288AFF' color: '#288AFF'
} }
}, },
{ {
value: item.componentYield, value: item.componentYield,
label: {
color: '#64BDFF'
},
itemStyle: { itemStyle: {
color: '#64BDFF' color: '#64BDFF'
} }
}, },
{ {
value: null, value: null,
label: {
color: '#FFCE6A'
},
itemStyle: { itemStyle: {
color: '#FFCE6A' color: '#FFCE6A'
} }
@ -626,24 +638,36 @@ export default {
this.chartMsgYearTarget.series[1].data = [ this.chartMsgYearTarget.series[1].data = [
{ {
value: null, value: null,
label: {
color: '#8EF0AB'
},
itemStyle: { itemStyle: {
color: '#8EF0AB' color: '#8EF0AB'
} }
}, },
{ {
value: null, value: null,
label: {
color: '#288AFF'
},
itemStyle: { itemStyle: {
color: '#288AFF' color: '#288AFF'
} }
}, },
{ {
value: null, value: null,
label: {
color: '#64BDFF'
},
itemStyle: { itemStyle: {
color: '#64BDFF' color: '#64BDFF'
} }
}, },
{ {
value: item.ftoInput, value: item.ftoInput,
label: {
color: '#FFCE6A'
},
itemStyle: { itemStyle: {
color: '#FFCE6A' color: '#FFCE6A'
} }