提交 4542486e authored 作者: lidongxu's avatar lidongxu

refactor(inspectiontask/*): 修改:勤策移动端_售点稽查_上传照片路径年月在前

上级 1ec485b7
......@@ -328,7 +328,7 @@ const commitStorePhotosRead = async (file) => {
const date = new Date()
const month = date.getMonth() + 1
const theDate = date.getDate()
const pictureUrl = await uploadFileToOSSAPI(`risk/storeFrontPhoto/${date.getFullYear()}-${month}/${useUserStore().empInfo.empNo}/${form.storeCode}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/storeFrontPhoto/${useUserStore().empInfo.empNo}/${uuidv4()}.png`, file.file)
form.commitStorePicture = [{
url: pictureUrl
}]
......@@ -406,7 +406,7 @@ const longTimePictureArrRead = async (file) => {
const date = new Date()
const month = date.getMonth() + 1
const theDate = date.getDate()
const pictureUrl = await uploadFileToOSSAPI(`risk/longTimePicture/${date.getFullYear()}-${month}/${useUserStore().empInfo.empNo}/${form.storeCode}/${uuidv4()}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/longTimePicture/${useUserStore().empInfo.empNo}/${form.storeCode}/${uuidv4()}.png`, file.file)
form.longTimePictureArr.push({
url: pictureUrl
})
......
......@@ -48,6 +48,7 @@
<template #input>
<el-date-picker v-model="obj.value"
type="month"
readonly
value-format="YYYY-MM"
placeholder="选择月份"
@change="handleTasteChange(index)" />
......
......@@ -187,7 +187,7 @@ const displayPhotosRead = async (file, { name, index }) => {
const month = date.getMonth() + 1
const theDate = date.getDate()
const target = displayGroup.value[name]
const pictureUrl = await uploadFileToOSSAPI(`risk/displayPhoto/${date.getFullYear()}-${month}/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/displayPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
target.photoArr.push({
url: pictureUrl
})
......
......@@ -185,7 +185,7 @@ const displayPhotosRead = async (file, { name, index }) => {
const month = date.getMonth() + 1
const theDate = date.getDate()
const target = displayGroup.value[name]
const pictureUrl = await uploadFileToOSSAPI(`risk/scheduleAdjustmentPhoto/${date.getFullYear()}-${month}/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/scheduleAdjustmentPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
target.photoArr.push({
url: pictureUrl
})
......
......@@ -185,7 +185,7 @@ const displayPhotosRead = async (file, { name, index }) => {
const month = date.getMonth() + 1
const theDate = date.getDate()
const target = displayGroup.value[name]
const pictureUrl = await uploadFileToOSSAPI(`risk/scheduleDisplayPhoto/${date.getFullYear()}-${month}/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/scheduleDisplayPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
target.photoArr.push({
url: pictureUrl
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论