uat_us
caiyiling 2024-03-11 09:09:58 +08:00
commit ebddc9beb2
68 changed files with 3215 additions and 2853 deletions

View File

@ -129,7 +129,7 @@ export default {
this.fileList = [] this.fileList = []
this.$emit('getFileList', '', '') this.$emit('getFileList', '', '')
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -9,7 +9,7 @@
:file-list="fileList" :file-list="fileList"
:accept="accept" :accept="accept"
> >
<el-button size="small" type="primary" :disabled="isDisabled">Upload</el-button> <el-button size="small" type="primary" :disabled="isDisabled">{{ $t('common:button:upload') }}</el-button>
</el-upload> </el-upload>
</div> </div>
</template> </template>
@ -143,8 +143,7 @@ export default {
this.$confirm('Sure to remove?', { this.$confirm('Sure to remove?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteAttachment(file.Id, file.Path) deleteAttachment(file.Id, file.Path)
.then(res => { .then(res => {
@ -152,7 +151,7 @@ export default {
this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1) this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1)
this.$emit('getFileList', this.fileList) this.$emit('getFileList', this.fileList)
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -29,13 +29,10 @@
</span> </span>
<el-dropdown-menu slot="dropdown" class="user-dropdown"> <el-dropdown-menu slot="dropdown" class="user-dropdown">
<el-dropdown-item v-if="!isReviewer"> <el-dropdown-item v-if="!isReviewer">
<span style="display:block;" @click="editInfo">Edit Info</span> <span style="display:block;" @click="editInfo">{{$t('system:navbar:button:Profile')}}</span>
</el-dropdown-item>
<el-dropdown-item>
<span style="display:block;" @click="account">Account</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item divided> <el-dropdown-item divided>
<span style="display:block;" @click="logout">Log Out</span> <span style="display:block;" @click="logout">{{$t('system:navbar:button:Log Out')}}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -93,9 +90,6 @@ export default {
editInfo() { editInfo() {
this.$router.push({ name: 'BaiscInfo' }) this.$router.push({ name: 'BaiscInfo' })
}, },
account() {
this.$router.push({ name: 'Account' })
}
} }
} }
</script> </script>

View File

@ -255,12 +255,7 @@ export const constantRoutes = [
children: [{ children: [{
path: 'baiscInfo', path: 'baiscInfo',
name: 'BaiscInfo', name: 'BaiscInfo',
component: () => import('@/views/user/editInfo') component: () => import('@/views/user/myInfo')
},
{
path: 'account',
name: 'Account',
component: () => import('@/views/user/account')
} }
] ]
} }

View File

@ -1,137 +1,135 @@
<template> <template>
<div class="app-container menu"> <div class="app-container menu">
<el-tree <el-tree
:props="defaultProps" :props="defaultProps"
:data="treeData" :data="treeData"
node-key="Id" node-key="Id"
:default-expand-all="true" :default-expand-all="true"
:expand-on-click-node="false" :expand-on-click-node="false"
style="width:80%;" style="width:80%;"
> >
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.FunctionName">{{ node.label }} --------------------(Function)</span> <span v-if="data.FunctionName">{{ node.label }} --------------------(Function)</span>
<span v-else>{{ node.label }}</span> <span v-else>{{ node.label }}</span>
<span> <span>
<el-button type="text" icon="el-icon-plus" size="small" @click="() => append(data)">Append</el-button> <el-button type="text" icon="el-icon-plus" size="small" @click="() => append(data)">Append</el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
size="small" size="small"
@click="() => edit(data)" @click="() => edit(data)"
>Edit</el-button> >Edit</el-button>
<el-button type="text" icon="el-icon-delete" size="small" @click="() => remove(data)">Delete</el-button> <el-button type="text" icon="el-icon-delete" size="small" @click="() => remove(data)">Delete</el-button>
</span> </span>
</span> </span>
</el-tree> </el-tree>
<menu-form v-if="model_cfg.visible" :form="currenNode" width="500px" @close="closeModel" /> <menu-form v-if="model_cfg.visible" :form="currenNode" width="500px" @close="closeModel" />
</div> </div>
</template> </template>
<script> <script>
import { getMenuFunction, deleteMenuFunction } from '@/api/admin' import { getMenuFunction, deleteMenuFunction } from '@/api/admin'
import MenuForm from './components/MenuForm' import MenuForm from './components/MenuForm'
import { model_cfg } from './menu' import { model_cfg } from './menu'
export default { export default {
name: 'Menu', name: 'Menu',
components: { MenuForm }, components: { MenuForm },
data() { data() {
return { return {
model_cfg, model_cfg,
treeData: [], treeData: [],
defaultProps: { defaultProps: {
label: 'MenuName', label: 'MenuName',
children: 'Children' children: 'Children'
}, },
dialogVisible: false, dialogVisible: false,
title: '', title: '',
currenNode: {}, currenNode: {},
nodeId: '', nodeId: '',
parentId: '' parentId: ''
} }
}, },
mounted() { mounted() {
this.getlist() this.getlist()
}, },
methods: { methods: {
// //
getlist() { getlist() {
const loading = this.$loading({ const loading = this.$loading({
target: document.querySelector('.menu'), target: document.querySelector('.menu'),
fullscreen: false, fullscreen: false,
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading' spinner: 'el-icon-loading'
}) })
getMenuFunction().then(res => { getMenuFunction().then(res => {
loading.close() loading.close()
this.treeData = res.Result this.treeData = res.Result
}).catch(() => { loading.close() }) }).catch(() => { loading.close() })
}, },
// //
append(node) { append(node) {
this.currenNode = {} this.currenNode = {}
this.currenNode.ParentId = node.Id this.currenNode.ParentId = node.Id
this.currenNode.Status = 1 this.currenNode.Status = 1
// this.currenNode.ShowOrder = 0 // this.currenNode.ShowOrder = 0
this.nodeId = node.Id this.nodeId = node.Id
this.model_cfg.title = 'Append' this.model_cfg.title = 'Append'
this.model_cfg.visible = true this.model_cfg.visible = true
}, },
// //
edit(node) { edit(node) {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const { Children, CreateTime, CreateUserId, UpdateTime, UpdateUserId, ...obj } = JSON.parse(JSON.stringify(node)) const { Children, CreateTime, CreateUserId, UpdateTime, UpdateUserId, ...obj } = JSON.parse(JSON.stringify(node))
obj.MetaBreadcrumb = obj.MetaBreadcrumb ? 1 : 0 obj.MetaBreadcrumb = obj.MetaBreadcrumb ? 1 : 0
obj.Hidden = obj.Hidden ? 1 : 0 obj.Hidden = obj.Hidden ? 1 : 0
this.currenNode = obj this.currenNode = obj
this.nodeId = node.Id this.nodeId = node.Id
this.model_cfg.title = 'Edit' this.model_cfg.title = 'Edit'
this.model_cfg.visible = true this.model_cfg.visible = true
}, },
// //
remove(node) { remove(node) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true
confirmButtonText: 'Ok', })
cancelButtonText: 'Cancel' .then(() => {
}) deleteMenuFunction(node.Id)
.then(() => { .then(res => {
deleteMenuFunction(node.Id) if (res.IsSuccess) {
.then(res => { this.getlist()
if (res.IsSuccess) { this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getlist() }
this.$message.success('Deleted successfully!') })
} })
}) },
}) //
}, closeModel() {
// this.model_cfg.visible = false
closeModel() { this.getlist()
this.model_cfg.visible = false }
this.getlist() }
} }
} </script>
} <style lang="scss">
</script> .menu{
<style lang="scss"> .el-tree {
.menu{ margin-top: 20px;
.el-tree { }
margin-top: 20px; .el-tree-node{
} margin-top: 5px;
.el-tree-node{ }
margin-top: 5px; .custom-tree-node {
} flex: 1;
.custom-tree-node { display: flex;
flex: 1; align-items: center;
display: flex; justify-content: space-between;
align-items: center; font-size: 14px;
justify-content: space-between; padding-right: 8px;
font-size: 14px; }
padding-right: 8px; .el-dialog__body{
} padding: 10px;
.el-dialog__body{ }
padding: 10px; }
}
} </style>
</style>

View File

@ -89,16 +89,15 @@ export default {
}) })
}, },
handleDeleteRole(row) { handleDeleteRole(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteUserTypeRole(row.Id).then((res) => { deleteUserTypeRole(row.Id).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1) this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -1,39 +1,38 @@
<template> <template>
<el-card class="box-card" style="width:800px;" size="small"> <el-card class="box-card" style="width:800px;" size="small">
<!-- <div slot="header" class="clearfix"> <!-- <div slot="header" class="clearfix">
<span>Security</span> <span>Security</span>
</div> --> </div> -->
<div> <div>
<el-button type="danger" @click="handleReset">Reset Password</el-button> <el-button type="danger" @click="handleReset">Reset Password</el-button>
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import { resetPassword } from '@/api/admin' import { resetPassword } from '@/api/admin'
export default { export default {
name: 'Account', name: 'Account',
props: { props: {
userId: { type: String, default: '' } userId: { type: String, default: '' }
}, },
methods: { methods: {
handleReset() { handleReset() {
this.$confirm('Sure to reset password?', { this.$confirm('Sure to reset password?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { resetPassword(this.userId).then(res => {
resetPassword(this.userId).then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.$message({
this.$message({ message: 'Reset password successfully',
message: 'Reset password successfully', type: 'success'
type: 'success' })
}) }
} })
}) })
}) }
} }
} }
} </script>
</script>

View File

@ -113,18 +113,17 @@ export default {
}, },
// //
handleDeleteUser(data) { handleDeleteUser(data) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSysUser(data.Id) deleteSysUser(data.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1) this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -126,8 +126,7 @@ export default {
this.$confirm('Sure to sign out', { this.$confirm('Sure to sign out', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.$store.dispatch('user/logout').then(res => { this.$store.dispatch('user/logout').then(res => {

View File

@ -403,6 +403,7 @@ export default {
data.isReading = true data.isReading = true
} }
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr) var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
this.$confirm(message, { this.$confirm(message, {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
type: 'warning' type: 'warning'
@ -430,6 +431,7 @@ export default {
data.isDeleted = true data.isDeleted = true
} }
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr) var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
this.$confirm(message, { this.$confirm(message, {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
type: 'warning' type: 'warning'

View File

@ -353,6 +353,7 @@ export default {
data.isReading = true data.isReading = true
} }
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr) var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
this.$confirm(message, { this.$confirm(message, {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
type: 'warning' type: 'warning'
@ -380,6 +381,7 @@ export default {
data.isDeleted = true data.isDeleted = true
} }
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr) var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
this.$confirm(message, { this.$confirm(message, {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
type: 'warning' type: 'warning'

View File

@ -244,8 +244,7 @@ export default {
this.$confirm('是否确认废除此文件?', { this.$confirm('是否确认废除此文件?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true

View File

@ -125,18 +125,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteDictionary(row.Id) deleteDictionary(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$store.dispatch('global/setDictionary', {}) this.$store.dispatch('global/setDictionary', {})
} }
}) })

View File

@ -239,18 +239,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteEmailNoticeConfig(row.Id) deleteEmailNoticeConfig(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -139,11 +139,10 @@ export default {
}, },
// CRO // CRO
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -152,7 +151,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false

View File

@ -1,256 +1,255 @@
<template> <template>
<box-content> <box-content>
<div class="search"> <div class="search">
<el-form :inline="true" size="small" class="base-search-form"> <el-form :inline="true" size="small" class="base-search-form">
<el-form-item label="Hospital:"> <el-form-item label="Hospital:">
<el-input v-model="searchData.HospitalName" style="width:100px;" /> <el-input v-model="searchData.HospitalName" style="width:100px;" />
</el-form-item> </el-form-item>
<el-form-item label="Province:"> <el-form-item label="Province:">
<el-input v-model="searchData.Province" style="width:100px;" /> <el-input v-model="searchData.Province" style="width:100px;" />
</el-form-item> </el-form-item>
<el-form-item label="City:"> <el-form-item label="City:">
<el-input v-model="searchData.City" style="width:100px;" /> <el-input v-model="searchData.City" style="width:100px;" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button> <el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button> <el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button <el-button
size="small" size="small"
type="primary" type="primary"
style="margin-left:auto;" style="margin-left:auto;"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAddHospital" @click="handleAddHospital"
>New</el-button> >New</el-button>
</span> </span>
</div> </div>
<!-- hospital列表 --> <!-- hospital列表 -->
<el-table <el-table
v-loading="loading" v-loading="loading"
v-adaptive="{bottomOffset:60}" v-adaptive="{bottomOffset:60}"
:data="list" :data="list"
stripe stripe
height="100" height="100"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
> >
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column
prop="HospitalName" prop="HospitalName"
label="Hospital" label="Hospital"
min-width="120" min-width="120"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="HospitalNameCN" prop="HospitalNameCN"
label="Hospital CN" label="Hospital CN"
min-width="120" min-width="120"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="UniversityAffiliated" prop="UniversityAffiliated"
label="University Affiliated" label="University Affiliated"
min-width="170" min-width="170"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="UniversityAffiliatedCN" prop="UniversityAffiliatedCN"
label="University Affiliated CN" label="University Affiliated CN"
min-width="170" min-width="170"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="Country" prop="Country"
label="Country" label="Country"
width="120" width="120"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="CountryCN" prop="CountryCN"
label="Country CN" label="Country CN"
width="140" width="140"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="Province" prop="Province"
label="Province" label="Province"
width="120" width="120"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="ProvinceCN" prop="ProvinceCN"
label="Province CN" label="Province CN"
width="140" width="140"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="City" prop="City"
label="City" label="City"
width="120" width="120"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="CityCN" prop="CityCN"
label="City CN" label="City CN"
width="120" width="120"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column label="Action" width="150"> <el-table-column label="Action" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
circle circle
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
title="编辑" title="编辑"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
/> />
<el-button <el-button
circle circle
icon="el-icon-delete" icon="el-icon-delete"
title="删除" title="删除"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" /> <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<el-dialog <el-dialog
v-if="editDialog.visible" v-if="editDialog.visible"
:visible.sync="editDialog.visible" :visible.sync="editDialog.visible"
:close-on-click-modal="false" :close-on-click-modal="false"
:title="editDialog.title" :title="editDialog.title"
width="600px" width="600px"
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<hospital-form v-if="editDialog.visible" :data="rowData" @close="close" @getList="getList" /> <hospital-form v-if="editDialog.visible" :data="rowData" @close="close" @getList="getList" />
</el-dialog> </el-dialog>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getHospitalPageList, deleteHospital } from '@/api/dictionary' import { getHospitalPageList, deleteHospital } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import HospitalForm from './HospitalForm' import HospitalForm from './HospitalForm'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
HospitalName: '', HospitalName: '',
Province: '', Province: '',
City: '', City: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: true, Asc: true,
SortField: '' SortField: ''
} }
} }
export default { export default {
name: 'Hospitals', name: 'Hospitals',
components: { BoxContent, Pagination, HospitalForm }, components: { BoxContent, Pagination, HospitalForm },
data() { data() {
return { return {
searchData: searchDataDefault(), searchData: searchDataDefault(),
editDialog: { visible: false, title: '' }, editDialog: { visible: false, title: '' },
list: [], list: [],
total: 0, total: 0,
loading: false, loading: false,
rowData: {} rowData: {}
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true
getHospitalPageList(this.searchData).then(res => { getHospitalPageList(this.searchData).then(res => {
this.loading = false this.loading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
// //
handleAddHospital() { handleAddHospital() {
this.rowData = {} this.rowData = {}
this.editDialog.title = 'Add' this.editDialog.title = 'Add'
this.editDialog.visible = true this.editDialog.visible = true
}, },
// //
handleEdit(row) { handleEdit(row) {
this.rowData = row this.rowData = row
this.editDialog.title = 'Edit' this.editDialog.title = 'Edit'
this.editDialog.visible = true this.editDialog.visible = true
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { this.loading = true
this.loading = true deleteHospital(row.Id)
deleteHospital(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} this.loading = false
this.loading = false }).catch(() => {
}).catch(() => { this.loading = false
this.loading = false })
}) })
}) },
}, //
// handleSearch() {
handleSearch() { this.searchData.PageIndex = 1
this.searchData.PageIndex = 1 this.getList()
this.getList() },
}, //
// handleReset() {
handleReset() { this.searchData = searchDataDefault()
this.searchData = searchDataDefault() this.getList()
this.getList() },
}, //
// handleSortByColumn(column) {
handleSortByColumn(column) { if (column.order === 'ascending') {
if (column.order === 'ascending') { this.searchData.Asc = true
this.searchData.Asc = true } else {
} else { this.searchData.Asc = false
this.searchData.Asc = false }
} this.searchData.SortField = column.prop
this.searchData.SortField = column.prop this.searchData.PageIndex = 1
this.searchData.PageIndex = 1 this.getList()
this.getList() },
}, //
// close() {
close() { this.editDialog.visible = false
this.editDialog.visible = false }
} }
} }
} </script>
</script> <style lang="scss" scoped>
<style lang="scss" scoped> .hospitals{
.hospitals{ height: 100%;
height: 100%; }
} </style>
</style>

View File

@ -213,11 +213,10 @@ export default {
}, },
// Site // Site
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -227,7 +226,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$store.dispatch('global/setSite', {}) this.$store.dispatch('global/setSite', {})
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false

View File

@ -139,11 +139,10 @@ export default {
}, },
// Sponsor // Sponsor
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -152,7 +151,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false

View File

@ -182,11 +182,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -195,7 +194,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -154,11 +154,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -167,7 +166,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -183,11 +183,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -196,7 +195,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -182,11 +182,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -195,7 +194,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -153,11 +153,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -166,7 +165,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -206,11 +206,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -219,7 +218,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -183,11 +183,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -196,7 +195,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -122,11 +122,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -135,7 +134,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -1,162 +1,161 @@
<template> <template>
<box-content> <box-content>
<!-- 搜索框 --> <!-- 搜索框 -->
<div class="search"> <div class="search">
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
> >
Add Add
</el-button> </el-button>
</span> </span>
</div> </div>
<!-- 受试者列表 --> <!-- 受试者列表 -->
<el-table <el-table
v-loading="loading" v-loading="loading"
v-adaptive="{bottomOffset:45}" v-adaptive="{bottomOffset:45}"
:data="list" :data="list"
stripe stripe
height="100" height="100"
style="width:100%" style="width:100%"
> >
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column
prop="Code" prop="Code"
label="编号" label="编号"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="Name" prop="Name"
label="场景类型" label="场景类型"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="Value" prop="Value"
label="签名内容(EN)" label="签名内容(EN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="ValueCN" prop="ValueCN"
label="签名内容(CN)" label="签名内容(CN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="UpdateTime" prop="UpdateTime"
label="更新时间" label="更新时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="CreateTime" prop="CreateTime"
label="创建时间" label="创建时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column label="Action" width="200" fixed="right"> <el-table-column label="Action" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
> >
Edit Edit
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button> <el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 场景配置 --> <!-- 场景配置 -->
<el-dialog <el-dialog
v-if="editVisible" v-if="editVisible"
:visible.sync="editVisible" :visible.sync="editVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:title="title" :title="title"
width="700px" width="700px"
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" /> <SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" />
</el-dialog> </el-dialog>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getChildList, deleteSystemBasicData } from '@/api/dictionary' import { getChildList, deleteSystemBasicData } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import SceneConfigForm from './SceneConfigForm' import SceneConfigForm from './SceneConfigForm'
export default { export default {
name: 'SignTemplate', name: 'SignTemplate',
components: { BoxContent, SceneConfigForm }, components: { BoxContent, SceneConfigForm },
props: { props: {
parentId: { parentId: {
type: String, type: String,
required: true required: true
} }
}, },
data() { data() {
return { return {
loading: false, loading: false,
list: [], list: [],
rowData: {}, rowData: {},
title: '', title: '',
editVisible: false editVisible: false
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true
getChildList(this.parentId).then(res => { getChildList(this.parentId).then(res => {
this.loading = false this.loading = false
this.list = res.Result this.list = res.Result
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}, },
// //
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {}
this.title = 'Add' this.title = 'Add'
this.editVisible = true this.editVisible = true
}, },
// //
handleEdit(row) { handleEdit(row) {
this.rowData = { ...row } this.rowData = { ...row }
this.title = 'Edit' this.title = 'Edit'
this.editVisible = true this.editVisible = true
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deleteSystemBasicData(row.Id)
deleteSystemBasicData(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} })
}) })
}) },
}, //
// closeDialog() {
closeDialog() { this.editVisible = false
this.editVisible = false }
} }
} }
} </script>
</script>

