|
|
@@ -1,8 +1,8 @@
|
|
|
<script setup lang="ts">
|
|
|
import { useCompRef } from "@/utils/useCompRef";
|
|
|
-import { ElIcon, ElInput, ElMessageBox, ElTree } from "element-plus";
|
|
|
+import { ElIcon, ElInput, ElMessage, ElMessageBox, ElTree } from "element-plus";
|
|
|
import { h, ref } from "vue";
|
|
|
-import { Document, Folder, Lock, Open, Sort } from "@element-plus/icons-vue";
|
|
|
+import { Document, Folder, Lock, Open } from "@element-plus/icons-vue";
|
|
|
import { stringIsBlank } from "@/utils/blank-utils";
|
|
|
import { xcMessage } from "@/utils/xiaochan-element-plus";
|
|
|
import {
|
|
|
@@ -58,15 +58,13 @@ const filterNode = (query: string, node) => {
|
|
|
return node.name.includes(query);
|
|
|
};
|
|
|
|
|
|
-let drag = new Map();
|
|
|
-
|
|
|
const dragEnd = (moveNode, inNode, type, event) => {
|
|
|
if (type === "none") return;
|
|
|
- let temp = {
|
|
|
- newParent: inNode.data.emrDocumentId,
|
|
|
- oldParent: moveNode.data.parent,
|
|
|
- };
|
|
|
- drag.set(moveNode.data.id, temp);
|
|
|
+ electronicMedicalRecordSequencing([
|
|
|
+ { id: moveNode.data.id, parent: inNode.data.emrDocumentId },
|
|
|
+ ]).then(() => {
|
|
|
+ ElMessage.success("排序成功。");
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const dragLimit = (moveNode, inNode, type) => {
|
|
|
@@ -172,26 +170,6 @@ const contextmenuItemV2 = (e, data) => {
|
|
|
icon: h(ElIcon, {}, () => h(Open)),
|
|
|
disabled: !isFiler(data),
|
|
|
},
|
|
|
- {
|
|
|
- label: "确认排序",
|
|
|
- onClick: () => {
|
|
|
- let temp = [];
|
|
|
- drag.forEach((value, key) => {
|
|
|
- if (value.newParent !== value.oldParent) {
|
|
|
- temp.push({ id: key, parent: value.newParent });
|
|
|
- }
|
|
|
- });
|
|
|
- if (temp.length === 0) {
|
|
|
- drag.clear();
|
|
|
- return xcMessage.error("文件夹没有变化,无需点击。");
|
|
|
- }
|
|
|
- electronicMedicalRecordSequencing(temp).then(() => {
|
|
|
- drag.clear();
|
|
|
- });
|
|
|
- },
|
|
|
- disabled: drag.size === 0,
|
|
|
- icon: h(ElIcon, {}, () => h(Sort)),
|
|
|
- },
|
|
|
{
|
|
|
label: "修改文件夹名称",
|
|
|
onClick: async () => {
|