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

uat
caiyiling 2025-02-25 17:35:41 +08:00
commit d2757c6f9b
11 changed files with 1226 additions and 154 deletions

View File

@ -342,3 +342,11 @@ export function addNewUserSendEmail(data) {
data
})
}
// 用户追溯
export function getUserJoinedTrialList(data) {
return request({
url: `/TrialMaintenance/getUserJoinedTrialList`,
method: 'post',
data
})
}

View File

@ -1070,3 +1070,26 @@ export function batchAddEnrollOrPdEmailConfig(params) {
params
})
}
// 文件记录-系统文件列表
export function getSysFileTypeList(data) {
return request({
url: `/SysFileType/getSysFileTypeList`,
method: 'post',
data
})
}
// 文件记录-新增/编辑系统文件
export function addOrUpdateSysFileType(data) {
return request({
url: `/SysFileType/addOrUpdateSysFileType`,
method: 'post',
data
})
}
// 文件记录-删除系统文件
export function deleteSysFileType(id) {
return request({
url: `/SysFileType/deleteSysFileType/${id}`,
method: 'delete'
})
}

View File

@ -146,17 +146,19 @@
<!-- 具名slot -->
<slot v-if="item.type === 'Custom'" :name="item.slot" />
</el-form-item>
<el-form-item v-for="item in searchHandle" :key="item.label">
<slot v-if="item.slot" :name="item.slot" />
<el-button
v-else
:type="item.type"
:size="item.size || size"
:icon="item.icon || ''"
@click="handleClick(item.emitKey)"
>{{ item.label }}</el-button
>
</el-form-item>
<div style="display: inline-block;width: fit-content;">
<el-form-item v-for="item in searchHandle" :key="item.label">
<slot v-if="item.slot" :name="item.slot" />
<el-button
v-else
:type="item.type"
:size="item.size || size"
:icon="item.icon || ''"
@click="handleClick(item.emitKey)"
>{{ item.label }}</el-button
>
</el-form-item>
</div>
</el-form>
</div>
</template>
@ -174,11 +176,11 @@ export default {
},
labelWidth: {
type: String,
default: "",
default: '',
},
size: {
type: String,
default: "mini",
default: 'mini',
},
searchForm: {
type: Array,
@ -196,10 +198,10 @@ export default {
methods: {
handleClick(emitKey) {
// emit
this.$emit(`${emitKey}`);
this.$emit(`${emitKey}`)
},
},
};
}
</script>
<style lang="scss">
.base-search-form {

View File

@ -0,0 +1,224 @@
<template>
<base-model :config="config">
<div slot="dialog-body">
<el-form
ref="fileForm"
:model="form"
label-width="100px"
size="small"
:rules="rules"
>
<div class="base-dialog-body">
<el-form-item :label="$t('dictionary:file:form:name')" prop="Name">
<el-input v-model="form.Name" />
</el-form-item>
<el-form-item
:label="$t('dictionary:file:form:nameCN')"
prop="NameCN"
>
<el-input v-model="form.NameCN" />
</el-form-item>
<el-form-item
:label="$t('dictionary:browser:form:ArchiveTypeEnum')"
prop="ArchiveTypeEnum"
>
<el-select
v-model="form.ArchiveTypeEnum"
clearable
placeholder=""
style="width: 100%"
>
<el-option
v-for="item in $d.ArchiveType"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label="$t('dictionary:browser:form:SubIdentificationEnum')"
prop="SubIdentificationEnum"
>
<el-select
style="width: 100%"
v-model="form.SubIdentificationEnum"
clearable
placeholder=""
>
<el-option
v-for="item in $d.SubIdentification"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('dictionary:file:form:IsEnable')">
<el-switch
v-model="form.IsEnable"
:active-value="true"
:inactive-value="false"
>
</el-switch>
</el-form-item>
<el-form-item :label="$t('dictionary:file:form:IsConfirmRecord')">
<el-switch
v-model="form.IsConfirmRecord"
:active-value="true"
:inactive-value="false"
>
</el-switch>
</el-form-item>
</div>
</el-form>
</div>
<div slot="dialog-footer">
<el-button size="small" @click="canel">
{{ $t('dictionary:browser:button:canel') }}
</el-button>
<el-button size="small" type="primary" :loading="loading" @click="save">
{{ $t('dictionary:browser:button:save') }}
</el-button>
</div>
</base-model>
</template>
<script>
import baseModel from '@/components/BaseModel'
import { addOrUpdateSysFileType } from '@/api/dictionary'
export default {
props: {
config: {
required: true,
default: () => {
return {}
},
},
data: {
required: true,
default: () => {
return {}
},
},
},
components: {
'base-model': baseModel,
},
data() {
return {
form: {
ArchiveTypeEnum: null,
IsConfirmRecord: true,
IsEnable: true,
Name: null,
NameCN: null,
SubIdentificationEnum: null,
},
rules: {
Name: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
],
NameCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
],
SubIdentificationEnum: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: ['blur', 'change'],
},
],
ArchiveTypeEnum: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: ['blur', 'change'],
},
],
},
fileList: [],
loading: false,
}
},
created() {
if (this.config.status === 'edit') {
Object.keys(this.form).forEach((key) => {
this.form[key] = this.data[key]
})
if (this.form.FileName) {
this.fileList[0] = {
name: this.form.FileName,
path: this.form.Path,
fullPath: this.form.Path,
}
}
}
},
methods: {
async save() {
try {
let validate = await this.$refs.fileForm.validate()
if (!validate) return false
this.loading = true
if (this.config.status === 'edit') {
this.form.Id = this.data.Id
}
let res = await addOrUpdateSysFileType(this.form)
if (res.IsSuccess) {
this.$emit('close')
this.$emit('getList')
}
} catch (err) {
console.log(err)
this.loading = false
}
},
canel() {
this.$emit('close')
},
handleRemoveFile() {
this.form.FileName = null
this.form.Path = null
this.fileList = []
},
beforeUpload() {
if (this.fileList.length > 0) {
this.$alert(this.$t('dictionary:bbrowser:msg:message1'))
return
}
},
handlePreview(row, r2) {
if (row.fullPath) {
window.open(row.fullPath, '_blank')
}
},
async handleUploadFile(param) {
this.loading = true
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(
`/System/Browser/${param.file.name}`,
file
)
this.fileList.push({
name: param.file.name,
path: this.$getObjectName(res.url),
fullPath: this.$getObjectName(res.url),
url: this.$getObjectName(res.url),
})
this.form.Path = this.$getObjectName(res.url)
this.form.FileName = param.file.name
this.loading = false
},
},
}
</script>

