[update] 修改bug80751,企标库的左侧预览

This commit is contained in:
lideqin
2024-01-12 17:42:55 +08:00
parent 4a746774e2
commit 229f15c0c7
3 changed files with 31 additions and 16 deletions
@@ -85,15 +85,15 @@ export default {
} }
}, },
methods: { methods: {
add (publishOriginal) { add (fileId) {
this.getFileInfo(publishOriginal).then(res => { this.getFileInfo(fileId).then(res => {
this.handlePreview(res) this.handlePreview(res)
}) })
this.visible = true this.visible = true
this.form.resetFields() this.form.resetFields()
}, },
edit (publishOriginal, record, index) { edit (fileId, record, index) {
this.getFileInfo(publishOriginal).then(res => { this.getFileInfo(fileId).then(res => {
this.handlePreview(res) this.handlePreview(res)
}) })
this.visible = true this.visible = true
@@ -164,6 +164,12 @@ export default {
width: 60%; width: 60%;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
.left-spin {
height: 100%;
}
/deep/ .ant-spin-container {
height: 100%;
}
iframe { iframe {
height: calc(100% - 20px) !important; height: calc(100% - 20px) !important;
} }
@@ -149,22 +149,30 @@ export default {
// 稽查内容的添加 // 稽查内容的添加
handleAdd () { handleAdd () {
const value = this.$refs.addForm.formInline const value = this.$refs.addForm.formInline
let publishOriginal = '' // 过程稿件id 发布稿>修改单>报批稿>送审稿>征求意见稿>草稿
if (value.publish_of_original) { const fieldArr = ['publish_of_original', 'modification_list', 'draft_for_review', 'draft_for_comment', 'draft']
publishOriginal = value.publish_of_original let fileId = ''
for (const item of fieldArr) {
if (!fileId) {
fileId = value[item] ? value[item].split(',')[0] : ''
}
} }
this.$refs.checkContentModal.title = this.$t('newlyAdded') this.$refs.checkContentModal.title = this.$t('newlyAdded')
this.$refs.checkContentModal.add(publishOriginal) this.$refs.checkContentModal.add(fileId)
}, },
// 稽查内容的编辑 // 稽查内容的编辑
handleEdit (record, index) { handleEdit (record, index) {
const value = this.$refs.addForm.formInline const value = this.$refs.addForm.formInline
let publishOriginal = '' // 过程稿件id 发布稿>修改单>报批稿>送审稿>征求意见稿>草稿
if (value.publish_of_original) { const fieldArr = ['publish_of_original', 'modification_list', 'draft_for_review', 'draft_for_comment', 'draft']
publishOriginal = value.publish_of_original let fileId = ''
for (const item of fieldArr) {
if (!fileId) {
fileId = value[item] ? value[item].split(',')[0] : ''
}
} }
this.$refs.checkContentModal.title = this.$t('edit') this.$refs.checkContentModal.title = this.$t('edit')
this.$refs.checkContentModal.edit(publishOriginal, record, index) this.$refs.checkContentModal.edit(fileId, record, index)
}, },
// 稽查内容的删除 // 稽查内容的删除
handleDelete (index) { handleDelete (index) {
@@ -180,10 +180,11 @@ export default {
fileId = res.result[item] ? res.result[item].split(',')[0] : '' fileId = res.result[item] ? res.result[item].split(',')[0] : ''
} }
} }
if (fileId) if (fileId) {
this.getFileInfo(fileId).then(res => { this.getFileInfo(fileId).then(res => {
this.handlePreview(res) this.handlePreview(res)
}) })
}
} }
}).finally(() => { }).finally(() => {
this.leftLoading = false this.leftLoading = false