Compare commits

..

No commits in common. "1286cd1212518359f0675f8d5c8c90693b9ed1b7" and "407f0b85d2de3e41c655ea433e4ddebd3b43efe3" have entirely different histories.

3 changed files with 106 additions and 255 deletions

View File

@ -95,12 +95,8 @@ const searchDataDefault = () => {
RealName: '',
BeginCreateTime: '',
EndCreateTime: '',
EndLastLoginTime: null,
EndLastChangePassWordTime: null,
BeginLastChangePassWordTime: null,
CreateTimeArr: [],
LastLoginTimeArr: [],
LastChangePassWordTimeArr: [],
SortField: 'CreateTime',
}
}
@ -206,13 +202,6 @@ export default {
sortable: 'custom',
showOverflowTooltip: true,
},
{
prop: 'LastChangePassWordTime',
label: this.$t('system:userlist:table:LastChangePassWordTime'),
minWidth: 200,
sortable: 'custom',
showOverflowTooltip: true,
},
{
prop: 'CreateTime',
label: this.$t('system:userlist:table:createTime'),
@ -224,7 +213,7 @@ export default {
type: 'operate',
label: this.$t('common:action:action'),
minWidth: 200,
fixed: 'right',
fixed:"right",
operates: [
{
name: this.$t('common:button:edit'),
@ -349,13 +338,6 @@ export default {
width: '400px',
placeholder: '',
},
{
type: 'Daterange',
label: this.$t('system:userlist:label:LastChangePassWordTime'),
prop: 'LastChangePassWordTimeArr',
width: '400px',
placeholder: '',
},
{
type: 'Daterange',
label: this.$t('system:userlist:label:CreateTime'),
@ -460,12 +442,6 @@ export default {
this.searchData.BeginLastLoginTime = this.searchData.LastLoginTimeArr[0]
this.searchData.EndLastLoginTime = this.searchData.LastLoginTimeArr[1]
}
if (this.searchData.LastChangePassWordTimeArr.length > 0) {
this.searchData.BeginLastChangePassWordTime =
this.searchData.LastChangePassWordTimeArr[0]
this.searchData.EndLastChangePassWordTime =
this.searchData.LastChangePassWordTimeArr[1]
}
this.getList()
},
},

View File

@ -337,8 +337,3 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.el-radio-group {
margin-top: 12px;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<el-container class="participant-container">
<el-header style="height: 50px">
<el-header style="height:50px">
<div class="filter-container">
<!-- 姓名 -->
<span>{{ $t('trials:externalStaff:table:name') }}:</span>
@ -12,54 +12,23 @@
<span>{{ $t('trials:externalStaff:table:phone') }}:</span>
<el-input v-model="listQuery.Phone" size="mini" class="mr" clearable />
<!-- 查询 -->
<el-button
type="primary"
size="mini"
icon="el-icon-search"
@click="handleSearch"
>
<el-button type="primary" size="mini" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<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') }}
</el-button>
<!-- 权限配置 -->
<el-button
type="primary"
size="mini"
style="margin-left: auto"
:loading="assignLoadStatus"
@click="openPermission"
>
<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: 10px"
: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>
<!-- 添加 -->
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
style="margin-left: 10px"
:loading="assignLoadStatus"
@click="handleAdd"
>
<el-button type="primary" icon="el-icon-plus" size="mini" style="margin-left:10px" :loading="assignLoadStatus" @click="handleAdd">
{{ $t('trials:staff:button:addExternalStaff') }}
</el-button>
</div>
@ -88,9 +57,7 @@
sortable="custom"
min-width="100"
>
<template slot-scope="scope">{{
scope.row.LastName + ' / ' + scope.row.FirstName
}}</template>
<template slot-scope="scope">{{ scope.row.LastName + ' / ' + scope.row.FirstName }}</template>
</el-table-column>
<el-table-column
prop="UserType"
@ -100,13 +67,7 @@
min-width="120"
>
<template slot-scope="scope">
{{
userTypeOptions.length > 0
? userTypeOptions.find((v) => {
return v.Id == scope.row.UserTypeId
}).UserTypeShortName
: ''
}}
{{ userTypeOptions.length > 0 ? userTypeOptions.find((v) => { return v.Id == scope.row.UserTypeId }).UserTypeShortName : '' }}
</template>
</el-table-column>
<el-table-column
@ -139,15 +100,9 @@
sortable="custom"
min-width="120"
>
<template slot-scope="scope">{{
$fd('IsJoin', scope.row.IsJoin)
}}</template>
<template slot-scope="scope">{{ $fd('IsJoin', scope.row.IsJoin) }}</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
min-width="150"
>
<el-table-column :label="$t('common:action:action')" fixed="right" min-width="150">
<template slot-scope="scope">
<el-button
circle
@ -161,57 +116,23 @@
</el-table>
</div>
</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-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 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-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 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-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 v-for="item in $d.YesOrNo" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
@ -238,14 +159,7 @@
</el-container>
</template>
<script>
import {
getTrialExternalUserList,
addTrialUsers,
getUserTypeList,
sendExternalUserJoinEmail,
getTrialConfigInfo,
configTrialSPMInfo,
} 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'
@ -253,11 +167,11 @@ const getListQueryDefault = () => {
return {
Phone: '',
Email: '',
Name: '',
Name: ''
}
}
export default {
components: { StaffExternalAdd, BaseModel },
components: { StaffExternalAdd,BaseModel },
data() {
return {
list: [],
@ -267,26 +181,17 @@ export default {
assignLoadStatus: false,
// isAdmin: JSON.parse(zzSessionStorage.getItem('IsAdmin')),
userTypeOptions: [],
stateList: [
'WaitSent',
'HasSend',
'UserConfirmed',
'UserReject',
'OverTime',
],
stateList: ['WaitSent', 'HasSend', 'UserConfirmed', 'UserReject', 'OverTime'],
trialId: '',
model_config: {
visible: false,
title: this.$t('trials:staff:dialogTitle:permissionConfiguration'),
width: '500px',
appendToBody: true,
model_config:{
visible: false, title: this.$t('trials:staff:dialogTitle:permissionConfiguration'), width: '500px', appendToBody: true
},
permission: {
permission:{
IsSPMJoinReReadingApproval: false,
IsSPMJoinReviewerSelect: false,
IsSPMJoinSiteSurvey: false,
},
permissionRole: {},
permissionRole:{}
}
},
mounted() {
@ -296,42 +201,42 @@ export default {
},
methods: {
//
async getPermission() {
try {
let res = await getTrialConfigInfo(this.trialId)
if (res.IsSuccess) {
Object.keys(this.permission).forEach((key) => {
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) {
}catch(err){
console.log(err)
}
},
//
async openPermission() {
try {
await this.getPermission()
this.model_config.visible = true
} 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 = await 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'))
async savePermission(){
try{
let validate =await 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
}catch(err){
this.assignLoadStatus = false;
console.log(err)
}
},
@ -344,108 +249,83 @@ export default {
},
handleEdit(row) {
this.$nextTick(() => {
this.$refs['StaffExternalAdd'].openDialog(
this.$t('trials:externalStaff:dialogTitle:edit'),
row
)
this.$refs['StaffExternalAdd'].openDialog(this.$t('trials:externalStaff:dialogTitle:edit'), row)
})
},
handleAdd() {
this.$nextTick(() => {
this.$refs['StaffExternalAdd'].openDialog(
this.$t('trials:externalStaff:dialogTitle:add'),
{}
)
this.$refs['StaffExternalAdd'].openDialog(this.$t('trials:externalStaff:dialogTitle:add'), {})
})
},
deleteTrialExternalUser(row) {
this.$confirm(this.$t('trials:externalStaff:message:delete'), {
type: 'warning',
distinguishCancelAndClose: true,
}).then(() => {
distinguishCancelAndClose: true
})
.then(() => {
this.loading = true
deleteTrialExternalUser(row.Id, row.IsSystemUser, row.SystemUserId)
.then((res) => {
.then(res => {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getList()
this.loading = false
})
.catch(() => {
this.loading = false
})
}).catch(() => { this.loading = false })
})
},
sendEmail() {
const loading = this.$loading({
target: document.querySelector('.participant-table-list'),
fullscreen: false,
lock: true,
lock: true
})
// var BaseUrl = document.domain + `/#/login`
var BaseUrl = `${location.protocol}//${location.host}/login`
var joinUrl = `${location.protocol}//${location.host}/email-recompose`
var sendEmailUserArr = this.selectArr.map((v) => {
return {
Id: v.Id,
Email: v.Email,
IsSystemUser: v.IsSystemUser,
SystemUserId: v.SystemUserId,
UserTypeId: v.UserTypeId,
}
})
var sendEmailUserArr = this.selectArr.map((v) => { return { Id: v.Id, Email: v.Email, IsSystemUser: v.IsSystemUser, SystemUserId: v.SystemUserId } })
sendExternalUserJoinEmail({
TrialId: this.trialId,
SendUsers: sendEmailUserArr,
BaseUrl: BaseUrl,
RouteUrl: joinUrl,
})
.then(() => {
RouteUrl: joinUrl
}).then(() => {
loading.close()
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.getList()
this.$emit('getList')
})
.catch(() => {
loading.close()
})
}).catch(() => { loading.close() })
},
getList() {
const loading = this.$loading({
target: document.querySelector('.participant-table-list'),
fullscreen: false,
lock: true,
lock: true
})
this.listQuery.TrialId = this.trialId
getTrialExternalUserList(this.listQuery)
.then((res) => {
getTrialExternalUserList(this.listQuery).then(res => {
loading.close()
this.list = res.Result
})
.catch(() => {
loading.close()
})
}).catch(() => { loading.close() })
},
handleAssign() {
this.$confirm(this.$t('trials:externalStaff:message:add'), {
type: 'warning',
distinguishCancelAndClose: true,
distinguishCancelAndClose: true
}).then(() => {
const loading = this.$loading({
target: document.querySelector('.participant-table-list'),
fullscreen: false,
lock: true,
lock: true
})
this.assignLoadStatus = true
addTrialUsers(this.selectArr)
.then((res) => {
.then(res => {
this.assignLoadStatus = false
loading.close()
if (res.IsSuccess) {
this.$emit('closeDialog')
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
})
.catch(() => {
}).catch(() => {
loading.close()
this.assignLoadStatus = false
})
@ -480,35 +360,35 @@ export default {
}
},
getUserType() {
getUserTypeList(1).then((res) => {
getUserTypeList(1).then(res => {
this.userTypeOptions = res.Result
})
},
},
}
}
}
</script>
<style lang="scss" scoped>
.participant-container {
.participant-container{
height: 100%;
.el-header {
.filter-container {
.el-header{
.filter-container{
display: flex;
align-items: center;
span {
font-size: 13px;
margin-right: 5px;
span{
font-size:13px;
margin-right:5px;
}
.mr {
.mr{
margin-right: 5px;
width: 120px;
}
}
}
.el-main {
.el-main{
padding: 0px;
}
.el-footer {
.el-footer{
padding: 0 20px;
}
}
}
</style>