添加功能

master
Comair 3 years ago
parent c45d46c9b3
commit 6e5abdd757
  1. 9
      src/api/wcs/configuration.js
  2. 31
      src/views/wcs/configuration/index.vue

@ -26,3 +26,12 @@ export function handleCutOff(data) {
})
}
// 恢复
export function handleCutIn(data) {
return request({
url: '/wcs/configuration/handleCutIn',
method: 'post',
data: data
})
}

@ -47,6 +47,7 @@
@current-change="getList"
@handleUpdate="handleUpdate"
@handleCutOff="handleCutOff"
@handleCutIn="handleCutIn"
>
</heavy-table>
</div>
@ -80,7 +81,7 @@
</template>
<script>
import { systemConfigurationList, updateStemConfiguration,handleCutOff } from "@/api/wcs/configuration";
import { systemConfigurationList, updateStemConfiguration,handleCutOff,handleCutIn } from "@/api/wcs/configuration";
export default {
name: "Configuration",
@ -175,7 +176,17 @@ export default {
name: "切离",
event: "handleCutOff",
hidden(value) {
if (value.equipmentName === "WCS") {
if (value.equipmentName === "WCS" && value.equipmentStatus === 2) {
return true;
} else {
return false;
}
},
},{
name: "恢复",
event: "handleCutIn",
hidden(value) {
if (value.equipmentName === "WCS" && value.equipmentStatus === 1) {
return true;
} else {
return false;
@ -284,6 +295,22 @@ export default {
this.$modal.msgSuccess("切离失败,正在工作中或有异常");
})
},
/** 恢复按钮操作 */
handleCutIn(row) {
let tempRow = JSON.parse(JSON.stringify(row));
let data = {
id: tempRow.id,
equipmentName: tempRow.equipmentName,
equipmentStatus: tempRow.equipmentStatus,
onlineStatus: tempRow.onlineStatus,
};
handleCutIn(data).then(response => {
this.$modal.msgSuccess("切离成功");
this.getList();
}).catch(()=>{
this.$modal.msgSuccess("切离失败,正在工作中或有异常");
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {

Loading…
Cancel
Save