table chart

This commit is contained in:
helloDy
2024-04-03 11:21:37 +08:00
parent 34aeb029b5
commit 21cef13168
46 changed files with 455 additions and 201 deletions

View File

@@ -9,7 +9,8 @@
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData">
:table-data="tableData"
:max-height="tableH">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
@@ -33,6 +34,7 @@ import {
getEqAnalysis,
exportEqAnalysisExcel,
} from '@/api/equipment/analysis/statistics';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [
// {
@@ -52,35 +54,49 @@ const tableProps = [
{
prop: 'lineName',
label: '产线',
width: 150,
showOverflowtooltip: true
},
{
prop: 'sectionName',
label: '工段',
width: 150,
showOverflowtooltip: true
},
{
prop: 'equipmentName',
label: '设备名称',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'equipmentType',
label: '设备类型',
width: 150,
showOverflowtooltip: true
},
{
prop: 'workTime',
label: '工作时间累积(h)',
width: 160,
showOverflowtooltip: true
},
{
prop: 'repairCount',
label: '维修次数',
width: 120,
showOverflowtooltip: true
},
{
prop: 'maintainCount',
label: '保养次数',
width: 120,
showOverflowtooltip: true
},
];
export default {
mixins: [basicPage],
mixins: [basicPage, tableHeightMixin],
data() {
const today = new Date();
@@ -110,7 +126,7 @@ export default {
tableBtn: [].filter((v) => v),
tableData: [],
listQuery: {
pageSize: 10,
pageSize: 20,
pageNo: 1,
total: 1,
recordTime: [

View File

@@ -75,6 +75,12 @@ export default {
},
tooltip: {
trigger: 'item',
formatter: (v) => {
const num = String(v.value)?.split('.').length === 2 ? v.value?.toFixed(2) : v.value
return `<div>
<span>${v.name}: ${num}</span>
</div>`
}
},
legend: {
show: false,

View File

@@ -19,7 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
max-height="600"
:max-height="tableH"
@emitFun="handleEmitFun">
<!-- <method-btn
v-if="tableBtn.length"
@@ -42,14 +42,16 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'ExceptionAnalysis',
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
components: {},
props: {},
data() {
return {
heightNum: 220,
searchBarKeys: ['name', 'code'],
// tableBtn: [
// this.$auth.hasPermi('base:equipment-group:update')

View File

@@ -48,9 +48,11 @@
<script>
import moment from 'moment';
import LineChart from './components/lineChart.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'QualityAnalysis',
mixins: [tableHeightMixin],
components: { LineChart },
props: {},
data() {
@@ -58,7 +60,6 @@ export default {
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
return {
dialogVisible: false,
tableH: this.tableHeight(260),
urls: {
page: '/analysis/equipment-analysis/quality',
},
@@ -254,9 +255,9 @@ export default {
this.fillProductOptions();
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
// window.addEventListener('resize', () => {
// this.tableH = this.tableHeight(260)
// })
this.$refs['search-bar'].headBtnClick('search');
},
methods: {