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

View File

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

View File

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