工作台增加通用培训
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-04-11 15:17:05 +08:00
parent 58a590bbb7
commit 3ab9b48842
4 changed files with 303 additions and 352 deletions

View File

@ -1619,6 +1619,13 @@ export function getDocumentConfirmList(param) {
data: param data: param
}) })
} }
export function getSysDocumentConfirmList(param) {
return request({
url: `/TrialDocument/getSysDocumentConfirmList`,
method: 'post',
data: param
})
}
export function getTrialUserSelect(trialId) { export function getTrialUserSelect(trialId) {
return request({ return request({
url: `/TrialDocument/getTrialUserSelect/${trialId}`, url: `/TrialDocument/getTrialUserSelect/${trialId}`,
@ -1633,6 +1640,13 @@ export function getTrialDocAndSystemDocType(trialId) {
}) })
} }
export function getSysDocSignUserList() {
return request({
url: `/TrialDocument/getSysDocSignUserList`,
method: 'get'
})
}
export function updateSubjectStatus(param) { export function updateSubjectStatus(param) {
return request({ return request({
url: `/Subject/updateSubjectStatus`, url: `/Subject/updateSubjectStatus`,

View File

@ -1,80 +1,82 @@
<template> <template>
<BaseContainer> <BaseContainer>
<template slot="title-container">
<el-row v-if="isSystem" style="width: 100%;">
<el-col :span="12">
<h3>{{ TITLE }}</h3>
</el-col>
<el-col :span="12" style="text-align:right;">
<h3>
<Pagination class="page" :total="total" :page.sync="searchData.pageIndex" :limit.sync="searchData.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>
</template>
<template slot="search-container"> <template slot="search-container">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small">
<el-form-item :label="$t('dictionary:signature:search:FileTypeId')"> <el-form-item :label="$t('dictionary:signature:search:FileTypeId')">
<el-select v-model="searchData.FileTypeId" style="width: 150px"> <el-select v-model="searchData.FileTypeId" style="width: 150px" clearable>
<el-option <el-option v-for="item of dict.type.Sys_Document" :key="item.value" :label="item.label"
v-for="item of dict.type.Sys_Document" :value="item.value" />
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:signature:search:Name')"> <el-form-item :label="$t('dictionary:signature:search:Name')">
<el-input v-model="searchData.Name" style="width: 130px" clearable /> <el-input v-model="searchData.Name" style="width: 130px" clearable />
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:signature:table:NeedConfirmedUserTypes')">
<el-select v-model="searchData.UserTypeId" style="width: 150px" clearable>
<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:table:IsDeleted')">
<el-select v-model="searchData.IsDeleted" style="width: 150px" clearable>
<el-option v-for="item of $d.TrainingStatus" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('dictionary:signature:table:DocUserSignType')">
<el-select v-model="searchData.DocUserSignType" style="width: 150px" clearable>
<el-option v-for="item of $d.ReadingYesOrNo" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('dictionary:signature:table:createTime')">
<el-date-picker v-model="timeList" @change="changeTimeList" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']" type="datetimerange">
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }} {{ $t('common:button:search') }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button <el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }} {{ $t('common:button:reset') }}
</el-button> </el-button>
<el-button type="primary" size="small" @click="handleAdd">
{{ $t('common:button:new') }}
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button
type="primary"
style="margin-left: auto; margin-bottom: 10px"
size="small"
@click="handleAdd"
>
{{ $t('common:button:new') }}
</el-button>
</template> </template>
<template slot="main-container"> <template slot="main-container">
<el-table <el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
v-adaptive="{ bottomOffset: 60 }" @sort-change="handleSortByColumn">
v-loading="loading"
:data="list"
stripe
height="100"
@sort-change="handleSortByColumn"
>
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column prop="FileType" :label="$t('dictionary:signature:table:FileType')" show-overflow-tooltip
prop="FileType" sortable="custom" />
:label="$t('dictionary:signature:table:FileType')" <el-table-column prop="Name" :label="$t('dictionary:signature:table:Name')" show-overflow-tooltip
show-overflow-tooltip sortable="custom" />
sortable="custom"
/>
<el-table-column
prop="Name"
:label="$t('dictionary:signature:table:Name')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column <el-table-column prop="SignViewMinimumMinutes" :label="$t('dictionary:signature:table:SignViewMinimumMinutes')"
prop="SignViewMinimumMinutes" show-overflow-tooltip sortable="custom" min-width="110" />
:label="$t('dictionary:signature:table:SignViewMinimumMinutes')" <el-table-column prop="NeedConfirmedUserTypes" :label="$t('dictionary:signature:table:NeedConfirmedUserTypes')"
show-overflow-tooltip show-overflow-tooltip>
sortable="custom"
min-width="110"
/>
<el-table-column
prop="NeedConfirmedUserTypes"
:label="$t('dictionary:signature:table:NeedConfirmedUserTypes')"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.NeedConfirmedUserTypes scope.row.NeedConfirmedUserTypes
@ -83,12 +85,8 @@
}} }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="IsDeleted" :label="$t('dictionary:signature:table:IsDeleted')" show-overflow-tooltip
prop="IsDeleted" sortable="custom">
:label="$t('dictionary:signature:table:IsDeleted')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ <el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('TrainingStatus', scope.row.IsDeleted) $fd('TrainingStatus', scope.row.IsDeleted)
@ -98,23 +96,14 @@
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="DocUserSignType" :label="$t('dictionary:signature:table:DocUserSignType')"
prop="DocUserSignType" show-overflow-tooltip sortable="custom" min-width="90">
:label="$t('dictionary:signature:table:DocUserSignType')"
show-overflow-tooltip
sortable="custom"
min-width="90"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ReadingYesOrNo', Number(scope.row.DocUserSignType)) }} {{ $fd('ReadingYesOrNo', Number(scope.row.DocUserSignType)) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="CreateTime" :label="$t('dictionary:signature:table:CreateTime')" show-overflow-tooltip
prop="CreateTime" sortable="custom" />
:label="$t('dictionary:signature:table:CreateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column :label="$t('common:action:action')" min-width="120"> <el-table-column :label="$t('common:action:action')" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -124,11 +113,7 @@
<el-button type="text" @click="handleEdit(scope.row)"> <el-button type="text" @click="handleEdit(scope.row)">
{{ $t('common:button:edit') }} {{ $t('common:button:edit') }}
</el-button> </el-button>
<el-button <el-button :disabled="scope.row.IsDeleted" type="text" @click="handleRepeal(scope.row)">
:disabled="scope.row.IsDeleted"
type="text"
@click="handleRepeal(scope.row)"
>
{{ $t('common:button:revoke') }} {{ $t('common:button:revoke') }}
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)"> <el-button type="text" @click="handleDelete(scope.row)">
@ -138,48 +123,20 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
class="page" @pagination="getList" v-if="!isSystem" />
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<!-- 新增/编辑 --> <!-- 新增/编辑 -->
<el-dialog <el-dialog v-if="editVisible" :visible.sync="editVisible" :close-on-click-modal="false" :title="title"
v-if="editVisible" width="600px" custom-class="base-dialog-wrapper">
:visible.sync="editVisible" <TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
:close-on-click-modal="false"
:title="title"
width="600px"
custom-class="base-dialog-wrapper"
>
<TemplateForm
:data="currentRow"
@closeDialog="closeDialog"
@getList="getList"
/>
</el-dialog> </el-dialog>
<!-- 预览文件 --> <!-- 预览文件 -->
<el-dialog <el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('common:button:preview')"
v-if="previewVisible" :fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
:visible.sync="previewVisible" <div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
:title="$t('common:button:preview')" <PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
:fullscreen="true"
append-to-body
custom-class="base-dialog-wrapper"
>
<div
class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<PreviewFile
v-if="previewVisible"
:file-path="currentPath"
:file-type="currentType"
/>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -187,7 +144,7 @@
</template> </template>
<script> <script>
import { getSystemDocumentList, deleteSystemDocument } from '@/api/dictionary' import { getSystemDocumentList, deleteSystemDocument } from '@/api/dictionary'
import { userAbandonDoc } from '@/api/trials' import { userAbandonDoc, getTrialUserTypeList } from '@/api/trials'
import BaseContainer from '@/components/BaseContainer' import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import TemplateForm from './TemplateForm' import TemplateForm from './TemplateForm'
@ -195,6 +152,11 @@ import PreviewFile from '@/components/PreviewFile/index'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
FileTypeId: '', FileTypeId: '',
BeginCreateTime: null,
EndCreateTime: null,
IsDeleted: null,
DocUserSignType: null,
UserTypeId: null,
Name: '', Name: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
@ -204,6 +166,16 @@ export default {
name: 'SignatureTemplate', name: 'SignatureTemplate',
components: { BaseContainer, Pagination, TemplateForm, PreviewFile }, components: { BaseContainer, Pagination, TemplateForm, PreviewFile },
dicts: ['Sys_Document'], dicts: ['Sys_Document'],
props: {
isSystem: {
type: Boolean,
default: false
},
TITLE: {
type: String,
default: ''
}
},
data() { data() {
return { return {
searchData: searchDataDefault(), searchData: searchDataDefault(),
@ -216,12 +188,34 @@ export default {
previewVisible: false, previewVisible: false,
title: '', title: '',
loading: false, loading: false,
userTypeOptions: [],
timeList: []
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.getUserType()
}, },
methods: { methods: {
changeTimeList() {
if (this.timeList) {
this.searchData.BeginCreateTime = this.timeList[0]
this.searchData.EndCreateTime = this.timeList[1]
} else {
this.searchData.BeginCreateTime = null
this.searchData.EndCreateTime = null
}
},
//
getUserType() {
getTrialUserTypeList()
.then((res) => {
this.userTypeOptions = res.Result
})
.catch(() => {
this.loading = false
})
},
// //
getList() { getList() {
this.loading = true this.loading = true
@ -287,7 +281,7 @@ export default {
this.loading = false this.loading = false
}) })
}) })
.catch(() => {}) .catch(() => { })
}, },
// //
handleDelete(row) { handleDelete(row) {

View File

@ -4,158 +4,107 @@
<div class="title" v-if="isDoc"> <div class="title" v-if="isDoc">
{{ TITLE }} {{ TITLE }}
</div> </div>
<el-row v-if="isSystem" style="width: 100%;">
<el-col :span="12">
<h3>{{ TITLE }}</h3>
</el-col>
<el-col :span="12" style="text-align:right;">
<h3>
<Pagination class="page" :total="total" :page.sync="searchData.pageIndex" :limit.sync="searchData.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>
</template> </template>
<!-- 搜索框 --> <!-- 搜索框 -->
<template slot="search-container"> <template slot="search-container">
<el-form :inline="true"> <el-form :inline="true">
<!-- 文件类型 --> <!-- 文件类型 -->
<el-form-item :label="$t('trials:signRecords:table:fileType')"> <el-form-item :label="$t('trials:signRecords:table:fileType')">
<el-select <el-select v-model="searchData.FileTypeId" clearable style="width: 150px">
v-model="searchData.FileTypeId" <template v-if="isSystem">
clearable <el-option v-for="item of typeOptions" :key="item.id" :label="item.label" :value="item.id" />
style="width: 150px" </template>
> <template v-else>
<el-option <el-option v-for="item of typeOptions" :key="item.FileTypeId" :label="item.FileType"
v-for="item of typeOptions" :value="item.FileTypeId" />
:key="item.FileTypeId" </template>
:label="item.FileType"
:value="item.FileTypeId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 文件名称 --> <!-- 文件名称 -->
<el-form-item :label="$t('trials:signRecords:table:fileName')"> <el-form-item :label="$t('trials:signRecords:table:fileName')">
<el-input v-model="searchData.Name" style="width: 120px" /> <el-input v-model="searchData.Name" clearable style="width: 120px" />
</el-form-item> </el-form-item>
<!-- 签署人 --> <!-- 签署人 -->
<el-form-item <el-form-item :label="$t('trials:signRecords:table:user')" v-if="!isDoc">
:label="$t('trials:signRecords:table:user')" <el-select v-model="searchData.UserId" clearable filterable style="width: 140px">
v-if="!isDoc" <el-option v-for="item of userOptions" :key="item.UserId" :label="item.RealName" :value="item.UserId">
> <span style="float: left">{{ item.RealName || item.FullName }}</span>
<el-select <span style="
v-model="searchData.UserId"
clearable
filterable
style="width: 140px"
>
<el-option
v-for="item of userOptions"
:key="item.UserId"
:label="item.RealName"
:value="item.UserId"
>
<span style="float: left">{{ item.RealName }}</span>
<span
style="
float: right; float: right;
color: #8492a6; color: #8492a6;
font-size: 13px; font-size: 13px;
margin-left: 5px; margin-left: 5px;
" ">
>
{{ item.UserName }} {{ item.UserName }}
</span> </span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 用户名 -->
<el-form-item :label="$t('trials:signRecords:table:userName')" v-if="isSystem">
<el-input v-model="searchData.userName" clearable style="width: 120px" />
</el-form-item>
<!-- 用户类型 --> <!-- 用户类型 -->
<el-form-item <el-form-item :label="$t('trials:signRecords:table:userType')" v-if="!isDoc">
:label="$t('trials:signRecords:table:userType')" <el-select v-model="searchData.UserTypeId" clearable filterable style="width: 120px">
v-if="!isDoc" <el-option v-for="item of userTypeOptions" v-show="item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27"
> :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
<el-select
v-model="searchData.UserTypeId"
clearable
filterable
style="width: 120px"
>
<el-option
v-for="item of userTypeOptions"
v-show="item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27"
:key="item.Id"
:label="item.UserTypeShortName"
:value="item.Id"
>
<span>{{ item.UserType }}</span> <span>{{ item.UserType }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('trials:signRecords:table:isSign')" v-if="!isDoc || !viewStatus">
:label="$t('trials:signRecords:table:isSign')" <el-select v-model="searchData.IsConfirmed" clearable style="width: 120px">
v-if="!isDoc || !viewStatus" <el-option v-for="i of $d.TrainingStatusEnum" :key="'IsConfirmed' + i.label" :value="i.value"
> :label="i.label" />
<el-select
v-model="searchData.IsConfirmed"
clearable
style="width: 120px"
>
<el-option
v-for="i of $d.TrainingStatusEnum"
:key="'IsConfirmed' + i.label"
:value="i.value"
:label="i.label"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="isDoc
:label=" ? $t('trials:signRecords:table:isDeletedFile')
isDoc : $t('trials:signRecords:table:isDeleted')
? $t('trials:signRecords:table:isDeletedFile') ">
: $t('trials:signRecords:table:isDeleted') <el-select v-model="searchData.IsDeleted" clearable style="width: 120px">
" <el-option v-for="i of $d.TrainingStatus" :key="'IsDeleted' + i.label" :value="i.value" :label="i.label" />
>
<el-select
v-model="searchData.IsDeleted"
clearable
style="width: 120px"
>
<el-option
v-for="i of $d.TrainingStatus"
:key="'IsDeleted' + i.label"
:value="i.value"
:label="i.label"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('trials:signRecords:table:username')" v-if="isDoc">
:label="$t('trials:signRecords:table:username')"
v-if="isDoc"
>
<el-input v-model="searchData.UserName" style="width: 120px" /> <el-input v-model="searchData.UserName" style="width: 120px" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('trials:signRecords:table:confirmTime')" v-if="isDoc || isSystem">
:label="$t('trials:signRecords:table:confirmTime')" <el-date-picker v-model="timeList" @change="changeTimeList" value-format="yyyy-MM-dd HH:mm:ss"
v-if="isDoc" :default-time="['00:00:00', '23:59:59']" type="datetimerange">
>
<el-date-picker
v-model="timeList"
@change="changeTimeList"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
type="datetimerange"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('trials:signRecords:table:uploadTime')" v-if="isSystem">
<el-date-picker v-model="timeListC" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" :default-time="['00:00:00', '23:59:59']" @change="changeTimeListC" />
</el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button icon="el-icon-search" type="primary" @click="handleSearch"> <el-button icon="el-icon-search" type="primary" @click="handleSearch">
{{ $t('common:button:search') }} {{ $t('common:button:search') }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button <el-button icon="el-icon-refresh-left" type="primary" @click="handleReset">
icon="el-icon-refresh-left"
type="primary"
@click="handleReset"
>
{{ $t('common:button:reset') }} {{ $t('common:button:reset') }}
</el-button> </el-button>
<!-- 导出 --> <!-- 导出 -->
<el-button <el-button type="primary" icon="el-icon-download" :loading="exportLoading" @click="handleExport"
type="primary" v-if="!isSystem || !hasPermi(['role:ea'])">
icon="el-icon-download"
:loading="exportLoading"
@click="handleExport"
>
{{ $t('common:button:export') }} {{ $t('common:button:export') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -164,39 +113,18 @@
<template slot="main-container"> <template slot="main-container">
<!-- 系统文件列表 --> <!-- 系统文件列表 -->
<el-table <el-table ref="AttachmentsManagement" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe
ref="AttachmentsManagement" height="100" @sort-change="handleSortByColumn">
v-loading="loading"
v-adaptive="{ bottomOffset: 60 }"
:data="list"
stripe
height="100"
@sort-change="handleSortByColumn"
>
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<!-- 文件类型 --> <!-- 文件类型 -->
<el-table-column <el-table-column prop="FileType" :label="$t('trials:signRecords:table:fileType')" show-overflow-tooltip
prop="FileType" sortable="custom" width="160" />
:label="$t('trials:signRecords:table:fileType')"
show-overflow-tooltip
sortable="custom"
width="160"
/>
<!-- 文件名称 --> <!-- 文件名称 -->
<el-table-column <el-table-column prop="Name" :label="$t('trials:signRecords:table:fileName')" show-overflow-tooltip
prop="Name" sortable="custom" />
:label="$t('trials:signRecords:table:fileName')"
show-overflow-tooltip
sortable="custom"
/>
<!-- 文件级别 --> <!-- 文件级别 -->
<el-table-column <el-table-column prop="IsSystemDoc" :label="$t('trials:signRecords:table:fileLevel')" show-overflow-tooltip
prop="IsSystemDoc" width="160" sortable="custom" v-if="!isSystem">
:label="$t('trials:signRecords:table:fileLevel')"
show-overflow-tooltip
width="160"
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsSystemDoc" type="primary">{{ <el-tag v-if="scope.row.IsSystemDoc" type="primary">{{
$fd('IsSystemDoc', scope.row.IsSystemDoc) $fd('IsSystemDoc', scope.row.IsSystemDoc)
@ -207,16 +135,10 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 是否废除 --> <!-- 是否废除 -->
<el-table-column <el-table-column prop="IsDeleted" :label="isDoc
prop="IsDeleted" ? $t('trials:signRecords:table:isDeletedFile')
:label=" : $t('trials:signRecords:table:isDeleted')
isDoc " show-overflow-tooltip sortable="custom">
? $t('trials:signRecords:table:isDeletedFile')
: $t('trials:signRecords:table:isDeleted')
"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ <el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('TrainingStatus', scope.row.IsDeleted) $fd('TrainingStatus', scope.row.IsDeleted)
@ -227,20 +149,11 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 上传时间 --> <!-- 上传时间 -->
<el-table-column <el-table-column prop="CreateTime" :label="$t('trials:signRecords:table:uploadTime')" show-overflow-tooltip
prop="CreateTime" width="160" sortable="custom" />
:label="$t('trials:signRecords:table:uploadTime')"
show-overflow-tooltip
width="160"
sortable="custom"
/>
<!-- 是否签署 --> <!-- 是否签署 -->
<el-table-column <el-table-column prop="ConfirmTime" :label="$t('trials:signRecords:table:isSign')" show-overflow-tooltip
prop="ConfirmTime" sortable="custom">
:label="$t('trials:signRecords:table:isSign')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsConfirmed" type="primary">{{ <el-tag v-if="scope.row.IsConfirmed" type="primary">{{
$fd('TrainingStatusEnum', scope.row.IsConfirmed) $fd('TrainingStatusEnum', scope.row.IsConfirmed)
@ -251,84 +164,45 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 签署人 --> <!-- 签署人 -->
<el-table-column <el-table-column prop="RealName" :label="$t('trials:signRecords:table:user')" show-overflow-tooltip
prop="RealName" sortable="custom" v-if="!isDoc || !viewStatus" />
:label="$t('trials:signRecords:table:user')"
show-overflow-tooltip
sortable="custom"
v-if="!isDoc || !viewStatus"
/>
<!-- 用户名 --> <!-- 用户名 -->
<el-table-column <el-table-column prop="UserName" :label="$t('trials:signRecords:table:userName')" show-overflow-tooltip
prop="UserName" sortable="custom" />
:label="$t('trials:signRecords:table:userName')"
show-overflow-tooltip
sortable="custom"
/>
<!-- 用户类型 --> <!-- 用户类型 -->
<el-table-column <el-table-column prop="UserConfirmedUserTypeList" :label="$t('trials:signRecords:table:userType')"
prop="UserConfirmedUserTypeList" show-overflow-tooltip>
:label="$t('trials:signRecords:table:userType')"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
Array.isArray(scope.row.UserConfirmedUserTypeList) && Array.isArray(scope.row.UserConfirmedUserTypeList) &&
scope.row.UserConfirmedUserTypeList.length > 0 scope.row.UserConfirmedUserTypeList.length > 0
? scope.row.UserConfirmedUserTypeList.join(', ') ? scope.row.UserConfirmedUserTypeList.join(', ')
: '' : ''
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 签署时间 --> <!-- 签署时间 -->
<el-table-column <el-table-column prop="ConfirmTime" :label="$t('trials:signRecords:table:confirmTime')" show-overflow-tooltip
prop="ConfirmTime" sortable="custom" />
:label="$t('trials:signRecords:table:confirmTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column :label="$t('common:action:action')"> <el-table-column :label="$t('common:action:action')">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 预览 --> <!-- 预览 -->
<el-button <el-button circle :title="$t('trials:signRecords:action:preview')" icon="el-icon-view"
circle @click="handlePreview(scope.row)" />
:title="$t('trials:signRecords:action:preview')"
icon="el-icon-view"
@click="handlePreview(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
class="page" @pagination="getList" v-if="!isSystem" />
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</template> </template>
<!-- 预览文件 --> <!-- 预览文件 -->
<el-dialog <el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('trials:signRecords:action:preview')"
v-if="previewVisible" :fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
:visible.sync="previewVisible" <div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
:title="$t('trials:signRecords:action:preview')" <PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" />
:fullscreen="true"
append-to-body
custom-class="base-dialog-wrapper"
>
<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> </div>
</el-dialog> </el-dialog>
</BaseContainer> </BaseContainer>
@ -339,6 +213,8 @@ import {
getTrialUserSelect, getTrialUserSelect,
getTrialUserTypeList, getTrialUserTypeList,
getTrialDocAndSystemDocType, getTrialDocAndSystemDocType,
getSysDocumentConfirmList,
getSysDocSignUserList
} from '@/api/trials' } from '@/api/trials'
import { pMTrainingRecordList_Export } from '@/api/export' import { pMTrainingRecordList_Export } from '@/api/export'
import BaseContainer from '@/components/BaseContainer' import BaseContainer from '@/components/BaseContainer'
@ -349,6 +225,9 @@ const searchDataDefault = () => {
UserName: null, UserName: null,
StartConfirmTime: null, StartConfirmTime: null,
EndConfirmTime: null, EndConfirmTime: null,
EndCreateTime: null,
BeginCreateTime: null,
userName: null,
FileTypeId: '', FileTypeId: '',
Name: '', Name: '',
UserId: '', UserId: '',
@ -375,6 +254,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
isSystem: {
type: Boolean,
default: false,
}
}, },
data() { data() {
return { return {
@ -393,6 +276,7 @@ export default {
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
exportLoading: false, exportLoading: false,
timeList: [], timeList: [],
timeListC: []
} }
}, },
mounted() { mounted() {
@ -410,6 +294,15 @@ export default {
this.searchData.EndConfirmTime = null this.searchData.EndConfirmTime = null
} }
}, },
changeTimeListC() {
if (this.timeListC) {
this.searchData.BeginCreateTime = this.timeListC[0]
this.searchData.EndCreateTime = this.timeListC[1]
} else {
this.searchData.BeginCreateTime = null
this.searchData.EndCreateTime = null
}
},
handleExport() { handleExport() {
this.exportLoading = true this.exportLoading = true
pMTrainingRecordList_Export(this.searchData) pMTrainingRecordList_Export(this.searchData)
@ -432,29 +325,52 @@ export default {
this.searchData.UserTypeId = IR.Id this.searchData.UserTypeId = IR.Id
} }
} }
this.searchData.TrialId = this.trialId if (this.isSystem) {
getDocumentConfirmList(this.searchData) getSysDocumentConfirmList(this.searchData)
.then(async (res) => { .then(async (res) => {
this.loading = false this.loading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
console.log(this.total) })
}) .catch(() => {
.catch(() => { this.loading = false
this.loading = false })
}) } else {
this.searchData.TrialId = this.trialId
getDocumentConfirmList(this.searchData)
.then(async (res) => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false
})
}
}, },
// //
getTypeOptions() { getTypeOptions() {
getTrialDocAndSystemDocType(this.trialId).then((res) => { if (this.isSystem) {
this.typeOptions = res.Result this.typeOptions = this.$d.Sys_Document
}) } else {
getTrialDocAndSystemDocType(this.trialId).then((res) => {
this.typeOptions = res.Result
})
}
}, },
// //
getUserSelect() { getUserSelect() {
getTrialUserSelect(this.trialId).then((res) => { if (this.isSystem) {
this.userOptions = res.Result getSysDocSignUserList().then((res) => {
}) this.userOptions = res.Result
})
} else {
getTrialUserSelect(this.trialId).then((res) => {
this.userOptions = res.Result
})
}
}, },
// //
getUserType() { getUserType() {
@ -481,6 +397,7 @@ export default {
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault()
this.timeList = [] this.timeList = []
this.timeListC = []
this.getList() this.getList()
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.AttachmentsManagement.clearSort() this.$refs.AttachmentsManagement.clearSort()

View File

@ -1,3 +1,29 @@
<template> <template>
<div>viewGeneralTraining</div> <div class="generalTraining">
</template> <SignatureTemplate v-if="isManage" ref="SignatureTemplate" :TITLE="$t('trials:tab:updateGeneralTraining')"
:isSystem="true" />
<AttachmentsManagement v-else ref="AttachmentsManagement" :TITLE="$t('trials:tab:viewGeneralTraining')"
:isSystem="true" />
</div>
</template>
<script>
import SignatureTemplate from '@/views/dictionary/attachment/components/SignatureTemplate'
import AttachmentsManagement from '@/views/trials/trials-panel/attachments/attachment-management'
export default {
name: "generalTraining",
props: {
isManage: {
type: Boolean,
default: false
}
},
components: { SignatureTemplate, AttachmentsManagement },
}
</script>
<style lang="scss" scoped>
::v-deep .box-body .search {
flex-wrap: wrap;
padding: 0;
// align-items: center;
}
</style>