View File

@ -1,229 +1,228 @@
<template> <template>
<box-content> <box-content>
<!-- 搜索框 --> <!-- 搜索框 -->
<div class="search"> <div class="search">
<el-form :inline="true" size="mini" class="base-search-form"> <el-form :inline="true" size="mini" class="base-search-form">
<el-form-item label="编号:"> <el-form-item label="编号:">
<el-input v-model="searchData.Code" style="width:100px;" /> <el-input v-model="searchData.Code" style="width:100px;" />
</el-form-item> </el-form-item>
<el-form-item label="模板:"> <el-form-item label="模板:">
<el-input v-model="searchData.Name" style="width:100px;" /> <el-input v-model="searchData.Name" style="width:100px;" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleReset">Reset</el-button> <el-button type="primary" @click="handleReset">Reset</el-button>
<el-button type="primary" @click="handleSearch">Search</el-button> <el-button type="primary" @click="handleSearch">Search</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
> >
New New
</el-button> </el-button>
</span> </span>
</div> </div>
<!-- 受试者列表 --> <!-- 受试者列表 -->
<el-table <el-table
v-loading="loading" v-loading="loading"
v-adaptive="{bottomOffset:45}" v-adaptive="{bottomOffset:45}"
:data="list" :data="list"
stripe stripe
height="100" height="100"
style="width:100%" style="width:100%"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
> >
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column
prop="Code" prop="Code"
label="Code" label="Code"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="Name" prop="Name"
label="模板" label="模板"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="Value" prop="Value"
label="签名内容(EN)" label="签名内容(EN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="ValueCN" prop="ValueCN"
label="签名内容(CN)" label="签名内容(CN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="UpdateTime" prop="UpdateTime"
label="更新时间" label="更新时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="CreateTime" prop="CreateTime"
label="创建时间" label="创建时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column label="Action" width="200" fixed="right"> <el-table-column label="Action" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
> >
Edit Edit
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="handleConfig(scope.row)" @click="handleConfig(scope.row)"
> >
场景配置 场景配置
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button> <el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" /> <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<!-- 新增编辑 --> <!-- 新增编辑 -->
<el-dialog <el-dialog
v-if="editVisible" v-if="editVisible"
:visible.sync="editVisible" :visible.sync="editVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:title="title" :title="title"
width="700px" width="700px"
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" /> <SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
</el-dialog> </el-dialog>
<!-- 场景配置 --> <!-- 场景配置 -->
<el-dialog <el-dialog
v-if="configVisible" v-if="configVisible"
:visible.sync="configVisible" :visible.sync="configVisible"
title="场景配置" title="场景配置"
:fullscreen="true" :fullscreen="true"
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" /> <SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" />
</el-dialog> </el-dialog>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary' import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import SignTemplateForm from './components/SignTemplateForm' import SignTemplateForm from './components/SignTemplateForm'
import SceneList from './components/SceneList' import SceneList from './components/SceneList'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
Code: '', Code: '',
Name: '', Name: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20
} }
} }
export default { export default {
name: 'SignTemplate', name: 'SignTemplate',
components: { BoxContent, SignTemplateForm, Pagination, SceneList }, components: { BoxContent, SignTemplateForm, Pagination, SceneList },
data() { data() {
return { return {
searchData: searchDataDefault(), searchData: searchDataDefault(),
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
rowData: {}, rowData: {},
title: '', title: '',
editVisible: false, editVisible: false,
configVisible: false configVisible: false
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true
getSystemBasicDataList(this.searchData).then(res => { getSystemBasicDataList(this.searchData).then(res => {
this.loading = false this.loading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}, },
// //
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {}
this.title = 'Add' this.title = 'Add'
this.editVisible = true this.editVisible = true
}, },
// //
handleEdit(row) { handleEdit(row) {
this.rowData = { ...row } this.rowData = { ...row }
this.title = 'Edit' this.title = 'Edit'
this.editVisible = true this.editVisible = true
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deleteSystemBasicData(row.Id)
deleteSystemBasicData(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} })
}) })
}) },
}, //
// handleConfig(row) {
handleConfig(row) { this.rowData = { ...row }
this.rowData = { ...row } this.configVisible = true
this.configVisible = true },
}, //
// handleSearch() {
handleSearch() { this.searchData.PageIndex = 1
this.searchData.PageIndex = 1 this.getList()
this.getList() },
}, //
// handleReset() {
handleReset() { this.searchData = searchDataDefault()
this.searchData = searchDataDefault() this.getList()
this.getList() },
}, //
// handleSortByColumn(column) {
handleSortByColumn(column) { if (column.order === 'ascending') {
if (column.order === 'ascending') { this.searchData.Asc = true
this.searchData.Asc = true } else {
} else { this.searchData.Asc = false
this.searchData.Asc = false }
} this.searchData.SortField = column.prop
this.searchData.SortField = column.prop this.searchData.PageIndex = 1
this.searchData.PageIndex = 1 this.getList()
this.getList() },
}, //
// closeDialog() {
closeDialog() { this.editVisible = false
this.editVisible = false }
} }
} }
} </script>
</script>

View File

