-
+
+
+
+ {{
+ $t('trials:attachment:table:AttachmentCount') }} ({{
+ currentRow.AttachmentCount }})
+
@@ -268,11 +186,14 @@ import {
getTrialDocumentList,
userAbandonDoc,
getTrialUserTypeList,
+ publishTrialDocument
} from '@/api/trials'
import BoxContent from '@/components/BoxContent'
import Pagination from '@/components/Pagination'
-import AttachmentForm from './components/attachmentForm'
+import templateForm from './components/templateForm'
import PreviewFile from './components/previewFile'
+import attachmentList from './components/attachmentList'
+import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
const searchDataDefault = () => {
return {
FileTypeId: '',
@@ -287,7 +208,7 @@ const searchDataDefault = () => {
}
export default {
name: 'TrialAttachmentList',
- components: { BoxContent, Pagination, AttachmentForm, PreviewFile },
+ components: { BoxContent, Pagination, templateForm, PreviewFile, attachmentList, attachmentPreview },
dicts: ['Trial_Document'],
data() {
return {
@@ -303,6 +224,13 @@ export default {
currentType: '',
trialId: '',
userTypeOptions: [],
+ TrialDocumentId: null,
+ perview_visible: false,
+ config: {
+ visible: false,
+ title: this.$t('dictionary:signature:attachmentList:title'),
+ width: '800px',
+ },
}
},
mounted() {
@@ -311,6 +239,39 @@ export default {
this.getUserType()
},
methods: {
+ openAttachment(row, isList = false) {
+ this.TrialDocumentId = row.Id
+ this.currentRow = { ...row }
+ if (!isList) {
+ this.perview_visible = true
+ } else {
+ this.config.visible = true
+ }
+ },
+ // 发布
+ async publishTrialDocument(list) {
+ try {
+ let confirm = await this.$confirm(this.$t('trials:attachment:confirm:publishFile'), {
+ type: 'warning',
+ distinguishCancelAndClose: true,
+ })
+ if (!confirm) return false
+ let arr = list.filter(item => !item.IsPublish)
+ if (arr.length <= 0) return this.getList()
+ let data = {
+ ids: arr.map(item => item.Id)
+ }
+ this.loading = true
+ let res = await publishTrialDocument(data)
+ this.loading = false
+ if (res.IsSuccess) {
+ this.getList()
+ }
+ } catch (err) {
+ this.loading = false
+ console.log(err)
+ }
+ },
// 获取系统文件数据
getList() {
this.loading = true
@@ -361,6 +322,7 @@ export default {
this.currentType = row.Name
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
: ''
+ this.currentRow = Object.assign({}, row)
this.previewVisible = true
},
// 编辑
@@ -391,7 +353,7 @@ export default {
this.loading = false
})
})
- .catch(() => {})
+ .catch(() => { })
},
// 关闭编辑弹窗
closeDialog() {
diff --git a/src/views/trials/trials-panel/trial-summary/audit-record/index.vue b/src/views/trials/trials-panel/trial-summary/audit-record/index.vue
index 9f8c3284..b25496b7 100644
--- a/src/views/trials/trials-panel/trial-summary/audit-record/index.vue
+++ b/src/views/trials/trials-panel/trial-summary/audit-record/index.vue
@@ -762,6 +762,7 @@ export default {
},
getModuleTypeDescriptionList(v) {
this.searchData.Description = null
+ if (!v) return false
let params = {
moduleTypeId: v,
trialId: this.$route.query.trialId