Selaa lähdekoodia

2.13

pull/3/head
juzi 1 vuosi sitten
vanhempi
commit
16d7c0c4ad
5 muutettua tiedostoa jossa 108 lisäystä ja 47 poistoa
  1. +0
    -9
      src/api/deviceManagement.js
  2. +1
    -1
      src/views/basicConfig/components/accountAdd.vue
  3. +7
    -0
      src/views/consumablesManagement/inAndOutManagement.vue
  4. +4
    -3
      src/views/deviceManagement/performanceAnalysis/analysisOfPallet.vue
  5. +96
    -34
      src/views/qualityManagement/processFullInspection/particleLineChart.vue

+ 0
- 9
src/api/deviceManagement.js Näytä tiedosto

@@ -39,15 +39,6 @@ export function palletIndicatorGetType(data) {
})
}

// 托盘指标分析
export function palletIndicatorAnalysisType(data) {
return request({
url: '/equipment/PalletIndicatorAnalysis/getType',
method: 'post',
data
})
}

// 备品备件
export function getSparePartStockPage(data) {
return request({


+ 1
- 1
src/views/basicConfig/components/accountAdd.vue Näytä tiedosto

@@ -3,7 +3,6 @@
<el-form-item label="用户名" prop="account">
<el-input
v-model="form.account"
onkeyup="value=value.replace(/[\W]/g,'')"
placeholder="只能输入字母或数字,不可输入汉字"
:disabled="isEdit"
></el-input>
@@ -109,6 +108,7 @@ export default {
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.form.account = this.form.account.replace(/[\W]/g, '')
if (this.isEdit) {
//编辑
accountUpdate({ ...this.form }).then((res) => {


+ 7
- 0
src/views/consumablesManagement/inAndOutManagement.vue Näytä tiedosto

@@ -12,6 +12,7 @@
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
:row-class-name="tableRowClassName"
>
<method-btn
v-if="tableBtn.length"
@@ -297,6 +298,12 @@ export default {
})
}
},
tableRowClassName({ row }) {
if (row.flag && row.flag > 0) {
return 'danger-row'
}
return ''
},
handleCancel() {
this.$refs.inAndOutManagementAdd.formClear()
this.addAndEdit = ''


+ 4
- 3
src/views/deviceManagement/performanceAnalysis/analysisOfPallet.vue Näytä tiedosto

@@ -55,7 +55,7 @@ import { tableHeight } from '@/utils/index'
import palletLevelChart from './../components/palletLevelChart.vue'
import {
palletIndicatorAnalysisPage,
palletIndicatorAnalysisType
palletIndicatorGetType
} from '@/api/deviceManagement'
import { timeFormatter } from '@/utils'
const tableProps = [
@@ -159,7 +159,8 @@ export default {
],
listQuery: {
current: 1,
size: 20
size: 20,
palletId: ''
},
total: 0,
tableProps,
@@ -200,7 +201,7 @@ export default {
},
getLevel() {
// 需要修改ID
palletIndicatorAnalysisType({ id: 1 }).then((res) => {
palletIndicatorGetType({ id: 1 }).then((res) => {
this.tableData2 = []
if (res.code === 0) {
const data = res.data


+ 96
- 34
src/views/qualityManagement/processFullInspection/particleLineChart.vue Näytä tiedosto

@@ -14,7 +14,7 @@
import * as echarts from 'echarts'
import { tableHeight } from '@/utils/index'
import resize from '@/utils/chartMixins/resize'
import { getProcessFull } from '@/api/qualityManagement'
// import { getProcessFull } from '@/api/qualityManagement'
import moment from 'moment'
export default {
name: 'particleLineChart',
@@ -49,12 +49,8 @@ export default {
chartDom: '',
chart: '',
chartHeight: tableHeight(320),
listQuery: {
size: 1000,
current: 1,
checkOutTime: '',
maxLine: ''
}
checkOutTime: '',
maxLine: ''
}
},
mounted() {
@@ -63,15 +59,15 @@ export default {
window.addEventListener('resize', () => {
this.chartHeight = tableHeight(320)
})
this.formConfig[0].defaultSelect = moment().format('YYYY-MM-DDTHH:mm:ss')
this.formConfig[0].defaultSelect = moment().format('YYYY-MM-DD HH:mm:ss')
this.getMsg()
},
methods: {
buttonClick(val) {
console.log(val)
if (val.btnName === 'search') {
this.listQuery.checkOutTime = val.checkOutTime
this.listQuery.maxLine = val.maxLine
this.checkOutTime = val.checkOutTime
this.maxLine = val.maxLine
this.getMsg()
}
},
@@ -83,29 +79,44 @@ export default {
let xlList = []
let sumList = []
let msg = {}
getProcessFull({ ...this.listQuery }).then((res) => {
console.log(res)
if (res.code === 0 && res.data.length > 0) {
res.data.map((item) => {
console.log(item)
time.push(moment(item.hour).format('MM-DD HH:mm:ss'))
sList.push(item.s)
mList.push(item.m)
lList.push(item.l)
xlList.push(item.xl)
sumList.push(item.sum)
})
msg.time = time
msg.sList = sList
msg.mList = mList
msg.lList = lList
msg.xlList = xlList
msg.sumList = sumList
this.getChart(msg)
}
})
for (let i = 0; i < 100; i++) {
time.push(moment().add(1, 'days').format('YYYY-MM-DD HH:mm:ss'))
sList.push(Math.floor(Math.random() * 80 + 10))
mList.push(Math.floor(Math.random() * 80 + 20))
lList.push(Math.floor(Math.random() * 80 + 30))
xlList.push(Math.floor(Math.random() * 80 + 40))
sumList.push(sList[i] + mList[i] + lList[i] + xlList[i])
}
msg.time = time
msg.sList = sList
msg.mList = mList
msg.lList = lList
msg.xlList = xlList
msg.sumList = sumList
this.getChart(msg)
// getProcessFull({ checkOutTime: this.checkOutTime }).then((res) => {
// console.log(res)
// if (res.code === 0 && res.data.length > 0) {
// res.data.map((item) => {
// console.log(item)
// time.push(moment(item.hour).format('MM-DD HH:mm:ss'))
// sList.push(item.s)
// mList.push(item.m)
// lList.push(item.l)
// xlList.push(item.xl)
// sumList.push(item.sum)
// })
// msg.time = time
// msg.sList = sList
// msg.mList = mList
// msg.lList = lList
// msg.xlList = xlList
// msg.sumList = sumList
// this.getChart(msg)
// }
// })
},
getChart(msg) {
getChart1(msg) {
var option = {
color: ['#5AD8A6', '#5B8FF9', '#5D7092', '#F6BD16', '#E8684A'],
title: {
@@ -141,7 +152,7 @@ export default {
Symbol: 'none',
label: {
position: 'end',
formatter: '合格线\n' + this.listQuery.maxLine
formatter: '合格线\n' + this.maxLine
},
data: [
{
@@ -150,7 +161,7 @@ export default {
type: 'dashed',
color: '#0B58FF'
},
yAxis: this.listQuery.maxLine
yAxis: this.maxLine
}
]
}
@@ -178,6 +189,57 @@ export default {
]
}

option && this.chart.setOption(option)
},
getChart(msg) {
console.log(msg)
var option = {
title: {
text: 'Beijing AQI',
left: '1%'
},
tooltip: {
trigger: 'axis'
},
grid: {
left: '5%',
right: '15%',
bottom: '10%'
},
xAxis: msg.time,
yAxis: {},
toolbox: {
right: 10,
feature: {
dataZoom: {
yAxisIndex: 'none'
},
restore: {},
saveAsImage: {}
}
},
dataZoom: [
{
startValue: '2014-06-01'
},
{
type: 'inside'
}
],
visualMap: {
top: 50,
right: 10,
outOfRange: {
color: '#999'
}
},
series: {
name: 'Beijing AQI',
type: 'line',
data: msg.sList
}
}

option && this.chart.setOption(option)
}
}


Ladataan…
Peruuta
Tallenna