@ -162,11 +162,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -175,7 +174,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -137,11 +137,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -150,7 +149,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -170,11 +170,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -183,7 +182,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -217,11 +217,10 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -230,7 +229,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -1,188 +1,187 @@
<template> <template>
<div class="template-wrapper"> <div class="template-wrapper">
<div class="left-wrapper"> <div class="left-wrapper">
<box-content> <box-content>
<div class="search"> <div class="search">
<SearchForm <SearchForm
size="mini" size="mini"
:that="this" :that="this"
:search-data="searchData" :search-data="searchData"
:search-form="template_form" :search-form="template_form"
:search-handle="template_handle" :search-handle="template_handle"
@search="handleSearch" @search="handleSearch"
@reset="handleReset" @reset="handleReset"
/> />
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button type="primary" size="small" style="margin-left:auto;" @click="handleAdd">New</el-button> <el-button type="primary" size="small" style="margin-left:auto;" @click="handleAdd">New</el-button>
<el-button type="primary" size="small" @click="handleSetting">Setting</el-button> <el-button type="primary" size="small" @click="handleSetting">Setting</el-button>
</span> </span>
</div> </div>
<base-table <base-table
v-loading="loading" v-loading="loading"
:columns="template_cols" :columns="template_cols"
:list="list" :list="list"
:search-data="searchData" :search-data="searchData"
:total="total" :total="total"
@getList="getList" @getList="getList"
@items="handleView" @items="handleView"
@edit="handleEdit" @edit="handleEdit"
@delete="handleDelete" @delete="handleDelete"
@sortByColumn="sortByColumn" @sortByColumn="sortByColumn"
/> />
</box-content> </box-content>
</div> </div>
<div class="right-wrapper"> <div class="right-wrapper">
<div v-if="template.Name"> <div v-if="template.Name">
<span>Name:</span> <span>Name:</span>
<el-input v-model="template.Name" size="small" style="width:150px;" readonly /> <el-input v-model="template.Name" size="small" style="width:150px;" readonly />
</div> </div>
<el-table v-if="template.Name" ref="itemList" v-loading="itemLoading" :data="itmeList" class="table" size="small" @select="onTableSelect"> <el-table v-if="template.Name" ref="itemList" v-loading="itemLoading" :data="itmeList" class="table" size="small" @select="onTableSelect">
<el-table-column type="selection" width="50" /> <el-table-column type="selection" width="50" />
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column prop="Name" label="Item" show-overflow-tooltip /> <el-table-column prop="Name" label="Item" show-overflow-tooltip />
</el-table> </el-table>
</div> </div>
<template-form v-if="template_model.visible" :data="rowData" @close="closeModel" /> <template-form v-if="template_model.visible" :data="rowData" @close="closeModel" />
</div> </div>
</template> </template>
<script> <script>
import { getQaTemplateList, deleteQATemplate, getQaTemplateConfigList, configQATemplateItem } from '@/api/dictionary' import { getQaTemplateList, deleteQATemplate, getQaTemplateConfigList, configQATemplateItem } from '@/api/dictionary'
import { template_cols, template_form, template_handle, template_model } from './template' import { template_cols, template_form, template_handle, template_model } from './template'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import SearchForm from '@/components/BaseForm/search-form' import SearchForm from '@/components/BaseForm/search-form'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import TemplateForm from './components/TemplateForm' import TemplateForm from './components/TemplateForm'
import tableMixins from '@/mixins/table' import tableMixins from '@/mixins/table'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
Name: '', Name: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20
} }
} }
export default { export default {
name: 'TemplateList', name: 'TemplateList',
components: { BoxContent, SearchForm, BaseTable, TemplateForm }, components: { BoxContent, SearchForm, BaseTable, TemplateForm },
mixins: [tableMixins], mixins: [tableMixins],
data() { data() {
return { return {
template_cols, template_cols,
template_form, template_form,
template_handle, template_handle,
template_model, template_model,
searchData: searchDataDefault(), searchData: searchDataDefault(),
list: [], list: [],
total: 0, total: 0,
loading: false, loading: false,
rowData: {}, rowData: {},
template: {}, template: {},
itmeList: [], itmeList: [],
itemLoading: false itemLoading: false
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
getList() { getList() {
this.loading = true this.loading = true
getQaTemplateList(this.searchData).then(res => { getQaTemplateList(this.searchData).then(res => {
this.loading = false this.loading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
this.template = {} this.template = {}
this.itmeList = [] this.itmeList = []
}) })
}, },
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {}
this.template_model.title = 'New' this.template_model.title = 'New'
this.template_model.visible = true this.template_model.visible = true
}, },
handleSetting() { handleSetting() {
this.$router.push({ name: 'TemplateOfSetting' }) this.$router.push({ name: 'TemplateOfSetting' })
}, },
handleEdit(row) { handleEdit(row) {
this.rowData = row this.rowData = row
this.template_model.title = 'Edit' this.template_model.title = 'Edit'
this.template_model.visible = true this.template_model.visible = true
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deleteQATemplate(row.Id)
deleteQATemplate(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} })
}) })
}) },
}, handleView(row) {
handleView(row) { this.template = row
this.template = row this.itemLoading = true
this.itemLoading = true getQaTemplateConfigList(row.Id, row.ModalityId).then(res => {
getQaTemplateConfigList(row.Id, row.ModalityId).then(res => { this.itmeList = res.Result
this.itmeList = res.Result this.itmeList.forEach(val => {
this.itmeList.forEach(val => { this.$nextTick(
this.$nextTick( function() {
function() { this.$refs.itemList.toggleRowSelection(val, val.IsSelect)
this.$refs.itemList.toggleRowSelection(val, val.IsSelect) }.bind(this)
}.bind(this) )
) })
}) this.itemLoading = false
this.itemLoading = false })
}) },
}, onTableSelect(rows, row) {
onTableSelect(rows, row) { const param = {
const param = { qaTemplateItemId: row.Id,
qaTemplateItemId: row.Id, qaTemplateId: this.template.Id,
qaTemplateId: this.template.Id, isSelect: rows.indexOf(row) !== -1
isSelect: rows.indexOf(row) !== -1 }
} configQATemplateItem(param).then(res => {
configQATemplateItem(param).then(res => { this.$message.success('Updated successfully')
this.$message.success('Updated successfully') })
}) },
}, handleReset() {
handleReset() { this.searchData = searchDataDefault()
this.searchData = searchDataDefault() this.getList()
this.getList() this.template = {}
this.template = {} this.itmeList = []
this.itmeList = [] },
}, closeModel() {
closeModel() { this.template_model.visible = false
this.template_model.visible = false this.getList()
this.getList() }
} }
} }
} </script>
</script> <style lang="scss">
<style lang="scss"> .template-wrapper{
.template-wrapper{ height: 100%;
height: 100%; display: flex;
display: flex; .left-wrapper{
.left-wrapper{ width: 0;
width: 0; flex-grow: 4;
flex-grow: 4; border-right: 1px solid #ccc;
border-right: 1px solid #ccc; }
} .right-wrapper{
.right-wrapper{ width: 0;
width: 0; flex-grow: 3;
flex-grow: 3; padding: 5px;
padding: 5px; thead{
thead{ .el-table-column--selection{
.el-table-column--selection{ .cell {
.cell { display: none;
display: none; }
} }
} }
} }
} }
} </style>
</style>

View File

@ -1,182 +1,181 @@
<template> <template>
<box-content> <box-content>
<div class="search"> <div class="search">
<SearchForm <SearchForm
size="mini" size="mini"
:that="this" :that="this"
:search-data="searchData" :search-data="searchData"
:search-form="setting_form" :search-form="setting_form"
:search-handle="setting_handle" :search-handle="setting_handle"
@search="handleSearch" @search="handleSearch"
@reset="handleReset" @reset="handleReset"
/> />
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button type="primary" size="small" style="margin-left:auto;" @click="handleAdd">New</el-button> <el-button type="primary" size="small" style="margin-left:auto;" @click="handleAdd">New</el-button>
</span> </span>
</div> </div>
<base-table <base-table
v-loading="loading" v-loading="loading"
:columns="setting_cols" :columns="setting_cols"
:list="list" :list="list"
:search-data="searchData" :search-data="searchData"
:total="total" :total="total"
@getList="getList" @getList="getList"
@edit="handleEdit" @edit="handleEdit"
@delete="handleDelete" @delete="handleDelete"
@sortByColumn="sortByColumn" @sortByColumn="sortByColumn"
> >
<!-- 选择自定义slot --> <!-- 选择自定义slot -->
<template slot="modalitySlot" slot-scope="{scope}"> <template slot="modalitySlot" slot-scope="{scope}">
{{ scope.row.ModalityList && scope.row.ModalityList.length>0?scope.row.ModalityList.join(', '):'' }} {{ scope.row.ModalityList && scope.row.ModalityList.length>0?scope.row.ModalityList.join(', '):'' }}
</template> </template>
</base-table> </base-table>
<setting-form v-if="setting_model.visible" :data="rowData" @close="closeModel" /> <setting-form v-if="setting_model.visible" :data="rowData" @close="closeModel" />
</box-content> </box-content>
</template> </template>
<script> <script>
import { getQATemplateItemList, deleteQATemplateItem } from '@/api/dictionary' import { getQATemplateItemList, deleteQATemplateItem } from '@/api/dictionary'
import { getBasicDataSelects } from '@/api/dictionary/dictionary' import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import { setting_cols, setting_form, setting_handle, setting_model } from './template' import { setting_cols, setting_form, setting_handle, setting_model } from './template'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import SearchForm from '@/components/BaseForm/search-form' import SearchForm from '@/components/BaseForm/search-form'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import SettingForm from './components/SettingForm.vue' import SettingForm from './components/SettingForm.vue'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
ModalityId: '', ModalityId: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20
} }
} }
export default { export default {
name: 'TemplateSettings', name: 'TemplateSettings',
components: { BoxContent, SearchForm, BaseTable, SettingForm }, components: { BoxContent, SearchForm, BaseTable, SettingForm },
data() { data() {
return { return {
setting_cols, setting_cols,
setting_form, setting_form,
setting_handle, setting_handle,
setting_model, setting_model,
list: [], list: [],
loading: false, loading: false,
total: 0, total: 0,
searchData: searchDataDefault(), searchData: searchDataDefault(),
rowData: {}, rowData: {},
readingType: {} readingType: {}
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.getInfo() this.getInfo()
}, },
methods: { methods: {
getList() { getList() {
this.loading = true this.loading = true
getQATemplateItemList(this.searchData).then(res => { getQATemplateItemList(this.searchData).then(res => {
this.loading = false this.loading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}, },
findItemIndex(key) { findItemIndex(key) {
return this.setting_form.findIndex(value => value.prop && value.prop === key return this.setting_form.findIndex(value => value.prop && value.prop === key
) )
}, },
async getInfo() { async getInfo() {
await this.getDicData() await this.getDicData()
if (this.readingType.length > 0) { if (this.readingType.length > 0) {
const index = this.findItemIndex('ModalityId') const index = this.findItemIndex('ModalityId')
this.$set(this.setting_form[index], 'options', this.readingType) this.$set(this.setting_form[index], 'options', this.readingType)
} }
}, },
getDicData() { getDicData() {
getBasicDataSelects(['ReadingType']).then(res => { getBasicDataSelects(['ReadingType']).then(res => {
const { ReadingType } = { ...res.Result } const { ReadingType } = { ...res.Result }
this.readingType = ReadingType || {} this.readingType = ReadingType || {}
}).catch(() => {}) }).catch(() => {})
}, },
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {}
this.setting_model.title = 'Add' this.setting_model.title = 'Add'
this.setting_model.visible = true this.setting_model.visible = true
}, },
handleEdit(row) { handleEdit(row) {
this.rowData = row this.rowData = row
this.setting_model.title = 'Add' this.setting_model.title = 'Add'
this.setting_model.visible = true this.setting_model.visible = true
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deleteQATemplateItem(row.Id)
deleteQATemplateItem(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} })
}) })
}) },
}, sortByColumn(column) {
sortByColumn(column) { if (column.order === 'ascending') {
if (column.order === 'ascending') { this.searchData.Asc = true
this.searchData.Asc = true } else {
} else { this.searchData.Asc = false
this.searchData.Asc = false }
} this.searchData.SortField = column.prop
this.searchData.SortField = column.prop this.searchData.PageIndex = 1
this.searchData.PageIndex = 1 this.getList()
this.getList() },
}, handleReset() {
handleReset() { this.searchData = searchDataDefault()
this.searchData = searchDataDefault() this.getList()
this.getList() },
}, closeModel() {
closeModel() { this.setting_model.visible = false
this.setting_model.visible = false this.getList()
this.getList() }
} }
} }
} </script>
</script> <style lang="scss">
<style lang="scss"> .template-setting{
.template-setting{ height: 100%;
height: 100%; .el-header{
.el-header{ .filter-container{
.filter-container{ margin-top: 10px;
margin-top: 10px; 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{
.el-main{ height:calc(100% - 40px);
height:calc(100% - 40px); padding: 0 20px;
padding: 0 20px; .data-table{
.data-table{ height: 100%;
height: 100%; }
} }
} .el-footer{
.el-footer{ padding: 0 20px;
padding: 0 20px; }
} .el-dialog__header{
.el-dialog__header{ padding:10px;
padding:10px; }
} .el-dialog__body{
.el-dialog__body{ padding:10px;
padding:10px; }
} }
} </style>
</style>

View File

@ -1,162 +1,161 @@
<template> <template>
<box-content> <box-content>
<!-- 搜索框 --> <!-- 搜索框 -->
<div class="search"> <div class="search">
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
> >
Add Add
</el-button> </el-button>
</span> </span>
</div> </div>
<!-- 受试者列表 --> <!-- 受试者列表 -->
<el-table <el-table
v-loading="loading" v-loading="loading"
v-adaptive="{bottomOffset:45}" v-adaptive="{bottomOffset:45}"
:data="list" :data="list"
stripe stripe
height="100" height="100"
style="width:100%" style="width:100%"
> >
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column
prop="Code" prop="Code"
label="编号" label="编号"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="Name" prop="Name"
label="场景类型" label="场景类型"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="Value" prop="Value"
label="签名内容(EN)" label="签名内容(EN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="ValueCN" prop="ValueCN"
label="签名内容(CN)" label="签名内容(CN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="UpdateTime" prop="UpdateTime"
label="更新时间" label="更新时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="CreateTime" prop="CreateTime"
label="创建时间" label="创建时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column label="Action" width="200" fixed="right"> <el-table-column label="Action" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
> >
Edit Edit
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button> <el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 场景配置 --> <!-- 场景配置 -->
<el-dialog <el-dialog
v-if="editVisible" v-if="editVisible"
:visible.sync="editVisible" :visible.sync="editVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:title="title" :title="title"
width="700px" width="700px"
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" /> <SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" />
</el-dialog> </el-dialog>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getChildList, deleteSystemBasicData } from '@/api/dictionary' import { getChildList, deleteSystemBasicData } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import SceneConfigForm from './SceneConfigForm' import SceneConfigForm from './SceneConfigForm'
export default { export default {
name: 'SignTemplate', name: 'SignTemplate',
components: { BoxContent, SceneConfigForm }, components: { BoxContent, SceneConfigForm },
props: { props: {
parentId: { parentId: {
type: String, type: String,
required: true required: true
} }
}, },
data() { data() {
return { return {
loading: false, loading: false,
list: [], list: [],
rowData: {}, rowData: {},
title: '', title: '',
editVisible: false editVisible: false
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true
getChildList(this.parentId).then(res => { getChildList(this.parentId).then(res => {
this.loading = false this.loading = false
this.list = res.Result this.list = res.Result
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}, },
// //
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {}
this.title = 'Add' this.title = 'Add'
this.editVisible = true this.editVisible = true
}, },
// //
handleEdit(row) { handleEdit(row) {
this.rowData = { ...row } this.rowData = { ...row }
this.title = 'Edit' this.title = 'Edit'
this.editVisible = true this.editVisible = true
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deleteSystemBasicData(row.Id)
deleteSystemBasicData(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} })
}) })
}) },
}, //
// closeDialog() {
closeDialog() { this.editVisible = false
this.editVisible = false }
} }
} }
} </script>
</script>

View File

@ -1,229 +1,228 @@
<template> <template>
<box-content> <box-content>
<!-- 搜索框 --> <!-- 搜索框 -->
<div class="search"> <div class="search">
<el-form :inline="true" size="mini" class="base-search-form"> <el-form :inline="true" size="mini" class="base-search-form">
<el-form-item label="编号:"> <el-form-item label="编号:">
<el-input v-model="searchData.Code" style="width:100px;" /> <el-input v-model="searchData.Code" style="width:100px;" />
</el-form-item> </el-form-item>
<el-form-item label="模板:"> <el-form-item label="模板:">
<el-input v-model="searchData.Name" style="width:100px;" /> <el-input v-model="searchData.Name" style="width:100px;" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleReset">Reset</el-button> <el-button type="primary" @click="handleReset">Reset</el-button>
<el-button type="primary" @click="handleSearch">Search</el-button> <el-button type="primary" @click="handleSearch">Search</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
> >
New New
</el-button> </el-button>
</span> </span>
</div> </div>
<!-- 受试者列表 --> <!-- 受试者列表 -->
<el-table <el-table
v-loading="loading" v-loading="loading"
v-adaptive="{bottomOffset:45}" v-adaptive="{bottomOffset:45}"
:data="list" :data="list"
stripe stripe
height="100" height="100"
style="width:100%" style="width:100%"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
> >
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column
prop="Code" prop="Code"
label="Code" label="Code"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="Name" prop="Name"
label="模板" label="模板"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="Value" prop="Value"
label="签名内容(EN)" label="签名内容(EN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="ValueCN" prop="ValueCN"
label="签名内容(CN)" label="签名内容(CN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="UpdateTime" prop="UpdateTime"
label="更新时间" label="更新时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="CreateTime" prop="CreateTime"
label="创建时间" label="创建时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column label="Action" width="200" fixed="right"> <el-table-column label="Action" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
> >
Edit Edit
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="handleConfig(scope.row)" @click="handleConfig(scope.row)"
> >
场景配置 场景配置
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button> <el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" /> <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<!-- 新增编辑 --> <!-- 新增编辑 -->
<el-dialog <el-dialog
v-if="editVisible" v-if="editVisible"
:visible.sync="editVisible" :visible.sync="editVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:title="title" :title="title"
width="700px" width="700px"
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" /> <SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
</el-dialog> </el-dialog>
<!-- 场景配置 --> <!-- 场景配置 -->
<el-dialog <el-dialog
v-if="configVisible" v-if="configVisible"
:visible.sync="configVisible" :visible.sync="configVisible"
title="场景配置" title="场景配置"
:fullscreen="true" :fullscreen="true"
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" /> <SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" />
</el-dialog> </el-dialog>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary' import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import SignTemplateForm from './components/SignTemplateForm' import SignTemplateForm from './components/SignTemplateForm'
import SceneList from './components/SceneList' import SceneList from './components/SceneList'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
Code: '', Code: '',
Name: '', Name: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20
} }
} }
export default { export default {
name: 'SignTemplate', name: 'SignTemplate',
components: { BoxContent, SignTemplateForm, Pagination, SceneList }, components: { BoxContent, SignTemplateForm, Pagination, SceneList },
data() { data() {
return { return {
searchData: searchDataDefault(), searchData: searchDataDefault(),
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
rowData: {}, rowData: {},
title: '', title: '',
editVisible: false, editVisible: false,
configVisible: false configVisible: false
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true
getSystemBasicDataList(this.searchData).then(res => { getSystemBasicDataList(this.searchData).then(res => {
this.loading = false this.loading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}, },
// //
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {}
this.title = 'Add' this.title = 'Add'
this.editVisible = true this.editVisible = true
}, },
// //
handleEdit(row) { handleEdit(row) {
this.rowData = { ...row } this.rowData = { ...row }
this.title = 'Edit' this.title = 'Edit'
this.editVisible = true this.editVisible = true
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deleteSystemBasicData(row.Id)
deleteSystemBasicData(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} })
}) })
}) },
}, //
// handleConfig(row) {
handleConfig(row) { this.rowData = { ...row }
this.rowData = { ...row } this.configVisible = true
this.configVisible = true },
}, //
// handleSearch() {
handleSearch() { this.searchData.PageIndex = 1
this.searchData.PageIndex = 1 this.getList()
this.getList() },
}, //
// handleReset() {
handleReset() { this.searchData = searchDataDefault()
this.searchData = searchDataDefault() this.getList()
this.getList() },
}, //
// handleSortByColumn(column) {
handleSortByColumn(column) { if (column.order === 'ascending') {
if (column.order === 'ascending') { this.searchData.Asc = true
this.searchData.Asc = true } else {
} else { this.searchData.Asc = false
this.searchData.Asc = false }
} this.searchData.SortField = column.prop
this.searchData.SortField = column.prop this.searchData.PageIndex = 1
this.searchData.PageIndex = 1 this.getList()
this.getList() },
}, //
// closeDialog() {
closeDialog() { this.editVisible = false
this.editVisible = false }
} }
} }
} </script>
</script>

View File

