Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-09-20 16:21:15 +08:00
commit 40642a4fe6
3 changed files with 670 additions and 375 deletions

View File

@ -1,11 +1,29 @@
<template>
<div style="display: flex;justify-content: center">
<div style="width: 600px;text-align: center;border: 1px solid #e6e6e6;margin-top:40px;padding:10px;">
<div class="trial-myinfo-head" style="font-size: 30px;line-height: 120px;">
<div style="display: flex; justify-content: center">
<div
style="
width: 600px;
text-align: center;
border: 1px solid #e6e6e6;
margin-top: 40px;
padding: 10px;
"
>
<div
class="trial-myinfo-head"
style="font-size: 30px; line-height: 120px"
>
<!-- 首次登录修改密码 -->
{{ $t('recompose:title:init') }}
</div>
<el-form ref="passwordForm" v-loading="loading" label-position="right" :model="password" :rules="passwordFormRules" label-width="200px">
<el-form
ref="passwordForm"
v-loading="loading"
label-position="right"
:model="password"
:rules="passwordFormRules"
:label-width="$i18n.locale == 'zh' ? '100px' : '200px'"
>
<!-- 邮箱 -->
<el-form-item :label="$t('recompose:form:email')" prop="Email">
<el-input v-model="password.Email" disabled />
@ -19,70 +37,106 @@
<el-input v-model="password.NewUserName" />
</el-form-item>
<!-- 新密码 -->
<el-form-item :label="$t('recompose:form:newPassword')" prop="NewPassWord">
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" />
<el-form-item
:label="$t('recompose:form:newPassword')"
prop="NewPassWord"
>
<el-input
v-model="password.NewPassWord"
type="password"
show-password
auto-complete="new-password"
/>
</el-form-item>
<!-- 确认密码 -->
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" />
<el-form-item
:label="$t('recompose:form:confirmPassword')"
prop="ConfirmPassWord"
>
<el-input
v-model="password.ConfirmPassWord"
type="password"
show-password
auto-complete="new-password"
/>
</el-form-item>
<el-form-item style="text-align:right">
<el-form-item style="text-align: right">
<!-- 取消 -->
<el-button
size="small"
@click="cancel"
>
<el-button size="small" @click="cancel">
{{ $t('recompose:button:cancel') }}
</el-button>
<!-- 保存 -->
<el-button
type="primary"
size="small"
@click="save"
>
<el-button type="primary" size="small" @click="save">
{{ $t('recompose:button:save') }}
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
import { initSetUserNameAndPwd } from '@/api/admin.js'
import md5 from 'js-md5'
import {mapGetters, mapMutations} from "vuex";
import { mapGetters, mapMutations } from 'vuex'
export default {
data() {
return {
password: {
NewUserName: null,
UserId: null
UserId: null,
},
passwordFormRules: {
NewUserName: [{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' }],
NewUserName: [
{
required: true,
validator: (rule, value, callback) => {
!value
? callback(
new Error(this.$t('trials:researchForm:formRule:specify'))
)
: callback()
},
trigger: 'blur',
},
],
NewPassWord: [
{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' },
{
required: true,
validator: (rule, value, callback) => {
!value
? callback(
new Error(this.$t('trials:researchForm:formRule:specify'))
)
: callback()
},
trigger: 'blur',
},
{
required: true,
trigger: 'blur',
validator: this.$validatePassword
validator: this.$validatePassword,
},
],
ConfirmPassWord: [
{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' }
]
{
required: true,
validator: (rule, value, callback) => {
!value
? callback(
new Error(this.$t('trials:researchForm:formRule:specify'))
)
: callback()
},
trigger: 'blur',
},
],
},
userId: null,
loading: false
loading: false,
}
},
computed: {
...mapGetters([
'asyncRoutes',
'routes',
'language'
])
...mapGetters(['asyncRoutes', 'routes', 'language']),
},
mounted() {
this.password.UserId = this.$route.query.UserId
@ -112,7 +166,7 @@ export default {
this.$updateDictionary()
},
save() {
this.$refs.passwordForm.validate(valid => {
this.$refs.passwordForm.validate((valid) => {
if (valid) {
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
//
@ -123,26 +177,32 @@ export default {
NewUserName: this.password.NewUserName,
UserId: this.password.UserId,
NewPwd: md5(this.password.NewPassWord),
access_token: this.password.access_token
access_token: this.password.access_token,
}
this.loading = true
initSetUserNameAndPwd(param).then(res => {
this.loading = false
if (res.IsSuccess) {
// ,
this.$message.success(this.$t('recompose:message:updatedSuccessfully'))
setTimeout(() => {
this.logout()
}, 500)
}
}).catch(() => { this.loading = false })
initSetUserNameAndPwd(param)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
// ,
this.$message.success(
this.$t('recompose:message:updatedSuccessfully')
)
setTimeout(() => {
this.logout()
}, 500)
}
})
.catch(() => {
this.loading = false
})
}
})
},
cancel() {
this.$refs['passwordForm'].resetFields()
}
}
},
},
}
</script>
<style>
@ -165,13 +225,16 @@ export default {
<style scoped>
input:-webkit-autofill {
-webkit-text-fill-color: #ededed !important;
box-shadow: 0 0 0px 1000px transparent inset !important;
background-color:transparent;
box-shadow: 0 0 0px 1000px transparent inset !important;
background-color: transparent;
background-image: none;
transition: background-color 50000s ease-in-out 0s;
}
input {
background-color:transparent;
background-color: transparent;
caret-color: #fff;
}
.el-form-item {
margin-bottom: 30px;
}
</style>

View File

@ -8,7 +8,7 @@
style="float: right"
v-if="status === 'add'"
>
{{ $t("common:button:add") }}
{{ $t('common:button:add') }}
</el-button>
<el-table v-loading="loading" :data="list" stripe>
<!-- AE 名称 -->
@ -44,6 +44,9 @@
prop="action"
:label="$t('trials:sitesList:dicomAEList:table:action')"
min-width="120"
v-if="
hasPermi(['trials:trials-panel:setting:personnel-manage:edit-site'])
"
>
<template slot-scope="scope">
<el-button
@ -67,9 +70,9 @@
</base-model>
</template>
<script>
import BaseModel from "@/components/BaseModel";
import dicomForm from "./dicomForm.vue";
import { getTrialSiteDicomAEList, deleteTrialSiteDicomAE } from "@/api/trials";
import BaseModel from '@/components/BaseModel'
import dicomForm from './dicomForm.vue'
import { getTrialSiteDicomAEList, deleteTrialSiteDicomAE } from '@/api/trials'
const defaultSearchData = () => {
return {
TrialSiteId: null,
@ -77,88 +80,93 @@ const defaultSearchData = () => {
Ip: null,
Port: null,
Description: null,
};
};
}
}
export default {
name: "dicomAE",
name: 'dicomAE',
components: { BaseModel, dicomForm },
data() {
return {
config: {
visible: false,
title: null,
width: "800px",
width: '800px',
appendToBody: true,
},
status: "add",
status: 'add',
TrialSiteId: null,
loading: false,
list: [],
searchData: defaultSearchData(),
siteData: {},
};
}
},
methods: {
open(row, status = "add") {
this.status = status;
this.TrialSiteId = row.TrialSiteId;
open(row, status = 'add') {
this.status = status
this.TrialSiteId = row.TrialSiteId
this.config.title = this.$t(
"trials:trials-panel:setting:personnel-manage:dicomAETitle"
).replace("xxx", `${row.TrialSiteCode}${row.TrialSiteAliasName}`);
this.siteData = row;
this.config.visible = true;
this.getList();
'trials:trials-panel:setting:personnel-manage:dicomAETitle'
).replace('xxx', `${row.TrialSiteCode}${row.TrialSiteAliasName}`)
this.siteData = row
this.config.visible = true
this.getList()
console.log(
this.hasPermi([
'trials:trials-panel:setting:personnel-manage:edit-site',
])
)
},
// dicomAE
async getList() {
try {
this.searchData.TrialSiteId = this.TrialSiteId;
this.loading = true;
let res = await getTrialSiteDicomAEList(this.searchData);
this.loading = false;
this.searchData.TrialSiteId = this.TrialSiteId
this.loading = true
let res = await getTrialSiteDicomAEList(this.searchData)
this.loading = false
if (res.IsSuccess) {
this.list = res.Result;
this.list = res.Result
}
} catch (err) {
console.log(err);
this.loading = false;
console.log(err)
this.loading = false
}
},
//
openAdd() {
this.$refs.dicomForm.open(this.siteData, null, "add");
this.$refs.dicomForm.open(this.siteData, null, 'add')
},
save() {
this.$emit("getList");
this.$emit('getList')
},
// dicom
editDicom(row) {
this.$refs.dicomForm.open(this.siteData, row, "edit");
},
this.$refs.dicomForm.open(this.siteData, row, 'edit')
},
// dicom
async delDicom(row) {
try {
let confirm = await this.$confirm(
this.$t("trials:sitesList:dicomAEList:confirm:delMessage"),
this.$t('trials:sitesList:dicomAEList:confirm:delMessage'),
{
type: "warning",
type: 'warning',
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("common:button:cancel"),
confirmButtonText: this.$t('common:button:confirm'),
cancelButtonText: this.$t('common:button:cancel'),
}
);
if (confirm !== "confirm") return;
let res = await deleteTrialSiteDicomAE(row.Id);
)
if (confirm !== 'confirm') return
let res = await deleteTrialSiteDicomAE(row.Id)
if (res.IsSuccess) {
this.getList();
this.save();
this.$t("common:message:deletedSuccessfully");
this.getList()
this.save()
this.$t('common:message:deletedSuccessfully')
}
} catch (err) {
console.log(err);
console.log(err)
}
},
},
};
}
</script>
<style lang="scss" scoped></style>