1.07部分问题修复
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2025-01-08 13:33:56 +08:00
parent 50dd74b4ce
commit 3c664e9ba6
9 changed files with 132 additions and 22 deletions

View File

@ -334,3 +334,11 @@ export function updateUserRoleInfo(data) {
data data
}) })
} }
// 管理端新增用户发送邮件
export function addNewUserSendEmail(data) {
return request({
url: `/User/addNewUserSendEmail`,
method: 'post',
data
})
}

View File

@ -3950,4 +3950,12 @@ export function setTrialQuestionExportResult(data) {
method: 'post', method: 'post',
data data
}) })
}
// 项目加入人员发送邮件
export function trialUserSendJoinEmail(data) {
return request({
url: `/TrialMaintenance/trialUserSendJoinEmail`,
method: 'post',
data
})
} }

View File

@ -64,6 +64,10 @@
<el-button <el-button
:size="operate.size || 'mini'" :size="operate.size || 'mini'"
:type="operate.type || 'primary'" :type="operate.type || 'primary'"
v-if="
(operate.show && scope.row[operate.show]) ||
!operate.show
"
style="margin-right: 5px" style="margin-right: 5px"
@click="handleClick(operate, scope.row)" @click="handleClick(operate, scope.row)"
>{{ operate.name }}</el-button >{{ operate.name }}</el-button

View File

@ -1,18 +1,24 @@
<template> <template>
<base-model v-if="config.visible" :config="config"> <base-model v-if="config.visible" :config="config">
<template slot="dialog-body"> <template slot="dialog-body">
<el-form ref="form" :model="curData" max-height="500px"> <el-table :data="curData" border style="width: 100%" size="small">
<template v-for="key in curDataArr"> <el-table-column
<el-form-item prop="key"
:key="key" :label="$t('system:loginLog:table:cfgItem')"
:label="$t(`system:loginLog:form:${key}`)" show-overflow-tooltip
label-width="120px" />
style="margin-bottom: 0px" <el-table-column
> prop="value"
<span v-if="key !== 'UserRoleList'">{{ curData[key] }}</span> :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> <template v-else>
<div <div
v-for="item in curData[key]" v-for="item in scope.row.value"
:key="item.UserTypeEnum" :key="item.UserTypeEnum"
style="margin: 0" style="margin: 0"
> >
@ -21,9 +27,9 @@
}}{{ $fd('IsEnable', !item.IsUserRoleDisabled) }} }}{{ $fd('IsEnable', !item.IsUserRoleDisabled) }}
</div> </div>
</template> </template>
</el-form-item> </template>
</template> </el-table-column>
</el-form> </el-table>
</template> </template>
<template slot="dialog-footer"> <template slot="dialog-footer">
<el-button type="primary" @click="config.visible = false"> <el-button type="primary" @click="config.visible = false">
@ -76,12 +82,18 @@ export default {
return Object.keys(this.curData) return Object.keys(this.curData)
}, },
curData() { curData() {
if (!this.JsonObj) return {} if (!this.JsonObj) return []
let obj = JSON.parse(this.JsonObj) let obj = JSON.parse(this.JsonObj)
let curData = {} let curData = []
console.log(obj, 'obj')
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (this.curKeys.includes(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 return curData

View File

@ -46,7 +46,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('system:userlist:table:Email')" prop="EMail"> <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>
<el-form-item :label="$t('system:userlist:table:Phone')" prop="Phone"> <el-form-item :label="$t('system:userlist:table:Phone')" prop="Phone">
<el-input v-model="user.Phone" /> <el-input v-model="user.Phone" />
@ -89,7 +89,7 @@
> >
<template v-for="userType of userTypeOptions"> <template v-for="userType of userTypeOptions">
<el-option <el-option
v-if="![4, 6, 20].includes(userType.UserTypeEnum)" v-if="![4, 6, 20].includes(userType.UserTypeEnum)"
:key="userType.Id" :key="userType.Id"
:label="userType.UserType" :label="userType.UserType"
:value="userType.Id" :value="userType.Id"
@ -291,7 +291,12 @@ export default {
getUserTypeList() { getUserTypeList() {
getUserTypeListByUserType(0).then((res) => { getUserTypeListByUserType(0).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.userTypeOptions = res.Result this.userTypeOptions = []
res.Result.forEach((item) => {
if (item.UserTypeEnum !== 21) {
this.userTypeOptions.push(item)
}
})
} }
}) })
}, },

View File

@ -20,6 +20,7 @@
:total="total" :total="total"
@getList="getList" @getList="getList"
@editCb="handleEditUser" @editCb="handleEditUser"
@sendCb="addNewUserSendEmail"
@deleteCb="handleDeleteUser" @deleteCb="handleDeleteUser"
@sortByColumn="sortByColumn" @sortByColumn="sortByColumn"
> >
@ -73,7 +74,12 @@
</box-content> </box-content>
</template> </template>
<script> <script>
import { getUserList, getUserTypeList, deleteSysUser } from '@/api/admin' import {
getUserList,
getUserTypeList,
deleteSysUser,
addNewUserSendEmail,
} from '@/api/admin'
// import { searchForm, searchHandle, columns } from './list' // import { searchForm, searchHandle, columns } from './list'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import SearchForm from '@/components/BaseForm/search-form' import SearchForm from '@/components/BaseForm/search-form'
@ -231,6 +237,12 @@ export default {
type: 'primary', type: 'primary',
emitKey: 'editCb', emitKey: 'editCb',
}, },
{
name: this.$t('common:button:email'),
type: 'primary',
emitKey: 'sendCb',
show: 'IsFirstAdd',
},
// { // {
// name: this.$t('common:button:delete'), // name: this.$t('common:button:delete'),
// type: 'danger', // type: 'danger',
@ -395,6 +407,31 @@ export default {
diffTime(time) { diffTime(time) {
return moment(new Date()).diff(time, 'days') 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() { getList() {
this.loading = true this.loading = true

View File

@ -353,7 +353,7 @@
<!-- 修改参与者人员状态 --> <!-- 修改参与者人员状态 -->
<base-model v-if="status_model.visible" :config="status_model"> <base-model v-if="status_model.visible" :config="status_model">
<template slot="dialog-body"> <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-group v-model="staffStatus">
<el-radio <el-radio
v-for="item of $d.IsUserExitTrial" v-for="item of $d.IsUserExitTrial"

View File

@ -289,6 +289,14 @@
" "
@click="handleStatus(scope.row)" @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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -503,6 +511,7 @@ import {
updateTrialUser, updateTrialUser,
trialUserListExport, trialUserListExport,
updateTrialUserRole, updateTrialUserRole,
trialUserSendJoinEmail,
} from '@/api/trials' } from '@/api/trials'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import StaffForm from './staffForm' import StaffForm from './staffForm'
@ -583,6 +592,33 @@ export default {
this.getList() this.getList()
}, },
methods: { 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) { async changeRoleStatus(row, status) {
try { try {

View File

@ -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" :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"> <div class="my_select_box_content">
<span class="el-icon-edit-outline" style="padding: 4px;margin: 4px;color: #6698ff"></span> <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>
</div> </div>
<!-- SPM/CPM --> <!-- SPM/CPM -->