提交 18ed1a6b 编写于 作者: 钟一霄's avatar 钟一霄

V1.0.1.250205-251029

1. **值班安排**页面:导入模板错误新增错误文件下载功能
上级 1b229f7d
......@@ -40,7 +40,8 @@
width: 100%;
"
>
V1.0.1.250205-250325
<!-- 版本号:后端-前端 -->
V1.0.1.250205-251029
</span>
</div>
</div>
......
......@@ -417,6 +417,22 @@
</div>
</Modal>
<!-- 表格内容错误弹框下载 -->
<Modal v-model="errorModal" width="360">
<template #header>
<p style="color:#f60;text-align:center">
<Icon type="ios-information-circle"></Icon>
<span>数据有误</span>
</p>
</template>
<div style="text-align:center">
<p>{{ errorMessage }}</p>
</div>
<template #footer>
<Button type="error" size="large" long @click="dwlErrFile">下载错误文件</Button>
</template>
</Modal>
</div>
</template>
......@@ -745,6 +761,11 @@ export default {
tempYearMonth: '',
// 默认查询条件值班日期
dutyDateX: [],
// 表格内容错误弹框
errorModal: false,
errorMessage: '',
errorResponsePath: '',
};
},
//监听属性 类似于data概念",
......@@ -985,6 +1006,12 @@ export default {
this.dutyModelImportModal = false
}
if (res.code == 50002 && res.response != null) {
this.errorMessage = res.msg_detail
this.errorResponsePath = res.response
this.errorModal = true
}
return false
},
dutyModelFormatError(file, fileList) {
......@@ -1356,7 +1383,19 @@ export default {
api.GetUserSelect({condition: ''}).then(res => {
this.userArray = res.response
})
}
},
// 下载错误文件
dwlErrFile() {
let path = this.errorResponsePath
let i = path.lastIndexOf('/')
let str = path.substring(i + 1, path.length) // 截取最后字符串
const link = document.createElement('a')
link.style.display = 'none'
link.href = `${path}`
link.setAttribute('download', str) // 调出下载窗口
// document.body.appendChild(link)
link.click() // 添加点击事件
},
},
//生命周期 - 创建之前",数据模型未加载,方法未加载,html模板未加载
beforeCreate() {
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或