@ -1,242 +1,241 @@
<template> <template>
<div class="app-container adjustment-container data-list"> <div class="app-container adjustment-container data-list">
<div class="filter-container"> <div class="filter-container">
<el-input v-model="listQuery.Reviewer" style="width:220px" size="small" placeholder="Reviewer ID" class="mr" /> <el-input v-model="listQuery.Reviewer" style="width:220px" size="small" placeholder="Reviewer ID" class="mr" />
<el-date-picker <el-date-picker
v-model="listQuery.BeginMonth" v-model="listQuery.BeginMonth"
size="small" size="small"
placeholder="Beginning date" placeholder="Beginning date"
type="month" type="month"
value-format="yyyy-MM" value-format="yyyy-MM"
disabled disabled
class="mr" class="mr"
/> />
<el-button size="small" type="text" @click="handleReset">Reset</el-button> <el-button size="small" type="text" @click="handleReset">Reset</el-button>
<el-button type="primary" size="small" @click="handleSearch">Search</el-button> <el-button type="primary" size="small" @click="handleSearch">Search</el-button>
<el-button style="margin-left:auto" type="primary" size="small" @click="handleNew">New</el-button> <el-button style="margin-left:auto" type="primary" size="small" @click="handleNew">New</el-button>
</div> </div>
<div class="data-table"> <div class="data-table">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
stripe stripe
:data="list" :data="list"
height="100%" height="100%"
size="small" size="small"
@sort-change="sortByColumn" @sort-change="sortByColumn"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column <el-table-column
prop="LastName" prop="LastName"
label="Name" label="Name"
min-width="100" min-width="100"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
> >
<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>
<el-table-column <el-table-column
prop="ChineseName" prop="ChineseName"
label="Name CN" label="Name CN"
min-width="120" min-width="120"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="ReviewerCode" prop="ReviewerCode"
label="Reviewer ID" label="Reviewer ID"
min-width="110" min-width="110"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="AdjustPaymentUSD" prop="AdjustPaymentUSD"
label="Amount($)" label="Amount($)"
min-width="120" min-width="120"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope">{{ scope.row.AdjustPaymentUSD | rounding }}</template> <template slot-scope="scope">{{ scope.row.AdjustPaymentUSD | rounding }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="AdjustPaymentCNY" prop="AdjustPaymentCNY"
label="Amount(¥)" label="Amount(¥)"
min-width="120" min-width="120"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.AdjustPaymentCNY | rounding }}</span> <span>{{ scope.row.AdjustPaymentCNY | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="Note" label="Note" min-width="120" show-overflow-tooltip /> <el-table-column prop="Note" label="Note" min-width="120" show-overflow-tooltip />
<el-table-column <el-table-column
prop="YearMonth" prop="YearMonth"
label="Adjust Month" label="Adjust Month"
min-width="120" min-width="120"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column label="Action"> <el-table-column label="Action">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" type="text" :disabled="scope.row.IsLock" @click="handleEdit(scope.row)">Edit</el-button> <el-button size="small" type="text" :disabled="scope.row.IsLock" @click="handleEdit(scope.row)">Edit</el-button>
<el-button <el-button
size="small" size="small"
type="text" type="text"
:disabled="scope.row.IsLock" :disabled="scope.row.IsLock"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>Delete</el-button> >Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="pagination"> <div class="pagination">
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
</div> </div>
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="600px" width="600px"
> >
<adjustment-form <adjustment-form
:key="timer" :key="timer"
:row="row" :row="row"
:date="date" :date="date"
:exchange-rate="exchangeRate" :exchange-rate="exchangeRate"
@closeDialog="closeDialog" @closeDialog="closeDialog"
@getList="getList" @getList="getList"
/> />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import AdjustmentForm from './components/AdjustmentForm' import AdjustmentForm from './components/AdjustmentForm'
import { getPaymentAdjustmentList, deletePaymentAdjustment } from '@/api/financials' import { getPaymentAdjustmentList, deletePaymentAdjustment } from '@/api/financials'
import { FormatTime } from '@/utils/formatter' import { FormatTime } from '@/utils/formatter'
export default { export default {
filters: { filters: {
rounding(value) { rounding(value) {
return value ? Number(value).toFixed(2) : value return value ? Number(value).toFixed(2) : value
} }
}, },
components: { Pagination, AdjustmentForm }, components: { Pagination, AdjustmentForm },
data() { data() {
return { return {
listQuery: { listQuery: {
TrialCode: '', TrialCode: '',
Reviewer: '', Reviewer: '',
BeginMonth: '', BeginMonth: '',
EndMonth: '', EndMonth: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: false, Asc: false,
SortField: '' SortField: ''
}, },
listLoading: false, listLoading: false,
list: [], list: [],
total: 0, total: 0,
exchangeRate: '', exchangeRate: '',
date: '', date: '',
timer: '', timer: '',
dialogVisible: false, dialogVisible: false,
title: '', title: '',
row: '' row: ''
} }
}, },
mounted() { mounted() {
this.date = this.$router.currentRoute.query.date this.date = this.$router.currentRoute.query.date
this.listQuery.BeginMonth = this.date this.listQuery.BeginMonth = this.date
this.listQuery.EndMonth = this.date this.listQuery.EndMonth = this.date
// this.exchangeRate = this.$router.currentRoute.query.exchangeRate ? parseInt(this.$router.currentRoute.query.exchangeRate) : 0 // this.exchangeRate = this.$router.currentRoute.query.exchangeRate ? parseInt(this.$router.currentRoute.query.exchangeRate) : 0
this.exchangeRate = this.$router.currentRoute.query.exchangeRate ? this.$router.currentRoute.query.exchangeRate : 0 this.exchangeRate = this.$router.currentRoute.query.exchangeRate ? this.$router.currentRoute.query.exchangeRate : 0
this.getList() this.getList()
}, },
methods: { methods: {
getList() { getList() {
this.listLoading = true this.listLoading = true
getPaymentAdjustmentList(this.listQuery).then(res => { getPaymentAdjustmentList(this.listQuery).then(res => {
this.listLoading = false this.listLoading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
}) })
}, },
handleNew() { handleNew() {
this.title = 'New' this.title = 'New'
this.row = {} this.row = {}
this.timer = new Date().getTime() this.timer = new Date().getTime()
this.dialogVisible = true this.dialogVisible = true
}, },
handleEdit(row) { handleEdit(row) {
this.title = 'Edit' this.title = 'Edit'
this.row = JSON.parse(JSON.stringify(row)) this.row = JSON.parse(JSON.stringify(row))
this.timer = new Date().getTime() this.timer = new Date().getTime()
this.dialogVisible = true this.dialogVisible = true
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deletePaymentAdjustment(row.Id)
deletePaymentAdjustment(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.indexOf(row), 1)
this.list.splice(this.list.indexOf(row), 1) this.total = this.total - 1
this.total = this.total - 1 this.$message.success('Deleted successfully !')
this.$message.success('Deleted successfully !') }
} })
}) })
}) },
}, handleSearch() {
handleSearch() { this.listQuery.PageIndex = 1
this.listQuery.PageIndex = 1 this.getList()
this.getList() },
}, handleReset() {
handleReset() { this.listQuery.PageIndex = 1
this.listQuery.PageIndex = 1 this.listQuery.Reviewer = ''
this.listQuery.Reviewer = '' this.getList()
this.getList() },
}, sortByColumn(column) {
sortByColumn(column) { if (column.order === 'ascending') {
if (column.order === 'ascending') { this.listQuery.Asc = true
this.listQuery.Asc = true } else {
} else { this.listQuery.Asc = false
this.listQuery.Asc = false }
} this.listQuery.SortField = column.prop
this.listQuery.SortField = column.prop this.listQuery.PageIndex = 1
this.listQuery.PageIndex = 1 this.getList()
this.getList() },
}, closeDialog() {
closeDialog() { this.dialogVisible = false
this.dialogVisible = false },
}, adjustMonthFormatter(row) {
adjustMonthFormatter(row) { if (row.AdjustedYearMonth) {
if (row.AdjustedYearMonth) { const date = new Date(row.AdjustedYearMonth)
const date = new Date(row.AdjustedYearMonth) return FormatTime(date, 'yyyy-MM')
return FormatTime(date, 'yyyy-MM') } else {
} else { return ''
return '' }
} }
} }
} }
} </script>
</script> <style lang="scss">
<style lang="scss"> .adjustment-container{
.adjustment-container{
.filter-container{
.filter-container{ display: flex;
display: flex; align-items: center;
align-items: center; .mr{
.mr{ margin-right:5px;
margin-right:5px; }
} }
} .list-container{
.list-container{ height: calc(100% - 80px);
height: calc(100% - 80px); }
} }
} </style>
</style>

View File

