update tableheight

This commit is contained in:
lb
2024-03-27 16:28:09 +08:00
parent 688c541074
commit e0fac4556d
18 changed files with 327 additions and 384 deletions

View File

@@ -19,6 +19,7 @@
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:max-height="tableH"
:table-data="list"
@emitFun="handleEmitFun">
<!-- <method-btn
@@ -51,9 +52,16 @@
ref="form"
v-model="form"
:disabled="mode == 'detail'" />
<el-row v-if="mode === 'detail'" slot="footer" type="flex" justify="end">
<el-row
v-if="mode === 'detail'"
slot="footer"
type="flex"
justify="end">
<el-col :span="12">
<el-button size="small" class="btnTextStyle" @click="cancel">
<el-button
size="small"
class="btnTextStyle"
@click="cancel">
关闭
</el-button>
</el-col>
@@ -70,6 +78,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import Editor from '@/components/Editor';
import DialogForm from './Record--add.vue';
import {
@@ -77,36 +86,14 @@ import {
exportMaintainLogExcel,
} from '@/api/equipment/base/maintain/record';
import RecordDetail from './Record--detail.vue';
import { TableBtn } from '@/components/tableInnerComponents';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
const btn = {
name: 'tableBtn',
props: ['injectData'],
data() {
return {};
},
methods: {
handleClick() {
this.$emit('emitData', {
action: this.injectData.label,
value: this.injectData,
});
},
},
render: function (h) {
return (
<el-button type="text" onClick={this.handleClick}>
{this.injectData.name}
</el-button>
);
},
};
export default {
name: 'SpecialEquipmentMaintainRecord',
components: { DialogForm, RecordDetail },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
const today = new Date();
const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000);
@@ -157,54 +144,54 @@ export default {
{
prop: 'maintainOrderNumber',
label: '设备保养单号',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
},
{
prop: 'planName',
label: '保养计划名称',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
filter: (val) => (val != null ? val : '---'),
},
{
prop: 'departmentName',
label: '部门',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
},
{
prop: 'lineName',
label: '产线名',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
},
{
prop: 'planStartTime',
label: '计划开始时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
prop: 'planEndTime',
label: '计划结束时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
prop: 'startTime',
label: '实际开始时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
prop: 'endTime',
label: '实际结束时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
@@ -218,78 +205,12 @@ export default {
{
prop: '_detail',
label: '详情',
name: '详情',
entryText: '详情',
minWidth: 60,
subcomponent: btn,
subcomponent: TableBtn,
},
// {
// prop: 'equipmentCategory',
// label: '设备大类',
// minWidth: 100,
// showOverflowtooltip: true,
// filter: (val) =>
// val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-',
// },
// {
// prop: 'equipmentName',
// label: '设备名称',
// minWidth: 100,
// showOverflowtooltip: true,
// },
// {
// prop: 'maintainWorker',
// label: '保养人员',
// minWidth: 100,
// showOverflowtooltip: true,
// },
// {
// prop: 'relatePlan',
// label: '是否计划保养',
// width: 120,
// filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
// },
// {
// prop: 'planName',
// label: '保养计划名称',
// minWidth: 120,
// showOverflowtooltip: true,
// },
// {
// prop: 'maintainDuration',
// label: '计划保养用时(h)',
// minWidth: 130,
// showOverflowtooltip: true,
// },
// { prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 },
// {
// prop: 'remark',
// label: '备注',
// minWidth: 100,
// showOverflowtooltip: true,
// },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '设备大类',
// placeholder: '请选择设备大类',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '安全设备' },
// { id: 2, name: '消防设备' },
// { id: 3, name: '特种设备' },
// ],
// filterable: true,
// defaultSelect: null
// },
// {
// type: 'select',
// label: '设备',
// placeholder: '请选择设备',
// param: 'equipmentId',
// defaultSelect: null
// },
{
type: 'select',
label: '保养计划名称',
@@ -297,7 +218,7 @@ export default {
param: 'maintainPlanId',
defaultSelect: null,
filterable: true,
clearable: true
clearable: true,
},
// 开始结束时间
{
@@ -314,16 +235,6 @@ export default {
defaultSelect: t,
// width: 350,
},
// {
// type: 'select',
// label: '是否计划保养',
// selectOptions: [
// { name: '是', id: 1 },
// { name: '否', id: 2 },
// ],
// defaultSelect: null,
// param: 'relatePlan',
// },
{
type: 'button',
btnName: '查询',
@@ -508,7 +419,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
maintainPlanId: null,
startTime: t,
// relatePlan: null,