Commit 99de595a authored by lijin's avatar lijin

素材管理增加查询

parent 67ffc189
...@@ -63,6 +63,44 @@ ...@@ -63,6 +63,44 @@
/> />
</el-form-item> </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> </el-form>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
...@@ -250,12 +288,13 @@ import FileUpload from '../../components/FileUpload' ...@@ -250,12 +288,13 @@ import FileUpload from '../../components/FileUpload'
import MaterialTagSelect from '../../components/MaterialTagSelect' import MaterialTagSelect from '../../components/MaterialTagSelect'
import DesigherSelect from '../../components/DesignerSelect' import DesigherSelect from '../../components/DesignerSelect'
export default { export default {
name: 'MaterialManage', name: 'MaterialManage',
components: { components: {
MaterialTagSelect, MaterialTagSelect,
DesigherSelect DesigherSelect,
}, },
data() { data() {
...@@ -274,7 +313,9 @@ export default { ...@@ -274,7 +313,9 @@ export default {
// 文件列表数据 // 文件列表数据
materials: [], materials: [],
loading: false, loading: false,
queryDate: [],
startDate: '',
endDate: '',
// 新建目录相关 // 新建目录相关
newDirDialogVisible: false, newDirDialogVisible: false,
newDirForm: { newDirForm: {
...@@ -311,6 +352,7 @@ export default { ...@@ -311,6 +352,7 @@ export default {
materialDesigners: [], materialDesigners: [],
tagFilter: [], tagFilter: [],
designer: '', designer: '',
resType: '',
allTags: [], allTags: [],
multipleSelection: [] multipleSelection: []
}; };
...@@ -356,13 +398,25 @@ export default { ...@@ -356,13 +398,25 @@ export default {
} }
this.loading = true; this.loading = true;
let tagFilterStr = this.tagFilter.map(String).join(','); 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({ fetchMaterials({
tags: tagFilterStr, tags: tagFilterStr,
pageNum: this.currentPage, pageNum: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
directoryId: this.currentDirectory, directoryId: this.currentDirectory,
includeSubdirectories: this.includeSubdirectories, includeSubdirectories: this.includeSubdirectories,
designer: this.designer || null designer: this.designer || null,
resType: this.resType,
startDate: this.startDate,
endDate: this.endDate
}).then(response => { }).then(response => {
if (response && response.status === 200) { if (response && response.status === 200) {
this.materials = response.result.data.value; 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