@ -1,198 +1,198 @@
<template> <template>
<div class="app-container exchange-rate data-list"> <div class="app-container exchange-rate data-list">
<div class="filter-container"> <div class="filter-container">
<el-date-picker <el-date-picker
v-model="listQuery.SearchMonth" v-model="listQuery.SearchMonth"
size="small" size="small"
placeholder="Search Month" placeholder="Search Month"
value-format="yyyy-MM" value-format="yyyy-MM"
format="yyyy-MM" format="yyyy-MM"
type="month" type="month"
style="width:150px;margin-right:5px" style="width:150px;margin-right:5px"
:picker-options="pickerOption" :picker-options="pickerOption"
/> />
<el-button size="small" type="text" @click="handleReset">Reset</el-button> <el-button size="small" type="text" @click="handleReset">Reset</el-button>
<el-button type="primary" size="small" @click="handleSearch">Search</el-button> <el-button type="primary" size="small" @click="handleSearch">Search</el-button>
<el-button style="margin-left:auto" type="primary" size="small" @click="handleNew">New</el-button> <el-button style="margin-left:auto" type="primary" size="small" @click="handleNew">New</el-button>
</div> </div>
<div class="list-container"> <div class="list-container">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="list" :data="list"
stripe stripe
class="table" class="table"
height="100%" height="100%"
size="small" size="small"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column prop="YearMonth" label="Month" min-width="60" show-overflow-tooltip /> <el-table-column prop="YearMonth" label="Month" min-width="60" show-overflow-tooltip />
<el-table-column prop="Rate" label="Rate" min-width="60" show-overflow-tooltip /> <el-table-column prop="Rate" label="Rate" min-width="60" show-overflow-tooltip />
<el-table-column prop="UpdateTime" label="Update Time" min-width="70" show-overflow-tooltip /> <el-table-column prop="UpdateTime" label="Update Time" min-width="70" show-overflow-tooltip />
<el-table-column fixed="right" label="Action" min-width="150"> <el-table-column fixed="right" label="Action" min-width="150">
<template slot-scope="scope" min-width="130"> <template slot-scope="scope" min-width="130">
<el-button <el-button
size="small" size="small"
type="text" type="text"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
>Edit</el-button> >Edit</el-button>
<el-button <el-button
size="small" size="small"
type="text" type="text"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>Delete</el-button> >Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="pagination"> <div class="pagination">
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
</div> </div>
<el-dialog <el-dialog
:key="timer" :key="timer"
:title="title" :title="title"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="500px" width="500px"
:close-on-click-modal="false" :close-on-click-modal="false"
size="small" size="small"
> >
<el-form ref="rateForm" label-width="150px" :rules="rules" :model="form" size="small"> <el-form ref="rateForm" label-width="150px" :rules="rules" :model="form" size="small">
<el-form-item label="Month: " prop="YearMonth"> <el-form-item label="Month: " prop="YearMonth">
<el-date-picker <el-date-picker
v-model="form.YearMonth" v-model="form.YearMonth"
type="month" type="month"
value-format="yyyy-MM" value-format="yyyy-MM"
:disabled="form.Id !=''&& form.Id !=undefined" :disabled="form.Id !=''&& form.Id !=undefined"
/> />
</el-form-item> </el-form-item>
<el-form-item label="Exchange Rate: " prop="Rate"> <el-form-item label="Exchange Rate: " prop="Rate">
<el-input v-model="form.Rate" type="number" /> <el-input v-model="form.Rate" type="number" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">Cancel</el-button> <el-button size="small" @click="dialogVisible = false">Cancel</el-button>
<el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button> <el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getRateList, addOrUpdateExchangeRate, deleteExchangeRate } from '@/api/financials' import { getRateList, addOrUpdateExchangeRate, deleteExchangeRate } from '@/api/financials'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
export default { export default {
name: 'ExchangeRate', name: 'ExchangeRate',
components: { Pagination }, components: { Pagination },
data() { data() {
return { return {
listQuery: { SearchMonth: '', PageIndex: 1, PageSize: 20 }, listQuery: { SearchMonth: '', PageIndex: 1, PageSize: 20 },
list: [], list: [],
listLoading: false, listLoading: false,
total: 0, total: 0,
dialogVisible: false, dialogVisible: false,
title: '', title: '',
timer: '', timer: '',
form: {}, form: {},
rules: { rules: {
Rate: [{ required: true, message: 'Please specify', trigger: 'blur' }], Rate: [{ required: true, message: 'Please specify', trigger: 'blur' }],
YearMonth: [{ required: true, message: 'Please specify', trigger: 'blur' }] YearMonth: [{ required: true, message: 'Please specify', trigger: 'blur' }]
}, },
btnDisabled: false, btnDisabled: false,
pickerOption: { pickerOption: {
disabledDate: time => { disabledDate: time => {
return time.getTime() > Date.now() return time.getTime() > Date.now()
} }
} }
} }
}, },
mounted() { this.getList() }, mounted() { this.getList() },
methods: { methods: {
getList() { getList() {
this.listLoading = true this.listLoading = true
getRateList(this.listQuery).then(res => { getRateList(this.listQuery).then(res => {
this.listLoading = false this.listLoading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
}).catch(() => { this.listLoading = false }) }).catch(() => { this.listLoading = false })
}, },
handleNew() { handleNew() {
this.form = {} this.form = {}
this.title = 'Add' this.title = 'Add'
this.timer = new Date().getTime() this.timer = new Date().getTime()
this.dialogVisible = true this.dialogVisible = true
}, },
handleEdit(row) { handleEdit(row) {
this.title = 'Edit' this.title = 'Edit'
this.form = JSON.parse(JSON.stringify(row)) this.form = JSON.parse(JSON.stringify(row))
this.timer = new Date().getTime() this.timer = new Date().getTime()
this.dialogVisible = true this.dialogVisible = true
}, },
handleSave() { handleSave() {
this.$refs.rateForm.validate(valid => { this.$refs.rateForm.validate(valid => {
if (valid) { if (valid) {
this.btnDisabled = true this.btnDisabled = true
const param = { const param = {
Rate: this.form.Rate, Rate: this.form.Rate,
YearMonth: this.form.YearMonth YearMonth: this.form.YearMonth
} }
this.form.Id ? param.Id = this.form.Id : '' this.form.Id ? param.Id = this.form.Id : ''
addOrUpdateExchangeRate(param).then(res => { addOrUpdateExchangeRate(param).then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList() this.getList()
this.$message.success('Updated successfully!') this.$message.success('Updated successfully!')
this.dialogVisible = false this.dialogVisible = false
} }
this.btnDisabled = false this.btnDisabled = false
}) })
.catch(() => { this.btnDisabled = false }) .catch(() => { this.btnDisabled = false })
} }
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Yes', confirmButtonText: 'Yes',
cancelButtonText: 'No' cancelButtonText: 'No'
}) })
.then(() => { .then(() => {
deleteExchangeRate(row.Id) deleteExchangeRate(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })
.catch(action => {}) .catch(action => {})
}, },
handleSearch() { handleSearch() {
this.listQuery.PageIndex = 1 this.listQuery.PageIndex = 1
this.getList() this.getList()
}, },
handleReset() { handleReset() {
this.listQuery.SearchMonth = '' this.listQuery.SearchMonth = ''
this.listQuery.PageIndex = 1 this.listQuery.PageIndex = 1
this.getList() this.getList()
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.exchange-rate{ .exchange-rate{
padding: 0; padding: 0;
.filter-container{ .filter-container{
display: flex; display: flex;
align-items: center; align-items: center;
} }
.list-container{ .list-container{
height: calc(100% - 70px); height: calc(100% - 70px);
} }
.el-date-editor.el-input{ .el-date-editor.el-input{
width: 100%; width: 100%;
} }
.el-date-editor.el-input__inner { .el-date-editor.el-input__inner {
width: 100%; width: 100%;
} }
} }
</style> </style>

View File

@ -1,324 +1,323 @@
<template> <template>
<div class="rates-container"> <div class="rates-container">
<div class="title"> <div class="title">
<p>Rank-Based Rates</p> <p>Rank-Based Rates</p>
<el-button <el-button
type="primary" type="primary"
class="addBtn" class="addBtn"
size="small" size="small"
@click="handleAdd" @click="handleAdd"
>New</el-button> >New</el-button>
</div> </div>
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
size="small" size="small"
:data="list" :data="list"
max-height="300" max-height="300"
stripe stripe
class="table" class="table"
> >
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column prop="RankName" label="Rank" show-overflow-tooltip min-width="100" /> <el-table-column prop="RankName" label="Rank" show-overflow-tooltip min-width="100" />
<el-table-column prop="Training" label="Training ($)" min-width="90" show-overflow-tooltip> <el-table-column prop="Training" label="Training ($)" min-width="90" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.Training | rounding }}</span> <span>{{ scope.row.Training | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="RefresherTraining" label="Refresher Training ($)" min-width="130" show-overflow-tooltip> <el-table-column prop="RefresherTraining" label="Refresher Training ($)" min-width="130" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.RefresherTraining | rounding }}</span> <span>{{ scope.row.RefresherTraining | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Timepoint" align="center"> <el-table-column label="Timepoint" align="center">
<el-table-column <el-table-column
prop="Timepoint" prop="Timepoint"
label="Regular ($)" label="Regular ($)"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.Timepoint | rounding }}</span> <span>{{ scope.row.Timepoint | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="TimepointIn48H" prop="TimepointIn48H"
label="48-hour ($)" label="48-hour ($)"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.TimepointIn48H | rounding }}</span> <span>{{ scope.row.TimepointIn48H | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="TimepointIn24H" prop="TimepointIn24H"
label="24-hour ($)" label="24-hour ($)"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.TimepointIn24H | rounding }}</span> <span>{{ scope.row.TimepointIn24H | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="Adjudication" align="center"> <el-table-column label="Adjudication" align="center">
<el-table-column <el-table-column
prop="Adjudication" prop="Adjudication"
label="Regular ($)" label="Regular ($)"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.Adjudication | rounding }}</span> <span>{{ scope.row.Adjudication | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="AdjudicationIn48H" prop="AdjudicationIn48H"
label="48-hour ($)" label="48-hour ($)"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.AdjudicationIn48H | rounding }}</span> <span>{{ scope.row.AdjudicationIn48H | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="AdjudicationIn24H" prop="AdjudicationIn24H"
label="24-hour ($)" label="24-hour ($)"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.AdjudicationIn24H | rounding }}</span> <span>{{ scope.row.AdjudicationIn24H | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="Global" label="Global ($)" min-width="100" show-overflow-tooltip> <el-table-column prop="Global" label="Global ($)" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.Global | rounding }}</span> <span>{{ scope.row.Global | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="Downtime" label="Downtime ($)" min-width="100" show-overflow-tooltip> <el-table-column prop="Downtime" label="Downtime ($)" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.Downtime | rounding }}</span> <span>{{ scope.row.Downtime | rounding }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed="right" fixed="right"
label="Action" label="Action"
min-width="100" min-width="100"
> >
<template slot-scope="scope" min-width="130"> <template slot-scope="scope" min-width="130">
<el-button <el-button
size="small" size="small"
type="text" type="text"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
>Edit</el-button> >Edit</el-button>
<el-button <el-button
size="small" size="small"
type="text" type="text"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>Delete</el-button> >Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination style="text-align:right;margin-top:5px;" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" /> <pagination style="text-align:right;margin-top:5px;" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
<el-dialog <el-dialog
:key="timer" :key="timer"
:title="title" :title="title"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="500px" width="500px"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form ref="baseRateForm" label-width="190px" :rules="rules" :model="baseRateForm" size="small"> <el-form ref="baseRateForm" label-width="190px" :rules="rules" :model="baseRateForm" size="small">
<el-form-item label="Rank: " prop="RankName"> <el-form-item label="Rank: " prop="RankName">
<el-input v-model="baseRateForm.RankName" /> <el-input v-model="baseRateForm.RankName" />
</el-form-item> </el-form-item>
<el-form-item label="Training ($): " prop="Training"> <el-form-item label="Training ($): " prop="Training">
<!-- <el-input v-model="baseRateForm.Training" type="number" /> --> <!-- <el-input v-model="baseRateForm.Training" type="number" /> -->
<el-input-number v-model="baseRateForm.Training" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.Training" style="width:100%;" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="Refresher Training ($): " prop="RefresherTraining"> <el-form-item label="Refresher Training ($): " prop="RefresherTraining">
<el-input-number v-model="baseRateForm.RefresherTraining" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.RefresherTraining" style="width:100%;" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="Timepoint ($): " prop="Timepoint"> <el-form-item label="Timepoint ($): " prop="Timepoint">
<!-- <el-input v-model="baseRateForm.Timepoint" type="number" /> --> <!-- <el-input v-model="baseRateForm.Timepoint" type="number" /> -->
<el-input-number v-model="baseRateForm.Timepoint" style="width:100%;" :min="0" @input="timepointChange" /> <el-input-number v-model="baseRateForm.Timepoint" style="width:100%;" :min="0" @input="timepointChange" />
</el-form-item> </el-form-item>
<el-form-item label="Timepoint 48H ($): " prop="TimepointIn48H"> <el-form-item label="Timepoint 48H ($): " prop="TimepointIn48H">
<!-- <el-input v-model="baseRateForm.TimepointIn48H" type="number" /> --> <!-- <el-input v-model="baseRateForm.TimepointIn48H" type="number" /> -->
<el-input-number v-model="baseRateForm.TimepointIn48H" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.TimepointIn48H" style="width:100%;" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="Timepoint 24H ($): " prop="TimepointIn24H"> <el-form-item label="Timepoint 24H ($): " prop="TimepointIn24H">
<!-- <el-input v-model="baseRateForm.TimepointIn24H" type="number" /> --> <!-- <el-input v-model="baseRateForm.TimepointIn24H" type="number" /> -->
<el-input-number v-model="baseRateForm.TimepointIn24H" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.TimepointIn24H" style="width:100%;" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="Adjudication ($): " prop="Adjudication"> <el-form-item label="Adjudication ($): " prop="Adjudication">
<!-- <el-input v-model="baseRateForm.Adjudication" type="number" /> --> <!-- <el-input v-model="baseRateForm.Adjudication" type="number" /> -->
<el-input-number v-model="baseRateForm.Adjudication" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.Adjudication" style="width:100%;" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="Adjudication 48H ($): " prop="AdjudicationIn48H"> <el-form-item label="Adjudication 48H ($): " prop="AdjudicationIn48H">
<!-- <el-input v-model="baseRateForm.AdjudicationIn48H" type="number" /> --> <!-- <el-input v-model="baseRateForm.AdjudicationIn48H" type="number" /> -->
<el-input-number v-model="baseRateForm.AdjudicationIn48H" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.AdjudicationIn48H" style="width:100%;" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="Adjudication 24H ($): " prop="AdjudicationIn24H"> <el-form-item label="Adjudication 24H ($): " prop="AdjudicationIn24H">
<!-- <el-input v-model="baseRateForm.AdjudicationIn24H" type="number" /> --> <!-- <el-input v-model="baseRateForm.AdjudicationIn24H" type="number" /> -->
<el-input-number v-model="baseRateForm.AdjudicationIn24H" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.AdjudicationIn24H" style="width:100%;" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="Global ($): " prop="Global"> <el-form-item label="Global ($): " prop="Global">
<el-input v-model="baseRateForm.Global" disabled type="number" /> <el-input v-model="baseRateForm.Global" disabled type="number" />
</el-form-item> </el-form-item>
<el-form-item label="Downtime ($): " prop="Downtime"> <el-form-item label="Downtime ($): " prop="Downtime">
<el-input-number v-model="baseRateForm.Downtime" style="width:100%;" :min="0" /> <el-input-number v-model="baseRateForm.Downtime" style="width:100%;" :min="0" />
<!-- <el-input v-model="baseRateForm.Downtime" type="number" /> --> <!-- <el-input v-model="baseRateForm.Downtime" type="number" /> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">Cancel</el-button> <el-button size="small" @click="dialogVisible = false">Cancel</el-button>
<el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button> <el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { getRankPriceList, addOrUpdateRankPrice, deleteRankPrice } from '@/api/financials' import { getRankPriceList, addOrUpdateRankPrice, deleteRankPrice } from '@/api/financials'
const getListQueryDefault = () => { const getListQueryDefault = () => {
return { return {
PageSize: 20, PageSize: 20,
PageIndex: 1, PageIndex: 1,
Asc: false, Asc: false,
SortField: '' SortField: ''
} }
} }
export default { export default {
name: 'RankBasedRates', name: 'RankBasedRates',
components: { Pagination }, components: { Pagination },
filters: { filters: {
rounding(value) { rounding(value) {
return value ? Number(value).toFixed(2) : value return value ? Number(value).toFixed(2) : value
} }
}, },
data() { data() {
return { return {
listQuery: getListQueryDefault(), listQuery: getListQueryDefault(),
list: [], list: [],
listLoading: false, listLoading: false,
total: 0, total: 0,
baseRateForm: {}, baseRateForm: {},
dialogVisible: false, dialogVisible: false,
btnDisabled: false, btnDisabled: false,
title: '', title: '',
timer: '', timer: '',
rules: { rules: {
RankName: [ RankName: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' } { max: 50, message: 'The maximum length is 50' }
], ],
Training: [{ required: true, message: 'Please specify', trigger: 'blur' }], Training: [{ required: true, message: 'Please specify', trigger: 'blur' }],
Timepoint: [{ required: true, message: 'Please specify', trigger: 'blur' }], Timepoint: [{ required: true, message: 'Please specify', trigger: 'blur' }],
TimepointIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }], TimepointIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
TimepointIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }], TimepointIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
Adjudication: [{ required: true, message: 'Please specify', trigger: 'blur' }], Adjudication: [{ required: true, message: 'Please specify', trigger: 'blur' }],
AdjudicationIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }], AdjudicationIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
AdjudicationIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }], AdjudicationIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
Global: [{ required: true, message: 'Please specify', trigger: 'blur' }], Global: [{ required: true, message: 'Please specify', trigger: 'blur' }],
Downtime: [{ required: true, message: 'Please specify', trigger: 'blur' }], Downtime: [{ required: true, message: 'Please specify', trigger: 'blur' }],
RefresherTraining: [{ required: true, message: 'Please specify', trigger: 'blur' }] RefresherTraining: [{ required: true, message: 'Please specify', trigger: 'blur' }]
} }
} }
}, },
mounted() { this.getList() }, mounted() { this.getList() },
methods: { methods: {
getList() { getList() {
this.listLoading = true this.listLoading = true
getRankPriceList(this.listQuery).then(res => { getRankPriceList(this.listQuery).then(res => {
this.listLoading = false this.listLoading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount this.total = res.Result.TotalCount
}).catch(() => { this.listLoading = false }) }).catch(() => { this.listLoading = false })
}, },
handleAdd() { handleAdd() {
this.baseRateForm = {} this.baseRateForm = {}
this.timer = new Date().getTime() this.timer = new Date().getTime()
this.title = 'Add' this.title = 'Add'
this.dialogVisible = true this.dialogVisible = true
}, },
handleEdit(row) { handleEdit(row) {
this.title = 'Edit' this.title = 'Edit'
this.timer = new Date().getTime() this.timer = new Date().getTime()
this.baseRateForm = JSON.parse(JSON.stringify(row)) this.baseRateForm = JSON.parse(JSON.stringify(row))
this.dialogVisible = true this.dialogVisible = true
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel' })
}) .then(() => {
.then(() => { deleteRankPrice(row.Id)
deleteRankPrice(row.Id) .then(res => {
.then(res => { if (res.IsSuccess) {
if (res.IsSuccess) { this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success('Deleted successfully!') }
} })
}) .catch(err => {
.catch(err => { console.log(err)
console.log(err) })
}) })
}) },
}, handleSave() {
handleSave() { this.$refs.baseRateForm.validate(valid => {
this.$refs.baseRateForm.validate(valid => { if (valid) {
if (valid) { this.btnDisabled = true
this.btnDisabled = true addOrUpdateRankPrice(this.baseRateForm).then(res => {
addOrUpdateRankPrice(this.baseRateForm).then(res => { this.getList()
this.getList() this.btnDisabled = false
this.btnDisabled = false this.$message.success('Saved successfully!')
this.$message.success('Saved successfully!') this.dialogVisible = false
this.dialogVisible = false }).catch(() => { this.btnDisabled = false })
}).catch(() => { this.btnDisabled = false }) }
} })
}) },
}, timepointChange() {
timepointChange() { this.baseRateForm.Global = this.baseRateForm.Timepoint / 2
this.baseRateForm.Global = this.baseRateForm.Timepoint / 2 }
} }
} }
} </script>
</script> <style lang="scss" scoped>
<style lang="scss" scoped> .rates-container {
.rates-container { .title {
.title { position: relative;
position: relative; height: 35px;
height: 35px; line-height: 35px;
line-height: 35px; background: #e4ebf1;
background: #e4ebf1; border-left: 3px solid #0fc8e0;
border-left: 3px solid #0fc8e0; padding-left: 5px;
padding-left: 5px; margin-bottom:10px;
margin-bottom:10px; font-size: 13px;
font-size: 13px; p{
p{ margin: 0;
margin: 0; }
} .addBtn {
.addBtn { position: absolute;
position: absolute; right: 0px;
right: 0px; top: 50%;
top: 50%; height: 30px;
height: 30px; margin-top: -15px;
margin-top: -15px; }
} }
} }
} </style>
</style>

View File

