培训课程管理问题
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-05-19 14:18:59 +08:00
parent 0ed070ecd7
commit b92b55a45a
10 changed files with 137 additions and 46 deletions

View File

@ -12,7 +12,7 @@
<!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">--> <!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">-->
<!-- </pdf>--> <!-- </pdf>-->
<iframe v-else <iframe v-else
:src="`/static/onlyOffice/viewer.html?url=${OSSclientConfig.basePath}${filePath}?type=${fileType}&title=${title}&documentType=${documentType}&userName=${currentUser}`" :src="`/static/onlyOffice/viewer.html?url=${OSSclientConfig.basePath}${filePath}?onlyOffice_url=${onlyOffice_url}&type=${fileType}&title=${title}&documentType=${documentType}&userName=${currentUser}`"
width="100%" height="100%" frameborder="0" crossorigin="anonymous" /> width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
<!-- <div v-else> <!-- <div v-else>
{{ $t('common:message:downloadFile') }} {{ $t('common:message:downloadFile') }}
@ -45,7 +45,8 @@ export default {
data() { data() {
return { return {
currentUser: zzSessionStorage.getItem('userName'), currentUser: zzSessionStorage.getItem('userName'),
COMPANY: process.env.VUE_APP_COMPANY_NAME COMPANY: process.env.VUE_APP_COMPANY_NAME,
onlyOffice_url: process.env.VUE_APP_ONLYOFFICE_URL
} }
}, },
computed: { computed: {

View File

@ -77,6 +77,7 @@ export default {
FileTypeId: '', FileTypeId: '',
Name: '', Name: '',
Path: '', Path: '',
IsPublish: null,
IsDeleted: true, IsDeleted: true,
SignViewMinimumMinutes: null, SignViewMinimumMinutes: null,
DocUserSignType: 0, DocUserSignType: 0,
@ -137,6 +138,7 @@ export default {
this.form.Name = this.data.Name this.form.Name = this.data.Name
this.form.Path = this.data.Path this.form.Path = this.data.Path
this.form.IsDeleted = this.data.IsDeleted this.form.IsDeleted = this.data.IsDeleted
this.form.IsPublish = this.data.IsPublish
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
this.form.DocUserSignType = this.data.DocUserSignType this.form.DocUserSignType = this.data.DocUserSignType
this.form.CurrentStaffTrainDays = this.data.CurrentStaffTrainDays this.form.CurrentStaffTrainDays = this.data.CurrentStaffTrainDays

View File

@ -58,7 +58,7 @@ export default {
FilePath: null, FilePath: null,
FileSize: null, FileSize: null,
OffLine: false, OffLine: false,
SystemDocumentId: null SystemDocumentId: null,
}, },
rules: { rules: {
Name: [ Name: [

View File

@ -7,7 +7,7 @@
<span class="name text-ellipsis" :title="rowData.Name">{{ rowData.Name }}</span> <span class="name text-ellipsis" :title="rowData.Name">{{ rowData.Name }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button size="mini" type="primary" style="float:right" @click.stop="edit({})"> <el-button size="mini" type="primary" style="float:right" @click.stop="edit({})" v-if="!isView">
{{ $t('common:button:add') }}</el-button> {{ $t('common:button:add') }}</el-button>
<el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading" <el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading"
@sort-change="handleSortByColumn"> @sort-change="handleSortByColumn">
@ -15,7 +15,7 @@
<el-table-column prop="Name" :label="$t('dictionary:signature:attachmentList:FileName')" <el-table-column prop="Name" :label="$t('dictionary:signature:attachmentList:FileName')"
sortable="custom" /> sortable="custom" />
<el-table-column prop="OffLine" :label="$t('dictionary:signature:attachmentList:OffLine')" <el-table-column prop="OffLine" :label="$t('dictionary:signature:attachmentList:OffLine')"
sortable="custom"> sortable="custom" v-if="!isView">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.OffLine" @change="(val) => OffLine(scope.row, val)" <el-switch v-model="scope.row.OffLine" @change="(val) => OffLine(scope.row, val)"
:active-value="true" :inactive-value="false" :active-text="$fd('YesOrNo', true)" :active-value="true" :inactive-value="false" :active-text="$fd('YesOrNo', true)"
@ -30,14 +30,14 @@
<el-button size="mini" type="text" @click.stop="preview(scope.row)"> <el-button size="mini" type="text" @click.stop="preview(scope.row)">
{{ $t('common:button:preview') }} {{ $t('common:button:preview') }}
</el-button> </el-button>
<el-button size="mini" type="text" @click.stop="edit(scope.row)"> <el-button size="mini" type="text" @click.stop="edit(scope.row)" v-if="!isView">
{{ $t('common:button:edit') }} {{ $t('common:button:edit') }}
</el-button> </el-button>
<!-- <el-button size="mini" type="text" @click.stop="OffLine(scope.row, true)" <!-- <el-button size="mini" type="text" @click.stop="OffLine(scope.row, true)"
:disabled="scope.row.OffLine"> :disabled="scope.row.OffLine">
{{ $t('dictionary:signature:attachmentList:OffLine') }} {{ $t('dictionary:signature:attachmentList:OffLine') }}
</el-button> --> </el-button> -->
<el-button size="mini" type="text" @click.stop="del(scope.row)"> <el-button size="mini" type="text" @click.stop="del(scope.row)" v-if="!isView">
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
</template> </template>
@ -71,6 +71,7 @@ const defaultSearchData = () => {
PageIndex: 1, PageIndex: 1,
PageSize: 1000, PageSize: 1000,
Asc: false, Asc: false,
OffLine: null,
SortField: null SortField: null
} }
} }
@ -91,6 +92,10 @@ export default {
} }
} }
}, },
isView: {
type: Boolean,
default: false
},
rowData: { rowData: {
type: Object, type: Object,
default: () => { default: () => {
@ -170,6 +175,9 @@ export default {
if (!this.SystemDocumentId) return false if (!this.SystemDocumentId) return false
this.loading = true this.loading = true
this.searchData.SystemDocumentId = this.SystemDocumentId this.searchData.SystemDocumentId = this.SystemDocumentId
if (this.isView) {
this.searchData.OffLine = false
}
let res = await getSystemDocumentAttachmentList(this.searchData) let res = await getSystemDocumentAttachmentList(this.searchData)
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {

View File

@ -78,7 +78,7 @@ const defaultSearchData = () => {
PageIndex: 1, PageIndex: 1,
PageSize: 1000, PageSize: 1000,
Asc: false, Asc: false,
OffLine: false, OffLine: null,
SortField: null SortField: null
} }
} }
@ -96,6 +96,10 @@ export default {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false
},
isView: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -137,6 +141,9 @@ export default {
if (!this.SystemDocumentId) return false if (!this.SystemDocumentId) return false
this.loading = true this.loading = true
this.searchData.SystemDocumentId = this.SystemDocumentId this.searchData.SystemDocumentId = this.SystemDocumentId
if (this.isView) {
this.searchData.OffLine = false
}
let res = await getSystemDocumentAttachmentList(this.searchData) let res = await getSystemDocumentAttachmentList(this.searchData)
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {

View File

@ -84,7 +84,10 @@
<el-table-column prop="AttachmentCount" :label="$t('dictionary:signature:table:AttachmentCount')" <el-table-column prop="AttachmentCount" :label="$t('dictionary:signature:table:AttachmentCount')"
show-overflow-tooltip sortable="custom" min-width="150px"> show-overflow-tooltip sortable="custom" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button> <el-button type="text" @click.stop="openAttachment(scope.row, true)">
{{ scope.row.AttachmentCount }}
<i class="el-icon-upload2" />
</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="SignViewMinimumMinutes" :label="$t('dictionary:signature:table:SignViewMinimumMinutes')" <el-table-column prop="SignViewMinimumMinutes" :label="$t('dictionary:signature:table:SignViewMinimumMinutes')"
@ -161,11 +164,16 @@
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" /> <TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
</el-dialog> </el-dialog>
<!--附件列表--> <!--附件列表-->
<attachmentList v-if="config.visible" :config="config" :rowData="rowData" :SystemDocumentId="SystemDocumentId" <attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
@getList="getList" /> @getList="getList" />
<!-- 预览文件 --> <!-- 预览文件 -->
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" />
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('common:button:preview')" <el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('common:button:preview')"
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper"> :fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
@click.stop="openAttachment(currentRow)" v-if="currentRow.AttachmentCount">{{
$t('trials:signRecords:table:AttachmentCount') }} ({{
currentRow.AttachmentCount }})</span>
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px"> <div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" /> <PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
</div> </div>
@ -182,6 +190,7 @@ import TemplateForm from './TemplateForm'
import attachmentList from './attachmentList' import attachmentList from './attachmentList'
import PreviewFile from '@/components/PreviewFile/index' import PreviewFile from '@/components/PreviewFile/index'
import attachmentPreview from './attachmentPreview'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
FileTypeId: '', FileTypeId: '',
@ -197,7 +206,7 @@ const searchDataDefault = () => {
} }
export default { export default {
name: 'SignatureTemplate', name: 'SignatureTemplate',
components: { BaseContainer, Pagination, TemplateForm, PreviewFile, attachmentList }, components: { BaseContainer, Pagination, TemplateForm, PreviewFile, attachmentList, attachmentPreview },
dicts: ['Sys_Document'], dicts: ['Sys_Document'],
props: { props: {
isSystem: { isSystem: {
@ -231,7 +240,7 @@ export default {
width: '800px', width: '800px',
}, },
multipleSelection: [], multipleSelection: [],
rowData: {} perview_visible: false
} }
}, },
mounted() { mounted() {
@ -269,10 +278,14 @@ export default {
console.log(err) console.log(err)
} }
}, },
openAttachment(row) { openAttachment(row, isList = false) {
this.rowData = row
this.SystemDocumentId = row.Id this.SystemDocumentId = row.Id
this.config.visible = true this.currentRow = { ...row }
if (!isList) {
this.perview_visible = true
} else {
this.config.visible = true
}
}, },
changeTimeList() { changeTimeList() {
if (this.timeList) { if (this.timeList) {

View File

@ -126,7 +126,8 @@
<el-table-column :label="$t('trials:signRecords:table:AttachmentCount')" prop="AttachmentCount" <el-table-column :label="$t('trials:signRecords:table:AttachmentCount')" prop="AttachmentCount"
show-overflow-tooltip sortable="custom"> show-overflow-tooltip sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button> <el-button type="text" @click.stop="openAttachment(scope.row, true)">{{ scope.row.AttachmentCount
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<!-- 文件级别 --> <!-- 文件级别 -->
@ -208,15 +209,18 @@
<!-- 预览文件 --> <!-- 预览文件 -->
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('trials:signRecords:action:preview')" <el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('trials:signRecords:action:preview')"
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper"> :fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @click.stop="openAttachment(currentRow)" <span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
v-if="currentRow.AttachmentCount">{{ @click.stop="openAttachment(currentRow)" v-if="currentRow.AttachmentCount">{{
$t('trials:signRecords:table:AttachmentCount') }} ({{ $t('trials:signRecords:table:AttachmentCount') }} ({{
currentRow.AttachmentCount }})</span> currentRow.AttachmentCount }})</span>
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px"> <div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" /> <PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" />
</div> </div>
</el-dialog> </el-dialog>
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" /> <attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
:isView="true" @getList="getList" />
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" :isView="true"
v-if="perview_visible" />
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
@ -233,6 +237,7 @@ import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import PreviewFile from '@/components/PreviewFile/index' import PreviewFile from '@/components/PreviewFile/index'
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview' import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
import attachmentList from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentList'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
UserName: null, UserName: null,
@ -253,7 +258,7 @@ const searchDataDefault = () => {
} }
export default { export default {
name: 'AttachmentsManagement', name: 'AttachmentsManagement',
components: { BaseContainer, Pagination, PreviewFile, attachmentPreview }, components: { BaseContainer, Pagination, PreviewFile, attachmentPreview, attachmentList },
props: { props: {
isDoc: { isDoc: {
type: Boolean, type: Boolean,
@ -292,6 +297,11 @@ export default {
timeListC: [], timeListC: [],
SystemDocumentId: null, SystemDocumentId: null,
perview_visible: null, perview_visible: null,
config: {
visible: false,
title: this.$t('dictionary:signature:attachmentList:title'),
width: '800px',
},
} }
}, },
mounted() { mounted() {
@ -300,10 +310,15 @@ export default {
this.getUserType() this.getUserType()
}, },
methods: { methods: {
openAttachment(row) { openAttachment(row, isList = false) {
if (!row.AttachmentCount) return false if (!row.AttachmentCount) return false
this.SystemDocumentId = row.Id this.SystemDocumentId = row.Id
this.perview_visible = true this.currentRow = { ...row }
if (!isList) {
this.perview_visible = true
} else {
this.config.visible = true
}
}, },
changeTimeList() { changeTimeList() {
if (this.timeList) { if (this.timeList) {

View File

@ -49,7 +49,8 @@
<el-table-column :label="$t('trials:self-attachment:table:AttachmentCount')" prop="AttachmentCount" <el-table-column :label="$t('trials:self-attachment:table:AttachmentCount')" prop="AttachmentCount"
show-overflow-tooltip sortable="custom"> show-overflow-tooltip sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button> <el-button type="text" @click.stop="openAttachment(scope.row, true)">{{ scope.row.AttachmentCount
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<!-- 是否废除 --> <!-- 是否废除 -->
@ -96,8 +97,8 @@
<!-- 预览文件 --> <!-- 预览文件 -->
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body <el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body
custom-class="base-dialog-wrapper"> custom-class="base-dialog-wrapper">
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @click.stop="openAttachment(currentRow)" <span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
v-if="currentRow.AttachmentCount">{{ @click.stop="openAttachment(currentRow)" v-if="currentRow.AttachmentCount">{{
$t('trials:self-attachment:table:AttachmentCount') }} ({{ $t('trials:self-attachment:table:AttachmentCount') }} ({{
currentRow.AttachmentCount }})</span> currentRow.AttachmentCount }})</span>
<span v-if="!currentIsConfirm" style="position: fixed;right: 75px;top: 14px;"> <span v-if="!currentIsConfirm" style="position: fixed;right: 75px;top: 14px;">
@ -129,7 +130,10 @@
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName" <SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
:trial-id="trialId" @closeDialog="closeSignDialog" /> :trial-id="trialId" @closeDialog="closeSignDialog" />
</el-dialog> </el-dialog>
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" /> <attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
:isView="true" @getList="getList" />
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" :isView="true"
v-if="perview_visible" />
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
@ -140,6 +144,7 @@ import PreviewFile from '@/components/PreviewFile/index'
import SignForm from './components/SignForm' import SignForm from './components/SignForm'
import store from '@/store' import store from '@/store'
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview' import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
import attachmentList from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentList'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
FileTypeId: '', FileTypeId: '',
@ -153,7 +158,7 @@ const searchDataDefault = () => {
} }
export default { export default {
name: 'TrialAttachments', name: 'TrialAttachments',
components: { BaseContainer, Pagination, PreviewFile, SignForm, attachmentPreview }, components: { BaseContainer, Pagination, PreviewFile, SignForm, attachmentPreview, attachmentList },
data() { data() {
return { return {
searchData: searchDataDefault(), searchData: searchDataDefault(),
@ -176,7 +181,12 @@ export default {
typeOptions: [], typeOptions: [],
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
SystemDocumentId: null, SystemDocumentId: null,
perview_visible: null perview_visible: null,
config: {
visible: false,
title: this.$t('dictionary:signature:attachmentList:title'),
width: '800px',
},
} }
}, },
mounted() { mounted() {
@ -193,10 +203,15 @@ export default {
} }
}, },
methods: { methods: {
openAttachment(row) { openAttachment(row, isList = false) {
if (!row.AttachmentCount) return false if (!row.AttachmentCount) return false
this.SystemDocumentId = row.Id this.SystemDocumentId = row.Id
this.perview_visible = true this.currentRow = { ...row }
if (!isList) {
this.perview_visible = true
} else {
this.config.visible = true
}
}, },
// //
getList() { getList() {

View File

@ -33,7 +33,8 @@
<el-table-column :label="$t('trials:sysDocBeSigned:table:AttachmentCount')" prop="AttachmentCount" <el-table-column :label="$t('trials:sysDocBeSigned:table:AttachmentCount')" prop="AttachmentCount"
show-overflow-tooltip sortable="custom"> show-overflow-tooltip sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button> <el-button type="text" @click.stop="openAttachment(scope.row, true)">{{ scope.row.AttachmentCount
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('trials:sysDocBeSigned:table:uploadTime')" prop="CreateTime" show-overflow-tooltip <el-table-column :label="$t('trials:sysDocBeSigned:table:uploadTime')" prop="CreateTime" show-overflow-tooltip
@ -55,8 +56,8 @@
<!-- 预览/签署文件 --> <!-- 预览/签署文件 -->
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body <el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body
custom-class="base-dialog-wrapper"> custom-class="base-dialog-wrapper">
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @click.stop="openAttachment(currentRow)" <span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
v-if="currentRow.AttachmentCount">{{ @click.stop="openAttachment(currentRow)" v-if="currentRow.AttachmentCount">{{
$t('trials:sysDocBeSigned:table:AttachmentCount') }} ({{ $t('trials:sysDocBeSigned:table:AttachmentCount') }} ({{
currentRow.AttachmentCount }})</span> currentRow.AttachmentCount }})</span>
<span v-if="!currentIsConfirm" style="position: fixed; right: 75px; top: 14px"> <span v-if="!currentIsConfirm" style="position: fixed; right: 75px; top: 14px">
@ -91,7 +92,10 @@
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName" <SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
@closeDialog="closeSignDialog" /> @closeDialog="closeSignDialog" />
</el-dialog> </el-dialog>
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" /> <attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
:isView="true" @getList="getList" />
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" :isView="true"
v-if="perview_visible" />
</div> </div>
</template> </template>
<script> <script>
@ -104,6 +108,7 @@ import Pagination from '@/components/Pagination'
import PreviewFile from '@/components/PreviewFile/index' import PreviewFile from '@/components/PreviewFile/index'
import SignForm from '@/views/trials/trials-panel/attachments/self-attachment/components/SignForm' import SignForm from '@/views/trials/trials-panel/attachments/self-attachment/components/SignForm'
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview' import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
import attachmentList from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentList'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
@ -115,7 +120,7 @@ const searchDataDefault = () => {
} }
export default { export default {
name: 'NeedSignSysDoc', name: 'NeedSignSysDoc',
components: { Pagination, PreviewFile, SignForm, attachmentPreview }, components: { Pagination, PreviewFile, SignForm, attachmentPreview, attachmentList },
props: { props: {
isSigned: { isSigned: {
type: Boolean, type: Boolean,
@ -143,7 +148,12 @@ export default {
currentUser: zzSessionStorage.getItem('userName'), currentUser: zzSessionStorage.getItem('userName'),
currentRow: {}, currentRow: {},
SystemDocumentId: null, SystemDocumentId: null,
perview_visible: false perview_visible: false,
config: {
visible: false,
title: this.$t('dictionary:signature:attachmentList:title'),
width: '800px',
},
} }
}, },
mounted() { mounted() {
@ -158,10 +168,15 @@ export default {
...mapGetters(['IsFirstSysDocNeedSign']), ...mapGetters(['IsFirstSysDocNeedSign']),
}, },
methods: { methods: {
openAttachment(row) { openAttachment(row, isList = false) {
if (!row.AttachmentCount) return false if (!row.AttachmentCount) return false
this.SystemDocumentId = row.Id this.SystemDocumentId = row.Id
this.perview_visible = true this.currentRow = { ...row }
if (!isList) {
this.perview_visible = true
} else {
this.config.visible = true
}
}, },
// //
handlePreview(row) { handlePreview(row) {

View File

@ -28,7 +28,8 @@
<el-table-column :label="$t('trials:sysDocBeSigned:table:AttachmentCount')" prop="AttachmentCount" <el-table-column :label="$t('trials:sysDocBeSigned:table:AttachmentCount')" prop="AttachmentCount"
show-overflow-tooltip sortable="custom"> show-overflow-tooltip sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button> <el-button type="text" @click.stop="openAttachment(scope.row, true)">{{ scope.row.AttachmentCount
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('trials:sysDocBeSigned:table:uploadTime')" prop="CreateTime" show-overflow-tooltip <el-table-column :label="$t('trials:sysDocBeSigned:table:uploadTime')" prop="CreateTime" show-overflow-tooltip
@ -49,8 +50,8 @@
<!-- 预览/签署文件 --> <!-- 预览/签署文件 -->
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body <el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body
custom-class="base-dialog-wrapper"> custom-class="base-dialog-wrapper">
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @click.stop="openAttachment(currentRow)" <span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
v-if="currentRow.AttachmentCount">{{ @click.stop="openAttachment(currentRow)" v-if="currentRow.AttachmentCount">{{
$t('trials:sysDocBeSigned:table:AttachmentCount') }} ({{ $t('trials:sysDocBeSigned:table:AttachmentCount') }} ({{
currentRow.AttachmentCount }})</span> currentRow.AttachmentCount }})</span>
<span v-if="!currentIsConfirm" style="position: fixed;right: 75px;top: 14px;"> <span v-if="!currentIsConfirm" style="position: fixed;right: 75px;top: 14px;">
@ -81,7 +82,10 @@
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName" <SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
@closeDialog="closeSignDialog" /> @closeDialog="closeSignDialog" />
</el-dialog> </el-dialog>
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" /> <attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
:isView="true" @getList="getList" />
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" :isView="true"
v-if="perview_visible" />
</div> </div>
</template> </template>
<script> <script>
@ -90,6 +94,7 @@ import Pagination from '@/components/Pagination'
import PreviewFile from '@/components/PreviewFile/index' import PreviewFile from '@/components/PreviewFile/index'
import SignForm from '@/views/trials/trials-panel/attachments/self-attachment/components/SignForm' import SignForm from '@/views/trials/trials-panel/attachments/self-attachment/components/SignForm'
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview' import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
import attachmentList from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentList'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
pageIndex: 1, pageIndex: 1,
@ -100,7 +105,7 @@ const searchDataDefault = () => {
} }
export default { export default {
name: 'NeedSignSysDoc', name: 'NeedSignSysDoc',
components: { Pagination, PreviewFile, SignForm, attachmentPreview }, components: { Pagination, PreviewFile, SignForm, attachmentPreview, attachmentList },
props: { props: {
isSigned: { isSigned: {
type: Boolean, type: Boolean,
@ -126,7 +131,12 @@ export default {
currentUser: zzSessionStorage.getItem('userName'), currentUser: zzSessionStorage.getItem('userName'),
currentRow: {}, currentRow: {},
perview_visible: false, perview_visible: false,
SystemDocumentId: null SystemDocumentId: null,
config: {
visible: false,
title: this.$t('dictionary:signature:attachmentList:title'),
width: '800px',
},
} }
}, },
mounted() { mounted() {
@ -138,10 +148,15 @@ export default {
} }
}, },
methods: { methods: {
openAttachment(row) { openAttachment(row, isList = false) {
if (!row.AttachmentCount) return false if (!row.AttachmentCount) return false
this.SystemDocumentId = row.Id this.SystemDocumentId = row.Id
this.perview_visible = true this.currentRow = { ...row }
if (!isList) {
this.perview_visible = true
} else {
this.config.visible = true
}
}, },
// //
handlePreview(row) { handlePreview(row) {