SPM/CPM增加 流程审批与否的控制
parent
862c6d64cc
commit
d9091fbb79
|
@ -3914,4 +3914,12 @@ export function getVisitClinicalDataName(data) {
|
|||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改外部人员权限配置
|
||||
export function configTrialSPMInfo(data) {
|
||||
return request({
|
||||
url: `/TrialConfig/configTrialSPMInfo`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
|
@ -19,8 +19,12 @@
|
|||
<el-button size="mini" type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</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') }}
|
||||
</el-button>
|
||||
<!-- 添加 -->
|
||||
|
@ -113,12 +117,52 @@
|
|||
</div>
|
||||
</el-main>
|
||||
<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>
|
||||
</template>
|
||||
<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 StaffExternalAdd from './staffExternalAdd'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
const getListQueryDefault = () => {
|
||||
return {
|
||||
Phone: '',
|
||||
|
@ -127,7 +171,7 @@ const getListQueryDefault = () => {
|
|||
}
|
||||
}
|
||||
export default {
|
||||
components: { StaffExternalAdd },
|
||||
components: { StaffExternalAdd,BaseModel },
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
|
@ -138,7 +182,16 @@ export default {
|
|||
isAdmin: JSON.parse(zzSessionStorage.getItem('IsAdmin')),
|
||||
userTypeOptions: [],
|
||||
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() {
|
||||
|
@ -147,6 +200,46 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
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() {
|
||||
this.getList()
|
||||
this.$emit('getList')
|
||||
|
|
Loading…
Reference in New Issue