Browse Source

质检+utable优化

faster_develop
安虹睿 2 years ago
parent
commit
23dfa2ddbc
  1. 2
      fe/PC/public/version.json
  2. 30
      fe/PC/src/components/umyTable/index.vue
  3. 30
      fe/PC/src/router/index.js
  4. 4
      fe/PC/src/views/activeReportManage/reportForm/InventoryBookDetail_innerPage.vue
  5. 182
      fe/PC/src/views/ceshi/ceshi.vue
  6. 34
      fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue

2
fe/PC/public/version.json

@ -1,3 +1,3 @@
{
"version": "1.0.69"
"version": "1.0.70"
}

30
fe/PC/src/components/umyTable/index.vue

@ -2,21 +2,22 @@
<!-- 解决el-table 数据量过大导致卡顿现象 -->
<u-table
:id="_uid"
:key="isUpdate"
v-loading="tableLoading"
element-loading-text="拼命加载中..."
@sort-change="sortChange"
@selection-change="handleSelectionChange"
ref="multipleTable"
:data="tableData"
:height="uTableHeight"
:row-key="rowKey"
:border="tableBorder"
style="width: 100%"
:cell-style="cellStyle"
use-virtual
:key="isUpdate"
:row-height="50"
:height="uTableHeight"
header-row-class-name="uTableHeader"
use-virtual
:cell-class-name="cellClassName"
>
<!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式-->
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" />
@ -29,8 +30,8 @@
:fixed="setItemFixed(item,index)"
:show-overflow-tooltip="showOverflowTooltip"
:width="item.width"
:align="item.tableAlign"
:header-align="item.tableHeaderAlign"
:align="item.tableAlign || tableAlign"
:header-align="item.tableHeaderAlign || tableHeaderAlign"
v-if="item.istrue==null?true:item.istrue"
>
<template #header>
@ -416,6 +417,14 @@ export default {
type: Boolean,
default: false,
},
tableAlign:{
type: String,
default: 'left',
},
tableHeaderAlign:{
type: String,
default: 'left',
},
// itemfixed
firstFixed: {
type: Boolean,
@ -484,6 +493,12 @@ export default {
return Function;
}
},
cellClassName: {
type: Function,
default: () => {
return Function;
}
},
// app-main100%
setUTableHeight: {
type: Number,
@ -898,4 +913,9 @@ span {
.u-table::before {
height: 0px;
}
.u-table{
td{
height: 50px;
}
}
</style>

30
fe/PC/src/router/index.js

@ -142,21 +142,21 @@ export const constantRoutes = [
// },
// 开发中模拟路由
{
path: '/',
component: Layout,
redirect: '/ceshi',
hidden: true,
children: [{
path: 'ceshi',
component: () => import('@/views/ceshi/ceshi.vue'),
name: 'ceshi',
meta: {
title: 'ceshi',
icon: '',
}
}]
},
// {
// path: '/',
// component: Layout,
// redirect: '/ceshi',
// hidden: true,
// children: [{
// path: 'ceshi',
// component: () => import('@/views/ceshi/ceshi.vue'),
// name: 'ceshi',
// meta: {
// title: 'ceshi',
// icon: '',
// }
// }]
// },
// {
// path: '/',
// component: Layout,

4
fe/PC/src/views/activeReportManage/reportForm/InventoryBookDetail_innerPage.vue

@ -159,10 +159,10 @@ export default {
{label:'业务子类型',prop:'enumTransSubType',type:'filter',option:'transSubType'},
{label:'对应接口',prop:'interFaceName',width:220},
{label:'期初库存',prop:'firstQty'},
{label:'期末库存',prop:'lastQty'},
{label:'结存',prop:'nowQty'},
{label:'入库',prop:'sumInQty'},
{label:'出库',prop:'sumOutQty'},
{label:'结存',prop:'nowQty'},
{label:'期末库存',prop:'lastQty'},
],
totalProps:['firstQty','lastQty','nowQty','sumInQty','sumOutQty'],//
indexArray_item: [], //itemCode

182
fe/PC/src/views/ceshi/ceshi.vue

File diff suppressed because one or more lines are too long

34
fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue

@ -205,7 +205,10 @@
:tableLoading = "inspectNoticeDetailsTableLoading"
:isShowIndex="true"
:selectionTable="false"
:cellStyle = "cellStyle"
:cellClassName="cellClassName"
:tableBorder="true"
:tableAlign="'center'"
:tableHeaderAlign="'center'"
@buttonClick="inspectDetailsButtonClick"
>
</umyTable>
@ -843,7 +846,11 @@ export default {
}
)
console.log(830,{id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id }, that.inspectNoticeDetailsFormData)
completeSummaryDetailStatus({id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id }, that.inspectNoticeDetailsFormData).then(res => {
completeSummaryDetailStatus(
{id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id },
that.inspectNoticeDetailsFormData,
// 'http://dev.ccwin-in.com:60085/api/'
).then(res => {
// ============================================================
that.inspectNoticeDetailsShow = false
this.loading = false
@ -1034,15 +1041,16 @@ export default {
this.loadingPDF = false
},
//
cellStyle({row, column, rowIndex, columnIndex}){
cellClassName({row, column, rowIndex, columnIndex}){
if (row.detailInspectStatus == 1 && columnIndex === 5) {
return 'background:#42a9b9;color:#fff' //
return 'cell-class-mrhg' //
} else if (row.detailInspectStatus == 2 && columnIndex === 5) {
return 'background:#42b983;color:#fff'//
return 'cell-class-hg'//
} else if (row.detailInspectStatus == 3 && columnIndex === 5) {
return 'background:#c3503e;color:#fff'//
}
return 'cell-class-nohg'//
}else{
return ''
}
},
currenTabsChange(row){
this.currentTagName = row.name
@ -1110,6 +1118,18 @@ export default {
}
}
}
::v-deep .cell-class-mrhg{
background:#42a9b9 !important;
color:#fff !important
}
::v-deep .cell-class-hg{
background:#42b983 !important;
color:#fff !important
}
::v-deep .cell-class-nohg{
background:#c3503e !important;
color:#fff
}
</style>
<style lang="scss">
.upload-demo {

Loading…
Cancel
Save