mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-06-24 02:50:22 +08:00
Fix seller all-in-one image and order flows
This commit is contained in:
@@ -13,6 +13,9 @@
|
||||
<Form-item label="上传时间">
|
||||
<DatePicker v-model="selectDate" clearable format="yyyy-MM-dd" placeholder="选择起始时间" style="width: 200px" type="daterange" @on-change="selectDateRange"></DatePicker>
|
||||
</Form-item>
|
||||
<Form-item label="上传人" prop="ownerName">
|
||||
<Input v-model="searchForm.ownerName" clearable placeholder="图片拥有者名称" style="width: 200px" type="text" />
|
||||
</Form-item>
|
||||
<Button class="search-btn" icon="ios-search" type="primary" @click="handleSearch">搜索
|
||||
</Button>
|
||||
</Form>
|
||||
@@ -37,9 +40,7 @@
|
||||
<Upload
|
||||
ref="up"
|
||||
:action="commonUrl + '/common/common/upload/file'"
|
||||
:data="{
|
||||
directoryPath: searchForm.fileDirectoryId,
|
||||
}"
|
||||
:data="uploadDirectoryData"
|
||||
:headers="accessToken"
|
||||
:max-size="20480"
|
||||
:on-error="handleError"
|
||||
@@ -203,6 +204,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");
|
||||
|
||||
@@ -268,6 +270,7 @@
|
||||
name: "",
|
||||
fileKey: "",
|
||||
fileType: "",
|
||||
ownerName: "",
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 27, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
@@ -665,7 +668,10 @@
|
||||
},
|
||||
selectedOss(val) {
|
||||
if (val && val.length) {
|
||||
this.$emit("callback", {url: val[val.length-1].split(',')[1]});
|
||||
const selectedFile = parseSelectedFileValue(val[val.length - 1]);
|
||||
if (selectedFile && selectedFile.url) {
|
||||
this.$emit("callback", selectedFile);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 初始化监听 是否清空所选图片
|
||||
@@ -675,6 +681,13 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
uploadDirectoryData() {
|
||||
return {
|
||||
directoryPath: this.searchForm.fileDirectoryId || "default",
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
onMouseOver(item, index) {
|
||||
@@ -687,12 +700,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);
|
||||
}
|
||||
},
|
||||
// 页码改变时回调
|
||||
@@ -977,7 +991,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('刷新成功!');
|
||||
|
||||
Reference in New Issue
Block a user