projects/mesxc-lb #287

Merged
juzi merged 5 commits from projects/mesxc-lb into projects/mesxc-test 2024-03-27 16:58:28 +08:00
18 changed files with 327 additions and 384 deletions
Showing only changes of commit e0fac4556d - Show all commits

View File

@ -1,21 +0,0 @@
<template>
<div>
<svg-icon icon-class="question" @click="goto"/>
</div>
</template>
<script>
export default {
name: 'YudaoDoc',
data() {
return {
url: 'https://doc.iocoder.cn/'
}
},
methods: {
goto() {
window.open(this.url)
}
}
}
</script>

View File

@ -1,21 +0,0 @@
<template>
<div>
<svg-icon icon-class="github" @click="goto"/>
</div>
</template>
<script>
export default {
name: 'YudaoGit',
data() {
return {
url: 'https://github.com/YunaiV/ruoyi-vue-pro'
}
},
methods: {
goto() {
window.open(this.url)
}
}
}
</script>

View File

@ -0,0 +1,60 @@
/**
* 本文件保存一些 BaseTable 会用到的组件
*/
// 操作按钮
export const TableBtn = {
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.entryText}
</el-button>
);
},
};
// 余量
export const RemainBox = {
name: 'RemainBox',
props: ['injectData'],
data() {
return {};
},
computed: {
value() {
return this.injectData[this.injectData.prop] || null;
},
color() {
if (this.value) {
const v = +this.value;
return v < 0 ? '#FF5454' : v >= 0 && v < 2 ? '#FFD767' : '#37D97F';
}
return 'unset';
},
},
render: function (h) {
return (
<div
style={`background: ${
this.color
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${'#fff'}`}>
{this.injectData[this.injectData.prop]?.toFixed(0) || ''}
</div>
);
},
};

View File

@ -0,0 +1,18 @@
export default {
data() {
return {
tableH: this.tableHeight(260),
};
},
created() {
window.addEventListener('resize', this._setTableHeight);
},
destroyed() {
window.removeEventListener('resize', this._setTableHeight);
},
methods: {
_setTableHeight() {
this.tableH = this.tableHeight(260);
},
},
};

View File

@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@ -115,6 +116,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import EquipmentDrawer from '../components/firefightingDrawer';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
@ -135,7 +137,7 @@ export default {
EquipmentDrawer,
BaseDialog: BaseDialogWrapper,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
searchBarKeys: ['name', 'code'],
@ -160,17 +162,28 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'name', label: '设备名称', showOverflowtooltip: true },
{
width: 200,
prop: 'code',
label: '设备编码',
showOverflowtooltip: true,
},
{ prop: 'location', label: '位置', showOverflowtooltip: true },
{
prop: 'responsiblePeopleName',
label: '负责人',
showOverflowtooltip: true,
},
{
prop: 'dueDate',
width: 200,
label: '有效期至',
howOverflowTooltip: true,
filter: (val) =>
val != null ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '--',
},
{ prop: 'remark', label: '备注' },
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
{
@ -285,7 +298,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
code: '',
name: '',
},

View File

@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@ -115,6 +116,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import EquipmentDrawer from '../components/manageDrawer';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
@ -133,9 +135,9 @@ export default {
components: {
Editor,
EquipmentDrawer,
BaseDialog: BaseDialogWrapper
BaseDialog: BaseDialogWrapper,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
searchBarKeys: ['name', 'code'],
@ -167,11 +169,20 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'remark', label: '备注' },
{ prop: 'name', label: '设备名称', showOverflowtooltip: true },
{
width: 256,
prop: 'code',
label: '设备编码',
showOverflowtooltip: true,
},
{ prop: 'location', label: '位置', showOverflowtooltip: true },
{
prop: 'responsiblePeopleName',
label: '负责人',
showOverflowtooltip: true,
},
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
{
@ -277,7 +288,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
code: '',
name: '',
},
@ -415,7 +426,7 @@ export default {
this.editVisible = true;
this.$nextTick(() => {
this.$refs['drawer'].init();
})
});
// this.reset();
// this.showUploadComponents = false;
// const id = row.id;

View File

