提交 1da6ceaf authored 作者: zs's avatar zs

复制设备上传照片到list

上级 457ba96b
...@@ -38,16 +38,16 @@ ...@@ -38,16 +38,16 @@
</template> </template>
<script> <script>
import { import {
SYNCHRONIZE_DATA_PAD, SYNCHRONIZE_DATA_PAD,
checkAndCreateDirectory, checkAndCreateDirectory,
createFileWithPlusIO, createFileWithPlusIO,
setSm2, setSm2,
USER_FILE_NAME, USER_FILE_NAME,
getUserList, getUserList,
} from "@/utils/systemCofig"; } from "@/utils/systemCofig";
import { import {
copyDirectory, copyDirectory,
deleteAllFilesInDirectory, deleteAllFilesInDirectory,
addLog, addLog,
...@@ -55,11 +55,13 @@ import { ...@@ -55,11 +55,13 @@ import {
LOG_TYPE_ENUM, LOG_TYPE_ENUM,
writeDeviceData, writeDeviceData,
copyImagesToFolder, copyImagesToFolder,
} from "@/utils/IoReadingAndWriting.js"; } from "@/utils/IoReadingAndWriting.js";
import moment from "moment"; import moment from "moment";
import { Base64 } from "js-base64"; import {
Base64
} from "js-base64";
export default { export default {
props: { props: {
list: { list: {
type: Array, type: Array,
...@@ -112,9 +114,11 @@ export default { ...@@ -112,9 +114,11 @@ export default {
this.coverData(); this.coverData();
}, },
// 保存图片到指定地址 // 保存图片到指定地址
copyImages(imagePaths, userName) { async copyImages(imagePaths, userName) {
const targetPath = `${SYNCHRONIZE_DATA_PAD}/设备上架照片/${userName}`; const targetPath = `${SYNCHRONIZE_DATA_PAD}/设备上架照片/${userName}`;
const backtargetPath = `${SYNCHRONIZE_DATA_PAD}/list/${userName}`; // 复制文件到list目录下
console.log("imagePath打包", imagePaths); console.log("imagePath打包", imagePaths);
await copyImagesToFolder(imagePaths, backtargetPath)
//请空文件夹 //请空文件夹
deleteAllFilesInDirectory(targetPath).then(() => { deleteAllFilesInDirectory(targetPath).then(() => {
// 复制 // 复制
...@@ -256,10 +260,10 @@ export default { ...@@ -256,10 +260,10 @@ export default {
}); });
}, },
}, },
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.synchronous-dialog { .synchronous-dialog {
position: fixed; position: fixed;
z-index: 999; z-index: 999;
top: 0; top: 0;
...@@ -270,18 +274,17 @@ export default { ...@@ -270,18 +274,17 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.synchronous-content { .synchronous-content {
padding: 3% 20px 32px 24px; padding: 3% 20px 32px 24px;
width: 400px; width: 400px;
height: 60%; height: 60%;
box-sizing: border-box; box-sizing: border-box;
background-image: linear-gradient( background-image: linear-gradient(-6deg,
-6deg,
#f9ffe7 0%, #f9ffe7 0%,
#ffffff 12%, #ffffff 12%,
#fcfeff 73%, #fcfeff 73%,
#ccf1ff 100% #ccf1ff 100%);
);
border: 0.4px solid rgba(224, 224, 224, 1); border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px; border-radius: 12px;
position: relative; position: relative;
...@@ -300,9 +303,11 @@ export default { ...@@ -300,9 +303,11 @@ export default {
line-height: 26px; line-height: 26px;
font-weight: 500; font-weight: 500;
} }
.count-num { .count-num {
margin: 5% 0 5% 0; margin: 5% 0 5% 0;
align-items: flex-end; align-items: flex-end;
.num { .num {
display: inline-block; display: inline-block;
font-family: AlibabaPuHuiTi_2_65_Medium; font-family: AlibabaPuHuiTi_2_65_Medium;
...@@ -315,6 +320,7 @@ export default { ...@@ -315,6 +320,7 @@ export default {
.operating-instructions { .operating-instructions {
margin-bottom: 8%; margin-bottom: 8%;
.title { .title {
font-size: 13px; font-size: 13px;
color: #4a4a4a; color: #4a4a4a;
...@@ -322,6 +328,7 @@ export default { ...@@ -322,6 +328,7 @@ export default {
font-weight: 600; font-weight: 600;
text-align: left; text-align: left;
} }
.instructions-item { .instructions-item {
font-size: 12px; font-size: 12px;
color: #7c7c7c; color: #7c7c7c;
...@@ -356,10 +363,11 @@ export default { ...@@ -356,10 +363,11 @@ export default {
bottom: -40px; bottom: -40px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
.iconfont { .iconfont {
font-size: 24px; font-size: 24px;
} }
} }
} }
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论