Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
commit
ebddc9beb2
|
@ -129,7 +129,7 @@ export default {
|
|||
this.fileList = []
|
||||
this.$emit('getFileList', '', '')
|
||||
this.$message({
|
||||
message: 'Deleted successfully!',
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
:file-list="fileList"
|
||||
: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>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -143,8 +143,7 @@ export default {
|
|||
this.$confirm('Sure to remove?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
}).then(() => {
|
||||
deleteAttachment(file.Id, file.Path)
|
||||
.then(res => {
|
||||
|
@ -152,7 +151,7 @@ export default {
|
|||
this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
this.$message({
|
||||
message: 'Deleted successfully!',
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -29,13 +29,10 @@
|
|||
</span>
|
||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
||||
<el-dropdown-item v-if="!isReviewer">
|
||||
<span style="display:block;" @click="editInfo">Edit Info</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="account">Account</span>
|
||||
<span style="display:block;" @click="editInfo">{{$t('system:navbar:button:Profile')}}</span>
|
||||
</el-dropdown-item>
|
||||
<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-menu>
|
||||
</el-dropdown>
|
||||
|
@ -93,9 +90,6 @@ export default {
|
|||
editInfo() {
|
||||
this.$router.push({ name: 'BaiscInfo' })
|
||||
},
|
||||
account() {
|
||||
this.$router.push({ name: 'Account' })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -255,12 +255,7 @@ export const constantRoutes = [
|
|||
children: [{
|
||||
path: 'baiscInfo',
|
||||
name: 'BaiscInfo',
|
||||
component: () => import('@/views/user/editInfo')
|
||||
},
|
||||
{
|
||||
path: 'account',
|
||||
name: 'Account',
|
||||
component: () => import('@/views/user/account')
|
||||
component: () => import('@/views/user/myInfo')
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,137 +1,135 @@
|
|||
<template>
|
||||
<div class="app-container menu">
|
||||
<el-tree
|
||||
:props="defaultProps"
|
||||
:data="treeData"
|
||||
node-key="Id"
|
||||
:default-expand-all="true"
|
||||
:expand-on-click-node="false"
|
||||
style="width:80%;"
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<span v-if="data.FunctionName">{{ node.label }} --------------------(Function)</span>
|
||||
<span v-else>{{ node.label }}</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-edit"
|
||||
size="small"
|
||||
@click="() => edit(data)"
|
||||
>Edit</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" size="small" @click="() => remove(data)">Delete</el-button>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<menu-form v-if="model_cfg.visible" :form="currenNode" width="500px" @close="closeModel" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getMenuFunction, deleteMenuFunction } from '@/api/admin'
|
||||
import MenuForm from './components/MenuForm'
|
||||
import { model_cfg } from './menu'
|
||||
export default {
|
||||
name: 'Menu',
|
||||
components: { MenuForm },
|
||||
data() {
|
||||
return {
|
||||
model_cfg,
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
label: 'MenuName',
|
||||
children: 'Children'
|
||||
},
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
currenNode: {},
|
||||
nodeId: '',
|
||||
parentId: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
// 获取菜单数据
|
||||
getlist() {
|
||||
const loading = this.$loading({
|
||||
target: document.querySelector('.menu'),
|
||||
fullscreen: false,
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
getMenuFunction().then(res => {
|
||||
loading.close()
|
||||
this.treeData = res.Result
|
||||
}).catch(() => { loading.close() })
|
||||
},
|
||||
// 添加菜单
|
||||
append(node) {
|
||||
this.currenNode = {}
|
||||
this.currenNode.ParentId = node.Id
|
||||
this.currenNode.Status = 1
|
||||
// this.currenNode.ShowOrder = 0
|
||||
this.nodeId = node.Id
|
||||
this.model_cfg.title = 'Append'
|
||||
this.model_cfg.visible = true
|
||||
},
|
||||
// 编辑菜单
|
||||
edit(node) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { Children, CreateTime, CreateUserId, UpdateTime, UpdateUserId, ...obj } = JSON.parse(JSON.stringify(node))
|
||||
obj.MetaBreadcrumb = obj.MetaBreadcrumb ? 1 : 0
|
||||
obj.Hidden = obj.Hidden ? 1 : 0
|
||||
this.currenNode = obj
|
||||
this.nodeId = node.Id
|
||||
this.model_cfg.title = 'Edit'
|
||||
this.model_cfg.visible = true
|
||||
},
|
||||
// 移除菜单
|
||||
remove(node) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteMenuFunction(node.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getlist()
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
closeModel() {
|
||||
this.model_cfg.visible = false
|
||||
this.getlist()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.menu{
|
||||
.el-tree {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-tree-node{
|
||||
margin-top: 5px;
|
||||
}
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<div class="app-container menu">
|
||||
<el-tree
|
||||
:props="defaultProps"
|
||||
:data="treeData"
|
||||
node-key="Id"
|
||||
:default-expand-all="true"
|
||||
:expand-on-click-node="false"
|
||||
style="width:80%;"
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<span v-if="data.FunctionName">{{ node.label }} --------------------(Function)</span>
|
||||
<span v-else>{{ node.label }}</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-edit"
|
||||
size="small"
|
||||
@click="() => edit(data)"
|
||||
>Edit</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" size="small" @click="() => remove(data)">Delete</el-button>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<menu-form v-if="model_cfg.visible" :form="currenNode" width="500px" @close="closeModel" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getMenuFunction, deleteMenuFunction } from '@/api/admin'
|
||||
import MenuForm from './components/MenuForm'
|
||||
import { model_cfg } from './menu'
|
||||
export default {
|
||||
name: 'Menu',
|
||||
components: { MenuForm },
|
||||
data() {
|
||||
return {
|
||||
model_cfg,
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
label: 'MenuName',
|
||||
children: 'Children'
|
||||
},
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
currenNode: {},
|
||||
nodeId: '',
|
||||
parentId: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
// 获取菜单数据
|
||||
getlist() {
|
||||
const loading = this.$loading({
|
||||
target: document.querySelector('.menu'),
|
||||
fullscreen: false,
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
getMenuFunction().then(res => {
|
||||
loading.close()
|
||||
this.treeData = res.Result
|
||||
}).catch(() => { loading.close() })
|
||||
},
|
||||
// 添加菜单
|
||||
append(node) {
|
||||
this.currenNode = {}
|
||||
this.currenNode.ParentId = node.Id
|
||||
this.currenNode.Status = 1
|
||||
// this.currenNode.ShowOrder = 0
|
||||
this.nodeId = node.Id
|
||||
this.model_cfg.title = 'Append'
|
||||
this.model_cfg.visible = true
|
||||
},
|
||||
// 编辑菜单
|
||||
edit(node) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { Children, CreateTime, CreateUserId, UpdateTime, UpdateUserId, ...obj } = JSON.parse(JSON.stringify(node))
|
||||
obj.MetaBreadcrumb = obj.MetaBreadcrumb ? 1 : 0
|
||||
obj.Hidden = obj.Hidden ? 1 : 0
|
||||
this.currenNode = obj
|
||||
this.nodeId = node.Id
|
||||
this.model_cfg.title = 'Edit'
|
||||
this.model_cfg.visible = true
|
||||
},
|
||||
// 移除菜单
|
||||
remove(node) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
deleteMenuFunction(node.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getlist()
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
closeModel() {
|
||||
this.model_cfg.visible = false
|
||||
this.getlist()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.menu{
|
||||
.el-tree {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-tree-node{
|
||||
margin-top: 5px;
|
||||
}
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -89,16 +89,15 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDeleteRole(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
}).then(() => {
|
||||
deleteUserTypeRole(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
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'))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,39 +1,38 @@
|
|||
<template>
|
||||
<el-card class="box-card" style="width:800px;" size="small">
|
||||
<!-- <div slot="header" class="clearfix">
|
||||
<span>Security</span>
|
||||
</div> -->
|
||||
<div>
|
||||
<el-button type="danger" @click="handleReset">Reset Password</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { resetPassword } from '@/api/admin'
|
||||
export default {
|
||||
name: 'Account',
|
||||
props: {
|
||||
userId: { type: String, default: '' }
|
||||
},
|
||||
methods: {
|
||||
handleReset() {
|
||||
this.$confirm('Sure to reset password?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
resetPassword(this.userId).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.$message({
|
||||
message: 'Reset password successfully',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<el-card class="box-card" style="width:800px;" size="small">
|
||||
<!-- <div slot="header" class="clearfix">
|
||||
<span>Security</span>
|
||||
</div> -->
|
||||
<div>
|
||||
<el-button type="danger" @click="handleReset">Reset Password</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { resetPassword } from '@/api/admin'
|
||||
export default {
|
||||
name: 'Account',
|
||||
props: {
|
||||
userId: { type: String, default: '' }
|
||||
},
|
||||
methods: {
|
||||
handleReset() {
|
||||
this.$confirm('Sure to reset password?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
resetPassword(this.userId).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.$message({
|
||||
message: 'Reset password successfully',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -113,18 +113,17 @@ export default {
|
|||
},
|
||||
// 删除用户
|
||||
handleDeleteUser(data) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteSysUser(data.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
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'))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -126,8 +126,7 @@ export default {
|
|||
this.$confirm('Sure to sign out', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.$store.dispatch('user/logout').then(res => {
|
||||
|
|
|
@ -403,6 +403,7 @@ export default {
|
|||
data.isReading = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
|
@ -430,6 +431,7 @@ export default {
|
|||
data.isDeleted = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
|
|
|
@ -353,6 +353,7 @@ export default {
|
|||
data.isReading = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
|
@ -380,6 +381,7 @@ export default {
|
|||
data.isDeleted = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
|
|
|
@ -244,8 +244,7 @@ export default {
|
|||
this.$confirm('是否确认废除此文件?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
|
|
@ -125,18 +125,17 @@ export default {
|
|||
},
|
||||
// 删除字典表配置信息
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteDictionary(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
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', {})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -239,18 +239,17 @@ export default {
|
|||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteEmailNoticeConfig(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
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'))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -139,11 +139,10 @@ export default {
|
|||
},
|
||||
// 删除CRO
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -152,7 +151,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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
|
||||
|
|
|
@ -1,256 +1,255 @@
|
|||
<template>
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="small" class="base-search-form">
|
||||
<el-form-item label="Hospital:">
|
||||
<el-input v-model="searchData.HospitalName" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Province:">
|
||||
<el-input v-model="searchData.Province" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="City:">
|
||||
<el-input v-model="searchData.City" style="width:100px;" />
|
||||
</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-refresh-left" @click="handleReset">Reset</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left:auto;"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAddHospital"
|
||||
>New</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- hospital列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
<el-table-column
|
||||
prop="HospitalName"
|
||||
label="Hospital"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="HospitalNameCN"
|
||||
label="Hospital CN"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UniversityAffiliated"
|
||||
label="University Affiliated"
|
||||
min-width="170"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UniversityAffiliatedCN"
|
||||
label="University Affiliated CN"
|
||||
min-width="170"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="Country"
|
||||
label="Country"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CountryCN"
|
||||
label="Country CN"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Province"
|
||||
label="Province"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ProvinceCN"
|
||||
label="Province CN"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="City"
|
||||
label="City"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CityCN"
|
||||
label="City CN"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column label="Action" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-edit-outline"
|
||||
title="编辑"
|
||||
@click="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
title="删除"
|
||||
@click="handleDelete(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog
|
||||
v-if="editDialog.visible"
|
||||
:visible.sync="editDialog.visible"
|
||||
:close-on-click-modal="false"
|
||||
:title="editDialog.title"
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<hospital-form v-if="editDialog.visible" :data="rowData" @close="close" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getHospitalPageList, deleteHospital } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import HospitalForm from './HospitalForm'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
HospitalName: '',
|
||||
Province: '',
|
||||
City: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: true,
|
||||
SortField: ''
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'Hospitals',
|
||||
components: { BoxContent, Pagination, HospitalForm },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
editDialog: { visible: false, title: '' },
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
rowData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取医院列表信息
|
||||
getList() {
|
||||
this.loading = true
|
||||
getHospitalPageList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 新增医院信息
|
||||
handleAddHospital() {
|
||||
this.rowData = {}
|
||||
this.editDialog.title = 'Add'
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
// 修改医院信息
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.editDialog.title = 'Edit'
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
// 删除医院信息
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
deleteHospital(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置列表
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 指定排序字段,对列表进行排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 关闭模态框
|
||||
close() {
|
||||
this.editDialog.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.hospitals{
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="small" class="base-search-form">
|
||||
<el-form-item label="Hospital:">
|
||||
<el-input v-model="searchData.HospitalName" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Province:">
|
||||
<el-input v-model="searchData.Province" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="City:">
|
||||
<el-input v-model="searchData.City" style="width:100px;" />
|
||||
</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-refresh-left" @click="handleReset">Reset</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left:auto;"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAddHospital"
|
||||
>New</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- hospital列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
<el-table-column
|
||||
prop="HospitalName"
|
||||
label="Hospital"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="HospitalNameCN"
|
||||
label="Hospital CN"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UniversityAffiliated"
|
||||
label="University Affiliated"
|
||||
min-width="170"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UniversityAffiliatedCN"
|
||||
label="University Affiliated CN"
|
||||
min-width="170"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="Country"
|
||||
label="Country"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CountryCN"
|
||||
label="Country CN"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Province"
|
||||
label="Province"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ProvinceCN"
|
||||
label="Province CN"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="City"
|
||||
label="City"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CityCN"
|
||||
label="City CN"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column label="Action" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-edit-outline"
|
||||
title="编辑"
|
||||
@click="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
title="删除"
|
||||
@click="handleDelete(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog
|
||||
v-if="editDialog.visible"
|
||||
:visible.sync="editDialog.visible"
|
||||
:close-on-click-modal="false"
|
||||
:title="editDialog.title"
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<hospital-form v-if="editDialog.visible" :data="rowData" @close="close" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getHospitalPageList, deleteHospital } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import HospitalForm from './HospitalForm'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
HospitalName: '',
|
||||
Province: '',
|
||||
City: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: true,
|
||||
SortField: ''
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'Hospitals',
|
||||
components: { BoxContent, Pagination, HospitalForm },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
editDialog: { visible: false, title: '' },
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
rowData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取医院列表信息
|
||||
getList() {
|
||||
this.loading = true
|
||||
getHospitalPageList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 新增医院信息
|
||||
handleAddHospital() {
|
||||
this.rowData = {}
|
||||
this.editDialog.title = 'Add'
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
// 修改医院信息
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.editDialog.title = 'Edit'
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
// 删除医院信息
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
deleteHospital(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置列表
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 指定排序字段,对列表进行排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 关闭模态框
|
||||
close() {
|
||||
this.editDialog.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.hospitals{
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -213,11 +213,10 @@ export default {
|
|||
},
|
||||
// 删除Site
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -227,7 +226,7 @@ export default {
|
|||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$store.dispatch('global/setSite', {})
|
||||
this.$message.success('Deleted successfully!')
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
|
|
@ -139,11 +139,10 @@ export default {
|
|||
},
|
||||
// 删除Sponsor
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -152,7 +151,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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
|
||||
|
|
|
@ -182,11 +182,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -195,7 +194,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -154,11 +154,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -167,7 +166,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -183,11 +183,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -196,7 +195,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -182,11 +182,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -195,7 +194,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -153,11 +153,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -166,7 +165,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -206,11 +206,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -219,7 +218,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -183,11 +183,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -196,7 +195,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -122,11 +122,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -135,7 +134,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -1,162 +1,161 @@
|
|||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
Add
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="编号"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="场景类型"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getChildList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SceneConfigForm from './SceneConfigForm'
|
||||
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SceneConfigForm },
|
||||
props: {
|
||||
parentId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getChildList(this.parentId).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
Add
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="编号"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="场景类型"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getChildList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SceneConfigForm from './SceneConfigForm'
|
||||
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SceneConfigForm },
|
||||
props: {
|
||||
parentId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getChildList(this.parentId).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,229 +1,228 @@
|
|||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item label="编号:">
|
||||
<el-input v-model="searchData.Code" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板:">
|
||||
<el-input v-model="searchData.Name" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleReset">Reset</el-button>
|
||||
<el-button type="primary" @click="handleSearch">Search</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
New
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="Code"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="模板"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleConfig(scope.row)"
|
||||
>
|
||||
场景配置
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
|
||||
<!-- 新增、编辑 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="configVisible"
|
||||
:visible.sync="configVisible"
|
||||
title="场景配置"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SignTemplateForm from './components/SignTemplateForm'
|
||||
import SceneList from './components/SceneList'
|
||||
import Pagination from '@/components/Pagination'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Code: '',
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SignTemplateForm, Pagination, SceneList },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false,
|
||||
configVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getSystemBasicDataList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 场景配置
|
||||
handleConfig(row) {
|
||||
this.rowData = { ...row }
|
||||
this.configVisible = true
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item label="编号:">
|
||||
<el-input v-model="searchData.Code" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板:">
|
||||
<el-input v-model="searchData.Name" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleReset">Reset</el-button>
|
||||
<el-button type="primary" @click="handleSearch">Search</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
New
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="Code"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="模板"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleConfig(scope.row)"
|
||||
>
|
||||
场景配置
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
|
||||
<!-- 新增、编辑 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="configVisible"
|
||||
:visible.sync="configVisible"
|
||||
title="场景配置"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SignTemplateForm from './components/SignTemplateForm'
|
||||
import SceneList from './components/SceneList'
|
||||
import Pagination from '@/components/Pagination'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Code: '',
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SignTemplateForm, Pagination, SceneList },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false,
|
||||
configVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getSystemBasicDataList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 场景配置
|
||||
handleConfig(row) {
|
||||
this.rowData = { ...row }
|
||||
this.configVisible = true
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -162,11 +162,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -175,7 +174,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -137,11 +137,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -150,7 +149,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -170,11 +170,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -183,7 +182,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -217,11 +217,10 @@ export default {
|
|||
},
|
||||
// 删除受试者
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -230,7 +229,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -1,188 +1,187 @@
|
|||
<template>
|
||||
<div class="template-wrapper">
|
||||
<div class="left-wrapper">
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<SearchForm
|
||||
size="mini"
|
||||
:that="this"
|
||||
:search-data="searchData"
|
||||
:search-form="template_form"
|
||||
:search-handle="template_handle"
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
/>
|
||||
<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" @click="handleSetting">Setting</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<base-table
|
||||
v-loading="loading"
|
||||
:columns="template_cols"
|
||||
:list="list"
|
||||
:search-data="searchData"
|
||||
:total="total"
|
||||
@getList="getList"
|
||||
@items="handleView"
|
||||
@edit="handleEdit"
|
||||
@delete="handleDelete"
|
||||
@sortByColumn="sortByColumn"
|
||||
/>
|
||||
</box-content>
|
||||
</div>
|
||||
<div class="right-wrapper">
|
||||
<div v-if="template.Name">
|
||||
<span>Name:</span>
|
||||
<el-input v-model="template.Name" size="small" style="width:150px;" readonly />
|
||||
</div>
|
||||
<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="index" width="40" />
|
||||
<el-table-column prop="Name" label="Item" show-overflow-tooltip />
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<template-form v-if="template_model.visible" :data="rowData" @close="closeModel" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getQaTemplateList, deleteQATemplate, getQaTemplateConfigList, configQATemplateItem } from '@/api/dictionary'
|
||||
import { template_cols, template_form, template_handle, template_model } from './template'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SearchForm from '@/components/BaseForm/search-form'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import TemplateForm from './components/TemplateForm'
|
||||
import tableMixins from '@/mixins/table'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'TemplateList',
|
||||
components: { BoxContent, SearchForm, BaseTable, TemplateForm },
|
||||
mixins: [tableMixins],
|
||||
data() {
|
||||
return {
|
||||
template_cols,
|
||||
template_form,
|
||||
template_handle,
|
||||
template_model,
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
rowData: {},
|
||||
template: {},
|
||||
itmeList: [],
|
||||
itemLoading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
getQaTemplateList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
this.template = {}
|
||||
this.itmeList = []
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.template_model.title = 'New'
|
||||
this.template_model.visible = true
|
||||
},
|
||||
handleSetting() {
|
||||
this.$router.push({ name: 'TemplateOfSetting' })
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.template_model.title = 'Edit'
|
||||
this.template_model.visible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQATemplate(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleView(row) {
|
||||
this.template = row
|
||||
this.itemLoading = true
|
||||
getQaTemplateConfigList(row.Id, row.ModalityId).then(res => {
|
||||
this.itmeList = res.Result
|
||||
this.itmeList.forEach(val => {
|
||||
this.$nextTick(
|
||||
function() {
|
||||
this.$refs.itemList.toggleRowSelection(val, val.IsSelect)
|
||||
}.bind(this)
|
||||
)
|
||||
})
|
||||
this.itemLoading = false
|
||||
})
|
||||
},
|
||||
onTableSelect(rows, row) {
|
||||
const param = {
|
||||
qaTemplateItemId: row.Id,
|
||||
qaTemplateId: this.template.Id,
|
||||
isSelect: rows.indexOf(row) !== -1
|
||||
}
|
||||
configQATemplateItem(param).then(res => {
|
||||
this.$message.success('Updated successfully')
|
||||
})
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.template = {}
|
||||
this.itmeList = []
|
||||
},
|
||||
closeModel() {
|
||||
this.template_model.visible = false
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.template-wrapper{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.left-wrapper{
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.right-wrapper{
|
||||
width: 0;
|
||||
flex-grow: 3;
|
||||
padding: 5px;
|
||||
thead{
|
||||
.el-table-column--selection{
|
||||
.cell {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="template-wrapper">
|
||||
<div class="left-wrapper">
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<SearchForm
|
||||
size="mini"
|
||||
:that="this"
|
||||
:search-data="searchData"
|
||||
:search-form="template_form"
|
||||
:search-handle="template_handle"
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
/>
|
||||
<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" @click="handleSetting">Setting</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<base-table
|
||||
v-loading="loading"
|
||||
:columns="template_cols"
|
||||
:list="list"
|
||||
:search-data="searchData"
|
||||
:total="total"
|
||||
@getList="getList"
|
||||
@items="handleView"
|
||||
@edit="handleEdit"
|
||||
@delete="handleDelete"
|
||||
@sortByColumn="sortByColumn"
|
||||
/>
|
||||
</box-content>
|
||||
</div>
|
||||
<div class="right-wrapper">
|
||||
<div v-if="template.Name">
|
||||
<span>Name:</span>
|
||||
<el-input v-model="template.Name" size="small" style="width:150px;" readonly />
|
||||
</div>
|
||||
<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="index" width="40" />
|
||||
<el-table-column prop="Name" label="Item" show-overflow-tooltip />
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<template-form v-if="template_model.visible" :data="rowData" @close="closeModel" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getQaTemplateList, deleteQATemplate, getQaTemplateConfigList, configQATemplateItem } from '@/api/dictionary'
|
||||
import { template_cols, template_form, template_handle, template_model } from './template'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SearchForm from '@/components/BaseForm/search-form'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import TemplateForm from './components/TemplateForm'
|
||||
import tableMixins from '@/mixins/table'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'TemplateList',
|
||||
components: { BoxContent, SearchForm, BaseTable, TemplateForm },
|
||||
mixins: [tableMixins],
|
||||
data() {
|
||||
return {
|
||||
template_cols,
|
||||
template_form,
|
||||
template_handle,
|
||||
template_model,
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
rowData: {},
|
||||
template: {},
|
||||
itmeList: [],
|
||||
itemLoading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
getQaTemplateList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
this.template = {}
|
||||
this.itmeList = []
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.template_model.title = 'New'
|
||||
this.template_model.visible = true
|
||||
},
|
||||
handleSetting() {
|
||||
this.$router.push({ name: 'TemplateOfSetting' })
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.template_model.title = 'Edit'
|
||||
this.template_model.visible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteQATemplate(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleView(row) {
|
||||
this.template = row
|
||||
this.itemLoading = true
|
||||
getQaTemplateConfigList(row.Id, row.ModalityId).then(res => {
|
||||
this.itmeList = res.Result
|
||||
this.itmeList.forEach(val => {
|
||||
this.$nextTick(
|
||||
function() {
|
||||
this.$refs.itemList.toggleRowSelection(val, val.IsSelect)
|
||||
}.bind(this)
|
||||
)
|
||||
})
|
||||
this.itemLoading = false
|
||||
})
|
||||
},
|
||||
onTableSelect(rows, row) {
|
||||
const param = {
|
||||
qaTemplateItemId: row.Id,
|
||||
qaTemplateId: this.template.Id,
|
||||
isSelect: rows.indexOf(row) !== -1
|
||||
}
|
||||
configQATemplateItem(param).then(res => {
|
||||
this.$message.success('Updated successfully')
|
||||
})
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.template = {}
|
||||
this.itmeList = []
|
||||
},
|
||||
closeModel() {
|
||||
this.template_model.visible = false
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.template-wrapper{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.left-wrapper{
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.right-wrapper{
|
||||
width: 0;
|
||||
flex-grow: 3;
|
||||
padding: 5px;
|
||||
thead{
|
||||
.el-table-column--selection{
|
||||
.cell {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,182 +1,181 @@
|
|||
<template>
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<SearchForm
|
||||
size="mini"
|
||||
:that="this"
|
||||
:search-data="searchData"
|
||||
:search-form="setting_form"
|
||||
:search-handle="setting_handle"
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
/>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button type="primary" size="small" style="margin-left:auto;" @click="handleAdd">New</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<base-table
|
||||
v-loading="loading"
|
||||
:columns="setting_cols"
|
||||
:list="list"
|
||||
:search-data="searchData"
|
||||
:total="total"
|
||||
@getList="getList"
|
||||
@edit="handleEdit"
|
||||
@delete="handleDelete"
|
||||
@sortByColumn="sortByColumn"
|
||||
>
|
||||
<!-- 选择自定义slot -->
|
||||
<template slot="modalitySlot" slot-scope="{scope}">
|
||||
{{ scope.row.ModalityList && scope.row.ModalityList.length>0?scope.row.ModalityList.join(', '):'' }}
|
||||
</template>
|
||||
</base-table>
|
||||
<setting-form v-if="setting_model.visible" :data="rowData" @close="closeModel" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getQATemplateItemList, deleteQATemplateItem } from '@/api/dictionary'
|
||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||
import { setting_cols, setting_form, setting_handle, setting_model } from './template'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SearchForm from '@/components/BaseForm/search-form'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import SettingForm from './components/SettingForm.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
ModalityId: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'TemplateSettings',
|
||||
components: { BoxContent, SearchForm, BaseTable, SettingForm },
|
||||
data() {
|
||||
return {
|
||||
setting_cols,
|
||||
setting_form,
|
||||
setting_handle,
|
||||
setting_model,
|
||||
list: [],
|
||||
loading: false,
|
||||
total: 0,
|
||||
searchData: searchDataDefault(),
|
||||
rowData: {},
|
||||
readingType: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
getQATemplateItemList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
findItemIndex(key) {
|
||||
return this.setting_form.findIndex(value => value.prop && value.prop === key
|
||||
)
|
||||
},
|
||||
async getInfo() {
|
||||
await this.getDicData()
|
||||
if (this.readingType.length > 0) {
|
||||
const index = this.findItemIndex('ModalityId')
|
||||
this.$set(this.setting_form[index], 'options', this.readingType)
|
||||
}
|
||||
},
|
||||
getDicData() {
|
||||
getBasicDataSelects(['ReadingType']).then(res => {
|
||||
const { ReadingType } = { ...res.Result }
|
||||
this.readingType = ReadingType || {}
|
||||
}).catch(() => {})
|
||||
},
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.setting_model.title = 'Add'
|
||||
this.setting_model.visible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.setting_model.title = 'Add'
|
||||
this.setting_model.visible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQATemplateItem(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
sortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
closeModel() {
|
||||
this.setting_model.visible = false
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.template-setting{
|
||||
height: 100%;
|
||||
.el-header{
|
||||
.filter-container{
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span{
|
||||
font-size:13px;
|
||||
margin-right:5px;
|
||||
}
|
||||
.mr{
|
||||
margin-right: 5px;
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-main{
|
||||
height:calc(100% - 40px);
|
||||
padding: 0 20px;
|
||||
.data-table{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.el-footer{
|
||||
padding: 0 20px;
|
||||
}
|
||||
.el-dialog__header{
|
||||
padding:10px;
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding:10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<SearchForm
|
||||
size="mini"
|
||||
:that="this"
|
||||
:search-data="searchData"
|
||||
:search-form="setting_form"
|
||||
:search-handle="setting_handle"
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
/>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button type="primary" size="small" style="margin-left:auto;" @click="handleAdd">New</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<base-table
|
||||
v-loading="loading"
|
||||
:columns="setting_cols"
|
||||
:list="list"
|
||||
:search-data="searchData"
|
||||
:total="total"
|
||||
@getList="getList"
|
||||
@edit="handleEdit"
|
||||
@delete="handleDelete"
|
||||
@sortByColumn="sortByColumn"
|
||||
>
|
||||
<!-- 选择自定义slot -->
|
||||
<template slot="modalitySlot" slot-scope="{scope}">
|
||||
{{ scope.row.ModalityList && scope.row.ModalityList.length>0?scope.row.ModalityList.join(', '):'' }}
|
||||
</template>
|
||||
</base-table>
|
||||
<setting-form v-if="setting_model.visible" :data="rowData" @close="closeModel" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getQATemplateItemList, deleteQATemplateItem } from '@/api/dictionary'
|
||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||
import { setting_cols, setting_form, setting_handle, setting_model } from './template'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SearchForm from '@/components/BaseForm/search-form'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import SettingForm from './components/SettingForm.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
ModalityId: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'TemplateSettings',
|
||||
components: { BoxContent, SearchForm, BaseTable, SettingForm },
|
||||
data() {
|
||||
return {
|
||||
setting_cols,
|
||||
setting_form,
|
||||
setting_handle,
|
||||
setting_model,
|
||||
list: [],
|
||||
loading: false,
|
||||
total: 0,
|
||||
searchData: searchDataDefault(),
|
||||
rowData: {},
|
||||
readingType: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
getQATemplateItemList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
findItemIndex(key) {
|
||||
return this.setting_form.findIndex(value => value.prop && value.prop === key
|
||||
)
|
||||
},
|
||||
async getInfo() {
|
||||
await this.getDicData()
|
||||
if (this.readingType.length > 0) {
|
||||
const index = this.findItemIndex('ModalityId')
|
||||
this.$set(this.setting_form[index], 'options', this.readingType)
|
||||
}
|
||||
},
|
||||
getDicData() {
|
||||
getBasicDataSelects(['ReadingType']).then(res => {
|
||||
const { ReadingType } = { ...res.Result }
|
||||
this.readingType = ReadingType || {}
|
||||
}).catch(() => {})
|
||||
},
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.setting_model.title = 'Add'
|
||||
this.setting_model.visible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.setting_model.title = 'Add'
|
||||
this.setting_model.visible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteQATemplateItem(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
sortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
closeModel() {
|
||||
this.setting_model.visible = false
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.template-setting{
|
||||
height: 100%;
|
||||
.el-header{
|
||||
.filter-container{
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span{
|
||||
font-size:13px;
|
||||
margin-right:5px;
|
||||
}
|
||||
.mr{
|
||||
margin-right: 5px;
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-main{
|
||||
height:calc(100% - 40px);
|
||||
padding: 0 20px;
|
||||
.data-table{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.el-footer{
|
||||
padding: 0 20px;
|
||||
}
|
||||
.el-dialog__header{
|
||||
padding:10px;
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding:10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,162 +1,161 @@
|
|||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
Add
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="编号"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="场景类型"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getChildList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SceneConfigForm from './SceneConfigForm'
|
||||
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SceneConfigForm },
|
||||
props: {
|
||||
parentId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getChildList(this.parentId).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
Add
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="编号"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="场景类型"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneConfigForm :parent-id="parentId" :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getChildList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SceneConfigForm from './SceneConfigForm'
|
||||
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SceneConfigForm },
|
||||
props: {
|
||||
parentId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getChildList(this.parentId).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,229 +1,228 @@
|
|||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item label="编号:">
|
||||
<el-input v-model="searchData.Code" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板:">
|
||||
<el-input v-model="searchData.Name" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleReset">Reset</el-button>
|
||||
<el-button type="primary" @click="handleSearch">Search</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
New
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="Code"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="模板"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleConfig(scope.row)"
|
||||
>
|
||||
场景配置
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
|
||||
<!-- 新增、编辑 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="configVisible"
|
||||
:visible.sync="configVisible"
|
||||
title="场景配置"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SignTemplateForm from './components/SignTemplateForm'
|
||||
import SceneList from './components/SceneList'
|
||||
import Pagination from '@/components/Pagination'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Code: '',
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SignTemplateForm, Pagination, SceneList },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false,
|
||||
configVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getSystemBasicDataList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 场景配置
|
||||
handleConfig(row) {
|
||||
this.rowData = { ...row }
|
||||
this.configVisible = true
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item label="编号:">
|
||||
<el-input v-model="searchData.Code" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板:">
|
||||
<el-input v-model="searchData.Name" style="width:100px;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleReset">Reset</el-button>
|
||||
<el-button type="primary" @click="handleSearch">Search</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
New
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="Code"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="模板"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
label="签名内容(EN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ValueCN"
|
||||
label="签名内容(CN)"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleConfig(scope.row)"
|
||||
>
|
||||
场景配置
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)">Delete</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
|
||||
<!-- 新增、编辑 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="700px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SignTemplateForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 场景配置 -->
|
||||
<el-dialog
|
||||
v-if="configVisible"
|
||||
:visible.sync="configVisible"
|
||||
title="场景配置"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<SceneList :parent-id="rowData.Id" @closeDialog="closeDialog" />
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getSystemBasicDataList, deleteSystemBasicData } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SignTemplateForm from './components/SignTemplateForm'
|
||||
import SceneList from './components/SceneList'
|
||||
import Pagination from '@/components/Pagination'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Code: '',
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'SignTemplate',
|
||||
components: { BoxContent, SignTemplateForm, Pagination, SceneList },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
editVisible: false,
|
||||
configVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getSystemBasicDataList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteSystemBasicData(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 场景配置
|
||||
handleConfig(row) {
|
||||
this.rowData = { ...row }
|
||||
this.configVisible = true
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,242 +1,241 @@
|
|||
<template>
|
||||
<div class="app-container adjustment-container data-list">
|
||||
<div class="filter-container">
|
||||
<el-input v-model="listQuery.Reviewer" style="width:220px" size="small" placeholder="Reviewer ID" class="mr" />
|
||||
<el-date-picker
|
||||
v-model="listQuery.BeginMonth"
|
||||
size="small"
|
||||
placeholder="Beginning date"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
disabled
|
||||
class="mr"
|
||||
/>
|
||||
<el-button size="small" type="text" @click="handleReset">Reset</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>
|
||||
</div>
|
||||
<div class="data-table">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
stripe
|
||||
:data="list"
|
||||
height="100%"
|
||||
size="small"
|
||||
@sort-change="sortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
prop="LastName"
|
||||
label="Name"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.LastName + ' / ' + scope.row.FirstName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="ChineseName"
|
||||
label="Name CN"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ReviewerCode"
|
||||
label="Reviewer ID"
|
||||
min-width="110"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="AdjustPaymentUSD"
|
||||
label="Amount($)"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.AdjustPaymentUSD | rounding }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="AdjustPaymentCNY"
|
||||
label="Amount(¥)"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.AdjustPaymentCNY | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Note" label="Note" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
prop="YearMonth"
|
||||
label="Adjust Month"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="Action">
|
||||
<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="handleDelete(scope.row)"
|
||||
>Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="600px"
|
||||
>
|
||||
<adjustment-form
|
||||
:key="timer"
|
||||
:row="row"
|
||||
:date="date"
|
||||
:exchange-rate="exchangeRate"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import AdjustmentForm from './components/AdjustmentForm'
|
||||
import { getPaymentAdjustmentList, deletePaymentAdjustment } from '@/api/financials'
|
||||
import { FormatTime } from '@/utils/formatter'
|
||||
export default {
|
||||
filters: {
|
||||
rounding(value) {
|
||||
return value ? Number(value).toFixed(2) : value
|
||||
}
|
||||
},
|
||||
components: { Pagination, AdjustmentForm },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
TrialCode: '',
|
||||
Reviewer: '',
|
||||
BeginMonth: '',
|
||||
EndMonth: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: false,
|
||||
SortField: ''
|
||||
},
|
||||
listLoading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
exchangeRate: '',
|
||||
date: '',
|
||||
timer: '',
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
row: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.date = this.$router.currentRoute.query.date
|
||||
this.listQuery.BeginMonth = 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 ? this.$router.currentRoute.query.exchangeRate : 0
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
getPaymentAdjustmentList(this.listQuery).then(res => {
|
||||
this.listLoading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
},
|
||||
handleNew() {
|
||||
this.title = 'New'
|
||||
this.row = {}
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = 'Edit'
|
||||
this.row = JSON.parse(JSON.stringify(row))
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deletePaymentAdjustment(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.indexOf(row), 1)
|
||||
this.total = this.total - 1
|
||||
this.$message.success('Deleted successfully !')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSearch() {
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.listQuery.PageIndex = 1
|
||||
this.listQuery.Reviewer = ''
|
||||
this.getList()
|
||||
},
|
||||
sortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.listQuery.Asc = true
|
||||
} else {
|
||||
this.listQuery.Asc = false
|
||||
}
|
||||
this.listQuery.SortField = column.prop
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
closeDialog() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
adjustMonthFormatter(row) {
|
||||
if (row.AdjustedYearMonth) {
|
||||
const date = new Date(row.AdjustedYearMonth)
|
||||
return FormatTime(date, 'yyyy-MM')
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.adjustment-container{
|
||||
|
||||
.filter-container{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.mr{
|
||||
margin-right:5px;
|
||||
}
|
||||
}
|
||||
.list-container{
|
||||
height: calc(100% - 80px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="app-container adjustment-container data-list">
|
||||
<div class="filter-container">
|
||||
<el-input v-model="listQuery.Reviewer" style="width:220px" size="small" placeholder="Reviewer ID" class="mr" />
|
||||
<el-date-picker
|
||||
v-model="listQuery.BeginMonth"
|
||||
size="small"
|
||||
placeholder="Beginning date"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
disabled
|
||||
class="mr"
|
||||
/>
|
||||
<el-button size="small" type="text" @click="handleReset">Reset</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>
|
||||
</div>
|
||||
<div class="data-table">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
stripe
|
||||
:data="list"
|
||||
height="100%"
|
||||
size="small"
|
||||
@sort-change="sortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
prop="LastName"
|
||||
label="Name"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.LastName + ' / ' + scope.row.FirstName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="ChineseName"
|
||||
label="Name CN"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ReviewerCode"
|
||||
label="Reviewer ID"
|
||||
min-width="110"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="AdjustPaymentUSD"
|
||||
label="Amount($)"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.AdjustPaymentUSD | rounding }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="AdjustPaymentCNY"
|
||||
label="Amount(¥)"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.AdjustPaymentCNY | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Note" label="Note" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
prop="YearMonth"
|
||||
label="Adjust Month"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="Action">
|
||||
<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="handleDelete(scope.row)"
|
||||
>Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="600px"
|
||||
>
|
||||
<adjustment-form
|
||||
:key="timer"
|
||||
:row="row"
|
||||
:date="date"
|
||||
:exchange-rate="exchangeRate"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import AdjustmentForm from './components/AdjustmentForm'
|
||||
import { getPaymentAdjustmentList, deletePaymentAdjustment } from '@/api/financials'
|
||||
import { FormatTime } from '@/utils/formatter'
|
||||
export default {
|
||||
filters: {
|
||||
rounding(value) {
|
||||
return value ? Number(value).toFixed(2) : value
|
||||
}
|
||||
},
|
||||
components: { Pagination, AdjustmentForm },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
TrialCode: '',
|
||||
Reviewer: '',
|
||||
BeginMonth: '',
|
||||
EndMonth: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: false,
|
||||
SortField: ''
|
||||
},
|
||||
listLoading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
exchangeRate: '',
|
||||
date: '',
|
||||
timer: '',
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
row: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.date = this.$router.currentRoute.query.date
|
||||
this.listQuery.BeginMonth = 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 ? this.$router.currentRoute.query.exchangeRate : 0
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
getPaymentAdjustmentList(this.listQuery).then(res => {
|
||||
this.listLoading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
},
|
||||
handleNew() {
|
||||
this.title = 'New'
|
||||
this.row = {}
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = 'Edit'
|
||||
this.row = JSON.parse(JSON.stringify(row))
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deletePaymentAdjustment(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.indexOf(row), 1)
|
||||
this.total = this.total - 1
|
||||
this.$message.success('Deleted successfully !')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSearch() {
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.listQuery.PageIndex = 1
|
||||
this.listQuery.Reviewer = ''
|
||||
this.getList()
|
||||
},
|
||||
sortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.listQuery.Asc = true
|
||||
} else {
|
||||
this.listQuery.Asc = false
|
||||
}
|
||||
this.listQuery.SortField = column.prop
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
closeDialog() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
adjustMonthFormatter(row) {
|
||||
if (row.AdjustedYearMonth) {
|
||||
const date = new Date(row.AdjustedYearMonth)
|
||||
return FormatTime(date, 'yyyy-MM')
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.adjustment-container{
|
||||
|
||||
.filter-container{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.mr{
|
||||
margin-right:5px;
|
||||
}
|
||||
}
|
||||
.list-container{
|
||||
height: calc(100% - 80px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -1,198 +1,198 @@
|
|||
<template>
|
||||
<div class="app-container exchange-rate data-list">
|
||||
<div class="filter-container">
|
||||
<el-date-picker
|
||||
v-model="listQuery.SearchMonth"
|
||||
size="small"
|
||||
placeholder="Search Month"
|
||||
value-format="yyyy-MM"
|
||||
format="yyyy-MM"
|
||||
type="month"
|
||||
style="width:150px;margin-right:5px"
|
||||
:picker-options="pickerOption"
|
||||
/>
|
||||
<el-button size="small" type="text" @click="handleReset">Reset</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>
|
||||
</div>
|
||||
<div class="list-container">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
stripe
|
||||
class="table"
|
||||
height="100%"
|
||||
size="small"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<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="UpdateTime" label="Update Time" min-width="70" show-overflow-tooltip />
|
||||
|
||||
<el-table-column fixed="right" label="Action" min-width="150">
|
||||
<template slot-scope="scope" min-width="130">
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>Edit</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog
|
||||
:key="timer"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
size="small"
|
||||
>
|
||||
<el-form ref="rateForm" label-width="150px" :rules="rules" :model="form" size="small">
|
||||
<el-form-item label="Month: " prop="YearMonth">
|
||||
<el-date-picker
|
||||
v-model="form.YearMonth"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
:disabled="form.Id !=''&& form.Id !=undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="Exchange Rate: " prop="Rate">
|
||||
<el-input v-model="form.Rate" type="number" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getRateList, addOrUpdateExchangeRate, deleteExchangeRate } from '@/api/financials'
|
||||
import Pagination from '@/components/Pagination'
|
||||
export default {
|
||||
name: 'ExchangeRate',
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: { SearchMonth: '', PageIndex: 1, PageSize: 20 },
|
||||
list: [],
|
||||
listLoading: false,
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
timer: '',
|
||||
form: {},
|
||||
rules: {
|
||||
Rate: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
YearMonth: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
},
|
||||
btnDisabled: false,
|
||||
pickerOption: {
|
||||
disabledDate: time => {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() { this.getList() },
|
||||
methods: {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
getRateList(this.listQuery).then(res => {
|
||||
this.listLoading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.listLoading = false })
|
||||
},
|
||||
handleNew() {
|
||||
this.form = {}
|
||||
this.title = 'Add'
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = 'Edit'
|
||||
this.form = JSON.parse(JSON.stringify(row))
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.rateForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.btnDisabled = true
|
||||
const param = {
|
||||
Rate: this.form.Rate,
|
||||
YearMonth: this.form.YearMonth
|
||||
}
|
||||
this.form.Id ? param.Id = this.form.Id : ''
|
||||
addOrUpdateExchangeRate(param).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success('Updated successfully!')
|
||||
this.dialogVisible = false
|
||||
}
|
||||
this.btnDisabled = false
|
||||
})
|
||||
.catch(() => { this.btnDisabled = false })
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'No'
|
||||
})
|
||||
.then(() => {
|
||||
deleteExchangeRate(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(action => {})
|
||||
},
|
||||
handleSearch() {
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.listQuery.SearchMonth = ''
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.exchange-rate{
|
||||
padding: 0;
|
||||
.filter-container{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.list-container{
|
||||
height: calc(100% - 70px);
|
||||
}
|
||||
.el-date-editor.el-input{
|
||||
width: 100%;
|
||||
}
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="app-container exchange-rate data-list">
|
||||
<div class="filter-container">
|
||||
<el-date-picker
|
||||
v-model="listQuery.SearchMonth"
|
||||
size="small"
|
||||
placeholder="Search Month"
|
||||
value-format="yyyy-MM"
|
||||
format="yyyy-MM"
|
||||
type="month"
|
||||
style="width:150px;margin-right:5px"
|
||||
:picker-options="pickerOption"
|
||||
/>
|
||||
<el-button size="small" type="text" @click="handleReset">Reset</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>
|
||||
</div>
|
||||
<div class="list-container">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
stripe
|
||||
class="table"
|
||||
height="100%"
|
||||
size="small"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<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="UpdateTime" label="Update Time" min-width="70" show-overflow-tooltip />
|
||||
|
||||
<el-table-column fixed="right" label="Action" min-width="150">
|
||||
<template slot-scope="scope" min-width="130">
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>Edit</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog
|
||||
:key="timer"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
size="small"
|
||||
>
|
||||
<el-form ref="rateForm" label-width="150px" :rules="rules" :model="form" size="small">
|
||||
<el-form-item label="Month: " prop="YearMonth">
|
||||
<el-date-picker
|
||||
v-model="form.YearMonth"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
:disabled="form.Id !=''&& form.Id !=undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="Exchange Rate: " prop="Rate">
|
||||
<el-input v-model="form.Rate" type="number" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getRateList, addOrUpdateExchangeRate, deleteExchangeRate } from '@/api/financials'
|
||||
import Pagination from '@/components/Pagination'
|
||||
export default {
|
||||
name: 'ExchangeRate',
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: { SearchMonth: '', PageIndex: 1, PageSize: 20 },
|
||||
list: [],
|
||||
listLoading: false,
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
timer: '',
|
||||
form: {},
|
||||
rules: {
|
||||
Rate: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
YearMonth: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
},
|
||||
btnDisabled: false,
|
||||
pickerOption: {
|
||||
disabledDate: time => {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() { this.getList() },
|
||||
methods: {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
getRateList(this.listQuery).then(res => {
|
||||
this.listLoading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.listLoading = false })
|
||||
},
|
||||
handleNew() {
|
||||
this.form = {}
|
||||
this.title = 'Add'
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = 'Edit'
|
||||
this.form = JSON.parse(JSON.stringify(row))
|
||||
this.timer = new Date().getTime()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.rateForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.btnDisabled = true
|
||||
const param = {
|
||||
Rate: this.form.Rate,
|
||||
YearMonth: this.form.YearMonth
|
||||
}
|
||||
this.form.Id ? param.Id = this.form.Id : ''
|
||||
addOrUpdateExchangeRate(param).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success('Updated successfully!')
|
||||
this.dialogVisible = false
|
||||
}
|
||||
this.btnDisabled = false
|
||||
})
|
||||
.catch(() => { this.btnDisabled = false })
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'No'
|
||||
})
|
||||
.then(() => {
|
||||
deleteExchangeRate(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(action => {})
|
||||
},
|
||||
handleSearch() {
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.listQuery.SearchMonth = ''
|
||||
this.listQuery.PageIndex = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.exchange-rate{
|
||||
padding: 0;
|
||||
.filter-container{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.list-container{
|
||||
height: calc(100% - 70px);
|
||||
}
|
||||
.el-date-editor.el-input{
|
||||
width: 100%;
|
||||
}
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,324 +1,323 @@
|
|||
<template>
|
||||
<div class="rates-container">
|
||||
<div class="title">
|
||||
<p>Rank-Based Rates</p>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="addBtn"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>New</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
size="small"
|
||||
:data="list"
|
||||
max-height="300"
|
||||
stripe
|
||||
class="table"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
<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>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Training | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="RefresherTraining" label="Refresher Training ($)" min-width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.RefresherTraining | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Timepoint" align="center">
|
||||
<el-table-column
|
||||
prop="Timepoint"
|
||||
label="Regular ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Timepoint | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="TimepointIn48H"
|
||||
label="48-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.TimepointIn48H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="TimepointIn24H"
|
||||
label="24-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.TimepointIn24H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="Adjudication" align="center">
|
||||
<el-table-column
|
||||
prop="Adjudication"
|
||||
label="Regular ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Adjudication | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="AdjudicationIn48H"
|
||||
label="48-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.AdjudicationIn48H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="AdjudicationIn24H"
|
||||
label="24-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.AdjudicationIn24H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Global" label="Global ($)" min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Global | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="Downtime" label="Downtime ($)" min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Downtime | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="Action"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope" min-width="130">
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>Edit</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination style="text-align:right;margin-top:5px;" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog
|
||||
:key="timer"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="baseRateForm" label-width="190px" :rules="rules" :model="baseRateForm" size="small">
|
||||
<el-form-item label="Rank: " prop="RankName">
|
||||
<el-input v-model="baseRateForm.RankName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Training ($): " prop="Training">
|
||||
<!-- <el-input v-model="baseRateForm.Training" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.Training" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Refresher Training ($): " prop="RefresherTraining">
|
||||
<el-input-number v-model="baseRateForm.RefresherTraining" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Timepoint ($): " prop="Timepoint">
|
||||
<!-- <el-input v-model="baseRateForm.Timepoint" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.Timepoint" style="width:100%;" :min="0" @input="timepointChange" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Timepoint 48H ($): " prop="TimepointIn48H">
|
||||
<!-- <el-input v-model="baseRateForm.TimepointIn48H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.TimepointIn48H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Timepoint 24H ($): " prop="TimepointIn24H">
|
||||
<!-- <el-input v-model="baseRateForm.TimepointIn24H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.TimepointIn24H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Adjudication ($): " prop="Adjudication">
|
||||
<!-- <el-input v-model="baseRateForm.Adjudication" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.Adjudication" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Adjudication 48H ($): " prop="AdjudicationIn48H">
|
||||
<!-- <el-input v-model="baseRateForm.AdjudicationIn48H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.AdjudicationIn48H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Adjudication 24H ($): " prop="AdjudicationIn24H">
|
||||
<!-- <el-input v-model="baseRateForm.AdjudicationIn24H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.AdjudicationIn24H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Global ($): " prop="Global">
|
||||
<el-input v-model="baseRateForm.Global" disabled type="number" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Downtime ($): " prop="Downtime">
|
||||
<el-input-number v-model="baseRateForm.Downtime" style="width:100%;" :min="0" />
|
||||
<!-- <el-input v-model="baseRateForm.Downtime" type="number" /> -->
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { getRankPriceList, addOrUpdateRankPrice, deleteRankPrice } from '@/api/financials'
|
||||
const getListQueryDefault = () => {
|
||||
return {
|
||||
PageSize: 20,
|
||||
PageIndex: 1,
|
||||
Asc: false,
|
||||
SortField: ''
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'RankBasedRates',
|
||||
components: { Pagination },
|
||||
filters: {
|
||||
rounding(value) {
|
||||
return value ? Number(value).toFixed(2) : value
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listQuery: getListQueryDefault(),
|
||||
list: [],
|
||||
listLoading: false,
|
||||
total: 0,
|
||||
baseRateForm: {},
|
||||
dialogVisible: false,
|
||||
btnDisabled: false,
|
||||
title: '',
|
||||
timer: '',
|
||||
rules: {
|
||||
RankName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
Training: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Timepoint: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
TimepointIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
TimepointIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Adjudication: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
AdjudicationIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
AdjudicationIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Global: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Downtime: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
RefresherTraining: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() { this.getList() },
|
||||
methods: {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
getRankPriceList(this.listQuery).then(res => {
|
||||
this.listLoading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.listLoading = false })
|
||||
},
|
||||
handleAdd() {
|
||||
this.baseRateForm = {}
|
||||
this.timer = new Date().getTime()
|
||||
this.title = 'Add'
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = 'Edit'
|
||||
this.timer = new Date().getTime()
|
||||
this.baseRateForm = JSON.parse(JSON.stringify(row))
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteRankPrice(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.baseRateForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.btnDisabled = true
|
||||
addOrUpdateRankPrice(this.baseRateForm).then(res => {
|
||||
this.getList()
|
||||
this.btnDisabled = false
|
||||
this.$message.success('Saved successfully!')
|
||||
this.dialogVisible = false
|
||||
}).catch(() => { this.btnDisabled = false })
|
||||
}
|
||||
})
|
||||
},
|
||||
timepointChange() {
|
||||
this.baseRateForm.Global = this.baseRateForm.Timepoint / 2
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.rates-container {
|
||||
.title {
|
||||
position: relative;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
background: #e4ebf1;
|
||||
border-left: 3px solid #0fc8e0;
|
||||
padding-left: 5px;
|
||||
margin-bottom:10px;
|
||||
font-size: 13px;
|
||||
p{
|
||||
margin: 0;
|
||||
}
|
||||
.addBtn {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 50%;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="rates-container">
|
||||
<div class="title">
|
||||
<p>Rank-Based Rates</p>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="addBtn"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>New</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
size="small"
|
||||
:data="list"
|
||||
max-height="300"
|
||||
stripe
|
||||
class="table"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
<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>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Training | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="RefresherTraining" label="Refresher Training ($)" min-width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.RefresherTraining | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Timepoint" align="center">
|
||||
<el-table-column
|
||||
prop="Timepoint"
|
||||
label="Regular ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Timepoint | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="TimepointIn48H"
|
||||
label="48-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.TimepointIn48H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="TimepointIn24H"
|
||||
label="24-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.TimepointIn24H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="Adjudication" align="center">
|
||||
<el-table-column
|
||||
prop="Adjudication"
|
||||
label="Regular ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Adjudication | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="AdjudicationIn48H"
|
||||
label="48-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.AdjudicationIn48H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="AdjudicationIn24H"
|
||||
label="24-hour ($)"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.AdjudicationIn24H | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Global" label="Global ($)" min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Global | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="Downtime" label="Downtime ($)" min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.Downtime | rounding }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="Action"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope" min-width="130">
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>Edit</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination style="text-align:right;margin-top:5px;" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog
|
||||
:key="timer"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="baseRateForm" label-width="190px" :rules="rules" :model="baseRateForm" size="small">
|
||||
<el-form-item label="Rank: " prop="RankName">
|
||||
<el-input v-model="baseRateForm.RankName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Training ($): " prop="Training">
|
||||
<!-- <el-input v-model="baseRateForm.Training" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.Training" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Refresher Training ($): " prop="RefresherTraining">
|
||||
<el-input-number v-model="baseRateForm.RefresherTraining" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Timepoint ($): " prop="Timepoint">
|
||||
<!-- <el-input v-model="baseRateForm.Timepoint" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.Timepoint" style="width:100%;" :min="0" @input="timepointChange" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Timepoint 48H ($): " prop="TimepointIn48H">
|
||||
<!-- <el-input v-model="baseRateForm.TimepointIn48H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.TimepointIn48H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Timepoint 24H ($): " prop="TimepointIn24H">
|
||||
<!-- <el-input v-model="baseRateForm.TimepointIn24H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.TimepointIn24H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Adjudication ($): " prop="Adjudication">
|
||||
<!-- <el-input v-model="baseRateForm.Adjudication" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.Adjudication" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Adjudication 48H ($): " prop="AdjudicationIn48H">
|
||||
<!-- <el-input v-model="baseRateForm.AdjudicationIn48H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.AdjudicationIn48H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Adjudication 24H ($): " prop="AdjudicationIn24H">
|
||||
<!-- <el-input v-model="baseRateForm.AdjudicationIn24H" type="number" /> -->
|
||||
<el-input-number v-model="baseRateForm.AdjudicationIn24H" style="width:100%;" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Global ($): " prop="Global">
|
||||
<el-input v-model="baseRateForm.Global" disabled type="number" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Downtime ($): " prop="Downtime">
|
||||
<el-input-number v-model="baseRateForm.Downtime" style="width:100%;" :min="0" />
|
||||
<!-- <el-input v-model="baseRateForm.Downtime" type="number" /> -->
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" :disabled="btnDisabled" size="small" @click="handleSave">Ok</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { getRankPriceList, addOrUpdateRankPrice, deleteRankPrice } from '@/api/financials'
|
||||
const getListQueryDefault = () => {
|
||||
return {
|
||||
PageSize: 20,
|
||||
PageIndex: 1,
|
||||
Asc: false,
|
||||
SortField: ''
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'RankBasedRates',
|
||||
components: { Pagination },
|
||||
filters: {
|
||||
rounding(value) {
|
||||
return value ? Number(value).toFixed(2) : value
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listQuery: getListQueryDefault(),
|
||||
list: [],
|
||||
listLoading: false,
|
||||
total: 0,
|
||||
baseRateForm: {},
|
||||
dialogVisible: false,
|
||||
btnDisabled: false,
|
||||
title: '',
|
||||
timer: '',
|
||||
rules: {
|
||||
RankName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
Training: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Timepoint: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
TimepointIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
TimepointIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Adjudication: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
AdjudicationIn24H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
AdjudicationIn48H: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Global: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Downtime: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
RefresherTraining: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() { this.getList() },
|
||||
methods: {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
getRankPriceList(this.listQuery).then(res => {
|
||||
this.listLoading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.listLoading = false })
|
||||
},
|
||||
handleAdd() {
|
||||
this.baseRateForm = {}
|
||||
this.timer = new Date().getTime()
|
||||
this.title = 'Add'
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = 'Edit'
|
||||
this.timer = new Date().getTime()
|
||||
this.baseRateForm = JSON.parse(JSON.stringify(row))
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteRankPrice(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.baseRateForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.btnDisabled = true
|
||||
addOrUpdateRankPrice(this.baseRateForm).then(res => {
|
||||
this.getList()
|
||||
this.btnDisabled = false
|
||||
this.$message.success('Saved successfully!')
|
||||
this.dialogVisible = false
|
||||
}).catch(() => { this.btnDisabled = false })
|
||||
}
|
||||
})
|
||||
},
|
||||
timepointChange() {
|
||||
this.baseRateForm.Global = this.baseRateForm.Timepoint / 2
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.rates-container {
|
||||
.title {
|
||||
position: relative;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
background: #e4ebf1;
|
||||
border-left: 3px solid #0fc8e0;
|
||||
padding-left: 5px;
|
||||
margin-bottom:10px;
|
||||
font-size: 13px;
|
||||
p{
|
||||
margin: 0;
|
||||
}
|
||||
.addBtn {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 50%;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -340,11 +340,10 @@ export default {
|
|||
},
|
||||
handleView(row) { row.SowFullPath ? window.open(row.SowFullPath, '_blank') : '' },
|
||||
handleDeleteSOW(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
const param = { SowPath: row.SowPath, TrialId: row.TrialId }
|
||||
|
|
|
@ -92,7 +92,7 @@ export default {
|
|||
if (res.IsSuccess) {
|
||||
this.fileList = []
|
||||
this.$message({
|
||||
message: 'Deleted successfully!',
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
})
|
||||
this.$emit('getFileList', this.fileList)
|
||||
|
|
|
@ -274,7 +274,8 @@ export default {
|
|||
if (this.userTypeEnumInt !== 0) {
|
||||
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(() => {})
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<span style="margin-right: 20px">
|
||||
{{$t('trials:enrolledReviews:message:EQC')}}
|
||||
</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>
|
||||
<el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus">
|
||||
<el-table-column type="index" width="40" />
|
||||
|
|
|
@ -567,8 +567,7 @@ export default {
|
|||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteEducationInfo(row.Id)
|
||||
|
@ -636,8 +635,7 @@ export default {
|
|||
this.$confirm('Confirm to delete?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deletePostgraduateInfo(row.Id)
|
||||
|
|
|
@ -181,7 +181,7 @@ export default {
|
|||
this.fileList = []
|
||||
this.GCPID = ''
|
||||
this.$message({
|
||||
message: 'Deleted successfully!',
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -266,11 +266,10 @@ export default {
|
|||
}
|
||||
},
|
||||
handleRemoveFile(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
}).then(() => {
|
||||
deleteAttachment(row.Id, row.Path)
|
||||
.then(res => {
|
||||
|
@ -278,7 +277,7 @@ export default {
|
|||
this.resumeList.splice(this.resumeList.findIndex(item => item.Id === row.Id), 1)
|
||||
this.filterByLanguage()
|
||||
this.$message({
|
||||
message: 'Deleted successfully!',
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</div>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
:label="$t('system:Setting:title:Vacation')"
|
||||
:title="$t('system:Setting:title:Vacation')"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%"
|
||||
:close-on-click-modal="false"
|
||||
|
@ -87,6 +87,7 @@
|
|||
<div>
|
||||
<el-date-picker
|
||||
v-model="daterange"
|
||||
style="width: 360px"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
|
@ -117,7 +118,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<div class="pagination" style="padding: 10px 0;text-align: right">
|
||||
<el-pagination
|
||||
background
|
||||
layout="total,sizes,prev, pager, next"
|
||||
|
@ -165,7 +166,6 @@ export default {
|
|||
rules: {
|
||||
AdminComment: [{ max: 500, message: 'The maximum length is 500' }],
|
||||
BlindName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
BlindNameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
},
|
||||
doctorId: this.$route.query.Id,
|
||||
isDisabled: false,
|
||||
|
@ -258,7 +258,7 @@ export default {
|
|||
}
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
})
|
||||
|
@ -272,7 +272,7 @@ export default {
|
|||
this.gridData.splice(index, 1)
|
||||
this.totalItems = this.totalItems - 1
|
||||
}
|
||||
this.$message.success('Deleted successfully!')
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
this.loading2 = false
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="form-container">
|
||||
<div class="title-wrapper">
|
||||
<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 style="padding:0 40px;">
|
||||
<el-table
|
||||
|
@ -73,7 +73,7 @@
|
|||
size="small"
|
||||
>
|
||||
<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
|
||||
v-for="(key,value) of dictionaryList.Phase"
|
||||
:key="value"
|
||||
|
@ -91,7 +91,6 @@
|
|||
<el-form-item :label="$t('system:TrialExperience:label:Review Criteria')" prop="EvaluationCriteriaIdList">
|
||||
<el-select
|
||||
v-model="clinicalTrialForm.EvaluationCriteriaIdList"
|
||||
placeholder="Please select"
|
||||
multiple
|
||||
>
|
||||
<!-- <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?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteTrialExperience(row.Id)
|
||||
|
|
|
@ -69,13 +69,13 @@
|
|||
</el-form>
|
||||
</div>
|
||||
<span style="margin-left:auto;">
|
||||
<el-switch
|
||||
v-model="isEN"
|
||||
active-text="EN"
|
||||
inactive-text="中文"
|
||||
style="margin-right:10px;"
|
||||
@change="handleIsEnChange"
|
||||
/>
|
||||
<!-- <el-switch-->
|
||||
<!-- v-model="isEN"-->
|
||||
<!-- active-text="EN"-->
|
||||
<!-- inactive-text="中文"-->
|
||||
<!-- style="margin-right:10px;"-->
|
||||
<!-- @change="handleIsEnChange"-->
|
||||
<!-- />-->
|
||||
<el-button size="small" icon="el-icon-plus" type="primary" @click="handleNew">{{$t('common:button:new')}}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -367,17 +367,20 @@ export default {
|
|||
},
|
||||
tokenKey: getToken(),
|
||||
share_model: { visible: false, title: '', width: '500px' },
|
||||
shareLink: null
|
||||
shareLink: null,
|
||||
isEnglish: false
|
||||
}
|
||||
},
|
||||
dicts: ['ReadingType', 'Subspeciality', 'Department', 'Rank', 'Position', 'ReadingStandard'],
|
||||
computed: {
|
||||
...mapGetters(['hospitalList', 'reviewersQuery', 'isEnglish'])
|
||||
...mapGetters(['hospitalList', 'reviewersQuery'])
|
||||
},
|
||||
created() {
|
||||
this.isEN = this.isEnglish
|
||||
this.reviewersQuery ? this.listQuery = this.reviewersQuery : ''
|
||||
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: {
|
||||
copyCode() {
|
||||
|
|
|
@ -43,9 +43,6 @@
|
|||
<el-date-picker
|
||||
v-model="datetimerange"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="handleDatetimeChange"
|
||||
|
@ -77,7 +74,7 @@
|
|||
<el-table-column
|
||||
:label="$t('system:loginLog:table:OptType')"
|
||||
prop="OptType"
|
||||
min-width="90"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
|
@ -88,28 +85,28 @@
|
|||
<el-table-column
|
||||
label="IP"
|
||||
prop="IP"
|
||||
min-width="90"
|
||||
min-width="150"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('system:loginLog:table:LoginFaildName')"
|
||||
prop="LoginFaildName"
|
||||
min-width="90"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('system:loginLog:table:LoginUserName')"
|
||||
prop="LoginUserName"
|
||||
min-width="90"
|
||||
min-width="140"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('system:loginLog:table:LoginUserType')"
|
||||
prop="LoginUserTypeEnum"
|
||||
min-width="90"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
|
@ -120,14 +117,14 @@
|
|||
<el-table-column
|
||||
:label="$t('system:loginLog:table:OptUserName')"
|
||||
prop="OptUserName"
|
||||
min-width="90"
|
||||
min-width="200"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('system:loginLog:table:OptUserType')"
|
||||
prop="OptUserTypeEnum"
|
||||
min-width="90"
|
||||
min-width="200"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
|
@ -138,7 +135,7 @@
|
|||
<el-table-column
|
||||
:label="$t('system:loginLog:table:CreateTime')"
|
||||
prop="CreateTime"
|
||||
min-width="90"
|
||||
min-width="180"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
ref="NoticeForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
label-width="180px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item :label="$t('system:notice:label:NoticeLevel')" prop="NoticeLevelEnum">
|
||||
|
|
|
@ -136,16 +136,15 @@ export default {
|
|||
// })
|
||||
},
|
||||
handleDeleteRole(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
}).then(() => {
|
||||
deleteUserTypeRole(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
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'))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -9,27 +9,26 @@
|
|||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { params } from '@/utils/ruoyi'
|
||||
import { resetPassword } from '@/api/admin'
|
||||
export default {
|
||||
name: 'Account',
|
||||
props: {
|
||||
userId: { type: String, default: '' }
|
||||
userId: { type: String, default: '' },
|
||||
},
|
||||
methods: {
|
||||
handleReset() {
|
||||
this.$confirm('Sure to reset password?', {
|
||||
this.$confirm(this.$t('system:userlist:message:ResetPassword').replace('xxx', params('userName')), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
resetPassword(this.userId).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.$message({
|
||||
message: 'Reset password successfully',
|
||||
type: 'success'
|
||||
})
|
||||
let msg = this.$t('system:userlist:message:ResetPassword2')
|
||||
msg = msg.replace('xxx', params('userName'))
|
||||
msg = msg.replace('yyy', params('email'))
|
||||
this.$alert(msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -38,10 +38,12 @@
|
|||
<el-input v-model="user.Phone" />
|
||||
</el-form-item>
|
||||
<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 :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 :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">
|
||||
|
@ -105,11 +107,29 @@ export default {
|
|||
}
|
||||
},
|
||||
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() {
|
||||
this.$refs.userForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.isDisabled = true
|
||||
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) {
|
||||
this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum
|
||||
}
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
:search-handle="searchHandle"
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
@new="handleAddUser"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px"
|
||||
@click="handleAddUser"
|
||||
>{{$t('common:button:new')}}</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px"-->
|
||||
<!-- @click="handleAddUser"-->
|
||||
<!-- >{{$t('common:button:new')}}</el-button>-->
|
||||
</div>
|
||||
<base-table
|
||||
v-loading="loading"
|
||||
|
@ -36,13 +37,13 @@
|
|||
{{ scope.row.RoleNameList.map(role => role.RoleName).join(',') }}
|
||||
</template>
|
||||
<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 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 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>
|
||||
</base-table>
|
||||
</box-content>
|
||||
|
@ -166,8 +167,8 @@ export default {
|
|||
label: this.$t('common:action:action'),
|
||||
minWidth: 200,
|
||||
operates: [
|
||||
{ name: 'Edit', type: 'primary', emitKey: 'editCb' },
|
||||
{ name: 'Delete', type: 'danger', emitKey: 'deleteCb' }
|
||||
{ name: this.$t('common:button:edit'), type: 'primary', emitKey: 'editCb' },
|
||||
{ name: this.$t('common:button:delete'), type: 'danger', emitKey: 'deleteCb' }
|
||||
] }
|
||||
],
|
||||
searchForm: [
|
||||
|
@ -205,8 +206,8 @@ export default {
|
|||
prop: 'IsZhiZhun',
|
||||
width: '100px',
|
||||
options: [
|
||||
{ label: 'Internal', value: true },
|
||||
{ label: 'External', value: false }
|
||||
{ label: this.$t('system:userlist:label:InternalOrExternal:Internal'), value: true },
|
||||
{ label: this.$t('system:userlist:label:InternalOrExternal:External'), value: false }
|
||||
],
|
||||
props: { label: 'label', value: 'value' },
|
||||
change: scope => '',
|
||||
|
@ -218,8 +219,8 @@ export default {
|
|||
prop: 'IsTestUser',
|
||||
width: '100px',
|
||||
options: [
|
||||
{ label: 'Yes', value: true },
|
||||
{ label: 'No', value: false }
|
||||
{ label: this.$t('system:userlist:label:IsTestUser:Yes'), value: true },
|
||||
{ label: this.$t('system:userlist:label:IsTestUser:No'), value: false }
|
||||
],
|
||||
props: { label: 'label', value: 'value' },
|
||||
change: scope => '',
|
||||
|
@ -231,8 +232,8 @@ export default {
|
|||
prop: 'UserState',
|
||||
width: '100px',
|
||||
options: [
|
||||
{ label: 'Enable', value: 1 },
|
||||
{ label: 'Disable', value: 0 }
|
||||
{ label: this.$t('system:userlist:label:Status:Enable'), value: 1 },
|
||||
{ label: this.$t('system:userlist:label:Status:Disable'), value: 0 }
|
||||
],
|
||||
props: { label: 'label', value: 'value' },
|
||||
change: scope => '',
|
||||
|
@ -250,7 +251,8 @@ export default {
|
|||
],
|
||||
searchHandle: [
|
||||
{ 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: [],
|
||||
loading: false,
|
||||
|
@ -289,22 +291,21 @@ export default {
|
|||
},
|
||||
// 编辑用户
|
||||
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) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
deleteSysUser(data.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
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'))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -555,14 +555,14 @@
|
|||
@click.stop="handleAbandon(scope.row)"
|
||||
/>
|
||||
<!-- 代办详情-->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-list:abolish']"
|
||||
circle
|
||||
icon="el-icon-receiving"
|
||||
:disabled="scope.row.TrialStatusStr === 'Initializing'"
|
||||
:title="$t('trials:trials-list:action:commission')"
|
||||
@click.stop="handleCommission(scope.row)"
|
||||
/>
|
||||
<!-- <el-button-->
|
||||
<!-- v-hasPermi="['trials:trials-list:abolish']"-->
|
||||
<!-- circle-->
|
||||
<!-- icon="el-icon-receiving"-->
|
||||
<!-- :disabled="scope.row.TrialStatusStr === 'Initializing'"-->
|
||||
<!-- :title="$t('trials:trials-list:action:commission')"-->
|
||||
<!-- @click.stop="handleCommission(scope.row)"-->
|
||||
<!-- />-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
<div v-if="trialInfo" class="trial-wrapper">
|
||||
<div class="div-row">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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
|
||||
class="item"
|
||||
:content="trialInfo.Modalitys"
|
||||
|
@ -34,11 +34,11 @@
|
|||
<!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>-->
|
||||
<!-- </div>-->
|
||||
<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>
|
||||
</div>
|
||||
<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>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>-->
|
||||
</div>
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
<div v-if="trialInfo" class="trial-wrapper">
|
||||
<div class="div-row">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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
|
||||
class="item"
|
||||
:content="trialInfo.Modalitys"
|
||||
|
@ -34,11 +34,11 @@
|
|||
<!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>-->
|
||||
<!-- </div>-->
|
||||
<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>
|
||||
</div>
|
||||
<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>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>-->
|
||||
</div>
|
||||
|
|
|
@ -94,7 +94,7 @@ export default {
|
|||
if (res.IsSuccess) {
|
||||
this.fileList = []
|
||||
this.$message({
|
||||
message: 'Deleted successfully!',
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
})
|
||||
this.$emit('getFileList', this.fileList)
|
||||
|
|
|
@ -18,22 +18,6 @@
|
|||
style="width:120px;"
|
||||
/>
|
||||
</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
|
||||
:label="$t('trials:medicalFeedbackCfg:title:taskType')"
|
||||
|
@ -80,7 +64,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-top: 10px">
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
sortable="custom"
|
||||
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
|
||||
prop="UserType"
|
||||
|
|
|
@ -137,11 +137,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
|
@ -150,7 +149,7 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
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 })
|
||||
})
|
||||
|
|
|
@ -175,6 +175,8 @@
|
|||
v-model="scope.row.IsReading"
|
||||
:disabled="scope.row.IsDeleted || isAudit"
|
||||
@change="changeReadingStatus($event, scope.row)"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -188,6 +190,8 @@
|
|||
v-model="scope.row.IsDeleted"
|
||||
:disabled="isAudit"
|
||||
@change="changeDeleteStatus($event, scope.row)"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -1258,6 +1262,7 @@ export default {
|
|||
row.IsReading = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !row.IsReading))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
|
@ -1283,6 +1288,7 @@ export default {
|
|||
row.IsDeleted = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !row.IsDeleted))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
|
|
|
@ -229,9 +229,9 @@
|
|||
<template slot-scope="scope">
|
||||
<el-tooltip placement="bottom">
|
||||
<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>{{ $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>
|
||||
<span v-else>{{ $t('trials:crcUpload:label:noneDicom') }}: {{ scope.row.NoneDicomStudyCount }}</span>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</div>
|
||||
<div class="workbench-content" style="height: 100%">
|
||||
<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}})
|
||||
</div>
|
||||
<el-tabs v-model="activeName" style="height: 100%" tab-position="left">
|
||||
|
@ -157,7 +157,7 @@ export default {
|
|||
console.log(res)
|
||||
this.trialIdList = res.Result
|
||||
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]')
|
||||
list.forEach((v, i) => {
|
||||
if (i === 0) {
|
||||
|
@ -180,10 +180,11 @@ export default {
|
|||
<style lang="scss">
|
||||
.workbench-container{
|
||||
.el-tabs__nav{
|
||||
transform: translateY(40px)!important;
|
||||
transform: translateY(60px)!important;
|
||||
}
|
||||
.el-tabs__header{
|
||||
position: relative;
|
||||
width: 260px!important;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="Security" style="width:800px;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Security</span>
|
||||
</div>
|
||||
<el-form
|
||||
ref="userAccount"
|
||||
:model="user"
|
||||
:rules="userFormRules"
|
||||
label-width="150px"
|
||||
style="width:600px;"
|
||||
>
|
||||
<el-form-item label="Current Password" prop="OldPassWord">
|
||||
<el-input v-model="user.OldPassWord" type="password" />
|
||||
</el-form-item>
|
||||
<el-form-item label="New Password" prop="NewPassWord">
|
||||
<el-input v-model="user.NewPassWord" type="password" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Confirm Password" prop="ConfirmPassWord">
|
||||
<el-input v-model="user.ConfirmPassWord" type="password" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="save">save</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- <el-card class="Security" style="width:800px;">-->
|
||||
<!-- <div slot="header" class="clearfix">-->
|
||||
<!-- <span>Security</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-form-->
|
||||
<!-- ref="userAccount"-->
|
||||
<!-- :model="user"-->
|
||||
<!-- :rules="userFormRules"-->
|
||||
<!-- label-width="150px"-->
|
||||
<!-- style="width:600px;"-->
|
||||
<!-- >-->
|
||||
<!-- <el-form-item label="Current Password" prop="OldPassWord">-->
|
||||
<!-- <el-input v-model="user.OldPassWord" type="password" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="New Password" prop="NewPassWord">-->
|
||||
<!-- <el-input v-model="user.NewPassWord" type="password" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="Confirm Password" prop="ConfirmPassWord">-->
|
||||
<!-- <el-input v-model="user.ConfirmPassWord" type="password" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-button type="primary" size="small" @click="save">save</el-button>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -1,247 +1,265 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
ref="userForm"
|
||||
size="small"
|
||||
:model="user"
|
||||
:rules="userFormRules"
|
||||
label-width="150px"
|
||||
style="width:800px;"
|
||||
>
|
||||
<el-card class="Basic" shadow="never" size="small">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Basic Information</span>
|
||||
</div>
|
||||
<el-form-item v-if="user.Code" label="ID: " prop="Code">
|
||||
<el-input v-model="user.Code" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="User Name: " prop="UserName">
|
||||
<el-input v-model="user.UserName" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="Real Name: " prop="RealName">
|
||||
<el-input v-model="user.RealName" />
|
||||
</el-form-item> -->
|
||||
<el-form-item v-if="user.UserTypeEnum !== 8" label="Surname: " prop="LastName">
|
||||
<el-input v-model="user.LastName" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="user.UserTypeEnum !== 8" label="Given Name: " prop="FirstName">
|
||||
<el-input v-model="user.FirstName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="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="Email: " prop="EMail">
|
||||
<el-input v-model="user.EMail" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Phone: ">
|
||||
<el-input v-model="user.Phone" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="user.UserTypeEnum !== 8" label="Disable">
|
||||
<el-switch v-model="user.Status" :active-value="0" :inactive-value="1" disabled />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="User Type: " prop="UserTypeId">
|
||||
<el-select v-model="user.UserTypeId" size="small" placeholder="Please select" disabled>
|
||||
<el-option
|
||||
v-for="(value,key) of dictionaryList.UserType"
|
||||
:key="key"
|
||||
:label="value"
|
||||
:value="key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <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-option
|
||||
v-for="(userType,key) of userTypeOptions"
|
||||
:key="key"
|
||||
:label="userType.UserType"
|
||||
:value="userType.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="User Type: " prop="UserType">
|
||||
<el-input v-model="user.UserType" disabled />
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
|
||||
<el-card v-if="user.UserTypeEnum !== 8" class="Affiliation" shadow="never" style="margin-top:10px;" size="small">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Affiliation</span>
|
||||
</div>
|
||||
<el-form-item prop="IsZhiZhun">
|
||||
<el-radio-group v-model="user.IsZhiZhun">
|
||||
<el-radio :label="true">Internal</el-radio>
|
||||
<el-radio :label="false">External</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: " prop="OrganizationName">
|
||||
<el-input v-model="user.OrganizationName" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Orgnization Type: " prop="OrganizationTypeId">
|
||||
<el-select
|
||||
v-model="user.OrganizationTypeId"
|
||||
placeholder="Please select"
|
||||
@change="handelOrgnizationTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(value,key) of dictionaryList.InstitutionalType"
|
||||
:key="key"
|
||||
:label="value"
|
||||
:value="key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="user.OrganizationTypeId" label="Orgnization: " prop="OrganizationId">
|
||||
<el-select v-model="user.OrganizationId" placeholder="Please select">
|
||||
<el-option
|
||||
v-for="(item) of OrganizationOptions"
|
||||
:key="item.Id"
|
||||
:label="item.InstitutionName"
|
||||
:value="item.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="Department: " prop="DepartmentName">
|
||||
<el-input v-model="user.DepartmentName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Position: " prop="PositionName">
|
||||
<el-input v-model="user.PositionName" />
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="isDisabled"
|
||||
style="margin:10px 15px"
|
||||
@click="handleSave"
|
||||
>Save</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserTypeList, getInstitutionList, getUser, addUser, updateUser } from '@/api/admin.js'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user: {},
|
||||
userFormRules: {
|
||||
UserName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
UserTypeId: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }],
|
||||
// OrganizationId: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
// OrganizationTypeId: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
// RealName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
IsZhiZhun: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }],
|
||||
OrganizationName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
LastName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
FirstName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
|
||||
// Phone: [
|
||||
// { max: 20, min: 7, message: 'The length is 7 to 20' }
|
||||
// ],
|
||||
EMail: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input the email address',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
type: 'email',
|
||||
message: 'Please input the correct email address',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Status: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
},
|
||||
// OrganizationOptions: [],
|
||||
userTypeOptions: [],
|
||||
isDisabled: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userId'])
|
||||
},
|
||||
mounted() {
|
||||
// this.getUserTypeList()
|
||||
this.initPage()
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.userForm.validate(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('Updated successfully')
|
||||
}).catch(() => { this.isDisabled = false })
|
||||
} else {
|
||||
addUser(this.user).then(res => {
|
||||
this.isDisabled = false
|
||||
this.$emit('getUserId', res.Result.Id)
|
||||
this.$message.success('Added successfully')
|
||||
}).catch(() => { this.isDisabled = false })
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserInfo() {
|
||||
getUser(this.userId).then(res => {
|
||||
this.user = res.Result
|
||||
// res.Result.OrganizationTypeId !== '00000000-0000-0000-0000-000000000000' ? this.getOrgnizationList(res.Result.OrganizationTypeId) : this.user.OrganizationTypeId = ''
|
||||
})
|
||||
},
|
||||
getUserTypeList() {
|
||||
getUserTypeList().then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.userTypeOptions = res.Result
|
||||
}
|
||||
})
|
||||
},
|
||||
handelOrgnizationTypeChange(val) {
|
||||
if (val) {
|
||||
this.user.OrganizationId = ''
|
||||
this.getOrgnizationList(val)
|
||||
}
|
||||
},
|
||||
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>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="Security" style="width:800px;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Security</span>
|
||||
</div>
|
||||
<el-form
|
||||
ref="userForm"
|
||||
size="small"
|
||||
:model="user"
|
||||
:rules="userFormRules"
|
||||
label-width="210px"
|
||||
style="width:600px;"
|
||||
>
|
||||
<el-form-item v-if="user.Code" label="ID: " prop="Code">
|
||||
<el-input v-model="user.Code" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="User Name: " prop="UserName">
|
||||
<el-input v-model="user.UserName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="user.UserTypeEnum !== 8" label="Surname: " prop="LastName">
|
||||
<el-input v-model="user.LastName" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="user.UserTypeEnum !== 8" label="Given Name: " prop="FirstName">
|
||||
<el-input v-model="user.FirstName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="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="Email: " prop="EMail">
|
||||
<el-input v-model="user.EMail" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Phone: ">
|
||||
<el-input v-model="user.Phone" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="user.UserTypeEnum !== 8" label="Disable">
|
||||
<el-switch v-model="user.Status" :active-value="0" :inactive-value="1" disabled />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="User Type: " prop="UserTypeId">
|
||||
<el-select v-model="user.UserTypeId" size="small" placeholder="Please select" disabled>
|
||||
<el-option
|
||||
v-for="(value,key) of dictionaryList.UserType"
|
||||
:key="key"
|
||||
:label="value"
|
||||
:value="key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <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-option
|
||||
v-for="(userType,key) of userTypeOptions"
|
||||
:key="key"
|
||||
:label="userType.UserType"
|
||||
:value="userType.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="User Type: " prop="UserType">
|
||||
<el-input v-model="user.UserType" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <div slot="header" class="clearfix">-->
|
||||
<!-- <span>Affiliation</span>-->
|
||||
<!-- </div>-->
|
||||
<el-form-item prop="IsZhiZhun">
|
||||
<el-radio-group v-model="user.IsZhiZhun">
|
||||
<el-radio :label="true">Internal</el-radio>
|
||||
<el-radio :label="false">External</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: " prop="OrganizationName">
|
||||
<el-input v-model="user.OrganizationName" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Orgnization Type: " prop="OrganizationTypeId">
|
||||
<el-select
|
||||
v-model="user.OrganizationTypeId"
|
||||
placeholder="Please select"
|
||||
@change="handelOrgnizationTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(value,key) of dictionaryList.InstitutionalType"
|
||||
:key="key"
|
||||
:label="value"
|
||||
:value="key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="user.OrganizationTypeId" label="Orgnization: " prop="OrganizationId">
|
||||
<el-select v-model="user.OrganizationId" placeholder="Please select">
|
||||
<el-option
|
||||
v-for="(item) of OrganizationOptions"
|
||||
:key="item.Id"
|
||||
:label="item.InstitutionName"
|
||||
:value="item.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="Department: " prop="DepartmentName">
|
||||
<el-input v-model="user.DepartmentName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Position: " prop="PositionName">
|
||||
<el-input v-model="user.PositionName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="isDisabled"
|
||||
style="margin:10px 15px"
|
||||
@click="handleSave"
|
||||
>Save</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="Security" style="width:800px;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Security</span>
|
||||
</div>
|
||||
<el-form
|
||||
ref="userAccount"
|
||||
:model="user"
|
||||
:rules="userFormRules"
|
||||
label-width="210px"
|
||||
style="width:600px;"
|
||||
>
|
||||
<el-form-item label="Current Password" prop="OldPassWord">
|
||||
<el-input v-model="user.OldPassWord" type="password" />
|
||||
</el-form-item>
|
||||
<el-form-item label="New Password" prop="NewPassWord">
|
||||
<el-input v-model="user.NewPassWord" type="password" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Confirm New Password" prop="ConfirmPassWord">
|
||||
<el-input v-model="user.ConfirmPassWord" type="password" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="save">save</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserTypeList, getInstitutionList, getUser, addUser, updateUser } from '@/api/admin.js'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user: {},
|
||||
userFormRules: {
|
||||
UserName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
UserTypeId: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }],
|
||||
// OrganizationId: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
// OrganizationTypeId: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
// RealName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
IsZhiZhun: [{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }],
|
||||
OrganizationName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
LastName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
FirstName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
|
||||
// Phone: [
|
||||
// { max: 20, min: 7, message: 'The length is 7 to 20' }
|
||||
// ],
|
||||
EMail: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input the email address',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
type: 'email',
|
||||
message: 'Please input the correct email address',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Status: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
},
|
||||
// OrganizationOptions: [],
|
||||
userTypeOptions: [],
|
||||
isDisabled: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userId'])
|
||||
},
|
||||
mounted() {
|
||||
// this.getUserTypeList()
|
||||
this.initPage()
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.userForm.validate(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('Updated successfully')
|
||||
}).catch(() => { this.isDisabled = false })
|
||||
} else {
|
||||
addUser(this.user).then(res => {
|
||||
this.isDisabled = false
|
||||
this.$emit('getUserId', res.Result.Id)
|
||||
this.$message.success('Added successfully')
|
||||
}).catch(() => { this.isDisabled = false })
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserInfo() {
|
||||
getUser(this.userId).then(res => {
|
||||
this.user = res.Result
|
||||
// res.Result.OrganizationTypeId !== '00000000-0000-0000-0000-000000000000' ? this.getOrgnizationList(res.Result.OrganizationTypeId) : this.user.OrganizationTypeId = ''
|
||||
})
|
||||
},
|
||||
getUserTypeList() {
|
||||
getUserTypeList().then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.userTypeOptions = res.Result
|
||||
}
|
||||
})
|
||||
},
|
||||
handelOrgnizationTypeChange(val) {
|
||||
if (val) {
|
||||
this.user.OrganizationId = ''
|
||||
this.getOrgnizationList(val)
|
||||
}
|
||||
},
|
||||
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>
|
||||
|
|
|
@ -1,11 +1,392 @@
|
|||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
|
Loading…
Reference in New Issue