yinq 7 months ago
commit 1aaee8921a

@ -36,11 +36,11 @@
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="type" prop="material_MODEL"
label="产品型号"> label="产品型号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="num" prop="q_SUM"
label="问题数量"> label="问题数量">
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -69,56 +69,44 @@ export default {
}, },
data() { data() {
return { return {
total:100, total:0,
form: { form: {
pageNum:1, pageNum:1,
pageSize:10 pageSize:10,
factory:'1301',
productionLine:'CX_02',
date:[]
}, },
option: [ option: [
{ {
value: '11', value: '1301',
label: '工厂一' label: '工厂一'
}, }
{
value: '22',
label: '工厂二'
},
], ],
option1: [ option1: [
{ {
value: '11', value: 'CX_01',
label: '产线一' label: '产线一'
}, },
{ {
value: '22', value: 'CX_02',
label: '产线二' label: '产线二'
}, },
], ],
tableData: [ tableData: []
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
{
type:'1',
num:1,
},
]
} }
}, },
mounted() { 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({ this.$refs.chart1.setData({
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -140,24 +128,16 @@ export default {
}, },
yAxis: { yAxis: {
type: 'category', type: 'category',
data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World'] data: response.data.map(v=>v.material_MODEL).reverse()
}, },
series: [ series: [
{ {
name: '数量', name: '数量',
type: 'bar', 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) { resetForm(formName) {

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

Loading…
Cancel
Save