2024-09-09 修改了大部分下拉组件为模糊筛选,减轻前端渲染压力

This commit is contained in:
2024-09-09 15:26:17 +08:00
parent fe5d3b70df
commit 563132273c
717 changed files with 107188 additions and 138520 deletions

View File

@@ -0,0 +1,225 @@
<template>
<div class="app-container">
<el-card>
<div style="margin-top: 7px; margin-bottom: 7px">
<span>加工日期{{ dateTime }}</span>
</div>
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1451px" height="750" @sort-change="sortChange">
<el-table-column :width="setColumnWidth('零件名称')" label="零件名称" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('零件名称')" label="图号" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('数量')" label="数量" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('序号')" label="序号" align="center">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('工序')" label="工序" prop="工序" sortable="工序" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.工序 }}
</template>
</el-table-column>
<el-table-column width="180px" label="设备" align="center" prop="设备" sortable="设备" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.设备 }}
</template>
</el-table-column>
<el-table-column width="85px" label="操作者" align="center" prop="操作者" sortable="操作者" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作者 }}
</template>
</el-table-column>
<el-table-column width="127px" label="开始时间" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.开始时间 }}
</template>
</el-table-column>
<el-table-column width="85px" label="完工期限" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.精工期限 }}
</template>
</el-table-column>
<el-table-column width="85px" label="分配时间" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.分配时间 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('产品名称')" label="产品名称" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.产品名称 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('订单号')" label="订单号" align="center" prop="订单号" sortable="订单号" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.订单号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-tooltip :open-delay="700" effect="dark" content="工艺/派工" placement="top">
<el-button type="text" size="mini" style="margin-right: 10px" @click="productionTraceability(scope.row)">生产追溯</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChanges"
@current-change="handleCurrentChanges"/>
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" center width="851px">
<el-table v-loading="loading" :data="tableData1" highlight-current-row border stripe size="small" style="width: 801px;">
<el-table-column :width="setColumnWidth('序号')" label="序号" align="center" prop="序号">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('工序')" label="工序" align="center" prop="工序">
<template slot-scope="scope">
{{ scope.row.工序 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('数量')" label="投产数" align="center">
<template slot-scope="scope">
{{ scope.row.投产数 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('数量')" label="完成数" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.完成数 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('姓名')" label="操作者" align="center">
<template slot-scope="scope">
{{ scope.row.操作者 }}
</template>
</el-table-column>
<el-table-column label="设备" align="center">
<template slot-scope="scope">
{{ scope.row.设备 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('日期时间')" label="开始时间" align="center">
<template slot-scope="scope">
{{ scope.row.开始加工 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('日期时间')" label="结束时间" align="center">
<template slot-scope="scope">
{{ scope.row.完成时间 }}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getNowShotTime } from '@/utils/tool'
export default {
data() {
return {
dateRange: '', // 提交日期
contractStateValue: '', // 合同状态
dialogFormVisible1: false, // 生产追溯
contractState: [
{
value: 2,
label: '未提交'
}, {
value: 1,
label: '提交'
}
], // 合同状态数组
loading: false, // 数据加载
total: 0, // 分页总数
tableData: [], // 合同信息表
tableData1: [], // 生产追溯
pageCurrent: 1, // 分页当前页
pageSize: 100, // 分页每页显示条数
orderName: '', // 排序列名
order: '', // 排序方式
dateTime: getNowShotTime()
}
},
computed: {
...mapGetters([
'id',
'token'
])
},
created() {
this.searchTable()
},
methods: {
searchTable() {
var param = []
param[0] = ['排序名称', this.orderName]
param[1] = ['排序方式', this.order]
var Data = this.CreateData('11', '精工车间_正加工零件_查询', param, this.pageSize, this.pageCurrent)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
})
},
// 生产追溯
productionTraceability(row) {
var param = []
param[0] = ['工艺计划流水号', row.工艺计划流水号]
var Data = this.CreateData('11', '车间生产管理工艺_追溯加工_查询工序', param, this.pageSize, this.pageCurrent)
this.ExecDatabase(Data).then(response => {
this.tableData1 = response.data.rows
this.total = response.data.total
this.dialogFormVisible1 = true
})
},
sortChange(column) {
if (column.prop === '工序') {
this.orderName = 1
} else if (column.prop === '设备') {
this.orderName = 2
} else if (column.prop === '操作者') {
this.orderName = 3
} else if (column.prop === '订单号') {
this.orderName = 4
} else {
this.orderName = 0
}
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = ''
}
this.searchTable()
},
handleSizeChanges(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChanges(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>