|
@@ -120,38 +120,13 @@
|
|
|
<el-form label-width="125px">
|
|
|
<el-collapse-item title="图片上传">
|
|
|
<el-upload
|
|
|
- action="#"
|
|
|
+ :action="uploadImgUrl"
|
|
|
list-type="picture-card"
|
|
|
- :auto-upload="false">
|
|
|
- <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=""
|
|
|
- >
|
|
|
- <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>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
+ :limit="1"
|
|
|
+ :on-success="success"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove">
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
</el-upload>
|
|
|
<el-dialog :visible.sync="dialogVisible">
|
|
|
<img width="100%" :src="dialogImageUrl" alt="">
|
|
@@ -180,45 +155,6 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
disabled: false,
|
|
|
- fTmsorderbillsattachs: [
|
|
|
- {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '1'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '2'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '3'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '4'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '5'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '6'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '7'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '8'
|
|
|
- }, {
|
|
|
- attachName: '',
|
|
|
- attachUrl: '',
|
|
|
- actId: '9'
|
|
|
- }
|
|
|
- ],
|
|
|
imageUrl: '',
|
|
|
dataFormD: {},
|
|
|
visible: false,
|
|
@@ -243,78 +179,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handleRemove(file) {
|
|
|
- console.log(file);
|
|
|
+ success(response, file, fileList){
|
|
|
+ console.log(response, file, fileList)
|
|
|
+ },
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ console.log(file, fileList);
|
|
|
},
|
|
|
handlePictureCardPreview(file) {
|
|
|
this.dialogImageUrl = file.url;
|
|
|
- console.log(file)
|
|
|
- // this.dialogVisible = true;
|
|
|
- },
|
|
|
- handleDownload(file) {
|
|
|
- console.log(file);
|
|
|
- },
|
|
|
- handleAvatarSuccess(id,res,file) {
|
|
|
- console.log(id)
|
|
|
- console.log(res)
|
|
|
- console.log(file)
|
|
|
- if (res){
|
|
|
- console.log(id)
|
|
|
- // switch (id) {
|
|
|
- // case 1:
|
|
|
- // this.fTmsorderbillsattachs[0].actId = id
|
|
|
- // this.fTmsorderbillsattachs[0].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[0].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 2:
|
|
|
- // this.fTmsorderbillsattachs[1].actId = id
|
|
|
- // this.fTmsorderbillsattachs[1].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[1].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 3:
|
|
|
- // this.fTmsorderbillsattachs[2].actId = id
|
|
|
- // this.fTmsorderbillsattachs[2].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[2].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 4:
|
|
|
- // this.fTmsorderbillsattachs[3].actId = id
|
|
|
- // this.fTmsorderbillsattachs[3].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[3].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 5:
|
|
|
- // this.fTmsorderbillsattachs[4].actId = id
|
|
|
- // this.fTmsorderbillsattachs[4].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[4].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 6:
|
|
|
- // this.fTmsorderbillsattachs[5].actId = id
|
|
|
- // this.fTmsorderbillsattachs[5].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[5].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 7:
|
|
|
- // this.fTmsorderbillsattachs[6].actId = id
|
|
|
- // this.fTmsorderbillsattachs[6].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[6].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 8:
|
|
|
- // this.fTmsorderbillsattachs[7].actId = id
|
|
|
- // this.fTmsorderbillsattachs[7].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[7].attachUrl = res.url
|
|
|
- // break
|
|
|
- // case 9:
|
|
|
- // this.fTmsorderbillsattachs[8].actId = id
|
|
|
- // this.fTmsorderbillsattachs[8].attachName = res.fileName
|
|
|
- // this.fTmsorderbillsattachs[8].attachUrl = res.url
|
|
|
- // break
|
|
|
- // default:
|
|
|
- // this.$message.error('未知错误请刷新后再试');
|
|
|
- // }
|
|
|
- }
|
|
|
+ this.dialogVisible = true;
|
|
|
},
|
|
|
init() {
|
|
|
- console.log(this.fTmsorderbillsattachs)
|
|
|
this.visible = true
|
|
|
- console.log(this.dataForm)
|
|
|
if (this.dataForm.Id) {
|
|
|
lookOver(this.dataForm.Id).then(data => {
|
|
|
console.log(data)
|