|
@@ -332,8 +332,35 @@ export default {
|
|
|
this.$router.push("/detection/" + id);
|
|
|
}
|
|
|
},
|
|
|
- //检查是否要进行提示
|
|
|
- checkNotice() {
|
|
|
+ //检查是否要进行报废提示
|
|
|
+ checkDiscardNotice() {
|
|
|
+ this.http.post(
|
|
|
+ this.port.mold.moldDiscardListGet,
|
|
|
+ {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ //说明有东西需要保养
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ this.notify("报废");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.editLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //检查是否要进行保养提示
|
|
|
+ checkMaintainNotice() {
|
|
|
this.http.post(
|
|
|
this.port.mold.moldMaintainListGet,
|
|
|
{},
|
|
@@ -341,7 +368,7 @@ export default {
|
|
|
if (res.code == "ok") {
|
|
|
//说明有东西需要保养
|
|
|
if (res.data.length > 0) {
|
|
|
- this.notify();
|
|
|
+ this.notify("保养");
|
|
|
}
|
|
|
} else {
|
|
|
this.$message({
|
|
@@ -360,9 +387,9 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
//右上角弹窗警告
|
|
|
- notify() {
|
|
|
+ notify(action) {
|
|
|
this.$notify({
|
|
|
- title: "有模具需要保养",
|
|
|
+ title: "有模具需要" + action,
|
|
|
message: "请到消息列表中查看",
|
|
|
type: "warning",
|
|
|
duration: 0
|
|
@@ -371,7 +398,8 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
//检查是否需要进行提示
|
|
|
- this.checkNotice();
|
|
|
+ this.checkMaintainNotice();
|
|
|
+ this.checkDiscardNotice();
|
|
|
if (this.user) {
|
|
|
var user = JSON.parse(this.user);
|
|
|
this.user = user;
|