View File

@ -0,0 +1,340 @@
<template>
<BoxContent>
<box-content>
<!-- 搜索框 -->
<div class="search">
<el-form :inline="true" size="mini" class="base-search-form">
<el-form-item :label="$t('dictionary:file:search:Name')">
<el-input v-model="searchData.Name" style="width: 100px" />
</el-form-item>
<el-form-item :label="$t('dictionary:file:search:NameCN')">
<el-input v-model="searchData.NameCN" style="width: 100px" />
</el-form-item>
<el-form-item :label="$t('dictionary:file:search:archiveTypeEnum')">
<el-select
v-model="searchData.ArchiveTypeEnum"
clearable
placeholder=""
style="width: 100px"
>
<el-option
v-for="item in $d.ArchiveType"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label="$t('dictionary:file:search:subIdentificationEnum')"
>
<el-select
v-model="searchData.SubIdentificationEnum"
clearable
placeholder=""
style="width: 100px"
>
<el-option
v-for="item in $d.SubIdentification"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('dictionary:file:search:isEnable')">
<el-select
v-model="searchData.IsEnable"
clearable
placeholder=""
style="width: 100px"
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('dictionary:file:search:isConfirmRecord')">
<el-select
v-model="searchData.IsConfirmRecord"
clearable
placeholder=""
style="width: 100px"
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="handleSearch"
>
{{ $t('common:button:search') }}
</el-button>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
<span style="margin-left: auto">
<el-button type="primary" size="mini" @click="handleAdd">
{{ $t('dictionary:browser:button:add') }}
</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="Name"
:label="$t('dictionary:file:table:Name')"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="NameCN"
:label="$t('dictionary:file:table:NameCN')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="ArchiveTypeEnum"
:label="$t('dictionary:file:table:archiveTypeEnum')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
{{ $fd('ArchiveType', scope.row.ArchiveTypeEnum) }}
</template>
</el-table-column>
<el-table-column
prop="SubIdentificationEnum"
:label="$t('dictionary:file:table:subIdentificationEnum')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
{{ $fd('SubIdentification', scope.row.SubIdentificationEnum) }}
</template>
</el-table-column>
<el-table-column
:label="$t('dictionary:file:table:IsEnable')"
prop="IsEnable"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<el-tag :type="!scope.row.IsEnable ? 'info' : ''">
{{ $fd('YesOrNo', scope.row.IsEnable) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
:label="$t('dictionary:file:table:isConfirmRecord')"
prop="IsConfirmRecord"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<el-tag :type="!scope.row.IsEnable ? 'info' : ''">
{{ $fd('YesOrNo', scope.row.IsConfirmRecord) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="CreateTime"
:label="$t('dictionary:file:table:createTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="UpdateTime"
:label="$t('dictionary:file:table:updateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('dictionary:file:table:action')"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.row)">
{{ $t('dictionary:file:button:edit') }}
</el-button>
<el-button
type="text"
@click="handleDelete(scope.row)"
v-if="hasPermi(['dictionary:template:file:del'])"
>
{{ $t('dictionary:file:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<File-form
:config="config"
:data="rowData"
v-if="config.visible"
@close="close"
@getList="getList"
/>
</box-content>
</BoxContent>
</template>
<script>
import { getSysFileTypeList, deleteSysFileType } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent'
import Pagination from '@/components/Pagination'
import FileForm from './fileForm'
const searchDataDefault = () => {
return {
ArchiveTypeEnum: null,
IsConfirmRecord: null,
IsEnable: null,
Name: null,
NameCN: null,
SubIdentificationEnum: null,
PageIndex: 1,
PageSize: 20,
asc: false,
sortField: 'CreateTime',
}
}
export default {
name: 'fileRecord',
components: { Pagination, FileForm, BoxContent },
data() {
return {
searchData: searchDataDefault(),
loading: false,
list: [],
total: 0,
rowData: {},
config: {
visible: false,
showClose: true,
width: '400px',
title: '',
appendToBody: true,
status: 'add',
},
}
},
created() {
this.getList()
},
methods: {
async getList() {
try {
this.loading = true
let res = await getSysFileTypeList(this.searchData)
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
handleAdd() {
this.rowData = {}
this.config.title = this.$t('dictionary:file:form:title:add')
this.config.status = 'add'
this.config.visible = true
},
//
handleEdit(row) {
this.rowData = { ...row }
this.config.title = this.$t('dictionary:file:form:title:edit')
this.config.status = 'edit'
this.config.visible = true
},
//
handleDelete(row) {
this.$confirm(this.$t('dictionary:file:message:deleteMessage'), {
type: 'warning',
distinguishCancelAndClose: true,
})
.then(() => {
deleteSysFileType(row.Id).then((res) => {
if (res.IsSuccess) {
this.getList()
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
}
})
})
.catch((err) => {
console.log(err)
})
},
//
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.config.visible = false
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -6,52 +6,84 @@
<qc-questions v-if="activeTab == 'qc'" />
</el-tab-pane>
<!-- 阅片标准配置 -->
<el-tab-pane :label="$t('dictionary:template:tab:criterionsConfig')" name="criterions">
<el-tab-pane
:label="$t('dictionary:template:tab:criterionsConfig')"
name="criterions"
>
<criterions-tmp v-if="activeTab == 'criterions'" />
</el-tab-pane>
<!-- 临床数据配置 -->
<el-tab-pane :label="$t('dictionary:template:tab:clinicalDataConfig')" name="clinicalData">
<el-tab-pane
:label="$t('dictionary:template:tab:clinicalDataConfig')"
name="clinicalData"
>
<clinical-data v-if="activeTab == 'clinicalData'" />
</el-tab-pane>
<!-- 医学审核问题配置 -->
<el-tab-pane :label="$t('dictionary:template:tab:medicalConfig')" name="medicalAudit">
<el-tab-pane
:label="$t('dictionary:template:tab:medicalConfig')"
name="medicalAudit"
>
<medical-audit v-if="activeTab == 'medicalAudit'" />
</el-tab-pane>
<!-- DICOM字段匿名化配置 -->
<el-tab-pane :label="$t('dictionary:template:tab:dicomTagConfig')" name="anonymization">
<el-tab-pane
:label="$t('dictionary:template:tab:dicomTagConfig')"
name="anonymization"
>
<Anonymization v-if="activeTab == 'anonymization'" />
</el-tab-pane>
<!-- DICOM字段新增配置 -->
<el-tab-pane :label="$t('dictionary:template:tab:dicomTagAddConfig')" name="increasefields">
<el-tab-pane
:label="$t('dictionary:template:tab:dicomTagAddConfig')"
name="increasefields"
>
<IncreaseFields v-if="activeTab == 'increasefields'" />
</el-tab-pane>
<!-- 邮件管理 -->
<el-tab-pane :label="$t('dictionary:template:tab:emailConfig')" name="email">
<el-tab-pane
:label="$t('dictionary:template:tab:emailConfig')"
name="email"
>
<Email v-if="activeTab == 'email'" />
</el-tab-pane>
<!-- 签名管理 -->
<el-tab-pane :label="$t('dictionary:template:tab:signConfig')" name="sign">
<el-tab-pane
:label="$t('dictionary:template:tab:signConfig')"
name="sign"
>
<Sign v-if="activeTab == 'sign'" />
</el-tab-pane>
<!-- 浏览器推荐 -->
<el-tab-pane :label="$t('dictionary:template:tab:browserConfig')" name="browser">
<el-tab-pane
:label="$t('dictionary:template:tab:browserConfig')"
name="browser"
>
<Browser v-if="activeTab == 'browser'" />
</el-tab-pane>
<!-- 文件记录 -->
<el-tab-pane
:label="$t('dictionary:template:tab:fileConfig')"
name="file"
>
<File v-if="activeTab == 'file'" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import QcQuestions from "./components/QcQuestions.vue";
import CriterionsTmp from "./components/CriterionsTmp";
import ClinicalData from "./components/ClinicalDataConfig";
import MedicalAudit from "./components/MedicalAudit";
import Anonymization from "./components/Anonymization";
import IncreaseFields from "./components/IncreaseFields";
import Email from "./email/index.vue";
import Sign from "./sign/index.vue";
import Browser from "./browser/index.vue";
import QcQuestions from './components/QcQuestions.vue'
import CriterionsTmp from './components/CriterionsTmp'
import ClinicalData from './components/ClinicalDataConfig'
import MedicalAudit from './components/MedicalAudit'
import Anonymization from './components/Anonymization'
import IncreaseFields from './components/IncreaseFields'
import Email from './email/index.vue'
import Sign from './sign/index.vue'
import Browser from './browser/index.vue'
import File from './file/index.vue'
export default {
name: "Questions",
name: 'Questions',
components: {
QcQuestions,
CriterionsTmp,
@ -62,25 +94,26 @@ export default {
Sign,
MedicalAudit,
Browser,
File,
},
data() {
return {
activeTab: "qc",
};
activeTab: 'qc',
}
},
mounted() {
if (this.$route.query.tabActive) {
this.activeTab = this.$route.query.tabActive;
this.activeTab = this.$route.query.tabActive
} else {
this.activeTab = "qc";
this.activeTab = 'qc'
}
},
methods: {
clickTab(tab, event) {
this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` });
this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` })
},
},
};
}
</script>
<style lang="scss">
.question-wrapper {

View File

@ -29,7 +29,18 @@
>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:role:form:IsEnable')" prop="IsEnable">
<el-switch
v-model="form.IsEnable"
active-color="#13ce66"
inactive-color="#dcdfe6"
:active-value="true"
:inactive-value="false"
:active-text="$fd('IsEnable', true)"
:inactive-text="$fd('IsEnable', false)"
>
</el-switch>
</el-form-item>
<el-form-item label="Group: " prop="UserTypeGroupIdList">
<el-select v-model="form.UserTypeGroupIdList" multiple>
<el-option
@ -69,18 +80,18 @@
<el-checkbox
v-model="menuExpand"
@change="handleCheckedTreeExpand($event)"
>{{ $t("system:role:form:checkbox:menuExpand") }}</el-checkbox
>{{ $t('system:role:form:checkbox:menuExpand') }}</el-checkbox
>
<el-checkbox
v-model="menuNodeAll"
@change="handleCheckedTreeNodeAll($event)"
>{{ $t("system:role:form:checkbox:menuNodeAll") }}</el-checkbox
>{{ $t('system:role:form:checkbox:menuNodeAll') }}</el-checkbox
>
<el-checkbox
v-model="form.menuCheckStrictly"
@change="handleCheckedTreeConnect($event)"
>{{
$t("system:role:form:checkbox:menuCheckStrictly")
$t('system:role:form:checkbox:menuCheckStrictly')
}}</el-checkbox
>
<el-tree
@ -116,30 +127,31 @@
</base-model>
</template>
<script>
import { addOrUpdateUserType } from "@/api/admin";
import { addOrUpdateUserType } from '@/api/admin'
// import { addOrUpdateUserType } from '@/api/system/role'
// import { getMenuList } from '@/api/system/menu'
import { getMenuList } from "@/api/system/menu";
import { model_cfg } from "../role";
import BaseModel from "@/components/BaseModel";
import { getMenuList } from '@/api/system/menu'
import { model_cfg } from '../role'
import BaseModel from '@/components/BaseModel'
export default {
components: { BaseModel },
dicts: ["UserTypeGroup"],
dicts: ['UserTypeGroup'],
props: {
data: {
type: Object,
default() {
return {
Id: "",
UserTypeName: "",
Id: '',
UserTypeName: '',
IsInternal: true,
UserTypeShortName: "",
Order: "",
Description: "",
PermissionStr: "",
UserTypeShortName: '',
Order: '',
Description: '',
PermissionStr: '',
UserTypeEnum: null,
};
IsEnable: true,
}
},
},
},
@ -148,136 +160,137 @@ export default {
menuExpand: false,
menuNodeAll: false,
userTypeGroupOptions: [
{ value: 1, label: "Trial" },
{ value: 2, label: "Reviewer" },
{ value: 3, label: "Other" },
{ value: 1, label: 'Trial' },
{ value: 2, label: 'Reviewer' },
{ value: 3, label: 'Other' },
],
model_cfg,
defaultProps: {
children: "Children",
label: "MenuName",
children: 'Children',
label: 'MenuName',
},
form: {
Id: "",
UserType: "",
Id: '',
UserType: '',
IsInternal: true,
UserTypeShortName: "",
UserTypeShortName: '',
Type: null,
Description: "",
Description: '',
UserTypeGroupIdList: [],
menuCheckStrictly: true,
IsEnable: true,
},
rules: {
UserTypeName: [
{ required: true, message: "Please specify", trigger: "blur" },
{ required: true, message: 'Please specify', trigger: 'blur' },
{
max: 50,
message: "The maximum length is 50",
message: 'The maximum length is 50',
},
],
UserTypeShortName: [
{ required: true, message: "Please specify", trigger: "blur" },
{ required: true, message: 'Please specify', trigger: 'blur' },
{
max: 50,
message: "The maximum length is 50",
trigger: "blur",
message: 'The maximum length is 50',
trigger: 'blur',
},
],
Description: [{ max: 500, message: "The maximum length is 500" }],
Description: [{ max: 500, message: 'The maximum length is 500' }],
UserTypeGroupIdList: [
{ required: true, message: "Please specify", trigger: "blur" },
{ required: true, message: 'Please specify', trigger: 'blur' },
],
UserTypeEnum: [
{ required: true, message: "Please select", trigger: "blur" },
{ required: true, message: 'Please select', trigger: 'blur' },
],
},
menuOptions: [],
btnLoading: false,
};
}
},
mounted() {
this.getMenuList();
this.getMenuList()
if (Object.keys(this.data).length && this.data.Id) {
this.form = { ...this.data };
this.form = { ...this.data }
}
},
methods: {
handleCheckedTreeConnect(value) {
this.form.menuCheckStrictly = !!value;
this.form.menuCheckStrictly = !!value
},
getMenuAllCheckedKeys() {
//
const checkedKeys = this.$refs.menu.getCheckedKeys();
const checkedKeys = this.$refs.menu.getCheckedKeys()
//
const halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
const halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys()
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
return checkedKeys
},
handleCheckedTreeExpand(value) {
const treeList = this.menuOptions;
const treeList = this.menuOptions
for (let i = 0; i < treeList.length; i++) {
this.$refs.menu.store.nodesMap[treeList[i].MenuId].expanded = value;
this.$refs.menu.store.nodesMap[treeList[i].MenuId].expanded = value
}
},
handleCheckedTreeNodeAll(value, type) {
this.$refs.menu.setCheckedNodes(value ? this.menuOptions : []);
this.$refs.menu.setCheckedNodes(value ? this.menuOptions : [])
},
toTree(arr, ParentId) {
function loop(ParentId) {
const res = [];
const res = []
for (let i = 0; i < arr.length; i++) {
const item = arr[i];
item.hasChildren = false;
const item = arr[i]
item.hasChildren = false
if (item.ParentId !== ParentId) {
continue;
continue
}
item.Children = loop(item.MenuId);
res.push(item);
item.Children = loop(item.MenuId)
res.push(item)
}
return res;
return res
}
return loop(ParentId);
return loop(ParentId)
},
getMenuList() {
getMenuList({})
.then((res) => {
const menu = this.toTree(
res.Result,
"00000000-0000-0000-0000-000000000000"
);
this.menuOptions = menu;
console.log(this.menuOptions);
'00000000-0000-0000-0000-000000000000'
)
this.menuOptions = menu
console.log(this.menuOptions)
this.$nextTick(() => {
this.form.MenuIds.forEach((v) => {
this.$refs.menu.setChecked(v, true, false);
});
});
this.$refs.menu.setChecked(v, true, false)
})
})
})
.catch(function () {});
.catch(function () {})
},
handleSave() {
this.$refs.roleForm.validate((valid) => {
if (!valid) return;
this.btnLoading = true;
this.model_cfg.showClose = false;
this.form.MenuIds = this.getMenuAllCheckedKeys();
console.log(this.form.MenuIds);
if (!valid) return
this.btnLoading = true
this.model_cfg.showClose = false
this.form.MenuIds = this.getMenuAllCheckedKeys()
console.log(this.form.MenuIds)
addOrUpdateUserType(this.form)
.then((res) => {
this.btnLoading = false;
this.$refs["roleForm"].resetFields();
this.$emit("close");
this.model_cfg.showClose = true;
this.$message.success("Saved successfully!");
this.btnLoading = false
this.$refs['roleForm'].resetFields()
this.$emit('close')
this.model_cfg.showClose = true
this.$message.success('Saved successfully!')
})
.catch(() => {
this.btnLoading = false;
this.model_cfg.showClose = true;
});
});
this.btnLoading = false
this.model_cfg.showClose = true
})
})
},
},
};
}
</script>