@ -340,11 +340,10 @@ export default {
}, },
handleView(row) { row.SowFullPath ? window.open(row.SowFullPath, '_blank') : '' }, handleView(row) { row.SowFullPath ? window.open(row.SowFullPath, '_blank') : '' },
handleDeleteSOW(row) { handleDeleteSOW(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
const param = { SowPath: row.SowPath, TrialId: row.TrialId } const param = { SowPath: row.SowPath, TrialId: row.TrialId }

View File

@ -92,7 +92,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList = [] this.fileList = []
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
this.$emit('getFileList', this.fileList) this.$emit('getFileList', this.fileList)

View File

@ -274,7 +274,8 @@ export default {
if (this.userTypeEnumInt !== 0) { if (this.userTypeEnumInt !== 0) {
this.$emit('refreshPage') this.$emit('refreshPage')
} }
this.$message.success(this.$t('common:message:savedSuccessfully')) // this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}).catch(() => {}) }).catch(() => {})

View File

@ -64,7 +64,7 @@
<span style="margin-right: 20px"> <span style="margin-right: 20px">
{{$t('trials:enrolledReviews:message:EQC')}} {{$t('trials:enrolledReviews:message:EQC')}}
</span> </span>
<el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(1, $t('trials:enrolledReviews:message:EQC'))">Upload</el-button> <el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(1, $t('trials:enrolledReviews:message:EQC'))">{{$t('common:button:upload')}}</el-button>
</div> </div>
<el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus"> <el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus">
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />

View File

@ -567,8 +567,7 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteEducationInfo(row.Id) deleteEducationInfo(row.Id)
@ -636,8 +635,7 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deletePostgraduateInfo(row.Id) deletePostgraduateInfo(row.Id)

View File

@ -181,7 +181,7 @@ export default {
this.fileList = [] this.fileList = []
this.GCPID = '' this.GCPID = ''
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -266,11 +266,10 @@ export default {
} }
}, },
handleRemoveFile(row) { handleRemoveFile(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteAttachment(row.Id, row.Path) deleteAttachment(row.Id, row.Path)
.then(res => { .then(res => {
@ -278,7 +277,7 @@ export default {
this.resumeList.splice(this.resumeList.findIndex(item => item.Id === row.Id), 1) this.resumeList.splice(this.resumeList.findIndex(item => item.Id === row.Id), 1)
this.filterByLanguage() this.filterByLanguage()
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -78,7 +78,7 @@
</div> </div>
</el-form> </el-form>
<el-dialog <el-dialog
:label="$t('system:Setting:title:Vacation')" :title="$t('system:Setting:title:Vacation')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="50%" width="50%"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -87,6 +87,7 @@
<div> <div>
<el-date-picker <el-date-picker
v-model="daterange" v-model="daterange"
style="width: 360px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
type="daterange" type="daterange"
@ -117,7 +118,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination" style="padding: 10px 0;text-align: right">
<el-pagination <el-pagination
background background
layout="total,sizes,prev, pager, next" layout="total,sizes,prev, pager, next"
@ -165,7 +166,6 @@ export default {
rules: { rules: {
AdminComment: [{ max: 500, message: 'The maximum length is 500' }], AdminComment: [{ max: 500, message: 'The maximum length is 500' }],
BlindName: [{ required: true, message: 'Please specify', trigger: 'blur' }], BlindName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
BlindNameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }]
}, },
doctorId: this.$route.query.Id, doctorId: this.$route.query.Id,
isDisabled: false, isDisabled: false,
@ -258,7 +258,7 @@ export default {
} }
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
@ -272,7 +272,7 @@ export default {
this.gridData.splice(index, 1) this.gridData.splice(index, 1)
this.totalItems = this.totalItems - 1 this.totalItems = this.totalItems - 1
} }
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
this.loading2 = false this.loading2 = false
}) })

View File

@ -2,7 +2,7 @@
<div class="form-container"> <div class="form-container">
<div class="title-wrapper"> <div class="title-wrapper">
<p>{{$t('system:TrialExperience:title:Clinical Trial Experience')}}</p> <p>{{$t('system:TrialExperience:title:Clinical Trial Experience')}}</p>
<el-button :disabled="$route.query.ReviewStatus === '1'" class="add" size="small" @click="handleAddClinicalTrial">Add</el-button> <el-button :disabled="$route.query.ReviewStatus === '1'" class="add" size="small" @click="handleAddClinicalTrial">{{$t('common:button:add')}}</el-button>
</div> </div>
<div style="padding:0 40px;"> <div style="padding:0 40px;">
<el-table <el-table
@ -73,7 +73,7 @@
size="small" size="small"
> >
<el-form-item :label="$t('system:TrialExperience:label:Phase')" prop="PhaseId"> <el-form-item :label="$t('system:TrialExperience:label:Phase')" prop="PhaseId">
<el-select v-model="clinicalTrialForm.PhaseId" placeholder="Please select"> <el-select v-model="clinicalTrialForm.PhaseId">
<!-- <el-option <!-- <el-option
v-for="(key,value) of dictionaryList.Phase" v-for="(key,value) of dictionaryList.Phase"
:key="value" :key="value"
@ -91,7 +91,6 @@
<el-form-item :label="$t('system:TrialExperience:label:Review Criteria')" prop="EvaluationCriteriaIdList"> <el-form-item :label="$t('system:TrialExperience:label:Review Criteria')" prop="EvaluationCriteriaIdList">
<el-select <el-select
v-model="clinicalTrialForm.EvaluationCriteriaIdList" v-model="clinicalTrialForm.EvaluationCriteriaIdList"
placeholder="Please select"
multiple multiple
> >
<!-- <el-option v-for="(key,value) of dictionaryList.ReadingStandard" :key="value" :label="key" :value="value" /> --> <!-- <el-option v-for="(key,value) of dictionaryList.ReadingStandard" :key="value" :label="key" :value="value" /> -->
@ -267,8 +266,7 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteTrialExperience(row.Id) deleteTrialExperience(row.Id)

View File

@ -69,13 +69,13 @@
</el-form> </el-form>
</div> </div>
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-switch <!-- <el-switch-->
v-model="isEN" <!-- v-model="isEN"-->
active-text="EN" <!-- active-text="EN"-->
inactive-text="中文" <!-- inactive-text="中文"-->
style="margin-right:10px;" <!-- style="margin-right:10px;"-->
@change="handleIsEnChange" <!-- @change="handleIsEnChange"-->
/> <!-- />-->
<el-button size="small" icon="el-icon-plus" type="primary" @click="handleNew">{{$t('common:button:new')}}</el-button> <el-button size="small" icon="el-icon-plus" type="primary" @click="handleNew">{{$t('common:button:new')}}</el-button>
</span> </span>
</div> </div>
@ -367,17 +367,20 @@ export default {
}, },
tokenKey: getToken(), tokenKey: getToken(),
share_model: { visible: false, title: '', width: '500px' }, share_model: { visible: false, title: '', width: '500px' },
shareLink: null shareLink: null,
isEnglish: false
} }
}, },
dicts: ['ReadingType', 'Subspeciality', 'Department', 'Rank', 'Position', 'ReadingStandard'], dicts: ['ReadingType', 'Subspeciality', 'Department', 'Rank', 'Position', 'ReadingStandard'],
computed: { computed: {
...mapGetters(['hospitalList', 'reviewersQuery', 'isEnglish']) ...mapGetters(['hospitalList', 'reviewersQuery'])
}, },
created() { created() {
this.isEN = this.isEnglish
this.reviewersQuery ? this.listQuery = this.reviewersQuery : '' this.reviewersQuery ? this.listQuery = this.reviewersQuery : ''
this.initPage() this.initPage()
// this.isEnglish = !!((this.$route.query.isEnglish === true || this.$route.query.isEnglish === 'true'))
this.isEnglish = this.$i18n.locale === 'zh' ? false : true
this.isEN = this.isEnglish
}, },
methods: { methods: {
copyCode() { copyCode() {

View File

@ -43,9 +43,6 @@
<el-date-picker <el-date-picker
v-model="datetimerange" v-model="datetimerange"
type="datetimerange" type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
@change="handleDatetimeChange" @change="handleDatetimeChange"
@ -77,7 +74,7 @@
<el-table-column <el-table-column
:label="$t('system:loginLog:table:OptType')" :label="$t('system:loginLog:table:OptType')"
prop="OptType" prop="OptType"
min-width="90" min-width="150"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
> >
@ -88,28 +85,28 @@
<el-table-column <el-table-column
label="IP" label="IP"
prop="IP" prop="IP"
min-width="90" min-width="150"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:LoginFaildName')" :label="$t('system:loginLog:table:LoginFaildName')"
prop="LoginFaildName" prop="LoginFaildName"
min-width="90" min-width="180"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:LoginUserName')" :label="$t('system:loginLog:table:LoginUserName')"
prop="LoginUserName" prop="LoginUserName"
min-width="90" min-width="140"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:LoginUserType')" :label="$t('system:loginLog:table:LoginUserType')"
prop="LoginUserTypeEnum" prop="LoginUserTypeEnum"
min-width="90" min-width="120"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
> >
@ -120,14 +117,14 @@
<el-table-column <el-table-column
:label="$t('system:loginLog:table:OptUserName')" :label="$t('system:loginLog:table:OptUserName')"
prop="OptUserName" prop="OptUserName"
min-width="90" min-width="200"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:OptUserType')" :label="$t('system:loginLog:table:OptUserType')"
prop="OptUserTypeEnum" prop="OptUserTypeEnum"
min-width="90" min-width="200"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
> >
@ -138,7 +135,7 @@
<el-table-column <el-table-column
:label="$t('system:loginLog:table:CreateTime')" :label="$t('system:loginLog:table:CreateTime')"
prop="CreateTime" prop="CreateTime"
min-width="90" min-width="180"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />

View File

@ -5,7 +5,7 @@
ref="NoticeForm" ref="NoticeForm"
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="120px" label-width="180px"
size="small" size="small"
> >
<el-form-item :label="$t('system:notice:label:NoticeLevel')" prop="NoticeLevelEnum"> <el-form-item :label="$t('system:notice:label:NoticeLevel')" prop="NoticeLevelEnum">

View File

@ -136,16 +136,15 @@ export default {
// }) // })
}, },
handleDeleteRole(row) { handleDeleteRole(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteUserTypeRole(row.Id).then((res) => { deleteUserTypeRole(row.Id).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1) this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -9,27 +9,26 @@
</el-card> </el-card>
</template> </template>
<script> <script>
import { params } from '@/utils/ruoyi'
import { resetPassword } from '@/api/admin' import { resetPassword } from '@/api/admin'
export default { export default {
name: 'Account', name: 'Account',
props: { props: {
userId: { type: String, default: '' } userId: { type: String, default: '' },
}, },
methods: { methods: {
handleReset() { handleReset() {
this.$confirm('Sure to reset password?', { this.$confirm(this.$t('system:userlist:message:ResetPassword').replace('xxx', params('userName')), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
resetPassword(this.userId).then(res => { resetPassword(this.userId).then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message({ let msg = this.$t('system:userlist:message:ResetPassword2')
message: 'Reset password successfully', msg = msg.replace('xxx', params('userName'))
type: 'success' msg = msg.replace('yyy', params('email'))
}) this.$alert(msg)
} }
}) })
}) })

View File

@ -38,10 +38,12 @@
<el-input v-model="user.Phone" /> <el-input v-model="user.Phone" />
</el-form-item> </el-form-item>
<el-form-item v-if="type==1" :label="$t('system:userlist:table:Disable')"> <el-form-item v-if="type==1" :label="$t('system:userlist:table:Disable')">
<el-switch v-model="user.Status" :active-value="0" :inactive-value="1" /> <el-switch v-model="user.Status" :active-value="1" :inactive-value="0" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:IsTestUser')"> <el-form-item :label="$t('system:userlist:table:IsTestUser')">
<el-switch v-model="user.IsTestUser" /> <el-radio-group v-model="user.IsTestUser">
<el-radio v-for="item of $d.NoOrYes" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:UserType')" prop="UserTypeId"> <el-form-item :label="$t('system:userlist:table:UserType')" prop="UserTypeId">
<el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;" :disabled="user.CanEditUserType === false"> <el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;" :disabled="user.CanEditUserType === false">
@ -105,11 +107,29 @@ export default {
} }
}, },
methods: { methods: {
updateQueryParam(param, newValue,wurl) {
// URL
let url = wurl || window.location.href;
//
let regex = new RegExp('([?&])' + param + '=.*?(&|$)');
let separator = url.indexOf('?') !== -1 ? '&' : '?';
//
if (regex.test(url)) {
return url.replace(regex, '$1' + param + '=' + newValue + '$2');
} else {
return url + separator + param + '=' + newValue;
}
},
handleSave() { handleSave() {
this.$refs.userForm.validate(valid => { this.$refs.userForm.validate(valid => {
if (valid) { if (valid) {
this.isDisabled = true this.isDisabled = true
const selectedUserType = this.userTypeOptions.filter(item => item.Id === this.user.UserTypeId) const selectedUserType = this.userTypeOptions.filter(item => item.Id === this.user.UserTypeId)
let newUrl = this.updateQueryParam('userName', this.user.UserName)
newUrl = this.updateQueryParam('email', this.user.EMail, newUrl)
window.history.pushState({ path: newUrl }, '', newUrl)
if (selectedUserType.length > 0) { if (selectedUserType.length > 0) {
this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum
} }

View File

@ -9,13 +9,14 @@
:search-handle="searchHandle" :search-handle="searchHandle"
@search="handleSearch" @search="handleSearch"
@reset="handleReset" @reset="handleReset"
@new="handleAddUser"
/> />
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
size="mini" <!-- size="mini"-->
style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px" <!-- style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px"-->
@click="handleAddUser" <!-- @click="handleAddUser"-->
>{{$t('common:button:new')}}</el-button> <!-- >{{$t('common:button:new')}}</el-button>-->
</div> </div>
<base-table <base-table
v-loading="loading" v-loading="loading"
@ -36,13 +37,13 @@
{{ scope.row.RoleNameList.map(role => role.RoleName).join(',') }} {{ scope.row.RoleNameList.map(role => role.RoleName).join(',') }}
</template> </template>
<template slot="isZhiZhunSlot" slot-scope="{scope}"> <template slot="isZhiZhunSlot" slot-scope="{scope}">
{{scope.row.IsZhiZhun ? 'Internal' : 'External'}} {{scope.row.IsZhiZhun ? $t('system:userlist:table:InternalOrExternal:Internal') : $t('system:userlist:table:InternalOrExternal:External')}}
</template> </template>
<template slot="isTestUserSlot" slot-scope="{scope}"> <template slot="isTestUserSlot" slot-scope="{scope}">
{{scope.row.IsTestUser ? 'Yes' : 'No'}} {{scope.row.IsTestUser ? $t('system:userlist:table:IsTestUser:Yes') : $t('system:userlist:table:IsTestUser:No')}}
</template> </template>
<template slot="statusSlot" slot-scope="{scope}"> <template slot="statusSlot" slot-scope="{scope}">
{{ scope.row.Status?'Enable':'Disable' }} {{ scope.row.Status? $t('system:userlist:table:Status:Enable') : $t('system:userlist:table:Status:Disable') }}
</template> </template>
</base-table> </base-table>
</box-content> </box-content>
@ -166,8 +167,8 @@ export default {
label: this.$t('common:action:action'), label: this.$t('common:action:action'),
minWidth: 200, minWidth: 200,
operates: [ operates: [
{ name: 'Edit', type: 'primary', emitKey: 'editCb' }, { name: this.$t('common:button:edit'), type: 'primary', emitKey: 'editCb' },
{ name: 'Delete', type: 'danger', emitKey: 'deleteCb' } { name: this.$t('common:button:delete'), type: 'danger', emitKey: 'deleteCb' }
] } ] }
], ],
searchForm: [ searchForm: [
@ -205,8 +206,8 @@ export default {
prop: 'IsZhiZhun', prop: 'IsZhiZhun',
width: '100px', width: '100px',
options: [ options: [
{ label: 'Internal', value: true }, { label: this.$t('system:userlist:label:InternalOrExternal:Internal'), value: true },
{ label: 'External', value: false } { label: this.$t('system:userlist:label:InternalOrExternal:External'), value: false }
], ],
props: { label: 'label', value: 'value' }, props: { label: 'label', value: 'value' },
change: scope => '', change: scope => '',
@ -218,8 +219,8 @@ export default {
prop: 'IsTestUser', prop: 'IsTestUser',
width: '100px', width: '100px',
options: [ options: [
{ label: 'Yes', value: true }, { label: this.$t('system:userlist:label:IsTestUser:Yes'), value: true },
{ label: 'No', value: false } { label: this.$t('system:userlist:label:IsTestUser:No'), value: false }
], ],
props: { label: 'label', value: 'value' }, props: { label: 'label', value: 'value' },
change: scope => '', change: scope => '',
@ -231,8 +232,8 @@ export default {
prop: 'UserState', prop: 'UserState',
width: '100px', width: '100px',
options: [ options: [
{ label: 'Enable', value: 1 }, { label: this.$t('system:userlist:label:Status:Enable'), value: 1 },
{ label: 'Disable', value: 0 } { label: this.$t('system:userlist:label:Status:Disable'), value: 0 }
], ],
props: { label: 'label', value: 'value' }, props: { label: 'label', value: 'value' },
change: scope => '', change: scope => '',
@ -250,7 +251,8 @@ export default {
], ],
searchHandle: [ searchHandle: [
{ label: this.$t('common:button:reset'), type: 'primary', emitKey: 'reset' }, { label: this.$t('common:button:reset'), type: 'primary', emitKey: 'reset' },
{ label: this.$t('common:button:search'), type: 'primary', emitKey: 'search' } { label: this.$t('common:button:search'), type: 'primary', emitKey: 'search' },
{ label: this.$t('common:button:new'), type: 'primary', emitKey: 'new' }
], ],
userTypeOptions: [], userTypeOptions: [],
loading: false, loading: false,
@ -289,22 +291,21 @@ export default {
}, },
// //
handleEditUser(data) { handleEditUser(data) {
this.$router.push({ path: '/system/user/edit', query: { Id: data.Id }}) this.$router.push({ path: '/system/user/edit', query: { Id: data.Id, userName: data.UserName, email: data.EMail }})
}, },
// //
handleDeleteUser(data) { handleDeleteUser(data) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSysUser(data.Id) deleteSysUser(data.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1) this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -555,14 +555,14 @@
@click.stop="handleAbandon(scope.row)" @click.stop="handleAbandon(scope.row)"
/> />
<!-- 代办详情--> <!-- 代办详情-->
<el-button <!-- <el-button-->
v-hasPermi="['trials:trials-list:abolish']" <!-- v-hasPermi="['trials:trials-list:abolish']"-->
circle <!-- circle-->
icon="el-icon-receiving" <!-- icon="el-icon-receiving"-->
:disabled="scope.row.TrialStatusStr === 'Initializing'" <!-- :disabled="scope.row.TrialStatusStr === 'Initializing'"-->
:title="$t('trials:trials-list:action:commission')" <!-- :title="$t('trials:trials-list:action:commission')"-->
@click.stop="handleCommission(scope.row)" <!-- @click.stop="handleCommission(scope.row)"-->
/> <!-- />-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -8,15 +8,15 @@
<div v-if="trialInfo" class="trial-wrapper"> <div v-if="trialInfo" class="trial-wrapper">
<div class="div-row"> <div class="div-row">
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:indication') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:indication:') }}</label>
<span>{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}</span> <span>{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}</span>
</div> </div>
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:criterion') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:criterion:') }}</label>
<span>{{ (trialInfo.CriterionList && trialInfo.CriterionList.length>0)? trialInfo.CriterionList.join(', '): '' }}</span> <span>{{ (trialInfo.CriterionList && trialInfo.CriterionList.length>0)? trialInfo.CriterionList.join(', '): '' }}</span>
</div> </div>
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:modality') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:modality:') }}</label>
<el-tooltip <el-tooltip
class="item" class="item"
:content="trialInfo.Modalitys" :content="trialInfo.Modalitys"
@ -34,11 +34,11 @@
<!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>--> <!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>-->
<!-- </div>--> <!-- </div>-->
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:totalReviewers') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:totalReviewers:') }}</label>
<span>{{ trialInfo.TotalReviewers }}</span> <span>{{ trialInfo.TotalReviewers }}</span>
</div> </div>
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:typeofReviewers') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:typeofReviewers:') }}</label>
<span>{{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).toString() }}</span> <span>{{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).toString() }}</span>
<!-- <span>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>--> <!-- <span>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>-->
</div> </div>

View File

@ -8,15 +8,15 @@
<div v-if="trialInfo" class="trial-wrapper"> <div v-if="trialInfo" class="trial-wrapper">
<div class="div-row"> <div class="div-row">
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:indication') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:indication:') }}</label>
<span>{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}</span> <span>{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}</span>
</div> </div>
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:criterion') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:criterion:') }}</label>
<span>{{ (trialInfo.CriterionList && trialInfo.CriterionList.length>0)? trialInfo.CriterionList.join(', '): '' }}</span> <span>{{ (trialInfo.CriterionList && trialInfo.CriterionList.length>0)? trialInfo.CriterionList.join(', '): '' }}</span>
</div> </div>
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:modality') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:modality:') }}</label>
<el-tooltip <el-tooltip
class="item" class="item"
:content="trialInfo.Modalitys" :content="trialInfo.Modalitys"
@ -34,11 +34,11 @@
<!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>--> <!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>-->
<!-- </div>--> <!-- </div>-->
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:totalReviewers') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:totalReviewers:') }}</label>
<span>{{ trialInfo.TotalReviewers }}</span> <span>{{ trialInfo.TotalReviewers }}</span>
</div> </div>
<div class="div-col"> <div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:typeofReviewers') }}</label> <label class="el-label">{{ $t('trials:trials-list:form:typeofReviewers:') }}</label>
<span>{{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).toString() }}</span> <span>{{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).toString() }}</span>
<!-- <span>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>--> <!-- <span>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>-->
</div> </div>

