中心人员定期管理
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-10-28 15:35:54 +08:00
parent aee12347dc
commit 9b67760ffd
4 changed files with 416 additions and 478 deletions

View File

@ -4317,4 +4317,28 @@ export function deleteAuditRecord(auditRecordId) {
url: `/AuditDocument/deleteAuditRecord/${auditRecordId}`,
method: 'delete'
})
}
// 核对中心人员发送邮件
export function sendCheckSiteSurveyUserEmail(data) {
return request({
url: `/TrialSiteSurvey/sendCheckSiteSurveyUserEmail`,
method: 'post',
data
})
}
// 更新中心人员发送邮件
export function sendUpdateSiteSurveyUserEmail(data) {
return request({
url: `/TrialSiteSurvey/sendUpdateSiteSurveyUserEmail`,
method: 'post',
data
})
}
// 更新中心人员发送邮件
export function getTrialSiteLatestSurvey(params) {
return request({
url: `/TrialSiteSurvey/getTrialSiteLatestSurvey`,
method: 'get',
params
})
}

View File

@ -7,16 +7,8 @@
<!-- <TopLang style="position: fixed;top: 40px;right: 40px" /> -->
</h2>
<el-card shadow="hover">
<el-form
ref="resetForm"
v-loading="loading"
:model="form"
label-width="150px"
style="width:80%;margin:0 auto;"
:rules="rules"
class="demo-ruleForm"
size="small"
>
<el-form ref="resetForm" v-loading="loading" :model="form" label-width="150px" style="width:80%;margin:0 auto;"
:rules="rules" class="demo-ruleForm" size="small">
<!-- 项目编号 -->
<el-form-item :label="$t('trials:researchForm:form:trialId')">
<el-input v-model="form.TrialCode" disabled />
@ -35,13 +27,10 @@
</el-form-item>
<!-- 中心名称 -->
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="TrialSiteId">
<el-select v-model="form.TrialSiteId" filterable style="width:100%;" @change="handleSiteChange">
<el-option
v-for="(item,index) of siteOptions"
:key="index"
:label="item.TrialSiteAliasName"
:value="item.TrialSiteId"
/>
<el-select v-model="form.TrialSiteId" filterable style="width:100%;" @change="handleSiteChange"
:disabled="isUpload">
<el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteAliasName"
:value="item.TrialSiteId" />
</el-select>
</el-form-item>
<!-- 中心编号 -->
@ -54,13 +43,14 @@
{{ $t('trials:researchForm:button:updateQsForm') }}
</el-link>
<!-- 取消更新调研表 -->
<el-link v-else type="primary" @click="form.IsUpdate = false;form.ReplaceUserEmailOrPhone=''">
<el-link v-else type="primary" @click="form.IsUpdate = false; form.ReplaceUserEmailOrPhone = ''">
{{ $t('trials:researchForm:button:cancelUpdateQsForm') }}
</el-link>
</el-form-item>
<!-- 原调研表填写人邮箱 -->
<el-form-item v-if="form.IsUpdate" :label="$t('trials:researchForm:form:originalEmail')" prop="ReplaceUserEmailOrPhone">
<el-input v-model="form.ReplaceUserEmailOrPhone" autocomplete="new-password" />
<el-form-item v-if="form.IsUpdate" :label="$t('trials:researchForm:form:originalEmail')"
prop="ReplaceUserEmailOrPhone">
<el-input v-model="form.ReplaceUserEmailOrPhone" autocomplete="new-password" :disabled="isUpload" />
</el-form-item>
<!-- 联系邮箱 -->
<el-form-item :label="$t('trials:researchForm:form:contactorEmail')" prop="EmailOrPhone">
@ -74,13 +64,9 @@
</el-form-item>
</el-col>
<el-col style="width: 120px;margin-left: 10px">
<el-button
size="small"
type="primary"
style="width:100%;"
:disabled="sendDisabled || !form.EmailOrPhone || count > 0"
@click="handleSendCode"
>{{ this.$t('trials:researchForm:button:send') }} {{ sendTitle ? `${sendTitle}` : null }}</el-button>
<el-button size="small" type="primary" style="width:100%;"
:disabled="sendDisabled || !form.EmailOrPhone || count > 0" @click="handleSendCode">{{
this.$t('trials:researchForm:button:send') }} {{ sendTitle ? `${sendTitle}` : null }}</el-button>
</el-col>
</el-form-item>
<el-form-item>
@ -203,7 +189,8 @@ export default {
timer: null,
msg: '',
lang: 'zh',
isHaveSiteSurveyRecord: false
isHaveSiteSurveyRecord: false,
isUpload: false
}
},
computed: {
@ -221,6 +208,14 @@ export default {
this.trialId = this.$route.query.trialId
this.initPage()
}
if (this.$route.query.isUpload) {
this.isUpload = true
this.form.IsUpdate = true
let { email, oldEMail, trialSiteId } = this.$route.query
if (trialSiteId) this.form.TrialSiteId = trialSiteId
if (oldEMail) this.form.ReplaceUserEmailOrPhone = oldEMail
if (email) this.form.EmailOrPhone = email
}
},
methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }),
@ -235,6 +230,9 @@ export default {
this.form[key] = Result[key]
}
})
if (this.isUpload) {
this.handleSiteChange(this.form.TrialSiteId)
}
this.loading = false
}).catch(() => { this.loading = false })
},
@ -347,6 +345,7 @@ export default {
<style lang="scss" scoped>
.question-login-wrapper {
padding: 20px;
.box-wrapper {
width: 50%;
margin: 20px auto;

View File

@ -14,18 +14,11 @@
<!-- 用户类型 -->
<el-form-item :label="$t('trials:staff:table:userType')">
<el-select v-model="listQuery.UserTypeId" clearable class="mr">
<el-option
v-for="item of userTypeOptions"
v-show="
item.UserTypeEnum !== 8 &&
item.UserTypeEnum !== 31 &&
item.UserTypeEnum !== 26 &&
item.UserTypeEnum !== 27
"
:key="item.Id"
:label="item.UserTypeShortName"
:value="item.Id"
>
<el-option v-for="item of userTypeOptions" v-show="item.UserTypeEnum !== 8 &&
item.UserTypeEnum !== 31 &&
item.UserTypeEnum !== 26 &&
item.UserTypeEnum !== 27
" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
<span>{{ item.UserType }}</span>
</el-option>
</el-select>
@ -37,12 +30,7 @@
<!-- 状态 -->
<el-form-item :label="$t('trials:staff:table:status')">
<el-select v-model="listQuery.IsDeleted" clearable class="mr">
<el-option
v-for="item of $d.IsUserExitTrial"
:label="item.label"
:value="item.value"
:key="item.id"
/>
<el-option v-for="item of $d.IsUserExitTrial" :label="item.label" :value="item.value" :key="item.id" />
<!-- <el-option label="加入" :value="false" />-->
</el-select>
</el-form-item>
@ -52,43 +40,23 @@
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
<!-- 添加系统用户 -->
<el-button
v-hasPermi="[
'trials:trials-panel:setting:personnel-manage:add-internal-staff',
]"
type="primary"
style="margin-left: 10px"
icon="el-icon-plus"
@click="handleAdd('Add')"
>
<el-button v-hasPermi="[
'trials:trials-panel:setting:personnel-manage:add-internal-staff',
]" type="primary" style="margin-left: 10px" icon="el-icon-plus" @click="handleAdd('Add')">
{{ $t('trials:staff:button:addInternalStaff') }}
</el-button>
<!-- 添加外部人员 -->
<el-button
v-hasPermi="[
'trials:trials-panel:setting:personnel-manage:add-external-staff',
]"
type="primary"
icon="el-icon-plus"
@click="handleAdd('External')"
>
<el-button v-hasPermi="[
'trials:trials-panel:setting:personnel-manage:add-external-staff',
]" type="primary" icon="el-icon-plus" @click="handleAdd('External')">
{{ $t('trials:staff:button:addExternalStaff') }}
</el-button>
<!-- 导出 -->
<el-button
type="primary"
icon="el-icon-download"
:disabled="list.length === 0"
@click="handleExport"
>
<el-button type="primary" icon="el-icon-download" :disabled="list.length === 0" @click="handleExport">
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
@ -96,30 +64,16 @@
</div>
<!-- 项目参与人员列表 -->
<el-table
ref="settingList"
v-loading="listLoading"
:data="list"
stripe
@sort-change="handleSortByColumn"
>
<el-table ref="settingList" v-loading="listLoading" :data="list" stripe @sort-change="handleSortByColumn">
<el-table-column type="index" width="60">
<template slot-scope="scope">
<span
style="
<span style="
display: flex;
align-items: center;
justify-content: flex-end;
"
>
<el-tooltip
class="item"
effect="dark"
:content="$t('trials:staff:tip:userDisabled')"
placement="top"
style="margin-right: 3px"
v-if="!scope.row.Status"
>
">
<el-tooltip class="item" effect="dark" :content="$t('trials:staff:tip:userDisabled')" placement="top"
style="margin-right: 3px" v-if="!scope.row.Status">
<i v-if="!scope.row.Status" class="el-icon-warning icon-i"></i>
</el-tooltip>
<span>{{ scope.$index + 1 }}</span>
@ -127,50 +81,25 @@
</template>
</el-table-column>
<!-- 姓名 -->
<el-table-column
prop="FullName"
:label="$t('trials:staff:table:name')"
show-overflow-tooltip
sortable
min-width="40"
/>
<el-table-column prop="FullName" :label="$t('trials:staff:table:name')" show-overflow-tooltip sortable
min-width="40" />
<!-- 用户名 -->
<el-table-column
prop="UserName"
:label="$t('trials:staff:table:uid')"
show-overflow-tooltip
sortable
min-width="50"
/>
<el-table-column prop="UserName" :label="$t('trials:staff:table:uid')" show-overflow-tooltip sortable
min-width="50" />
<!-- 用户类型 -->
<el-table-column
prop="UserType"
:label="$t('trials:staff:table:userType')"
show-overflow-tooltip
width="160"
>
<el-table-column prop="UserType" :label="$t('trials:staff:table:userType')" show-overflow-tooltip width="160">
<template slot-scope="scope">
<el-button
v-if="
Array.isArray(scope.row.TrialUserRoleList) &&
scope.row.TrialUserRoleList.length > 0 &&
hasPermi(['trials:trials-panel:setting:personnel-manage:status'])
"
type="text"
@click.stop="openRoleList(scope.row)"
>
<el-tooltip
class="item"
effect="dark"
:content="$t('trials:staff:tip:userTypeDisabled')"
placement="top"
style="margin-right: 2px"
v-if="
<el-button v-if="
Array.isArray(scope.row.TrialUserRoleList) &&
scope.row.TrialUserRoleList.length > 0 &&
hasPermi(['trials:trials-panel:setting:personnel-manage:status'])
" type="text" @click.stop="openRoleList(scope.row)">
<el-tooltip class="item" effect="dark" :content="$t('trials:staff:tip:userTypeDisabled')" placement="top"
style="margin-right: 2px" v-if="
scope.row.TrialUserRoleList.some(
(item) => item.IsDeleted || item.IsUserRoleDisabled
)
"
>
">
<i class="el-icon-warning icon-i"></i>
</el-tooltip>
<span>{{
@ -179,24 +108,16 @@
).join(', ')
}}</span>
</el-button>
<div
v-else-if="
Array.isArray(scope.row.TrialUserRoleList) &&
scope.row.TrialUserRoleList.length > 0
"
>
<el-tooltip
class="item"
effect="dark"
:content="$t('trials:staff:tip:userTypeDisabled')"
placement="top"
style="margin-right: 2px"
v-if="
<div v-else-if="
Array.isArray(scope.row.TrialUserRoleList) &&
scope.row.TrialUserRoleList.length > 0
">
<el-tooltip class="item" effect="dark" :content="$t('trials:staff:tip:userTypeDisabled')" placement="top"
style="margin-right: 2px" v-if="
scope.row.TrialUserRoleList.some(
(item) => item.IsDeleted || item.IsUserRoleDisabled
)
"
>
">
<i class="el-icon-warning icon-i"></i>
</el-tooltip>
<span>{{
@ -208,37 +129,17 @@
</template>
</el-table-column>
<!-- 联系电话 -->
<el-table-column
prop="Phone"
:label="$t('trials:staff:table:phone')"
show-overflow-tooltip
sortable
min-width="40"
/>
<el-table-column prop="Phone" :label="$t('trials:staff:table:phone')" show-overflow-tooltip sortable
min-width="40" />
<!-- 邮箱 -->
<el-table-column
prop="EMail"
:label="$t('trials:staff:table:email')"
show-overflow-tooltip
sortable
min-width="40"
/>
<el-table-column prop="EMail" :label="$t('trials:staff:table:email')" show-overflow-tooltip sortable
min-width="40" />
<!-- 单位 -->
<el-table-column
prop="OrganizationName"
:label="$t('trials:staff:table:organization')"
sortable
show-overflow-tooltip
min-width="50"
/>
<el-table-column prop="OrganizationName" :label="$t('trials:staff:table:organization')" sortable
show-overflow-tooltip min-width="50" />
<!-- 状态 -->
<el-table-column
prop="IsDeleted"
:label="$t('trials:staff:table:status')"
show-overflow-tooltip
sortable
min-width="40"
>
<el-table-column prop="IsDeleted" :label="$t('trials:staff:table:status')" show-overflow-tooltip sortable
min-width="40">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('IsUserExitTrial', scope.row.IsDeleted)
@ -249,13 +150,8 @@
</template>
</el-table-column>
<!-- 加入日期 -->
<el-table-column
prop="JoinTime"
:label="$t('trials:staff:table:joinTime')"
show-overflow-tooltip
sortable
width="160"
>
<el-table-column prop="JoinTime" :label="$t('trials:staff:table:joinTime')" show-overflow-tooltip sortable
width="160">
<template slot-scope="scope">
{{
scope.row.JoinTime
@ -265,13 +161,8 @@
</template>
</el-table-column>
<!-- 退出日期 -->
<el-table-column
prop="RemoveTime"
:label="$t('trials:staff:table:exitTime')"
show-overflow-tooltip
sortable
width="160"
>
<el-table-column prop="RemoveTime" :label="$t('trials:staff:table:exitTime')" show-overflow-tooltip sortable
width="160">
<template slot-scope="scope">
{{
scope.row.RemoveTime
@ -297,130 +188,63 @@
min-width="60"
/> -->
<el-table-column
v-if="hasPermi(['trials:trials-panel:setting:personnel-manage:status'])"
:label="$t('common:action:action')"
width="150"
>
<el-table-column v-if="hasPermi(['trials:trials-panel:setting:personnel-manage:status'])"
:label="$t('common:action:action')" width="150">
<template slot-scope="scope">
<el-button
v-hasPermi="['trials:trials-panel:setting:personnel-manage:status']"
circle
:title="$t('trials:staff:action:status')"
icon="el-icon-edit-outline"
:disabled="
!!scope.row.TrialUserRoleList.find(
(item) => item.UserTypeEnum === 1
)
"
@click="handleStatus(scope.row)"
/>
<el-button v-hasPermi="['trials:trials-panel:setting:personnel-manage:status']" circle
:title="$t('trials:staff:action:status')" icon="el-icon-edit-outline" :disabled="!!scope.row.TrialUserRoleList.find(
(item) => item.UserTypeEnum === 1
)
" @click="handleStatus(scope.row)" />
<!---v-if="!scope.row.UserName"-->
<el-button
v-if="!scope.row.UserName"
circle
:title="$t('trials:staff:action:email')"
icon="el-icon-message"
@click="handleSendEmail(scope.row)"
/>
<el-button v-if="!scope.row.UserName" circle :title="$t('trials:staff:action:email')" icon="el-icon-message"
@click="handleSendEmail(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<div class="pagination" style="text-align: right">
<pagination
:total="total"
:page.sync="listQuery.PageIndex"
:limit.sync="listQuery.PageSize"
@pagination="getList"
/>
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize"
@pagination="getList" />
</div>
<!-- 分配参与人员模态框 -->
<base-model v-if="staff_model.visible" :config="staff_model">
<template slot="dialog-body">
<StaffForm v-if="isAdd == 'Add'" @closeDialog="closeDialog" />
<StaffExternalForm
v-else
@closeDialog="closeDialog"
@getList="getList"
/>
<StaffExternalForm v-else @closeDialog="closeDialog" @getList="getList" />
</template>
</base-model>
<!-- 修改参与者人员状态 -->
<base-model v-if="status_model.visible" :config="status_model">
<template slot="dialog-body">
<el-form
ref="statusForm"
:model="statusForm"
label-width="110px"
size="small"
:rules="statusRules"
>
<el-form ref="statusForm" :model="statusForm" label-width="110px" size="small" :rules="statusRules">
<!-- Status -->
<el-form-item
:label="$t('trials:staff:table:status')"
prop="isDeleted"
>
<el-radio-group
v-model="statusForm.isDeleted"
@change="handleIsDeletedChanged"
>
<el-radio
v-for="item of $d.IsUserExitTrial"
:label="item.value"
:key="item.id"
>{{ item.label }}</el-radio
>
<el-form-item :label="$t('trials:staff:table:status')" prop="isDeleted">
<el-radio-group v-model="statusForm.isDeleted" @change="handleIsDeletedChanged">
<el-radio v-for="item of $d.IsUserExitTrial" :label="item.value" :key="item.id">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 退出日期 -->
<el-form-item
v-if="statusForm.isDeleted"
:label="$t('trials:staff:table:exitTime')"
prop="removeTime"
>
<el-date-picker
v-model="statusForm.removeTime"
type="date"
:picker-options="pickerOption"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
/>
<el-form-item v-if="statusForm.isDeleted" :label="$t('trials:staff:table:exitTime')" prop="removeTime">
<el-date-picker v-model="statusForm.removeTime" type="date" :picker-options="pickerOption"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" />
</el-form-item>
<!-- 加入日期 -->
<el-form-item
v-else
:label="$t('trials:staff:table:joinTime')"
prop="joinTime"
>
<el-date-picker
v-model="statusForm.joinTime"
type="date"
:picker-options="pickerOption"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
/>
<el-form-item v-else :label="$t('trials:staff:table:joinTime')" prop="joinTime">
<el-date-picker v-model="statusForm.joinTime" type="date" :picker-options="pickerOption"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" />
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="status_model.visible = false"
>
<el-button :disabled="btnLoading" size="small" type="primary" @click="status_model.visible = false">
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="saveStatus"
>
<el-button size="small" type="primary" :loading="btnLoading" @click="saveStatus">
{{ $t('common:button:save') }}
</el-button>
</template>
@ -431,99 +255,59 @@
<el-table :data="roleList" style="width: 100%" max-height="300px">
<el-table-column type="index" width="60">
<template slot-scope="scope">
<span
style="
<span style="
display: flex;
align-items: center;
justify-content: flex-end;
"
>
<el-tooltip
class="item"
effect="dark"
:content="$t('trials:staff:tip:userTypeSysDisabled')"
placement="top"
style="margin-right: 3px"
v-if="scope.row.IsUserRoleDisabled"
>
<i
v-if="scope.row.IsUserRoleDisabled"
class="el-icon-warning icon-i"
></i>
">
<el-tooltip class="item" effect="dark" :content="$t('trials:staff:tip:userTypeSysDisabled')"
placement="top" style="margin-right: 3px" v-if="scope.row.IsUserRoleDisabled">
<i v-if="scope.row.IsUserRoleDisabled" class="el-icon-warning icon-i"></i>
</el-tooltip>
<span>{{ scope.$index + 1 }}</span>
</span>
</template>
</el-table-column>
<el-table-column
prop="UserTypeShortName"
:label="
$t(
'trials:trials-panel:setting:personnel-manage:table:UserTypeShortName'
)
"
/>
<el-table-column
prop="IsDeleted"
:label="
$t(
'trials:trials-panel:setting:personnel-manage:table:IsUserRoleDisabled'
)
"
>
<el-table-column prop="UserTypeShortName" :label="$t(
'trials:trials-panel:setting:personnel-manage:table:UserTypeShortName'
)
" />
<el-table-column prop="IsDeleted" :label="$t(
'trials:trials-panel:setting:personnel-manage:table:IsUserRoleDisabled'
)
">
<template slot-scope="scope">
<span> {{ $fd('IsDisable', scope.row.IsDeleted) }}</span>
</template>
</el-table-column>
<el-table-column
prop="IsDeleted"
:label="
$t(
'trials:trials-panel:setting:personnel-manage:table:enableTime'
)
"
min-width="120px"
>
<el-table-column prop="IsDeleted" :label="$t(
'trials:trials-panel:setting:personnel-manage:table:enableTime'
)
" min-width="120px">
<template slot-scope="scope">
<span>
{{ scope.row.CreateTime }}
</span>
</template>
</el-table-column>
<el-table-column
prop="IsDeleted"
:label="
$t(
'trials:trials-panel:setting:personnel-manage:table:forbiddenTime'
)
"
min-width="120px"
>
<el-table-column prop="IsDeleted" :label="$t(
'trials:trials-panel:setting:personnel-manage:table:forbiddenTime'
)
" min-width="120px">
<template slot-scope="scope">
<span v-if="scope.row.IsDeleted">
{{ scope.row.UpdateTime }}
</span>
</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
min-width="120px"
>
<el-table-column :label="$t('common:action:action')" min-width="120px">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
:disabled="scope.row.IsDeleted || scope.row.UserTypeEnum === 1"
@click.stop="changeRoleStatus(scope.row, true)"
>
<el-button size="mini" type="text" :disabled="scope.row.IsDeleted || scope.row.UserTypeEnum === 1"
@click.stop="changeRoleStatus(scope.row, true)">
{{ $fd('IsDisable', true) }}
</el-button>
<el-button
size="mini"
type="text"
:disabled="!scope.row.IsDeleted || scope.row.UserTypeEnum === 1"
@click.stop="changeRoleStatus(scope.row, false)"
>
<el-button size="mini" type="text" :disabled="!scope.row.IsDeleted || scope.row.UserTypeEnum === 1"
@click.stop="changeRoleStatus(scope.row, false)">
{{ $fd('IsDisable', false) }}
</el-button>
</template>
@ -553,6 +337,7 @@ const getListQueryDefault = () => {
UserName: '',
UserTypeId: '',
OrganizationName: '',
UserTypeList: [],
IsDeleted: null,
PageIndex: 1,
PageSize: 20,
@ -795,23 +580,28 @@ export default {
.filter-box {
display: flex;
padding: 5px;
.base-search-form {
.el-form-item {
margin-bottom: 0px;
}
}
.mr {
margin-right: 5px;
width: 120px;
}
}
.el-dialog__header {
padding: 10px;
}
.el-dialog__body {
padding: 10px;
}
}
.icon-i {
color: #e6a23c;
cursor: pointer;

View File

@ -3,27 +3,15 @@
<template slot="search-container">
<el-form :inline="true">
<el-form-item :label="$t('trials:site:table:siteId')">
<el-input
v-model="searchData.TrialSiteCode"
style="width: 130px"
clearable
/>
<el-input v-model="searchData.TrialSiteCode" style="width: 130px" clearable />
</el-form-item>
<!-- 中心 -->
<el-form-item :label="$t('trials:site:table:site')">
<el-input
v-model="searchData.SiteName"
style="width: 130px"
clearable
/>
<el-input v-model="searchData.SiteName" style="width: 130px" clearable />
</el-form-item>
<!-- 参与者 -->
<el-form-item :label="$t('trials:site:table:staff')">
<el-input
v-model="searchData.UserKeyInfo"
style="width: 130px"
clearable
/>
<el-input v-model="searchData.UserKeyInfo" style="width: 130px" clearable />
</el-form-item>
<el-form-item>
@ -32,95 +20,53 @@
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
<!-- 人员核对提醒 -->
<el-button type="primary" @click="openCheckRemind">
{{ $t('trials:site:button:checkRemind') }}
</el-button>
</el-form-item>
</el-form>
</template>
<template slot="main-container">
<el-table
v-adaptive="{ bottomOffset: 60 }"
v-loading="loading"
:data="list"
stripe
height="100"
@sort-change="handleSortChange"
>
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
@sort-change="handleSortChange">
<el-table-column type="index" width="40" align="left" />
<!-- 中心编号 -->
<el-table-column
prop="TrialSiteCode"
min-width="100"
:label="$t('trials:site:table:siteId')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="TrialSiteCode" min-width="100" :label="$t('trials:site:table:siteId')"
show-overflow-tooltip sortable="custom" />
<!-- 中心名称 -->
<el-table-column
prop="TrialSiteName"
min-width="100"
:label="$t('trials:site:table:site')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="TrialSiteName" min-width="100" :label="$t('trials:site:table:site')"
show-overflow-tooltip sortable="custom" />
<!-- 中心别名 -->
<el-table-column
prop="TrialSiteAliasName"
min-width="100"
:label="$t('trials:site:table:TrialSiteAliasName')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="TrialSiteAliasName" min-width="100" :label="$t('trials:site:table:TrialSiteAliasName')"
show-overflow-tooltip sortable="custom" />
<!-- Subjects -->
<el-table-column
prop="SubjectCount"
min-width="100"
:label="$t('trials:site:table:subjects')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="SubjectCount" min-width="100" :label="$t('trials:site:table:subjects')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<el-button
v-if="scope.row.SubjectCount > 0 && hasSubjectRoute"
type="text"
@click="jumpToSubjectList(scope.row.TrialSiteId)"
>
<el-button v-if="scope.row.SubjectCount > 0 && hasSubjectRoute" type="text"
@click="jumpToSubjectList(scope.row.TrialSiteId)">
{{ scope.row.SubjectCount }}
</el-button>
<span v-else> {{ scope.row.SubjectCount }}</span>
</template>
</el-table-column>
<!-- Visits -->
<el-table-column
prop="VisitCount"
min-width="100"
:label="$t('trials:site:table:visits')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="VisitCount" min-width="100" :label="$t('trials:site:table:visits')" show-overflow-tooltip
sortable="custom">
<template slot-scope="scope">
<el-button
v-if="scope.row.VisitCount > 0 && hasVisitRoute"
type="text"
@click="jumpToVisitList(scope.row.TrialSiteId)"
>
<el-button v-if="scope.row.VisitCount > 0 && hasVisitRoute" type="text"
@click="jumpToVisitList(scope.row.TrialSiteId)">
{{ scope.row.VisitCount }}
</el-button>
<span v-else> {{ scope.row.VisitCount }}</span>
</template>
</el-table-column>
<!-- Staff -->
<el-table-column
prop="UserCount"
min-width="150"
:label="$t('trials:site:table:staff')"
show-overflow-tooltip
>
<el-table-column prop="UserCount" min-width="150" :label="$t('trials:site:table:staff')" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" @click="getStaffList(scope.row)">
{{
@ -131,54 +77,35 @@
</el-button>
</template>
</el-table-column>
<el-table-column prop="" min-width="150" fixed="right" :label="$t('common:action:action')"
show-overflow-tooltip>
<template slot-scope="scope">
<!-- 详情 -->
<el-button icon="el-icon-message" circle :title="$t('trials:site:button:editEmail')"
:disabled="!scope.row.IsHaveSiteSurveyRecord" @click="openSiteEmail(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template>
<base-model v-if="crc_model.visible" :config="crc_model">
<template slot="dialog-body">
<el-table v-loading="userListLoading" :data="userList" height="400">
<!-- Name -->
<el-table-column
prop="FullName"
:label="$t('trials:site:table:name')"
width="150"
/>
<el-table-column prop="FullName" :label="$t('trials:site:table:name')" width="150" />
<!-- User Type -->
<el-table-column
prop="UserType"
:label="$t('trials:site:table:userType')"
width="120"
show-overflow-tooltip
/>
<el-table-column prop="UserType" :label="$t('trials:site:table:userType')" width="120"
show-overflow-tooltip />
<!-- Organization -->
<el-table-column
prop="OrganizationName"
:label="$t('trials:site:table:organization')"
width="150"
/>
<el-table-column prop="OrganizationName" :label="$t('trials:site:table:organization')" width="150" />
<!-- Phone -->
<el-table-column
prop="Phone"
:label="$t('trials:site:table:phone')"
show-overflow-tooltip
sortable="custom"
width="150"
/>
<el-table-column prop="Phone" :label="$t('trials:site:table:phone')" show-overflow-tooltip sortable="custom"
width="150" />
<!-- Status -->
<el-table-column
prop="IsDeleted"
:label="$t('trials:site:table:status')"
show-overflow-tooltip
sortable
min-width="100"
>
<el-table-column prop="IsDeleted" :label="$t('trials:site:table:status')" show-overflow-tooltip sortable
min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('IsUserExitTrial', scope.row.IsDeleted)
@ -189,28 +116,84 @@
</template>
</el-table-column>
<!-- 授权时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:site:table:dataAssigned')"
show-overflow-tooltip
sortable="custom"
min-width="150"
/>
<el-table-column prop="UpdateTime" :label="$t('trials:site:table:dataAssigned')" show-overflow-tooltip
sortable="custom" min-width="150" />
<!-- 禁用时间 -->
<el-table-column
prop="DeletedTime"
:label="$t('trials:site:table:deletedTime')"
show-overflow-tooltip
sortable
min-width="150"
/>
<el-table-column prop="DeletedTime" :label="$t('trials:site:table:deletedTime')" show-overflow-tooltip
sortable min-width="150" />
</el-table>
</template>
</base-model>
<!--发送提醒核对中心人员邮件-->
<base-model :config="checkRemind_model" v-if="checkRemind_model.visible">
<template slot="dialog-body">
<div class="tip">{{ $t('trials:site:checkRemind_form:tip:top') }}</div>
<el-form ref="checkRemind_form" :model="checkRemind_form" :rules="rules" label-width="80px">
<el-form-item :label="$t('trials:site:form:UserId')" prop="UserId">
<el-select v-model="checkRemind_form.UserId" placeholder="" clearable style="width: 100%;"
@change="handleSelectChange">
<el-option v-for="item in checkUserList" :label="item.FullName" :key="item.Id" :value="item.Id">
<div style="display: flex;justify-content: space-between;">
{{ item.FullName }}
<span style="color:#909399">{{ item.UserName }}</span>
</div>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:site:form:UserName')">
<el-input v-model="checkRemind_form.UserName" disabled />
</el-form-item>
<el-form-item :label="$t('trials:site:form:role')">
<el-input v-model="checkRemind_form.Role" disabled />
</el-form-item>
<el-form-item :label="$t('trials:site:form:email')" prop="EMail">
<el-input v-model="checkRemind_form.EMail" />
</el-form-item>
<el-form-item :label="$t('trials:site:form:phone')">
<el-input v-model="checkRemind_form.Phone" disabled />
</el-form-item>
</el-form>
<div class="tip">{{ $t('trials:site:checkRemind_form:tip:bottom') }}</div>
</template>
<template slot="dialog-footer">
<el-button type="primary" @click="sendEMail" :loading="loading">
{{ $t('common:button:confirm') }}
</el-button>
<el-button @click="checkRemind_model.visible = false" :loading="loading">
{{ $t('common:button:cancel') }}
</el-button>
</template>
</base-model>
<!--发送中心人员更新邮件-->
<base-model :config="siteEmail_model" v-if="siteEmail_model.visible">
<template slot="dialog-body">
<div class="tip">{{ siteEmail_tip }}</div>
<el-form ref="siteEmail_form" :model="siteEmail_form" :rules="rules" label-width="80px">
<el-form-item :label="$t('trials:site:form:UserName')">
<el-input v-model="siteEmail_form.UserName" disabled />
</el-form-item>
<el-form-item :label="$t('trials:site:form:email')" prop="EMail">
<el-input v-model="siteEmail_form.EMail" />
</el-form-item>
<el-form-item :label="$t('trials:site:form:phone')">
<el-input v-model="siteEmail_form.Phone" disabled />
</el-form-item>
</el-form>
<div class="tip">{{ $t('trials:site:siteEmail_form:tip:bottom') }}</div>
</template>
<template slot="dialog-footer">
<el-button type="primary" @click="sendEMailTable" :loading="loading">
{{ $t('common:button:confirm') }}
</el-button>
<el-button @click="checkRemind_model.visible = false" :loading="loading">
{{ $t('common:button:cancel') }}
</el-button>
</template>
</base-model>
</BaseContainer>
</template>
<script>
import { getSiteCRCList, getTrialSiteCRCList } from '@/api/trials'
import { getSiteCRCList, getTrialSiteCRCList, getMaintenanceList, sendCheckSiteSurveyUserEmail, sendUpdateSiteSurveyUserEmail, getTrialSiteLatestSurvey } from '@/api/trials'
import BaseContainer from '@/components/BaseContainer'
import BaseModel from '@/components/BaseModel'
import Pagination from '@/components/Pagination'
@ -243,7 +226,41 @@ export default {
userList: [],
trialId: '',
hasSubjectRoute: false,
hasVisitRoute: false
hasVisitRoute: false,
checkRemind_model: {
visible: false,
title: this.$t('trials:site:dialogTitle:checkRemind'),
width: '30%',
},
listLoading: false,
checkUserList: [],
checkRemind_form: { UserId: null, UserName: null, Role: null, EMail: null, Phone: null },
rules: {
UserId: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
],
EMail: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{
// type: 'email',
//'Please input the correct email address'
pattern: new RegExp(this.$reg().EmailRegexStr),
message: this.$t("trials:site:ruleMessage:correctEmail"),
trigger: ['blur'],
},
]
},
siteEmail_model: {
visible: false,
title: this.$t('trials:site:dialogTitle:siteEmail'),
width: '30%',
},
siteEmail_form: { TrialSiteId: null, UserId: null, UserName: null, Role: null, EMail: null, OldEMail: null, Phone: null },
siteEmail_tip: null
}
},
mounted() {
@ -255,6 +272,109 @@ export default {
this.getList()
},
methods: {
async sendEMail() {
try {
let validate = await this.$refs.checkRemind_form.validate()
if (!validate) return false
let data = {
Email: this.checkRemind_form.EMail,
FullName: this.checkRemind_form.FullName,
TrialId: this.trialId
}
this.loading = true
let res = await sendCheckSiteSurveyUserEmail(data)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t("trials:site:message:sendEmailSuccess"))
this.checkRemind_model.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
async sendEMailTable() {
try {
let validate = await this.$refs.siteEmail_form.validate()
if (!validate) return false
let data = {
url: `${location.protocol}//${location.host}/researchLogin?trialId=${this.trialId}&lang=${this.$i18n.locale}&isUpload=1&email=${this.siteEmail_form.EMail}&oldEMail=${this.siteEmail_form.OldEMail}&trialSiteId=${this.siteEmail_form.TrialSiteId}`,
Email: this.siteEmail_form.EMail,
FullName: this.siteEmail_form.UserName,
TrialSiteId: this.siteEmail_form.TrialSiteId
}
this.loading = true
let res = await sendUpdateSiteSurveyUserEmail(data)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t("trials:site:message:sendEmailSuccess"))
this.siteEmail_model.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
handleSelectChange(id) {
let find = this.checkUserList.find(item => item.Id === id)
this.checkRemind_form.FullName = find.FullName
this.checkRemind_form.UserName = find.UserName
this.checkRemind_form.Role = find.TrialUserRoleList.filter(item => item.UserTypeEnum === 10 || item.UserTypeEnum === 12).map(item => item.UserTypeShortName).join(", ")
this.checkRemind_form.EMail = find.EMail
this.checkRemind_form.Phone = find.Phone
},
openCheckRemind() {
this.getMaintenanceList()
Object.keys(this.checkRemind_form).forEach(key => {
this.checkRemind_form[key] = null
})
this.checkRemind_model.visible = true
},
openSiteEmail(row) {
// this.getMaintenanceList()
this.siteEmail_tip = this.$t('trials:site:siteEmail:tip:top').replace("xxx", `${row.TrialSiteCode}${row.TrialSiteName}`)
Object.keys(this.siteEmail_form).forEach(key => {
this.siteEmail_form[key] = null
})
this.getTrialSiteLatestSurvey(row.TrialSiteId)
this.siteEmail_form.TrialSiteId = row.TrialSiteId
this.siteEmail_model.visible = true
},
async getTrialSiteLatestSurvey(id) {
try {
let params = {
TrialSiteId: id
}
let res = await getTrialSiteLatestSurvey(params)
if (res.IsSuccess) {
this.siteEmail_form.UserName = res.Result.UserName
this.siteEmail_form.OldEMail = res.Result.Email
this.siteEmail_form.EMail = res.Result.Email
this.siteEmail_form.Phone = res.Result.Phone
}
} catch (err) {
console.log(err)
}
},
getMaintenanceList() {
this.listLoading = true
let data = {
PageIndex: 1,
PageSize: 9999,
}
data.TrialId = this.trialId
data.UserTypeList = [12, 10]
getMaintenanceList(data)
.then((res) => {
this.listLoading = false
this.checkUserList = res.Result.CurrentPageData
})
.catch(() => {
this.listLoading = false
})
},
getList() {
this.loading = true
this.searchData.TrialId = this.trialId
@ -323,3 +443,8 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.tip {
margin-bottom: 10px;
}
</style>