Compare commits

..

No commits in common. "c7205e32a370a6a7940238a97757e2f06b741c0f" and "0eb17fa08b16bea65122dffd3cf57282acb72047" have entirely different histories.

12 changed files with 904 additions and 1221 deletions

View File

@ -1,8 +1,8 @@
### ###
# @Author: zhp # @Author: zhp
# @Date: 2024-04-28 13:42:51 # @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-06-21 13:40:38 # @LastEditTime: 2024-06-20 10:16:40
# @LastEditors: zhp # @LastEditors: DY
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
@ -13,7 +13,7 @@ VUE_APP_TITLE = 发电玻璃智能管控平台
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.1.70:30307' # VUE_APP_BASE_API = 'http://192.168.1.70:30307'
# VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
# 闫阳 # 闫阳
# VUE_APP_BASE_API = 'http://192.168.1.81:48080' # VUE_APP_BASE_API = 'http://192.168.1.81:48080'
# 徐 # 徐
@ -24,8 +24,7 @@ VUE_APP_TITLE = 发电玻璃智能管控平台
# VUE_APP_BASE_API = 'http://192.168.1.63:48080' # VUE_APP_BASE_API = 'http://192.168.1.63:48080'
# 张一丁 # 张一丁
# VUE_APP_BASE_API = 'http://192.168.4.139:48080' # VUE_APP_BASE_API = 'http://192.168.4.139:48080'
# 蔡
VUE_APP_BASE_API = 'http://192.168.1.54:48080'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,9 +1,8 @@
<!-- <!--
* @Author: zhp filename: chip-invest.vue
* @Date: 2024-06-03 15:38:31 author: liubin
* @LastEditTime: 2024-06-21 15:06:39 date: 2024-04-10 08:59:28
* @LastEditors: zhp description:
* @Description:
--> -->
<template> <template>
@ -35,7 +34,6 @@ export default {
xAxis: cities, xAxis: cities,
}; };
}, },
computed: { computed: {
series() { series() {
const chipInvest = this.$store.getters.home.chipInvest; const chipInvest = this.$store.getters.home.chipInvest;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 13:42:51 * @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-06-21 15:02:27 * @LastEditTime: 2024-06-14 09:16:09
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -123,30 +123,30 @@ export default {
itemStyle: { itemStyle: {
color: "#f3c000", color: "#f3c000",
}, },
// areaStyle: { areaStyle: {
// color: { color: {
// type: "linear", type: "linear",
// x: 0, x: 0,
// y: 0, y: 0,
// x2: 0, x2: 0,
// y2: 1, y2: 1,
// colorStops: [ colorStops: [
// { {
// offset: 0, offset: 0,
// color: "#f3c000", // 0% color: "#f3c000", // 0%
// }, },
// { {
// offset: 0.55, offset: 0.55,
// color: "#f3c00033", color: "#f3c00033",
// }, },
// { {
// offset: 1, offset: 1,
// color: "transparent", // 100% color: "transparent", // 100%
// }, },
// ], ],
// global: false, // false global: false, // false
// }, },
// }, },
data: [], // this.series[0].data, data: [], // this.series[0].data,
}, },
{ {

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-06-21 14:37:44 * @LastEditTime: 2024-06-20 20:49:07
* @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 +=
@ -63,8 +63,8 @@ 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] : 0) + "MW" ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "MW"
: (params[i].value ? params[i].value : 0) + "片" : params[i].value + "片"
}</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-06-21 14:37:56 * @LastEditTime: 2024-06-20 20:49:23
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -70,8 +70,8 @@ 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] : 0) + "MW" ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "MW"
: (params[i].value ? params[i].value : 0) + "片" : params[i].value + "片"
}</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-06-21 14:37:59 * @LastEditTime: 2024-06-20 20:49:28
* @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 +=
@ -63,8 +63,8 @@ export default {
: params[i].seriesName === "转化效率" : params[i].seriesName === "转化效率"
? params[i].value+ "%" ? params[i].value+ "%"
: params[i].seriesName.search('总功率') != -1 : params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW" ? params[i].value + "MW"
: (params[i].value ? params[i].value : 0) + "片" : params[i].value + "片"
}</span>`; }</span>`;
} }
return res; return res;

View File

