1
This commit is contained in:
@@ -45,9 +45,13 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出当前页</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="width: 100%; display: flex; justify-content: flex-end">
|
||||
<pagination class="mt10" background :pageSizes="[12, 30, 60, 300]" :total="total"
|
||||
:page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
<!-- 统计数据区域 -->
|
||||
<div v-if="statistics" class="statistics-box">
|
||||
<div>总工单: {{ statistics.totalListCount }}</div>
|
||||
@@ -60,9 +64,8 @@
|
||||
</div>
|
||||
<!-- 数据区域 -->
|
||||
<vxe-table size="mini" ref="xTable" border height="860px" :data="dataList" :loading="loading"
|
||||
:row-config="{ isHover: true, isCurrent: true, height: 60 }" :scroll-y="{ enabled: true, gt: 0 }"
|
||||
:column-config="{ resizable: true }" :header-cell-style="headerCellStyle" :export-config="exportConfig"
|
||||
:merge-cells="mergeCells" :cell-style="cellStyle" @menu-click="contextMenuClickEvent"
|
||||
:merge-cells="mergeCells" :cell-style="cellStyle" @menu-click="contextMenuClickEvent" :show-overflow="false"
|
||||
:menu-config="tableMenu">
|
||||
<vxe-colgroup title="工单信息" align="center" fixed="left">
|
||||
<vxe-column field="workOrder" title="工单号" align="center" width="100px" />
|
||||
@@ -74,7 +77,7 @@
|
||||
<vxe-column field="team" title="班组" align="center" />
|
||||
<vxe-column field="requireNumber" title="投入数" align="center" />
|
||||
<vxe-column field="qualifiedNumber" title="合格数" align="center" />
|
||||
<vxe-column field="qualifiedRate" title="合格率" align="center" width="60px" />
|
||||
<vxe-column field="qualifiedRate" title="合格率" align="center" width="70px" />
|
||||
<vxe-column field="polishNumber" title="抛光数" align="center" />
|
||||
<vxe-column field="damoNumber" title="打磨数" align="center" />
|
||||
<vxe-column field="baofeiNumber" title="报废数" align="center" />
|
||||
@@ -111,12 +114,11 @@
|
||||
<!-- 展示缺陷记录 -->
|
||||
<vxe-colgroup v-for="group, index in groupTable" :key="index" :title="group.groupName" align="center">
|
||||
<vxe-column v-for="defect, index in group.children" :key="index" :field="defect.code"
|
||||
:title="defect.name" align="center">
|
||||
:title="defect.name" align="center" width="40px">
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<!-- <pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" /> -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -148,7 +150,7 @@ export default {
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 60,
|
||||
statisticsOrderType: 1,
|
||||
team: '',
|
||||
siteNo: '',
|
||||
@@ -186,8 +188,10 @@ export default {
|
||||
// 数据列表
|
||||
statistics: null,
|
||||
dataList: [],
|
||||
allDataList: [],
|
||||
mergeCells: [],
|
||||
hiddenCells: [],
|
||||
total: 0,
|
||||
// 右键菜单
|
||||
tableMenu: {
|
||||
header: {
|
||||
@@ -287,7 +291,9 @@ export default {
|
||||
|
||||
GetReviseList(this.queryParams).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.data.list;
|
||||
this.allDataList = res.data.list;
|
||||
this.dataList = Object.freeze(res.data.pageList.map(item => Object.freeze(item)))
|
||||
this.total = res.data.total;
|
||||
this.statistics = res.data.statistics;
|
||||
this.mergeTable(3);
|
||||
this.loading = false;
|
||||
@@ -414,13 +420,14 @@ export default {
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
//TODO 导出存在异常,需要修复,现在导出数据都是一个数据
|
||||
const $table = this.$refs.xTable
|
||||
if ($table) {
|
||||
$table.openExport({
|
||||
type: 'xlsx',
|
||||
isMerge: true,
|
||||
isColgroup: true,
|
||||
useStyle: true
|
||||
useStyle: true,
|
||||
})
|
||||
// $table.exportData()
|
||||
// 设置导出类型为 xlsx
|
||||
|
||||
Reference in New Issue
Block a user