diff --git a/src/views/business/businessHandling/directApply.vue b/src/views/business/businessHandling/directApply.vue
index 5f22d06f..21984cf6 100644
--- a/src/views/business/businessHandling/directApply.vue
+++ b/src/views/business/businessHandling/directApply.vue
@@ -234,6 +234,13 @@

+
-
![]()
+

+
@@ -599,6 +600,11 @@ export default {
}
},
methods: {
+ isPdf(file) {
+ const url = file.response ? file.response.data.url : file.url.replaceAll('#', '%23')
+ if (!url) return false
+ return url.toLowerCase().includes('.pdf')
+ },
// 查询
handleQuery() {
// 重置分页到第一页
@@ -730,12 +736,12 @@ export default {
isTeamSelected(teamName) {
// 如果转出班组已选择,且当前遍历的转入班组的 teamName 与选中的转出班组的 teamName 相同,则禁用
if (this.maForm.backTeamId) {
- const selectedBackTeam = this.uniteList.find(item => item.id === this.maForm.backTeamId);
+ const selectedBackTeam = this.uniteList.find(item => item.id === this.maForm.backTeamId)
if (selectedBackTeam && selectedBackTeam.teamName === teamName) {
- return true; // 禁用相同的班组
+ return true // 禁用相同的班组
}
}
- return false; // 不禁用
+ return false // 不禁用
},
// 获取物资类型
async getMaTypeOpt() {
@@ -837,11 +843,11 @@ export default {
if (!val) return
this.maForm.backTeamName = this.uniteList.find(item => item.id === val).teamName
// 清空转入班组内容
- this.maForm.leaseTeamName = '';
+ this.maForm.leaseTeamName = ''
this.getAgreementId()
},
projectChange(val) {
- this.maForm.backTeamId=undefined;
+ this.maForm.backTeamId = undefined
const obj = this.projectList.find(item => item.proId === val)
console.log('🚀 ~ projectChange ~ obj:', obj)
if (!val) {
@@ -1303,6 +1309,10 @@ export default {
console.log('xxxxxxxxxxxx', file)
this.dialogImageUrl = file.response ? file.response.data.url : file.url.replaceAll('#', '%23')
console.log('zzzzzzzzzz', this.dialogImageUrl)
+ if (this.isPdf(file)) {
+ window.open(this.dialogImageUrl, '_blank')
+ return
+ }
// const parts = file.name ? file.name:file.url.split('.')
// console.log("yyyyyyyyy",parts)
// const extension = parts?.pop()