Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
commit
c2f3e02ef1
|
@ -220,6 +220,29 @@ export function addOrUpdateSystemDocument(param) {
|
|||
data: param
|
||||
})
|
||||
}
|
||||
// 新增/修改通用培训附件
|
||||
export function addOrUpdateSystemDocumentAttachment(param) {
|
||||
return request({
|
||||
url: `/SystemDocument/addOrUpdateSystemDocumentAttachment`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 通用培训附件列表
|
||||
export function getSystemDocumentAttachmentList(param) {
|
||||
return request({
|
||||
url: `/SystemDocument/getSystemDocumentAttachmentList`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 删除通用培训附件
|
||||
export function deleteSystemDocumentAttachment(systemDocumentAttachmentId) {
|
||||
return request({
|
||||
url: `/SystemDocument/deleteSystemDocumentAttachment/${systemDocumentAttachmentId}`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteSystemDocument(id) {
|
||||
return request({
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<template>
|
||||
<div class="preview-wrapper">
|
||||
<iframe
|
||||
v-if="fileType.indexOf('jpg') !== -1 || fileType.indexOf('png') !== -1"
|
||||
frameborder="0"
|
||||
:src="filePath"
|
||||
width="100%"
|
||||
height="100%"
|
||||
/>
|
||||
<iframe v-if="fileType.indexOf('jpg') !== -1 || fileType.indexOf('png') !== -1" frameborder="0" :src="filePath"
|
||||
width="100%" height="100%" />
|
||||
<!-- <embed v-else-if="fileType.indexOf('pdf') !== -1" :src="filePath+'#toolbar=0'" style="width: 100%; height: 100%"> -->
|
||||
<!-- <iframe v-else-if="fileType.indexOf('pdf') !== -1" :src="filePath+'#toolbar=0'" width="100%" height="100%" frameborder="0" /> -->
|
||||
<iframe v-else-if="fileType.indexOf('pdf') !== -1" :src="`/static/pdfjs/web/viewer.html?file=${OSSclientConfig.basePath}${filePath}?userName=${currentUser}&COMPANY=${COMPANY}`" width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
|
||||
<iframe v-else-if="fileType.indexOf('pdf') !== -1"
|
||||
:src="`/static/pdfjs/web/viewer.html?file=${OSSclientConfig.basePath}${filePath}?userName=${currentUser}&COMPANY=${COMPANY}`"
|
||||
width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
|
||||
<!-- <pdf-->
|
||||
<!-- v-else-if="fileType.indexOf('pdf') !== -1"-->
|
||||
<!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">-->
|
||||
<!-- </pdf>-->
|
||||
<div v-else>
|
||||
<iframe v-else
|
||||
:src="`/static/onlyOffice/viewer.html?url=${OSSclientConfig.basePath}${filePath}?type=${fileType}&title=${title}&documentType=${documentType}&userName=${currentUser}`"
|
||||
width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
|
||||
<!-- <div v-else>
|
||||
{{ $t('common:message:downloadFile') }}
|
||||
<el-link type="primary" @click="downLoadFile">{{ $t('common:button:download') }}</el-link>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import DOCUMENTTYPE from "@/utils/onlyOffice_type.js"
|
||||
export default {
|
||||
name: 'PreviewFile',
|
||||
computed: {
|
||||
|
@ -36,12 +36,22 @@ export default {
|
|||
fileType: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentUser: zzSessionStorage.getItem('userName'),
|
||||
COMPANY:process.env.VUE_APP_COMPANY_NAME
|
||||
COMPANY: process.env.VUE_APP_COMPANY_NAME
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
documentType() {
|
||||
console.log(DOCUMENTTYPE[`.${this.fileType}`], 'documentType')
|
||||
return DOCUMENTTYPE[`.${this.fileType}`]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -62,14 +72,16 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.preview-wrapper{
|
||||
.preview-wrapper {
|
||||
height: 100%;
|
||||
width:100%;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
|
|
|
@ -1,100 +1,45 @@
|
|||
<template>
|
||||
<el-form
|
||||
ref="sysAttachmentFrom"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
label-width="190px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
class="upload-temporary-file"
|
||||
>
|
||||
<el-form ref="sysAttachmentFrom" v-loading="loading" :model="form" label-width="190px" size="small" :rules="rules"
|
||||
class="upload-temporary-file">
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:FileTypeId')"
|
||||
prop="FileTypeId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.FileTypeId"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item of dictionaryList.Sys_Document"
|
||||
:key="item.Id"
|
||||
:label="item.Value"
|
||||
:value="item.Id"
|
||||
/>
|
||||
<el-form-item :label="$t('dictionary:signature:form:FileTypeId')" prop="FileTypeId">
|
||||
<el-select v-model="form.FileTypeId" style="width: 100%" size="small" filterable>
|
||||
<el-option v-for="item of dictionaryList.Sys_Document" :key="item.Id" :label="item.Value" :value="item.Id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('dictionary:signature:form:File')">
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
accept=".pdf"
|
||||
:before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemoveFile"
|
||||
:show-file-list="true"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:disabled="form.Type === ''"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="form.FileTypeId === ''"
|
||||
:loading="btnLoading"
|
||||
>{{ $t('common:button:check') }}</el-button
|
||||
>
|
||||
<el-upload class="upload-demo" action accept=".pdf" :before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile" :on-preview="handlePreview" :on-remove="handleRemoveFile"
|
||||
:show-file-list="true" :file-list="fileList" :limit="1" :on-exceed="handleExceed"
|
||||
:disabled="form.Type === ''">
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === ''" :loading="btnLoading">{{
|
||||
$t('common:button:check') }}</el-button>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
({{ $t('trials:signature:label:mustBepdf') }})
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:NeedConfirmedUserTypeIdList')"
|
||||
prop="NeedConfirmedUserTypeIdList"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.NeedConfirmedUserTypeIdList"
|
||||
style="width: 100%"
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
v-for="item of userTypeOptions"
|
||||
:key="item.Id"
|
||||
:label="item.UserTypeShortName"
|
||||
:value="item.Id"
|
||||
/>
|
||||
<el-form-item :label="$t('dictionary:signature:form:NeedConfirmedUserTypeIdList')"
|
||||
prop="NeedConfirmedUserTypeIdList">
|
||||
<el-select v-model="form.NeedConfirmedUserTypeIdList" style="width: 100%" multiple>
|
||||
<el-option v-for="item of userTypeOptions" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:DocUserSignType')"
|
||||
prop="DocUserSignType"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.DocUserSignType"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
<el-form-item :label="$t('dictionary:signature:form:DocUserSignType')" prop="DocUserSignType">
|
||||
<el-switch v-model="form.DocUserSignType" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:SignViewMinimumMinutes')"
|
||||
prop="SignViewMinimumMinutes"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="form.SignViewMinimumMinutes"
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:max="50"
|
||||
/>
|
||||
<el-form-item :label="$t('dictionary:signature:form:SignViewMinimumMinutes')" prop="SignViewMinimumMinutes">
|
||||
<el-input-number v-model="form.SignViewMinimumMinutes" controls-position="right" :min="1" :max="50" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:signature:form:CurrentStaffTrainDays')" prop="CurrentStaffTrainDays">
|
||||
<el-input-number v-model="form.CurrentStaffTrainDays" controls-position="right" :min="1" :max="1000" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:signature:form:NewStaffTrainDays')" prop="NewStaffTrainDays">
|
||||
<el-input-number v-model="form.NewStaffTrainDays" controls-position="right" :min="1" :max="1000" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="form.Id !== ''" label="是否废除: ">
|
||||
<el-radio-group v-model="form.IsDeleted">
|
||||
|
@ -105,14 +50,8 @@
|
|||
</div>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="form.FileTypeId === '' || form.Name === ''"
|
||||
:loading="saveBtnLoading"
|
||||
@click="handleSave"
|
||||
>{{ $t('common:button:save') }}</el-button
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''"
|
||||
:loading="saveBtnLoading" @click="handleSave">{{ $t('common:button:save') }}</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
@ -141,6 +80,8 @@ export default {
|
|||
IsDeleted: false,
|
||||
SignViewMinimumMinutes: null,
|
||||
DocUserSignType: 0,
|
||||
CurrentStaffTrainDays: null,
|
||||
NewStaffTrainDays: null,
|
||||
},
|
||||
rules: {
|
||||
FileTypeId: [
|
||||
|
@ -198,6 +139,8 @@ export default {
|
|||
this.form.IsDeleted = this.data.IsDeleted
|
||||
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
||||
this.form.DocUserSignType = this.data.DocUserSignType
|
||||
this.form.CurrentStaffTrainDays = this.data.CurrentStaffTrainDays
|
||||
this.form.NewStaffTrainDays = this.data.NewStaffTrainDays
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
|
@ -207,7 +150,7 @@ export default {
|
|||
.then((res) => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 获取用户类型下拉数据
|
||||
getUserType() {
|
||||
|
@ -305,13 +248,16 @@ export default {
|
|||
width: 80px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.upload-container .el-input--small {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.upload-container .el-icon-circle-check {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
|
|
|
@ -0,0 +1,223 @@
|
|||
<template>
|
||||
<el-form ref="attachmentFrom" v-loading="loading" :model="form" label-width="190px" size="small" :rules="rules"
|
||||
class="upload-temporary-file">
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item :label="$t('dictionary:signature:form:FileName')" prop="Name">
|
||||
<el-input v-model="form.Name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:signature:form:OffLine')" prop="OffLine">
|
||||
<el-switch v-model="form.OffLine" :active-value="true" :inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:signature:form:File')">
|
||||
<div class="upload-container">
|
||||
<el-upload class="upload-demo" action :accept="this.accept.join(',')" :before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile" :on-preview="handlePreview" :on-remove="handleRemoveFile"
|
||||
:show-file-list="true" :file-list="fileList" :limit="1" :on-exceed="handleExceed">
|
||||
<el-button size="small" type="primary" :loading="btnLoading">{{ $t('common:button:check')
|
||||
}}</el-button>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
({{ $t('trials:signature:label:type').replace("xxx", this.accept.join(", ")) }})
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''"
|
||||
:loading="saveBtnLoading" @click="handleSave">{{ $t('common:button:save') }}</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateSystemDocumentAttachment } from '@/api/dictionary'
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
SystemDocumentId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
Name: null,
|
||||
FileFormat: null,
|
||||
FileName: null,
|
||||
FilePath: null,
|
||||
FileSize: null,
|
||||
OffLine: false,
|
||||
SystemDocumentId: null
|
||||
},
|
||||
rules: {
|
||||
Name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
accept: ['.jpg',
|
||||
'.jpeg',
|
||||
'.png',
|
||||
'.pdf',
|
||||
'.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx']
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
if (this.data && this.data.Id) {
|
||||
Object.keys(this.form).forEach(key => {
|
||||
this.form[key] = this.data[key]
|
||||
})
|
||||
this.fileList = [
|
||||
{
|
||||
name: this.data.FileName,
|
||||
url: this.data.FilePath,
|
||||
path: this.data.FilePath,
|
||||
},
|
||||
]
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
this.fileList = []
|
||||
return true
|
||||
} else {
|
||||
this.$alert(this.$t('trials:signature:label:type').replace("xxx", this.accept.join(", ")))
|
||||
|
||||
return false
|
||||
}
|
||||
},
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const res = await this.OSSclient.put(
|
||||
`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`,
|
||||
file
|
||||
)
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: this.$getObjectName(res.url),
|
||||
url: this.$getObjectName(res.url),
|
||||
})
|
||||
this.form.Name = param.file.name
|
||||
this.form.FileName = param.file.name
|
||||
this.form.FilePath = this.$getObjectName(res.url)
|
||||
this.form.FileSize = param.file.size
|
||||
this.form.FileFormat = param.file.name
|
||||
.substring(param.file.name.lastIndexOf('.'))
|
||||
.toLocaleLowerCase().split('.')[1]
|
||||
this.loading = false
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.attachmentFrom.validate((valid) => {
|
||||
if (!valid) return false
|
||||
if (!this.form.FilePath)
|
||||
return this.$alert(this.$t('trials:signature:message:selectFile'))
|
||||
this.saveBtnLoading = true
|
||||
if (this.SystemDocumentId) this.form.SystemDocumentId = this.SystemDocumentId
|
||||
addOrUpdateSystemDocumentAttachment(this.form)
|
||||
.then((res) => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success(this.$t('common:message:updatedSuccessfully'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleRemoveFile() {
|
||||
this.fileList = []
|
||||
this.form.FilePath = ''
|
||||
this.form.FileSize = ''
|
||||
this.form.FileFormat = ''
|
||||
this.form.FileName = ''
|
||||
},
|
||||
handlePreview(file) {
|
||||
if (file.fullPath) {
|
||||
window.open(file.fullPath, '_blank')
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(this.$t('upload:rule:maxFile1'))
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = [
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'png',
|
||||
'pdf',
|
||||
'ppt',
|
||||
'pptx',
|
||||
'doc',
|
||||
'docx',
|
||||
'xls',
|
||||
'xlsx',
|
||||
]
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf('.') + 1)
|
||||
.toLocaleLowerCase()
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.upload-temporary-file {
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.upload-container .el-input--small {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.upload-container .el-icon-circle-check {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<div v-if="config.visible">
|
||||
<base-model :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-button size="mini" type="primary" style="float:right" @click.stop="edit({})">
|
||||
{{ $t('common:button:add') }}</el-button>
|
||||
<el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading"
|
||||
@sort-change="handleSortByColumn">
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column prop="Name" :label="$t('dictionary:signature:attachmentList:FileName')"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="OffLine" :label="$t('dictionary:signature:attachmentList:OffLine')"
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.OffLine" @change="(val) => OffLine(scope.row, val)"
|
||||
:active-value="true" :inactive-value="false" :active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CreateTime" :label="$t('dictionary:signature:attachmentList:CreateTime')"
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click.stop="preview(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click.stop="edit(scope.row)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click.stop="OffLine(scope.row, true)"
|
||||
:disabled="scope.row.OffLine">
|
||||
{{ $t('dictionary:signature:attachmentList:OffLine') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click.stop="del(scope.row)">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 新增/编辑附件 -->
|
||||
<el-dialog :visible.sync="visible" :close-on-click-modal="false" :append-to-body="true" :title="title"
|
||||
width="800px" custom-class="base-dialog-wrapper">
|
||||
<attachmentForm v-if="visible" :data="rowData" :SystemDocumentId="SystemDocumentId"
|
||||
@closeDialog="closeDialog" @getList="getAllList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
</base-model>
|
||||
<viewer ref="picture_perview2" style="margin: 0 10px"
|
||||
v-if="rowData.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowData.FileFormat.toLowerCase())"
|
||||
:images="[`${OSSclientConfig.basePath}${rowData.FilePath}`]" :options="viewerOptions">
|
||||
|
||||
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowData.FilePath}`" alt="Image" />
|
||||
</viewer>
|
||||
<!-- <attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible"
|
||||
v-if="perview_visible" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import attachmentForm from './attachmentForm'
|
||||
// import attachmentPreview from './attachmentPreview'
|
||||
import { addOrUpdateSystemDocumentAttachment, getSystemDocumentAttachmentList, deleteSystemDocumentAttachment } from '@/api/dictionary'
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
PageIndex: 1,
|
||||
PageSize: 1000,
|
||||
Asc: false,
|
||||
SortField: null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
BaseModel,
|
||||
attachmentForm,
|
||||
// attachmentPreview
|
||||
},
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
visible: false,
|
||||
title: this.$t('dictionary:signature:attachmentList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
SystemDocumentId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchData: defaultSearchData(),
|
||||
visible: false,
|
||||
title: null,
|
||||
list: [],
|
||||
rowData: {},
|
||||
loading: false,
|
||||
viewerOptions: {
|
||||
toolbar: {
|
||||
zoomIn: true,
|
||||
zoomOut: true,
|
||||
reset: true,
|
||||
prev: false,
|
||||
next: false,
|
||||
rotateLeft: true,
|
||||
rotateRight: true,
|
||||
flipHorizontal: true,
|
||||
flipVertical: true,
|
||||
}
|
||||
},
|
||||
// perview_visible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
SystemDocumentId: {
|
||||
handler() {
|
||||
this.getList()
|
||||
},
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeDialog() {
|
||||
this.visible = false
|
||||
},
|
||||
getAllList() {
|
||||
this.getList()
|
||||
this.$emit("getList")
|
||||
},
|
||||
async del(row) {
|
||||
try {
|
||||
let confirm = await this.$confirm(this.$t("dictionary:signature:attachmentList:message:del"))
|
||||
if (!confirm) return false
|
||||
this.loading = true
|
||||
let res = await deleteSystemDocumentAttachment(row.Id)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getAllList()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
edit(row) {
|
||||
this.rowData = Object.assign({}, row)
|
||||
this.visible = true
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
if (!this.SystemDocumentId) return false
|
||||
this.loading = true
|
||||
this.searchData.SystemDocumentId = this.SystemDocumentId
|
||||
let res = await getSystemDocumentAttachmentList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async OffLine(row, val) {
|
||||
try {
|
||||
let data = Object.assign({}, row)
|
||||
data.OffLine = val
|
||||
this.loading = true
|
||||
let res = await addOrUpdateSystemDocumentAttachment(data)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$t('dictionary:signature:attachmentList:updateSuccessfully')
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
row.OffLine = !row.OffLine
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
preview(data) {
|
||||
// return this.perview_visible = true
|
||||
this.rowData = Object.assign({}, data)
|
||||
if (['.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$onlyOffice({
|
||||
path: data.FilePath,
|
||||
type: data.FileFormat,
|
||||
title: data.Name
|
||||
})
|
||||
}
|
||||
if (['.jpg',
|
||||
'.jpeg',
|
||||
'.png'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['picture_perview2'].$viewer.show()
|
||||
})
|
||||
}
|
||||
if (['.pdf'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$preview({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'pdf',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,305 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="title" :fullscreen="true" append-to-body
|
||||
custom-class="base-dialog-wrapper" :before-close="handleClose">
|
||||
<div v-loading="loading" class="img-container" v-if="visible">
|
||||
<el-card class="box-card left">
|
||||
<div class="title">
|
||||
{{ $t('dictionary:signature:fileList') }}
|
||||
</div>
|
||||
<div class="left-content">
|
||||
<!-- 检查层级 -->
|
||||
<div id="imgList" style="height: 100%; overflow: hidden">
|
||||
<template v-for="(item, index) in list">
|
||||
<div :id="`img${item.Id}`" :key="item.Id" :class="{
|
||||
'is-boxActive': item.Id === rowData.Id,
|
||||
}" class="img-box" @click="selected(item)">
|
||||
<div class="file-image">
|
||||
<el-image v-if="
|
||||
[
|
||||
'jpeg',
|
||||
'jpg',
|
||||
'png',
|
||||
].includes(item.FileFormat)
|
||||
" style="width: 100%; height: 100%"
|
||||
:src="`${OSSclientConfig.basePath}${item.FilePath}?x-oss-process=image/resize,w_50,h_50/format,png`"
|
||||
fit="contain" crossorigin="anonymous" />
|
||||
<el-image v-else style="width: 100%; height: 100%" :src="getsrc(item.FileFormat)"
|
||||
fit="contain" crossorigin="anonymous" />
|
||||
</div>
|
||||
<div v-if="item.Name.length < 15" class="img-text">
|
||||
{{ `${index + 1}. ${item.Name}` }}
|
||||
</div>
|
||||
<el-tooltip v-else :content="item.Name" placement="bottom">
|
||||
<div class="img-text">
|
||||
{{ `${index + 1}. ${item.Name}` }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- 预览图像 -->
|
||||
<el-card class="box-card right">
|
||||
<div style="width: 100%; height: 100%" v-if="[
|
||||
'jpeg',
|
||||
'jpg',
|
||||
'png',
|
||||
].includes(rowData.FileFormat)">
|
||||
<imageViewer :rowData="rowData" />
|
||||
</div>
|
||||
<div style="width: 100%; height: 100%" v-else>
|
||||
<PreviewFile v-if='rowData.FilePath' :file-path="rowData.FilePath" :file-type="rowData.FileFormat"
|
||||
:title="rowData.Name" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
|
||||
<CheckForm />
|
||||
</el-card> -->
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pdf from '@/assets/file_icon/pdf.png'
|
||||
import zip from '@/assets/file_icon/zip.png'
|
||||
import doc from '@/assets/file_icon/doc.png'
|
||||
import docx from '@/assets/file_icon/docx.png'
|
||||
import ppt from '@/assets/file_icon/ppt.png'
|
||||
import pptx from '@/assets/file_icon/pptx.png'
|
||||
import xls from '@/assets/file_icon/xls.png'
|
||||
import xlsx from '@/assets/file_icon/xlsx.png'
|
||||
import PreviewFile from '@/components/PreviewFile'
|
||||
import imageViewer from './image-viewer'
|
||||
import { getSystemDocumentAttachmentList } from '@/api/dictionary'
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
PageIndex: 1,
|
||||
PageSize: 1000,
|
||||
Asc: false,
|
||||
OffLine: false,
|
||||
SortField: null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'Notice',
|
||||
components: {
|
||||
PreviewFile,
|
||||
imageViewer
|
||||
},
|
||||
props: {
|
||||
SystemDocumentId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pdf,
|
||||
zip,
|
||||
doc,
|
||||
docx,
|
||||
ppt,
|
||||
pptx,
|
||||
xls,
|
||||
xlsx,
|
||||
rowData: {},
|
||||
list: [],
|
||||
searchData: defaultSearchData(),
|
||||
title: this.$t('dictionary:signature:fileList')
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
SystemDocumentId: {
|
||||
handler() {
|
||||
this.getList()
|
||||
},
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getsrc(type) {
|
||||
return this[type.toLowerCase()]
|
||||
},
|
||||
selected(row) {
|
||||
this.rowData = row
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit("update:visible", false)
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
if (!this.SystemDocumentId) return false
|
||||
this.loading = true
|
||||
this.searchData.SystemDocumentId = this.SystemDocumentId
|
||||
let res = await getSystemDocumentAttachmentList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.rowData = this.list[0] || {}
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.img-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
|
||||
::v-deep .el-card__body {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.study-desc {
|
||||
padding: 10px 5px;
|
||||
line-height: 20px;
|
||||
background-color: #d5d5d5;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.left {
|
||||
width: 220px;
|
||||
height: 100%;
|
||||
|
||||
::v-deep .el-card__body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border: 1ppx solid;
|
||||
border: 1px solid #ebe7e7;
|
||||
padding-left: 10px;
|
||||
background-color: #4e4e4e;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.left-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
// ::v-deep .el-tabs{
|
||||
// height: 100%;
|
||||
// }
|
||||
// ::v-deep .el-tabs__header{
|
||||
// height: 40px;
|
||||
// }
|
||||
// ::v-deep .el-tabs__content{
|
||||
// flex: 1;
|
||||
// overflow-y: auto;
|
||||
// padding: 0;
|
||||
// }
|
||||
.img-box {
|
||||
// position: relative;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px solid #f3f3f3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
padding: 5px 10px;
|
||||
|
||||
cursor: pointer;
|
||||
// margin-bottom: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.img-text {
|
||||
display: inline-block;
|
||||
width: calc(100% - 60px);
|
||||
margin-left: 5px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
/* 用省略号表示溢出的文本 */
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.img-box:nth-last-child(1) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.is-boxActive {
|
||||
// border-color: #409eff;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.is-boxActiv:after {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
margin-left: 10px;
|
||||
|
||||
::v-deep .el-card__body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.switchBox {
|
||||
width: 100%;
|
||||
margin: 5px 0;
|
||||
color: #4e4e4e;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.file-image {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
background-color: #d5d5d5;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
min-height: 48px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,381 @@
|
|||
/* eslint-disable no-unused-vars */
|
||||
<template>
|
||||
<div style="width: 100%; height: 100%">
|
||||
<transition name="viewer-fade">
|
||||
<div ref="image-viewer__wrapper" tabindex="-1" class="image-viewer__wrapper" :style="{ 'z-index': 5 }">
|
||||
<!-- Arrow -->
|
||||
<!-- 工具栏 -->
|
||||
<div class="image-viewer__btn image-viewer__actions">
|
||||
<div class="image-viewer__actions__inner">
|
||||
<i class="el-icon-zoom-out" @click="handleActions('zoomOut')" />
|
||||
<i class="el-icon-zoom-in" @click="handleActions('zoomIn')" />
|
||||
<i class="el-image-viewer__actions__divider" />
|
||||
<i class="el-icon-c-scale-to-original" @click="toggleMode" />
|
||||
<i class="el-image-viewer__actions__divider" />
|
||||
<i class="el-icon-refresh-left" @click="handleActions('anticlocelise')" />
|
||||
<i class="el-icon-refresh-right" @click="handleActions('clocelise')" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 图片 -->
|
||||
<div id="image-viewer__canvas" class="image-viewer__canvas">
|
||||
<img crossorigin="anonymous" :src="`${OSSclientConfig.basePath}${rowData.FilePath}`
|
||||
" :style="imgStyle" style="max-width: 100%; max-height: 100%" @load="handleImgLoad" @error="handleImgError"
|
||||
@mousedown="handleMouseDown" />
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { on, off } from 'element-ui/src/utils/dom'
|
||||
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
|
||||
|
||||
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
||||
|
||||
export default {
|
||||
name: 'ImageViewer',
|
||||
props: {
|
||||
onSwitch: {
|
||||
type: Function,
|
||||
default: () => { },
|
||||
},
|
||||
onClose: {
|
||||
type: Function,
|
||||
default: () => { },
|
||||
},
|
||||
rowData:{
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
transform: {
|
||||
scale: 1,
|
||||
deg: 0,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
enableTransition: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imgStyle() {
|
||||
const { scale, deg, offsetX, offsetY, enableTransition } = this.transform
|
||||
const style = {
|
||||
transform: `scale(${scale}) rotate(${deg}deg)`,
|
||||
transition: enableTransition ? 'transform .3s' : '',
|
||||
'margin-left': `${offsetX}px`,
|
||||
'margin-top': `${offsetY}px`,
|
||||
}
|
||||
return style
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
document.getElementById('image-viewer__canvas').onmousewheel = (event) => {
|
||||
if (event.deltaY > 0) {
|
||||
// 缩小
|
||||
this.handleActions('zoomOut', {
|
||||
zoomRate: 0.015,
|
||||
enableTransition: false,
|
||||
})
|
||||
} else {
|
||||
// 放大
|
||||
this.handleActions('zoomIn', {
|
||||
zoomRate: 0.015,
|
||||
enableTransition: false,
|
||||
})
|
||||
}
|
||||
return false
|
||||
}
|
||||
this.deviceSupportInstall()
|
||||
},
|
||||
methods: {
|
||||
hide() {
|
||||
this.deviceSupportUninstall()
|
||||
this.onClose()
|
||||
},
|
||||
deviceSupportInstall() {
|
||||
this._keyDownHandler = (e) => {
|
||||
e.stopPropagation()
|
||||
const keyCode = e.keyCode
|
||||
switch (keyCode) {
|
||||
// ESC
|
||||
case 27:
|
||||
this.hide()
|
||||
break
|
||||
// SPACE
|
||||
case 32:
|
||||
this.toggleMode()
|
||||
break
|
||||
// LEFT_ARROW
|
||||
case 37:
|
||||
this.prev()
|
||||
break
|
||||
// UP_ARROW
|
||||
case 38:
|
||||
this.handleActions('zoomIn')
|
||||
break
|
||||
// RIGHT_ARROW
|
||||
case 39:
|
||||
this.next()
|
||||
break
|
||||
// DOWN_ARROW
|
||||
case 40:
|
||||
this.handleActions('zoomOut')
|
||||
break
|
||||
}
|
||||
}
|
||||
this._mouseWheelHandler = rafThrottle((e) => {
|
||||
const delta = e.wheelDelta ? e.wheelDelta : -e.detail
|
||||
if (delta > 0) {
|
||||
this.handleActions('zoomIn', {
|
||||
zoomRate: 0.015,
|
||||
enableTransition: false,
|
||||
})
|
||||
} else {
|
||||
this.handleActions('zoomOut', {
|
||||
zoomRate: 0.015,
|
||||
enableTransition: false,
|
||||
})
|
||||
}
|
||||
})
|
||||
on(document, 'keydown', this._keyDownHandler)
|
||||
|
||||
on(document, mousewheelEventName, null)
|
||||
// on(document, mousewheelEventName, this._mouseWheelHandler)
|
||||
},
|
||||
deviceSupportUninstall() {
|
||||
off(document, 'keydown', this._keyDownHandler)
|
||||
off(document, mousewheelEventName, this._mouseWheelHandler)
|
||||
this._keyDownHandler = null
|
||||
this._mouseWheelHandler = null
|
||||
},
|
||||
handleImgLoad(e) {
|
||||
this.loading = false
|
||||
},
|
||||
handleImgError(e) {
|
||||
this.loading = false
|
||||
e.target.alt = '加载失败'
|
||||
},
|
||||
handleMouseDown(e) {
|
||||
if (this.loading || e.button !== 0) return
|
||||
|
||||
const { offsetX, offsetY } = this.transform
|
||||
const startX = e.pageX
|
||||
const startY = e.pageY
|
||||
this._dragHandler = rafThrottle((ev) => {
|
||||
this.transform.offsetX = offsetX + ev.pageX - startX
|
||||
this.transform.offsetY = offsetY + ev.pageY - startY
|
||||
})
|
||||
on(document, 'mousemove', this._dragHandler)
|
||||
on(document, 'mouseup', (ev) => {
|
||||
off(document, 'mousemove', this._dragHandler)
|
||||
})
|
||||
|
||||
e.preventDefault()
|
||||
},
|
||||
reset() {
|
||||
this.transform = {
|
||||
scale: 1,
|
||||
deg: 0,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
enableTransition: false,
|
||||
}
|
||||
},
|
||||
toggleMode() {
|
||||
if (this.loading) return
|
||||
this.reset()
|
||||
},
|
||||
handleActions(action, options = {}) {
|
||||
if (this.loading) return
|
||||
const { zoomRate, rotateDeg, enableTransition } = {
|
||||
zoomRate: 0.2,
|
||||
rotateDeg: 90,
|
||||
enableTransition: true,
|
||||
...options,
|
||||
}
|
||||
const { transform } = this
|
||||
switch (action) {
|
||||
case 'zoomOut':
|
||||
if (transform.scale > 0.2) {
|
||||
transform.scale = parseFloat(
|
||||
(transform.scale - zoomRate).toFixed(3)
|
||||
)
|
||||
}
|
||||
break
|
||||
case 'zoomIn':
|
||||
if (transform.scale < 5) {
|
||||
transform.scale = parseFloat(
|
||||
(transform.scale + zoomRate).toFixed(3)
|
||||
)
|
||||
}
|
||||
break
|
||||
case 'clocelise':
|
||||
transform.deg += rotateDeg
|
||||
break
|
||||
case 'anticlocelise':
|
||||
transform.deg -= rotateDeg
|
||||
break
|
||||
}
|
||||
transform.enableTransition = enableTransition
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.image-viewer__wrapper {
|
||||
position: relative;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.image-viewer__btn {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
opacity: 0.8;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.image-viewer__close {
|
||||
display: none;
|
||||
top: 40px;
|
||||
right: 40px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.image-viewer_desc {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 40px;
|
||||
font-size: 15px;
|
||||
padding: 5px;
|
||||
height: 30px;
|
||||
width: 70px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background-color: #606266;
|
||||
border-color: #fff;
|
||||
z-index: 1;
|
||||
border-radius: 17px;
|
||||
// border-radius: 2%;
|
||||
}
|
||||
|
||||
.image-viewer__canvas {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.image-viewer__actions {
|
||||
left: 50%;
|
||||
bottom: 30px;
|
||||
transform: translateX(-50%);
|
||||
width: 282px;
|
||||
height: 44px;
|
||||
padding: 0 23px;
|
||||
background-color: #606266;
|
||||
border-color: #fff;
|
||||
border-radius: 22px;
|
||||
}
|
||||
|
||||
.image-viewer__actions__inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: justify;
|
||||
cursor: default;
|
||||
font-size: 23px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.image-viewer__next,
|
||||
.image-viewer__prev {
|
||||
top: 50%;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
font-size: 24px;
|
||||
color: #fff;
|
||||
background-color: #606266;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.image-viewer__prev {
|
||||
transform: translateY(-50%);
|
||||
left: 40px;
|
||||
}
|
||||
|
||||
.image-viewer__next {
|
||||
transform: translateY(-50%);
|
||||
right: 40px;
|
||||
text-indent: 2px;
|
||||
}
|
||||
|
||||
.image-viewer__mask {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0.5;
|
||||
// background:#000
|
||||
}
|
||||
|
||||
.viewer-fade-enter-active {
|
||||
animation: viewer-fade-in 0.3s;
|
||||
}
|
||||
|
||||
.viewer-fade-leave-active {
|
||||
animation: viewer-fade-out 0.3s;
|
||||
}
|
||||
|
||||
@keyframes viewer-fade-in {
|
||||
0% {
|
||||
transform: translate3d(0, -20px, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes viewer-fade-out {
|
||||
0% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate3d(0, -20px, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -69,12 +69,16 @@
|
|||
@sort-change="handleSortByColumn">
|
||||
<el-table-column type="index" width="40" />
|
||||
<el-table-column prop="FileType" :label="$t('dictionary:signature:table:FileType')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
sortable="custom" min-width="120px" />
|
||||
<el-table-column prop="Name" :label="$t('dictionary:signature:table:Name')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
sortable="custom" min-width="120px" />
|
||||
|
||||
<el-table-column prop="SignViewMinimumMinutes" :label="$t('dictionary:signature:table:SignViewMinimumMinutes')"
|
||||
show-overflow-tooltip sortable="custom" min-width="110" />
|
||||
show-overflow-tooltip sortable="custom" min-width="200px" />
|
||||
<el-table-column prop="CurrentStaffTrainDays" :label="$t('dictionary:signature:table:CurrentStaffTrainDays')"
|
||||
show-overflow-tooltip sortable="custom" min-width="200px" />
|
||||
<el-table-column prop="NewStaffTrainDays" :label="$t('dictionary:signature:table:NewStaffTrainDays')"
|
||||
show-overflow-tooltip sortable="custom" min-width="200px" />
|
||||
<el-table-column prop="NeedConfirmedUserTypes" :label="$t('dictionary:signature:table:NeedConfirmedUserTypes')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
@ -86,7 +90,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="IsDeleted" :label="$t('dictionary:signature:table:IsDeleted')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
sortable="custom" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd('TrainingStatus', scope.row.IsDeleted)
|
||||
|
@ -97,15 +101,21 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DocUserSignType" :label="$t('dictionary:signature:table:DocUserSignType')"
|
||||
show-overflow-tooltip sortable="custom" min-width="90">
|
||||
show-overflow-tooltip sortable="custom" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('ReadingYesOrNo', Number(scope.row.DocUserSignType)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="AttachmentCount" :label="$t('dictionary:signature:table:AttachmentCount')"
|
||||
show-overflow-tooltip sortable="custom" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CreateTime" :label="$t('dictionary:signature:table:CreateTime')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
sortable="custom" min-width="180px" />
|
||||
|
||||
<el-table-column :label="$t('common:action:action')" min-width="120">
|
||||
<el-table-column :label="$t('common:action:action')" min-width="180px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handlePreview(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
|
@ -131,7 +141,8 @@
|
|||
width="600px" custom-class="base-dialog-wrapper">
|
||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
<!--附件列表-->
|
||||
<attachmentList v-if="config.visible" :config="config" :SystemDocumentId="SystemDocumentId" @getLit="getList" />
|
||||
<!-- 预览文件 -->
|
||||
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('common:button:preview')"
|
||||
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
|
||||
|
@ -148,6 +159,8 @@ import { userAbandonDoc, getTrialUserTypeList } from '@/api/trials'
|
|||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import TemplateForm from './TemplateForm'
|
||||
|
||||
import attachmentList from './attachmentList'
|
||||
import PreviewFile from '@/components/PreviewFile/index'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
|
@ -164,7 +177,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'SignatureTemplate',
|
||||
components: { BaseContainer, Pagination, TemplateForm, PreviewFile },
|
||||
components: { BaseContainer, Pagination, TemplateForm, PreviewFile, attachmentList },
|
||||
dicts: ['Sys_Document'],
|
||||
props: {
|
||||
isSystem: {
|
||||
|
@ -189,7 +202,14 @@ export default {
|
|||
title: '',
|
||||
loading: false,
|
||||
userTypeOptions: [],
|
||||
timeList: []
|
||||
timeList: [],
|
||||
attachment_Visible: false,
|
||||
SystemDocumentId: null,
|
||||
config: {
|
||||
visible: false,
|
||||
title: this.$t('dictionary:signature:attachmentList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -197,6 +217,10 @@ export default {
|
|||
this.getUserType()
|
||||
},
|
||||
methods: {
|
||||
openAttachment(row) {
|
||||
this.SystemDocumentId = row.Id
|
||||
this.config.visible = true
|
||||
},
|
||||
changeTimeList() {
|
||||
if (this.timeList) {
|
||||
this.searchData.BeginCreateTime = this.timeList[0]
|
||||
|
@ -311,6 +335,7 @@ export default {
|
|||
// 关闭弹窗
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
this.attachment_Visible = false
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
|
|
|
@ -122,6 +122,12 @@
|
|||
<!-- 文件名称 -->
|
||||
<el-table-column prop="Name" :label="$t('trials:signRecords:table:fileName')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:signRecords:table:AttachmentCount')" prop="AttachmentCount"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 文件级别 -->
|
||||
<el-table-column prop="IsSystemDoc" :label="$t('trials:signRecords:table:fileLevel')" show-overflow-tooltip
|
||||
width="160" sortable="custom" v-if="!isSystem">
|
||||
|
@ -201,10 +207,15 @@
|
|||
<!-- 预览文件 -->
|
||||
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('trials:signRecords:action:preview')"
|
||||
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
|
||||
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @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">
|
||||
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" />
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -220,6 +231,7 @@ import { pMTrainingRecordList_Export } from '@/api/export'
|
|||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import PreviewFile from '@/components/PreviewFile/index'
|
||||
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
UserName: null,
|
||||
|
@ -240,7 +252,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'AttachmentsManagement',
|
||||
components: { BaseContainer, Pagination, PreviewFile },
|
||||
components: { BaseContainer, Pagination, PreviewFile, attachmentPreview },
|
||||
props: {
|
||||
isDoc: {
|
||||
type: Boolean,
|
||||
|
@ -276,7 +288,9 @@ export default {
|
|||
trialId: this.$route.query.trialId,
|
||||
exportLoading: false,
|
||||
timeList: [],
|
||||
timeListC: []
|
||||
timeListC: [],
|
||||
SystemDocumentId: null,
|
||||
perview_visible: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -285,6 +299,11 @@ export default {
|
|||
this.getUserType()
|
||||
},
|
||||
methods: {
|
||||
openAttachment(row) {
|
||||
if (!row.AttachmentCount) return false
|
||||
this.SystemDocumentId = row.Id
|
||||
this.perview_visible = true
|
||||
},
|
||||
changeTimeList() {
|
||||
if (this.timeList) {
|
||||
this.searchData.StartConfirmTime = this.timeList[0]
|
||||
|
|
|
@ -5,17 +5,9 @@
|
|||
<el-form :inline="true">
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item :label="$t('trials:self-attachment:table:fileType')">
|
||||
<el-select
|
||||
v-model="searchData.FileTypeId"
|
||||
clearable
|
||||
style="width:150px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of typeOptions"
|
||||
:key="item.FileTypeId"
|
||||
:label="item.FileType"
|
||||
:value="item.FileTypeId"
|
||||
/>
|
||||
<el-select v-model="searchData.FileTypeId" clearable style="width:150px;">
|
||||
<el-option v-for="item of typeOptions" :key="item.FileTypeId" :label="item.FileType"
|
||||
:value="item.FileTypeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 文件名称 -->
|
||||
|
@ -26,7 +18,7 @@
|
|||
<el-form-item :label="$t('trials:self-attachment:table:isSign')">
|
||||
<el-select v-model="searchData.IsSign" clearable style="width:120px;">
|
||||
<template v-for="item of $d.TrainingStatusEnum">
|
||||
<el-option v-if="item.raw.ValueCN !== '无'" :label="item.label" :value="item.value" :key="item.id"/>
|
||||
<el-option v-if="item.raw.ValueCN !== '无'" :label="item.label" :value="item.value" :key="item.id" />
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -44,104 +36,70 @@
|
|||
</template>
|
||||
<template slot="main-container">
|
||||
<!-- 系统文件列表 -->
|
||||
<el-table
|
||||
ref="TrialAttachments"
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table ref="TrialAttachments" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe
|
||||
height="100" @sort-change="handleSortByColumn">
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column type="index" width="40" />
|
||||
<!-- 文件类型 -->
|
||||
<el-table-column
|
||||
prop="FileType"
|
||||
:label="$t('trials:self-attachment:table:fileType')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="FileType" :label="$t('trials:self-attachment:table:fileType')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!-- 文件名称 -->
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
:label="$t('trials:self-attachment:table:fileName')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="Name" :label="$t('trials:self-attachment:table:fileName')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:self-attachment:table:AttachmentCount')" prop="AttachmentCount"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否废除 -->
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
:label="$t('trials:self-attachment:table:isDeleted')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="IsDeleted" :label="$t('trials:self-attachment:table:isDeleted')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('TrainingStatus', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('TrainingStatus', scope.row.IsDeleted) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 上传时间 -->
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:self-attachment:table:uploadTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:self-attachment:table:uploadTime')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!-- 是否签署 -->
|
||||
<el-table-column
|
||||
prop="ConfirmTime"
|
||||
:label="$t('trials:self-attachment:table:isSign')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="ConfirmTime" :label="$t('trials:self-attachment:table:isSign')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsConfirmed" type="primary">{{ $fd('TrainingStatusEnum', scope.row.IsConfirmed) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsConfirmed" type="primary">{{ $fd('TrainingStatusEnum', scope.row.IsConfirmed)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="danger">{{ $fd('TrainingStatusEnum', scope.row.IsConfirmed) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 签署时间 -->
|
||||
<el-table-column
|
||||
prop="ConfirmTime"
|
||||
:label="$t('trials:self-attachment:table:signTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="ConfirmTime" :label="$t('trials:self-attachment:table:signTime')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
|
||||
<el-table-column :label="$t('common:action:action')">
|
||||
<template slot-scope="scope">
|
||||
<!-- 预览 -->
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
circle
|
||||
:title="$t('trials:self-attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" circle :title="$t('trials:self-attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)" />
|
||||
<!-- 签署 -->
|
||||
<el-button
|
||||
icon="el-icon-edit-outline"
|
||||
circle
|
||||
:disabled="!!scope.row.ConfirmTime"
|
||||
:title="$t('trials:self-attachment:action:sign')"
|
||||
@click="handleSign(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-edit-outline" circle :disabled="!!scope.row.ConfirmTime"
|
||||
:title="$t('trials:self-attachment:action:sign')" @click="handleSign(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
</template>
|
||||
|
||||
<!-- 预览文件 -->
|
||||
<el-dialog
|
||||
v-if="previewVisible"
|
||||
:visible.sync="previewVisible"
|
||||
:title="title"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body
|
||||
custom-class="base-dialog-wrapper">
|
||||
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @click.stop="openAttachment(currentRow)"
|
||||
v-if="currentRow.AttachmentCount">{{
|
||||
$t('trials:self-attachment:table:AttachmentCount') }} ({{
|
||||
currentRow.AttachmentCount }})</span>
|
||||
<span v-if="!currentIsConfirm" style="position: fixed;right: 75px;top: 14px;">
|
||||
<span style="color:red;margin-right:10px;">
|
||||
<!-- 请仔细阅读文件,并签名确认 -->
|
||||
|
@ -149,13 +107,8 @@
|
|||
<span v-show="duration < currentMinMinutes * 60">{{ `(${currentMinMinutes * 60 - duration}s)` }}</span>
|
||||
</span>
|
||||
<!-- 签署 -->
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="timer !== null || duration === 0"
|
||||
:loading="btnLoading"
|
||||
@click="handleConfirm"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="timer !== null || duration === 0" :loading="btnLoading"
|
||||
@click="handleConfirm">
|
||||
{{ $t('common:button:sign') }}
|
||||
<!-- {{ duration >= currentMinMinutes * 60?'确认':`确认(${currentMinMinutes * 60 - duration}s)` }} -->
|
||||
</el-button>
|
||||
|
@ -167,19 +120,16 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 签名弹框 -->
|
||||
<el-dialog
|
||||
v-if="signVisible"
|
||||
:visible.sync="signVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="600px"
|
||||
append-to-body
|
||||
>
|
||||
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
|
||||
append-to-body>
|
||||
<div slot="title">
|
||||
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
|
||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
|
||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
|
||||
</div>
|
||||
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName" :trial-id="trialId" @closeDialog="closeSignDialog" />
|
||||
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
|
||||
:trial-id="trialId" @closeDialog="closeSignDialog" />
|
||||
</el-dialog>
|
||||
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" />
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -189,6 +139,7 @@ import Pagination from '@/components/Pagination'
|
|||
import PreviewFile from '@/components/PreviewFile/index'
|
||||
import SignForm from './components/SignForm'
|
||||
import store from '@/store'
|
||||
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
FileTypeId: '',
|
||||
|
@ -202,7 +153,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'TrialAttachments',
|
||||
components: { BaseContainer, Pagination, PreviewFile, SignForm },
|
||||
components: { BaseContainer, Pagination, PreviewFile, SignForm, attachmentPreview },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
|
@ -223,7 +174,9 @@ export default {
|
|||
fileName: '',
|
||||
currentUser: zzSessionStorage.getItem('userName'),
|
||||
typeOptions: [],
|
||||
trialId: this.$route.query.trialId
|
||||
trialId: this.$route.query.trialId,
|
||||
SystemDocumentId: null,
|
||||
perview_visible: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -240,6 +193,11 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
openAttachment(row) {
|
||||
if (!row.AttachmentCount) return false
|
||||
this.SystemDocumentId = row.Id
|
||||
this.perview_visible = true
|
||||
},
|
||||
// 获取系统文件数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
|
@ -336,8 +294,8 @@ export default {
|
|||
// 文档签署已完成,是否关闭弹窗?
|
||||
this.$confirm(this.$t('trials:self-attachment:message:closeDocument')).then(() => {
|
||||
this.previewVisible = false
|
||||
}).catch(()=>{})
|
||||
|
||||
}).catch(() => { })
|
||||
|
||||
} else {
|
||||
this.handleSign(res.Result)
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -102,8 +102,8 @@
|
|||
<!-- 预览 -->
|
||||
<el-button icon="el-icon-view" circle :title="$t('trials:uploadNonDicoms:action:preview')"
|
||||
:disabled="scope.row.FileCount === 0" @click.native.prevent="handlePreviewAllFiles(scope.row)" />
|
||||
<!-- 上传 -->
|
||||
<el-button v-if="allowAddOrEdit" icon="el-icon-upload2" circle :disabled="scope.row.IsDeleted"
|
||||
<!-- 上传 :disabled="scope.row.IsDeleted" -->
|
||||
<el-button v-if="allowAddOrEdit" icon="el-icon-upload2" circle
|
||||
:title="$t('trials:uploadNonDicoms:action:upload')" @click.native.prevent="handleUpload(scope.row)" />
|
||||
<!-- 上传视频 -->
|
||||
<!-- <el-button
|
||||
|
@ -261,9 +261,9 @@
|
|||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-progress color="#409eff" :percentage="scope.row.size && scope.row.size > 0 ? ((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) *
|
||||
1
|
||||
: ((scope.row.uploadFileSize * 100) / 1).toFixed(2) *
|
||||
1
|
||||
1
|
||||
: ((scope.row.uploadFileSize * 100) / 1).toFixed(2) *
|
||||
1
|
||||
" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -13,91 +13,53 @@
|
|||
</el-col>
|
||||
<el-col :span="12" style="text-align: right">
|
||||
<h3>
|
||||
<Pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="listQuery.pageIndex"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:background="false"
|
||||
style="display: inline-block"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<el-button
|
||||
icon="el-icon-refresh-left"
|
||||
size="small"
|
||||
circle
|
||||
:title="$t('common:button:reset')"
|
||||
@click="handleReset"
|
||||
/>
|
||||
<Pagination class="page" :total="total" :page.sync="listQuery.pageIndex" :limit.sync="listQuery.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :background="false" style="display: inline-block"
|
||||
@pagination="getList" />
|
||||
<el-button icon="el-icon-refresh-left" size="small" circle :title="$t('common:button:reset')"
|
||||
@click="handleReset" />
|
||||
</h3>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- -->
|
||||
<el-table
|
||||
ref="needSignSysList"
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
:show-header="true"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
height="100"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'UpdateTime', order: 'descending' }"
|
||||
>
|
||||
<el-table ref="needSignSysList" v-loading="listLoading" :data="list" :show-header="true"
|
||||
v-adaptive="{ bottomOffset: 45 }" height="100" @sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'UpdateTime', order: 'descending' }">
|
||||
<el-table-column type="index" width="40" />
|
||||
<el-table-column
|
||||
:label="$t('trials:sysDocBeSigned:table:fileType')"
|
||||
prop="FileType"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('trials:sysDocBeSigned:table:fileName')"
|
||||
prop="Name"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('trials:sysDocBeSigned:table:uploadTime')"
|
||||
prop="CreateTime"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:fileType')" prop="FileType" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:fileName')" prop="Name" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:AttachmentCount')" prop="AttachmentCount"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:uploadTime')" prop="CreateTime" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:SuggestFinishTime')" prop="SuggestFinishTime"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="140">
|
||||
<template slot-scope="scope">
|
||||
<!-- 预览 -->
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
circle
|
||||
v-if="isSigned"
|
||||
:title="$t('trials:self-attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
icon="el-icon-edit-outline"
|
||||
circle
|
||||
v-if="!isSigned"
|
||||
<el-button icon="el-icon-view" circle v-if="isSigned" :title="$t('trials:self-attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)" />
|
||||
<el-button icon="el-icon-edit-outline" circle v-if="!isSigned"
|
||||
:disabled="IsFirstSysDocNeedSign && !!~scope.row.DocTypeCode"
|
||||
:title="$t('trials:needSignSysDoc:action:sign')"
|
||||
@click="handleSign(scope.row)"
|
||||
/>
|
||||
:title="$t('trials:needSignSysDoc:action:sign')" @click="handleSign(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 预览/签署文件 -->
|
||||
<el-dialog
|
||||
v-if="previewVisible"
|
||||
:visible.sync="previewVisible"
|
||||
:title="title"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<span
|
||||
v-if="!currentIsConfirm"
|
||||
style="position: fixed; right: 75px; top: 14px"
|
||||
>
|
||||
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body
|
||||
custom-class="base-dialog-wrapper">
|
||||
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @click.stop="openAttachment(currentRow)"
|
||||
v-if="currentRow.AttachmentCount">{{
|
||||
$t('trials:sysDocBeSigned:table:AttachmentCount') }} ({{
|
||||
currentRow.AttachmentCount }})</span>
|
||||
<span v-if="!currentIsConfirm" style="position: fixed; right: 75px; top: 14px">
|
||||
<span style="color: red; margin-right: 10px">
|
||||
<!-- 请仔细阅读文件,并签名确认 -->
|
||||
{{ $t('common:message:signTip') }}
|
||||
|
@ -106,51 +68,30 @@
|
|||
}}</span>
|
||||
</span>
|
||||
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="timer !== null || duration === 0"
|
||||
:loading="btnLoading"
|
||||
@click="handleConfirm"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="timer !== null || duration === 0" :loading="btnLoading"
|
||||
@click="handleConfirm">
|
||||
{{ $t('common:button:sign') }}
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
<div
|
||||
class="base-modal-body"
|
||||
style="border: 2px solid #ccc; padding: 10px"
|
||||
>
|
||||
<PreviewFile
|
||||
v-if="previewVisible"
|
||||
:file-path="currentPath"
|
||||
:file-type="currentType"
|
||||
@getList="getList"
|
||||
/>
|
||||
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
|
||||
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 签名弹框 -->
|
||||
<el-dialog
|
||||
v-if="signVisible"
|
||||
:visible.sync="signVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="600px"
|
||||
append-to-body
|
||||
>
|
||||
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
|
||||
append-to-body>
|
||||
<div slot="title">
|
||||
<span style="font-size: 18px">{{ $t('common:dialogTitle:sign') }}</span>
|
||||
<span style="font-size: 12px; margin-left: 5px">{{
|
||||
`(${$t('common:label:sign')}${currentUser})`
|
||||
}}</span>
|
||||
</div>
|
||||
<SignForm
|
||||
:is-system-doc="currentRow.IsSystemDoc"
|
||||
:document-id="currentRow.Id"
|
||||
:file-name="fileName"
|
||||
@closeDialog="closeSignDialog"
|
||||
/>
|
||||
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
|
||||
@closeDialog="closeSignDialog" />
|
||||
</el-dialog>
|
||||
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -162,6 +103,7 @@ import {
|
|||
import Pagination from '@/components/Pagination'
|
||||
import PreviewFile from '@/components/PreviewFile/index'
|
||||
import SignForm from '@/views/trials/trials-panel/attachments/self-attachment/components/SignForm'
|
||||
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
|
||||
import { mapGetters } from 'vuex'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
|
@ -173,7 +115,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'NeedSignSysDoc',
|
||||
components: { Pagination, PreviewFile, SignForm },
|
||||
components: { Pagination, PreviewFile, SignForm, attachmentPreview },
|
||||
props: {
|
||||
isSigned: {
|
||||
type: Boolean,
|
||||
|
@ -200,6 +142,8 @@ export default {
|
|||
currentIsConfirm: false,
|
||||
currentUser: zzSessionStorage.getItem('userName'),
|
||||
currentRow: {},
|
||||
SystemDocumentId: null,
|
||||
perview_visible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -214,6 +158,11 @@ export default {
|
|||
...mapGetters(['IsFirstSysDocNeedSign']),
|
||||
},
|
||||
methods: {
|
||||
openAttachment(row) {
|
||||
if (!row.AttachmentCount) return false
|
||||
this.SystemDocumentId = row.Id
|
||||
this.perview_visible = true
|
||||
},
|
||||
// 预览
|
||||
handlePreview(row) {
|
||||
this.currentRow = { ...row }
|
||||
|
@ -303,7 +252,7 @@ export default {
|
|||
.then(() => {
|
||||
this.previewVisible = false
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => { })
|
||||
} else {
|
||||
this.handleSign(res.Result)
|
||||
}
|
||||
|
|
|
@ -3,84 +3,56 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<!-- 待签署的系统文件 -->
|
||||
<h3>{{ !isSigned ? $t('trials:workbench:title:sysDocBeSigned') : $t('trials:workbench:title:sysDocSigned') }}</h3>
|
||||
<h3>{{ !isSigned ? $t('trials:workbench:title:sysDocBeSigned') : $t('trials:workbench:title:sysDocSigned') }}
|
||||
</h3>
|
||||
</el-col>
|
||||
<el-col :span="12" style="text-align:right;">
|
||||
<h3>
|
||||
<Pagination class="page" :total="total" :page.sync="listQuery.pageIndex" :limit.sync="listQuery.pageSize" layout="total, sizes, prev, pager, next" :background="false" style="display: inline-block;" @pagination="getList" />
|
||||
<el-button icon="el-icon-refresh-left" size="small" circle :title="$t('common:button:reset')" @click="handleReset" />
|
||||
<Pagination class="page" :total="total" :page.sync="listQuery.pageIndex" :limit.sync="listQuery.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :background="false" style="display: inline-block;"
|
||||
@pagination="getList" />
|
||||
<el-button icon="el-icon-refresh-left" size="small" circle :title="$t('common:button:reset')"
|
||||
@click="handleReset" />
|
||||
</h3>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- -->
|
||||
<el-table
|
||||
ref="needSignSysList"
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
:show-header="true"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
height="100"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort ="{prop: 'UpdateTime', order: 'descending'}"
|
||||
>
|
||||
<el-table ref="needSignSysList" v-loading="listLoading" :data="list" :show-header="true"
|
||||
v-adaptive="{ bottomOffset: 45 }" height="100" @sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'UpdateTime', order: 'descending' }">
|
||||
<el-table-column type="index" width="40" />
|
||||
<el-table-column
|
||||
:label="$t('trials:sysDocBeSigned:table:fileType')"
|
||||
prop="FileType"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('trials:sysDocBeSigned:table:fileName')"
|
||||
prop="Name"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('trials:sysDocBeSigned:table:uploadTime')"
|
||||
prop="CreateTime"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('trials:sysDocBeSigned:table:ConfirmTime')"
|
||||
prop="ConfirmTime"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
width="140"
|
||||
>
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:fileType')" prop="FileType" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:fileName')" prop="Name" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:AttachmentCount')" prop="AttachmentCount"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click.stop="openAttachment(scope.row)">{{ scope.row.AttachmentCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:uploadTime')" prop="CreateTime" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('trials:sysDocBeSigned:table:ConfirmTime')" prop="ConfirmTime" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="140">
|
||||
<template slot-scope="scope">
|
||||
<!-- 预览 -->
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
circle
|
||||
v-if="isSigned"
|
||||
:title="$t('trials:self-attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
icon="el-icon-edit-outline"
|
||||
circle
|
||||
v-if="!isSigned"
|
||||
:title="$t('trials:needSignedSysDoc:action:sign')"
|
||||
@click="handleSign(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" circle v-if="isSigned" :title="$t('trials:self-attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)" />
|
||||
<el-button icon="el-icon-edit-outline" circle v-if="!isSigned"
|
||||
:title="$t('trials:needSignedSysDoc:action:sign')" @click="handleSign(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 预览/签署文件 -->
|
||||
<el-dialog
|
||||
v-if="previewVisible"
|
||||
:visible.sync="previewVisible"
|
||||
:title="title"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="title" :fullscreen="true" append-to-body
|
||||
custom-class="base-dialog-wrapper">
|
||||
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;" @click.stop="openAttachment(currentRow)"
|
||||
v-if="currentRow.AttachmentCount">{{
|
||||
$t('trials:sysDocBeSigned:table:AttachmentCount') }} ({{
|
||||
currentRow.AttachmentCount }})</span>
|
||||
<span v-if="!currentIsConfirm" style="position: fixed;right: 75px;top: 14px;">
|
||||
<span style="color:red;margin-right:10px;">
|
||||
<!-- 请仔细阅读文件,并签名确认 -->
|
||||
|
@ -88,13 +60,8 @@
|
|||
<span v-show="duration < currentMinMinutes * 60">{{ `(${currentMinMinutes * 60 - duration}s)` }}</span>
|
||||
</span>
|
||||
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="timer !== null || duration === 0"
|
||||
:loading="btnLoading"
|
||||
@click="handleConfirm"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="timer !== null || duration === 0" :loading="btnLoading"
|
||||
@click="handleConfirm">
|
||||
{{ $t('common:button:sign') }}
|
||||
</el-button>
|
||||
</span>
|
||||
|
@ -105,19 +72,16 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 签名弹框 -->
|
||||
<el-dialog
|
||||
v-if="signVisible"
|
||||
:visible.sync="signVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="600px"
|
||||
append-to-body
|
||||
>
|
||||
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
|
||||
append-to-body>
|
||||
<div slot="title">
|
||||
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
|
||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
|
||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
|
||||
</div>
|
||||
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName" @closeDialog="closeSignDialog" />
|
||||
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
|
||||
@closeDialog="closeSignDialog" />
|
||||
</el-dialog>
|
||||
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -125,6 +89,7 @@ import { getWaitSignSysDocList, setSystemDocFirstViewTime } from '@/api/trials'
|
|||
import Pagination from '@/components/Pagination'
|
||||
import PreviewFile from '@/components/PreviewFile/index'
|
||||
import SignForm from '@/views/trials/trials-panel/attachments/self-attachment/components/SignForm'
|
||||
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
pageIndex: 1,
|
||||
|
@ -135,7 +100,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'NeedSignSysDoc',
|
||||
components: { Pagination, PreviewFile, SignForm },
|
||||
components: { Pagination, PreviewFile, SignForm, attachmentPreview },
|
||||
props: {
|
||||
isSigned: {
|
||||
type: Boolean,
|
||||
|
@ -159,7 +124,9 @@ export default {
|
|||
currentType: '',
|
||||
currentIsConfirm: false,
|
||||
currentUser: zzSessionStorage.getItem('userName'),
|
||||
currentRow: {}
|
||||
currentRow: {},
|
||||
perview_visible: false,
|
||||
SystemDocumentId: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -171,6 +138,11 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
openAttachment(row) {
|
||||
if (!row.AttachmentCount) return false
|
||||
this.SystemDocumentId = row.Id
|
||||
this.perview_visible = true
|
||||
},
|
||||
// 预览
|
||||
handlePreview(row) {
|
||||
this.currentRow = { ...row }
|
||||
|
@ -270,8 +242,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.needSignSys-wrapper{
|
||||
.needSignSys-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -370,7 +370,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: auto;flex:1;padding: 0 20px">
|
||||
<div style="width: auto;flex:1;padding: 0 20px;max-width: calc(100% - 250px);">
|
||||
<!-- 加急影像提交 -->
|
||||
<ImageSubmission v-if="selected === 'ImageSubmission'" :trial-id-list="trialIdList"
|
||||
:is-sign-system-doc="tabList.SysWaitSignDocCount > 0 && !isTestUser" />
|
||||
|
|
Loading…
Reference in New Issue