a3e80054 by renchao@pashanhoo.com

style:移动

1 parent eb062363
/*
* @Description: 企业银行接口
* @Autor: renchao
* @LastEditTime: 2023-09-11 10:19:36
* @LastEditTime: 2023-09-12 08:35:25
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
......@@ -80,4 +80,21 @@ export function deleteFile (bsmFile) {
bsmFile: bsmFile
}
})
}
/**
* @description: 移动
* @param {*} bsmFile
* @param {*} direction
* @author: renchao
*/
export function move (bsmFile, direction) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/company/move',
method: 'get',
params: {
bsmFile: bsmFile,
direction: direction
}
})
}
\ No newline at end of file
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-11 14:01:06
* @LastEditTime: 2023-09-12 08:45:25
-->
<template>
<div class="rlPopup">
......@@ -53,7 +53,7 @@
<script>
import PhotoZoom from '@/components/PhotoZoom'
import { getAltimeterInfo, getUuid } from '@/utils/operation.js'
import { uploadBatch, deleteFile } from "@/api/company.js"
import { uploadBatch, deleteFile, move } from "@/api/company.js"
import publicPicture from '@/components/publicPicture/index.vue'
export default {
name: 'PreviewImage',
......@@ -138,7 +138,14 @@
},
// 左右移动
handleMove (direction) {
// this.previewImg.imgList[this.previewImg.index].sxh
move(this.previewImg.imgList[this.previewImg.index].bsmFile, direction).then(res => {
this.$emit('updateList', { children: res.result, bsmMaterial: this.previewImg.bsmMaterial })
this.$message({
message: '移动成功!',
type: 'success'
})
})
},
/**
* @description: 拍照
......@@ -270,7 +277,7 @@
}
formData.append("bsmMaterial", this.previewImg.bsmMaterial);
if (this.previewImg.imgList.length > 0) {
formData.append("index", this.previewImg.index + 1);
formData.append("index", this.previewImg.imgList[this.previewImg.index].sxh);
}
uploadBatch(formData).then((res) => {
if (res.code == 200) {
......