Commit 4fe69012 authored by 黄奎's avatar 黄奎

新增多选

parent b4603283
This diff is collapsed.
......@@ -42,14 +42,14 @@
<div class="basefix app-attachment-list">
<div class="app-attachment-item app-attachment-upload">
<el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage">
:show-file-list="false" :http-request="UploadImage">
<div class="app-upload" flex="main:center cross:center" style="width: 100px; height: 100px;">
<i class="el-icon-upload"></i>
<i class="el-icon-upload"></i>
</div>
</el-upload>
</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 @click="PageSelect(item,1)" @dblclick="PageSelect(item,2)" :class="selectId==item.Id ? 'selected' :''"
class="el-tooltip item app-attachment-item">
<img :src="getIconLink(item.Path)" class="app-attachment-img" style="width: 100px; height: 100px;">
......@@ -91,6 +91,8 @@
<script>
export default {
//是否多选
props: ["IsMultiple"],
name: 'ChooseImg',
data() {
return {
......@@ -199,19 +201,18 @@
this.apipost("/api/product/SetMaterialInfo", this.addpageMsg, res => {
if (res.data.resultCode == 1) {
this.GetPageList();
}
})
},
// clickType 1单击 2双击
PageSelect(item,clickType) {
PageSelect(item, clickType) {
this.emitmsg = {
selectId: item.Id,
url: item.Path
}
this.selectId = item.Id;
if(clickType==2){
this.SelectImgId();
if (clickType == 2) {
this.SelectImgId();
}
},
......@@ -282,7 +283,7 @@
},
SelectGroup(id) {
this.PageMsg.GroupId = id;
this.addpageMsg.GroupId=id;
this.addpageMsg.GroupId = id;
this.GetPageList();
},
handleCurrentChange(val) {
......
......@@ -132,7 +132,7 @@ export default {
var filename = fileObj.name;
var index = filename.lastIndexOf(".");
var suffix = filename.substr(index);
var timestamp1 = Date.parse(new Date());
var timestamp1 = Date.parse(new Date())+"_"+(Math.ceil(Math.random()*1000));
let str = '';
if (this.isOnline()) {
str = "/Test"
......
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