This commit is contained in:
2023-04-26 15:27:00 +08:00
parent ae530033e3
commit 65beb245d6
115 changed files with 30 additions and 492 deletions

View File

@@ -23,11 +23,6 @@
<script>
export default {
name: 'DefectScatterPlot',
props: {
detailObj: {
type: Object
}
},
data() {
return {
leftList: [
@@ -54,16 +49,16 @@ export default {
}
},
methods: {
init() {
console.log(this.detailObj)
init(detailObj) {
console.log(detailObj)
for (let i = 0; i < this.leftList.length; i++) {
this.leftList[i].value = this.detailObj[this.leftList[i].key]
? this.detailObj[this.leftList[i].key]
this.leftList[i].value = detailObj[this.leftList[i].key]
? detailObj[this.leftList[i].key]
: null
}
for (let i = 0; i < this.rightList.length; i++) {
this.rightList[i].value = this.detailObj[this.rightList[i].key]
? this.detailObj[this.rightList[i].key]
this.rightList[i].value = detailObj[this.rightList[i].key]
? detailObj[this.rightList[i].key]
: null
}
}

View File

@@ -56,7 +56,7 @@
<div class="bottom">
<div style="margin-bottom: 10px">
<span class="title">合计</span>
<defect-scatter-plot-total />
<defect-scatter-plot-total ref="plotTotal" />
</div>
</div>
</div>
@@ -168,27 +168,7 @@ export default {
{ label: '无法识别', value: 'iisrest' }
],
selectedGlassId: [],
leftList: [
{ name: 'S', value: null, key: 's' },
{ name: 'M', value: null, key: 'm' },
{ name: 'L', value: null, key: 'l' },
{ name: 'XL', value: null, key: 'xl' }
],
rightList: [
{ name: '气泡', value: null, key: 'bl' },
{ name: '变形', value: null, key: 'distortion' },
{ name: '纤维', value: null, key: 'fiber' },
{ name: '划伤', value: null, key: 'scratch' },
{ name: '点状缺陷', value: null, key: 'tin' },
{ name: '结石', value: null, key: 'stone' },
{ name: '铂金', value: null, key: 'pt' },
{ name: '结节', value: null, key: 'knot' },
{ name: '拖尾', value: null, key: 'tail' },
{ name: 'ADG', value: null, key: 'adg' },
{ name: '锡缺陷(顶部)', value: null, key: 'top' },
{ name: '锡缺陷(底部)', value: null, key: 'bottom' },
{ name: '无法识别', value: null, key: 'iisrest' }
]
detailMsg: {}
}
},
mounted() {
@@ -212,26 +192,44 @@ export default {
},
drawPic() {
// 绘图
if (this.selectedGlassId.length === 0) {
this.$message({
message: '请先勾选左侧的玻璃',
type: 'error',
duration: 1500,
onClose: () => {}
})
return false
}
this.getDetail()
drawPoint().then((res) => {
drawPoint({
startTime: this.listQuery.startTime,
endTime: this.listQuery.endTime,
glassId: this.selectedGlassId
}).then((res) => {
console.log(res)
})
},
getDetail() {
// 明细
queryPointClear({
startTime: this.listQuery.startTime,
endTime: this.listQuery.endTime,
glassId: this.selectedGlassId
}).then((res) => {
console.log(res)
if (res.code === 0) {
this.detailMsg = res.data[0] || {}
this.$refs.plotTotal.init(this.detailMsg)
}
})
},
buttonClick(val) {
//查询
console.log(val)
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : ''
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : ''
this.getList()
},
// 左侧列表选择
selectChange(val) {
console.log(val)
let arr = []
@@ -244,8 +242,8 @@ export default {
this.selectedGlassId = []
}
},
// 缺陷选择
selectType(val) {
console.log(val)
if (val === 'pellet') {
this.checkList = ['s', 'm', 'l', 'xl']
} else {

View File

@@ -71,7 +71,6 @@ export default {
]
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
this.getList()
this.getMsg()
},
methods: {