@ -1,263 +0,0 @@
<!--
* @Author: zhp
* @Date: 2024-06-21 09:05:14
* @LastEditTime: 2024-06-21 14:38:06
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<!-- 暂无数据 -->
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
v-show="this.chartMsg.series.length === 0"></div>
<!-- 图例 -->
<div v-show="this.chartMsg.series.length > 0">
<div class="legendData" v-if="show">
<span class="itemData" v-for="item in legendList" :key="item.id">
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
<span v-if="item.type === 2" class="line" :style="{ backgroundColor: item.color }">
<span class="line-block" :style="{ backgroundColor: item.color }"></span>
</span>
{{ item.name }}</span>
</div>
<div :id="chartId" :style="{ width: '100%', height: chartHeight + 'px' }"></div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import { debounce } from "@/utils/debounce";
export default {
name: "bmLineBar",
data() {
return {
myChart: "",
option: {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: -30,
right: 0,
bottom: 30,
top: 30,
containLabel:true,
},
tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
formatter: function (params) {
console.log('params', params)
let arr = []
var res = ``;
// for (var i = 0, l = params.length; i < l; i++) {
console.log()
if (params[0].axisValue === 'FTO投入' || params[0].axisValue === '芯片产量' || params[0].axisValue === '标准组件产量') {
res +=
"<br/>" +
`<span style='display:inline-block;margin-right:4px;border-radius:10px;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='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].name === "转化效率"
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
// }
}
if (params[1].axisValue === '综合良率' || params[1].axisValue === '转化效率') {
res +=
"<br/>" +
`<span style='display:inline-block;margin-right:4px;border-radius:10px;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='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].name === "转化效率"
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
}
return res;
},
},
xAxis: {
type: "category",
data: [],
axisTick: {
show: false,
},
axisPointer: {
type: "shadow",
},
},
dataZoom: [//
{
//
show: true,
//
type: "slider",
//
backgroundColor: "rgb(19, 63, 100)",
//
fillerColor: "rgb(16, 171, 198)",
//
borderColor: "rgb(19, 63, 100)",
// detail
showDetail: false,
//
startValue: 0,
//
endValue: 5,
// empty
//
filterMode: "empty",
//
width: "50%",
//
height: 8,
//
left: "center",
//
zoomLoxk: true,
//
handleSize: 0,
// dataZoom-slider
bottom: 3,
},
{
//
//
type: "inside",
//
zoomOnMouseWheel: false,
//
moveOnMouseMove: true,
moveOnMouseWheel: true,
},
],
yAxis:undefined,
series: [],
},
};
},
props: {
chartHeight: {
type: Number,
default: 300,
},
type: {
type: Number,
default: 2,
},
show: {
type: Boolean,
default: true,
},
legendList: {
type: Array,
default: () => [],
},
chartMsg: {
type: Object,
default: () => { },
},
chartId: {
type: String,
default: "bmChart",
},
chartNum: {
type: Number,
default: 1,
},
},
watch: {
chartHeight: {
handler(newVal) {
this.chartHeight = newVal;
},
},
type() {
this.canvasReset();
},
chartNum(val) {
this.canvasReset();
},
chartMsg: {
handler(newVal) {
this.canvasReset();
},
deep: true,
},
},
mounted() {
this.canvasReset();
},
methods: {
canvasReset() {
debounce(() => {
this.getMes();
}, 500)();
},
getMes() {
if (this.myChart) {
this.myChart.dispose();
}
var chartDom = document.getElementById(this.chartId);
this.myChart = echarts.init(chartDom);
this.option.color = this.chartMsg.color;
this.option.xAxis.data = this.chartMsg.xData;
// this.option.yAxis.name = this.chartMsg.yName;
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
this.option.series = this.chartMsg.series;
this.option.yAxis = this.chartMsg.yAxis;
this.myChart.setOption(this.option);
},
},
};
</script>
<style lang="scss">
.legendData {
text-align: right;
position: relative;
// right: 30;
// top: 10px;
.itemData {
display: inline-block;
margin-right: 10px;
font-size: 14px;
color: #8c8c8c;
.block {
width: 10px;
height: 10px;
display: inline-block;
margin-right: 4px;
}
.line {
width: 10px;
height: 10px;
border-radius: 5px;
display: inline-block;
margin-right: 4px;
position: relative;
.line-block {
position: absolute;
width: 20px;
height: 2px;
left: -5px;
top: 4px;
}
}
}
}
</style>

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-06-21 15:18:20 * @LastEditTime: 2024-06-20 20:46:53
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -57,8 +57,8 @@
<el-button type="primary" size="small" plain @click="handleExport">导出</el-button> <el-button type="primary" size="small" plain @click="handleExport">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.pageNo" <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:limit="listQuery.pageSize" :table-data="tableData"> :table-data="tableData">
</base-table> </base-table>
</div> </div>
</div> </div>
@ -86,7 +86,7 @@ export default {
return { return {
factoryList, factoryList,
factoryArray, factoryArray,
currentMenu:'邯郸',
listQuery: { listQuery: {
pageNo: 1, pageNo: 1,
pageSize: 999, pageSize: 999,
@ -147,7 +147,7 @@ export default {
otherProps:[], otherProps:[],
tableData: [], tableData: [],
xAxis: [], xAxis: [],
// currentMenu:null, currentMenu:null,
lineData: {}, lineData: {},
data: {} data: {}
// proLineList: [], // proLineList: [],
@ -200,35 +200,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0;
this.tableData.map((item, index) => {
// console.log(inde);
if (index === 0) {
spanOneArr.push(1);
} else {
//
if (item.type === this.tableData[index - 1].type) {
spanOneArr[concatOne] += 1;
spanOneArr.push(0);
} else {
spanOneArr.push(1);
concatOne = index;
};
}
});
if (columnIndex === 1) {
const _row = spanOneArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col
}
}
},
getYear(e) { getYear(e) {
if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) { if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) {
this.$message({ this.$message({
@ -317,7 +288,7 @@ export default {
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2) this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
this.listQuery.factory = arr this.listQuery.factory = arr
const res = await getComprehensiveDataPage(this.listQuery) const res = await getComprehensiveDataPage(this.listQuery)
// this.tableData = res.data.list this.tableData = res.data.list
let dataArr = [{ let dataArr = [{
type: '芯片', type: '芯片',
item: 'FTO投入', item: 'FTO投入',
@ -441,7 +412,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
console.log(this.otherProps) console.log(this.otherProps)
@ -485,7 +456,6 @@ export default {
// props: 'value' + index + 1, // props: 'value' + index + 1,
// }) // })
}) })
console.log(dataArr);
if (res.data.length === 0) { if (res.data.length === 0) {
this.tableData = [] this.tableData = []
} else { } else {

View File

@ -13,41 +13,54 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator="" <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator=""
start-placeholder="开始日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="changeDayTime" start-placeholder="开始日期" value-format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期">
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy 第 WW 周" <el-date-picker size="small" clearable v-model="start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
placeholder="选择周" style="width: 180px" @change="onValueChange"> style="width: 180px" @change="onValueChange">
</el-date-picker> </el-date-picker>
<el-date-picker size="small" clearable v-model="listQuery.end" type="week" format="yyyy 第 WW 周" <el-date-picker size="small" clearable v-model="end" type="week" format="yyyy 第 WW 周" placeholder="选择周"
placeholder="选择周" style="width: 180px" @change="onValueChange"> style="width: 180px" @change="onValueChange">
</el-date-picker> </el-date-picker>
<!-- <span v-if="listQuery.start && listQuery.end" style="margin-left: 10px"> <!-- <span v-if="start && end" style="margin-left: 10px">
{{ date1 }} {{ date2 }} {{ weekNum }} {{ date1 }} {{ date2 }} {{ weekNum }}
</span> --> </span> -->
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 2" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 2" label="时间值" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange" <el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange" value-format="yyyy-MM-DD"
value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
@change="changeTime">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 3" label="时间" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.start" value-format="yyyy-MM-dd" type="year" <el-date-picker size="small" clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
placeholder="开始时间"> placeholder="开始时间">
</el-date-picker> </el-date-picker>
~ ~
<el-date-picker size="small" clearable v-model="listQuery.end" value-format="yyyy-MM-dd" type="year" <el-date-picker size="small" clearable v-model="listQuery.reportTime[1]" value-format="yyyy" type="year"
placeholder="结束时间" @change="getYear"> placeholder="结束时间" @change="getYear">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<!-- <el-form-item label="玻璃类型" prop="type">
<el-select v-model="listQuery.type" placeholder="请选择玻璃类型">
<el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="玻璃类型" prop="type">
<el-select v-model="listQuery.type" placeholder="请选择玻璃类型">
<el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="getDataList">查询</el-button> <el-button type="primary" size="small" @click="getDataList">查询</el-button>
<el-divider direction="vertical"></el-divider>
<!-- <el-button type="primary" size="small" plain @click="handleImport">导入</el-button> -->
<el-button type="primary" size="small" plain @click="handleExport">导出</el-button> <el-button type="primary" size="small" plain @click="handleExport">导出</el-button>
<!-- <el-button type="success" size="small" plain @click="addFactory">新增</el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -64,7 +77,7 @@
<div class="blueTip"> <div class="blueTip">
{{ title }} {{ title }}
</div> </div>
<produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendListTarget" <produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendList"
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" /> :chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> </el-col>
</el-row> </el-row>
@ -84,8 +97,8 @@
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" /> :chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> --> </el-col> -->
</el-row> </el-row>
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current" <base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size" :table-data="tableData"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" /> :max-height="tableH" />
</div> </div>
<!-- <div class="containerBottom"> <!-- <div class="containerBottom">
@ -97,7 +110,7 @@
import { getProduceTransData, exportProduceTransData } from '@/api/report'; import { getProduceTransData, exportProduceTransData } from '@/api/report';
import bmSearchBar from "./components/bmSearchBar"; import bmSearchBar from "./components/bmSearchBar";
import BmLineBar from "./components/produceLineBar.vue"; import BmLineBar from "./components/produceLineBar.vue";
import produceLineBarYearTarget from "./components/produceLineYieldBarTarget.vue"; import produceLineBarYearTarget from "./components/produceLineBarYearTarget.vue";
import ButtonNav from '@/components/ButtonNav' import ButtonNav from '@/components/ButtonNav'
import moment from 'moment' import moment from 'moment'
@ -106,11 +119,13 @@ export default {
data() { data() {
return { return {
otherProps: [], otherProps: [],
title: '', start: undefined,
currentMenu:'邯郸', end: undefined,
listQuery: { listQuery: {
start: undefined, pageNo: 1,
end: undefined, pageSize: 999,
// size: 10,
// current: 1,
factorys: null, factorys: null,
// total: 0, // total: 0,
date: 2, date: 2,
@ -141,34 +156,19 @@ export default {
tableH: this.tableHeight(137) / 2 - 70, tableH: this.tableHeight(137) / 2 - 70,
legendList: [ legendList: [
{ {
id: 2, name: "芯片总功率", type: 1, color: "#8EF0AB" id: 1, name: "综合良率", type: 2, color: "#FFCE6A"
},
{ id: 3, name: "标准组件总功率", type: 1, color: "#288AFF" },
{
id: 1, name: "转化效率", type: 2, color: "#FFCE6A"
},
// {
// id: 3, name: "", type: 1, color: "#288AFF"
// },
],
legendListTarget: [
{
id: 2, name: "芯片总功率", type: 1, color: "#8EF0AB"
}, },
{ {
id: 3, name: "标准组件总功率", type: 1, color: "#288AFF" id: 2, name: "FTO投入", type: 1, color: "#8EF0AB"
}, },
{ id: 3, name: "芯片产量", type: 1, color: "#288AFF" },
{ {
id: 1, name: "转化效率", type: 1, color: "#64BDFF" id: 3, name: "标准组件产量", type: 1, color: "#288AFF"
}, },
// {
// id: 3, name: "", type: 1, color: "#288AFF"
// },
], ],
chartMsgYearTarget: { chartMsgYearTarget: {
color: ["#8EF0AB", "#288AFF","#64BDFF",], color: ["#8EF0AB", "#288AFF", '#64BDFF', "#FFCE6A",],
xData: ['芯片总功率', '标准组件总功率','转化效率'], xData: [],
// yName: "/%", // yName: "/%",
yAxis: [ yAxis: [
{ {
@ -208,11 +208,17 @@ export default {
color: '#288AFF' color: '#288AFF'
} }
}, },
{
value: 3,
itemStyle: {
color: '#64BDFF'
}
},
{ {
value: 0, value: 0,
yAxisIndex: 1, yAxisIndex: 1,
itemStyle: { itemStyle: {
color: '#64BDFF' color: '#FFCE6A'
} }
}], }],
type: "bar", type: "bar",
@ -222,36 +228,35 @@ export default {
position: [-18, -16], position: [-18, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value + "MW"; return params.value + "";
}, },
}, },
}, },
{ {
name: '', name: '销量折线图',
type: 'bar', type: 'bar',
data: [0, 0, 0, data: [0, 0, 0,
{ {
value: 5, value: 5,
itemStyle: { itemStyle: {
color: '#68C483' color: '#FFCE6A'
} }
}], }],
type: "bar", barWith: "40%",
barWidth: 20,
label: { label: {
show: true, show: true,
position: [-18, -16], position: "top",
color: "#68C483", formatter: "{c}%"
formatter: function (params) { },
return params.value + "%"; lineStyle: {
}, color: "#ffb122"
}, },
yAxisIndex: 1 yAxisIndex: 1
} }
], ],
}, },
chartMsg: { chartMsg: {
color: ["#8EF0AB", "#288AFF","#FFCE6A",], color: ["#8EF0AB", "#288AFF", '#64BDFF', "#FFCE6A",],
xData: [], xData: [],
yName: "", yName: "",
yAxis: [ yAxis: [
@ -276,8 +281,11 @@ export default {
], ],
series: [ series: [
{ {
name: "芯片总功率", name: "FTO投入",
data: [ data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
@ -286,13 +294,16 @@ export default {
position: [-18, -16], position: [-18, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value.toFixed(2) + "MW"; return params.value.toFixed(2) + "%";
}, },
}, },
}, },
{ {
name: "标准组件总功率", name: "芯片产量",
data: [ data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
@ -301,13 +312,34 @@ export default {
position: [0, -16], position: [0, -16],
color: "#288AFF", color: "#288AFF",
formatter: function (params) { formatter: function (params) {
return params.value.toFixed(2) + "MW"; return params.value.toFixed(2) + "%";
}, },
}, },
}, },
{ {
name: "转化效率", name: "标准组件产量",
data: [ data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "#64BDFF",
formatter: function (params) {
return params.value.toFixed(2) + "%";
},
},
},
{
name: "综合良率",
data: [
{ name: "%", value: 85 },
{ name: "%", value: 85 },
{ name: "%", value: 85 },
], ],
type: "line", type: "line",
symbol: "circle", symbol: "circle",
@ -391,69 +423,67 @@ export default {
}, },
mounted() { mounted() {
// this.getOverView() // this.getOverView()
const today = new Date() const currentMonth = new Date()
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000)) this.listQuery.reportTime = [moment(currentMonth).format('yyyy-MM-DD'), moment(currentMonth).format('yyyy-MM-DD')]
this.listQuery.beginTime = moment(sevenDaysAgo).format('yyyy-MM-DD') this.changeTime()
this.listQuery.endTime = moment(today).format('yyyy-MM-DD')
this.listQuery.reportTime = [this.listQuery.beginTime, this.listQuery.endTime]
this.getDataList() this.getDataList()
}, },
methods: { methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0;
this.tableData.map((item, index) => {
// console.log(inde);
if (index === 0) {
spanOneArr.push(1);
} else {
//
if (item.factory === this.tableData[index - 1].factory) {
spanOneArr[concatOne] += 1;
spanOneArr.push(0);
} else {
spanOneArr.push(1);
concatOne = index;
};
}
});
if (columnIndex === 0) {
const _row = spanOneArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col
}
}
},
getYear(e) { getYear(e) {
if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) { if (this.end && Number(this.end) - Number(this.start) > 10) {
this.$message({ this.$message({
message: '年份起止时间不能超过十年', message: '年份起止时间不能超过十年',
type: 'warning' type: 'warning'
}); });
this.listQuery.reportTime = [] this.start = undefined
this.listQuery.start = undefined this.end = undefined
this.listQuery.end = undefined
// console.log(); // console.log();
} else { } else {
this.listQuery.beginTime = this.listQuery.start if (Number(this.end) < Number(this.start)) {
this.listQuery.endTime = this.listQuery.end this.$message({
message: '结束年份不能小于开始年份',
type: 'warning'
});
this.start = undefined
this.end = undefined
} else {
this.listQuery.beginTime = Number(this.start)
this.listQuery.endTime = Number(this.end)
}
} }
if (!this.listQuery.start && !this.listQuery.end) { if (!this.start && !this.end) {
this.listQuery.beginTime = undefined this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined this.listQuery.endTime = undefined
} }
// console.log(e); // console.log(e);
}, },
onValueChange(picker, k) { // k changeTime() {
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1]) if (this.listQuery.reportTime) {
if (this.listQuery.start && this.listQuery.end) {
console.log(this.listQuery.reportTime) console.log(this.listQuery.reportTime)
this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') let start = new Date(this.listQuery.reportTime[0])
this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') let end = new Date(this.listQuery.reportTime[1])
// const years = Number(this.listQuery.reportTime[1].slice(0, 4)) - Number(this.listQuery.reportTime[0].slice(0, 4))
// const months = Number(this.listQuery.reportTime[1].slice(4)) - Number(this.listQuery.reportTime[0].slice(4))
// console.log(years);
if ((end - start) > 31104000000) {
this.$message({
message: '时间范围不能超过24个月',
type: 'warning'
});
this.listQuery.reportTime = [];
} else {
this.listQuery.beginTime = this.listQuery.reportTime[0]
this.listQuery.endTime = this.listQuery.reportTime[1]
}
} else {
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
},
onValueChange(picker, k) { // k
if (this.start && this.end) {
this.date1 = moment(this.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
this.date2 = moment(this.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000); const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
if (numDays > 168) { if (numDays > 168) {
console.log(numDays) console.log(numDays)
@ -462,21 +492,20 @@ export default {
type: 'warning' type: 'warning'
}); });
} else { } else {
this.listQuery.beginTime = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD') this.listQuery.beginTime = this.date1
this.listQuery.endTime = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD') this.listQuery.endTime = this.date2
// this.listQuery.beginTime = Number(moment(this.start.getTime()).format('YYYYWW'))
// this.listQuery.endTime = Number(moment(this.end.getTime()).format('YYYYWW'))
} }
} }
if (!this.listQuery.start && !this.listQuery.end) { if (!this.start && !this.end) {
this.listQuery.beginTime = undefined this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined this.listQuery.endTime = undefined
} }
}, },
changeDayTime() { changeDayTime() {
if (this.listQuery.reportTime) { if (this.listQuery.reportTime) {
// this.createbeginTime = moment(new Date(this.listQuery.reportTime[0]), 'yyyy-MM-dd hh:mm:ss'); const numDays = Number(this.listQuery.reportTime[1]) - Number(this.listQuery.reportTime[0])
// this.createendTime = moment(new Date(this.listQuery.reportTime[1]), 'yyyy-MM-dd hh:mm:ss');
console.log(this.listQuery.reportTime[1])
const numDays = (this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 3600 * 1000);
if (numDays > 30) { if (numDays > 30) {
this.$message({ this.$message({
message: '时间范围不能超过30天', message: '时间范围不能超过30天',
@ -492,23 +521,18 @@ export default {
this.listQuery.endTime = undefined this.listQuery.endTime = undefined
} }
}, },
changeTime(value) { getOverView() {
if (this.listQuery.reportTime) { // getOverView().then(res => {
const numDays = this.listQuery.reportTime[1] - this.listQuery.reportTime[0]; // this.data = res.data
if (numDays > 2 * 365 * 24 * 60 * 60 * 1000) { // console.log('aa', res.data)
this.$message({ // })
message: '时间范围不能超过24个月', },
type: 'warning' otherMethods(val) {
}); this.detailOrUpdateVisible = true;
this.listQuery.reportTime = []; // this.addOrEditTitle = "";
} else { this.$nextTick(() => {
this.listQuery.beginTime = this.listQuery.reportTime[0] // this.$refs.detailOrUpdate.init(val.data.id);
this.listQuery.endTime = this.listQuery.reportTime[1] });
}
} else {
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
}, },
async getDataList() { async getDataList() {
this.otherProps = [] this.otherProps = []
@ -539,49 +563,30 @@ export default {
} }
] ]
res.data.forEach(element => { res.data.forEach(element => {
element.list.reverse().forEach((ele, index) => { element.list.forEach((ele, index) => {
let i = index + 1 let i = index + 1
this.chartMsg.xData.push(ele.reportTimep) this.chartMsg.xData.push(ele.reportTimep)
this.otherProps.push({ this.otherProps.push({
label: ele.reportTimep, label: ele.reportTimep,
prop: 'value' + i props: 'value' + i
}) })
}) })
}) });
if (res.data[0].list.length != 0) { console.log(this.otherProps)
this.chartMsg.xData.push(res.data[0].list[0].reportTimep + '目标') res.data.forEach((ele, index) => {
if (this.listQuery.date === 0 || this.listQuery.date === 1 || this.listQuery.date === 2) { let i = index + 1
this.otherProps.push({ let m = 'value' + i
label: res.data[0].list[0].reportTimep + '目标', ele.list.forEach((item, index) => {
prop: 'dayData'
})
dataArr[0]['dayData'] = res.data[0].list[0].chipTarget
dataArr[1]['dayData'] = res.data[0].list[0].standTarget
dataArr[2]['dayData'] = res.data[0].list[0].conversionEfficiencyTarget
}
if (this.listQuery.date === 2 || this.listQuery.date === 3) {
this.otherProps.push({
label: res.data[0].yearTarget.targetTime,
prop: 'yearData'
})
dataArr[0]['yearData'] = res.data[0].yearTarget.chipTotalPower
dataArr[1]['yearData'] = res.data[0].yearTarget.componentTotalPower
dataArr[2]['yearData'] = res.data[0].yearTarget.componentConversionEfficiency
}
res.data.forEach((ele, index) => {
// let i = index + 1
// let m = 'value' + i
ele.list.forEach((item, index) => {
let i = index + 1 let i = index + 1
let m = 'value' + i let m = 'value' + i
// ele.productionSituationDataVOList.forEach((item) => { // ele.productionSituationDataVOList.forEach((item) => {
dataArr[0]['' + m + ''] = item.chipTotalPowers dataArr[0]['' + m + ''] = item.chipTotalPowers
dataArr[1]['' + m + ''] = item.scTotalPowers
dataArr[2]['' + m + ''] = item.conversionEfficiency
dataArr[0].factory = ele.factory === 1 ? '邯郸' : '瑞昌' dataArr[0].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
dataArr[1].factory = ele.factory === 1 ? '邯郸' : '瑞昌' dataArr[1].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
dataArr[2].factory = ele.factory === 1 ? '邯郸' : '瑞昌' dataArr[2].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
dataArr[3].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
dataArr[1]['' + m + ''] = ele.scTotalPowers
dataArr[2]['' + m + ''] = ele.conversionEfficiency
// dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate // dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate
// }) // })
// ele.titleValue // ele.titleValue
@ -590,77 +595,100 @@ export default {
// props: 'value' + index + 1, // props: 'value' + index + 1,
// }) // })
}) })
}) // ele.productionSituationDataVOList.forEach((item) => {
this.title = res.data[0].yearTarget.targetTime + '目标值' // dataArr[0]['' + m + ''] = item.chipTotalPowers
this.chartMsgYearTarget.series[0].data = [ // dataArr[0].factory = ele.factory === 1 ? '' : ''
{ // dataArr[1].factory = ele.factory === 1 ? '' : ''
value: res.data[0].yearTarget.chipTotalPower, // dataArr[2].factory = ele.factory === 1 ? '' : ''
itemStyle: { // dataArr[3].factory = ele.factory === 1 ? '' : ''
color: '#8EF0AB' // dataArr[1]['' + m + ''] = ele.scTotalPowers
} // dataArr[2]['' + m + ''] = ele.conversionEfficiency
}, // dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate
{ // })
value: res.data[0].yearTarget.componentTotalPower, // ele.titleValue
itemStyle: { // .push({
color: '#288AFF' // label: ele.titleValue,
} // props: 'value' + index + 1,
}, // })
{ })
value: null, for (let i in dataArr[0]) {
itemStyle: { this.chartMsg.series[0].name = dataArr[0]['item']
color: '#64BDFF' if (i.search('value') === 0) {
} this.chartMsg.series[0].data.push({
}] name: dataArr[0]['item'],
this.chartMsgYearTarget.series[1].data = [ name: dataArr[0][i]
{ })
value: null,
itemStyle: {
color: '#8EF0AB'
}
},
{
value: null,
itemStyle: {
color: '#288AFF'
}
},
{
value: res.data[0].yearTarget.componentConversionEfficiency,
itemStyle: {
color: '#64BDFF'
}
}]
console.log(dataArr);
for (let i in dataArr[0]) {
this.chartMsg.series[0].name = dataArr[0]['item']
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i]
})
}
} }
for (let i in dataArr[1]) { }
this.chartMsg.series[1].name = dataArr[1]['item'] for (let i in dataArr[1]) {
if (i.search('value') === 0) { this.chartMsg.series[1].name = dataArr[1]['item']
this.chartMsg.series[1].data.push({ if (i.search('value') === 0) {
name: dataArr[1]['item'], this.chartMsg.series[1].data.push({
value: dataArr[1][i] name: dataArr[1]['item'],
}) name: dataArr[1][i]
} })
} }
for (let i in dataArr[2]) { }
this.chartMsg.series[2].name = dataArr[2]['item'] for (let i in dataArr[2]) {
if (i.search('value') === 0) { this.chartMsg.series[2].name = dataArr[2]['item']
this.chartMsg.series[2].data.push({ if (i.search('value') === 0) {
name: dataArr[2]['item'], this.chartMsg.series[2].data.push({
value: dataArr[2][i] name: dataArr[2]['item'],
}) name: dataArr[2][i]
} })
}
}
for (let i in dataArr[3]) {
this.chartMsg.series[3].name = dataArr[3]['item']
if (i.search('value') === 0) {
this.chartMsg.series[3].data.push({
name: dataArr[3]['item'],
name: dataArr[3][i]
})
}
}
// this.tableProps = otherProps
// res.data.list.forEach((ele) => {
// console.log(ele);
// ele.productionSituationDataVOList.forEach((item) => {
// let obj = {
// bipvProductOutput: item.bipvProductOutput,
// chipYield: item.chipYield,
// componentYield: item.componentYield,
// factory: item.factory,
// ftoInput: item.ftoInput,
// titleValue:ele.titleValue
// }
// dataArr.push(obj)
// })
// })
for (let i in dataArr[0]) {
this.chartMsg.series[0].name = dataArr[0]['item']
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i]
})
}
}
for (let i in dataArr[1]) {
this.chartMsg.series[1].name = dataArr[1]['item']
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: dataArr[1]['item'],
value: dataArr[1][i]
})
}
}
for (let i in dataArr[2]) {
this.chartMsg.series[2].name = dataArr[2]['item']
if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
name: dataArr[2]['item'],
value: dataArr[2][i]
})
} }
} else {
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
} }
// for (let i in dataArr[3]) { // for (let i in dataArr[3]) {
// this.chartMsg.series[3].name = dataArr[3]['item'] // this.chartMsg.series[3].name = dataArr[3]['item']
@ -671,7 +699,16 @@ export default {
// }) // })
// } // }
// } // }
this.tableData =res.data[0].list.length !== 0? dataArr : [] console.log(dataArr)
this.tableData = dataArr
// this.tableProps.push()
this.listQuery.total = res.data.total
if (this.listQuery.total > 0) {
this.tableData.forEach(item => {
item.beginTime = item.beginTime ? item.beginTime[0] + '-' + item.beginTime[1] + '-' + item.beginTime[2] : '--'
item.endTime = item.endTime ? item.endTime[0] + '-' + item.endTime[1] + '-' + item.endTime[2] : '--'
})
}
}, },
_setTableHeight() { _setTableHeight() {
this.tableH = this.tableHeight(137) / 2 - 70; this.tableH = this.tableHeight(137) / 2 - 70;

View File

@ -100,8 +100,8 @@
:chartId="chartId" :chartNum="chartNum" /> :chartId="chartId" :chartNum="chartNum" />
<!-- </el-col> --> <!-- </el-col> -->
</el-row> </el-row>
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current" <base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size" :table-data="tableData"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" /> :max-height="tableH" />
</div> </div>
<!-- <div class="containerBottom"> <!-- <div class="containerBottom">
@ -185,6 +185,9 @@ export default {
{ {
name: "芯片总功率", name: "芯片总功率",
data: [ data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
@ -199,7 +202,11 @@ export default {
}, },
{ {
name: "标准组件总功率", name: "标准组件总功率",
data: [], data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
@ -214,7 +221,7 @@ export default {
], ],
}, },
chartMsgTarget: { chartMsgTarget: {
color: ["#8EF0AB", 'rgba(104, 196, 131, .3)', "#288AFF", 'rgba(40, 138, 255, .2)',], color: [ "#8EF0AB", "#288AFF",'rgba(104, 196, 131, .5)', 'rgba(40, 138, 255, .5)'],
xData: [], xData: [],
yName: "单位/MW", yName: "单位/MW",
yAxis: { yAxis: {
@ -249,6 +256,9 @@ export default {
{ {
name: "芯片总功率", name: "芯片总功率",
data: [ data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
@ -264,6 +274,9 @@ export default {
{ {
name: "标准组件总功率", name: "标准组件总功率",
data: [ data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
@ -368,35 +381,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0;
this.tableData.map((item, index) => {
// console.log(inde);
if (index === 0) {
spanOneArr.push(1);
} else {
//
if (item.factory === this.tableData[index - 1].factory) {
spanOneArr[concatOne] += 1;
spanOneArr.push(0);
} else {
spanOneArr.push(1);
concatOne = index;
};
}
});
if (columnIndex === 0) {
const _row = spanOneArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col
}
}
},
getYear(e) { getYear(e) {
if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) { if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) {
this.$message({ this.$message({
@ -496,7 +480,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
@ -536,100 +520,100 @@ export default {
// }, // },
// },] // },]
let arr = [] let arr = []
let chip = []
let std = []
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => { res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
console.log(ele.titleValue.search('目标')); console.log(ele.titleValue.search('目标'));
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => { ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) { if (ele.titleValue.search('目标') != -1) {
chip.push({ arr.push(
name: "芯片总功率目标值", {
// barGap: '-100%', name: "芯片总功率目标值",
stack: 'a', // barGap: '-100%',
data: [ stack: 'a',
{ name: "芯片总功率目标值", value: item.componentTotalPower }, data: [
// { name: '', value: 22 }, { name: "芯片总功率目标值", value: item.componentTotalPower },
// { name: "%", value: 21.66 }, // { name: '', value: 22 },
// { name: "%", value: 18.4 }, // { name: "%", value: 21.66 },
], // { name: "%", value: 18.4 },
type: "bar", ],
barWidth: 20, type: "bar",
// barGap: '-100%', barWidth: 20,
label: { // barGap: '-100%',
show: true, label: {
position: [-18, -16], show: true,
color: "rgba(104,196,131,.5)", position: [-18, -16],
formatter: function (params) { color: "rgba(104,196,131,.5)",
return params.value formatter: function (params) {
return params.value
},
}, },
}, },
},) {
std.push({ name: "标准组件总功率目标值",
name: "标准组件总功率目标值", stack: 'b',
stack: 'b', data: [
data: [ { name: "标准组件总功率目标值", value: item.componentYield },
{ name: "标准组件总功率目标值", value: item.componentYield }, // { name: '', value: 23 },
// { name: '', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
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
},
}, },
}, })
})
} else { } else {
chip.unshift({ arr.push(
name: "芯片总功率完成值", {
// barGap: '-100%', name: "芯片总功率完成值",
stack: 'a', // barGap: '-100%',
data: [ stack: 'a',
{ name: "芯片总功率完成值", value: item.componentTotalPower }, data: [
// { name: '', value: 55 }, { name: "芯片总功率完成值", value: item.componentTotalPower },
// { name: "%", value: 21.66 }, // { name: '', value: 55 },
// { name: "%", value: 18.4 }, // { name: "%", value: 21.66 },
], // { name: "%", value: 18.4 },
type: "bar", ],
barWidth: 20, type: "bar",
// barGap: '-100%', barWidth: 20,
label: { // barGap: '-100%',
show: true, label: {
position: [-18, -16], show: true,
color: "rgba(104,196,131)", position: [-18, -16],
formatter: function (params) { color: "rgba(104,196,131)",
return params.value formatter: function (params) {
return params.value
},
}, },
}, },
},) {
std.unshift({ name: "标准组件总功率完成值",
name: "标准组件总功率完成值", stack: 'b',
stack: 'b', data: [
data: [ { name: "标准组件总功率完成值", value: item.componentYield },
{ name: "标准组件总功率完成值", value: item.componentYield }, // { name: '', value: 23 },
// { name: '', value: 23 }, // { name: "%", value: 7.02 },
// { name: "%", value: 7.02 }, // { name: "%", value: 80.2 },
// { name: "%", value: 80.2 }, ],
], type: "bar",
type: "bar", barWidth: 20,
barWidth: 20, label: {
label: { show: true,
show: true, 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 },
}, },
}, })
})
} }
// this.chartMsgTarget.series[1].data.push() // this.chartMsgTarget.series[1].data.push()
@ -638,7 +622,7 @@ export default {
}) })
}) })
console.log('arr', arr) console.log('arr', arr)
this.chartMsgTarget.series = [...chip, ...std] this.chartMsgTarget.series = arr
// arr.forEach((ele) => { // arr.forEach((ele) => {
// }) // })
@ -683,7 +667,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
@ -723,100 +707,100 @@ export default {
// }, // },
// },] // },]
let arr = [] let arr = []
let chip = []
let std = []
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) => {
console.log(ele.titleValue.search('目标')); console.log(ele.titleValue.search('目标'));
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => { ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) { if (ele.titleValue.search('目标') != -1) {
chip.push({ arr.push(
name: "芯片总功率目标值", {
// barGap: '-100%', name: "芯片总功率目标值",
stack: 'a', // barGap: '-100%',
data: [ stack: 'a',
{ name: "芯片总功率目标值", value: item.componentTotalPower }, data: [
// { name: '', value: 22 }, // { name: "", value: item.componentTotalPower },
// { name: "%", value: 21.66 }, { name: '芯片总功率目标值', value: 22 },
// { name: "%", value: 18.4 }, // { name: "%", value: 21.66 },
], // { name: "%", value: 18.4 },
type: "bar", ],
barWidth: 20, type: "bar",
// barGap: '-100%', barWidth: 20,
label: { // barGap: '-100%',
show: true, label: {
position: [-18, -16], show: true,
color: "rgba(104,196,131,.5)", position: [-18, -16],
formatter: function (params) { color: "rgba(104,196,131,.5)",
return params.value formatter: function (params) {
return params.value
},
}, },
}, },
},) {
std.push({ name: "标准组件总功率目标值",
name: "标准组件总功率目标值", stack: 'b',
stack: 'b', data: [
data: [ // { name: "", value: item.componentYield },
{ name: "标准组件总功率目标值", value: item.componentYield }, { name: '标准组件总功率目标值', value: 23 },
// { name: '', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
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
},
}, },
}, })
})
} else { } else {
chip.unshift({ arr.push(
name: "芯片总功率完成值", {
// barGap: '-100%', name: "芯片总功率完成值",
stack: 'a', // barGap: '-100%',
data: [ stack: 'a',
{ name: "芯片总功率完成值", value: item.componentTotalPower }, data: [
// { name: '', value: 55 }, // { name: "", value: item.componentTotalPower },
// { name: "%", value: 21.66 }, { name: '芯片总功率完成值', value: 55 },
// { name: "%", value: 18.4 }, // { name: "%", value: 21.66 },
], // { name: "%", value: 18.4 },
type: "bar", ],
barWidth: 20, type: "bar",
// barGap: '-100%', barWidth: 20,
label: { // barGap: '-100%',
show: true, label: {
position: [-18, -16], show: true,
color: "rgba(104,196,131)", position: [-18, -16],
formatter: function (params) { color: "rgba(104,196,131)",
return params.value formatter: function (params) {
return params.value
},
}, },
}, },
},) {
std.unshift({ name: "标准组件总功率完成值",
name: "标准组件总功率完成值", stack: 'b',
stack: 'b', data: [
data: [ // { name: "", value: item.componentYield },
{ name: "标准组件总功率完成值", value: item.componentYield }, { name: '标准组件总功率完成值', value: 23 },
// { name: '', value: 23 }, // { name: "%", value: 7.02 },
// { name: "%", value: 7.02 }, // { name: "%", value: 80.2 },
// { name: "%", value: 80.2 }, ],
], type: "bar",
type: "bar", barWidth: 20,
barWidth: 20, label: {
label: { show: true,
show: true, 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 },
}, },
}, })
})
} }
// this.chartMsgTarget.series[1].data.push() // this.chartMsgTarget.series[1].data.push()
@ -825,7 +809,7 @@ export default {
}) })
}) })
console.log('arr', arr) console.log('arr', arr)
this.chartMsgTarget.series = [...chip,...std] this.chartMsgTarget.series = arr
console.log(this.chartMsg.xData) console.log(this.chartMsg.xData)
res.data.list.forEach((ele, index) => { res.data.list.forEach((ele, index) => {
let i = index + 1 let i = index + 1
@ -850,7 +834,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
console.log(this.otherProps) console.log(this.otherProps)
@ -888,7 +872,7 @@ export default {
} }
} }
} }
this.tableData = res.data.length != 0 ? this.dataArr : [] this.tableData = this.dataArr
// this.tableProps = otherProps // this.tableProps = otherProps
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
// console.log(ele); // console.log(ele);
@ -926,7 +910,7 @@ export default {
console.log("========================="); console.log("=========================");
}, },
handleExport() { handleExport() {
let fileName = "生产情况(MW).xls"; let fileName = "生产情况().xls";
exportProductionSituationMWData(this.listQuery) exportProductionSituationMWData(this.listQuery)
.then((response) => { .then((response) => {
this.$download.excel(response, fileName); this.$download.excel(response, fileName);

View File

@ -100,8 +100,8 @@
:chartId="chartId" :chartNum="chartNum" /> :chartId="chartId" :chartNum="chartNum" />
<!-- </el-col> --> <!-- </el-col> -->
</el-row> </el-row>
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current" <base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size" :table-data="tableData"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" /> :max-height="tableH" />
</div> </div>
<!-- <div class="containerBottom"> <!-- <div class="containerBottom">
@ -160,14 +160,14 @@ 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: 1, name: "FTO投入", type: 1, color: "#8EF0AB" }, { id: 1, name: "FTO投入", type: 1, color: "#FFCE6A" },
{ id: 2, name: "芯片产量", type: 1, color: "#288AFF" }, { id: 2, name: "芯片产量", type: 1, color: "#8EF0AB" },
{ id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" }, { id: 3, name: "标准组件产量", type: 1, color: "#288AFF" },
this.currentMenu == '瑞昌' ? '' : this.currentMenu == '瑞昌' ? '' :
{ id: 4, name: "BIPV产量", type: 1, color: "#7164FF" }, { id: 4, name: "BIPV产量", type: 1, color: "#64BDFF" },
], ],
chartMsgYearTarget: { chartMsgYearTarget: {
color: ["#8EF0AB", "#288AFF", "#64BDFF", '#7164FF'], color: ["#FFCE6A", "#8EF0AB", "#288AFF", '#64BDFF'],
xData: [], xData: [],
yName: "单位/片", yName: "单位/片",
yAxis: { yAxis: {
@ -184,12 +184,15 @@ export default {
{ {
name: "FTO投入", name: "FTO投入",
data: [ data: [
{ name: "%", value: 85 },
{ name: "%", value: 85 },
{ name: "%", value: 85 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
color: "#8EF0AB", color: "#FFAE17",
position: [-18, -16], position: [-18, -16],
formatter: function (params) { formatter: function (params) {
return params.value return params.value
@ -199,13 +202,16 @@ export default {
{ {
name: "芯片产量", name: "芯片产量",
data: [ data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [-18, -16], position: [-18, -16],
color: "#288AFF", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -214,13 +220,16 @@ export default {
{ {
name: "标准组件产量", name: "标准组件产量",
data: [ data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
color: "#64BDFF", color: "#288AFF",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -229,13 +238,17 @@ export default {
this.currentMenu == '瑞昌' ? '' : this.currentMenu == '瑞昌' ? '' :
{ {
name: "BIPV产量", name: "BIPV产量",
data: [], data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
color: "#7164FF", color: "#64BDFF",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -244,7 +257,7 @@ export default {
], ],
}, },
chartMsgTarget: { chartMsgTarget: {
color: [ "#8EF0AB", 'rgba(104, 196, 131, .3)', "#288AFF", 'rgba(40, 138, 255, .2)', "#64BDFF", 'rgba(100,189,255,.3)', '#7164FF', 'rgba(113,100,255,.2)',], color: ["#FFCE6A", "#8EF0AB", "#288AFF", '#64BDFF', 'rgba(255, 174, 23, .5)', 'rgba(104, 196, 131, .5)', 'rgba(40, 138, 255, .5)', 'rgba(100,189,255,.2)'],
xData: [], xData: [],
yName: "单位/片", yName: "单位/片",
yAxis:{ yAxis:{
@ -262,7 +275,7 @@ export default {
], ],
}, },
chartMsg: { chartMsg: {
color: ["#8EF0AB", "#288AFF", "#64BDFF", '#7164FF'], color: ["#FFCE6A", "#8EF0AB", "#288AFF",'#64BDFF'],
xData: [], xData: [],
yName: "单位/片", yName: "单位/片",
yAxis: yAxis:
@ -279,13 +292,16 @@ export default {
{ {
name: "FTO投入", name: "FTO投入",
data: [ data: [
{ name: "%", value: 85 },
{ name: "%", value: 85 },
{ name: "%", value: 85 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [-18, -16], position: [-18, -16],
color: "#8EF0AB", color: "#FFAE17",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -294,13 +310,16 @@ export default {
{ {
name: "芯片产量", name: "芯片产量",
data: [ data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [10, -16], position: [10, -16],
color: "#288AFF", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -309,13 +328,16 @@ export default {
{ {
name: "标准组件产量", name: "标准组件产量",
data: [ data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
color: "#64BDFF", color: "#288AFF",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -324,13 +346,17 @@ export default {
this.currentMenu == '瑞昌' ? '' : this.currentMenu == '瑞昌' ? '' :
{ {
name: "BIPV产量", name: "BIPV产量",
data: [], data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [10, -16], position: [10, -16],
color: "#7164FF", color: "#64BDFF",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
@ -454,35 +480,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0;
this.tableData.map((item, index) => {
// console.log(inde);
if (index === 0) {
spanOneArr.push(1);
} else {
//
if (item.factory === this.tableData[index - 1].factory) {
spanOneArr[concatOne] += 1;
spanOneArr.push(0);
} else {
spanOneArr.push(1);
concatOne = index;
};
}
});
if (columnIndex === 0) {
const _row = spanOneArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col
}
}
},
getYear(e) { getYear(e) {
if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) { if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) {
this.$message({ this.$message({
@ -582,7 +579,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
@ -629,90 +626,63 @@ export default {
// }, // },
// }, // },
// },] // },]
let fto = [] let arr = []
let chip = []
let std = []
let bipv = []
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => { res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
console.log("ele",ele.titleValue); console.log(ele.titleValue.search('目标'));
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
if (ele.titleValue.search('完成') == -1) { ele.productionSituationDataVOList.forEach((item) => {
ele.productionSituationDataVOList.forEach((item) => { if (ele.titleValue.search('目标') != -1) {
console.log(item); arr.push({
// if (ele.titleValue.search('') != -1) {
fto.push({
name: "FTO投入目标值", name: "FTO投入目标值",
data: [ data: [
// s // s
{ name: 'FTO投入目标', value: item.ftoInput }, // { name: 'FTO', value: item.ftoInput },
// { name: 'FTO', value: 11 }, { name: 'FTO投入目标值', value: 11 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
], ],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
stack: 'f', stack:'f',
label: { label: {
show: true, show: true,
position: [-18, -16], position: [-18, -16],
color: "rgba(104,196,131,.3)", color: "rgba(255,174,23,.5)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
},) },
chip.push({
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量目标值", value: item.chipYield },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(40,138,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
std.push({
name: "标准组件产量目标值",
stack: 'b',
data: [
{ name: "标准组件产量目标值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.3)",
formatter: function (params) {
return params.value
},
},
})
bipv.push(this.currentMenu == '瑞昌' ? null :
{ {
name: "BIPV产量目标值", name: "芯片产量目标值",
stack: 'c', // barGap: '-100%',
stack: 'a',
data: [ data: [
{ name: "BIPV产量目标值", value: item.bipvProductOutput }, // { name: "", value: item.chipYield },
// { name: 'BIPV', value: 24 }, { name: '芯片产量目标值', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
},
{
name: "标准组件产量目标值",
stack: 'b',
data: [
// { name: "", value: item.componentYield },
{ name: '标准组件产量目标值', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
], ],
@ -721,27 +691,40 @@ export default {
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
color: "rgba(113,100,255,.2)", color: "rgba(40,138,255,.5)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
},) },
// } else { this.currentMenu == '瑞昌' ? '' :
// } {
}) name: "BIPV产量目标值",
console.log("fto",ele.titleValue,fto); stack: 'c',
} else { data: [
ele.productionSituationDataVOList.forEach((item) => { // { name: "BIPV", value: item.bipvProductOutput },
console.log(item); { name: 'BIPV产量目标值', value: 24 },
// if (ele.titleValue.search('') != -1) { // { name: "%", value: 7.02 },
// } else { // { name: "%", value: 80.2 },
fto.unshift({ ],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
} else {
arr.push({
name: "FTO投入完成值", name: "FTO投入完成值",
data: [ data: [
// s // s
{ name: 'FTO投入完成值', value: item.ftoInput }, // { name: 'FTO', value: item.ftoInput },
// { name: 'FTO', value: 33 }, { name: 'FTO投入完成值', value: 33 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
], ],
@ -751,61 +734,40 @@ export default {
label: { label: {
show: true, show: true,
position: [-18, -16], position: [-18, -16],
color: "rgba(104,196,131)", color: "rgba(255,174,23)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
}) },
chip.unshift({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: item.chipYield },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
})
bipv.unshift(this.currentMenu == '瑞昌' ? null :
{ {
name: "BIPV产量完成值", name: "芯片产量完成值",
stack: 'c', // barGap: '-100%',
stack: 'a',
data: [ data: [
{ name: "BIPV产量完成值", value: item.bipvProductOutput }, // { name: "", value: item.chipYield },
// { name: 'BIPV', value: 32 }, { name: '芯片产量完成值', value:55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
},
{
name: "标准组件产量完成值",
stack: 'b',
data: [
// { name: "", value: item.componentYield },
{ name: '标准组件产量完成值', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
], ],
@ -814,19 +776,42 @@ export default {
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
color: "rgba(113,100,255)", color: "rgba(40,138,255)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
},) },
// } this.currentMenu == '瑞昌' ? '' :
}) {
} name: "BIPV产量完成值",
}) stack: 'c',
data: [
// { name: "BIPV", value: item.bipvProductOutput },
{ name: 'BIPV产量完成值', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255)",
formatter: function (params) {
return params.value
},
},
},)
}
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv] // this.chartMsgTarget.series[1].data.push()
console.log('arr', this.chartMsgTarget.series) // this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
})
console.log('arr', arr)
this.chartMsgTarget.series = arr
// arr.forEach((ele) => { // arr.forEach((ele) => {
// }) // })
@ -885,7 +870,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
@ -932,26 +917,19 @@ export default {
// }, // },
// }, // },
// },] // },]
let fto = [] let arr = []
let chip = [] res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
let std = [] console.log(ele.titleValue.search('目标'));
let bipv = []
res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
// console.log("ele", ele.titleValue);
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
if (ele.titleValue.search('完成') == -1) { ele.productionSituationDataVOList.forEach((item) => {
console.log(ele); if (ele.titleValue.search('目标') != -1) {
ele.productionSituationDataVOList.forEach((item) => { arr.push({
console.log(item);
// if (ele.titleValue.search('') != -1) {
fto.push({
name: "FTO投入目标值", name: "FTO投入目标值",
data: [ data: [
// s // s
{ name: 'FTO投入目标', value: item.ftoInput }, // { name: 'FTO', value: item.ftoInput },
// { name: 'FTO', value: 11 }, { name: 'FTO投入目标值', value: 11 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
], ],
@ -961,62 +939,41 @@ export default {
label: { label: {
show: true, show: true,
position: [-18, -16], position: [-18, -16],
color: "rgba(104,196,131,.3)", color: "rgba(255,174,23,.5)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
},) },
chip.push({
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量目标值", value: item.chipYield },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(40,138,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
std.push({
name: "标准组件产量目标值",
stack: 'b',
data: [
{ name: "标准组件产量目标值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.3)",
formatter: function (params) {
return params.value
},
},
})
bipv.push(this.currentMenu == '瑞昌' ? null :
{ {
name: "BIPV产量目标值", name: "芯片产量目标值",
stack: 'c', // barGap: '-100%',
stack: 'a',
data: [ data: [
{ name: "BIPV产量目标值", value: item.bipvProductOutput }, // { name: "", value: item.chipYield },
// { name: 'BIPV', value: 24 }, { name: '芯片产量目标值', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
},
{
name: "标准组件产量目标值",
stack: 'b',
data: [
// { name: "", value: item.componentYield },
{ name: '标准组件产量目标值', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
], ],
@ -1025,27 +982,40 @@ export default {
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
color: "rgba(113,100,255,.2)", color: "rgba(40,138,255,.5)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
},) },
// } else { this.currentMenu == '瑞昌' ? '' :
// } {
}) name: "BIPV产量目标值",
console.log("fto", ele.titleValue, fto); stack: 'c',
} else { data: [
ele.productionSituationDataVOList.forEach((item) => { // { name: "BIPV", value: item.bipvProductOutput },
console.log(item); { name: 'BIPV产量目标值', value: 24 },
// if (ele.titleValue.search('') != -1) { // { name: "%", value: 7.02 },
// } else { // { name: "%", value: 80.2 },
fto.unshift({ ],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
} else {
arr.push({
name: "FTO投入完成值", name: "FTO投入完成值",
data: [ data: [
// s // s
{ name: 'FTO投入完成值', value: item.ftoInput }, // { name: 'FTO', value: item.ftoInput },
// { name: 'FTO', value: 33 }, { name: 'FTO投入完成值', value: 33 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
// { name: "%", value: 85 }, // { name: "%", value: 85 },
], ],
@ -1055,61 +1025,40 @@ export default {
label: { label: {
show: true, show: true,
position: [-18, -16], position: [-18, -16],
color: "rgba(104,196,131)", color: "rgba(255,174,23)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
}) },
chip.unshift({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: item.chipYield },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
})
bipv.unshift(this.currentMenu == '瑞昌' ? null :
{ {
name: "BIPV产量完成值", name: "芯片产量完成值",
stack: 'c', // barGap: '-100%',
stack: 'a',
data: [ data: [
{ name: "BIPV产量完成值", value: item.bipvProductOutput }, // { name: "", value: item.chipYield },
// { name: 'BIPV', value: 32 }, { name: '芯片产量完成值', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
},
{
name: "标准组件产量完成值",
stack: 'b',
data: [
// { name: "", value: item.componentYield },
{ name: '标准组件产量完成值', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
], ],
@ -1118,18 +1067,43 @@ export default {
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
color: "rgba(113,100,255)", color: "rgba(40,138,255)",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
}, },
}, },
},) },
// } this.currentMenu == '瑞昌' ? '' :
}) {
} name: "BIPV产量完成值",
}) stack: 'c',
data: [
// { name: "BIPV", value: item.bipvProductOutput },
{ name: 'BIPV产量完成值', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255)",
formatter: function (params) {
return params.value
},
},
},)
}
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv] // this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
})
console.log('arr', arr)
this.chartMsgTarget.series = arr
console.log(this.chartMsg.xData)
res.data.list.forEach((ele, index) => { res.data.list.forEach((ele, index) => {
let i = index + 1 let i = index + 1
let m = 'value' + i let m = 'value' + i
@ -1160,7 +1134,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
console.log(this.otherProps) console.log(this.otherProps)
@ -1224,7 +1198,7 @@ export default {
} }
} }
} }
this.tableData = res.data.length != 0 ? this.dataArr : [] this.tableData = this.dataArr
// this.tableProps = otherProps // this.tableProps = otherProps
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
// console.log(ele); // console.log(ele);

View File

@ -64,7 +64,7 @@
<div class="blueTip"> <div class="blueTip">
{{ title }} {{ title }}
</div> </div>
<produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendListTarget" <produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendList"
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" /> :chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> </el-col>
</el-row> </el-row>
@ -84,8 +84,8 @@
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" /> :chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> --> </el-col> -->
</el-row> </el-row>
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current" <base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size" :table-data="tableData"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" /> :max-height="tableH" />
</div> </div>
<!-- <div class="containerBottom"> <!-- <div class="containerBottom">
@ -97,7 +97,7 @@
import { getProductionYieldSituationMWData, exportProductionYieldSituationMWData } from '@/api/report'; import { getProductionYieldSituationMWData, exportProductionYieldSituationMWData } from '@/api/report';
import bmSearchBar from "./components/bmSearchBar"; import bmSearchBar from "./components/bmSearchBar";
import BmLineBar from "./components/produceLineBar.vue"; import BmLineBar from "./components/produceLineBar.vue";
import produceLineBarYearTarget from "./components/produceLineYieldBarTarget.vue"; import produceLineBarYearTarget from "./components/produceLineBarYearTarget.vue";
import ButtonNav from '@/components/ButtonNav' import ButtonNav from '@/components/ButtonNav'
import moment from 'moment' import moment from 'moment'
export default { export default {
@ -145,27 +145,15 @@ export default {
tableH: this.tableHeight(137) / 2 - 70, tableH: this.tableHeight(137) / 2 - 70,
legendList: [ legendList: [
{ {
id: 1, name: "综合良率", type: 2, color: "#FFCE6A" }, id: 1, name: "综合良率", type: 1, color: "#FFCE6A" },
{ {
id: 2, name: "FTO投入", type: 1, color: "#8EF0AB" }, 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" },
], ],
legendListTarget: [
{
id: 2, name: "FTO投入", type: 1, color: "#8EF0AB"
},
{ id: 3, name: "芯片产量", type: 1, color: "#288AFF" },
{
id: 4, name: "标准组件产量", type: 1, color: "#64BDFF"
},
{
id: 1, name: "综合良率", type: 1, color: "#7164FF"
},
],
chartMsgYearTarget: { chartMsgYearTarget: {
color: ["#8EF0AB", "#288AFF", '#64BDFF', "#7164FF",], color: ["#8EF0AB", "#288AFF", '#64BDFF', "#FFCE6A",],
xData: [], xData: [],
// yName: "/%", // yName: "/%",
yAxis: [ yAxis: [
@ -193,7 +181,32 @@ export default {
{ {
name: "", name: "",
// yAxisIndex: 0, // yAxisIndex: 0,
data: [], data: [
{
value: 1,
itemStyle: {
color: '#8EF0AB'
}
},
{
value: 2,
itemStyle: {
color: '#288AFF'
}
},
{
value: 3,
itemStyle: {
color: '#64BDFF'
}
},
{
value: 0,
yAxisIndex: 1,
itemStyle: {
color: '#FFCE6A'
}
}],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
@ -201,26 +214,31 @@ export default {
position: [-18, -16], position: [-18, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value return params.value + "片";
}, },
}, },
}, },
{ // {
name: '', // name: '线',
// type: 'bar', // type: 'bar',
data: [], // data: [ 0,0,0,
type: "bar", // {
barWidth: 20, // value: 5,
label: { // itemStyle: {
show: true, // color: '#FFCE6A'
position: [-18, -16], // }
color: "#68C483", // }],
formatter: function (params) { // barWith: "40%",
return params.value // label: {
}, // show: true,
}, // position: "top",
yAxisIndex: 1 // formatter: "{c}%"
} // },
// lineStyle: {
// color: "#ffb122"
// },
// yAxisIndex: 1
// }
], ],
}, },
chartMsg: { chartMsg: {
@ -252,7 +270,11 @@ export default {
{ {
name: "", name: "",
// yAxisIndex: 0, // yAxisIndex: 0,
data: [], data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
@ -267,7 +289,11 @@ export default {
{ {
name: "", name: "",
// yAxisIndex: 0, // yAxisIndex: 0,
data: [], data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
@ -282,12 +308,17 @@ export default {
{ {
name: "", name: "",
// yAxisIndex: 0, // yAxisIndex: 0,
data: [], data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [0, -16], position: [0, -16],
stack: '标准组件产量',
color: "#64BDFF", color: "#64BDFF",
formatter: function (params) { formatter: function (params) {
return params.value+ "片"; return params.value+ "片";
@ -296,7 +327,11 @@ export default {
}, },
{ {
name: "", name: "",
data: [], data: [
{ name: "%", value: 115 },
{ name: "%", value: 5 },
{ name: "%", value: 8 },
],
type: "line", type: "line",
// barWidth: 20, // barWidth: 20,
symbol: "circle", symbol: "circle",
@ -393,35 +428,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0;
this.tableData.map((item, index) => {
// console.log(inde);
if (index === 0) {
spanOneArr.push(1);
} else {
//
if (item.factory === this.tableData[index - 1].factory) {
spanOneArr[concatOne] += 1;
spanOneArr.push(0);
} else {
spanOneArr.push(1);
concatOne = index;
};
}
});
if (columnIndex === 0) {
const _row = spanOneArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col
}
}
},
getYear(e) { getYear(e) {
if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) { if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) {
this.$message({ this.$message({
@ -537,7 +543,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,
prop: 'value' + i props: 'value' + i
}) })
}) })
this.chartMsgYearTarget.xData.push('FTO投入', '芯片产量', '标准组件产量', '综合良率') this.chartMsgYearTarget.xData.push('FTO投入', '芯片产量', '标准组件产量', '综合良率')
@ -548,56 +554,31 @@ export default {
// this.chartMsgYearTarget.series[1].name = '', // this.chartMsgYearTarget.series[1].name = '',
// this.chartMsgYearTarget.series[2].name = '', // this.chartMsgYearTarget.series[2].name = '',
// this.chartMsgYearTarget.series[3].name = '', // this.chartMsgYearTarget.series[3].name = '',
this.chartMsgYearTarget.series[0].data = [ // this.chartMsgYearTarget.series[0].data = [
{ // {
value: item.ftoInput, // value: item.ftoInput,
itemStyle: { // itemStyle: {
color: '#8EF0AB' // color: '#8EF0AB'
} // }
}, // },
{ // {
value: item.chipYield, // value: item.chipYield,
itemStyle: { // itemStyle: {
color: '#288AFF' // color: '#288AFF'
} // }
}, // },
{ // {
value: item.componentYield, // value: item.componentYield,
itemStyle: { // itemStyle: {
color: '#64BDFF' // color: '#64BDFF'
} // }
}, // },
{ // {
value: null, // value: item.ftoInput,
itemStyle: { // itemStyle: {
color: '#FFCE6A' // color: '#FFCE6A'
} // }
}] // }]
this.chartMsgYearTarget.series[1].data = [
{
value: null,
itemStyle: {
color: '#8EF0AB'
}
},
{
value: null,
itemStyle: {
color: '#288AFF'
}
},
{
value: null,
itemStyle: {
color: '#64BDFF'
}
},
{
value: item.ftoInput,
itemStyle: {
color: '#FFCE6A'
}
}]
// dataArr[0]['' + m + ''] = item.ftoInput // dataArr[0]['' + m + ''] = item.ftoInput
// dataArr[0].factory = item.factory == 1 ? '' : '' // dataArr[0].factory = item.factory == 1 ? '' : ''
// dataArr[1].factory = item.factory == 1 ? '' : '' // dataArr[1].factory = item.factory == 1 ? '' : ''
@ -665,10 +646,13 @@ 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,
prop: 'value' + i props: 'value' + i
}) })
}) })
console.log(this.otherProps) console.log(this.otherProps)
if (this.listQuery.type == 2) {
}
res.data.list.forEach((ele, index) => { res.data.list.forEach((ele, index) => {
let i = index + 1 let i = index + 1
let m = 'value' + i let m = 'value' + i
@ -722,7 +706,7 @@ export default {
} }
console.log(dataArr) console.log(dataArr)
this.tableData = res.data.length != 0 ? dataArr : [] this.tableData = dataArr
// this.tableProps.push() // this.tableProps.push()
this.listQuery.total = res.data.total this.listQuery.total = res.data.total
if (this.listQuery.total > 0) { if (this.listQuery.total > 0) {