Compare commits
No commits in common. "f9c606fde93e69d46a97024bf47c822b1b2f1beb" and "6621a5e5e3361d9603bd5d21443866bd5a6d5f7e" have entirely different histories.
f9c606fde9
...
6621a5e5e3
File diff suppressed because it is too large
Load Diff
|
|
@ -16,7 +16,7 @@
|
||||||
"less": "^3.12.2",
|
"less": "^3.12.2",
|
||||||
"less-loader": "^7.0.1",
|
"less-loader": "^7.0.1",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"sass": "^1.58.1",
|
"node-sass": "4.14.1",
|
||||||
"sass-loader": "8.0.2",
|
"sass-loader": "8.0.2",
|
||||||
"signature_pad": "^3.0.0-beta.4",
|
"signature_pad": "^3.0.0-beta.4",
|
||||||
"trim-canvas": "^0.1.2",
|
"trim-canvas": "^0.1.2",
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,6 @@
|
||||||
<i class="el-icon-upload-success el-icon-check"></i>
|
<i class="el-icon-upload-success el-icon-check"></i>
|
||||||
</label>
|
</label>
|
||||||
<span class="el-upload-list__item-actions">
|
<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)">
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
|
||||||
<i class="el-icon-delete"></i>
|
<i class="el-icon-delete"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -61,11 +55,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div slot="tip" class="el-upload__tip">添加图片 {{ sizeTip }}</div>
|
<div slot="tip" class="el-upload__tip">添加图片 {{ sizeTip }}</div>
|
||||||
</el-upload>
|
</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>
|
</div>
|
||||||
<el-upload :file-list="attachmentList"
|
<el-upload :file-list="attachmentList"
|
||||||
:limit="attachmentMaxSize" with-credentials
|
:limit="attachmentMaxSize" with-credentials
|
||||||
|
|
@ -86,7 +75,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {deleteFile} from "@/api/common";
|
import {deleteFile} from "@/api/common";
|
||||||
import {getBaseUrl} from "@/api/request";
|
import {getBaseUrl} from "../../api/request";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Comment",
|
name: "Comment",
|
||||||
|
|
@ -141,8 +130,6 @@ export default {
|
||||||
},
|
},
|
||||||
context: null,
|
context: null,
|
||||||
backNode: null,
|
backNode: null,
|
||||||
dialogImageUrl: '',
|
|
||||||
dialogVisible: false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -186,19 +173,15 @@ export default {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.dialogVisible = true;
|
console.log(file, this._value);
|
||||||
this.dialogImageUrl = file.url;
|
|
||||||
},
|
},
|
||||||
handleDownload(file) {
|
handleDownload(file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
},
|
},
|
||||||
handleRemove(file) {
|
handleRemove(file, imageList) {
|
||||||
deleteFile(file.id).then(res => {
|
deleteFile(file.id).then(res => {
|
||||||
if (res.code === 1000) {
|
this.$message.success("删除成功");
|
||||||
this.$message.success("删除成功")
|
});
|
||||||
this.fileList.splice( this.fileList.findIndex((item)=>item.id===file.id),1)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
selectConfirm() {
|
selectConfirm() {
|
||||||
let fileList = []
|
let fileList = []
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,6 @@
|
||||||
<i slot="default" class="el-icon-plus"></i>
|
<i slot="default" class="el-icon-plus"></i>
|
||||||
<div slot="file" slot-scope="{file}">
|
<div slot="file" slot-scope="{file}">
|
||||||
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
|
<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-actions">
|
||||||
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||||
<i class="el-icon-zoom-in"></i>
|
<i class="el-icon-zoom-in"></i>
|
||||||
|
|
@ -38,11 +35,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div slot="tip" class="el-upload__tip">{{ placeholder }} {{ sizeTip }}</div>
|
<div slot="tip" class="el-upload__tip">{{ placeholder }} {{ sizeTip }}</div>
|
||||||
</el-upload>
|
</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>
|
||||||
<template v-else-if="perm === 'R'">
|
<template v-else-if="perm === 'R'">
|
||||||
<div v-for="(item , index) in _value" :key="index">
|
<div v-for="(item , index) in _value" :key="index">
|
||||||
|
|
@ -67,7 +59,7 @@ export default {
|
||||||
name: "ImageUpload",
|
name: "ImageUpload",
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value:{
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: () => {
|
||||||
return []
|
return []
|
||||||
|
|
@ -85,7 +77,7 @@ export default {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 5
|
default: 5
|
||||||
},
|
},
|
||||||
maxNumber: {
|
maxNumber:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 10
|
default: 10
|
||||||
},
|
},
|
||||||
|
|
@ -101,54 +93,47 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList: [],
|
fileList:[],
|
||||||
disabled: false,
|
disabled: false,
|
||||||
uploadFileUrl: getBaseUrl() + "/flowable/process/file",
|
uploadFileUrl: getBaseUrl()+"/flowable/process/file",
|
||||||
headers: {
|
headers: {
|
||||||
authorization: localStorage.getItem("token")
|
authorization: localStorage.getItem("token")
|
||||||
},
|
},
|
||||||
uploadParams: {},
|
uploadParams: {}
|
||||||
dialogImageUrl: '',
|
|
||||||
dialogVisible: false,
|
|
||||||
imageUrl:[]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.fileList = this._value
|
this.fileList = this._value
|
||||||
console.log(this.value, "images")
|
console.log(this.value,"images")
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
beforeUpload(file) {
|
beforeUpload(file){
|
||||||
const alows = ['image/jpeg', 'image/png', 'image/gif', 'image/jpg'];
|
const alows = ['image/jpeg', 'image/png', 'image/gif', 'image/jpg'];
|
||||||
if (alows.indexOf(file.type) === -1) {
|
if (alows.indexOf(file.type) === -1){
|
||||||
this.$message.warning("存在不支持的图片格式")
|
this.$message.warning("存在不支持的图片格式")
|
||||||
} else if (this.maxSize > 0 && file.size / 1024 / 1024 > this.maxSize) {
|
}else if(this.maxSize > 0 && file.size / 1024 / 1024 > this.maxSize){
|
||||||
this.$message.warning(`单张图片最大不超过 ${this.maxSize}MB`)
|
this.$message.warning(`单张图片最大不超过 ${this.maxSize}MB`)
|
||||||
} else {
|
}else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
handleUploadSuccess(res, file) {
|
handleUploadSuccess(res, file){
|
||||||
if (res.code !== 1000) {
|
if (res.code !== 1000){
|
||||||
this.$message.error("上传失败")
|
this.$message.error("上传失败")
|
||||||
}
|
}
|
||||||
let data = res.data
|
let data = res.data
|
||||||
this.fileList.push(data)
|
this.fileList.push(data)
|
||||||
this.$emit("input", this.fileList)
|
this.$emit("input",this.fileList)
|
||||||
console.log(res, file, this.fileList)
|
console.log(res,file,this.fileList)
|
||||||
},
|
},
|
||||||
handleRemove(file) {
|
handleRemove(file, fileList) {
|
||||||
deleteFile(file.id).then(res => {
|
deleteFile(file.id).then(res=>{
|
||||||
if (res.code === 1000) {
|
|
||||||
this.$message.success("删除成功")
|
this.$message.success("删除成功")
|
||||||
this.fileList.splice( this.fileList.findIndex((item)=>item.id===file.id),1)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.dialogVisible = true;
|
console.log(file,this._value)
|
||||||
this.dialogImageUrl = file.url;
|
|
||||||
},
|
},
|
||||||
handleDownload(file) {
|
handleDownload(file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
|
|
@ -166,19 +151,16 @@ export default {
|
||||||
border: 1px dashed #8c8c8c;
|
border: 1px dashed #8c8c8c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/deep/ .el-upload--picture-card{
|
||||||
/deep/ .el-upload--picture-card {
|
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
line-height: 87px;
|
line-height: 87px;
|
||||||
}
|
}
|
||||||
|
/deep/ .el-upload-list__item{
|
||||||
/deep/ .el-upload-list__item {
|
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
.el-upload-list__item-actions{
|
||||||
.el-upload-list__item-actions {
|
&> span+span{
|
||||||
& > span + span {
|
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="scss">
|
||||||
.top {
|
.top {
|
||||||
padding: 0 10px 10px 10px;
|
padding: 0 10px 10px 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue