技术标准-发布稿按钮

This commit is contained in:
zyn
2023-05-19 10:07:53 +08:00
parent e6cf32ea1c
commit 97773cb3aa
4 changed files with 56 additions and 68 deletions
@@ -144,30 +144,19 @@
@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')">
<el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreviewOne(item,'onlineEdit')"></el-button>
</span> </span>
<span style="width: 20%;margin-left: 15px;" <span style="margin-left: 7px;" v-if="item.id !== '' && item.id.startsWith('ATT')">
v-if="item.id !== '' && index == 0 && !item.id.startsWith('ATT')">
<el-button type="primary" size="mini"
plain icon="el-icon-edit"
@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> <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
</span> </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')"
:title="item.name">
{{ 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> <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')"></i>
</span> </span>
</div> </div>
@@ -963,7 +952,7 @@
} 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 !== '') {
@@ -976,10 +965,12 @@
let form = JSON.parse(JSON.stringify(this.form)) let form = JSON.parse(JSON.stringify(this.form))
form.standCode = '' form.standCode = ''
form.issueDate = '' form.issueDate = ''
if (file.id.startsWith('ATT')) {
this.$preview(file.id)
} else {
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
return
} }
if (type === 'down') { }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,10 +970,12 @@ 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 = ''
if (file.id.startsWith('ATT')) {
this.$preview(file.id)
} else {
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
return
} }
if (type === 'down') { }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 {
@@ -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,7 +648,7 @@
} 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 !== '') {
@@ -663,10 +661,12 @@
let form = JSON.parse(JSON.stringify(this.form)) let form = JSON.parse(JSON.stringify(this.form))
form.standCode = '' form.standCode = ''
form.issueDate = '' form.issueDate = ''
if(file.id.startsWith('ATT')){
this.$preview(file.id)
}else {
this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form)
return
} }
if (type === 'down') { }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>