Commit 4a1fd9ff authored by 何远江's avatar 何远江

订单复制bug修改

parent 06be3230
......@@ -96,6 +96,7 @@
<el-button type="primary" size="small" @click="toRun">执行解析</el-button>
<el-button type="primary" size="small" @click="copy">复制</el-button>
<el-button
v-if="commentExcelStore.copyFileId"
:loading="pasteLoading"
type="primary"
size="small"
......@@ -759,7 +760,7 @@ const toDelete = async (row) => {
*/
const copy = () => {
if (areaList.value?.length) {
return commentExcelStore.setCopyFileId()
return localStorage.setItem('copyOrderID', getFileInfo.value.orderFileId)
}
ElMessage('该文件还未设置标注信息!')
}
......@@ -768,15 +769,16 @@ const copy = () => {
* 引入复制的配置
*/
const pasteConfig = async () => {
const copyOrderID = localStorage.getItem('copyOrderID')
// 是否是当前文件
if (isSameFile.value) {
if (copyOrderID == getFileInfo.value.varFileId) {
return ElMessage('请在其他文件引入!')
}
pasteLoading.value = true
try {
// 1、获取复制文件id
const { data } = await getExcelAreaByFileId(commentExcelStore.copyFileId as string)
const { data } = await getExcelAreaByFileId(copyOrderID)
// 2、去除id
data.result.forEach((item) => {
......
......@@ -96,6 +96,7 @@
<el-button type="primary" size="small" @click="toRun">执行解析</el-button>
<el-button type="primary" size="small" @click="copy">复制</el-button>
<el-button
v-if="commentExcelStore.copyFileId"
:loading="pasteLoading"
type="primary"
size="small"
......@@ -757,7 +758,7 @@ const toDelete = async (row) => {
*/
const copy = () => {
if (areaList.value?.length) {
return commentExcelStore.setCopyFileId()
return localStorage.setItem('copyVarID', getFileInfo.value.varFileId)
}
ElMessage('该文件还未设置标注信息!')
}
......@@ -766,15 +767,16 @@ const toDelete = async (row) => {
* 引入复制的配置
*/
const pasteConfig = async () => {
const copyVarID = localStorage.getItem('copyVarID')
// 是否是当前文件
if (isSameVarFile.value) {
if (copyVarID == getFileInfo.value.varFileId) {
return ElMessage('请在其他文件引入!')
}
pasteLoading.value = true
try {
// 1、获取复制文件id
const { data } = await getExcelAreaByFileId(commentExcelStore.copyFileId as string)
const { data } = await getExcelAreaByFileId(copyVarID)
// 2、去除id
data.result.forEach((item) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment