更新质量模块
This commit is contained in:
parent
755ad9df30
commit
5511837e90
@ -359,7 +359,7 @@ export default {
|
|||||||
}).then(({ data: res }) => {
|
}).then(({ data: res }) => {
|
||||||
if (res && res.code === 0) {
|
if (res && res.code === 0) {
|
||||||
const dataFormKeys = Object.keys(this.dataForm)
|
const dataFormKeys = Object.keys(this.dataForm)
|
||||||
console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
|
// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
|
||||||
this.dataForm = pick(res.data, dataFormKeys)
|
this.dataForm = pick(res.data, dataFormKeys)
|
||||||
|
|
||||||
// LABEL: FILE_RELATED
|
// LABEL: FILE_RELATED
|
||||||
|
@ -184,6 +184,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
//按钮盒用
|
||||||
|
idMark: 1,
|
||||||
// 按钮防重复点击
|
// 按钮防重复点击
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
COLUMN_PER_ROW,
|
COLUMN_PER_ROW,
|
||||||
@ -411,10 +413,10 @@ export default {
|
|||||||
}).then(({ data: res }) => {
|
}).then(({ data: res }) => {
|
||||||
if (res && res.code === 0) {
|
if (res && res.code === 0) {
|
||||||
const dataFormKeys = Object.keys(this.dataForm)
|
const dataFormKeys = Object.keys(this.dataForm)
|
||||||
console.log('keys ===> ', dataFormKeys)
|
// console.log('keys ===> ', dataFormKeys)
|
||||||
// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
|
// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
|
||||||
this.dataForm = __pick(res.data, dataFormKeys)
|
this.dataForm = __pick(res.data, dataFormKeys)
|
||||||
console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys))
|
// console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys))
|
||||||
// LABEL: FILE_RELATED
|
// LABEL: FILE_RELATED
|
||||||
/** 对文件下载进行分流 */
|
/** 对文件下载进行分流 */
|
||||||
this.fileList = {}
|
this.fileList = {}
|
||||||
@ -469,6 +471,9 @@ export default {
|
|||||||
this.dataForm[currentField.relatedField] = null
|
this.dataForm[currentField.relatedField] = null
|
||||||
}
|
}
|
||||||
this.$emit('select-change', { name, id })
|
this.$emit('select-change', { name, id })
|
||||||
|
|
||||||
|
//按钮盒页面用
|
||||||
|
this.idMark = id
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEditorReady(val) {},
|
handleEditorReady(val) {},
|
||||||
@ -510,9 +515,19 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$set(this.dataForm, 'fileIds', fileIds)
|
this.$set(this.dataForm, 'fileIds', fileIds)
|
||||||
}
|
}
|
||||||
|
// console.log('this.$route',this.$route);
|
||||||
|
// console.log('before send: ', this.dataForm)
|
||||||
|
|
||||||
console.log('before send: ', this.dataForm)
|
//增加质量模块按钮盒多传参数的判断
|
||||||
|
if(this.$route.name == 'monitoring-qualityInspectionBoxBtn'){
|
||||||
|
// console.log('关键',this.configs.fields);
|
||||||
|
for(let i = 0;i<this.configs.fields[4].options.length;i++){
|
||||||
|
if (this.configs.fields[4].options[i].label == this.idMark) {
|
||||||
|
this.dataForm.inspectionDetId = this.configs.fields[4].options[i].inspectionDetId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log('before send: ', this.dataForm)
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(urls[btn.name].url),
|
url: this.$http.adornUrl(urls[btn.name].url),
|
||||||
method: btn.name === 'save' ? 'POST' : 'PUT',
|
method: btn.name === 'save' ? 'POST' : 'PUT',
|
||||||
|
@ -148,6 +148,11 @@ t.status = 'Status'
|
|||||||
t.normal = 'Normal'
|
t.normal = 'Normal'
|
||||||
t.shutdown = 'Shut Down'
|
t.shutdown = 'Shut Down'
|
||||||
t.malfunction = 'Malfunction' // ?
|
t.malfunction = 'Malfunction' // ?
|
||||||
|
t.stop = 'Stop'
|
||||||
|
t.run = 'Run'
|
||||||
|
t.unknown = 'Unknown'
|
||||||
|
t.buttonId = 'Button Number'
|
||||||
|
t.boxNo = 'Box Number'
|
||||||
t.diagram = 'Device Status Sequence Diagram'
|
t.diagram = 'Device Status Sequence Diagram'
|
||||||
t.diagram2 = 'Device Product Sequence Diagram'
|
t.diagram2 = 'Device Product Sequence Diagram'
|
||||||
t.addr = 'Address'
|
t.addr = 'Address'
|
||||||
|
@ -147,10 +147,16 @@ t.status = '状态' // 1
|
|||||||
t.normal = '正常' // ?
|
t.normal = '正常' // ?
|
||||||
t.shutdown = '停机' // ?
|
t.shutdown = '停机' // ?
|
||||||
t.malfunction = '故障' // ?
|
t.malfunction = '故障' // ?
|
||||||
|
t.stop = '停止'
|
||||||
|
t.run = '运行'
|
||||||
|
t.unknown = '未知'
|
||||||
|
t.buttonId = '网关号'
|
||||||
|
t.boxNo = '盒子编号'
|
||||||
t.diagram = '设备状态时序图'
|
t.diagram = '设备状态时序图'
|
||||||
t.diagram2 = '设备产量时序图'
|
t.diagram2 = '设备产量时序图'
|
||||||
t.addr = '地址' // 1
|
t.addr = '地址' // 1
|
||||||
t.planStop = '计划停机' // ?
|
t.planStop = '计划停机' // ?
|
||||||
|
|
||||||
t.startTime = '开始时间' // 1
|
t.startTime = '开始时间' // 1
|
||||||
t.endTime = '结束时间' // 1
|
t.endTime = '结束时间' // 1
|
||||||
t.to = '至' // 1
|
t.to = '至' // 1
|
||||||
|
@ -143,7 +143,7 @@ export default {
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
glassNumber: 95,
|
glassNumber: 95,
|
||||||
glassLength: 2272,
|
glassLength: 2261,
|
||||||
glassWidth: 1128,
|
glassWidth: 1128,
|
||||||
glassThick: 3.2,
|
glassThick: 3.2,
|
||||||
glassOptions: [{
|
glassOptions: [{
|
||||||
@ -255,7 +255,7 @@ export default {
|
|||||||
for(let i =0;i<this.dataList.length;i++){
|
for(let i =0;i<this.dataList.length;i++){
|
||||||
this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
|
this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
|
||||||
this.dataList[i].glassThickness = this.glassThick
|
this.dataList[i].glassThickness = this.glassThick
|
||||||
this.dataList[i].glassLength = 2272
|
this.dataList[i].glassLength = 2261
|
||||||
this.dataList[i].glassWidth = 1128
|
this.dataList[i].glassWidth = 1128
|
||||||
this.dataList[i].endTime = this.dataList[i].endTime == null ? '-' : this.dataList[i].endTime
|
this.dataList[i].endTime = this.dataList[i].endTime == null ? '-' : this.dataList[i].endTime
|
||||||
this.dataList[i].startTime = this.dataList[i].startTime == null ? '-' : this.dataList[i].startTime
|
this.dataList[i].startTime = this.dataList[i].startTime == null ? '-' : this.dataList[i].startTime
|
||||||
|
@ -90,6 +90,7 @@ const tableConfigs = [
|
|||||||
prop: 'status',
|
prop: 'status',
|
||||||
name: i18n.t('realtime.state'),
|
name: i18n.t('realtime.state'),
|
||||||
filter: (val) => {
|
filter: (val) => {
|
||||||
|
if (val == 9) return i18n.t('unknown')
|
||||||
if (val !== null && val !== undefined) return [i18n.t('normal'), i18n.t('planStop'), i18n.t('malfunction')][+val]
|
if (val !== null && val !== undefined) return [i18n.t('normal'), i18n.t('planStop'), i18n.t('malfunction')][+val]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -61,7 +61,7 @@ const tableConfigs = [
|
|||||||
{ prop: 'factoryName', name: i18n.t('factory.title') },
|
{ prop: 'factoryName', name: i18n.t('factory.title') },
|
||||||
{ prop: 'name', name: i18n.t('pl.name') },
|
{ prop: 'name', name: i18n.t('pl.name') },
|
||||||
{ prop: 'code', name: i18n.t('pl.code') },
|
{ prop: 'code', name: i18n.t('pl.code') },
|
||||||
{ prop: 'status', name: i18n.t('pl.status'), filter: (val) => (val === 0 || val === 1 || val === 2) && ['停止', '运行', '未知'][val] },
|
{ prop: 'status', name: i18n.t('pl.status'), filter: (val) => (val === 0 || val === 1 || val === 2) && [i18n.t('stop'), i18n.t('run'), i18n.t('unknown')][val] },
|
||||||
{ prop: 'description', name: i18n.t('desc') },
|
{ prop: 'description', name: i18n.t('desc') },
|
||||||
{ prop: 'remark', name: i18n.t('remark') },
|
{ prop: 'remark', name: i18n.t('remark') },
|
||||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||||
|
@ -75,7 +75,7 @@ const tableConfigs = [
|
|||||||
},
|
},
|
||||||
{ prop: 'inspectionDetContent', name: i18n.t('andeng.inspectContent') }, // name: '检测内容' },
|
{ prop: 'inspectionDetContent', name: i18n.t('andeng.inspectContent') }, // name: '检测内容' },
|
||||||
{ prop: 'keyValue', name: i18n.t('andeng.btnVal') }, // name: '按钮值' },
|
{ prop: 'keyValue', name: i18n.t('andeng.btnVal') }, // name: '按钮值' },
|
||||||
{ prop: 'model', name: i18n.t('andeng.btnBoxModel') }, // name: '按钮盒模式' },
|
{ prop: 'buttonId', name: i18n.t('buttonId') }, // name: '网关号' },
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: 'operations',
|
prop: 'operations',
|
||||||
@ -145,7 +145,9 @@ const addOrUpdateConfigs = {
|
|||||||
required: true,
|
required: true,
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: []
|
options: []
|
||||||
}
|
},
|
||||||
|
{ name: 'buttonId', label: i18n.t('buttonId') },
|
||||||
|
{ name: 'boxNo', label: i18n.t('boxNo') }
|
||||||
],
|
],
|
||||||
operations: [
|
operations: [
|
||||||
{ name: 'cancel', showAlways: true },
|
{ name: 'cancel', showAlways: true },
|
||||||
@ -334,14 +336,15 @@ export default {
|
|||||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||||
// console.log('item',item)
|
// console.log('item',item)
|
||||||
// console.log('res',res)
|
// console.log('res',res)
|
||||||
if (item.name === 'inspectionDetContent') item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.code }))
|
if (item.name === 'inspectionDetContent') item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.id }))
|
||||||
// console.log('item',item)
|
// console.log('this.addOrUpdateConfigs.fields[4].options', this.addOrUpdateConfigs.fields[4].options)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||||
if (item.name === 'inspectionDetContent') item.options.splice(0)
|
if (item.name === 'inspectionDetContent') item.options.splice(0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// console.log('this.addOrUpdateConfigs.fields[4]检测内容',this.addOrUpdateConfigs)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 每页数
|
// 每页数
|
||||||
@ -375,16 +378,20 @@ export default {
|
|||||||
}
|
}
|
||||||
case 'inspectionDetContent':
|
case 'inspectionDetContent':
|
||||||
// this.dataForm.inspectionDetId = id
|
// this.dataForm.inspectionDetId = id
|
||||||
// console.log(id)
|
// console.log('name',name)
|
||||||
|
// console.log('id',id)
|
||||||
// console.log(this.addOrUpdateConfigs.fields[4].options)
|
// console.log(this.addOrUpdateConfigs.fields[4].options)
|
||||||
for (var i = 0; i < this.addOrUpdateConfigs.fields[4].options.length; i++) {
|
for (var i = 0; i < this.addOrUpdateConfigs.fields[4].options.length; i++) {
|
||||||
if (this.addOrUpdateConfigs.fields[4].options[i].label == id) {
|
if (this.addOrUpdateConfigs.fields[4].options[i].label == id) {
|
||||||
this.dataForm.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
|
this.dataForm.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
|
||||||
this.addOrUpdateConfigs.fields.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
|
this.addOrUpdateConfigs.fields.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
|
||||||
|
// this.addOrUpdateConfigs.fields[6].inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
|
||||||
|
// console.log('this.addOrUpdateConfigs.fields.inspectionDetId', this.addOrUpdateConfigs.fields)
|
||||||
|
// this.addOrUpdateConfigs.fields.push({name:'inspectionDetId'})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('dataForm', this.dataForm)
|
// console.log('dataForm', this.dataForm)
|
||||||
console.log('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
|
// console.log('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addSuccess() {
|
addSuccess() {
|
||||||
|
@ -176,7 +176,7 @@ const FakeChart = {
|
|||||||
},
|
},
|
||||||
defaultOpts: {
|
defaultOpts: {
|
||||||
handler: function (val) {
|
handler: function (val) {
|
||||||
console.log('defaullt opts change: ', val)
|
// console.log('defaullt opts change: ', val)
|
||||||
this.setOptions()
|
this.setOptions()
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
@ -277,12 +277,12 @@ export default {
|
|||||||
})
|
})
|
||||||
/** [2] 获取产线检测类型 */
|
/** [2] 获取产线检测类型 */
|
||||||
this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
|
this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
|
||||||
console.log('res: ', res)
|
// console.log('res: ', res)
|
||||||
/** TODO: 解析 nameData */
|
/** TODO: 解析 nameData */
|
||||||
this.parseTableProps(res.data.nameData)
|
this.parseTableProps(res.data.nameData)
|
||||||
|
|
||||||
this.dataListDynamic = this.parseDynamicData(res.data.data) || []
|
this.dataListDynamic = this.parseDynamicData(res.data.data) || []
|
||||||
console.log('this.dataListDynamic', this.dataListDynamic)
|
// console.log('this.dataListDynamic', this.dataListDynamic)
|
||||||
|
|
||||||
this.buildGraphData()
|
this.buildGraphData()
|
||||||
})
|
})
|
||||||
@ -337,9 +337,9 @@ export default {
|
|||||||
this.echartCheckTypes.forEach((ect) => {
|
this.echartCheckTypes.forEach((ect) => {
|
||||||
result.push({ name: ect, type: 'bar', data: [] })
|
result.push({ name: ect, type: 'bar', data: [] })
|
||||||
})
|
})
|
||||||
console.log('result', result)
|
// console.log('result', result)
|
||||||
console.log('echartCheckTypes',this.echartCheckTypes);
|
// console.log('echartCheckTypes',this.echartCheckTypes);
|
||||||
console.log('this.echartCategories',this.echartCategories);
|
// console.log('this.echartCategories',this.echartCategories);
|
||||||
this.dataListDynamic.forEach((inspection, index) => {
|
this.dataListDynamic.forEach((inspection, index) => {
|
||||||
// console.log('inspection: ', inspection)
|
// console.log('inspection: ', inspection)
|
||||||
this.echartCategories.forEach((cate) => {
|
this.echartCategories.forEach((cate) => {
|
||||||
@ -357,7 +357,7 @@ export default {
|
|||||||
// { name: '222', type: 'bar', data: [1, 2, 3] }
|
// { name: '222', type: 'bar', data: [1, 2, 3] }
|
||||||
// ]
|
// ]
|
||||||
|
|
||||||
console.log('echarts data: ', this.echartsData)
|
// console.log('echarts data: ', this.echartsData)
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchList(type, startTime, endTime) {
|
fetchList(type, startTime, endTime) {
|
||||||
|
@ -205,7 +205,7 @@ export default {
|
|||||||
limit: 9999999
|
limit: 9999999
|
||||||
})
|
})
|
||||||
}).then(({ data: res }) => {
|
}).then(({ data: res }) => {
|
||||||
console.log('insdet:', res)
|
// console.log('insdet:', res)
|
||||||
const insDetOpt = this.addOrUpdateConfigs.fields.find((item) => item.name === 'inspectionDetId')
|
const insDetOpt = this.addOrUpdateConfigs.fields.find((item) => item.name === 'inspectionDetId')
|
||||||
if (insDetOpt) {
|
if (insDetOpt) {
|
||||||
insDetOpt.options = res.data.list.map((item) => ({ value: item.id, label: item.content })) || []
|
insDetOpt.options = res.data.list.map((item) => ({ value: item.id, label: item.content })) || []
|
||||||
|
@ -110,7 +110,7 @@ export default {
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
glassNumber: 95,
|
glassNumber: 95,
|
||||||
glassLength: 2272,
|
glassLength: 2261,
|
||||||
glassWidth: 1128,
|
glassWidth: 1128,
|
||||||
glassThick: 3.2,
|
glassThick: 3.2,
|
||||||
glassOptions: [{
|
glassOptions: [{
|
||||||
@ -184,7 +184,7 @@ export default {
|
|||||||
for(let i =0;i<this.dataList.length;i++){
|
for(let i =0;i<this.dataList.length;i++){
|
||||||
this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
|
this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
|
||||||
this.dataList[i].glassThickness = this.glassThick
|
this.dataList[i].glassThickness = this.glassThick
|
||||||
this.dataList[i].glassLength = 2272
|
this.dataList[i].glassLength = 2261
|
||||||
this.dataList[i].glassWidth = 1128
|
this.dataList[i].glassWidth = 1128
|
||||||
this.dataList[i].endTime = this.dataList[i].endTime == null ? '-' : this.dataList[i].endTime
|
this.dataList[i].endTime = this.dataList[i].endTime == null ? '-' : this.dataList[i].endTime
|
||||||
this.dataList[i].startTime = this.dataList[i].startTime == null ? '-' : this.dataList[i].startTime
|
this.dataList[i].startTime = this.dataList[i].startTime == null ? '-' : this.dataList[i].startTime
|
||||||
|
Loading…
Reference in New Issue
Block a user