Fix seller all-in-one image and order flows

This commit is contained in:
Chopper711
2026-06-17 16:45:36 +08:00
parent 1c10b20e10
commit c404f663ad
33 changed files with 513 additions and 125 deletions

View File

@@ -55,6 +55,15 @@
@on-change="selectDateRange"
></DatePicker>
</Form-item>
<Form-item label="上传人" prop="ownerName">
<Input
v-model="searchForm.ownerName"
clearable
placeholder="图片拥有者名称"
style="width: 240px"
type="text"
/>
</Form-item>
<Button
class="search-btn"
icon="ios-search"
@@ -87,9 +96,7 @@
<Upload
ref="up"
:action="commonUrl + '/common/common/upload/file'"
:data="{
directoryPath: searchForm.fileDirectoryId,
}"
:data="uploadDirectoryData"
:headers="accessToken"
:max-size="20480"
:on-error="handleError"
@@ -413,6 +420,7 @@
} from "@/api/index";
import DPlayer from "dplayer";
import { commonUrl } from "@/libs/axios";
import { normalizeFileRecords, normalizeSelectedFileValues, parseSelectedFileValue } from "@/utils/file-url";
const config = require("@/config/index");
@@ -474,6 +482,7 @@
name: "",
fileKey: "",
fileType: "",
ownerName: "",
pageNumber: 1, // 当前页数
pageSize: 27, // 页面大小
sort: "createTime", // 默认排序字段
@@ -869,11 +878,21 @@
if (val) this.selectImage = val
},
selectedOss(val) {
if (val && val.length > 0 && val[val.length-1].split(',')[1]) {
this.$emit("callback", {url: val[val.length-1].split(',')[1]});
if (val && val.length > 0) {
const selectedFile = parseSelectedFileValue(val[val.length - 1]);
if (selectedFile && selectedFile.url) {
this.$emit("callback", selectedFile);
}
}
}
},
computed: {
uploadDirectoryData() {
return {
directoryPath: this.searchForm.fileDirectoryId || "default",
};
},
},
methods: {
onMouseOver(item, index) {
@@ -886,12 +905,13 @@
// 复选框值改变时触发
selectOssChange(e) {
if (e) {
this.selectList = e.map(item => {return { id: item.split(',')[0]}});
this.selectCount = e.length;
const selectedFiles = normalizeSelectedFileValues(e);
this.selectList = selectedFiles.map(item => {return { id: item.id }});
this.selectCount = selectedFiles.length;
// let size = 0;
// e.forEach((item) => {size += item.fileSize * 1.0;});
// this.totalSize = ((size * 1.0) / (1024 * 1024)).toFixed(2) + " MB";
this.$emit("selected", e);
this.$emit("selected", selectedFiles);
}
},
// 页码改变时回调
@@ -1176,7 +1196,7 @@
getFileListData(this.searchForm).then((res) => {
this.loading = false;
this.data = res.result.records;
this.data = normalizeFileRecords(res.result.records, commonUrl);
this.total = res.result.total;
if (type === 'refresh') {
this.$Message.success('刷新成功!');