diff --git a/src/views/dictionary/template/components/ClinicalDataConfig.vue b/src/views/dictionary/template/components/ClinicalDataConfig.vue index 9fda81a4..21bf65ff 100644 --- a/src/views/dictionary/template/components/ClinicalDataConfig.vue +++ b/src/views/dictionary/template/components/ClinicalDataConfig.vue @@ -109,6 +109,15 @@ {{ scope.row.FileName }} + + + {{ scope.row.EnFileName }} + + + 下载 + + 下载 @@ -258,8 +277,8 @@ export default { }).catch(() => { this.loading = false }) }) }, - handleDownloadTpl(row) { - window.open(this.OSSclientConfig.basePath + row.Path, '_blank') + handleDownloadTpl(path) { + window.open(this.OSSclientConfig.basePath + path, '_blank') }, // 排序 handleSortByColumn(column) { diff --git a/src/views/dictionary/template/components/ClinicalDataForm.vue b/src/views/dictionary/template/components/ClinicalDataForm.vue index 719c700d..4834c181 100644 --- a/src/views/dictionary/template/components/ClinicalDataForm.vue +++ b/src/views/dictionary/template/components/ClinicalDataForm.vue @@ -113,6 +113,34 @@ + + + + 选择 + + (必须是doc/docx格式) + + + + + @@ -160,6 +188,8 @@ export default { UploadRole: null, FileName: '', Path: '', + EnFileName: '', + EnPath: '', IsEnable: true, CriterionEnumList: [] }, @@ -173,6 +203,7 @@ export default { loading: false, btnLoading: false, fileList: [], + enFileList: [], systemCriterionSelectList: [] } }, @@ -195,6 +226,14 @@ export default { } ] } + if (this.data.EnPath) { + this.enFileList = [ + { + name: this.data.EnFileName, + path: this.data.EnPath + } + ] + } } }, save() { @@ -249,6 +288,32 @@ export default { handleExceed(files, fileList) { this.$message.warning(`只允许上传一个文件`) }, + beforeUploadEnFile(file) { + // 检测文件类型是否符合要求 + if (this.checkFileSuffix(file.name)) { + this.enFileList = [] + return true + } else { + this.$alert('(必须是doc/docx格式)') + + return false + } + }, + async handleUploadEnFile(param) { + this.loading = true + var fileBlob = await this.fileToBlob(param.file) + const res = await this.OSSclient.put(`/System/ClinicalDataTemplate/${param.file.name}`, fileBlob) + this.form.EnFileName = res.name + this.form.EnPath = this.$getObjectName(res.url) + let file = { name: res.name, path: this.$getObjectName(res.url), url:this.$getObjectName(res.url) } + this.enFileList.push(file) + this.loading = false + }, + handleRemoveEnFile() { + this.enFileList = [] + this.form.EnPath = '' + this.form.EnFileName = '' + }, checkFileSuffix(fileName) { var typeArr = ['doc', 'docx'] var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase() diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue index 5a9e1ada..fb398151 100644 --- a/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue +++ b/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue @@ -194,6 +194,7 @@ { this.listLoading = false diff --git a/src/views/trials/trials-panel/setting/trial-config/components/clinicalDataForm.vue b/src/views/trials/trials-panel/setting/trial-config/components/clinicalDataForm.vue index c115996c..72903e97 100644 --- a/src/views/trials/trials-panel/setting/trial-config/components/clinicalDataForm.vue +++ b/src/views/trials/trials-panel/setting/trial-config/components/clinicalDataForm.vue @@ -145,6 +145,37 @@ + + + + + + {{ + $t('trials:processCfg:button:select') + }} + + + {{ $t('system:tip:file:docx') }} + + + +