|
@@ -3,6 +3,44 @@
|
|
|
<div>
|
|
<div>
|
|
|
<div class="gva-search-box">
|
|
<div class="gva-search-box">
|
|
|
<div>
|
|
<div>
|
|
|
|
|
+ <el-form ref="searchForm" :inline="true" :model="searchInfo">
|
|
|
|
|
+ <el-form-item label="归属任务">
|
|
|
|
|
+ <el-select v-model="searchInfo.name" size="small" filterable>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in taskOptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="负责人">
|
|
|
|
|
+ <el-select v-model="searchInfo.director_name" size="small">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in directorOptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="search"
|
|
|
|
|
+ @click="onSubmit"
|
|
|
|
|
+ >查询</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button size="small" icon="refresh" @click="onReset"
|
|
|
|
|
+ >重置</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gva-search-box" style="padding-bottom: 25px">
|
|
|
|
|
+ <div>
|
|
|
<el-button
|
|
<el-button
|
|
|
size="small"
|
|
size="small"
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -19,61 +57,6 @@
|
|
|
@click="switchCreateFolder()"
|
|
@click="switchCreateFolder()"
|
|
|
>新建文件夹</el-button
|
|
>新建文件夹</el-button
|
|
|
>
|
|
>
|
|
|
- <el-form
|
|
|
|
|
- ref="searchForm"
|
|
|
|
|
- :inline="true"
|
|
|
|
|
- :model="searchInfo"
|
|
|
|
|
- style="margin-left: 50%"
|
|
|
|
|
- >
|
|
|
|
|
- <!-- <el-form-item label="文件名">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="searchInfo.pc_num"
|
|
|
|
|
- placeholder="名称(支持模糊搜索)"
|
|
|
|
|
- size="small"
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item> -->
|
|
|
|
|
- <!-- <el-form-item label="格式类别">
|
|
|
|
|
- <el-select v-model="searchInfo.set_meal_id" size="small"
|
|
|
|
|
- ><el-option
|
|
|
|
|
- v-for="item in setMealOptions"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- /></el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="归属任务">
|
|
|
|
|
- <el-select v-model="searchInfo.shop_id" size="small">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in shopOptions"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="使用人">
|
|
|
|
|
- <el-select v-model="searchInfo.director_name" size="small">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in directorOptions"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item> -->
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <!-- <el-button
|
|
|
|
|
- size="small"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="search"
|
|
|
|
|
- @click="onSubmit"
|
|
|
|
|
- >查询</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button size="small" icon="refresh" @click="onReset"
|
|
|
|
|
- >重置</el-button
|
|
|
|
|
- > -->
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="gva-btn-list">
|
|
<div class="gva-btn-list">
|
|
@@ -410,7 +393,10 @@ import {
|
|
|
addQiniuFile,
|
|
addQiniuFile,
|
|
|
deleteQiniuFile,
|
|
deleteQiniuFile,
|
|
|
deleteQiniuFileAndRecord,
|
|
deleteQiniuFileAndRecord,
|
|
|
|
|
+ renameQiniuFileAndRecord,
|
|
|
|
|
+ queryFolder,
|
|
|
} from "@/api/fileManager";
|
|
} from "@/api/fileManager";
|
|
|
|
|
+import { getDirectorList } from "@/api/responsiblePerson";
|
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import { ArrowRight } from "@element-plus/icons-vue";
|
|
import { ArrowRight } from "@element-plus/icons-vue";
|
|
@@ -431,6 +417,7 @@ const formFolder = ref({
|
|
|
});
|
|
});
|
|
|
const taskOptions = ref();
|
|
const taskOptions = ref();
|
|
|
const fileTypeOptions = ref([]);
|
|
const fileTypeOptions = ref([]);
|
|
|
|
|
+const directorOptions = ref();
|
|
|
const currentParentId = ref(0);
|
|
const currentParentId = ref(0);
|
|
|
const uploadVisible = ref(false);
|
|
const uploadVisible = ref(false);
|
|
|
const progressFlag = ref(false);
|
|
const progressFlag = ref(false);
|
|
@@ -649,11 +636,42 @@ const handleCommand = (val) => {
|
|
|
getUrl(val.command);
|
|
getUrl(val.command);
|
|
|
break;
|
|
break;
|
|
|
case "rename":
|
|
case "rename":
|
|
|
|
|
+ rename(val.command);
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+//文件重命名
|
|
|
|
|
+async function rename(file) {
|
|
|
|
|
+ ElMessageBox.prompt("请输入新的文件名", "重命名", {
|
|
|
|
|
+ confirmButtonText: "确认",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ inputPattern:
|
|
|
|
|
+ /(?!((^(con)$)|^(con)\..*|(^(prn)$)|^(prn)\..*|(^(aux)$)|^(aux)\..*|(^(nul)$)|^(nul)\..*|(^(com)[1-9]$)|^(com)[1-9]\..*|(^(lpt)[1-9]$)|^(lpt)[1-9]\..*)|^\s+|.*\s$)(^[^\\\/\:\*\?\"\<\>\|]{1,255}$)/,
|
|
|
|
|
+ inputErrorMessage: "不允许这样命名",
|
|
|
|
|
+ inputValue: file.name,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(async ({ value }) => {
|
|
|
|
|
+ const res = await renameQiniuFileAndRecord({
|
|
|
|
|
+ id: file.id,
|
|
|
|
|
+ file_name: file.name,
|
|
|
|
|
+ file_name_new: value,
|
|
|
|
|
+ qiniu_key: file.qiniu_key,
|
|
|
|
|
+ });
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
|
+ ElMessage.success(res.msg);
|
|
|
|
|
+ initMaterialPage(currentParentId.value);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ // ElMessage({
|
|
|
|
|
+ // type: "info",
|
|
|
|
|
+ // message: "Input canceled",
|
|
|
|
|
+ // });
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
//获取下载链接
|
|
//获取下载链接
|
|
|
async function getUrl(file) {
|
|
async function getUrl(file) {
|
|
|
ElMessageBox.alert(
|
|
ElMessageBox.alert(
|
|
@@ -791,7 +809,7 @@ function beforeAvatarUpload(file) {
|
|
|
}
|
|
}
|
|
|
//确定上传,记录文件信息在数据库中
|
|
//确定上传,记录文件信息在数据库中
|
|
|
async function recordFile(aaa) {
|
|
async function recordFile(aaa) {
|
|
|
- // console.log(aaa);
|
|
|
|
|
|
|
+ console.log(aaa);
|
|
|
const params = {
|
|
const params = {
|
|
|
parent_id: aaa.parentId,
|
|
parent_id: aaa.parentId,
|
|
|
task_id: aaa.task_id,
|
|
task_id: aaa.task_id,
|
|
@@ -1028,6 +1046,57 @@ async function initMaterialPage(id = 0) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+//获取下拉框list
|
|
|
|
|
+const getSelectList = async () => {
|
|
|
|
|
+ const taskListRes = await getAllTaskSimple({
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ pageSize: 999,
|
|
|
|
|
+ });
|
|
|
|
|
+ let taskList = [];
|
|
|
|
|
+ const data = taskListRes.data.list;
|
|
|
|
|
+ data.forEach((e) => {
|
|
|
|
|
+ taskList.push({
|
|
|
|
|
+ value: e.task_id + "|" + e.task_name,
|
|
|
|
|
+ label: e.task_id + "_" + e.task_name,
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ taskOptions.value = taskList;
|
|
|
|
|
+ //游戏负责人列表===============================
|
|
|
|
|
+ const directorRes = await getDirectorList();
|
|
|
|
|
+ let directorList = [];
|
|
|
|
|
+ const data3 = directorRes.data.list;
|
|
|
|
|
+ data3.forEach((e) => {
|
|
|
|
|
+ if (e.name != "备用") {
|
|
|
|
|
+ directorList.push({ value: e.name, label: e.name });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ directorOptions.value = directorList;
|
|
|
|
|
+};
|
|
|
|
|
+const onReset = () => {
|
|
|
|
|
+ searchInfo.value = {};
|
|
|
|
|
+};
|
|
|
|
|
+const onSubmit = async () => {
|
|
|
|
|
+ // console.log(searchInfo.value)
|
|
|
|
|
+ files.value = [];
|
|
|
|
|
+ const table = await queryFolder({
|
|
|
|
|
+ ...searchInfo.value,
|
|
|
|
|
+ });
|
|
|
|
|
+ if (table.code === 0) {
|
|
|
|
|
+ // // console.log(table);
|
|
|
|
|
+ const folderList = table.data.folderList;
|
|
|
|
|
+ if (folderList != null) {
|
|
|
|
|
+ for (let i = 0; i < table.data.folderList.length; i++) {
|
|
|
|
|
+ var temp = {
|
|
|
|
|
+ id: table.data.folderList[i].id,
|
|
|
|
|
+ name: table.data.folderList[i].name,
|
|
|
|
|
+ isFile: false,
|
|
|
|
|
+ };
|
|
|
|
|
+ files.value.push(temp);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+getSelectList();
|
|
|
initMaterialPage();
|
|
initMaterialPage();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|