View File

@ -21,26 +21,92 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">{{ $t('common:button:search') }}</el-button>
<el-button v-hasPermi="['system:role:add']" type="primary" icon="el-icon-plus" size="mini" @click="handleAddRole">{{ $t('common:button:add') }}</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="getList"
>{{ $t('common:button:search') }}</el-button
>
<el-button
v-hasPermi="['system:role:add']"
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAddRole"
>{{ $t('common:button:add') }}</el-button
>
</el-form-item>
</el-form>
<el-table v-loading="loading" v-adaptive="{bottomOffset:30}" size="small" height="100" :data="list" class="table">
<el-table
v-loading="loading"
v-adaptive="{ bottomOffset: 30 }"
size="small"
height="100"
:data="list"
class="table"
>
<el-table-column type="index" width="50" />
<el-table-column :label="$t('system:role:table:User Type')" prop="UserTypeName" min-width="220" show-overflow-tooltip />
<el-table-column :label="$t('system:role:table:Shortname')" prop="UserTypeShortName" min-width="120" show-overflow-tooltip />
<el-table-column :label="$t('system:role:table:Group')" prop="Note" min-width="80" show-overflow-tooltip>
<el-table-column
:label="$t('system:role:table:User Type')"
prop="UserTypeName"
min-width="220"
show-overflow-tooltip
/>
<el-table-column
:label="$t('system:role:table:Shortname')"
prop="UserTypeShortName"
min-width="120"
show-overflow-tooltip
/>
<el-table-column
:label="$t('system:role:table:Group')"
prop="Note"
min-width="80"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.UserTypeGroupList.map(v => {return v.GroupName}).toString() }}
{{
scope.row.UserTypeGroupList.map((v) => {
return v.GroupName
}).toString()
}}
</template>
</el-table-column>
<el-table-column :label="$t('system:role:table:PermissionStr')" prop="PermissionStr" min-width="100" show-overflow-tooltip />
<el-table-column :label="$t('system:role:table:User Type Enum')" prop="UserTypeEnum" min-width="100" show-overflow-tooltip>
<el-table-column
:label="$t('system:role:table:PermissionStr')"
prop="PermissionStr"
min-width="100"
show-overflow-tooltip
/>
<el-table-column
:label="$t('system:role:table:User Type Enum')"
prop="UserTypeEnum"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('UserType',scope.row.UserTypeEnum) }}
{{ $fd('UserType', scope.row.UserTypeEnum) }}
</template>
</el-table-column>
<el-table-column :label="$t('system:role:table:Description')" prop="Description" min-width="220" show-overflow-tooltip />
<el-table-column
:label="$t('system:role:table:IsEnable')"
prop="IsEnable"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag :type="!scope.row.IsEnable ? 'info' : ''">
{{ $fd('IsEnable', scope.row.IsEnable) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
:label="$t('system:role:table:Description')"
prop="Description"
min-width="220"
show-overflow-tooltip
/>
<el-table-column :label="$t('common:action:action')" width="280">
<template slot-scope="scope">
<el-button
@ -49,14 +115,16 @@
type="text"
icon="el-icon-edit"
@click="handleEditRole(scope.row)"
>{{ $t('common:button:edit') }}</el-button>
>{{ $t('common:button:edit') }}</el-button
>
<el-button
v-hasPermi="['system:role:delete']"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDeleteRole(scope.row)"
>{{ $t('common:button:delete') }}</el-button>
>{{ $t('common:button:delete') }}</el-button
>
</template>
</el-table-column>
</el-table>
@ -87,36 +155,36 @@ export default {
treeData: [],
defaultProps: {
label: 'MenuName',
children: 'Children'
children: 'Children',
},
//
queryParams: {
GroupId: undefined,
SearchFilter: undefined
SearchFilter: undefined,
},
dialogVisible: false,
editRow: {},
expandedKeys: [],
treeLoading: false,
funcListLoading: false,
funcList: []
funcList: [],
}
},
mounted() {
this.getList()
},
methods: {
getDictionary() {
},
getDictionary() {},
getList() {
this.loading = true
getUserTypeRoleList(this.queryParams).then((res) => {
this.loading = false
this.list = res.Result
}).catch(() => {
this.loading = false
})
getUserTypeRoleList(this.queryParams)
.then((res) => {
this.loading = false
this.list = res.Result
})
.catch(() => {
this.loading = false
})
},
handleAddRole() {
this.editRow = {}
@ -139,11 +207,13 @@ export default {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true,
}).then(() => {
deleteUserTypeRole(row.Id).then((res) => {
if (res.IsSuccess) {
this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1)
this.list.splice(
this.list.findIndex((item) => item.Id === row.Id),
1
)
this.$message.success(this.$t('common:message:deletedSuccessfully'))
}
})
@ -152,8 +222,8 @@ export default {
closeModal() {
this.model_cfg.visible = false
this.getList()
}
}
},
},
}
</script>
<style lang="scss">
@ -188,7 +258,7 @@ export default {
overflow-y: auto;
border-right: 1px solid #ccc;
}
.selected-row{
.selected-row {
background-color: cadetblue;
}
}

