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

复制设备上传照片到list

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