Compare commits

...

2 次程式碼提交

共有 12 個文件被更改,包括 84 次插入33 次删除

查看文件

@ -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

查看文件

@ -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',

查看文件

@ -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'

查看文件

@ -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

查看文件

@ -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

查看文件

@ -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]
}
},

查看文件

@ -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'] }

查看文件

@ -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() {

查看文件

@ -1,21 +1,34 @@
<template>
<div class="mod-config">
<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
<!-- <el-form-item>
{{ $t('time') }}
</el-form-item>
<el-form-item>
<!-- type="datetimerange" -->
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
<el-date-picker
type="daterange"
v-model="datetime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-ddTHH:mm:ss"
:start-placeholder="$t('startTime')"
:end-placeholder="$t('endTime')"
:range-separator="$t('to')"
:default-time="['00:00:00', '23:59:59']"
:picker-options="quickOptions"
clearable />
</el-form-item> -->
<el-form-item>
{{ $t('startTime') }}
</el-form-item>
<el-form-item>
<el-date-picker v-model="startTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
</el-form-item>
<el-form-item>
{{ $t('endTime') }}
</el-form-item>
<el-form-item>
<el-date-picker v-model="endTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
</el-form-item>
<el-form-item>
<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
@ -176,7 +189,7 @@ const FakeChart = {
},
defaultOpts: {
handler: function (val) {
console.log('defaullt opts change: ', val)
// console.log('defaullt opts change: ', val)
this.setOptions()
},
immediate: true,
@ -222,6 +235,8 @@ export default {
dataType: dict[0], // |
showGraph: false,
datetime: [],
startTime: '',
endTime: '',
quickOptions: {
shortcuts: [
{
@ -267,8 +282,10 @@ export default {
this.echartCategories = null
this.echartCheckTypes.splice(0)
/** 设置默认日期 */
const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss')
const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss')
// const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss')
// const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss')
const startTime = this.startTime
const endTime = this.endTime
/** [1] 获取上下片数据 */
this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
@ -277,12 +294,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 +354,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 +374,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) {

查看文件

@ -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 })) || []

查看文件

@ -134,8 +134,8 @@ export default {
children: [
{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
{ prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') },
{ prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => (val !== '-' ? `${val.toFixed(2)}%` : '-') }
// { prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') },
// { prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => (val !== '-' ? `${val.toFixed(2)}%` : '-') }
]
})
}

查看文件

@ -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