diff --git a/src/components/TrialsTab/index.vue b/src/components/TrialsTab/index.vue index 7ea17661..2549e6fc 100644 --- a/src/components/TrialsTab/index.vue +++ b/src/components/TrialsTab/index.vue @@ -149,6 +149,7 @@ export default { return isShow }, goBack() { + zzSessionStorage.removeItem('lastWorkbench') this.$router.push({ path: '/trials/trials-list' }) }, selectTrials(v) { diff --git a/src/components/toggleRole/index.vue b/src/components/toggleRole/index.vue index 7d508b3a..48db5756 100644 --- a/src/components/toggleRole/index.vue +++ b/src/components/toggleRole/index.vue @@ -92,6 +92,7 @@ export default { try { if (!this.form.userRoleId) return this.$message.warning(this.$t('toggleRole:ruleMessage:select')) + zzSessionStorage.removeItem('lastWorkbench') this.$emit('save', this.form.userRoleId) } catch (err) { console.log(err) 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 }} + + + + 下载 + + 下载 @@ -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-myinfo/account.vue b/src/views/trials/trials-myinfo/account.vue index 3bbfe432..8c27335f 100644 --- a/src/views/trials/trials-myinfo/account.vue +++ b/src/views/trials/trials-myinfo/account.vue @@ -231,6 +231,7 @@ export default { this.$store .dispatch('user/loginByRole', { userRoleId: this.userRoleId }) .then((res) => { + zzSessionStorage.removeItem('lastWorkbench') window.location.reload() }) .catch(() => { 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/reading-unit/components/ArbitrationRules.vue b/src/views/trials/trials-panel/setting/reading-unit/components/ArbitrationRules.vue index 8611acdd..c2056fc4 100644 --- a/src/views/trials/trials-panel/setting/reading-unit/components/ArbitrationRules.vue +++ b/src/views/trials/trials-panel/setting/reading-unit/components/ArbitrationRules.vue @@ -23,11 +23,11 @@ - +
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') }} + + +
+