|
@ -113,6 +113,7 @@ import { |
|
|
} from "@/services/ore/oreManage"; |
|
|
} from "@/services/ore/oreManage"; |
|
|
import AddOre from "./components/AddOre.vue"; |
|
|
import AddOre from "./components/AddOre.vue"; |
|
|
import * as R from "ramda"; |
|
|
import * as R from "ramda"; |
|
|
|
|
|
import { ElMessageBox } from "element-plus"; |
|
|
|
|
|
|
|
|
const showEditDialog = ref<boolean>(false); |
|
|
const showEditDialog = ref<boolean>(false); |
|
|
const oreOnEdit = ref<Ore | undefined>(); |
|
|
const oreOnEdit = ref<Ore | undefined>(); |
|
@ -209,14 +210,28 @@ function onEditCraft() { |
|
|
} |
|
|
} |
|
|
function onDeleteCraft() { |
|
|
function onDeleteCraft() { |
|
|
if (selectedCraftIds.value.length === 0) return; |
|
|
if (selectedCraftIds.value.length === 0) return; |
|
|
deleteCraft(selectedCraftIds.value.join(",")).then(res => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
selectedCraftIds.value = []; |
|
|
|
|
|
getOres(); |
|
|
|
|
|
} else { |
|
|
|
|
|
showToast(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ElMessageBox.confirm( |
|
|
|
|
|
"确定删除工艺?", |
|
|
|
|
|
{ |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
center: true, |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
.then(() => { |
|
|
|
|
|
deleteCraft(selectedCraftIds.value.join(",")).then(res => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
selectedCraftIds.value = []; |
|
|
|
|
|
getOres(); |
|
|
|
|
|
} else { |
|
|
|
|
|
showToast(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
function confirmCraftEdit(craft: Craft) { |
|
|
function confirmCraftEdit(craft: Craft) { |
|
|
let req; |
|
|
let req; |
|
|