bug 3
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-18 15:47:20
|
||||
* @LastEditTime: 2024-03-20 17:58:29
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -36,7 +36,8 @@
|
||||
<el-select
|
||||
v-model="dataForm.departmentId"
|
||||
:disabled="isdetail"
|
||||
:placeholder="`请选择部门`">
|
||||
:placeholder="`请选择部门`"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="opt in departmentOptions"
|
||||
:key="opt.id"
|
||||
@@ -90,33 +91,32 @@
|
||||
type="datetime"
|
||||
:disabled="isdetail"
|
||||
placeholder="请选择巡检时间"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
value-format="timestamp"
|
||||
style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="attr-list" v-if="idAttrShow">
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
<div v-if="idAttrShow">
|
||||
<small-title>
|
||||
巡检内容
|
||||
</small-title>
|
||||
|
||||
<div v-if="!isdetail">
|
||||
<div>
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="attr-search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
</div>
|
||||
<!-- <template>
|
||||
<span style="display: inline-block;" @click="addNew()">
|
||||
<div v-if="!isdetail" style="display: flex">
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="attr-search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
<!-- <div class="action_btn"> -->
|
||||
<el-button type="text" class="action_btn" @click="addNew()">
|
||||
<span style="display: inline-block;">
|
||||
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
||||
<span class="add">添加</span>
|
||||
<span class="add">添加内容</span>
|
||||
</span>
|
||||
</template> -->
|
||||
</el-button>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
@@ -229,14 +229,14 @@ export default {
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true
|
||||
}
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: '新增',
|
||||
// name: 'add',
|
||||
// color: 'success',
|
||||
// plain: true
|
||||
// }
|
||||
],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
@@ -519,10 +519,6 @@ export default {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
@@ -551,11 +547,6 @@ export default {
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@@ -563,7 +554,7 @@ export default {
|
||||
}
|
||||
.action_btn {
|
||||
float: right;
|
||||
margin: -32px 15px 0;
|
||||
/* margin: 0 15px 0; */
|
||||
font-size: 14px;
|
||||
}
|
||||
.add {
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
tableProps: [
|
||||
{ prop: 'name', label: '巡检单名称' },
|
||||
{ prop: 'department', label: '部门' },
|
||||
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
|
||||
{ prop: 'planCheckTime', label: '巡检时间', filter: parseTime },
|
||||
{ prop: 'groupClass', label: '班次' },
|
||||
// { prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn },
|
||||
{ prop: 'remark', label: '备注' }
|
||||
|
||||
@@ -66,7 +66,7 @@ import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/bas
|
||||
import AddContent from './addContent.vue';
|
||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||
|
||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
||||
const btn = {
|
||||
name: 'tableBtn',
|
||||
@@ -129,20 +129,22 @@ export default {
|
||||
// width: 180,
|
||||
// filter: timeFilter,
|
||||
// },
|
||||
{ prop: 'maintainOrderNumber', label: '设备保养单号' },
|
||||
{ prop: 'planName', label: '保养计划名称' },
|
||||
{ prop: 'departmentName', label: '部门' },
|
||||
{ prop: 'lineName', label: '产线名' },
|
||||
{ prop: 'planStartTime', label: '计划开始时间', filter: timeFilter },
|
||||
{ prop: 'planEndTime', label: '计划结束时间', filter: timeFilter },
|
||||
{ prop: 'startTime', label: '实际开始时间', filter: timeFilter },
|
||||
{ prop: 'endTime', label: '实际结束时间', filter: timeFilter },
|
||||
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true },
|
||||
{ prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
// { prop: 'equipmentName', label: '设备名称' },
|
||||
// { prop: 'maintainWorker', label: '保养人员' },
|
||||
{
|
||||
prop: 'relatePlan',
|
||||
label: '保养计划类型',
|
||||
filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
|
||||
width: 170,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
|
||||
// { prop: 'maintainDuration', label: '计划保养用时(h)' },
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
:file="file"
|
||||
:key="file.fileUrl"
|
||||
:disabled="disabled"
|
||||
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||
@delete="!disabled && handleDeleteFile(file)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -678,10 +678,12 @@ export default {
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/png' ||
|
||||
file.type === 'image/jpg';
|
||||
if (!isJPG) {
|
||||
this.$modal.msgError('只能上传jpg/png文件!');
|
||||
}
|
||||
return isJPG;
|
||||
};
|
||||
return checkFileSize();
|
||||
// return checkFileSize() && checkFileType();
|
||||
return checkFileSize() && checkFileType();
|
||||
},
|
||||
|
||||
// handlers
|
||||
@@ -737,7 +739,6 @@ export default {
|
||||
fileType: prop == 'files' ? 2 : 1,
|
||||
});
|
||||
this.$modal.msgSuccess('上传成功');
|
||||
console.log('为我', this.form.files)
|
||||
this.$emit('update', this.form);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user