View File

@ -94,7 +94,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList = [] this.fileList = []
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
this.$emit('getFileList', this.fileList) this.$emit('getFileList', this.fileList)

View File

@ -18,22 +18,6 @@
style="width:120px;" style="width:120px;"
/> />
</el-form-item> </el-form-item>
<!-- 语言类型 -->
<!-- <el-form-item-->
<!-- :label="$t('common:title:languageType')"-->
<!-- >-->
<!-- <el-select-->
<!-- v-model="searchData.LanguageType"-->
<!-- clearable-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item of $d.LanguageType"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- 类型 --> <!-- 类型 -->
<el-form-item <el-form-item
:label="$t('trials:medicalFeedbackCfg:title:taskType')" :label="$t('trials:medicalFeedbackCfg:title:taskType')"
@ -80,7 +64,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: 10px"> <el-form-item>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"

View File

@ -53,7 +53,7 @@
sortable="custom" sortable="custom"
min-width="100" 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>
<el-table-column <el-table-column
prop="UserType" prop="UserType"

View File

@ -137,11 +137,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -150,7 +149,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -175,6 +175,8 @@
v-model="scope.row.IsReading" v-model="scope.row.IsReading"
:disabled="scope.row.IsDeleted || isAudit" :disabled="scope.row.IsDeleted || isAudit"
@change="changeReadingStatus($event, scope.row)" @change="changeReadingStatus($event, scope.row)"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
/> />
</template> </template>
</el-table-column> </el-table-column>
@ -188,6 +190,8 @@
v-model="scope.row.IsDeleted" v-model="scope.row.IsDeleted"
:disabled="isAudit" :disabled="isAudit"
@change="changeDeleteStatus($event, scope.row)" @change="changeDeleteStatus($event, scope.row)"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
/> />
</template> </template>
</el-table-column> </el-table-column>
@ -1258,6 +1262,7 @@ export default {
row.IsReading = true row.IsReading = true
} }
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr) var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
message = message.replace('yyy', this.$fd('YesOrNo', !row.IsReading))
this.$confirm(message, { this.$confirm(message, {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
type: 'warning' type: 'warning'
@ -1283,6 +1288,7 @@ export default {
row.IsDeleted = true row.IsDeleted = true
} }
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr) var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
message = message.replace('yyy', this.$fd('YesOrNo', !row.IsDeleted))
this.$confirm(message, { this.$confirm(message, {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
type: 'warning' type: 'warning'

View File

@ -229,9 +229,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip placement="bottom"> <el-tooltip placement="bottom">
<div slot="content"> <div slot="content">
<span>{{ $t('trials:crcUpload:label:dicom') }}: {{ scope.row.DicomStudyCount }},</span> <span>{{ $t('trials:crcUpload:label:dicom') }}: {{ scope.row.DicomStudyCount }}, </span>
<span v-if="scope.row.IsBaseLine && OtherInfo.ClinicalInformationTransmissionEnum > 0"> <span v-if="scope.row.IsBaseLine && OtherInfo.ClinicalInformationTransmissionEnum > 0">
<span>{{ $t('trials:crcUpload:label:noneDicom') }}: {{ scope.row.NoneDicomStudyCount }},</span> <span>{{ $t('trials:crcUpload:label:noneDicom') }}: {{ scope.row.NoneDicomStudyCount }}, </span>
<span>{{ $t('trials:crcUpload:label:clinicalData') }}: {{ scope.row.IsHaveClinicalData?'w/':'w/o' }}</span> <span>{{ $t('trials:crcUpload:label:clinicalData') }}: {{ scope.row.IsHaveClinicalData?'w/':'w/o' }}</span>
</span> </span>
<span v-else>{{ $t('trials:crcUpload:label:noneDicom') }}: {{ scope.row.NoneDicomStudyCount }}</span> <span v-else>{{ $t('trials:crcUpload:label:noneDicom') }}: {{ scope.row.NoneDicomStudyCount }}</span>

View File

@ -5,7 +5,7 @@
</div> </div>
<div class="workbench-content" style="height: 100%"> <div class="workbench-content" style="height: 100%">
<div style="height: 100%;position: relative"> <div style="height: 100%;position: relative">
<div style="font-size: 20px;position: absolute;line-height: 40px;text-align: right" :style="{width: width + 'px'}"> <div style="font-weight:900;font-size: 20px;position: absolute;line-height: 60px;text-align: left;white-space: nowrap;padding-left: 20px" :style="{width: width + 'px'}">
{{ $t('trials:workbench:label:pendingTasksStats') }} ({{tabList.TotalCount}}) {{ $t('trials:workbench:label:pendingTasksStats') }} ({{tabList.TotalCount}})
</div> </div>
<el-tabs v-model="activeName" style="height: 100%" tab-position="left"> <el-tabs v-model="activeName" style="height: 100%" tab-position="left">
@ -157,7 +157,7 @@ export default {
console.log(res) console.log(res)
this.trialIdList = res.Result this.trialIdList = res.Result
this.$nextTick(() => { this.$nextTick(() => {
this.width = document.querySelector('.el-tabs__nav-scroll').clientWidth - 75 this.width = document.querySelector('.el-tabs__nav-scroll').clientWidth - 20
var list = document.querySelectorAll('div[aria-controls]') var list = document.querySelectorAll('div[aria-controls]')
list.forEach((v, i) => { list.forEach((v, i) => {
if (i === 0) { if (i === 0) {
@ -180,10 +180,11 @@ export default {
<style lang="scss"> <style lang="scss">
.workbench-container{ .workbench-container{
.el-tabs__nav{ .el-tabs__nav{
transform: translateY(40px)!important; transform: translateY(60px)!important;
} }
.el-tabs__header{ .el-tabs__header{
position: relative; position: relative;
width: 260px!important;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 7px; width: 7px;

View File

@ -1,30 +1,30 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card class="Security" style="width:800px;"> <!-- <el-card class="Security" style="width:800px;">-->
<div slot="header" class="clearfix"> <!-- <div slot="header" class="clearfix">-->
<span>Security</span> <!-- <span>Security</span>-->
</div> <!-- </div>-->
<el-form <!-- <el-form-->
ref="userAccount" <!-- ref="userAccount"-->
:model="user" <!-- :model="user"-->
:rules="userFormRules" <!-- :rules="userFormRules"-->
label-width="150px" <!-- label-width="150px"-->
style="width:600px;" <!-- style="width:600px;"-->
> <!-- >-->
<el-form-item label="Current Password" prop="OldPassWord"> <!-- <el-form-item label="Current Password" prop="OldPassWord">-->
<el-input v-model="user.OldPassWord" type="password" /> <!-- <el-input v-model="user.OldPassWord" type="password" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="New Password" prop="NewPassWord"> <!-- <el-form-item label="New Password" prop="NewPassWord">-->
<el-input v-model="user.NewPassWord" type="password" /> <!-- <el-input v-model="user.NewPassWord" type="password" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="Confirm Password" prop="ConfirmPassWord"> <!-- <el-form-item label="Confirm Password" prop="ConfirmPassWord">-->
<el-input v-model="user.ConfirmPassWord" type="password" /> <!-- <el-input v-model="user.ConfirmPassWord" type="password" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <!-- <el-form-item>-->
<el-button type="primary" size="small" @click="save">save</el-button> <!-- <el-button type="primary" size="small" @click="save">save</el-button>-->
</el-form-item> <!-- </el-form-item>-->
</el-form> <!-- </el-form>-->
</el-card> <!-- </el-card>-->
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,247 +1,265 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-card class="Security" style="width:800px;">
ref="userForm" <div slot="header" class="clearfix">
size="small" <span>Security</span>
:model="user" </div>
:rules="userFormRules" <el-form
label-width="150px" ref="userForm"
style="width:800px;" size="small"
> :model="user"
<el-card class="Basic" shadow="never" size="small"> :rules="userFormRules"
<div slot="header" class="clearfix"> label-width="210px"
<span>Basic Information</span> style="width:600px;"
</div> >
<el-form-item v-if="user.Code" label="ID: " prop="Code"> <el-form-item v-if="user.Code" label="ID: " prop="Code">
<el-input v-model="user.Code" disabled /> <el-input v-model="user.Code" disabled />
</el-form-item> </el-form-item>
<el-form-item label="User Name: " prop="UserName"> <el-form-item label="User Name: " prop="UserName">
<el-input v-model="user.UserName" disabled /> <el-input v-model="user.UserName" disabled />
</el-form-item> </el-form-item>
<el-form-item v-if="user.UserTypeEnum !== 8" label="Surname: " prop="LastName">
<!-- <el-form-item label="Real Name: " prop="RealName"> <el-input v-model="user.LastName" />
<el-input v-model="user.RealName" /> </el-form-item>
</el-form-item> --> <el-form-item v-if="user.UserTypeEnum !== 8" label="Given Name: " prop="FirstName">
<el-form-item v-if="user.UserTypeEnum !== 8" label="Surname: " prop="LastName"> <el-input v-model="user.FirstName" />
<el-input v-model="user.LastName" /> </el-form-item>
</el-form-item> <el-form-item label="Gender: " prop="Sex" style="margin-right:40px;">
<el-form-item v-if="user.UserTypeEnum !== 8" label="Given Name: " prop="FirstName"> <el-radio-group v-model="user.Sex">
<el-input v-model="user.FirstName" /> <el-radio :label="1">Male</el-radio>
</el-form-item> <el-radio :label="0">Female</el-radio>
<el-form-item label="Gender: " prop="Sex" style="margin-right:40px;"> </el-radio-group>
<el-radio-group v-model="user.Sex"> </el-form-item>
<el-radio :label="1">Male</el-radio> <el-form-item label="Email: " prop="EMail">
<el-radio :label="0">Female</el-radio> <el-input v-model="user.EMail" />
</el-radio-group> </el-form-item>
</el-form-item> <el-form-item label="Phone: ">
<el-form-item label="Email: " prop="EMail"> <el-input v-model="user.Phone" />
<el-input v-model="user.EMail" /> </el-form-item>
</el-form-item> <el-form-item v-if="user.UserTypeEnum !== 8" label="Disable">
<el-form-item label="Phone: "> <el-switch v-model="user.Status" :active-value="0" :inactive-value="1" disabled />
<el-input v-model="user.Phone" /> </el-form-item>
</el-form-item> <!-- <el-form-item label="User Type: " prop="UserTypeId">
<el-form-item v-if="user.UserTypeEnum !== 8" label="Disable"> <el-select v-model="user.UserTypeId" size="small" placeholder="Please select" disabled>
<el-switch v-model="user.Status" :active-value="0" :inactive-value="1" disabled /> <el-option
</el-form-item> v-for="(value,key) of dictionaryList.UserType"
<!-- <el-form-item label="User Type: " prop="UserTypeId"> :key="key"
<el-select v-model="user.UserTypeId" size="small" placeholder="Please select" disabled> :label="value"
<el-option :value="key"
v-for="(value,key) of dictionaryList.UserType" />
:key="key" </el-select>
:label="value" </el-form-item> -->
:value="key" <!-- <el-form-item label="User Type: " prop="UserTypeId">
/> <el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;">
</el-select> <el-option
</el-form-item> --> v-for="(userType,key) of userTypeOptions"
<!-- <el-form-item label="User Type: " prop="UserTypeId"> :key="key"
<el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;"> :label="userType.UserType"
<el-option :value="userType.Id"
v-for="(userType,key) of userTypeOptions" />
:key="key" </el-select>
:label="userType.UserType" </el-form-item> -->
:value="userType.Id"
/> <el-form-item label="User Type: " prop="UserType">
</el-select> <el-input v-model="user.UserType" disabled />
</el-form-item> --> </el-form-item>
<el-form-item label="User Type: " prop="UserType"> <!-- <div slot="header" class="clearfix">-->
<el-input v-model="user.UserType" disabled /> <!-- <span>Affiliation</span>-->
</el-form-item> <!-- </div>-->
</el-card> <el-form-item prop="IsZhiZhun">
<el-radio-group v-model="user.IsZhiZhun">
<el-card v-if="user.UserTypeEnum !== 8" class="Affiliation" shadow="never" style="margin-top:10px;" size="small"> <el-radio :label="true">Internal</el-radio>
<div slot="header" class="clearfix"> <el-radio :label="false">External</el-radio>
<span>Affiliation</span> </el-radio-group>
</div> </el-form-item>
<el-form-item prop="IsZhiZhun"> <el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: " prop="OrganizationName">
<el-radio-group v-model="user.IsZhiZhun"> <el-input v-model="user.OrganizationName" />
<el-radio :label="true">Internal</el-radio> </el-form-item>
<el-radio :label="false">External</el-radio> <!-- <el-form-item label="Orgnization Type: " prop="OrganizationTypeId">
</el-radio-group> <el-select
</el-form-item> v-model="user.OrganizationTypeId"
<el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: " prop="OrganizationName"> placeholder="Please select"
<el-input v-model="user.OrganizationName" /> @change="handelOrgnizationTypeChange"
</el-form-item> >
<!-- <el-form-item label="Orgnization Type: " prop="OrganizationTypeId"> <el-option
<el-select v-for="(value,key) of dictionaryList.InstitutionalType"
v-model="user.OrganizationTypeId" :key="key"
placeholder="Please select" :label="value"
@change="handelOrgnizationTypeChange" :value="key"
> />
<el-option </el-select>
v-for="(value,key) of dictionaryList.InstitutionalType" </el-form-item>
:key="key"
:label="value" <el-form-item v-show="user.OrganizationTypeId" label="Orgnization: " prop="OrganizationId">
:value="key" <el-select v-model="user.OrganizationId" placeholder="Please select">
/> <el-option
</el-select> v-for="(item) of OrganizationOptions"
</el-form-item> :key="item.Id"
:label="item.InstitutionName"
<el-form-item v-show="user.OrganizationTypeId" label="Orgnization: " prop="OrganizationId"> :value="item.Id"
<el-select v-model="user.OrganizationId" placeholder="Please select"> />
<el-option </el-select>
v-for="(item) of OrganizationOptions" </el-form-item> -->
:key="item.Id"
:label="item.InstitutionName" <el-form-item label="Department: " prop="DepartmentName">
:value="item.Id" <el-input v-model="user.DepartmentName" />
/> </el-form-item>
</el-select> <el-form-item label="Position: " prop="PositionName">
</el-form-item> --> <el-input v-model="user.PositionName" />
</el-form-item>
<el-form-item label="Department: " prop="DepartmentName"> <el-form-item>
<el-input v-model="user.DepartmentName" /> <el-button
</el-form-item> type="primary"
<el-form-item label="Position: " prop="PositionName"> size="small"
<el-input v-model="user.PositionName" /> :disabled="isDisabled"
</el-form-item> style="margin:10px 15px"
</el-card> @click="handleSave"
<el-form-item> >Save</el-button>
<el-button </el-form-item>
type="primary" </el-form>
size="small" </el-card>
:disabled="isDisabled" <el-card class="Security" style="width:800px;">
style="margin:10px 15px" <div slot="header" class="clearfix">
@click="handleSave" <span>Security</span>
>Save</el-button> </div>
</el-form-item> <el-form
ref="userAccount"
</el-form> :model="user"
</div> :rules="userFormRules"
</template> label-width="210px"
<script> style="width:600px;"
import { getUserTypeList, getInstitutionList, getUser, addUser, updateUser } from '@/api/admin.js' >
import store from '@/store' <el-form-item label="Current Password" prop="OldPassWord">
import { mapGetters } from 'vuex' <el-input v-model="user.OldPassWord" type="password" />
export default { </el-form-item>
data() { <el-form-item label="New Password" prop="NewPassWord">
return { <el-input v-model="user.NewPassWord" type="password" />
user: {}, </el-form-item>
userFormRules: { <el-form-item label="Confirm New Password" prop="ConfirmPassWord">
UserName: [{ required: true, message: 'Please specify', trigger: 'blur' }], <el-input v-model="user.ConfirmPassWord" type="password" />
UserTypeId: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }], </el-form-item>
// OrganizationId: [{ required: true, message: 'Please specify', trigger: 'blur' }], <el-form-item>
// OrganizationTypeId: [{ required: true, message: 'Please specify', trigger: 'blur' }], <el-button type="primary" size="small" @click="save">save</el-button>
// RealName: [{ required: true, message: 'Please specify', trigger: 'blur' }], </el-form-item>
IsZhiZhun: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }], </el-form>
OrganizationName: [{ required: true, message: 'Please specify', trigger: 'blur' }], </el-card>
LastName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }], </div>
FirstName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }], </template>
<script>
// Phone: [ import { getUserTypeList, getInstitutionList, getUser, addUser, updateUser } from '@/api/admin.js'
// { max: 20, min: 7, message: 'The length is 7 to 20' } import store from '@/store'
// ], import { mapGetters } from 'vuex'
EMail: [ export default {
{ data() {
required: true, return {
message: 'Please input the email address', user: {},
trigger: 'blur' userFormRules: {
}, UserName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
{ UserTypeId: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }],
type: 'email', // OrganizationId: [{ required: true, message: 'Please specify', trigger: 'blur' }],
message: 'Please input the correct email address', // OrganizationTypeId: [{ required: true, message: 'Please specify', trigger: 'blur' }],
trigger: ['blur', 'change'] // RealName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
}, IsZhiZhun: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }],
{ max: 50, message: 'The maximum length is 50' } OrganizationName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
], LastName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }], FirstName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
Status: [{ required: true, message: 'Please specify', trigger: 'blur' }]
}, // Phone: [
// OrganizationOptions: [], // { max: 20, min: 7, message: 'The length is 7 to 20' }
userTypeOptions: [], // ],
isDisabled: false EMail: [
} {
}, required: true,
computed: { message: 'Please input the email address',
...mapGetters(['userId']) trigger: 'blur'
}, },
mounted() { {
// this.getUserTypeList() type: 'email',
this.initPage() message: 'Please input the correct email address',
}, trigger: ['blur', 'change']
methods: { },
handleSave() { { max: 50, message: 'The maximum length is 50' }
this.$refs.userForm.validate(valid => { ],
if (valid) { Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }],
this.isDisabled = true Status: [{ required: true, message: 'Please specify', trigger: 'blur' }]
const selectedUserType = this.userTypeOptions.filter((item) => { },
return item.Id === this.user.UserTypeId // OrganizationOptions: [],
}) userTypeOptions: [],
if (selectedUserType.length > 0) { isDisabled: false
this.user.userTypeEnum = selectedUserType[0].UserTypeEnum }
} },
if (this.user.IsZhiZhun === true) { computed: {
this.user.OrganizationName = 'ZhiZhun' ...mapGetters(['userId'])
} },
if (this.user.Id) { mounted() {
updateUser(this.user).then(res => { // this.getUserTypeList()
this.isDisabled = false this.initPage()
this.$message.success('Updated successfully') },
}).catch(() => { this.isDisabled = false }) methods: {
} else { handleSave() {
addUser(this.user).then(res => { this.$refs.userForm.validate(valid => {
this.isDisabled = false if (valid) {
this.$emit('getUserId', res.Result.Id) this.isDisabled = true
this.$message.success('Added successfully') const selectedUserType = this.userTypeOptions.filter((item) => {
}).catch(() => { this.isDisabled = false }) return item.Id === this.user.UserTypeId
} })
} if (selectedUserType.length > 0) {
}) this.user.userTypeEnum = selectedUserType[0].UserTypeEnum
}, }
getUserInfo() { if (this.user.IsZhiZhun === true) {
getUser(this.userId).then(res => { this.user.OrganizationName = 'ZhiZhun'
this.user = res.Result }
// res.Result.OrganizationTypeId !== '00000000-0000-0000-0000-000000000000' ? this.getOrgnizationList(res.Result.OrganizationTypeId) : this.user.OrganizationTypeId = '' if (this.user.Id) {
}) updateUser(this.user).then(res => {
}, this.isDisabled = false
getUserTypeList() { this.$message.success('Updated successfully')
getUserTypeList().then(res => { }).catch(() => { this.isDisabled = false })
if (res.IsSuccess) { } else {
this.userTypeOptions = res.Result addUser(this.user).then(res => {
} this.isDisabled = false
}) this.$emit('getUserId', res.Result.Id)
}, this.$message.success('Added successfully')
handelOrgnizationTypeChange(val) { }).catch(() => { this.isDisabled = false })
if (val) { }
this.user.OrganizationId = '' }
this.getOrgnizationList(val) })
} },
}, getUserInfo() {
getOrgnizationList(OrganizationTypeId) { getUser(this.userId).then(res => {
getInstitutionList(OrganizationTypeId).then(res => { this.user = res.Result
if (res.IsSuccess) { // res.Result.OrganizationTypeId !== '00000000-0000-0000-0000-000000000000' ? this.getOrgnizationList(res.Result.OrganizationTypeId) : this.user.OrganizationTypeId = ''
this.OrganizationOptions = res.Result })
} },
}) getUserTypeList() {
}, getUserTypeList().then(res => {
async initPage() { if (res.IsSuccess) {
this.userId === '' ? await store.dispatch('user/getInfo') : '' this.userTypeOptions = res.Result
}
if (this.userId === '') { })
await store.dispatch('user/getInfo') },
} handelOrgnizationTypeChange(val) {
this.getUserInfo() if (val) {
} this.user.OrganizationId = ''
} this.getOrgnizationList(val)
} }
</script> },
getOrgnizationList(OrganizationTypeId) {
getInstitutionList(OrganizationTypeId).then(res => {
if (res.IsSuccess) {
this.OrganizationOptions = res.Result
}
})
},
async initPage() {
this.userId === '' ? await store.dispatch('user/getInfo') : ''
if (this.userId === '') {
await store.dispatch('user/getInfo')
}
this.getUserInfo()
}
}
}
</script>

View File

@ -1,11 +1,392 @@
<template> <template>
<div /> <div class="trial-myinfo">
<div class="trial-myinfo-left">
<div class="trial-myinfo-left-top">
<div class="trial-myinfo-head">
<!-- 个人头像 -->
{{ $t('trials:trials-myinfo:title:avater') }}
</div>
<div class="trial-myinfo-body">
<div>
{{ user.LastName }}
</div>
</div>
</div>
<div class="trial-myinfo-left-bottom">
<div class="trial-myinfo-head">
<!-- 用户基本信息 -->
{{ $t('trials:trials-myinfo:title:basicInfo') }}
</div>
<el-form ref="userForm" label-position="right" :model="user" :rules="userFormRules" label-width="120px">
<el-form-item v-if="user.Code" label="ID: " prop="Code">
<el-input v-model="user.Code" disabled />
</el-form-item>
<!-- -->
<el-form-item :disabled="user.UserTypeEnum === 8" :label="$t('trials:trials-myinfo:form:surname')" prop="LastName">
<el-input v-model="user.LastName" :placeholder="$t('trials:trials-myinfo:form:surname')"/>
</el-form-item>
<!-- -->
<el-form-item :disabled="user.UserTypeEnum === 8" :label="$t('trials:trials-myinfo:form:givenname')" prop="FirstName">
<el-input v-model="user.FirstName" :placeholder="$t('trials:trials-myinfo:form:givenname')"/>
</el-form-item>
<!-- 性别 -->
<el-form-item :label="$t('trials:trials-myinfo:form:gender')" prop="Sex" style="margin-right:40px;">
<el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio>
</el-radio-group>
</el-form-item>
<!-- 单位 -->
<el-form-item :label="$t('trials:trials-myinfo:form:organization')" prop="OrganizationName">
<el-input v-model="user.OrganizationName" :placeholder="$t('trials:trials-myinfo:form:organization')"/>
</el-form-item>
<!-- 部门 -->
<el-form-item :label="$t('trials:trials-myinfo:form:department')" prop="DepartmentName">
<el-input v-model="user.DepartmentName" :placeholder="$t('trials:trials-myinfo:form:organization')"/>
</el-form-item>
<!-- 职位 -->
<el-form-item :label="$t('trials:trials-myinfo:form:position')" prop="PositionName">
<el-input v-model="user.PositionName" :placeholder="$t('trials:trials-myinfo:form:position')"/>
</el-form-item>
</el-form>
<!-- 保存 -->
<el-button
class="trial-info-btn"
type="primary"
size="small"
@click="handleSave"
>
{{ $t('trials:trials-myinfo:button:save') }}
</el-button>
</div>
</div>
<div class="trial-myinfo-right">
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 账号信息 -->
{{ $t('trials:trials-myinfo:title:accountInfo') }}
</div>
<el-form label-position="right" label-width="180px">
<!-- 用户名 -->
<el-form-item :label="$t('trials:trials-myinfo:form:userName')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.UserName }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input v-model="userForm.UserName" :placeholder="$t('trials:trials-myinfo:form:userName')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.UserName" class="saveBtn" type="primary" size="small" @click="setNewUserName">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
<!-- 电话 -->
<el-form-item :label="$t('trials:trials-myinfo:form:phone')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.Phone }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input v-model="userForm.Phone" :placeholder="$t('trials:trials-myinfo:form:phone')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.Phone" class="saveBtn" type="primary" size="small" @click="setNewPhone">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
<!-- 邮箱 -->
<el-form-item :label="$t('trials:trials-myinfo:form:email')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.EMail }}</span>
</el-form-item>
<el-form-item label="" style="margin-bottom: 10px;position: relative" prop="EMail">
<el-input v-model="userForm.EMail" @input="handleEmailChange" :placeholder="$t('trials:trials-myinfo:form:email')"/>
<el-button class="sendCode" :disabled="sendDisabled" type="primary" size="mini" @click="sendVerificationCode">{{ sendTitle }}</el-button>
</el-form-item>
<el-form-item label="" style="position: relative" prop="VerificationCode">
<el-input v-model="userForm.VerificationCode" :placeholder="$t('trials:researchForm:form:verifyCode')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.EMail || !userForm.VerificationCode" class="saveBtn" type="primary" size="small" @click="setNewEmail">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
</el-form>
</div>
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 修改密码 -->
{{ $t('trials:trials-myinfo:title:updatePaasord') }}
</div>
<el-form ref="passwordForm" label-position="right" :model="password" :rules="passwordFormRules" label-width="180px">
<!-- 旧密码 -->
<el-form-item :label="$t('recompose:form:oldPassword')" prop="OldPassWord">
<el-input v-model="password.OldPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:oldPassword')"/>
</el-form-item>
<!-- 新密码 -->
<el-form-item class="my_new_pwd" :label="$t('recompose:form:newPassword')" prop="NewPassWord">
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:newPassword')"/>
</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" :placeholder="$t('recompose:form:confirmPassword')"/>
</el-form-item>
</el-form>
<el-button
type="primary"
size="small"
class="trial-info-btn"
@click="save"
>
{{ $t('trials:trials-myinfo:button:save') }}
</el-button>
</div>
</div>
</div>
</template> </template>
<script> <script>
export default {} import { getUserTypeList, getUser, updateUser, modifyPassword } from '@/api/admin.js'
import { sendVerificationCode, setNewEmail, setNewPhone, setNewUserName } from '@/api/system/user.js'
import md5 from 'js-md5'
var timer = ''
var countdown = 60
import store from '@/store'
import {mapGetters, mapMutations} from 'vuex'
export default {
name: 'TrialsMyinfo',
data() {
return {
userTypeOptions: [],
user: {},
password: {},
userForm: {},
sendDisabled: true,
sendTitle: this.$t('trials:trials-myinfo:button:getVCode'),
userFormRules: {
UserName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
UserTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
IsZhiZhun: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
OrganizationName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
LastName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, { max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
FirstName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, { max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
Sex: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
Status: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
},
passwordFormRules: {
OldPassWord: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
NewPassWord: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
required: true,
trigger: 'blur',
validator: this.$validatePassword
},
],
ConfirmPassWord: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
required: true,
trigger: 'blur',
validator: this.$validatePassword
},
]
}
}
},
computed: {
...mapGetters(['userId', 'name'])
},
mounted() {
this.getUserInfo()
this.getUserTypeList()
},
methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }),
handleSave() {
this.$refs.userForm.validate(valid => {
console.log(valid)
if (valid) {
this.isDisabled = true
const selectedUserType = this.userTypeOptions.filter((item) => {
return item.Id === this.user.UserTypeId
})
if (selectedUserType.length > 0) {
this.user.userTypeEnum = selectedUserType[0].UserTypeEnum
}
// if (this.user.IsZhiZhun === true) {
// this.user.OrganizationName = 'ZhiZhun'
// }
if (this.user.Id) {
updateUser(this.user).then(res => {
this.isDisabled = false
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
}).catch(() => { this.isDisabled = false })
}
}
})
},
handleEmailChange() {
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.userForm.EMail && reg.test(this.userForm.EMail)) {
this.sendDisabled = false
} else {
this.sendDisabled = true
}
},
sendVerificationCode() {
sendVerificationCode(this.userForm.EMail).then(() => {
this.settime(this)
//
this.$message.success(this.$t('trials:trials-myinfo:message:sendSuccessfully'))
})
},
save() {
this.$refs.passwordForm.validate(valid => {
if (valid) {
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
this.$alert(this.$t('passwordReset:formRule:passwordsDiffer'))
return
}
const param = {
UserId: this.userId,
NewPassWord: md5(this.password.NewPassWord),
OldPassWord: md5(this.password.OldPassWord)
}
modifyPassword(param).then(res => {
if (res.IsSuccess) {
// ,
this.$message.success(this.$t('trials:trials-myinfo:message:modifyPWSuccessfully'))
setTimeout(() => {
this.logout()
}, 1000)
}
})
}
})
},
setNewEmail() {
setNewEmail(this.userForm.EMail, this.userForm.VerificationCode).then(() => {
this.userForm.EMail = ''
this.userForm.VerificationCode = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
},
setNewUserName() {
setNewUserName(this.userForm.UserName).then(() => {
this.$store.dispatch('user/changeUserName', this.userForm.UserName).then((res) => {
this.userForm.UserName = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
})
},
setNewPhone() {
setNewPhone(this.userForm.Phone).then(() => {
this.userForm.Phone = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
},
getUserInfo() {
const loading = this.$loading({
fullscreen: false,
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.07)'
})
getUser(this.userId).then(async res => {
this.user = res.Result
/* eslint-disable */
zzSessionStorage.setItem('realName', this.user.RealName)
await store.dispatch('user/updateInfo')
loading.close()
}).catch(() => { loading.close() })
},
settime(obj) {
if (countdown === 0) {
obj.sendDisabled = false
obj.sendTitle = this.$t('trials:trials-myinfo:button:getVCode')// ''
countdown = 60
clearTimeout(timer)
return
} else {
obj.sendDisabled = true
obj.sendTitle = `${this.$t('trials:trials-myinfo:button:wait')}(${countdown}s)`
countdown--
// eslint-disable-next-line no-self-assign
countdown = countdown
timer = setTimeout(function() {
obj.settime(obj)
}, 1000)
}
},
getUserTypeList() {
getUserTypeList().then(res => {
if (res.IsSuccess) {
this.userTypeOptions = res.Result
}
})
},
async logout() {
/* eslint-disable */
var loginType = zzSessionStorage.getItem('loginType')
await this.$store.dispatch('user/logout')
if (loginType) {
this.$router.push(`/login?loginType=${loginType}`)
} else {
this.$router.push(`/login`)
}
this.$i18n.locale = 'zh'
this.setLanguage('zh')
this.$updateDictionary()
}
}
}
</script> </script>
<style scoped> <style lang="scss">
.trial-myinfo{
background: #f3f3f3;
flex: 1;overflow: auto;display: flex;flex-direction: row;justify-content: space-around;
.trial-myinfo-head{
position: absolute;top: 40px;left: -10%;font-size: 14px;
}
.trial-myinfo-left{
overflow: auto;
background: #fff;width: calc(50% - 9px);margin: 6px 0;
padding-bottom: 50px;
.trial-myinfo-left-top{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;margin-bottom: 10px;
.trial-myinfo-body{
width:160px;height:160px;border-radius: 50%;background: #428bca;display: flex;justify-content: center;align-items: center;
div{
color:#fff;font-size: 30px;
}
}
}
}
.saveBtn{
position: absolute;right: -10px;top:2px;transform: translateX(100%)
}
.trial-info-btn{
position: absolute;bottom: -60px;left: calc(100% + 10px);min-width: 97px;
}
.trial-myinfo-left-bottom{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;
}
.trial-myinfo-right{
overflow: auto;
background: #fff;width: calc(50% - 9px);margin: 6px 0;
padding-bottom: 50px;
.sendCode {
position: absolute;right: -10px;top: 50%;transform: translate(100%, -50%);
}
.trial-myinfo-right-box{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;
}
}
}
</style>
<style scoped>
/deep/ .is-error.my_new_pwd{
margin-bottom: 40px;
}
</style> </style>