添加功能

master
Comair 3 years ago
parent 9e98e319e7
commit c3419fe63f
  1. 8
      src/api/wcs/configuration.js
  2. 36
      src/views/wcs/configuration/index.vue

@ -17,4 +17,12 @@ export function updateStemConfiguration(data) {
data: data
})
}
// 切离
export function handleCutOff(data) {
return request({
url: '/wcs/configuration/handleCutOff',
method: 'put',
data: data
})
}

@ -46,6 +46,7 @@
:tableProps="tableProps"
@current-change="getList"
@handleUpdate="handleUpdate"
@handleCutOff="handleCutOff"
>
</heavy-table>
</div>
@ -79,7 +80,7 @@
</template>
<script>
import { systemConfigurationList, updateStemConfiguration } from "@/api/wcs/configuration";
import { systemConfigurationList, updateStemConfiguration,handleCutOff } from "@/api/wcs/configuration";
export default {
name: "Configuration",
@ -163,6 +164,23 @@ export default {
{
name: "修改",
event: "handleUpdate",
hidden(value) {
if (value.equipmentName !== "WCS") {
return true;
} else {
return false;
}
},
},{
name: "切离",
event: "handleCutOff",
hidden(value) {
if (value.equipmentName === "WCS") {
return true;
} else {
return false;
}
},
},
],
},
@ -250,6 +268,22 @@ export default {
this.open = true;
this.title = "修改区域";
},
/** 切离按钮操作 */
handleCutOff(row) {
let tempRow = JSON.parse(JSON.stringify(row));
let data = {
id: tempRow.id,
equipmentName: tempRow.equipmentName,
equipmentStatus: tempRow.equipmentStatus,
onlineStatus: tempRow.onlineStatus,
};
handleCutOff(data).then(response => {
this.$modal.msgSuccess("切离成功");
this.getList();
}).catch(()=>{
this.$modal.msgSuccess("切离失败,正在工作中或有异常");
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {

Loading…
Cancel
Save