diff --git a/src/views/modules/pms/carHistory/components/configs/chart.js b/src/views/modules/pms/carHistory/components/configs/chart.js index 0cf4070..b1a2683 100644 --- a/src/views/modules/pms/carHistory/components/configs/chart.js +++ b/src/views/modules/pms/carHistory/components/configs/chart.js @@ -1,15 +1,70 @@ -export default { +const colors = { + line: '#555' +} + +export default (x_data, y_data) => ({ + title: { + text: "窑车温度", + }, + grid: { + show: true, + top: 96, + left: 52, + right: 32, + bottom: 24, + }, xAxis: { - type: 'category', - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + type: "category", + data: Array(65) + .fill(1) + .map((val, index) => { + return val + index; + }), + axisLine: { + lineStyle: { + color: colors.line + }, + }, }, yAxis: { - type: 'value' + type: "value", + name: "温度", + nameTextStyle: { + fontSize: 18, + align: "right", + verticalAlign: "bottom", + lineHeight: 36, + padding: 10, + }, + axisLine: { + show: true, + lineStyle: { + color: colors.line, + }, + }, + axisLabel: { + formatter: '{value} ℃' + }, + splitLine: { + lineStyle: { + color: '#ddd' + } + }, + }, + tooltip: { + trigger: 'axis', + formatter: '位置 ({b}) {c} ℃' + }, + dataZoom: { + type: 'inside' }, series: [ { - data: [150, 230, 224, 218, 135, 147, 260], - type: 'line' - } - ] -}; \ No newline at end of file + data: y_data, + // data: Array(65) + // .fill(1) + // .map((val) => Math.floor(Math.random() * 1000)), + type: "line", + }, + ], +}) \ No newline at end of file diff --git a/src/views/modules/pms/carHistory/components/configs/tableProps.js b/src/views/modules/pms/carHistory/components/configs/tableProps.js index 0fa8c04..311ee92 100644 --- a/src/views/modules/pms/carHistory/components/configs/tableProps.js +++ b/src/views/modules/pms/carHistory/components/configs/tableProps.js @@ -5,10 +5,10 @@ export default [ // { prop: "createTime", label: "添加时间", filter: timeFilter }, // { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent // { prop: "stateDictValue", label: "温度", subcomponent: StateSelect }, - { prop: "code", label: "位置" }, - { prop: "temp1", label: "温度" }, - { prop: "press1", label: "窑内压力" }, - { prop: "press2", label: "车下压力" }, + { width: 60, prop: "code", label: "位置" }, + { width: 60, prop: "temp1", label: "温度" }, + { width: 80, prop: "press1", label: "窑内压力" }, + { width: 80, prop: "press2", label: "车下压力" }, { prop: "createTime", label: "时间", filter: timeFilter }, // { prop: "endTime", label: "结束时间", filter: timeFilter }, // { diff --git a/src/views/modules/pms/carHistory/components/temperatureDialog.vue b/src/views/modules/pms/carHistory/components/temperatureDialog.vue index 2b5f083..cfa109b 100644 --- a/src/views/modules/pms/carHistory/components/temperatureDialog.vue +++ b/src/views/modules/pms/carHistory/components/temperatureDialog.vue @@ -36,7 +36,7 @@