@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@ -115,6 +116,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import EquipmentDrawer from '../components/safetyDrawer';
import {
createEquipment,
@ -134,7 +136,7 @@ export default {
EquipmentDrawer,
BaseDialog: BaseDialogWrapper,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
searchBarKeys: ['name', 'code'],
@ -166,11 +168,20 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'remark', label: '备注' },
{ prop: 'name', label: '设备名称', showOverflowtooltip: true },
{
width: 200,
prop: 'code',
label: '设备编码',
showOverflowtooltip: true,
},
{ prop: 'location', label: '位置', showOverflowtooltip: true },
{
prop: 'responsiblePeopleName',
label: '负责人',
showOverflowtooltip: true,
},
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
{
@ -275,7 +286,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
code: '',
name: '',
},

View File

@ -9,6 +9,7 @@
<el-table
:data="tableDataWithIndex"
:border="true"
:max-height="tableH"
@selection-change="handleSelectionChange"
style="width: 100%"
:header-cell-style="{
@ -20,25 +21,40 @@
type="selection"
:width="50"
:selectable="checkSelectable" />
<el-table-column prop="_pageIndex" width="80" align="center">
<el-table-column
prop="_pageIndex"
width="80"
align="center">
<template slot="header">
<el-popover placement="bottom-start" width="300" trigger="click">
<div class="setting-box" style="max-height: 400px; overflow-y: auto">
<el-popover
placement="bottom-start"
width="300"
trigger="click">
<div
class="setting-box"
style="max-height: 400px; overflow-y: auto">
<el-checkbox
v-for="(item, index) in tablePropsLabelList"
:key="'cb' + index"
v-model="selectedBox[index]"
:label="item.label" />
</div>
<i slot="reference" class="el-icon-s-tools" />
<i
slot="reference"
class="el-icon-s-tools" />
</el-popover>
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[0]"
label="巡检单名称"
:show-overflow-tooltip="true"
prop="name"></el-table-column>
<el-table-column v-if="selectedBox[1]" label="部门" prop="planName">
<el-table-column
v-if="selectedBox[1]"
label="部门"
:show-overflow-tooltip="true"
prop="planName">
<template slot-scope="scope">
{{ scope.row.department || '---' }}
</template>
@ -46,12 +62,18 @@
<el-table-column
v-if="selectedBox[2]"
label="巡检时间"
width="160"
:show-overflow-tooltip="true"
prop="planCheckTime">
<template slot-scope="scope">
{{ scope.row.planCheckTime | timeFilter }}
</template>
</el-table-column>
<el-table-column v-if="selectedBox[3]" label="班次" prop="groupClass">
<el-table-column
v-if="selectedBox[3]"
label="班次"
:show-overflow-tooltip="true"
prop="groupClass">
<template slot-scope="scope">
{{ scope.row.groupClass || '---' }}
</template>
@ -59,6 +81,8 @@
<el-table-column
v-if="selectedBox[4]"
label="确认截止时间"
width="160"
:show-overflow-tooltip="true"
prop="confirmDueTime">
<template slot-scope="scope">
{{ scope.row.confirmDueTime | timeFilter }}
@ -66,17 +90,21 @@
</el-table-column>
<el-table-column
v-if="selectedBox[5]"
width="150"
label="备注"
:show-overflow-tooltip="true"
prop="remark">
<template slot-scope="scope">
{{ scope.row.remark }}
</template>
</el-table-column>
<el-table-column width="188" label="操作">
<el-table-column
width="188"
label="操作">
<template slot-scope="scope">
<el-tooltip content="确认" placement="top">
<el-tooltip
content="确认"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -87,7 +115,9 @@
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="查看详情" placement="top">
<el-tooltip
content="查看详情"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -97,7 +127,9 @@
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="编辑" placement="top">
<el-tooltip
content="编辑"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -107,7 +139,9 @@
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="删除" placement="top">
<el-tooltip
content="删除"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@ -122,10 +156,12 @@
<script>
import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'CheckOrderListTable',
components: {},
mixins: [tableHeightMixin],
props: ['tableData', 'page', 'limit', 'permissionGuard'],
filters: {
timeFilter: (val) =>

View File

@ -20,6 +20,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@ -62,11 +63,12 @@ import addOrUpdata from './add-or-updata.vue';
import add from './add.vue';
import { parseTime } from '../../core/mixins/code-filter';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'SpecialEquipmentCheckConfig',
components: { addOrUpdata, add, BaseDialog: BaseDialogWrapperVue },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
addOrUpdateVisible: false,
@ -103,28 +105,30 @@ export default {
{
prop: 'name',
label: '巡检单名称',
width: 100,
minWidth: 100,
showOverflowtooltip: true,
},
{
prop: 'code',
width: 180,
label: '巡检单编码',
showOverflowtooltip: true,
},
{
prop: 'department',
label: '部门',
width: 100,
showOverflowtooltip: true,
},
{
prop: 'planCheckTime',
label: '计划巡检时间',
width: 160,
showOverflowtooltip: true,
filter: parseTime,
},
{
prop: 'checkPeriod',
width: 130,
label: '巡检频率(天/次)',
showOverflowtooltip: true,
},
@ -142,6 +146,7 @@ export default {
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
{
prop: 'createTime',
width: 160,
label: '创建时间',
showOverflowtooltip: true,
filter: parseTime,
@ -187,7 +192,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
name: null,
status: 0,
special: true,

View File

@ -131,6 +131,7 @@ export default {
{
prop: 'confirmDueTime',
label: '确认截止时间',
width: 150,
showOverflowtooltip: true,
filter: parseTime,
// filter: (val) =>
@ -185,7 +186,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
name: null,
status: 1,
special: true,

View File

@ -18,6 +18,7 @@
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:max-height="tableH"
:table-data="list"
@emitFun="handleEmitFun">
<method-btn
@ -50,11 +51,12 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { parseTime } from '../../core/mixins/code-filter';
import RecordDetail from './Record-detail.vue';
import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'SpecialEquipmentCheckRecord',
components: { RecordDetail },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
const today = new Date();
const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000);
@ -89,10 +91,16 @@ export default {
// : undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '巡检单名称' },
{ prop: 'department', label: '部门' },
{ prop: 'planCheckTime', label: '巡检时间', filter: parseTime },
{ prop: 'groupClass', label: '班次' },
{ prop: 'name', label: '巡检单名称', showOverflowtooltip: true },
{ prop: 'department', label: '部门', showOverflowtooltip: true },
{
prop: 'planCheckTime',
label: '巡检时间',
width: 160,
filter: parseTime,
showOverflowtooltip: true,
},
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
// {
// prop: '_detail',
// label: '',
@ -196,7 +204,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
special: true,
status: 2,
actualCheckTime: t,

View File

@ -19,16 +19,9 @@
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:max-height="tableH"
:table-data="list"
@emitFun="handleEmitFun">
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> -->
</base-table>
@emitFun="handleEmitFun"></base-table>
<!-- 分页组件 -->
<pagination
@ -61,74 +54,18 @@
</template>
<script>
// import { publicFormatter } from '@/utils/dict';
// import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record';
import { parseTime } from '@/utils/ruoyi';
import MonitorDetail from './Monitor--detail.vue';
const remainBox = {
name: 'RemainBox',
props: ['injectData'],
data() {
return {};
},
computed: {
value() {
return this.injectData[this.injectData.prop] || null;
},
color() {
if (this.value) {
const v = +this.value;
return v < 0 ? '#FF5454' : v >= 0 && v < 2 ? '#FFD767' : '#37D97F';
}
return 'unset';
},
},
render: function (h) {
return (
<div
style={`background: ${
this.color
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
// this.color == 'red' ? '#fff' : 'unset'
'#fff'
}`}>
{this.injectData[this.injectData.prop]?.toFixed(0) || ''}
</div>
);
},
};
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.entryText}
</el-button>
);
},
};
import { RemainBox, TableBtn } from '@/components/tableInnerComponents';
export default {
name: 'SpecialEquipmentMaintainMonitor',
components: { MonitorDetail },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
monitorDetailVisible: false,
@ -189,13 +126,13 @@ export default {
prop: 'opt2',
label: '保养内容',
entryText: '详情',
subcomponent: btn,
subcomponent: TableBtn,
width: 100,
},
{
prop: 'remainDays',
label: '距离下次保养剩余时间(天)',
subcomponent: remainBox,
subcomponent: RemainBox,
minWidth: 210,
},
// {
@ -307,7 +244,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
planId: null,
special: true,
},

View File

@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@ -62,6 +63,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record';
import PlanConfigAdd from './PlanConfig--add.vue';
import PlanConfigAddContent from './PlanConfig--addContent.vue';
@ -74,7 +76,7 @@ export default {
DialogForm: PlanConfigAdd,
PlanConfigAddContent,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
const t = new Date();
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
@ -103,93 +105,57 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '保养计划名称' },
{ prop: 'departmentName', label: '部门' },
{ width: 144, prop: 'lineName', label: '产线名' },
{ width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' },
{ prop: 'name', label: '保养计划名称', showOverflowtooltip: true },
{ prop: 'departmentName', label: '部门', showOverflowtooltip: true },
{
width: 180,
prop: 'lineName',
label: '产线名',
showOverflowtooltip: true,
},
{
minWidth: 120,
prop: 'maintenancePeriod',
label: '保养频率(天/次)',
showOverflowtooltip: true,
},
{
minWidth: 160,
prop: 'firstMaintenanceTime',
label: '首次保养时间',
showOverflowtooltip: true,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ width: 144, prop: 'maintainDuration', label: '保养时长' },
{ prop: 'maintainer', label: '计划保养人员' },
{
width: 144,
minWidth: 100,
prop: 'maintainDuration',
label: '保养时长',
showOverflowtooltip: true,
},
{
minWidth: 144,
prop: 'maintainer',
label: '计划保养人员',
showOverflowtooltip: true,
},
{
minWidth: 144,
prop: 'confirmTimeLimit',
label: '确认时限',
showOverflowtooltip: true,
filter: (val) =>
val != null && val > 24
? `${(val - (val % 24)) / 24}${val % 24}小时`
: `${val}小时`,
},
{ prop: 'remark', label: '备注' },
// {
// prop: 'createTime',
// label: '',
// fixed: true,
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
// { prop: 'code', label: '' },
// {
// prop: 'enabled',
// label: '',
// filter: (val) => ['', ''][val],
// },
// {
// prop: 'equipmentCategory',
// label: '',
// filter: (val) =>
// val != null ? ['-', '', '', ''][val] : '-',
// },
// { prop: 'equipmentName', label: '' },
// { width: 144, prop: 'maintainDuration', label: '(h)' },
// {
// prop: 'maintainType',
// label: '',
// filter: publicFormatter('maintain_type'),
// },
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '',
// selectOptions: [
// { id: 1, name: '' },
// { id: 2, name: '' },
// { id: 3, name: '' },
// ],
// placeholder: '',
// param: 'specialType',
// },
{
type: 'input',
label: '保养计划名称',
placeholder: '请输入保养计划名称',
param: 'planName',
// selectOptions: [
// {name: 1, id: 1}
// ]
},
// {
// type: 'input',
// label: '',
// placeholder: '',
// param: 'equipmentName',
// },
// {
// type: 'datePicker',
// label: '',
// dateType: 'daterange',
// format: 'yyyy-MM-dd',
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
// rangeSeparator: '-',
// startPlaceholder: '',
// endPlaceholder: '',
// param: 'createTime',
// },
{
type: 'button',
btnName: '查询',
@ -208,14 +174,6 @@ export default {
plain: true,
color: 'success',
},
// {
// type: this.$auth.hasPermi('base:quality-inspection-type:export')
// ? 'button'
// : '',
// btnName: '',
// name: 'export',
// color: 'warning',
// },
],
rows: [
[
@ -316,7 +274,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
// equipmentName: null,
// createTime: null,
specialType: null,

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,

View File

@ -20,6 +20,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@ -63,6 +64,7 @@
<script>
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import DetailDrawer from './CustomDialogForm.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import {
deleteRepair,
exportRepairLogExcel,
@ -75,7 +77,7 @@ import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default {
name: 'SpecialEquipmentRepair',
components: { DetailDrawer, DialogForm, BaseDialog: BaseDialogWrapperVue },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
addOrUpdateVisible: false,
@ -167,6 +169,7 @@ export default {
{
prop: 'maintenanceResult',
label: '维修结果',
minWidth: 110,
showOverflowtooltip: true,
filter: (v) => (v != null ? ['成功', '失败'][v] : ''),
},
@ -174,7 +177,7 @@ export default {
prop: 'maintenanceDetail',
label: '维修描述',
showOverflowtooltip: true,
width: 110,
minWidth: 110,
subcomponent: htmls,
},
{
@ -289,7 +292,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
// maintenanceStatus: null,
maintenanceResult: null,
createTime: null,

View File

@ -456,7 +456,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
maintainPlanId: null,
startTime: null,
special: true,

View File

@ -10,6 +10,7 @@
:data="tableDataWithIndex"
:border="true"
@selection-change="handleSelectionChange"
:max-height="tableH"
style="width: 100%"
:header-cell-style="{
background: '#f2f4f9',
@ -46,13 +47,15 @@
</el-table-column>
<el-table-column
v-if="selectedBox[0]"
width="128"
min-width="144"
label="设备保养单号"
:show-overflow-tooltip="true"
prop="maintainOrderNumber"></el-table-column>
<el-table-column
v-if="selectedBox[1]"
width="128"
min-width="144"
label="保养计划名称"
:show-overflow-tooltip="true"
prop="planName">
<template slot-scope="scope">
{{ scope.row.planName || '---' }}
@ -61,6 +64,7 @@
<el-table-column
v-if="selectedBox[2]"
label="部门"
:show-overflow-tooltip="true"
prop="departmentName">
<template slot-scope="scope">
{{ scope.row.departmentName || '---' }}
@ -69,6 +73,7 @@
<el-table-column
v-if="selectedBox[3]"
label="产线名"
:show-overflow-tooltip="true"
prop="lineName">
<template slot-scope="scope">
{{ scope.row.lineName || '---' }}
@ -76,8 +81,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[4]"
width="150"
min-width="144"
label="计划开始时间"
:show-overflow-tooltip="true"
prop="planStartTime">
<template slot-scope="scope">
{{ scope.row.planStartTime | timeFilter }}
@ -85,8 +91,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[5]"
width="150"
min-width="144"
label="计划结束时间"
:show-overflow-tooltip="true"
prop="planEndTime">
<template slot-scope="scope">
{{ scope.row.planEndTime | timeFilter }}
@ -94,8 +101,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[6]"
width="150"
min-width="144"
label="实际开始时间"
:show-overflow-tooltip="true"
prop="startTime">
<template slot-scope="scope">
{{ scope.row.startTime | timeFilter }}
@ -103,8 +111,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[7]"
width="150"
min-width="144"
label="实际结束时间"
:show-overflow-tooltip="true"
prop="endTime">
<template slot-scope="scope">
{{ scope.row.endTime | timeFilter }}
@ -112,8 +121,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[8]"
width="150"
min-width="144"
label="确认截止时间"
:show-overflow-tooltip="true"
prop="confirmDueTime">
<template slot-scope="scope">
{{ scope.row.confirmDueTime | timeFilter }}
@ -121,8 +131,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[9]"
width="150"
min-width="144"
label="保养计划类型"
:show-overflow-tooltip="true"
prop="relatePlan">
<template slot-scope="scope">
{{ scope.row.relatePlan | relatePlanFilter }}
@ -186,10 +197,12 @@
<script>
import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'WaitingListTable',
components: {},
mixins: [tableHeightMixin],
props: ['tableData', 'page', 'limit'],
filters: {
timeFilter: (val) =>

View File

@ -14,22 +14,22 @@ export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
default: () => ({}),
},
},
data() {
return {
content: ''
}
content: '',
};
},
mounted() {
this.getContent()
this.getContent();
},
methods: {
getContent() {
this.content = this.injectData[this.injectData.prop] ?? ''
}
}
}
this.content = this.injectData[this.injectData.prop] ?? '';
},
},
};
</script>