|
|
@ -19,8 +19,12 @@
|
|
|
|
<el-button size="mini" type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
|
|
|
<el-button size="mini" 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="mini" style="margin-left:auto" :loading="assignLoadStatus" @click="openPermission">
|
|
|
|
|
|
|
|
{{ $t('trials:staff:button:permissionConfiguration') }}
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<!-- 发送邮件 -->
|
|
|
|
<!-- 发送邮件 -->
|
|
|
|
<el-button type="primary" size="mini" style="margin-left:auto" :disabled="selectArr.length === 0" :loading="assignLoadStatus" icon="el-icon-message" @click="sendEmail">
|
|
|
|
<el-button type="primary" size="mini" style="margin-left:10px" :disabled="selectArr.length === 0" :loading="assignLoadStatus" icon="el-icon-message" @click="sendEmail">
|
|
|
|
{{ $t('trials:staff:button:sendEmail') }}
|
|
|
|
{{ $t('trials:staff:button:sendEmail') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<!-- 添加 -->
|
|
|
|
<!-- 添加 -->
|
|
|
@ -113,12 +117,52 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-main>
|
|
|
|
</el-main>
|
|
|
|
<StaffExternalAdd ref="StaffExternalAdd" :user-type-options="userTypeOptions" @getList="refeshList" />
|
|
|
|
<StaffExternalAdd ref="StaffExternalAdd" :user-type-options="userTypeOptions" @getList="refeshList" />
|
|
|
|
|
|
|
|
<base-model v-if="model_config.visible" :config="model_config">
|
|
|
|
|
|
|
|
<template slot="dialog-body">
|
|
|
|
|
|
|
|
<el-form :model="permission" :rules="permissionRole" ref="permissionForm" label-width="140px" class="demo-ruleForm">
|
|
|
|
|
|
|
|
<el-form-item :label="$t('trials:externalStaff:form:IsSPMJoinReReadingApproval')" prop="IsSPMJoinReReadingApproval">
|
|
|
|
|
|
|
|
<el-radio-group v-model="permission.IsSPMJoinReReadingApproval">
|
|
|
|
|
|
|
|
<el-radio v-for="item in $d.YesOrNo" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
|
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item :label="$t('trials:externalStaff:form:IsSPMJoinReviewerSelect')" prop="IsSPMJoinReviewerSelect">
|
|
|
|
|
|
|
|
<el-radio-group v-model="permission.IsSPMJoinReviewerSelect">
|
|
|
|
|
|
|
|
<el-radio v-for="item in $d.YesOrNo" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
|
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item :label="$t('trials:externalStaff:form:IsSPMJoinSiteSurvey')" prop="IsSPMJoinSiteSurvey">
|
|
|
|
|
|
|
|
<el-radio-group v-model="permission.IsSPMJoinSiteSurvey">
|
|
|
|
|
|
|
|
<el-radio v-for="item in $d.YesOrNo" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
|
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template slot="dialog-footer">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
:disabled="assignLoadStatus"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="model_config.visible = false"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ $t('common:button:cancel') }}
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
:loading="assignLoadStatus"
|
|
|
|
|
|
|
|
@click="savePermission"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ $t('common:button:save') }}
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</base-model>
|
|
|
|
</el-container>
|
|
|
|
</el-container>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { getTrialExternalUserList, addTrialUsers, getUserTypeList, sendExternalUserJoinEmail } from '@/api/trials'
|
|
|
|
import { getTrialExternalUserList, addTrialUsers, getUserTypeList, sendExternalUserJoinEmail, getTrialConfigInfo, configTrialSPMInfo } from '@/api/trials'
|
|
|
|
import { deleteTrialExternalUser } from '@/api/trials/setting.js'
|
|
|
|
import { deleteTrialExternalUser } from '@/api/trials/setting.js'
|
|
|
|
import StaffExternalAdd from './staffExternalAdd'
|
|
|
|
import StaffExternalAdd from './staffExternalAdd'
|
|
|
|
|
|
|
|
import BaseModel from '@/components/BaseModel'
|
|
|
|
const getListQueryDefault = () => {
|
|
|
|
const getListQueryDefault = () => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
Phone: '',
|
|
|
|
Phone: '',
|
|
|
@ -127,7 +171,7 @@ const getListQueryDefault = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: { StaffExternalAdd },
|
|
|
|
components: { StaffExternalAdd,BaseModel },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
@ -138,7 +182,16 @@ export default {
|
|
|
|
isAdmin: JSON.parse(zzSessionStorage.getItem('IsAdmin')),
|
|
|
|
isAdmin: JSON.parse(zzSessionStorage.getItem('IsAdmin')),
|
|
|
|
userTypeOptions: [],
|
|
|
|
userTypeOptions: [],
|
|
|
|
stateList: ['WaitSent', 'HasSend', 'UserConfirmed', 'UserReject', 'OverTime'],
|
|
|
|
stateList: ['WaitSent', 'HasSend', 'UserConfirmed', 'UserReject', 'OverTime'],
|
|
|
|
trialId: ''
|
|
|
|
trialId: '',
|
|
|
|
|
|
|
|
model_config:{
|
|
|
|
|
|
|
|
visible: false, title: this.$t('trials:staff:dialogTitle:permissionConfiguration'), width: '500px', appendToBody: true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
permission:{
|
|
|
|
|
|
|
|
IsSPMJoinReReadingApproval: false,
|
|
|
|
|
|
|
|
IsSPMJoinReviewerSelect: false,
|
|
|
|
|
|
|
|
IsSPMJoinSiteSurvey: false,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
permissionRole:{}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
@ -147,6 +200,46 @@ export default {
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
// 获取权限配置
|
|
|
|
|
|
|
|
async getPermission(){
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
let res = await getTrialConfigInfo(this.trialId);
|
|
|
|
|
|
|
|
if(res.IsSuccess){
|
|
|
|
|
|
|
|
Object.keys(this.permission).forEach(key=>{
|
|
|
|
|
|
|
|
this.permission[key] = res.Result[key]
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch(err){
|
|
|
|
|
|
|
|
console.log(err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 打开权限配置弹窗
|
|
|
|
|
|
|
|
async openPermission(){
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
await this.getPermission();
|
|
|
|
|
|
|
|
this.model_config.visible = true;
|
|
|
|
|
|
|
|
}catch(err){
|
|
|
|
|
|
|
|
console.log(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 保存权限配置
|
|
|
|
|
|
|
|
async savePermission(){
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
let validate = this.$refs.permissionForm.validate();
|
|
|
|
|
|
|
|
if(!validate) return false;
|
|
|
|
|
|
|
|
this.assignLoadStatus = true;
|
|
|
|
|
|
|
|
let data = Object.assign({ Id: this.trialId },this.permission)
|
|
|
|
|
|
|
|
let res = await configTrialSPMInfo(data);
|
|
|
|
|
|
|
|
this.assignLoadStatus = false;
|
|
|
|
|
|
|
|
if(res.IsSuccess){
|
|
|
|
|
|
|
|
this.model_config.visible = false;
|
|
|
|
|
|
|
|
this.$message.success(this.$t("common:message:updatedSuccessfully"))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch(err){
|
|
|
|
|
|
|
|
this.assignLoadStatus = false;
|
|
|
|
|
|
|
|
console.log(err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
refeshList() {
|
|
|
|
refeshList() {
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
this.$emit('getList')
|
|
|
|
this.$emit('getList')
|
|
|
|