Commit 805d8d5f authored by 李鹏 's avatar 李鹏

bugfix

parent 72fc342d
......@@ -175,6 +175,7 @@ import { Search } from "@element-plus/icons-vue";
import { watch, nextTick, reactive, toRefs, ref, computed, onBeforeMount } from "vue";
import { useRoute, useRouter } from "vue-router";
import axios from "@/request/http.js";
import { topId } from "../helper.js";
import { ElMessage } from "element-plus";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
......@@ -399,7 +400,7 @@ const editCurType = async (row) => {
if (res.data.code == 200) {
const data = res.data.data || {};
state.formData = {
parent_id: data.parent_id,
parent_id: data.parent_id === topId ? "topLevel" : data.parent_id,
classify_name: data.classify_name,
sort: data.sort,
describe: data.describe,
......@@ -454,7 +455,8 @@ const deleteCurType = (row) => {
};
const beforeSwitchStatus = async (row) => {
const res = await axios.get(`/apaas/knowledge/v5/documentmgr/classify/quote/${row.id}`);
if (!res.data.data) {
console.log(res);
if (res.data.code !== 200) {
ElMessage.warning("请将该文档类型下所挂载的文档删除或转移至其他文档类型下再停用!");
return false;
}
......
import $axios from "@/request/http";
export const topId = "00000000-0000-0000-0000-000000000000";
export const $imgAdd = function (args, editorRef) {
const [pos, $file] = args;
const formdata = new FormData();
......
import $axios from "@/request/http";
export const topId = "00000000-0000-0000-0000-000000000000";
export const $imgAdd = function (args, editorRef) {
const [pos, $file] = args;
const formdata = new FormData();
formdata.append("file", $file);
formdata.append("directory", "image");
$axios
.post("/apaas/common/image/upload", formdata, {
headers: { "Content-Type": "multipart/form-data" },
})
.then(({ data }) => {
editorRef.$img2Url(pos, data.data);
});
};
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