|
@@ -43,10 +43,14 @@
|
|
|
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
|
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
|
<el-table-column prop="equipmentNo" :label="$t('basic.equipmentNo')" width="180" sortable></el-table-column>
|
|
|
+ <el-table-column prop="equipmentName" :label="$t('basic.proNum')" width="180" sortable></el-table-column>
|
|
|
<el-table-column prop="sim" :label="$t('basic.sim')" width="120" sortable></el-table-column>
|
|
|
<el-table-column prop="hillNumber" :label="$t('mold.hillNumber')" width="80" align="center" sortable>
|
|
|
<template slot-scope="scope">{{scope.row.hillNumber}}<span v-if="scope.row.hillNumber">%</span></template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="temperature" :label="$t('runTest.temperature')" width="120" align="center" sortable>
|
|
|
+ <template slot-scope="scope">{{scope.row.temperature}}<span v-if="scope.row.temperature">℃</span></template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="alarmBattery" :label="$t('basic.alarmBattery')" width="130" align="center" sortable>
|
|
|
<template slot-scope="scope">{{scope.row.alarmBattery}}<span v-if="scope.row.alarmBattery">%</span></template>
|
|
|
</el-table-column>
|
|
@@ -98,6 +102,9 @@
|
|
|
<el-form-item :label="$t('basic.equipmentNo')" prop="equipmentNo">
|
|
|
<el-input v-model="newAllocation.equipmentNo" autocomplete="off" :placeholder="$t('basic.inputequipmentNo')" style="width:505px;"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item :label="$t('basic.proNum')" prop="equipmentName">
|
|
|
+ <el-input v-model="newAllocation.equipmentName" autocomplete="off" :placeholder="$t('basic.inputProNum')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item :label="$t('project.company')" prop="belongCompanyId">
|
|
|
<el-select v-model="newAllocation.belongCompanyId" filterable clearable :placeholder="$t('project.inputCompany')" style="width:505px;">
|
|
|
<el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
|
|
@@ -122,6 +129,9 @@
|
|
|
<el-form-item :label="$t('basic.equipmentNo')" prop="equipmentNo">
|
|
|
<el-input v-model="newAllocation.equipmentNo" autocomplete="off" :placeholder="$t('basic.inputequipmentNo')" style="width:505px;"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item :label="$t('basic.proNum')" prop="equipmentName">
|
|
|
+ <el-input v-model="newAllocation.equipmentName" autocomplete="off" :placeholder="$t('basic.inputProNum')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item :label="$t('project.company')" prop="belongCompanyId">
|
|
|
<el-select v-model="newAllocation.belongCompanyId" filterable clearable :placeholder="$t('project.inputCompany')" style="width:505px;" :disabled="newAllocation.usage">
|
|
|
<el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
|
|
@@ -142,15 +152,6 @@
|
|
|
|
|
|
<!-- 启用弹窗 -->
|
|
|
<el-dialog :title="$t('base.use')" :visible.sync="operateDialogVisible" width="450px">
|
|
|
- <!-- <el-form label-width="100px" :rules="formRules" :inline="true" class="demo-form-inline">
|
|
|
- <el-form-item label="某个参数">
|
|
|
- <el-input autocomplete="off" placeholder="填了也不会发生什么"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="operateDialogVisible = false">{{$t('el.messagebox.cancel')}}</el-button>
|
|
|
- <el-button type="primary" @click="enable">{{$t('base.use')}}</el-button>
|
|
|
- </span> -->
|
|
|
<el-form :model="issuedVal" label-width="130px" :rules="formRules" ref="issuedVal" :inline="true" class="demo-form-inline">
|
|
|
<el-form-item :label="$t('basic.alarmBattery')" prop="alarmBattery">
|
|
|
<el-input v-model.number="issuedVal.alarmBattery" type="age" autocomplete="off" :placeholder="$t('basic.inputAlarmBattery')" style="width:250px;"></el-input>
|
|
@@ -212,6 +213,9 @@
|
|
|
case "alarmDegree":
|
|
|
return callback(new Error(this.$t('basic.inputAlarmDegree')));
|
|
|
break;
|
|
|
+ case "equipmentName":
|
|
|
+ return callback(new Error(this.$t('basic.inputProNum')));
|
|
|
+ break;
|
|
|
default:
|
|
|
callback();
|
|
|
}
|
|
@@ -239,6 +243,9 @@
|
|
|
equipmentNo: [
|
|
|
{ required: true, validator: msg , trigger: "blur" }
|
|
|
],
|
|
|
+ equipmentName: [
|
|
|
+ { required: true, validator: msg , trigger: "blur" }
|
|
|
+ ],
|
|
|
useLife: [
|
|
|
{ required: true, validator: msg },
|
|
|
{ type: 'number', message: this.$t('basic.inputUseLifeNum')}
|
|
@@ -365,6 +372,7 @@
|
|
|
id: "",
|
|
|
useLife: "",
|
|
|
equipmentNo: "",
|
|
|
+ equipmentName: "",
|
|
|
belongCompanyId: "",
|
|
|
agent: ""
|
|
|
};
|
|
@@ -374,10 +382,9 @@
|
|
|
addMould() {
|
|
|
this.$refs.newAllocation.validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.addLoading = true;
|
|
|
- this.http.post(
|
|
|
- this.port.base.editMould,
|
|
|
- {
|
|
|
+ this.addLoading = true;
|
|
|
+ this.http.post( this.port.base.editMould, {
|
|
|
+ equipmentName: this.newAllocation.equipmentName,
|
|
|
equipmentNo: this.newAllocation.equipmentNo,
|
|
|
belongCompanyId: this.newAllocation.belongCompanyId,
|
|
|
useLife: this.newAllocation.useLife,
|
|
@@ -406,8 +413,7 @@
|
|
|
message: error,
|
|
|
type: "error"
|
|
|
});
|
|
|
- }
|
|
|
- );
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -419,6 +425,7 @@
|
|
|
id: row.id,
|
|
|
useLife: row.useLife,
|
|
|
equipmentNo: row.equipmentNo,
|
|
|
+ equipmentName: row.equipmentName,
|
|
|
belongCompanyId: row.belongCompanyId,
|
|
|
agent: row.agent,
|
|
|
usage: usageBoolean
|
|
@@ -476,18 +483,8 @@
|
|
|
|
|
|
//启用设备
|
|
|
enable() {
|
|
|
- // if(this.allocations[this.activeIndex].belongCompanyId == null){
|
|
|
- // this.$message({
|
|
|
- // message: this.$t("basic.inputBlongComp"),
|
|
|
- // type: "error"
|
|
|
- // });
|
|
|
- // }else{
|
|
|
this.allocations[this.activeIndex].isUse = 1;
|
|
|
this.operateDialogVisible = false;
|
|
|
- // this.http.post( this.port.base.enableMould, {
|
|
|
- // id: this.allocations[this.activeIndex].id,
|
|
|
- // isUse: 1
|
|
|
- // },
|
|
|
var str = this.allocations[this.activeIndex].equipmentNo;
|
|
|
this.http.post( this.port.base.setPacket, {
|
|
|
lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
|
|
@@ -498,7 +495,7 @@
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.$message({
|
|
|
- message: this.$t("basic.inUse"),
|
|
|
+ message: this.$t("basic.toWait"),
|
|
|
type: "success"
|
|
|
});
|
|
|
this.getMoulds();
|
|
@@ -519,28 +516,18 @@
|
|
|
|
|
|
//停用云模盒
|
|
|
disableEquipment(index) {
|
|
|
- // if(this.allocations[index].belongCompanyId == null){
|
|
|
- // this.$message({
|
|
|
- // message: this.$t("basic.inputBlongComp"),
|
|
|
- // type: "error"
|
|
|
- // });
|
|
|
- // }else{
|
|
|
this.allocations[index].isUse = 1;
|
|
|
- // this.http.post( this.port.base.enableMould, {
|
|
|
- // id: this.allocations[index].id,
|
|
|
- // isUse: 0
|
|
|
- // },
|
|
|
- var str = this.allocations[this.activeIndex].equipmentNo;
|
|
|
+ var str = this.allocations[index].equipmentNo;
|
|
|
this.http.post( this.port.base.setPacket, {
|
|
|
- lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
|
|
|
- hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
|
|
|
+ lowPowerLimit: this.allocations[index].alarmBattery,//.toString(16),
|
|
|
+ hotAlarmLimit: this.allocations[index].alarmDegree,//.toString(16),
|
|
|
isUse: 0,
|
|
|
equipmentNo: str
|
|
|
},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.$message({
|
|
|
- message: this.$t("basic.offUse"),
|
|
|
+ message: this.$t("basic.toWait"),
|
|
|
type: "success"
|
|
|
});
|
|
|
this.getMoulds();
|