|
@@ -44,21 +44,7 @@
|
|
|
|
|
|
<!-- 操作记录 -->
|
|
|
<el-col :span="24" class="title">处理记录</el-col>
|
|
|
- <!--列表-->
|
|
|
- <!-- :height="tableHeight" -->
|
|
|
-
|
|
|
- <!-- <el-tabs v-model="activePage" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="模具保养" name="0">0</el-tab-pane>
|
|
|
- <el-tab-pane label="模具告警" name="1">1</el-tab-pane>
|
|
|
- </el-tabs>-->
|
|
|
- <!-- <el-col :span="24">
|
|
|
- <el-tabs v-model="activePage" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="用户管理" name="1">用户管理</el-tab-pane>
|
|
|
- <el-tab-pane label="配置管理" name="2">配置管理</el-tab-pane>
|
|
|
- <el-tab-pane label="角色管理" name="3">角色管理</el-tab-pane>
|
|
|
- <el-tab-pane label="定时任务补偿" name="4">定时任务补偿</el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </el-col>-->
|
|
|
+ <!-- 列表 -->
|
|
|
<el-table :data="records" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
|
<el-table-column prop="maintainUserName" label="保养人" width="100" sortable></el-table-column>
|
|
@@ -159,7 +145,7 @@
|
|
|
:http-request="maintain"
|
|
|
:limit="1"
|
|
|
:auto-upload="false"
|
|
|
- before-upload="beforeUpload"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
>
|
|
|
<el-button size="small" type="primary">上传</el-button>
|
|
|
</el-upload>
|
|
@@ -214,7 +200,7 @@ export default {
|
|
|
{ label: "易损件114514", value: 2 }
|
|
|
],
|
|
|
//是否需要保养 提示
|
|
|
- requirement: true,
|
|
|
+ requirement: false,
|
|
|
prompt: true,
|
|
|
//保养详情界面显示
|
|
|
maintenanceFormVisible: false,
|
|
@@ -256,15 +242,17 @@ export default {
|
|
|
//上传格式和大小限制
|
|
|
beforeUpload(file) {
|
|
|
const isJPG = file.type === "image/jpg";
|
|
|
- const isPNG = file.type === "image/jpg";
|
|
|
+ const isJPEG = file.type === "image/jpeg";
|
|
|
+ const isPNG = file.type === "image/png";
|
|
|
+ var rightType = isJPG || isPNG || isJPEG;
|
|
|
const isLt5M = file.size / 1024 / 1024 < 5;
|
|
|
- if (!isJPG || !isPNG) {
|
|
|
- this.$message.error("上传头像图片只能是 JPG 或 PNG 格式!");
|
|
|
+ if (!rightType) {
|
|
|
+ this.$message.error("上传的图片只能是 JPG 或 PNG 格式!");
|
|
|
}
|
|
|
if (!isLt5M) {
|
|
|
- this.$message.error("上传头像图片大小不能超过 2MB!");
|
|
|
+ this.$message.error("上传的图片大小不能超过 5MB!");
|
|
|
}
|
|
|
- return isJPG && isLt2M;
|
|
|
+ return rightType && isLt5M;
|
|
|
},
|
|
|
//显示新增界面
|
|
|
showMaintenance: function() {
|
|
@@ -337,13 +325,14 @@ export default {
|
|
|
//模具保养
|
|
|
maintain(params) {
|
|
|
if (this.type.value != null) {
|
|
|
+ console.log("啦啦啦");
|
|
|
var fileObj = params.file;
|
|
|
var form = new FormData();
|
|
|
form.append("file", fileObj);
|
|
|
form.append("mouldId", this.mouldId);
|
|
|
form.append("maintainType", this.type.value);
|
|
|
if (this.type.value == 0) {
|
|
|
- if (this.action.value != null) {
|
|
|
+ if (this.action.value == null) {
|
|
|
return;
|
|
|
}
|
|
|
form.append("ways", this.action.value);
|
|
@@ -363,6 +352,7 @@ export default {
|
|
|
type: "success"
|
|
|
});
|
|
|
this.maintenanceFormVisible = false;
|
|
|
+ this.requirement = false;
|
|
|
this.$refs.upload.clearFiles();
|
|
|
this.getList();
|
|
|
} else {
|