|
@@ -36,7 +36,7 @@
|
|
云模盒告警:{{warningInfo}}
|
|
云模盒告警:{{warningInfo}}
|
|
<el-button
|
|
<el-button
|
|
size="small"
|
|
size="small"
|
|
- v-if="!(user.parentId == 1 && user.subordinateType == 1)"
|
|
|
|
|
|
+ v-if="!(user.parentId == 1 && user.subordinateType == 1) && stage != 0"
|
|
@click="warningFormVisible = true"
|
|
@click="warningFormVisible = true"
|
|
type="primary"
|
|
type="primary"
|
|
style="margin-left: 16px;"
|
|
style="margin-left: 16px;"
|
|
@@ -46,7 +46,7 @@
|
|
<!-- 操作记录 -->
|
|
<!-- 操作记录 -->
|
|
<el-col :span="24" class="title">处理记录</el-col>
|
|
<el-col :span="24" class="title">处理记录</el-col>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <el-table :data="records" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
|
|
|
+ <el-table :data="records" highlight-current-row v-loading="listLoading" style="width: 100%;" :height="tableHeight">
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
<el-table-column prop="maintainUserName" label="保养人" width="100" sortable></el-table-column>
|
|
<el-table-column prop="maintainUserName" label="保养人" width="100" sortable></el-table-column>
|
|
<el-table-column prop="maintainType" label="保养方案" sortable></el-table-column>
|
|
<el-table-column prop="maintainType" label="保养方案" sortable></el-table-column>
|
|
@@ -178,7 +178,12 @@
|
|
<el-input placeholder="报警类型" v-model="warningInfo" :disabled="true"></el-input>
|
|
<el-input placeholder="报警类型" v-model="warningInfo" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="云模盒设置" prop="action">
|
|
<el-form-item label="云模盒设置" prop="action">
|
|
- <el-select v-model="warningForm.equipmentId" filterable placeholder="请选择云模盒" style="width:202px">
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="warningForm.equipmentId"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择云模盒"
|
|
|
|
+ style="width:202px"
|
|
|
|
+ >
|
|
<el-option
|
|
<el-option
|
|
v-for="item in equipments"
|
|
v-for="item in equipments"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -189,7 +194,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button @click.native="maintenanceFormVisible = false">取消</el-button>
|
|
|
|
|
|
+ <el-button @click.native="warningArrangement = false">取消</el-button>
|
|
<el-button type="primary" @click.native="warningArrangement" :loading="warningLoading">立即处理</el-button>
|
|
<el-button type="primary" @click.native="warningArrangement" :loading="warningLoading">立即处理</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -213,6 +218,7 @@ export default {
|
|
records: [],
|
|
records: [],
|
|
//警告信息
|
|
//警告信息
|
|
warningInfo: "低电量、过热",
|
|
warningInfo: "低电量、过热",
|
|
|
|
+ stage: null,
|
|
//告警时需要更换的设备的列表
|
|
//告警时需要更换的设备的列表
|
|
equipments: [
|
|
equipments: [
|
|
{ value: 1, label: "临时设备1" },
|
|
{ value: 1, label: "临时设备1" },
|
|
@@ -319,6 +325,7 @@ export default {
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.records = res.data.list;
|
|
this.records = res.data.list;
|
|
|
|
+ this.total = res.data.total;
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -347,6 +354,18 @@ export default {
|
|
this.mouldName = res.data.vo.modelName;
|
|
this.mouldName = res.data.vo.modelName;
|
|
this.mouldState = res.data.vo.state;
|
|
this.mouldState = res.data.vo.state;
|
|
this.requirement = res.data.vo.isMaintain == 1;
|
|
this.requirement = res.data.vo.isMaintain == 1;
|
|
|
|
+ this.stage = res.data.vo.stage;
|
|
|
|
+ if(this.stage == 0){
|
|
|
|
+ this.warningInfo = "正常";
|
|
|
|
+ }else if(this.stage == 1){
|
|
|
|
+ this.warningInfo = "温度过高";
|
|
|
|
+ }else if(this.stage == 2){
|
|
|
|
+ this.warningInfo = "电量过低";
|
|
|
|
+ }else if(this.stage == 3){
|
|
|
|
+ this.warningInfo = "温度过高、电量过低";
|
|
|
|
+ }else{
|
|
|
|
+ this.warningInfo = "状况不明";
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -425,14 +444,16 @@ export default {
|
|
//获取告警时可以更换的设备列表
|
|
//获取告警时可以更换的设备列表
|
|
getAlternativeEquipment() {
|
|
getAlternativeEquipment() {
|
|
this.http.post(
|
|
this.http.post(
|
|
- this.port.base.moulds,
|
|
|
|
|
|
+ this.port.mold.moldChangeRequirement,
|
|
{
|
|
{
|
|
- belongCompanyId: this.user.companyId
|
|
|
|
|
|
+ mouldId: this.mouldId
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
- //顺便把相关的告警中的模具ID赋值一下
|
|
|
|
- this.warningForm.mouldId = this.mouldId;
|
|
|
|
|
|
+ this.equipments = [];
|
|
|
|
+ res.data.forEach(item => {
|
|
|
|
+ this.equipments.push({ label: item.equipmentNo, value: item.id });
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -450,39 +471,46 @@ export default {
|
|
},
|
|
},
|
|
//告警处理
|
|
//告警处理
|
|
warningArrangement() {
|
|
warningArrangement() {
|
|
- console.log(this.warningForm);
|
|
|
|
- // this.http.post(
|
|
|
|
- // this.port.mold.moldChange,
|
|
|
|
- // this.warningForm,
|
|
|
|
- // res => {
|
|
|
|
- // if (res.code == "ok") {
|
|
|
|
- // this.$message({
|
|
|
|
- // message: "告警处理完毕",
|
|
|
|
- // type: "success"
|
|
|
|
- // });
|
|
|
|
- // this.warningFormVisible = false;
|
|
|
|
- // } else {
|
|
|
|
- // this.$message({
|
|
|
|
- // message: res.msg,
|
|
|
|
- // type: "error"
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // error => {
|
|
|
|
- // this.$message({
|
|
|
|
- // message: error,
|
|
|
|
- // type: "error"
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // );
|
|
|
|
|
|
+ if (this.warningForm.equipmentId == null) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "请选择云模盒",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.http.post(
|
|
|
|
+ this.port.mold.moldChange,
|
|
|
|
+ this.warningForm,
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "告警处理完毕",
|
|
|
|
+ type: "success"
|
|
|
|
+ });
|
|
|
|
+ this.warningFormVisible = false;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
let height = window.innerHeight;
|
|
let height = window.innerHeight;
|
|
- this.tableHeight = height - 260;
|
|
|
|
|
|
+ this.tableHeight = height - 370;
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.mouldId = this.$route.params.id; //传到当前页面的模具编号
|
|
this.mouldId = this.$route.params.id; //传到当前页面的模具编号
|
|
|
|
+ this.warningForm.mouldId = this.mouldId; //顺便把相关的告警中的模具ID赋值一下
|
|
this.getList();
|
|
this.getList();
|
|
this.getDetail();
|
|
this.getDetail();
|
|
this.getAlternativeEquipment();
|
|
this.getAlternativeEquipment();
|