工作台改版

uat_us
熊飞 2024-03-11 18:15:09 +08:00
parent 195c176c34
commit 70adad29e4
4 changed files with 551 additions and 9 deletions

View File

@ -0,0 +1,240 @@
<template>
<div class="needSignSys-wrapper">
<el-row>
<el-col :span="12">
<!-- 待签署的系统文件 -->
<h3>{{ $t('trials:workbench:title:sysDocBeSigned') }}</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" />
</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"
>
<el-table-column type="index" width="40" />
<el-table-column
:label="$t('trials:sysDocBeSigned:table:fileType')"
prop="FileType"
show-overflow-tooltip
/>
<el-table-column
:label="$t('trials:sysDocBeSigned:table:fileName')"
prop="Name"
show-overflow-tooltip
/>
<el-table-column
:label="$t('trials:sysDocBeSigned:table:uploadTime')"
prop="UpdateTime"
show-overflow-tooltip
/>
<el-table-column
:label="$t('common:action:action')"
width="140"
>
<template slot-scope="scope">
<el-button
icon="el-icon-edit-outline"
circle
:title="$t('trials:workbench: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;">
<span style="color:red;margin-right:10px;">
<!-- 请仔细阅读文件并签名确认 -->
{{ $t('common:message:signTip') }}
<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"
>
{{ $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>
</el-dialog>
<!-- 签名弹框 -->
<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" />
</el-dialog>
</div>
</template>
<script>
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'
const searchDataDefault = () => {
return {
pageIndex: 1,
pageSize: 20,
asc: true,
sortField: ''
}
}
export default {
name: 'NeedSignSysDoc',
components: { Pagination, PreviewFile, SignForm },
data() {
return {
listQuery: searchDataDefault(),
listLoading: false,
list: [],
total: 0,
previewVisible: false,
signVisible: false,
currentMinMinutes: 0,
duration: 0,
timer: null,
btnLoading: false,
fileName: '',
currentPath: '',
currentType: '',
currentIsConfirm: false,
currentUser: zzSessionStorage.getItem('userName'),
currentRow: {}
}
},
mounted() {
this.getList()
},
destroyed() {
if (this.timer) {
this.stopTimer()
}
},
methods: {
getList() {
getWaitSignSysDocList(this.listQuery).then(res => {
this.listLoading = false
this.total = res.Result.TotalCount
this.list = res.Result.CurrentPageData
}).catch(() => { this.listLoading = false })
},
handleSign(row) {
this.currentRow = { ...row }
const { Name, FullFilePath, SignViewMinimumMinutes } = row
this.currentPath = FullFilePath
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
this.currentMinMinutes = SignViewMinimumMinutes
this.currentIsConfirm = false
this.title = Name
this.fileName = Name.slice(0, Name.lastIndexOf('.'))
this.listLoading = true
setSystemDocFirstViewTime(row.Id).then(res => {
this.listLoading = false
this.previewVisible = true
const _this = this
setTimeout(() => {
_this.initTimer()
}, 1000)
}).catch(() => {
this.listLoading = false
})
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.listQuery.asc = true
} else {
this.listQuery.asc = false
}
this.listQuery.sortField = column.prop
this.getList()
},
handleReset() {
this.listQuery = searchDataDefault()
this.getList()
this.$nextTick(() => {
this.$refs.needSignSysList.clearSort()
})
},
//
handleConfirm() {
this.signVisible = true
},
//
closeSignDialog(isSave) {
this.signVisible = false
if (isSave) {
this.currentIsConfirm = true
this.getList()
this.$emit('refreshStats')
}
},
// ,
initTimer() {
if (this.currentMinMinutes > 0 && !this.currentIsConfirm) {
this.duration = 0
if (this.timer) {
this.stopTimer()
}
this.startTimer()
}
},
//
startTimer() {
this.timer = setInterval(() => {
this.duration++
if (this.duration >= this.currentMinMinutes * 60) {
this.stopTimer()
}
}, 1000)
},
//
stopTimer() {
clearInterval(this.timer)
this.timer = null
}
}
}
</script>
<style lang="scss" scoped>
.needSignSys-wrapper{
height: 100%;
}
</style>

View File

@ -3,7 +3,7 @@
<el-row>
<el-col :span="12">
<!-- 待签署的系统文件 -->
<h3>{{ $t('trials:workbench:title:sysDocBeSigned') }}</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>
@ -43,9 +43,18 @@
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:workbench:action:sign')"
@click="handleSign(scope.row)"
/>
@ -117,6 +126,12 @@ const searchDataDefault = () => {
export default {
name: 'NeedSignSysDoc',
components: { Pagination, PreviewFile, SignForm },
props: {
isSigned: {
type: Boolean,
default() { return false }
}
},
data() {
return {
listQuery: searchDataDefault(),
@ -146,7 +161,19 @@ export default {
}
},
methods: {
//
handlePreview(row) {
this.currentRow = { ...row }
const { Name, FullFilePath, SignViewMinimumMinutes } = row
this.currentPath = FullFilePath
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
this.currentMinMinutes = SignViewMinimumMinutes
this.currentIsConfirm = true
this.title = Name
this.previewVisible = true
},
getList() {
this.listQuery.IsSigned = this.isSigned
getWaitSignSysDocList(this.listQuery).then(res => {
this.listLoading = false
this.total = res.Result.TotalCount

View File

@ -0,0 +1,267 @@
<template>
<div class="needSignSys-wrapper">
<el-row>
<el-col :span="12">
<!-- 待签署的系统文件 -->
<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" />
</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"
>
<el-table-column type="index" width="40" />
<el-table-column
:label="$t('trials:sysDocBeSigned:table:fileType')"
prop="FileType"
show-overflow-tooltip
/>
<el-table-column
:label="$t('trials:sysDocBeSigned:table:fileName')"
prop="Name"
show-overflow-tooltip
/>
<el-table-column
:label="$t('trials:sysDocBeSigned:table:uploadTime')"
prop="UpdateTime"
show-overflow-tooltip
/>
<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:workbench: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;">
<span style="color:red;margin-right:10px;">
<!-- 请仔细阅读文件并签名确认 -->
{{ $t('common:message:signTip') }}
<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"
>
{{ $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>
</el-dialog>
<!-- 签名弹框 -->
<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" />
</el-dialog>
</div>
</template>
<script>
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'
const searchDataDefault = () => {
return {
pageIndex: 1,
pageSize: 20,
asc: true,
sortField: ''
}
}
export default {
name: 'NeedSignSysDoc',
components: { Pagination, PreviewFile, SignForm },
props: {
isSigned: {
type: Boolean,
default() { return false }
}
},
data() {
return {
listQuery: searchDataDefault(),
listLoading: false,
list: [],
total: 0,
previewVisible: false,
signVisible: false,
currentMinMinutes: 0,
duration: 0,
timer: null,
btnLoading: false,
fileName: '',
currentPath: '',
currentType: '',
currentIsConfirm: false,
currentUser: zzSessionStorage.getItem('userName'),
currentRow: {}
}
},
mounted() {
this.getList()
},
destroyed() {
if (this.timer) {
this.stopTimer()
}
},
methods: {
//
handlePreview(row) {
this.currentRow = { ...row }
const { Name, FullFilePath, SignViewMinimumMinutes } = row
this.currentPath = FullFilePath
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
this.currentMinMinutes = SignViewMinimumMinutes
this.currentIsConfirm = true
this.title = Name
this.previewVisible = true
},
getList() {
this.listQuery.IsSigned = this.isSigned
getWaitSignSysDocList(this.listQuery).then(res => {
this.listLoading = false
this.total = res.Result.TotalCount
this.list = res.Result.CurrentPageData
}).catch(() => { this.listLoading = false })
},
handleSign(row) {
this.currentRow = { ...row }
const { Name, FullFilePath, SignViewMinimumMinutes } = row
this.currentPath = FullFilePath
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
this.currentMinMinutes = SignViewMinimumMinutes
this.currentIsConfirm = false
this.title = Name
this.fileName = Name.slice(0, Name.lastIndexOf('.'))
this.listLoading = true
setSystemDocFirstViewTime(row.Id).then(res => {
this.listLoading = false
this.previewVisible = true
const _this = this
setTimeout(() => {
_this.initTimer()
}, 1000)
}).catch(() => {
this.listLoading = false
})
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.listQuery.asc = true
} else {
this.listQuery.asc = false
}
this.listQuery.sortField = column.prop
this.getList()
},
handleReset() {
this.listQuery = searchDataDefault()
this.getList()
this.$nextTick(() => {
this.$refs.needSignSysList.clearSort()
})
},
//
handleConfirm() {
this.signVisible = true
},
//
closeSignDialog(isSave) {
this.signVisible = false
if (isSave) {
this.currentIsConfirm = true
this.getList()
this.$emit('refreshStats')
}
},
// ,
initTimer() {
if (this.currentMinMinutes > 0 && !this.currentIsConfirm) {
this.duration = 0
if (this.timer) {
this.stopTimer()
}
this.startTimer()
}
},
//
startTimer() {
this.timer = setInterval(() => {
this.duration++
if (this.duration >= this.currentMinMinutes * 60) {
this.stopTimer()
}
}, 1000)
},
//
stopTimer() {
clearInterval(this.timer)
this.timer = null
}
}
}
</script>
<style lang="scss" scoped>
.needSignSys-wrapper{
height: 100%;
}
</style>

View File

@ -76,7 +76,7 @@
<div class="user-status-item" @click="$router.push('/trials/trials-notice')">
<span class="el-icon-bell" style="margin-right: 0.5rem"></span>
<span style="margin-right: 0.5rem"></span>
<span>12</span>
<span>{{ tabList.SysNoticeUnReadCount }}</span>
</div>
</div>
</div>
@ -84,7 +84,7 @@
<div class="my_select_box" @click="$router.push('/trials/trials-list')">
<div class="my_select_box_content">
<span class="el-icon-box" style="padding: 4px;margin: 4px;color: #6698ff"></span>
<span>项目列表</span>
<span>我的项目</span>
</div>
</div>
<div class="thy-divider" style="border-top: 1px solid #eee;margin: 0;"></div>
@ -209,7 +209,7 @@
</div>
</div>
<!-- 系统签署文件 -->
<div class="my_select_box" :class="{selected: selected === 'NeedSignSysDoc'}" tab-data="NeedSignSysDoc" @click="selected = 'NeedSignSysDoc'" v-if="!hasPermi(['role:zys'])">
<div class="my_select_box" :class="{selected: selected === 'NeedSignSysDoc'}" tab-data="NeedSignSysDoc" @click="$nextTick(() => selected = 'NeedSignSysDoc')" v-if="!hasPermi(['role:zys'])">
<div class="my_select_box_content">
<span class="el-icon-data-line" style="padding: 4px;margin: 4px;color: #6698ff"></span>
<span>{{ $t('trials:workbench:title:sysDocBeSigned') }}<span style="margin:0 0.25rem">·</span>{{ tabList.SysWaitSignDocCount }}</span>
@ -220,17 +220,17 @@
<div class="my_select_title">我的</div>
<div class="my_select">
<!-- 项目已签署文件 -->
<div class="my_select_box" :class="{selected: selected === 'RereadApproval'}" tab-data="RereadApproval" @click="selected = 'RereadApproval'" v-if="!hasPermi(['role:zys'])">
<div class="my_select_box" :class="{selected: selected === 'NeedSignedTrialDoc'}" tab-data="NeedSignedTrialDoc" @click="selected = 'NeedSignedTrialDoc'" v-if="!hasPermi(['role:zys'])">
<div class="my_select_box_content">
<span class="el-icon-receiving" style="padding: 4px;margin: 4px;color: #6698ff"></span>
<span>{{ $t('trials:workbench:title:trialDocSigned') }}<span style="margin:0 0.25rem">·</span>{{ tabList.TrialWaitSignDocCount }}</span>
<span>{{ $t('trials:workbench:title:trialDocSigned') }}<span style="margin:0 0.25rem">·</span>{{ tabList.TrialSignedDocCount }}</span>
</div>
</div>
<!-- 系统已签署文件 -->
<div class="my_select_box" :class="{selected: selected === 'RereadApproval'}" tab-data="RereadApproval" @click="selected = 'RereadApproval'" v-if="!hasPermi(['role:zys'])">
<div class="my_select_box" :class="{selected: selected === 'NeedSignedSysDoc'}" tab-data="NeedSignedSysDoc" @click="$nextTick(() => selected = 'NeedSignedSysDoc')" v-if="!hasPermi(['role:zys'])">
<div class="my_select_box_content">
<span class="el-icon-data-line" style="padding: 4px;margin: 4px;color: #6698ff"></span>
<span>{{ $t('trials:workbench:title:sysDocSigned') }}<span style="margin:0 0.25rem">·</span>{{ tabList.SysWaitSignDocCount }}</span>
<span>{{ $t('trials:workbench:title:sysDocSigned') }}<span style="margin:0 0.25rem">·</span>{{ tabList.SysSignedDocCount }}</span>
</div>
</div>
</div>
@ -284,6 +284,10 @@
<NeedSignTrialDoc v-if="selected === 'NeedSignTrialDoc'" :is-sign-system-doc="isSignSystemDoc" />
<!-- 系统签署文件 -->
<NeedSignSysDoc v-if="selected === 'NeedSignSysDoc'" @refreshStats="refreshStats" />
<!-- 项目签署文件 -->
<NeedSignedTrialDoc v-if="selected === 'NeedSignedTrialDoc'" :is-sign-system-doc="isSignSystemDoc" />
<!-- 系统签署文件 -->
<NeedSignedSysDoc v-if="selected === 'NeedSignedSysDoc'" :is-signed="true" @refreshStats="refreshStats" />
</div>
<!-- <div v-show="false" style="height: 100%;position: relative">-->
<!-- <div style="font-weight:900;font-size: 20px;position: absolute;line-height: 60px;text-align: left;white-space: nowrap;padding-left: 20px" :style="{width: width + 'px'}">-->
@ -386,6 +390,7 @@ import PanelCount from './components/panelCount'
import NeedSignTrialDoc from './components/needSignTrialDoc'
import SiteResearch from './components/siteResearch'
import NeedSignSysDoc from './components/needSignSysDoc'
import NeedSignedSysDoc from './components/needSignedSysDoc'
import consistencyCheck from './components/consistencyCheck'
import clinicalData from './components/clinicalData'
import clinicalDataConfirm from './components/clinicalDataConfirm'
@ -403,6 +408,7 @@ import QcQuestion from './components/qcQuestion'
import ImagesToRead from './components/imagesToRead'
import MedicalFeedback from './components/medicalFeedback'
import MedicalAudit from './components/medicalAudit'
import NeedSignedTrialDoc from './components/NeedSignedTrialDoc'
import './index.css'
import {getUserTobeDoneRecord, getNeedSignTrialDocTrialIdList} from '@/api/trials'
@ -432,7 +438,9 @@ export default {
QcQuestion,
ImagesToRead,
MedicalFeedback,
MedicalAudit
MedicalAudit,
NeedSignedTrialDoc,
NeedSignedSysDoc
},
data() {
return {