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

新增多选

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