Compare commits
No commits in common. "172eeb163714a776703db5a9155ece0d6de8e882" and "45adfde6178bb042ae22f345f23569efe8df0a5e" have entirely different histories.
172eeb1637
...
45adfde617
|
|
@ -48,12 +48,6 @@
|
|||
<i class="el-icon-upload-success el-icon-check"></i>
|
||||
</label>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||
<i class="el-icon-zoom-in"></i>
|
||||
</span>
|
||||
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
|
||||
<i class="el-icon-delete"></i>
|
||||
</span>
|
||||
|
|
@ -61,11 +55,6 @@
|
|||
</div>
|
||||
<div slot="tip" class="el-upload__tip">添加图片 {{ sizeTip }}</div>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" center append-to-body>
|
||||
<div>
|
||||
<img width="100%" :src="dialogImageUrl" alt="" style="z-index: 3435">
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-upload :file-list="attachmentList"
|
||||
:limit="attachmentMaxSize" with-credentials
|
||||
|
|
@ -86,7 +75,7 @@
|
|||
|
||||
<script>
|
||||
import {deleteFile} from "@/api/common";
|
||||
import {getBaseUrl} from "@/api/request";
|
||||
import {getBaseUrl} from "../../api/request";
|
||||
|
||||
export default {
|
||||
name: "Comment",
|
||||
|
|
@ -141,8 +130,6 @@ export default {
|
|||
},
|
||||
context: null,
|
||||
backNode: null,
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -186,19 +173,15 @@ export default {
|
|||
return false;
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogVisible = true;
|
||||
this.dialogImageUrl = file.url;
|
||||
console.log(file, this._value);
|
||||
},
|
||||
handleDownload(file) {
|
||||
console.log(file);
|
||||
},
|
||||
handleRemove(file) {
|
||||
handleRemove(file, imageList) {
|
||||
deleteFile(file.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
this.$message.success("删除成功")
|
||||
this.fileList.splice( this.fileList.findIndex((item)=>item.id===file.id),1)
|
||||
}
|
||||
})
|
||||
this.$message.success("删除成功");
|
||||
});
|
||||
},
|
||||
selectConfirm() {
|
||||
let fileList = []
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@
|
|||
<i slot="default" class="el-icon-plus"></i>
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
|
||||
<label class="el-upload-list__item-status-label">
|
||||
<i class="el-icon-upload-success el-icon-check"></i>
|
||||
</label>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||
<i class="el-icon-zoom-in"></i>
|
||||
|
|
@ -38,11 +35,6 @@
|
|||
</div>
|
||||
<div slot="tip" class="el-upload__tip">{{ placeholder }} {{ sizeTip }}</div>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" center append-to-body>
|
||||
<div>
|
||||
<img width="100%" :src="dialogImageUrl" alt="" style="z-index: 3435">
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<template v-else-if="perm === 'R'">
|
||||
<div v-for="(item , index) in _value" :key="index">
|
||||
|
|
@ -107,10 +99,7 @@ export default {
|
|||
headers: {
|
||||
authorization: localStorage.getItem("token")
|
||||
},
|
||||
uploadParams: {},
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
imageUrl:[]
|
||||
uploadParams: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -138,17 +127,13 @@ export default {
|
|||
this.$emit("input",this.fileList)
|
||||
console.log(res,file,this.fileList)
|
||||
},
|
||||
handleRemove(file) {
|
||||
handleRemove(file, fileList) {
|
||||
deleteFile(file.id).then(res=>{
|
||||
if (res.code === 1000) {
|
||||
this.$message.success("删除成功")
|
||||
this.fileList.splice( this.fileList.findIndex((item)=>item.id===file.id),1)
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogVisible = true;
|
||||
this.dialogImageUrl = file.url;
|
||||
console.log(file,this._value)
|
||||
},
|
||||
handleDownload(file) {
|
||||
console.log(file);
|
||||
|
|
@ -166,17 +151,14 @@ export default {
|
|||
border: 1px dashed #8c8c8c;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-upload--picture-card{
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 87px;
|
||||
}
|
||||
|
||||
/deep/ .el-upload-list__item{
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
|
||||
.el-upload-list__item-actions{
|
||||
&> span+span{
|
||||
margin: 1px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue