Commit 8212b00e authored by sxl's avatar sxl 💬

fix:修改接口

parent f20fffec
......@@ -37,8 +37,14 @@ export function addAllocation(data) {
// 修改【请填写功能名称】
export function updateAllocation(data) {
if (data.inspectionObjectName) {
delete data.inspectionObjectName
}
if (data.responsiblePersonName) {
delete data.responsiblePersonName
}
return request({
url: '/pc/inspection/allocation/update',
url: '/pc/inspection/allocation/edit',
method: 'post',
data: data
})
......
......@@ -106,7 +106,7 @@
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:type="scope.row.status === 0 ? '开启' : '关闭'"
:type="scope.row.status == 0 ? '开启' : '关闭'"
active-value="0"
inactive-value="1"
@change="handleStatusChange(scope.row)"
......@@ -544,7 +544,6 @@ export default {
},
//日常巡检任务开关
handleStatusChange(row) {
row.status = row.status == 0 ? 1 : 0
updateAllocation(row).then(response => {
this.$modal.msgSuccess('修改成功')
this.getList()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment