瀏覽代碼

更新质量模块

fzq
范志钦 11 月之前
父節點
當前提交
5511837e90
共有 11 個文件被更改,包括 60 次插入26 次删除
  1. +1
    -1
      src/components/base-detail-page/index.vue
  2. +20
    -5
      src/components/base-dialog/addOrUpdate/index.vue
  3. +5
    -0
      src/i18n/en.js
  4. +6
    -0
      src/i18n/zh-CN.js
  5. +2
    -2
      src/views/modules/monitoring/downloadLog.vue
  6. +1
    -0
      src/views/modules/monitoring/equipmentCurrentState.vue
  7. +1
    -1
      src/views/modules/monitoring/productionLine.vue
  8. +14
    -7
      src/views/modules/monitoring/qualityInspectionBoxBtn.vue
  9. +7
    -7
      src/views/modules/monitoring/qualityInspectionCurrent.vue
  10. +1
    -1
      src/views/modules/monitoring/qualityInspectionRecord.vue
  11. +2
    -2
      src/views/modules/monitoring/unloadDetail.vue

+ 1
- 1
src/components/base-detail-page/index.vue 查看文件

@@ -359,7 +359,7 @@ export default {
}).then(({ data: res }) => {
if (res && res.code === 0) {
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)

// LABEL: FILE_RELATED


+ 20
- 5
src/components/base-dialog/addOrUpdate/index.vue 查看文件

@@ -184,6 +184,8 @@ export default {
// },
data() {
return {
//按钮盒用
idMark: 1,
// 按钮防重复点击
isDisabled: false,
COLUMN_PER_ROW,
@@ -411,10 +413,10 @@ export default {
}).then(({ data: res }) => {
if (res && res.code === 0) {
const dataFormKeys = Object.keys(this.dataForm)
console.log('keys ===> ', dataFormKeys)
// console.log('keys ===> ', dataFormKeys)
// console.log('data form keys: ', dataFormKeys, 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
/** 对文件下载进行分流 */
this.fileList = {}
@@ -469,6 +471,9 @@ export default {
this.dataForm[currentField.relatedField] = null
}
this.$emit('select-change', { name, id })

//按钮盒页面用
this.idMark = id
},

handleEditorReady(val) {},
@@ -510,9 +515,19 @@ export default {
}
this.$set(this.dataForm, 'fileIds', fileIds)
}

console.log('before send: ', this.dataForm)

// console.log('this.$route',this.$route);
// 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({
url: this.$http.adornUrl(urls[btn.name].url),
method: btn.name === 'save' ? 'POST' : 'PUT',


+ 5
- 0
src/i18n/en.js 查看文件

@@ -148,6 +148,11 @@ t.status = 'Status'
t.normal = 'Normal'
t.shutdown = 'Shut Down'
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.diagram2 = 'Device Product Sequence Diagram'
t.addr = 'Address'


+ 6
- 0
src/i18n/zh-CN.js 查看文件

@@ -147,10 +147,16 @@ t.status = '状态' // 1
t.normal = '正常' // ?
t.shutdown = '停机' // ?
t.malfunction = '故障' // ?
t.stop = '停止'
t.run = '运行'
t.unknown = '未知'
t.buttonId = '网关号'
t.boxNo = '盒子编号'
t.diagram = '设备状态时序图'
t.diagram2 = '设备产量时序图'
t.addr = '地址' // 1
t.planStop = '计划停机' // ?

t.startTime = '开始时间' // 1
t.endTime = '结束时间' // 1
t.to = '至' // 1


+ 2
- 2
src/views/modules/monitoring/downloadLog.vue 查看文件

@@ -143,7 +143,7 @@ export default {
startTime: '',
endTime: '',
glassNumber: 95,
glassLength: 2272,
glassLength: 2261,
glassWidth: 1128,
glassThick: 3.2,
glassOptions: [{
@@ -255,7 +255,7 @@ export default {
for(let i =0;i<this.dataList.length;i++){
this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
this.dataList[i].glassThickness = this.glassThick
this.dataList[i].glassLength = 2272
this.dataList[i].glassLength = 2261
this.dataList[i].glassWidth = 1128
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


+ 1
- 0
src/views/modules/monitoring/equipmentCurrentState.vue 查看文件

@@ -90,6 +90,7 @@ const tableConfigs = [
prop: 'status',
name: i18n.t('realtime.state'),
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]
}
},


+ 1
- 1
src/views/modules/monitoring/productionLine.vue 查看文件

@@ -61,7 +61,7 @@ const tableConfigs = [
{ prop: 'factoryName', name: i18n.t('factory.title') },
{ prop: 'name', name: i18n.t('pl.name') },
{ 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: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }


+ 14
- 7
src/views/modules/monitoring/qualityInspectionBoxBtn.vue 查看文件

@@ -75,7 +75,7 @@ const tableConfigs = [
},
{ prop: 'inspectionDetContent', name: i18n.t('andeng.inspectContent') }, // 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',
@@ -145,7 +145,9 @@ const addOrUpdateConfigs = {
required: true,
type: 'select',
options: []
}
},
{ name: 'buttonId', label: i18n.t('buttonId') },
{ name: 'boxNo', label: i18n.t('boxNo') }
],
operations: [
{ name: 'cancel', showAlways: true },
@@ -334,14 +336,15 @@ export default {
this.addOrUpdateConfigs.fields.forEach((item) => {
// console.log('item',item)
// console.log('res',res)
if (item.name === 'inspectionDetContent') item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.code }))
// console.log('item',item)
if (item.name === 'inspectionDetContent') item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.id }))
// console.log('this.addOrUpdateConfigs.fields[4].options', this.addOrUpdateConfigs.fields[4].options)
})
} else {
this.addOrUpdateConfigs.fields.forEach((item) => {
if (item.name === 'inspectionDetContent') item.options.splice(0)
})
}
// console.log('this.addOrUpdateConfigs.fields[4]检测内容',this.addOrUpdateConfigs)
})
},
// 每页数
@@ -375,16 +378,20 @@ export default {
}
case 'inspectionDetContent':
// this.dataForm.inspectionDetId = id
// console.log(id)
// console.log('name',name)
// console.log('id',id)
// console.log(this.addOrUpdateConfigs.fields[4].options)
for (var i = 0; i < this.addOrUpdateConfigs.fields[4].options.length; i++) {
if (this.addOrUpdateConfigs.fields[4].options[i].label == id) {
this.dataForm.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('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
// console.log('dataForm', this.dataForm)
// console.log('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
}
},
addSuccess() {


+ 7
- 7
src/views/modules/monitoring/qualityInspectionCurrent.vue 查看文件

@@ -176,7 +176,7 @@ const FakeChart = {
},
defaultOpts: {
handler: function (val) {
console.log('defaullt opts change: ', val)
// console.log('defaullt opts change: ', val)
this.setOptions()
},
immediate: true,
@@ -277,12 +277,12 @@ export default {
})
/** [2] 获取产线检测类型 */
this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
console.log('res: ', res)
// console.log('res: ', res)
/** TODO: 解析 nameData */
this.parseTableProps(res.data.nameData)

this.dataListDynamic = this.parseDynamicData(res.data.data) || []
console.log('this.dataListDynamic', this.dataListDynamic)
// console.log('this.dataListDynamic', this.dataListDynamic)

this.buildGraphData()
})
@@ -337,9 +337,9 @@ export default {
this.echartCheckTypes.forEach((ect) => {
result.push({ name: ect, type: 'bar', data: [] })
})
console.log('result', result)
console.log('echartCheckTypes',this.echartCheckTypes);
console.log('this.echartCategories',this.echartCategories);
// console.log('result', result)
// console.log('echartCheckTypes',this.echartCheckTypes);
// console.log('this.echartCategories',this.echartCategories);
this.dataListDynamic.forEach((inspection, index) => {
// console.log('inspection: ', inspection)
this.echartCategories.forEach((cate) => {
@@ -357,7 +357,7 @@ export default {
// { name: '222', type: 'bar', data: [1, 2, 3] }
// ]

console.log('echarts data: ', this.echartsData)
// console.log('echarts data: ', this.echartsData)
},

fetchList(type, startTime, endTime) {


+ 1
- 1
src/views/modules/monitoring/qualityInspectionRecord.vue 查看文件

@@ -205,7 +205,7 @@ export default {
limit: 9999999
})
}).then(({ data: res }) => {
console.log('insdet:', res)
// console.log('insdet:', res)
const insDetOpt = this.addOrUpdateConfigs.fields.find((item) => item.name === 'inspectionDetId')
if (insDetOpt) {
insDetOpt.options = res.data.list.map((item) => ({ value: item.id, label: item.content })) || []


+ 2
- 2
src/views/modules/monitoring/unloadDetail.vue 查看文件

@@ -110,7 +110,7 @@ export default {
startTime: '',
endTime: '',
glassNumber: 95,
glassLength: 2272,
glassLength: 2261,
glassWidth: 1128,
glassThick: 3.2,
glassOptions: [{
@@ -184,7 +184,7 @@ export default {
for(let i =0;i<this.dataList.length;i++){
this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
this.dataList[i].glassThickness = this.glassThick
this.dataList[i].glassLength = 2272
this.dataList[i].glassLength = 2261
this.dataList[i].glassWidth = 1128
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


Loading…
取消
儲存