|
|
|
@ -81,10 +81,11 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
fixed="right" |
|
|
|
width="100" |
|
|
|
width="150" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" @click="editStation(scope.row)">修改</a> |
|
|
|
<a type="text" @click="deleteStation(scope.row)" style="margin-left: 10px;" v-if="scope.row.active === 'N'">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -224,6 +225,7 @@ import { |
|
|
|
getAgvStationList, |
|
|
|
addAgvStation, |
|
|
|
updateAgvStation, |
|
|
|
deleteAgvStation, |
|
|
|
getAreaOptions, |
|
|
|
getStatusOptions |
|
|
|
} from '@/api/wcsSystem/agvStation.js' |
|
|
|
@ -438,6 +440,7 @@ export default { |
|
|
|
] |
|
|
|
}, |
|
|
|
saveLoading: false, |
|
|
|
deleteLoading: false, |
|
|
|
// 下拉选项 - rqrq |
|
|
|
areaOptions: [], |
|
|
|
statusOptions: [], |
|
|
|
@ -620,6 +623,34 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 删除站点 - rqrq |
|
|
|
deleteStation(row) { |
|
|
|
// 二次确认 - rqrq |
|
|
|
this.$confirm(`确定要删除站点 "${row.stationName}" 吗?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.deleteLoading = true |
|
|
|
|
|
|
|
deleteAgvStation({ stationCode: row.stationCode }).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('删除成功') |
|
|
|
this.getDataList() |
|
|
|
} else { |
|
|
|
this.$alert(data.msg || '删除失败', '错误') |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('删除AGV站点失败:', error) |
|
|
|
this.$message.error('删除失败') |
|
|
|
}).finally(() => { |
|
|
|
this.deleteLoading = false |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消删除 - rqrq |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 导出相关方法 - rqrq |
|
|
|
createExportData() { |
|
|
|
return this.$http({ |
|
|
|
|