1.07部分问题修复
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
50dd74b4ce
commit
3c664e9ba6
|
@ -334,3 +334,11 @@ export function updateUserRoleInfo(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
// 管理端新增用户发送邮件
|
||||
export function addNewUserSendEmail(data) {
|
||||
return request({
|
||||
url: `/User/addNewUserSendEmail`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -3950,4 +3950,12 @@ export function setTrialQuestionExportResult(data) {
|
|||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目加入人员发送邮件
|
||||
export function trialUserSendJoinEmail(data) {
|
||||
return request({
|
||||
url: `/TrialMaintenance/trialUserSendJoinEmail`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
|
@ -64,6 +64,10 @@
|
|||
<el-button
|
||||
:size="operate.size || 'mini'"
|
||||
:type="operate.type || 'primary'"
|
||||
v-if="
|
||||
(operate.show && scope.row[operate.show]) ||
|
||||
!operate.show
|
||||
"
|
||||
style="margin-right: 5px"
|
||||
@click="handleClick(operate, scope.row)"
|
||||
>{{ operate.name }}</el-button
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
<template>
|
||||
<base-model v-if="config.visible" :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-form ref="form" :model="curData" max-height="500px">
|
||||
<template v-for="key in curDataArr">
|
||||
<el-form-item
|
||||
:key="key"
|
||||
:label="$t(`system:loginLog:form:${key}`)"
|
||||
label-width="120px"
|
||||
style="margin-bottom: 0px"
|
||||
>
|
||||
<span v-if="key !== 'UserRoleList'">{{ curData[key] }}</span>
|
||||
<el-table :data="curData" border style="width: 100%" size="small">
|
||||
<el-table-column
|
||||
prop="key"
|
||||
:label="$t('system:loginLog:table:cfgItem')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="value"
|
||||
:label="$t('system:loginLog:table:cfgVal')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.prop !== 'UserRoleList'">{{
|
||||
scope.row.value
|
||||
}}</span>
|
||||
<template v-else>
|
||||
<div
|
||||
v-for="item in curData[key]"
|
||||
v-for="item in scope.row.value"
|
||||
:key="item.UserTypeEnum"
|
||||
style="margin: 0"
|
||||
>
|
||||
|
@ -21,9 +27,9 @@
|
|||
}}{{ $fd('IsEnable', !item.IsUserRoleDisabled) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button type="primary" @click="config.visible = false">
|
||||
|
@ -76,12 +82,18 @@ export default {
|
|||
return Object.keys(this.curData)
|
||||
},
|
||||
curData() {
|
||||
if (!this.JsonObj) return {}
|
||||
if (!this.JsonObj) return []
|
||||
let obj = JSON.parse(this.JsonObj)
|
||||
let curData = {}
|
||||
let curData = []
|
||||
console.log(obj, 'obj')
|
||||
Object.keys(obj).forEach((key) => {
|
||||
if (this.curKeys.includes(key)) {
|
||||
curData[key] = obj[key]
|
||||
let o = {
|
||||
key: this.$t(`system:loginLog:form:${key}`),
|
||||
value: obj[key],
|
||||
prop: key,
|
||||
}
|
||||
curData.push(o)
|
||||
}
|
||||
})
|
||||
return curData
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('system:userlist:table:Email')" prop="EMail">
|
||||
<el-input v-model="user.EMail" />
|
||||
<el-input v-model="user.EMail" :disabled="user.UserCode" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:userlist:table:Phone')" prop="Phone">
|
||||
<el-input v-model="user.Phone" />
|
||||
|
@ -89,7 +89,7 @@
|
|||
>
|
||||
<template v-for="userType of userTypeOptions">
|
||||
<el-option
|
||||
v-if="![4, 6, 20].includes(userType.UserTypeEnum)"
|
||||
v-if="![4, 6, 20].includes(userType.UserTypeEnum)"
|
||||
:key="userType.Id"
|
||||
:label="userType.UserType"
|
||||
:value="userType.Id"
|
||||
|
@ -291,7 +291,12 @@ export default {
|
|||
getUserTypeList() {
|
||||
getUserTypeListByUserType(0).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.userTypeOptions = res.Result
|
||||
this.userTypeOptions = []
|
||||
res.Result.forEach((item) => {
|
||||
if (item.UserTypeEnum !== 21) {
|
||||
this.userTypeOptions.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
:total="total"
|
||||
@getList="getList"
|
||||
@editCb="handleEditUser"
|
||||
@sendCb="addNewUserSendEmail"
|
||||
@deleteCb="handleDeleteUser"
|
||||
@sortByColumn="sortByColumn"
|
||||
>
|
||||
|
@ -73,7 +74,12 @@
|
|||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserList, getUserTypeList, deleteSysUser } from '@/api/admin'
|
||||
import {
|
||||
getUserList,
|
||||
getUserTypeList,
|
||||
deleteSysUser,
|
||||
addNewUserSendEmail,
|
||||
} from '@/api/admin'
|
||||
// import { searchForm, searchHandle, columns } from './list'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SearchForm from '@/components/BaseForm/search-form'
|
||||
|
@ -231,6 +237,12 @@ export default {
|
|||
type: 'primary',
|
||||
emitKey: 'editCb',
|
||||
},
|
||||
{
|
||||
name: this.$t('common:button:email'),
|
||||
type: 'primary',
|
||||
emitKey: 'sendCb',
|
||||
show: 'IsFirstAdd',
|
||||
},
|
||||
// {
|
||||
// name: this.$t('common:button:delete'),
|
||||
// type: 'danger',
|
||||
|
@ -395,6 +407,31 @@ export default {
|
|||
diffTime(time) {
|
||||
return moment(new Date()).diff(time, 'days')
|
||||
},
|
||||
async addNewUserSendEmail(row) {
|
||||
try {
|
||||
let confirm = await this.$confirm(
|
||||
this.$t('system:userlist:confirm:sendEmail')
|
||||
)
|
||||
if (!confirm) return false
|
||||
let data = {
|
||||
IdentityUserId: row.Id,
|
||||
BaseUrl: `${location.protocol}//${location.host}/login`,
|
||||
RouteUrl: `${location.protocol}//${location.host}/email-recompose`,
|
||||
}
|
||||
this.loading = true
|
||||
let res = await addNewUserSendEmail(data)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(
|
||||
this.$t('system:userlist:message:sendEmailSuccess')
|
||||
)
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 获取用户信息
|
||||
getList() {
|
||||
this.loading = true
|
||||
|
|
|
@ -353,7 +353,7 @@
|
|||
<!-- 修改参与者人员状态 -->
|
||||
<base-model v-if="status_model.visible" :config="status_model">
|
||||
<template slot="dialog-body">
|
||||
<span>{{ $t('trials:internalStaff:table:status') }}:</span>
|
||||
<span style="margin-right: 5px;">{{ $t('trials:internalStaff:table:status') }}:</span>
|
||||
<el-radio-group v-model="staffStatus">
|
||||
<el-radio
|
||||
v-for="item of $d.IsUserExitTrial"
|
||||
|
|
|
@ -289,6 +289,14 @@
|
|||
"
|
||||
@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)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -503,6 +511,7 @@ import {
|
|||
updateTrialUser,
|
||||
trialUserListExport,
|
||||
updateTrialUserRole,
|
||||
trialUserSendJoinEmail,
|
||||
} from '@/api/trials'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import StaffForm from './staffForm'
|
||||
|
@ -583,6 +592,33 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 发送邮件
|
||||
async handleSendEmail(row) {
|
||||
try {
|
||||
let confirm = await this.$confirm(
|
||||
this.$t('trials:staff:confirm:sendEmail')
|
||||
)
|
||||
if (!confirm) return false
|
||||
let data = {
|
||||
TrialId: this.$route.query.trialId,
|
||||
IdentityUserId: row.IdentityUserId,
|
||||
BaseUrl: `${location.protocol}//${location.host}/login`,
|
||||
RouteUrl: `${location.protocol}//${location.host}/email-recompose`,
|
||||
}
|
||||
this.listLoading = true
|
||||
let res = await trialUserSendJoinEmail(data)
|
||||
this.listLoading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(
|
||||
this.$t('trials:staff:message:sendEmailSuccess')
|
||||
)
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.listLoading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 修改角色状态
|
||||
async changeRoleStatus(row, status) {
|
||||
try {
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<div class="my_select_box" :class="{selected: selected === 'SiteResearch'}" tab-data="SiteResearch" @click="selected = 'SiteResearch'" v-if="hasPermi(['trials:trials-workbench:attachments:site-research'])&&!hasPermi(['role:admin'])">
|
||||
<div class="my_select_box_content">
|
||||
<span class="el-icon-edit-outline" style="padding: 4px;margin: 4px;color: #6698ff"></span>
|
||||
<span class="my_select_box_content_text">{{ $t('trials:workbench:title:pendingSiteResearch') }}</span><span style="margin:0 0.25rem">·</span><span>{{hasPermi(['role:pm'])? tabList.PM_SiteSurveryCount : tabList.SPM_SiteSurveryCount }}</span>
|
||||
<span class="my_select_box_content_text">{{ $t('trials:workbench:title:pendingSiteResearch') }}</span><span style="margin:0 0.25rem">·</span><span>{{hasPermi(['role:pm','role:apm'])? tabList.PM_SiteSurveryCount : tabList.SPM_SiteSurveryCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- SPM/CPM -->
|
||||
|
|
Loading…
Reference in New Issue