|
@@ -240,7 +240,34 @@
|
|
|
/deep/.noteDialog .el-dialog__body {
|
|
/deep/.noteDialog .el-dialog__body {
|
|
|
padding:10px 20px!important;
|
|
padding:10px 20px!important;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ .img_list{
|
|
|
|
|
+ li{
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ min-width: 140px;
|
|
|
|
|
+ height: 148px;
|
|
|
|
|
+ margin: 10px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ img{
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-icon-delete{
|
|
|
|
|
+ color: red;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ .move{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.527);
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
<template>
|
|
<template>
|
|
@@ -435,16 +462,21 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-input v-model="noteDesc" placeholder="请输入批注信息"></el-input>
|
|
<el-input v-model="noteDesc" placeholder="请输入批注信息"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item prop="img">
|
|
|
|
|
- <el-upload
|
|
|
|
|
- action="/api/admin/uploadfile"
|
|
|
|
|
- list-type="picture-card"
|
|
|
|
|
- :on-preview="handlePreview"
|
|
|
|
|
- :on-remove="handleRemove"
|
|
|
|
|
- :file-list="noteImgs"
|
|
|
|
|
- >
|
|
|
|
|
- <i class="el-icon-plus"></i>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <ul class="img_list">
|
|
|
|
|
+ <li v-for="(item,index) in noteImgs" :key='index'>
|
|
|
|
|
+ <img :src="item" alt="">
|
|
|
|
|
+ <p class="move"><i @click="remove(index)" class="el-icon-delete"></i></p>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <el-upload :on-success='imgchange'
|
|
|
|
|
+ action="/api/admin/uploadfile" :show-file-list='false'
|
|
|
|
|
+ list-type="picture-card">
|
|
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
@@ -530,6 +562,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
noteDesc:"",
|
|
noteDesc:"",
|
|
|
noteImgs:[],
|
|
noteImgs:[],
|
|
|
|
|
+ realImgs:[],
|
|
|
noteImgList:[],
|
|
noteImgList:[],
|
|
|
curItem:{},
|
|
curItem:{},
|
|
|
dialogTitle:"",
|
|
dialogTitle:"",
|
|
@@ -644,10 +677,21 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
upload(){
|
|
upload(){
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ imgchange(file, fileList){
|
|
|
|
|
+ console.log(fileList)
|
|
|
|
|
+ var img=this.noteImgs;
|
|
|
|
|
+ img.push(fileList.response.data)
|
|
|
|
|
+ this.noteImgs=img;
|
|
|
|
|
+ },
|
|
|
|
|
+ remove(index){
|
|
|
|
|
+ var img=this.noteImgs;
|
|
|
|
|
+ img.splice(index,1);
|
|
|
|
|
+ this.noteImgs=img;
|
|
|
},
|
|
},
|
|
|
addNote(item){
|
|
addNote(item){
|
|
|
this.noteDesc = item.noteDesc;
|
|
this.noteDesc = item.noteDesc;
|
|
|
- this.noteImgs = item.noteImgs;
|
|
|
|
|
|
|
+ this.noteImgs = item.noteImgs?item.noteImgs:[];
|
|
|
this.curItem = item;
|
|
this.curItem = item;
|
|
|
this.dialogTitle = "为"+'"'+item.label+'"添加批注信息'
|
|
this.dialogTitle = "为"+'"'+item.label+'"添加批注信息'
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|