View File

@ -0,0 +1,351 @@
<template>
<box-content>
<div class="title">
{{ $t('system:retrospect:title:userFrom') }}
</div>
<div class="userFrom">
<el-form size="mini" class="base-search-form">
<el-form-item :label="$t('system:retrospect:form:createType')">
<span>{{ $fd('UserCeateSource', otherInfo.UserCeateSource) }}</span>
</el-form-item>
<el-form-item :label="$t('system:retrospect:form:createTime')">
<span>{{ otherInfo.CreateTime }}</span>
</el-form-item>
<el-form-item :label="$t('system:retrospect:form:createTrial')">
<span>{{
otherInfo.ResearchProgramNo || otherInfo.ExperimentName
? `${otherInfo.ResearchProgramNo}, ${otherInfo.ExperimentName} `
: $t('common:title:none')
}}</span>
</el-form-item>
</el-form>
</div>
<div class="title">
{{ $t('system:retrospect:title:joinTrial') }}
</div>
<!-- 搜索框 -->
<div class="search">
<el-form :inline="true" size="mini" class="base-search-form">
<el-form-item :label="$t('system:retrospect:search:TrialCode')">
<el-input
v-model="searchData.TrialCode"
style="width: 100px"
clearable
/>
</el-form-item>
<el-form-item :label="$t('system:retrospect:search:ResearchProgramNo')">
<el-input
v-model="searchData.ResearchProgramNo"
style="width: 100px"
clearable
/>
</el-form-item>
<el-form-item :label="$t('system:retrospect:search:ExperimentName')">
<el-input
v-model="searchData.ExperimentName"
style="width: 100px"
clearable
/>
</el-form-item>
<el-form-item :label="$t('system:retrospect:search:UserTypeId')">
<el-select
v-model="searchData.UserTypeId"
style="width: 100px"
placeholder=""
>
<template v-for="userType of userTypeOptions">
<el-option
v-if="![4, 6, 20].includes(userType.UserTypeEnum)"
:key="userType.Id"
:label="userType.UserType"
:value="userType.Id"
/>
</template>
</el-select>
</el-form-item>
<el-form-item :label="$t('system:retrospect:search:IsDeleted')">
<el-select
v-model="searchData.IsDeleted"
style="width: 100px"
placeholder=""
>
<el-option
v-for="item of $d.IsUserExitTrial"
:key="item.Id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
</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="TrialCode"
:label="$t('system:retrospect:table:TrialCode')"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="ResearchProgramNo"
:label="$t('system:retrospect:table:ResearchProgramNo')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="ExperimentName"
:label="$t('system:retrospect:table:ExperimentName')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="TrialStatusStr"
:label="$t('system:retrospect:table:TrialStatusStr')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<el-tag
v-if="scope.row.TrialStatusStr === 'Initializing'"
type="info"
>{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag
>
<el-tag
v-if="scope.row.TrialStatusStr === 'Ongoing'"
type="primary"
>{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag
>
<el-tag
v-if="scope.row.TrialStatusStr === 'Completed'"
type="warning"
>{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag
>
<el-tag v-if="scope.row.TrialStatusStr === 'Stopped'" type="danger">{{
$fd('TrialStatusEnum', scope.row.TrialStatusStr)
}}</el-tag>
</template></el-table-column
>
<el-table-column
prop="TrialCreateTime"
:label="$t('system:retrospect:table:TrialCreateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="TrialUserRoleList"
:label="$t('system:retrospect:table:TrialUserRoleList')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<el-tooltip
class="item"
effect="dark"
:content="$t('trials:staff:tip:userTypeDisabled')"
placement="top"
style="margin-right: 2px"
v-if="
scope.row.TrialUserRoleList.some(
(item) => item.IsDeleted || item.IsUserRoleDisabled
)
"
>
<i class="el-icon-warning icon-i"></i>
</el-tooltip>
<span>{{
scope.row.TrialUserRoleList.map(
(item) => item.UserTypeShortName
).join(', ')
}}</span>
</template>
</el-table-column>
<el-table-column
prop="IsDeleted"
:label="$t('system:retrospect:table:IsDeleted')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<el-tag :type="scope.row.IsDeleted ? 'info' : ''">
{{ $fd('IsUserExitTrial', scope.row.IsDeleted) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="JoinTime"
:label="$t('system:retrospect:table:JoinTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="RemoveTime"
:label="$t('system:retrospect:table:RemoveTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('common:action:action')"
width="200"
fixed="right"
>
<!-- <template slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.row)">
{{ $t('dictionary:browser:button:edit') }}
</el-button>
<el-button type="text" @click="handleDelete(scope.row)">
{{ $t('dictionary:browser:button:delete') }}
</el-button>
</template> -->
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</box-content>
</template>
<script>
import {
getUserJoinedTrialList,
getUserTypeListByUserType,
} from '@/api/admin.js'
import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent'
const searchDataDefault = () => {
return {
TrialCode: null,
ResearchProgramNo: null,
ExperimentName: null,
UserTypeId: null,
IsDeleted: null,
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: null,
}
}
export default {
components: { BoxContent, Pagination },
props: {
userId: { type: String, default: '' },
},
data() {
return {
searchData: searchDataDefault(),
loading: false,
otherInfo: {
CreateTime: null,
ExperimentName: null,
ResearchProgramNo: null,
TrialCode: null,
UserCeateSource: null,
},
list: [],
total: 0,
userTypeOptions: [],
}
},
mounted() {
this.getUserTypeList()
this.getList()
},
methods: {
getUserTypeList() {
getUserTypeListByUserType(0).then((res) => {
if (res.IsSuccess) {
this.userTypeOptions = []
res.Result.forEach((item) => {
if (item.UserTypeEnum !== 21) {
this.userTypeOptions.push(item)
}
})
}
})
},
async getList() {
try {
if (!this.userId) return false
this.searchData.IdentityUserId = this.userId
this.loading = true
let res = await getUserJoinedTrialList(this.searchData)
if (res.IsSuccess) {
this.loading = false
res.OtherInfo = res.OtherInfo ? res.OtherInfo : {}
Object.keys(this.otherInfo).forEach((key) => {
this.otherInfo[key] = res.OtherInfo[key]
})
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}
} catch (err) {
console.log(err)
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()
},
},
}
</script>
<style lang="scss" scoped>
.title {
font-weight: bold;
margin-bottom: 10px;
}
.userFrom {
padding-left: 20px;
margin-bottom: 10px;
}
.icon-i {
color: #e6a23c;
cursor: pointer;
}
</style>

View File

@ -7,23 +7,31 @@
<el-tab-pane :label="$t('system:userlist:tab:Password')" name="account">
<Account v-if="load.account" :user-id="userId" />
</el-tab-pane>
<el-tab-pane
:label="$t('system:userlist:tab:retrospect')"
name="retrospect"
>
<Retrospect v-if="load.retrospect" :user-id="userId" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import UserInfo from '../components/UserInfo'
import Account from '../components/Account'
import Retrospect from '../components/Retrospect'
export default {
name: 'EditUser',
components: { UserInfo, Account },
components: { UserInfo, Account,Retrospect },
data() {
return {
activeTab: 'user',
userId: '',
load: {
role: false,
account: false
}
account: false,
retrospect: false,
},
}
},
created() {
@ -34,7 +42,7 @@ export default {
if (this.load[tab.name] === false) {
this.load[tab.name] = true
}
}
}
},
},
}
</script>

View File

@ -55,9 +55,9 @@
{{
Array.isArray(scope.row.UserRoleList) &&
scope.row.UserRoleList.length > 0
? scope.row.UserRoleList.map((item) => item.UserTypeShortName).join(
', '
)
? scope.row.UserRoleList.filter((item) => !item.IsUserRoleDisabled)
.map((item) => item.UserTypeShortName)
.join(', ')
: ''
}}
</template>
@ -396,13 +396,13 @@ export default {
label: this.$t('common:button:search'),
type: 'primary',
emitKey: 'search',
icon: 'el-icon-search'
icon: 'el-icon-search',
},
{
label: this.$t('common:button:reset'),
type: 'primary',
emitKey: 'reset',
icon: 'el-icon-refresh-left'
icon: 'el-icon-refresh-left',
},
{
label: this.$t('common:button:new'),