修改报表

master
夜笙歌 7 months ago
parent 8db45a9056
commit d4f09a115b

@ -36,11 +36,11 @@
width="180">
</el-table-column>
<el-table-column
prop="type"
prop="material_MODEL"
label="产品型号">
</el-table-column>
<el-table-column
prop="num"
prop="q_SUM"
label="问题数量">
</el-table-column>
</el-table>
@ -69,56 +69,44 @@ export default {
},
data() {
return {
total:100,
total:0,
form: {
pageNum:1,
pageSize:10
pageSize:10,
factory:'1301',
productionLine:'CX_02',
date:[]
},
option: [
{
value: '11',
value: '1301',
label: '工厂一'
},
{
value: '22',
label: '工厂二'
},
}
],
option1: [
{
value: '11',
value: 'CX_01',
label: '产线一'
},
{
value: '22',
value: 'CX_02',
label: '产线二'
},
],
tableData: [
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
]
tableData: []
}
},
mounted() {
this.getList()
},
methods: {
getList(){
highFaultList({ beginBeginTime: this.form?.date?.[0], endBeginTime: this.form?.date?.[1]
, FACTORY_CODE: this.form.factory , PRODUCT_LINE_CODE: this.form.productionLine}).then(response => {
//
console.log(response)
this.total = response?.total || 0
this.tableData = response.data
this.$refs.chart1.setData({
tooltip: {
trigger: 'axis',
@ -140,24 +128,16 @@ export default {
},
yAxis: {
type: 'category',
data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World']
data: response.data.map(v=>v.material_MODEL).reverse()
},
series: [
{
name: '数量',
type: 'bar',
data: [18203, 23489, 29034, 104970, 131744, 630230]
data: response.data.map(v=>v.q_SUM).reverse()
},
]
})
},
methods: {
getList(){
highFaultList({ beginBeginTime: '2024-03-28', endBeginTime: '2024-04-28'
, FACTORY_CODE: '1301' , PRODUCT_LINE_CODE: 'CX_02'}).then(response => {
//
console.log(response)
this.loading = false
});
},
resetForm(formName) {

@ -64,7 +64,7 @@ export default {
},
data() {
return {
total: 100,
total: 0,
form: {
year: new Date().getFullYear().toString(),
pageNum: 1,
@ -94,6 +94,7 @@ export default {
methods: {
getList() {
weldLeakRateList({year: this.form.year,}).then(response => {
this.total = response?.total || 0
//
let productLineArr = [...new Set(response.data.map(v => v.PRODUCT_LINE_NAME))]
let data = productLineArr.map(v => {

Loading…
Cancel
Save