diff --git a/src/views/dashboard/search/GeneralSearch.vue b/src/views/dashboard/search/GeneralSearch.vue index a2a24eac..63e913fa 100644 --- a/src/views/dashboard/search/GeneralSearch.vue +++ b/src/views/dashboard/search/GeneralSearch.vue @@ -141,7 +141,11 @@ import { getOverseasStandardForm, getOverseasStandardDocumentInfo } from '../../../api/standardRegulationLibraryApi' -import { getEnterpriseStandardAddForm, getEnterpriseStandardInfoById } from '../../../api/enterpriseStandardLibraryApi' +import { + getEnterpriseStandardAddForm, + getEnterpriseStandardInfoById, + isCanLookDetail +} from '../../../api/enterpriseStandardLibraryApi' import Vue from 'vue' import { previewPdf } from '../../../utils/previewPdf' import { kkFilePreview } from '../../../utils/kkFilePreview' @@ -508,7 +512,23 @@ export default { if (record.resourceType === '4') { this.goDetail(record) } else { - this.filePreview13(record) + if (record.resourceType === '3') { // 企标打开需要权限验证 + console.log('record', record) + isCanLookDetail(record).then(res => { + console.log('res', res) + if (res.success) { + if (res.result) { + this.filePreview13(record) + } else { + this.$message.warn('您没有查看该文件的权限') + } + } else { + this.$message.warn(res.message) + } + }) + } else { + this.filePreview13(record) + } } }, /**