|
@@ -12,10 +12,22 @@
|
|
|
<el-input v-model="form.fileName" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是否合并">
|
|
|
- <el-radio-group v-model="form.merge">
|
|
|
+ <!-- <el-radio-group v-model="form.merge">
|
|
|
<el-radio :label="true">是</el-radio>
|
|
|
<el-radio :label="false">否</el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ </el-radio-group> -->
|
|
|
+ <el-switch
|
|
|
+ v-model="form.merge"
|
|
|
+ class="mb-2"
|
|
|
+ style="--el-switch-on-color: #646adf; --el-switch-off-color: #eee"
|
|
|
+ active-text="是"
|
|
|
+ inactive-text="否"
|
|
|
+ :disabled="props.scanFileArr.length == 1"
|
|
|
+ @change="changeMerge"
|
|
|
+ />
|
|
|
+ <el-button v-if="form.merge" @click="toDrop" style="margin-left: 16px"
|
|
|
+ >点击排序</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
<el-form-item label="目标目录">
|
|
|
<el-input v-model="thisNode.label" disabled />
|
|
@@ -47,6 +59,13 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
+ <DropFile
|
|
|
+ v-if="showFile"
|
|
|
+ :showFile="showFile"
|
|
|
+ @changeList="changeList"
|
|
|
+ @closeshowFile="closeshowFile"
|
|
|
+ :copyList="copyList"
|
|
|
+ ></DropFile>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -67,6 +86,7 @@ import myfile from "@/api/myfile/myfile";
|
|
|
import { claimFile } from "@/api/scanner/info.js";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import { setIcon } from "@/utils/index.js";
|
|
|
+import DropFile from "@/components/DropFile/DropFile.vue";
|
|
|
const props = defineProps({
|
|
|
openScanMove: {
|
|
|
type: Boolean,
|
|
@@ -96,6 +116,9 @@ const props = defineProps({
|
|
|
const treeData = ref();
|
|
|
const dirIds = ref();
|
|
|
const thisNode = ref({}); //当前选中的接点
|
|
|
+const showFile = ref(false);
|
|
|
+const copyList = ref([]);
|
|
|
+const queryQ = ref([]);
|
|
|
const form = ref({
|
|
|
fileName: "扫描文件" + Date.now(),
|
|
|
merge: false,
|
|
@@ -123,8 +146,8 @@ const onSubmit = async () => {
|
|
|
dirId: thisNode.value.value,
|
|
|
merge: form.value.merge,
|
|
|
name: form.value.fileName,
|
|
|
- q: toRaw(props.scanFileArr),
|
|
|
- spaceId: props.thisFolder?props.thisFolder.spaceId:props.spaceId,
|
|
|
+ q: queryQ.value,
|
|
|
+ spaceId: props.thisFolder ? props.thisFolder.spaceId : props.spaceId,
|
|
|
};
|
|
|
// console.log("query", query);
|
|
|
const res = await claimFile(query);
|
|
@@ -159,10 +182,37 @@ function getFileTree() {
|
|
|
const setImg = (type) => {
|
|
|
return setIcon(type);
|
|
|
};
|
|
|
+const closeshowFile = () => {
|
|
|
+ showFile.value = false;
|
|
|
+};
|
|
|
+
|
|
|
+// 选择合并
|
|
|
+const changeMerge = () => {
|
|
|
+ if (form.value.merge) {
|
|
|
+ showFile.value = true;
|
|
|
+
|
|
|
+ // console.log("merge");
|
|
|
+ }
|
|
|
+};
|
|
|
+const toDrop = () => {
|
|
|
+ showFile.value = true;
|
|
|
+};
|
|
|
+const changeList = (newList) => {
|
|
|
+ showFile.value = false;
|
|
|
+ copyList.value = newList;
|
|
|
+ queryQ.value = copyList.value.map((item) => item.q);
|
|
|
+ // console.log("queryQ", queryQ.value);
|
|
|
+};
|
|
|
onMounted(() => {
|
|
|
getFileTree();
|
|
|
+ // setTimeout(() => {
|
|
|
+ // rowDrop();
|
|
|
+ // }, 500);
|
|
|
// console.log("thisFolder", props.thisFolder);
|
|
|
// console.log("scanFileArr", props.scanFileArr);
|
|
|
+ copyList.value = props.scanFileArr;
|
|
|
+ queryQ.value = copyList.value.map((item) => item.q);
|
|
|
+ // console.log("queryQ", queryQ.value);
|
|
|
if (props.thisFolder) {
|
|
|
thisNode.value = {
|
|
|
label: props.thisFolder.dirName,
|