update 海外标准
This commit is contained in:
@@ -102,8 +102,14 @@
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { FieldType, StandardSource, TagsTypeEnums } from '../../../enums/commonEnums'
|
||||
import { getDomesticStandardFormModal, shareDomesticStandard, getDomesticStandardDetail } from '../../../api/standardRegulationLibraryApi'
|
||||
import { FieldType, StandardSource } from '../../../enums/commonEnums'
|
||||
import {
|
||||
getDomesticStandardFormModal,
|
||||
shareDomesticStandard,
|
||||
getDomesticStandardDetail,
|
||||
getOverseasStandardForm,
|
||||
getOverseasStandardDocumentInfo
|
||||
} from '../../../api/standardRegulationLibraryApi'
|
||||
import UpdateRecordModal from './modules/UpdateRecordModal.vue'
|
||||
import SubmitQuestionModal from './modules/SubmitQuestionModal.vue'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||
@@ -125,12 +131,28 @@ const DomesticStandardPermission = {
|
||||
unwatermarkedDownload: 'domesticStandard:unwatermarkedDownload' // 无水印下载
|
||||
}
|
||||
|
||||
// 海外标准权限
|
||||
const OverseasStandardPermission = {
|
||||
updateRecord: 'overseasStandard:updateRecord', // 更新记录
|
||||
submitQuestion: 'overseasStandard:submitQuestion', // 提交问题
|
||||
share: 'overseasStandard:share', // 分享
|
||||
standardResolutionSheet: 'overseasStandard:standardResolutionSheet', // 标准分解单
|
||||
download: 'overseasStandard:download', // 下载
|
||||
unwatermarkedDownload: 'overseasStandard:unwatermarkedDownload' // 无水印下载
|
||||
}
|
||||
|
||||
// 国内标准接口
|
||||
const DomesticApi = {
|
||||
getFormFunc: getDomesticStandardFormModal, // 获取字段
|
||||
getDetailData: getDomesticStandardDetail // 获取详情数据
|
||||
}
|
||||
|
||||
// 海外标准接口
|
||||
const OverseasApi = {
|
||||
getFormFunc: getOverseasStandardForm, // 获取字段
|
||||
getDetailData: getOverseasStandardDocumentInfo // 获取详情数据
|
||||
}
|
||||
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
|
||||
@@ -176,9 +198,13 @@ export default {
|
||||
let permission = {}
|
||||
switch (this.type) {
|
||||
// 国内标准法规
|
||||
case TagsTypeEnums.DOMESTIC_LIST.value + '':
|
||||
case StandardSource.DOMESTIC.value:
|
||||
permission = DomesticStandardPermission
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.OVERSEAS.value:
|
||||
permission = OverseasStandardPermission
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -188,9 +214,12 @@ export default {
|
||||
operateApiFunc () {
|
||||
let func = {}
|
||||
switch (this.type) {
|
||||
case TagsTypeEnums.DOMESTIC_LIST.value + '':
|
||||
case StandardSource.DOMESTIC.value:
|
||||
func = DomesticApi
|
||||
break
|
||||
case StandardSource.OVERSEAS.value:
|
||||
func = OverseasApi
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user