提交 459fdebb authored 作者: quanlili's avatar quanlili

修改默认排序

上级 897038cf
import request from '@/utils/request'
import { requestPath } from '@/utils/global.js'
//资源列表的公共接口
//元数据丰富化列表
//sip交接列表
//资源分类的列表
export function getListAPI(params) {
return request({
url: `${requestPath.resource}/Album-library/page`,
......
......@@ -190,7 +190,7 @@ export default {
status: 3//通过交接
},
dateTime:'',
createTime:'',
createTime:'desc',
allIds:[],
list:[],
total:0,
......@@ -370,11 +370,31 @@ export default {
},
refPage(){
this.loading=true;
this.resetSearch();
setTimeout(()=>{
this.loading=false;
},1000)
//window.location.reload()
},
resetSearch(){
this.searchForm={
resourceType:'2',
orderBy:"",
beginTime:'',
endTime:'',
pageNum:1,
pageSize:30,
status:1,//默认待交接的
createrId:'',
content:''
};
this.formation='';
this.createTime='desc';
this.userValue='';
this.dateTime='';
this.size ='';
this.getList()
},
createTimeSort(){
this.createTime = this.createTime=='desc'? 'asc':'desc';
this.searchForm.orderBy='createTime '+ this.createTime;
......
......@@ -8,14 +8,23 @@
<div class="screeningConditions">
<div class="screeningConditionsLeft">
<label for="">排列:</label>
<span @click="formationSort" class="btn" :class="[formation?'active':'']">形成时间<i :class="[formation=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span>
<span @click="sizeSort" class="btn" :class="[size?'active':'']">资源大小<i :class="[size=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span>
<!-- <span @click="formationSort" class="btn" :class="[formation?'active':'']">形成时间<i :class="[formation=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span>
<span @click="sizeSort" class="btn" :class="[size?'active':'']">资源大小<i :class="[size=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span> -->
<span @click="createTimeSort" class="btn" :class="[createTime?'active':'']">提交时间<i :class="[createTime=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span>
<em @click="searchTimerVisible=true">通过时间筛选</em>
<em @click="searchUserVisible=true">筛选用户提交</em>
<em @click="resetSearch" class="empty">清空用户筛选</em>
<!-- <em @click="resetSearch" class="empty">清空用户筛选</em> -->
</div>
<div class="screeningConditionsRight">
<el-select v-model="searchForm.albumType" placeholder="请选择" @change="changeAlbumType" style="width:100px">
<el-option
v-for="item in albumOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="searchForm.resourceType" placeholder="请选择" @change="changeResourceType" style="width:140px">
<el-option
v-for="item in options"
......@@ -33,7 +42,7 @@
<img class="pdf_pic" :src="item.suffix|formatImg" alt="文件图标">
<div class="content">
<p class="tit2">{{item.name}}</p>
<p class="field"><span>著录时间:{{item.createTime}}</span><span>资源大小:{{item.size}} </span></p>
<p class="field"><span>创建时间:{{item.createTime}}</span><span>图册类型:{{item.type_zh}} </span></p>
<p class="text">{{item.description}}</p>
</div>
<span class="tag">待丰富化</span>
......@@ -104,12 +113,13 @@
</template>
<script>
import { getListAPI ,getUserListAPI} from '@/api/commonResource'
import { getUserListAPI} from '@/api/commonResource'
import { getListAPI ,batchUpdateStatusAPI} from '@/api/atlas/index'
import pagination from '@/components/pagination/pagination'
import { operationMsg, confirm } from '@/utils/publicFunctions'
import { uploadUrl, uploadPath, requestPath } from "@/utils/global";
export default {
name: 'metadata',
name: 'atlasRich',
components:{pagination},
data () {
return {
......@@ -118,29 +128,45 @@ export default {
uploadUrl: uploadUrl,
loading:false,
options: [{
value: '',
label: '全部'
},{
value: '1',
label: '文本'
}, {
value: '2',
label: '图片'
}, {
value: '3',
label: '音频'
}, {
value: '4',
label: '视频'
}, {
value: '5',
label: '三维文件'
}],
albumOptions:[
{
value:'',
label:'全部'
},
{
value:'1',
label:'人物'
},
{
value:'2',
label:'会议'
},
{
value:'3',
label:'建筑'
},
{
value:'4',
label:'生活'
},
{
value:'5',
label:'历史'
},
{
value:'6',
label:'事件'
}
],
userList:[],
userValue:'',
searchForm:{
status:3,//默认丰富化的
resourceType:'',
resourceType:'2',
albumType:'',
orderBy:"",
beginTime:'',
endTime:'',
......@@ -152,7 +178,7 @@ export default {
dateTime:'',
formation:'',//形成时间的筛选的
size:'',
createTime:'',
createTime:'desc',
list:[],
totalCount:0,
}
......@@ -164,29 +190,6 @@ export default {
},
watch: {
},
filters:{
formatImg(type){
let srcImg='';
switch(type) {
case '.txt':
srcImg='icotxt.png';
break;
case ".doc":
srcImg='icodoc.png';
break;
case ".docx":
srcImg='icodocx.png';
break;
case ".pdf":
srcImg='icopdf.png';
break;
default:
srcImg='icopdf.png';
}
return require('../../../assets/img/'+srcImg)
console.log(srcImg,'999999')
},
},
methods: {
richTo(id){
this.$router.push({path:"/draw/metadata_detail",query:{id:id}})
......@@ -194,8 +197,8 @@ export default {
getList(){
getListAPI(this.searchForm).then(res=>{
if (res.data.code === 0) {
this.list=res.data.data.resList||[];
this.totalCount=res.data.data.totalCount||0;
this.list=res.data.data.list||[];
this.totalCount=res.data.data.total||0;
} else {
this.$message.error('获取失败')
}
......@@ -217,14 +220,17 @@ export default {
this.searchForm={
status:3,//默认丰富化的
resourceType:'',
albumType:'',
orderBy:"",
beginTime:'',
endTime:'',
pageNum:this.searchForm.pageNum,
pageSize:this.searchForm.pageSize
pageNum:1,
pageSize:30
};
this.formation='';
this.createTime='';
this.createTime='desc';
this.userValue='';
this.dateTime='';
this.size ='';
this.getList()
},
......@@ -278,6 +284,9 @@ export default {
this.getUserList(value);
console.log(value,'9999')
},
changeAlbumType(){
this.getList();
},
changeResourceType(){
this.getList();
},
......
......@@ -675,13 +675,6 @@ export default {
requestMsg.apply(this,[res.data,'丰富化'])
})
})
// metadataAPI(data).then(res=>{
// if(res.data.code==0){
// this.$message.success('丰富化成功')
// }else{
// this.$message.error('丰富化失败')
// }
// })
},
entitySubmit(){
this.backForm.state=this.entityForm.state;
......
......@@ -161,7 +161,7 @@ export default {
dateTime:'',
formation:'',//形成时间的筛选的
size:'',
createTime:'',
createTime:'desc',
list:[],
totalCount:0,
}
......@@ -212,11 +212,11 @@ export default {
orderBy:"",
beginTime:'',
endTime:'',
pageNum:this.searchForm.pageNum,
pageSize:this.searchForm.pageSize
pageNum:1,
pageSize:30
};
this.formation='';
this.createTime='';
this.createTime='desc';
this.size ='';
this.getList()
},
......
......@@ -200,7 +200,7 @@ export default {
},
formation:'',//形成时间的筛选的
size:'',
createTime:'',
createTime:'desc',
list:[],
totalCount:0,
diytypeList:[],
......@@ -385,10 +385,31 @@ export default {
},
refPage(){
this.loading=true;
this.resetSearch();
setTimeout(()=>{
this.loading=false;
},1000)
},
resetSearch(){
this.searchForm={
type:2,
diyTypeCode:'',
status:'',//默认丰富化的
resourceType:'',
orderBy:"",
beginTime:'',
endTime:'',
pageNum:1,
pageSize:30,
createrId:''
};
this.formation='';
this.createTime='desc';
//this.userValue='';//用户弹框
//this.dateTime='';//时间弹框
this.size ='';
this.getList()
}
},
}
</script>
......
......@@ -191,7 +191,7 @@ export default {
value: '4',
label: '视频'
}, {
value: '4',
value: '5',
label: '三维文件'
}],
type: '',
......@@ -219,7 +219,7 @@ export default {
status: 3//通过交接
},
dateTime:'',
createTime:'',
createTime:'desc',
allIds:[],
list:[],
totalCount:0,
......@@ -400,11 +400,31 @@ export default {
},
refPage(){
this.loading=true;
this.resetSearch();
setTimeout(()=>{
this.loading=false;
},1000)
//window.location.reload()
},
resetSearch(){
this.searchForm={
resourceType:'',
orderBy:"",
beginTime:'',
endTime:'',
pageNum:1,
pageSize:30,
status:1,//默认待交接的
createrId:'',
content:''
};
this.formation='';
this.createTime='desc';
this.userValue='';//用户弹框
this.dateTime='';//时间弹框
this.size ='';
this.getList()
},
createTimeSort(){
this.createTime = this.createTime=='desc'? 'asc':'desc';
this.searchForm.orderBy='createTime '+ this.createTime;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论