Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
2fd6e1893b
|
@ -1249,3 +1249,19 @@ export function getTrialDoctorList(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 项目文档-上传同意入项记录
|
||||||
|
export function uploadTrialFileTypeFile(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFileType/uploadTrialFileTypeFile`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-获取上传同意入项记录
|
||||||
|
export function getTrialFileTypeFile(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFileType/getTrialFileTypeFile`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -110,4 +110,12 @@ export function addOrUpdateTrialBodyPart(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 修改检查名称列表
|
||||||
|
export function updateTrialStudyNameList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/updateTrialStudyNameList`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -425,6 +425,8 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.viewStatus) {
|
if (this.viewStatus) {
|
||||||
this.searchData.IsConfirmed = true
|
this.searchData.IsConfirmed = true
|
||||||
|
}
|
||||||
|
if (this.isDoc) {
|
||||||
let IR = this.userTypeOptions.find((item) => item.UserTypeEnum == 13)
|
let IR = this.userTypeOptions.find((item) => item.UserTypeEnum == 13)
|
||||||
if (IR) {
|
if (IR) {
|
||||||
this.searchData.UserTypeId = IR.Id
|
this.searchData.UserTypeId = IR.Id
|
||||||
|
|
|
@ -912,10 +912,19 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="dialog-footer">
|
<template slot="dialog-footer">
|
||||||
<el-button type="primary" @click="addOrUpdateTrialStudyName">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="addOrUpdateTrialStudyName"
|
||||||
|
:loading="studyNameLoading"
|
||||||
|
>
|
||||||
{{ $t('common:button:confirm') }}
|
{{ $t('common:button:confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="addStudyName_model.visible = false">
|
<el-button
|
||||||
|
@click="
|
||||||
|
;(addStudyName_model.visible = false),
|
||||||
|
(addStudyNameForm.Name = null)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ $t('common:button:cancel') }}
|
{{ $t('common:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -933,6 +942,7 @@ import {
|
||||||
ConfigTrialBasicInfoConfirm,
|
ConfigTrialBasicInfoConfirm,
|
||||||
getTrialBodyPartList,
|
getTrialBodyPartList,
|
||||||
addOrUpdateTrialBodyPart,
|
addOrUpdateTrialBodyPart,
|
||||||
|
updateTrialStudyNameList,
|
||||||
} from '@/api/trials/setting'
|
} from '@/api/trials/setting'
|
||||||
import SignForm from '@/views/trials/components/newSignForm'
|
import SignForm from '@/views/trials/components/newSignForm'
|
||||||
import ClinicalDataForm from './clinicalDataForm'
|
import ClinicalDataForm from './clinicalDataForm'
|
||||||
|
@ -1094,6 +1104,7 @@ export default {
|
||||||
width: '500px',
|
width: '500px',
|
||||||
appendToBody: true,
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
|
studyNameLoading: false,
|
||||||
addBodyPartForm: {
|
addBodyPartForm: {
|
||||||
bodyPartStr: null,
|
bodyPartStr: null,
|
||||||
Id: null,
|
Id: null,
|
||||||
|
@ -1328,13 +1339,51 @@ export default {
|
||||||
if (!validate) return
|
if (!validate) return
|
||||||
this.addStudyNameForm.EnName = this.addStudyNameForm.Name
|
this.addStudyNameForm.EnName = this.addStudyNameForm.Name
|
||||||
let data = { ...this.addStudyNameForm }
|
let data = { ...this.addStudyNameForm }
|
||||||
this.trialStudyNameList.push(data)
|
let arr = []
|
||||||
|
this.trialStudyNameList.forEach((item) => {
|
||||||
|
let obj = {
|
||||||
|
EnName: item.EnName,
|
||||||
|
Name: item.EnName,
|
||||||
|
IsChoose: false,
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
})
|
||||||
|
arr.push(data)
|
||||||
|
|
||||||
|
this.studyNameLoading = true
|
||||||
|
let res = await this.updateStudyNameList(arr)
|
||||||
|
this.studyNameLoading = false
|
||||||
|
if (!res)
|
||||||
|
return this.$message.warning(
|
||||||
|
this.$t('trials:seeting:message:addStudyNameFail')
|
||||||
|
)
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('trials:seeting:message:addStudyNameSucccess')
|
||||||
|
)
|
||||||
this.addStudyNameForm = {
|
this.addStudyNameForm = {
|
||||||
EnName: null,
|
EnName: null,
|
||||||
Name: null,
|
Name: null,
|
||||||
IsChoose: false,
|
IsChoose: false,
|
||||||
}
|
}
|
||||||
this.addStudyName_model.visible = false
|
this.addStudyName_model.visible = false
|
||||||
|
// this.getStudyNameList()
|
||||||
|
this.trialStudyNameList.push(data)
|
||||||
|
},
|
||||||
|
async updateStudyNameList(StudyNameList) {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
StudyNameList,
|
||||||
|
}
|
||||||
|
let res = await updateTrialStudyNameList(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 编辑检查部位
|
// 编辑检查部位
|
||||||
handleEditBodyPart(item) {
|
handleEditBodyPart(item) {
|
||||||
|
@ -1344,11 +1393,33 @@ export default {
|
||||||
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
|
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
|
||||||
this.addBodyPart_model.visible = true
|
this.addBodyPart_model.visible = true
|
||||||
},
|
},
|
||||||
handleDelStudyName(item) {
|
async handleDelStudyName(item) {
|
||||||
let index = this.trialStudyNameList.findIndex(
|
let index = this.trialStudyNameList.findIndex(
|
||||||
(data) => item.Name === data.Name
|
(data) => item.Name === data.Name
|
||||||
)
|
)
|
||||||
|
let arr = []
|
||||||
|
this.trialStudyNameList.forEach((item, i) => {
|
||||||
|
if (index !== i) {
|
||||||
|
let obj = {
|
||||||
|
EnName: item.EnName,
|
||||||
|
Name: item.EnName,
|
||||||
|
IsChoose: false,
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.listLoading = true
|
||||||
|
let res = await this.updateStudyNameList(arr)
|
||||||
|
this.listLoading = false
|
||||||
|
if (!res)
|
||||||
|
return this.$message.warning(
|
||||||
|
this.$t('trials:seeting:message:delStudyNameFail')
|
||||||
|
)
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('trials:seeting:message:delStudyNameSucccess')
|
||||||
|
)
|
||||||
this.trialStudyNameList.splice(index, 1)
|
this.trialStudyNameList.splice(index, 1)
|
||||||
|
// this.getStudyNameList()
|
||||||
},
|
},
|
||||||
handleSetBodyPart() {
|
handleSetBodyPart() {
|
||||||
this.bodyPartListVisible = true
|
this.bodyPartListVisible = true
|
||||||
|
@ -1835,7 +1906,9 @@ export default {
|
||||||
this.form.ClinicalDataSetNames.join(', ')
|
this.form.ClinicalDataSetNames.join(', ')
|
||||||
}
|
}
|
||||||
this.getClinicalDataList(true)
|
this.getClinicalDataList(true)
|
||||||
this.$message.success('删除成功!')
|
this.$message.success(
|
||||||
|
this.$t('common:message:deletedSuccessfully')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
|
@ -780,7 +780,6 @@ export default {
|
||||||
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
|
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
|
||||||
let types = typeArr[this.ArchiveTypeEnum]
|
let types = typeArr[this.ArchiveTypeEnum]
|
||||||
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
|
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
|
||||||
console.log(this.uploadPath, this.ArchiveTypeEnum)
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isEN() {
|
isEN() {
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
:label="$t('trials:trialDocument:trainRecord:form:TrianingCount')"
|
:label="$t('trials:trialDocument:trainRecord:form:TrianingCount')"
|
||||||
prop="TrianingCount"
|
prop="TrianingCount"
|
||||||
>
|
>
|
||||||
<el-input v-model.number="form.TrianingCount" type="number" />
|
<el-input v-model="form.TrianingCount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="!config.upload"
|
v-if="!config.upload"
|
||||||
|
@ -165,36 +165,6 @@ export default {
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
TrianingCount: [
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
min: 0,
|
|
||||||
message: this.$t(
|
|
||||||
'trials:trialDocument:trainRecord:ruleMessage:TrianingCountPattern'
|
|
||||||
),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (
|
|
||||||
value &&
|
|
||||||
(String(value).includes('.') ||
|
|
||||||
new RegExp(/\D/g).test(String(value)))
|
|
||||||
) {
|
|
||||||
callback(
|
|
||||||
new Error(
|
|
||||||
this.$t(
|
|
||||||
'trials:trialDocument:trainRecord:ruleMessage:TrianingCountPatternS'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
TrialFile: [],
|
TrialFile: [],
|
||||||
|
|
|
@ -0,0 +1,801 @@
|
||||||
|
<template>
|
||||||
|
<box-content>
|
||||||
|
<div class="title">
|
||||||
|
{{ TITLE }}
|
||||||
|
</div>
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<div class="search" style="position: relative">
|
||||||
|
<el-form :inline="true" class="base-search-form">
|
||||||
|
<!--文件类型-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:certificate:search:fileType')"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.IsAuthorizedView"
|
||||||
|
style="width: 100px"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in $d.CertificateFileType"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!--文件名称-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:certificate:search:name')"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="searchData.FileName"
|
||||||
|
style="width: 100px"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!--阅片人-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:certificate:search:viewer')"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.IsAuthorizedView"
|
||||||
|
style="width: 100px"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in $d.CertificateFileType"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="
|
||||||
|
$t('trials:trialDocument:certificate:search:isAuthorizedView')
|
||||||
|
"
|
||||||
|
v-if="isManage && !viewStatus"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-if="!viewStatus"
|
||||||
|
v-model="searchData.IsAuthorizedView"
|
||||||
|
style="width: 100px"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in $d.YesOrNo"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||||
|
{{ $t('common:button:search') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleReset"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:reset') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="isManage && !viewStatus">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="selectTable.length <= 0"
|
||||||
|
v-if="hasAccredit && isManage && !viewStatus"
|
||||||
|
@click.stop="auth"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:certificate:button:accredit') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="hasAdd && isManage && !viewStatus"
|
||||||
|
@click.stop="handleAdd"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:certificate:button:add') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="hasEdit && isManage && !viewStatus"
|
||||||
|
@click.stop="openFile(false)"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:certificate:button:uploadFile') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="hasEdit && isManage && !viewStatus"
|
||||||
|
@click.stop="openFile(true)"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:certificate:button:uploadFolder') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-bottom"
|
||||||
|
:disabled="selectTable.length <= 0"
|
||||||
|
v-if="hasDownLoad && isManage && !viewStatus"
|
||||||
|
@click.stop="downLoad"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:certificate:button:downLoadFile') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="selectTable.length <= 0"
|
||||||
|
v-if="hasDel && isManage && !viewStatus"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:certificate:button:del') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
v-adaptive="{ bottomOffset: 75 }"
|
||||||
|
:data="list"
|
||||||
|
stripe
|
||||||
|
height="100"
|
||||||
|
style="width: 100%"
|
||||||
|
@sort-change="handleSortByColumn"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
v-if="isManage && !viewStatus"
|
||||||
|
/>
|
||||||
|
<el-table-column type="index" v-else />
|
||||||
|
|
||||||
|
<!--文件类型-->
|
||||||
|
<el-table-column
|
||||||
|
prop="FileName"
|
||||||
|
:label="$t('trials:trialDocument:certificate:table:fileType')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--文件名称-->
|
||||||
|
<el-table-column
|
||||||
|
prop="HistoryFileRecord"
|
||||||
|
:label="$t('trials:trialDocument:certificate:table:FileName')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<!--阅片人-->
|
||||||
|
<el-table-column
|
||||||
|
prop="HistoryFileRecord"
|
||||||
|
:label="$t('trials:trialDocument:certificate:table:viewer')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="IsAuthorizedView"
|
||||||
|
:label="$t('trials:trialDocument:certificate:table:isAuthorizedView')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
v-if="isManage && !viewStatus"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
:disabled="!scope.row.TrianingDate"
|
||||||
|
v-if="isManage && !viewStatus && hasEdit"
|
||||||
|
v-model="scope.row.IsAuthorizedView"
|
||||||
|
@change="(val) => auth(false, scope.row, val)"
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
:active-text="$fd('YesOrNo', true)"
|
||||||
|
:inactive-text="$fd('YesOrNo', false)"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="UpdateTime"
|
||||||
|
:label="$t('trials:trialDocument:certificate:table:updateTime')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="CreateTime"
|
||||||
|
:label="$t('trials:trialDocument:certificate:table:createTime')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column :label="$t('common:action:action')" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-view"
|
||||||
|
:title="$t('common:button:view')"
|
||||||
|
circle
|
||||||
|
:disabled="
|
||||||
|
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||||
|
"
|
||||||
|
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
v-if="hasEdit && isManage && !viewStatus"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
|
:title="$t('common:button:edit')"
|
||||||
|
circle
|
||||||
|
@click.stop="handleEdit(scope.row)"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
v-if="hasDownLoad && isManage && !viewStatus"
|
||||||
|
icon="el-icon-download"
|
||||||
|
:title="
|
||||||
|
$t('trials:trialDocument:certificate:button:downLoadFileFileFile')
|
||||||
|
"
|
||||||
|
circle
|
||||||
|
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
v-if="hasDel && isManage && !viewStatus"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
:title="$t('trials:trialDocument:certificate:button:delete')"
|
||||||
|
circle
|
||||||
|
@click.stop="handleDel(scope.row)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
class="page"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="searchData.PageIndex"
|
||||||
|
:limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<upload-files
|
||||||
|
:config="config"
|
||||||
|
:faccept="faccept"
|
||||||
|
:uploadPath="uploadPath"
|
||||||
|
:limitLength="limitLength"
|
||||||
|
v-if="config.visible"
|
||||||
|
@close="close"
|
||||||
|
@uplaodFile="uplaodFile"
|
||||||
|
/>
|
||||||
|
<certificate-form
|
||||||
|
:ArchiveTypeEnum="ArchiveTypeEnum"
|
||||||
|
:rowData="rowData"
|
||||||
|
:config="update_config"
|
||||||
|
:data="selectData"
|
||||||
|
v-if="update_config.visible"
|
||||||
|
@close="updateClose"
|
||||||
|
@getList="getList"
|
||||||
|
/>
|
||||||
|
</box-content>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
addOrUpdateTrialFileType,
|
||||||
|
getTrialTrianingRecordList,
|
||||||
|
deleteTrialTrianingRecord,
|
||||||
|
authorizedTrialTrianingRecord,
|
||||||
|
addOrUpdateTrialTrianingRecord,
|
||||||
|
batchAddTrialTrianingRecord,
|
||||||
|
} from '@/api/dictionary'
|
||||||
|
import { downLoadFile } from '@/utils/stream.js'
|
||||||
|
import { deepClone } from '@/utils/index.js'
|
||||||
|
import Pagination from '@/components/Pagination'
|
||||||
|
import BoxContent from '@/components/BoxContent'
|
||||||
|
import uploadFiles from '../../uploadFiles.vue'
|
||||||
|
import certificateForm from './form.vue'
|
||||||
|
const searchDataDefault = () => {
|
||||||
|
return {
|
||||||
|
IsAuthorizedView: null,
|
||||||
|
FileName: null,
|
||||||
|
TrianingDateStartTime: null,
|
||||||
|
TrianingDateEndTime: null,
|
||||||
|
UpdateStartTime: null,
|
||||||
|
UpdateEndTime: null,
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
Asc: false,
|
||||||
|
SortField: 'TrianingDate',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'certificate',
|
||||||
|
components: { BoxContent, Pagination, uploadFiles, certificateForm },
|
||||||
|
props: {
|
||||||
|
viewStatus: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
ArchiveTypeEnum: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
Id: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
rowData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rowBtnStatus: 'edit', // edit 编辑 save 保存
|
||||||
|
rowBtnLoading: false,
|
||||||
|
searchData: searchDataDefault(),
|
||||||
|
loading: false,
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
selectTable: [],
|
||||||
|
config: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '800px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: false,
|
||||||
|
isFolder: false,
|
||||||
|
},
|
||||||
|
selectData: {},
|
||||||
|
uploadPath: null,
|
||||||
|
faccept: ['.pdf'],
|
||||||
|
limitLength: 0,
|
||||||
|
|
||||||
|
TrianingDate: [],
|
||||||
|
UpdateTime: [],
|
||||||
|
update_config: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '600px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: false,
|
||||||
|
status: 'add',
|
||||||
|
upload: null,
|
||||||
|
},
|
||||||
|
DATA: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 新增列表数据
|
||||||
|
async uplaodFile(list) {
|
||||||
|
console.log(list, 'list')
|
||||||
|
try {
|
||||||
|
if (!list || list.length <= 0) return false
|
||||||
|
let arr = []
|
||||||
|
list.forEach((item) => {
|
||||||
|
let obj = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
TrialFileTypeId: this.Id,
|
||||||
|
IsAuthorizedView: false,
|
||||||
|
TrialFileRecord: item,
|
||||||
|
HistoryFileRecord: null,
|
||||||
|
Note: null,
|
||||||
|
TrianingCount: null,
|
||||||
|
TrianingDate: null,
|
||||||
|
TrianingState: null,
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
})
|
||||||
|
this.loading = true
|
||||||
|
let res = await batchAddTrialTrianingRecord({
|
||||||
|
TrianingRecordList: arr,
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 上传单个文件
|
||||||
|
upload(row, key) {
|
||||||
|
this.selectData = deepClone(row)
|
||||||
|
this.update_config.title = `${this.$t(
|
||||||
|
'trials:trialDocument:certificate:form:title:upload'
|
||||||
|
)}
|
||||||
|
-
|
||||||
|
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
|
||||||
|
this.update_config.status = 'edit'
|
||||||
|
this.update_config.upload = key
|
||||||
|
this.update_config.visible = true
|
||||||
|
},
|
||||||
|
// 新增
|
||||||
|
handleAdd() {
|
||||||
|
this.selectData = {}
|
||||||
|
this.update_config.title = `${this.$t(
|
||||||
|
'trials:trialDocument:certificate:form:title:add'
|
||||||
|
)}
|
||||||
|
-
|
||||||
|
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
|
||||||
|
this.update_config.status = 'add'
|
||||||
|
this.update_config.upload = null
|
||||||
|
this.update_config.visible = true
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
handleEdit(row) {
|
||||||
|
this.selectData = deepClone(row)
|
||||||
|
this.update_config.title = `${this.$t(
|
||||||
|
'trials:trialDocument:certificate:form:title:edit'
|
||||||
|
)}
|
||||||
|
-
|
||||||
|
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
|
||||||
|
this.update_config.status = 'edit'
|
||||||
|
this.update_config.upload = null
|
||||||
|
this.update_config.visible = true
|
||||||
|
},
|
||||||
|
// 删除文件
|
||||||
|
async delFile(row, key) {
|
||||||
|
try {
|
||||||
|
let confirm = await this.$confirm(
|
||||||
|
this.$t('trials:trialDocument:certificate:message:deleteFile'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return false
|
||||||
|
let data = deepClone(row)
|
||||||
|
data[`${key}FileRecord`] = null
|
||||||
|
this.loading = true
|
||||||
|
let res = await addOrUpdateTrialTrianingRecord(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 下载
|
||||||
|
async downLoad(isArray = true, row, type = 'zip') {
|
||||||
|
try {
|
||||||
|
if (type === 'file') {
|
||||||
|
return await downLoadFile(
|
||||||
|
this.OSSclientConfig.basePath + row.FilePath,
|
||||||
|
row.FileName
|
||||||
|
)
|
||||||
|
}
|
||||||
|
let { files, name } = this.formatDownloadFile(isArray, row)
|
||||||
|
let res = await downLoadFile(files, name, type)
|
||||||
|
// if (res && this.downloadId) {
|
||||||
|
// this.downloadImageSuccess()
|
||||||
|
// }
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 格式化下载文件路径
|
||||||
|
formatDownloadFile(isArray = true, row) {
|
||||||
|
let files = [],
|
||||||
|
name = `${this.TITLE}_${new Date().getTime()}.zip`,
|
||||||
|
arr = ['Trial', 'History']
|
||||||
|
if (!isArray) {
|
||||||
|
name = `${row.Name}_${row.Version}_${new Date().getTime()}.zip`
|
||||||
|
arr.forEach((key) => {
|
||||||
|
if (row[`${key}FileRecord`] && row[`${key}FileRecord`].FilePath) {
|
||||||
|
let obj = {
|
||||||
|
name: `${row[`${key}FileRecord`].FileName.substring(
|
||||||
|
0,
|
||||||
|
row[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
)}__${row.Version}${row[`${key}FileRecord`].FileName.substring(
|
||||||
|
row[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
).toLocaleLowerCase()}`,
|
||||||
|
url:
|
||||||
|
this.OSSclientConfig.basePath +
|
||||||
|
row[`${key}FileRecord`].FilePath,
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.selectTable.forEach((item) => {
|
||||||
|
arr.forEach((key) => {
|
||||||
|
if (item[`${key}FileRecord`] && item[`${key}FileRecord`].FilePath) {
|
||||||
|
let obj = {
|
||||||
|
name: `${item.TrianingDate}_${item[
|
||||||
|
`${key}FileRecord`
|
||||||
|
].FileName.substring(
|
||||||
|
0,
|
||||||
|
item[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
)}__${new Date().getTime()}${item[
|
||||||
|
`${key}FileRecord`
|
||||||
|
].FileName.substring(
|
||||||
|
item[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
).toLocaleLowerCase()}`,
|
||||||
|
url:
|
||||||
|
this.OSSclientConfig.basePath +
|
||||||
|
item[`${key}FileRecord`].FilePath,
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return { files, name }
|
||||||
|
},
|
||||||
|
// 授权
|
||||||
|
async auth(isArray = true, row, IsAuthorizedView) {
|
||||||
|
try {
|
||||||
|
let data = {}
|
||||||
|
if (isArray) {
|
||||||
|
let flag = this.selectTable.some((item) => !item.TrianingDate)
|
||||||
|
if (flag)
|
||||||
|
return this.$message.warning(
|
||||||
|
this.$t(
|
||||||
|
'trials:trialDocument:certificate:message:hsaNoTrianingDate'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
data = {
|
||||||
|
Ids: this.selectTable.map((item) => item.Id),
|
||||||
|
IsAuthorizedView: true,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data = {
|
||||||
|
Ids: [row.Id],
|
||||||
|
IsAuthorizedView,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let res = await authorizedTrialTrianingRecord(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$t('trials:trialDocument:certificate:message:authSuccessfully')
|
||||||
|
if (isArray) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
if (!isArray) {
|
||||||
|
row.IsAuthorizedView = !row.IsAuthorizedView
|
||||||
|
}
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除列表数据
|
||||||
|
handleDel(row) {
|
||||||
|
this.$confirm(
|
||||||
|
this.$t('trials:trialDocument:certificate:message:deleteMessage'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
this.loading = true
|
||||||
|
deleteTrialTrianingRecord(row.Id)
|
||||||
|
.then((res) => {
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getList()
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('common:message:deletedSuccessfully')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getList() {
|
||||||
|
try {
|
||||||
|
if (!this.Id) return false
|
||||||
|
this.searchData.TrialFileTypeId = this.Id
|
||||||
|
this.searchData.TrialId = this.$route.query.trialId
|
||||||
|
if (this.viewStatus) {
|
||||||
|
this.searchData.IsAuthorizedView = true
|
||||||
|
}
|
||||||
|
if (this.TrianingDate && this.TrianingDate.length >= 2) {
|
||||||
|
this.searchData.TrianingDateStartTime = this.TrianingDate[0]
|
||||||
|
this.searchData.TrianingDateEndTime = this.TrianingDate[1]
|
||||||
|
} else {
|
||||||
|
this.searchData.TrianingDateStartTime = null
|
||||||
|
this.searchData.TrianingDateEndTime = null
|
||||||
|
}
|
||||||
|
if (this.UpdateTime && this.UpdateTime.length >= 2) {
|
||||||
|
this.searchData.UpdateStartTime = this.UpdateTime[0]
|
||||||
|
this.searchData.UpdateEndTime = this.UpdateTime[1]
|
||||||
|
} else {
|
||||||
|
this.searchData.UpdateStartTime = null
|
||||||
|
this.searchData.UpdateEndTime = null
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let res = await getTrialTrianingRecordList(this.searchData)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.list = res.Result.CurrentPageData
|
||||||
|
this.total = res.Result.TotalCount
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查询
|
||||||
|
handleSearch() {
|
||||||
|
this.searchData.PageIndex = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleReset() {
|
||||||
|
this.searchData = searchDataDefault()
|
||||||
|
this.TrianingDate = []
|
||||||
|
this.UpdateTime = []
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 排序
|
||||||
|
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()
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.selectTable = val
|
||||||
|
},
|
||||||
|
// 保存菜单数据
|
||||||
|
async saveRowData() {
|
||||||
|
try {
|
||||||
|
this.rowBtnLoading = true
|
||||||
|
let res = await addOrUpdateTrialFileType(this.DATA)
|
||||||
|
this.rowBtnLoading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.rowBtnStatus = 'edit'
|
||||||
|
this.$emit('getMenu')
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
this.rowBtnLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 预览
|
||||||
|
preview(row) {
|
||||||
|
if (!row.FilePath) return false
|
||||||
|
this.$preview({
|
||||||
|
path: row.FilePath || row.fullPath,
|
||||||
|
type: 'pdf',
|
||||||
|
title: row.FileName,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.config.visible = false
|
||||||
|
// this.selectData = {}
|
||||||
|
// this.selectKey = null
|
||||||
|
this.faccept = ['.pdf']
|
||||||
|
this.limitLength = 0
|
||||||
|
},
|
||||||
|
updateClose() {
|
||||||
|
this.update_config.visible = false
|
||||||
|
},
|
||||||
|
fileSizeFormatter(size) {
|
||||||
|
if (!size) return
|
||||||
|
return (size / Math.pow(1024, 2)).toFixed(3) + 'M'
|
||||||
|
},
|
||||||
|
openFile(isFolder = false) {
|
||||||
|
this.selectData = {}
|
||||||
|
this.selectKey = null
|
||||||
|
this.faccept = ['.pdf']
|
||||||
|
this.limitLength = 0
|
||||||
|
this.config.title = this.$t(
|
||||||
|
'trials:trialDocument:certificate:form:title:uploadFile'
|
||||||
|
)
|
||||||
|
this.config.visible = true
|
||||||
|
this.config.isFolder = isFolder
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
Id: {
|
||||||
|
handler() {
|
||||||
|
this.rowBtnStatus = 'edit'
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
rowData: {
|
||||||
|
handler() {
|
||||||
|
this.DATA = Object.assign({}, this.rowData)
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
|
||||||
|
let types = typeArr[this.ArchiveTypeEnum]
|
||||||
|
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
isInspect() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:inspect',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
isManage() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:manage',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasAdd() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:add',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasEdit() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:edit',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasDel() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:del',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasDownLoad() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:downLoad',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasAccredit() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:accredit',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
TITLE() {
|
||||||
|
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||||
|
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||||
|
}`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
line-height: 40px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.fileName {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: calc(100% - 60px);
|
||||||
|
white-space: nowrap; /* 文本不换行 */
|
||||||
|
overflow: hidden; /* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.fileBtnBox {
|
||||||
|
display: inline-block;
|
||||||
|
width: 50px;
|
||||||
|
i {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #409eff;
|
||||||
|
margin-right: 3px;
|
||||||
|
&:last-child {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -101,6 +101,12 @@
|
||||||
<span>{{ isEN ? scope.row.BlindName : scope.row.BlindNameCN }}</span>
|
<span>{{ isEN ? scope.row.BlindName : scope.row.BlindNameCN }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="Code"
|
||||||
|
:label="$t('trials:trialDocument:curriculumVitae:table:UserName')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Speciality"
|
prop="Speciality"
|
||||||
:label="$t('trials:trialDocument:curriculumVitae:table:Speciality')"
|
:label="$t('trials:trialDocument:curriculumVitae:table:Speciality')"
|
||||||
|
@ -154,7 +160,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="SubmmitTime"
|
prop="OptTimeStr"
|
||||||
:label="$t('trials:trialDocument:curriculumVitae:table:submmitTime')"
|
:label="$t('trials:trialDocument:curriculumVitae:table:submmitTime')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
|
|
|
@ -0,0 +1,470 @@
|
||||||
|
<template>
|
||||||
|
<box-content>
|
||||||
|
<div class="title">
|
||||||
|
{{ TITLE }}
|
||||||
|
</div>
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<div class="search" style="position: relative">
|
||||||
|
<el-form :inline="true" class="base-search-form">
|
||||||
|
<!--阅片人-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:search:viewer')"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="searchData.Code"
|
||||||
|
style="width: 100px"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!--审核人-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:search:auditor')"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="searchData.OptUserName"
|
||||||
|
style="width: 100px"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!--审核人角色-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:search:auditorRole')"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.UserTypeEnum"
|
||||||
|
style="width: 100px"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in $d.UserType"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:search:confirmTime')"
|
||||||
|
>
|
||||||
|
<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-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||||
|
{{ $t('common:button:search') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleReset"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:reset') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="hasEdit && isManage && !viewStatus"
|
||||||
|
@click.stop="openFile(false)"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:entryRecord:button:uploadFile') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="hasDownLoad && (isManage || isInspect)"
|
||||||
|
icon="el-icon-download"
|
||||||
|
type="primary"
|
||||||
|
:disabled="!file || !file.FilePath"
|
||||||
|
@click.stop="downLoad(file)"
|
||||||
|
>{{
|
||||||
|
$t('trials:trialDocument:entryRecord:button:downLoadFile')
|
||||||
|
}}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
v-adaptive="{ bottomOffset: 75 }"
|
||||||
|
:data="list"
|
||||||
|
stripe
|
||||||
|
height="100"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" />
|
||||||
|
<!--姓名-->
|
||||||
|
<el-table-column
|
||||||
|
prop="BlindName"
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:table:name')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ isEN ? scope.row.BlindName : scope.row.BlindNameCN }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="Code"
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:table:userName')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="Speciality"
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:table:status')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.DoctorTrialState === 10" type="primary">{{
|
||||||
|
$fd('DoctorTrialState', scope.row.DoctorTrialState)
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag v-if="scope.row.DoctorTrialState === 9" type="warning">{{
|
||||||
|
$fd('DoctorTrialState', scope.row.DoctorTrialState)
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag v-if="scope.row.DoctorTrialState === 8" type="danger">{{
|
||||||
|
$fd('DoctorTrialState', scope.row.DoctorTrialState)
|
||||||
|
}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="OptUserName"
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:table:auditor')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="UserTypeEnum"
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:table:auditorRole')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ $fd('UserType', scope.row.UserTypeEnum) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="OptTimeStr"
|
||||||
|
:label="$t('trials:trialDocument:entryRecord:table:submmitTime')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column :label="$t('common:action:action')" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-view"
|
||||||
|
:title="$t('common:button:view')"
|
||||||
|
circle
|
||||||
|
@click.stop="preview(scope.row)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
class="page"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="searchData.PageIndex"
|
||||||
|
:limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<el-dialog :visible.sync="preview_visible" fullscreen>
|
||||||
|
<div style="height: 100%; overflow: auto">
|
||||||
|
<preview
|
||||||
|
:isEN="isEN"
|
||||||
|
:isAll="isAll"
|
||||||
|
:reviewerId.sync="reviewerId"
|
||||||
|
v-if="preview_visible"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<upload-files
|
||||||
|
:config="config"
|
||||||
|
:faccept="faccept"
|
||||||
|
:uploadPath="uploadPath"
|
||||||
|
:limitLength="limitLength"
|
||||||
|
v-if="config.visible"
|
||||||
|
@close="close"
|
||||||
|
@uplaodFile="uplaodFile"
|
||||||
|
/>
|
||||||
|
</box-content>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getConfirmationReviewerList } from '@/api/trials'
|
||||||
|
import { uploadTrialFileTypeFile, getTrialFileTypeFile } from '@/api/dictionary'
|
||||||
|
import Pagination from '@/components/Pagination'
|
||||||
|
import BoxContent from '@/components/BoxContent'
|
||||||
|
import preview from '@/views/reviewers/curriculumVitae/preview.vue'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import uploadFiles from '../../uploadFiles.vue'
|
||||||
|
import { downLoadFile } from '@/utils/stream.js'
|
||||||
|
const searchDataDefault = () => {
|
||||||
|
return {
|
||||||
|
Code: null,
|
||||||
|
UserTypeEnum: null,
|
||||||
|
OptUserName: null,
|
||||||
|
OptStartTime: null,
|
||||||
|
OptEndTime: null,
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
Asc: false,
|
||||||
|
SortField: 'BlindName',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'entryRecord',
|
||||||
|
components: { BoxContent, Pagination, preview, uploadFiles },
|
||||||
|
props: {
|
||||||
|
ArchiveTypeEnum: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
rowData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
viewStatus: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
Id: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchData: searchDataDefault(),
|
||||||
|
loading: false,
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
reviewerId: null,
|
||||||
|
isAll: false,
|
||||||
|
preview_visible: false,
|
||||||
|
timeList: [],
|
||||||
|
|
||||||
|
config: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '800px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: false,
|
||||||
|
isFolder: false,
|
||||||
|
},
|
||||||
|
faccept: ['.zip'],
|
||||||
|
limitLength: 1,
|
||||||
|
uploadPath: null,
|
||||||
|
file: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 下载
|
||||||
|
async downLoad(row) {
|
||||||
|
try {
|
||||||
|
return await downLoadFile(
|
||||||
|
this.OSSclientConfig.basePath + row.FilePath,
|
||||||
|
row.FileName
|
||||||
|
)
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取上传文件
|
||||||
|
async getFile() {
|
||||||
|
try {
|
||||||
|
if (!this.Id) return false
|
||||||
|
let data = {
|
||||||
|
TrialFileTypeId: this.Id,
|
||||||
|
}
|
||||||
|
let res = await getTrialFileTypeFile(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.file = res.Result
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async uplaodFile(list) {
|
||||||
|
console.log(list, 'list')
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialFileTypeId: this.Id,
|
||||||
|
FileRecord: list[0],
|
||||||
|
}
|
||||||
|
let res = await uploadTrialFileTypeFile(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getFile()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openFile(isFolder = false) {
|
||||||
|
this.config.title = this.$t(
|
||||||
|
'trials:trialDocument:entryRecord:form:title:uploadFile'
|
||||||
|
)
|
||||||
|
this.config.visible = true
|
||||||
|
this.config.isFolder = isFolder
|
||||||
|
},
|
||||||
|
async getList() {
|
||||||
|
try {
|
||||||
|
this.searchData.TrialId = this.$route.query.trialId
|
||||||
|
this.loading = true
|
||||||
|
let res = await getConfirmationReviewerList(this.searchData)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.list = res.Result.CurrentPageData
|
||||||
|
this.total = res.Result.TotalCount
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查询
|
||||||
|
handleSearch() {
|
||||||
|
this.searchData.PageIndex = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleReset() {
|
||||||
|
this.searchData = searchDataDefault()
|
||||||
|
this.timeList = []
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 排序
|
||||||
|
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()
|
||||||
|
},
|
||||||
|
// 预览
|
||||||
|
preview(row) {
|
||||||
|
this.reviewerId = row.Id
|
||||||
|
this.isAll = false
|
||||||
|
this.preview_visible = true
|
||||||
|
},
|
||||||
|
changeTimeList() {
|
||||||
|
if (this.timeList) {
|
||||||
|
this.searchData.OptStartTime = this.timeList[0]
|
||||||
|
this.searchData.OptEndTime = this.timeList[1]
|
||||||
|
} else {
|
||||||
|
this.searchData.OptStartTime = null
|
||||||
|
this.searchData.OptEndTime = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.config.visible = false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
|
||||||
|
let types = typeArr[this.ArchiveTypeEnum]
|
||||||
|
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
Id: {
|
||||||
|
handler() {
|
||||||
|
this.rowBtnStatus = 'edit'
|
||||||
|
this.getList()
|
||||||
|
this.getFile()
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['hospitalList']),
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
isInspect() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:inspect',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
isManage() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:manage',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasAdd() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:add',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasEdit() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:edit',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasDel() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:del',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasDownLoad() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:downLoad',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasAccredit() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:accredit',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
TITLE() {
|
||||||
|
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||||
|
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||||
|
}`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
line-height: 40px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.fileName {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 100%;
|
||||||
|
white-space: nowrap; /* 文本不换行 */
|
||||||
|
overflow: hidden; /* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.fileBtnBox {
|
||||||
|
display: inline-block;
|
||||||
|
width: 50px;
|
||||||
|
i {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #409eff;
|
||||||
|
margin-right: 3px;
|
||||||
|
&:last-child {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.topForm {
|
||||||
|
.el-form-item {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -96,13 +96,13 @@
|
||||||
:viewStatus="viewStatus"
|
:viewStatus="viewStatus"
|
||||||
/>
|
/>
|
||||||
<!--申报方同意入项记录-->
|
<!--申报方同意入项记录-->
|
||||||
<!-- <entry-record
|
<entry-record
|
||||||
v-if="[12].includes(SubIdentificationEnum)"
|
v-if="[12].includes(SubIdentificationEnum)"
|
||||||
:ArchiveTypeEnum="ArchiveTypeEnum"
|
:ArchiveTypeEnum="ArchiveTypeEnum"
|
||||||
:rowData="rowData"
|
:rowData="rowData"
|
||||||
:Id="Id"
|
:Id="Id"
|
||||||
:viewStatus="viewStatus"
|
:viewStatus="viewStatus"
|
||||||
/> -->
|
/>
|
||||||
<!--培训记录/共享资料-->
|
<!--培训记录/共享资料-->
|
||||||
<Attachments-management
|
<Attachments-management
|
||||||
v-if="[13].includes(SubIdentificationEnum)"
|
v-if="[13].includes(SubIdentificationEnum)"
|
||||||
|
@ -123,8 +123,8 @@ import temp from './components/template/index.vue'
|
||||||
|
|
||||||
// 阅片人相关
|
// 阅片人相关
|
||||||
import curriculumVitae from './components/viewer/curriculumVitae/index.vue'
|
import curriculumVitae from './components/viewer/curriculumVitae/index.vue'
|
||||||
// import certificate from './components/viewer/certificate/index.vue'
|
import certificate from './components/viewer/certificate/index.vue'
|
||||||
// import entryRecord from './components/viewer/entryRecord/index.vue'
|
import entryRecord from './components/viewer/entryRecord/index.vue'
|
||||||
import readingTracking from '@/views/trials/trials-panel/reading/reading-tracking/index.vue'
|
import readingTracking from '@/views/trials/trials-panel/reading/reading-tracking/index.vue'
|
||||||
import medicalFeedback from '@/views/trials/trials-panel/reading/pm-medical-feedback/index.vue'
|
import medicalFeedback from '@/views/trials/trials-panel/reading/pm-medical-feedback/index.vue'
|
||||||
import AttachmentsManagement from '@/views/trials/trials-panel/attachments/attachment-management/index.vue'
|
import AttachmentsManagement from '@/views/trials/trials-panel/attachments/attachment-management/index.vue'
|
||||||
|
@ -138,8 +138,8 @@ export default {
|
||||||
trainRecord,
|
trainRecord,
|
||||||
temp,
|
temp,
|
||||||
|
|
||||||
// entryRecord,
|
entryRecord,
|
||||||
// certificate,
|
certificate,
|
||||||
curriculumVitae,
|
curriculumVitae,
|
||||||
readingTracking,
|
readingTracking,
|
||||||
AttachmentsManagement,
|
AttachmentsManagement,
|
||||||
|
|
Loading…
Reference in New Issue