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

11

parent f9346a00
...@@ -18,23 +18,23 @@ ...@@ -18,23 +18,23 @@
<div class="el-scrollbar" style="width: 100%;height:670px"> <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__wrap" style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view"> <div class="el-scrollbar__view">
<li class="el-menu-item" style="padding-left: 10px;padding-right: 10px;"> <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> <i class="el-icon-tickets"></i>
<span>全部</span> <span>全部</span>
</li> </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"> <div flex="dir:left box:last">
<el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;"> <el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
</el-col> </el-col>
<el-col class="blue" :span="6"> <el-col class="blue" :span="6">
<span v-if="scgroupMsg.Recycled==1" @click="EditGroup(item)">编辑 |</span> <span v-if="scgroupMsg.Recycled==1" @click.prevent="EditGroup(item)">编辑 |</span>
<span v-if="scgroupMsg.Recycled==2" @click="HYGroup(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> </el-col>
</div> </div>
</li> </li>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<div style="display:inline-block;float:right"> <div style="display:inline-block;float:right">
<div style="margin-left: 20px;display:inline-block;" class="appendInput"> <div style="margin-left: 20px;display:inline-block;" class="appendInput">
<el-input size="small" style="width:250px" placeholder="请输入内容" v-model="val"> <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> </el-input>
</div> </div>
<el-checkbox style="margin-left:12px" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox> <el-checkbox style="margin-left:12px" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</div> </div>
</div> </div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark" :content="item.Name" placement="top-start"> <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;"> <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 flex="dir:left" style="margin-top: 5px;">
<div class="material-name">{{item.Name}}</div> <div class="material-name">{{item.Name}}</div>
...@@ -217,6 +217,10 @@ export default { ...@@ -217,6 +217,10 @@ export default {
WithHeight:0, WithHeight:0,
}, },
pageMsgDig:false, pageMsgDig:false,
checkList:[],
checkAllList:[],
checkAll:false,
} }
}, },
created(){ created(){
...@@ -227,6 +231,28 @@ export default { ...@@ -227,6 +231,28 @@ export default {
}, },
methods:{ 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){ EditPage(item){
this.pageMsgDig=true; this.pageMsgDig=true;
this.addpageMsg={ this.addpageMsg={
...@@ -404,8 +430,16 @@ export default { ...@@ -404,8 +430,16 @@ export default {
this.loading=true; this.loading=true;
this.apipost("/api/product/GetMaterialInfoPageList",this.PageMsg, res => { this.apipost("/api/product/GetMaterialInfoPageList",this.PageMsg, res => {
this.loading=false; this.loading=false;
this.PageList=res.data.data.pageData;
this.total=res.data.data.count; 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){ handleClick(val){
...@@ -422,6 +456,12 @@ export default { ...@@ -422,6 +456,12 @@ export default {
</script> </script>
<style> <style>
.materialMan .selectActive .el-icon-tickets{
color: #409EFF;
}
.materialMan .selectActive{
color: #409EFF;
}
.materialMan .material-name { .materialMan .material-name {
color: #666666; color: #666666;
font-size: 13px; font-size: 13px;
...@@ -466,9 +506,12 @@ export default { ...@@ -466,9 +506,12 @@ export default {
.ChooseImg .app-attachment-list{ .ChooseImg .app-attachment-list{
padding: 5px; 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{ .ChooseImg .appendInput .el-input__inner{
border-right: none; border-right: none;
outline: none;
} }
.ChooseImg .appendInput .el-input-group__append{ .ChooseImg .appendInput .el-input-group__append{
background-color: #fff!important; background-color: #fff!important;
......
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
//主地址npm //主地址npm
UserImg: "User", //用户相图片 UserImg: "User", //用户相图片
//常用提交数据URL //常用提交数据URL
GoodsImg: "Goods", //商品相关文件 GoodsImg: "Goods", //素材相关文件
}; };
return fileTypeJson; 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