This commit is contained in:
zyn
2023-04-23 13:37:37 +08:00
parent 8545576636
commit b20a3683ab
3 changed files with 5 additions and 117 deletions
@@ -218,12 +218,7 @@
></el-input>
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;margin-top: 13px">
<div v-for="(item,index) in LSBBBUSSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">
<span style="" @click="handleFilePreview2(item,'preview')" :title="item.name"> {{ item.name }}</span>
<span style="margin-left: 7px;" v-if="item.id !== ''">
<i class="el-icon-download" title="下载" @click="handleFilePreview2(item,'down')"></i>
</span>
</div>
<div v-for="(item,index) in LSBBBUSSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
</div>
<div style="width: 20%;">
<el-button :disabled="disabledXX"
@@ -2743,39 +2738,6 @@
this.$preview(attId)
}
},
handleFilePreview2(file, type) {
let attId = ""
if (file && file.id) {
attId = file.id
} else {
attId = file.response.data.id
}
if (file.name == this.form.standName) {
let fileName = ""
let fileNam2 = ""
if (this.form.standName && this.form.standName !== '') {
fileName = this.form.standName + '-企业标准.docx'
fileNam2 = this.form.standName
} else {
fileName = '企业标准.docx'
fileNam2 = '企业标准'
}
let form = JSON.parse(JSON.stringify(this.form))
form.standCode = ''
form.issueDate = ''
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
return
}
if (type === 'down') {
if (attId) {
window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId)
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
this.$preview(attId)
}
},
// 导入标准数据成功后执行
importFileSuccess (response, file,fileList) {
// 上传成功后判断是否是两条数据是的话替换掉旧数据
@@ -213,12 +213,8 @@
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;margin-top: 13px">
<div v-for="(item,index) in LSBBBUSSFileList" :key="index"
style="color: #409eff;cursor:pointer"
class="fileClass">
<span style="" @click="handleFilePreview2(item,'preview')" :title="item.name"> {{ item.name }}</span>
<span style="margin-left: 7px;" v-if="item.id !== ''">
<i class="el-icon-download" title="下载" @click="handleFilePreview2(item,'down')"></i>
</span>
@click="handleFilePreview(item)" style="color: #409eff;cursor:pointer"
class="fileClass">{{ item.name }}
</div>
</div>
<div style="width: 20%;">
@@ -2923,39 +2919,6 @@
this.$preview(attId)
}
},
handleFilePreview2(file, type) {
let attId = ""
if (file && file.id) {
attId = file.id
} else {
attId = file.response.data.id
}
if (file.name == this.form.standName) {
let fileName = ""
let fileNam2 = ""
if (this.form.standName && this.form.standName !== '') {
fileName = this.form.standName + '-企业标准.docx'
fileNam2 = this.form.standName
} else {
fileName = '企业标准.docx'
fileNam2 = '企业标准'
}
let form = JSON.parse(JSON.stringify(this.form))
form.standCode = ''
form.issueDate = ''
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
return
}
if (type === 'down') {
if (attId) {
window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId)
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
this.$preview(attId)
}
},
handleFilePreviewOne(file, type) {
let id = ""
let fileName = ""
@@ -209,12 +209,8 @@
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;margin-top: 13px">
<div v-for="(item,index) in LSBBBUSSFileList" :key="index"
@click="handleFilePreview(item)" style="color: #409eff;cursor:pointer;margin-left: 12px;"
class="fileClass">
<span style="" @click="handleFilePreview2(item,'preview')" :title="item.name"> {{ item.name }}</span>
<span style="margin-left: 7px;" v-if="item.id !== ''">
<i class="el-icon-download" title="下载" @click="handleFilePreview2(item,'down')"></i>
</span>
@click="handleFilePreview(item)" style="color: #409eff;cursor:pointer"
class="fileClass">{{ item.name }}
</div>
</div>
<div style="width: 20%;">
@@ -2893,39 +2889,6 @@
this.$preview(attId)
}
},
handleFilePreview2(file, type) {
let attId = ""
if (file && file.id) {
attId = file.id
} else {
attId = file.response.data.id
}
if (file.name == this.form.standName) {
let fileName = ""
let fileNam2 = ""
if (this.form.standName && this.form.standName !== '') {
fileName = this.form.standName + '-企业标准.docx'
fileNam2 = this.form.standName
} else {
fileName = '企业标准.docx'
fileNam2 = '企业标准'
}
let form = JSON.parse(JSON.stringify(this.form))
form.standCode = ''
form.issueDate = ''
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
return
}
if (type === 'down') {
if (attId) {
window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId)
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
this.$preview(attId)
}
},
// 导入标准数据成功后执行
importFileSuccess(response, file, fileList) {
// 上传成功后判断是否是两条数据是的话替换掉旧数据