合并分支 'dev_20230216' 到 'master'

技术标准-发布稿按钮

查看合并请求 laws-foton-slrs/foton-laws-system-front!82
This commit is contained in:
高嵩
2023-05-19 12:47:26 +08:00
4 changed files with 56 additions and 68 deletions
@@ -139,37 +139,26 @@
<div v-for="(item,index) in FBGBUSSFileList" :key="index" <div v-for="(item,index) in FBGBUSSFileList" :key="index"
style="color: #409eff;cursor:pointer" style="color: #409eff;cursor:pointer"
class="fileClass fileClassName"> class="fileClass fileClassName">
<span style="width: 80%;" <span style="width: 80%;"
v-if="index == 0 && !item.id.startsWith('ATT')" v-if="index == 0 && !item.id.startsWith('ATT')"
@click="handleFilePreviewOne(item,'preview')"> @click="handleFilePreviewOne(item,'preview')">
{{ item.name }} {{ item.name }}
</span> </span>
<span v-else @click="handleFilePreview(item,'preview')"> <span v-else @click="handleFilePreview(item,'preview')"> {{ item.name }} </span>
{{ item.name }} <span style="width: 20%;margin-left: 15px;" v-if="item.id !== '' && index == 0 && !item.id.startsWith('ATT')">
</span> <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreviewOne(item,'onlineEdit')"></el-button>
<span style="width: 20%;margin-left: 15px;" </span>
v-if="item.id !== '' && index == 0 && !item.id.startsWith('ATT')"> <span style="margin-left: 7px;" v-if="item.id !== '' && item.id.startsWith('ATT')">
<el-button type="primary" size="mini" <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
plain icon="el-icon-edit" </span>
@click="handleFilePreviewOne(item,'onlineEdit')"></el-button>
</span>
<span style="margin-left: 7px;" v-if="item.id !== '' && index != 0">
<i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
</span>
</div> </div>
</div> </div>
<div style="width: 80%;margin-top: 13px" v-if="!isTrue"> <div style="width: 80%;margin-top: 13px" v-if="!isTrue">
<div v-for="(item,index) in FBGBUSSFileList" :key="index" <div v-for="(item,index) in FBGBUSSFileList" :key="index" style="color: #409eff;cursor:pointer;" class="fileClass">
style="color: #409eff;cursor:pointer;" <span style="" @click="handleFilePreview(item,'preview')" :title="item.name"> {{ item.name }}</span>
class="fileClass"> <span style="margin-left: 7px;" v-if="item.id !== '' && item.id.startsWith('ATT')">
<span style="" @click="handleFilePreview(item,'preview')" <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
:title="item.name"> </span>
{{ item.name }}
</span>
<span style="margin-left: 7px;"
v-if="item.id !== '' && item.name != form.standName">
<i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
</span>
</div> </div>
</div> </div>
<div style="width: 20%;"> <div style="width: 20%;">
@@ -963,23 +952,25 @@
} else { } else {
attId = file.response.data.id attId = file.response.data.id
} }
if (file.name == this.form.standName) { if(type === 'preview' && file.name == this.form.standName) {
let fileName = "" let fileName = ""
let fileNam2 = "" let fileNam2 = ""
if (this.form.standName && this.form.standName !== '') { if (this.form.standName && this.form.standName !== '') {
fileName = this.form.standName + '-企业标准.docx' fileName = this.form.standName + '-企业标准.docx'
fileNam2 = this.form.standName fileNam2 = this.form.standName
} else { } else {
fileName = '企业标准.docx' fileName = '企业标准.docx'
fileNam2 = '企业标准' fileNam2 = '企业标准'
} }
let form = JSON.parse(JSON.stringify(this.form)) let form = JSON.parse(JSON.stringify(this.form))
form.standCode = '' form.standCode = ''
form.issueDate = '' form.issueDate = ''
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) if (file.id.startsWith('ATT')) {
return this.$preview(file.id)
} } else {
if (type === 'down') { this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
}
}else if (type === 'down') {
if (attId) { if (attId) {
window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId) window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId)
} else { } else {
@@ -173,7 +173,7 @@
:title="item.name"> :title="item.name">
{{ item.name }} {{ item.name }}
</span> </span>
<span style="margin-left: 7px;" v-if="item.id !== '' && item.name != form.standName"> <span style="margin-left: 7px;" v-if="item.id !== '' && item.id.startsWith('ATT')">
<i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i> <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
</span> </span>
</div> </div>
@@ -957,7 +957,7 @@ export default {
}else { }else {
attId = file.response.data.id attId = file.response.data.id
} }
if (file.name == this.form.standName) { if (type === 'preview' && file.name == this.form.standName) {
let fileName = "" let fileName = ""
let fileNam2 = "" let fileNam2 = ""
if (this.form.standName && this.form.standName !== '') { if (this.form.standName && this.form.standName !== '') {
@@ -970,18 +970,20 @@ export default {
let form = JSON.parse(JSON.stringify(this.form)) let form = JSON.parse(JSON.stringify(this.form))
form.standCode = '' form.standCode = ''
form.issueDate = '' form.issueDate = ''
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) if (file.id.startsWith('ATT')) {
return this.$preview(file.id)
} } else {
if (type === 'down') { this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
}
}else if (type === 'down') {
if (attId) { if (attId) {
window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId) window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId)
} else { } else {
this.$message.warning('文件不存在,下载失败') this.$message.warning('文件不存在,下载失败')
} }
} else { } else {
this.$preview(attId) this.$preview(attId)
} }
}, },
handleFilePreviewOne(file, type) { handleFilePreviewOne(file, type) {
let id = "" let id = ""
@@ -115,9 +115,7 @@
@click="handleFilePreviewOne(item,'preview')"> {{ item.name }} </span> @click="handleFilePreviewOne(item,'preview')"> {{ item.name }} </span>
<span v-else @click="handleFilePreview(item,'preview')"> {{ item.name }} </span> <span v-else @click="handleFilePreview(item,'preview')"> {{ item.name }} </span>
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== '' && index == 0 && !item.id.startsWith('ATT')"> <span style="width: 20%;margin-left: 15px;" v-if="item.id !== '' && index == 0 && !item.id.startsWith('ATT')">
<el-button type="primary" size="mini" <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreviewOne(item,'onlineEdit')"></el-button>
plain icon="el-icon-edit"
@click="handleFilePreviewOne(item,'onlineEdit')"></el-button>
</span> </span>
<span style="margin-left: 7px;" v-if="item.id !== '' && item.id.startsWith('ATT')"> <span style="margin-left: 7px;" v-if="item.id !== '' && item.id.startsWith('ATT')">
<i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i> <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
@@ -130,7 +128,7 @@
:key="index" style="color: #409eff;cursor:pointer;margin-left: 12px;" :key="index" style="color: #409eff;cursor:pointer;margin-left: 12px;"
class="fileClass"> class="fileClass">
<span style="" @click="handleFilePreview(item,'preview')" :title="item.name"> {{ item.name }}</span> <span style="" @click="handleFilePreview(item,'preview')" :title="item.name"> {{ item.name }}</span>
<span style="margin-left: 7px;" v-if="item.id !== '' && item.name != form.standName"> <span style="margin-left: 7px;" v-if="item.id !== '' && item.id.startsWith('ATT')">
<i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i> <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
</span> </span>
</div> </div>
@@ -650,23 +648,25 @@
} else { } else {
attId = file.response.data.id attId = file.response.data.id
} }
if (file.name == this.form.standName) { if(type === 'preview' && file.name == this.form.standName){
let fileName = "" let fileName = ""
let fileNam2 = "" let fileNam2 = ""
if (this.form.standName && this.form.standName !== '') { if (this.form.standName && this.form.standName !== '') {
fileName = this.form.standName + '-企业标准.docx' fileName = this.form.standName + '-企业标准.docx'
fileNam2 = this.form.standName fileNam2 = this.form.standName
} else { } else {
fileName = '企业标准.docx' fileName = '企业标准.docx'
fileNam2 = '企业标准' fileNam2 = '企业标准'
} }
let form = JSON.parse(JSON.stringify(this.form)) let form = JSON.parse(JSON.stringify(this.form))
form.standCode = '' form.standCode = ''
form.issueDate = '' form.issueDate = ''
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) if(file.id.startsWith('ATT')){
return this.$preview(file.id)
} }else {
if (type === 'down') { this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
}
}else if (type === 'down') {
if (attId) { if (attId) {
window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId) window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId)
} else { } else {
@@ -173,19 +173,14 @@
<div v-for="(item,index) in FBGBUSSFileList" :key="index" <div v-for="(item,index) in FBGBUSSFileList" :key="index"
style="color: #409eff;cursor:pointer" style="color: #409eff;cursor:pointer"
class="fileClass fileClassName"> class="fileClass fileClassName">
<span style="width: 80%;" <span style="width: 80%;" v-if="index == 0 && !item.id.startsWith('ATT')" @click="handleFilePreviewOne(item,'preview')">
v-if="index == 0"
@click="handleFilePreviewOne(item,'preview')">
{{ item.name }} {{ item.name }}
</span> </span>
<span v-else @click="handleFilePreview(item)"> <span v-else @click="handleFilePreview(item,'preview')">
{{ item.name }} {{ item.name }}
</span> </span>
<span style="width: 20%;margin-left: 15px;" <span style="width: 20%;margin-left: 15px;" v-if="item.id !== '' && index == 0 && !item.id.startsWith('ATT')">
v-if="item.id !== '' && index == 0"> <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreviewOne(item,'onlineEdit')"></el-button>
<el-button type="primary" size="mini"
plain icon="el-icon-edit"
@click="handleFilePreviewOne(item,'onlineEdit')"></el-button>
</span> </span>
</div> </div>
</div> </div>