Commit 80fc003a authored by 黄媛媛's avatar 黄媛媛

11

parent f9346a00
......@@ -18,23 +18,23 @@
<div class="el-scrollbar" style="width: 100%;height:670px">
<div class="el-scrollbar__wrap" style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view">
<li class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<i class="el-icon-tickets"></i>
<span>全部</span>
<li :class="PageMsg.GroupId==0?'selectActive' : ''" @click="SelectGroup(0)" class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<i class="el-icon-tickets"></i>
<span>全部</span>
</li>
<li v-for="(item,index) in groupList" :key="index" class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<li :class="PageMsg.GroupId==item.Id?'selectActive' : ''" @click="SelectGroup(item.Id)" v-for="(item,index) in groupList" :key="index" class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<div flex="dir:left box:last">
<el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
<i class="el-icon-tickets"></i>
<span>{{item.Name}}</span>
</el-col>
<el-col class="blue" :span="6">
<span v-if="scgroupMsg.Recycled==1" @click="EditGroup(item)">编辑 |</span>
<span v-if="scgroupMsg.Recycled==2" @click="HYGroup(item)">还原 |</span>
<span v-if="scgroupMsg.Recycled==1" @click.prevent="EditGroup(item)">编辑 |</span>
<span v-if="scgroupMsg.Recycled==2" @click.prevent="HYGroup(item)">还原 |</span>
<!-- 回收 -->
<span v-if="scgroupMsg.Recycled==1" @click="HsGroup(item)">删除</span>
<span v-if="scgroupMsg.Recycled==1" @click.prevent="HsGroup(item)">删除</span>
<!--回收站删除 -->
<span v-if="scgroupMsg.Recycled==2" @click="DeleteGroup(item)">删除</span>
<span v-if="scgroupMsg.Recycled==2" @click.prevent="DeleteGroup(item)">删除</span>
</el-col>
</div>
</li>
......@@ -50,7 +50,7 @@
<div style="display:inline-block;float:right">
<div style="margin-left: 20px;display:inline-block;" class="appendInput">
<el-input size="small" style="width:250px" placeholder="请输入内容" v-model="val">
<el-button slot="append" icon="el-icon-search"></el-button>
<el-button @click="GetPageList" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<el-checkbox style="margin-left:12px" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
......@@ -77,7 +77,7 @@
</div>
</div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark" :content="item.Name" placement="top-start">
<div class="el-tooltip item material-item selected">
<div @click="PageSelect(item,index)" :class="item.Selected ? 'selected' :''" class="el-tooltip item material-item ">
<img :src="'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+item.Path" class="material-img" style="width: 140px; height: 140px;">
<div flex="dir:left" style="margin-top: 5px;">
<div class="material-name">{{item.Name}}</div>
......@@ -217,6 +217,10 @@ export default {
WithHeight:0,
},
pageMsgDig:false,
checkList:[],
checkAllList:[],
checkAll:false,
}
},
created(){
......@@ -227,6 +231,28 @@ export default {
},
methods:{
// 单个删除
PageSelect(item,index){
item.Selected=!item.Selected;
if(item.Selected){
this.checkList.push(item.Id);
}
},
// 数组去重
unique(arr) {
return arr.filter(function(item, index, arr) {
//当前元素,在原始数组中的第一个索引==当前索引值,否则返回当前元素
return arr.indexOf(item, 0) === index;
});
},
// 全选
handleCheckAllChange(){
},
SelectGroup(id){
this.PageMsg.GroupId=id;
this.GetPageList();
},
EditPage(item){
this.pageMsgDig=true;
this.addpageMsg={
......@@ -404,8 +430,16 @@ export default {
this.loading=true;
this.apipost("/api/product/GetMaterialInfoPageList",this.PageMsg, res => {
this.loading=false;
this.PageList=res.data.data.pageData;
this.total=res.data.data.count;
let data=res.data.data.pageData;
this.checkAllList=[];
data.forEach(item=>{
this.checkAllList.push(item.Id)
item.Selected=false;
})
this.PageList=data;
})
},
handleClick(val){
......@@ -422,6 +456,12 @@ export default {
</script>
<style>
.materialMan .selectActive .el-icon-tickets{
color: #409EFF;
}
.materialMan .selectActive{
color: #409EFF;
}
.materialMan .material-name {
color: #666666;
font-size: 13px;
......@@ -466,9 +506,12 @@ export default {
.ChooseImg .app-attachment-list{
padding: 5px;
}
.materialMan .appendInput .el-input.is-active .el-input__inner,.materialMan .appendInput .el-input__inner:focus{
border-color: #DCDFE6;
}
.ChooseImg .appendInput .el-input__inner{
border-right: none;
outline: none;
}
.ChooseImg .appendInput .el-input-group__append{
background-color: #fff!important;
......
......@@ -126,7 +126,7 @@ export default {
//主地址npm
UserImg: "User", //用户相图片
//常用提交数据URL
GoodsImg: "Goods", //商品相关文件
GoodsImg: "Goods", //素材相关文件
};
return fileTypeJson;
},
......
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