Commit 99de595a authored by lijin's avatar lijin

素材管理增加查询

parent 67ffc189
......@@ -63,6 +63,44 @@
/>
</el-form-item>
<el-form-item label="素材类型">
<el-select
v-model="resType"
placeholder="素材类型"
clearable
@change="fetchMaterials"
>
<el-option
key="1"
label="图片"
value="1"
>
</el-option>
<el-option
key="2"
label="视频"
value="2"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker
v-model="queryDate"
type="daterange"
align="right"
unlink-panels
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="fetchMaterials"
/>
</el-form-item>
</el-form>
<div style="margin-bottom: 10px;">
......@@ -250,12 +288,13 @@ import FileUpload from '../../components/FileUpload'
import MaterialTagSelect from '../../components/MaterialTagSelect'
import DesigherSelect from '../../components/DesignerSelect'
export default {
name: 'MaterialManage',
components: {
MaterialTagSelect,
DesigherSelect
DesigherSelect,
},
data() {
......@@ -274,7 +313,9 @@ export default {
// 文件列表数据
materials: [],
loading: false,
queryDate: [],
startDate: '',
endDate: '',
// 新建目录相关
newDirDialogVisible: false,
newDirForm: {
......@@ -311,6 +352,7 @@ export default {
materialDesigners: [],
tagFilter: [],
designer: '',
resType: '',
allTags: [],
multipleSelection: []
};
......@@ -356,13 +398,25 @@ export default {
}
this.loading = true;
let tagFilterStr = this.tagFilter.map(String).join(',');
if (this.queryDate && this.queryDate.length === 2) {
this.startDate = this.queryDate[0];
this.endDate = this.queryDate[1];
} else {
this.startDate = "";
this.endDate = "";
}
fetchMaterials({
tags: tagFilterStr,
pageNum: this.currentPage,
pageSize: this.pageSize,
directoryId: this.currentDirectory,
includeSubdirectories: this.includeSubdirectories,
designer: this.designer || null
designer: this.designer || null,
resType: this.resType,
startDate: this.startDate,
endDate: this.endDate
}).then(response => {
if (response && response.status === 200) {
this.materials = response.result.data.value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment