Compare commits

...

2 Commits

Author SHA1 Message Date
wangxiaoshuang 15adb3611a mRecist功能添加
continuous-integration/drone/push Build is passing Details
2025-08-20 16:39:11 +08:00
wangxiaoshuang 216182f48e 后台管理可以添加课题组 2025-08-20 16:38:23 +08:00
17 changed files with 1319 additions and 624 deletions

View File

@ -279,6 +279,14 @@ export function batchAddInternationalization(param) {
data: param data: param
}) })
} }
// 管理端修改用户角色
export function updateUserRoleInfo(data) {
return request({
url: `/User/updateUserRoleInfo`,
method: 'put',
data
})
}
// 获取医院列表 // 获取医院列表
export function getHIRHospitalList(param) { export function getHIRHospitalList(param) {
return request({ return request({
@ -310,4 +318,42 @@ export function updateDefaultHospital(params) {
params params
}) })
} }
// 获取课题组列表-不分页
export function getHospitalGroupList(data) {
return request({
url: `/HospitalGroup/getHospitalGroupList`,
method: 'post',
data
})
}
// 获取课题组列表-分页
export function getHospitalGroupPageList(data) {
return request({
url: `/HospitalGroup/getHospitalGroupPageList`,
method: 'post',
data
})
}
// 新增或编辑课题组
export function addOrUpdateHospitalGroup(data) {
return request({
url: `/HospitalGroup/addOrUpdateHospitalGroup`,
method: 'post',
data
})
}
// 删除课题组
export function deleteHospitalGroup(id) {
return request({
url: `/HospitalGroup/deleteHospitalGroup/${id}`,
method: 'delete'
})
}
// 删除课题组
export function getGAUserList() {
return request({
url: `/HospitalGroup/getGAUserList`,
method: 'get'
})
}

View File

@ -106,7 +106,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log('自定义上传组件', this) // console.log('', this)
}, },
data() { data() {
return { return {

View File

@ -248,6 +248,20 @@ async function VueInit() {
}() }()
_vm.$forceUpdate() _vm.$forceUpdate()
} }
Vue.prototype.$reg = () => {
// if (localStorage.getItem('CompanyInfo')) {
// let { EmailRegexStr } = JSON.parse(localStorage.getItem('CompanyInfo'))
// if (EmailRegexStr) {
// return { EmailRegexStr }
// }
// } else if (Vue.prototype.$companyInfo) {
// let { EmailRegexStr } = Vue.prototype.$companyInfo
// if (EmailRegexStr) {
// return { EmailRegexStr }
// }
// }
return { EmailRegexStr: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$' };
}
Vue.prototype.$path = [] Vue.prototype.$path = []
var t = function (key) { var t = function (key) {
// if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) { // if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) {

View File

@ -221,11 +221,11 @@ export const constantRoutes = [
hidden: true, hidden: true,
component: () => import('@/views/trials/trials-panel/setting/reading-unit/preview') component: () => import('@/views/trials/trials-panel/setting/reading-unit/preview')
}, },
// { {
// path: '/activate', path: '/activate',
// component: () => import('@/views/trials/trials-list/components/activate-page.vue'), component: () => import('@/views/trials/trials-list/components/activate-page.vue'),
// hidden: true hidden: true
// }, },
// { // {
// path: '/audit', // path: '/audit',
// name: 'audit', // name: 'audit',

View File

@ -3,10 +3,12 @@ const getters = {
device: state => state.app.device, device: state => state.app.device,
token: state => state.user.token, token: state => state.user.token,
name: state => state.user.name, name: state => state.user.name,
userTypeShortName: state => state.user.userTypeShortName,
permissions: state => state.user.permissions, permissions: state => state.user.permissions,
tree: state => state.user.tree, tree: state => state.user.tree,
userName: state => state.user.userName, userName: state => state.user.userName,
userId: state => state.user.userId, userId: state => state.user.userId,
identityUserId: state => state.user.identityUserId,
routes: state => state.permission.routes, routes: state => state.permission.routes,
asyncRoutes: state => state.permission.addRoutes, asyncRoutes: state => state.permission.addRoutes,
visitedViews: state => state.tagsView.visitedViews, visitedViews: state => state.tagsView.visitedViews,
@ -41,6 +43,7 @@ const getters = {
lastCanvasTaskId: state => state.reading.lastCanvasTaskId, lastCanvasTaskId: state => state.reading.lastCanvasTaskId,
imageQuality: state => state.reading.imageQuality, imageQuality: state => state.reading.imageQuality,
imageQualityIssues: state => state.reading.imageQualityIssues, imageQualityIssues: state => state.reading.imageQualityIssues,
currentLoadIns: state => state.reading.currentLoadIns,
language: state => state.lang.language, language: state => state.lang.language,
TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount, TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount,
TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount, TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount,

View File

@ -7,14 +7,17 @@ const getDefaultState = () => {
return { return {
token: getToken(), token: getToken(),
name: '', name: '',
userTypeShortName: '',
userName: '', userName: '',
userId: '', userId: '',
identityUserId: '',
avatar: '', avatar: '',
permissions: [], permissions: [],
tree: [], tree: [],
/* eslint-disable */ /* eslint-disable */
TotalNeedSignSystemDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0, TotalNeedSignSystemDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
TotalNeedSignTrialDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0, TotalNeedSignTrialDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
IsFirstSysDocNeedSign: false,
TrialStatusStr: null, TrialStatusStr: null,
isTestUser: false, isTestUser: false,
roles: [] roles: []
@ -38,6 +41,9 @@ const mutations = {
SET_NAME: (state, name) => { SET_NAME: (state, name) => {
state.name = name state.name = name
}, },
SET_USERTYPESHORTNAME: (state, userTypeShortName) => {
state.userTypeShortName = userTypeShortName
},
SET_USERNAME: (state, name) => { SET_USERNAME: (state, name) => {
state.userName = name state.userName = name
}, },
@ -53,9 +59,16 @@ const mutations = {
SET_USERID: (state, id) => { SET_USERID: (state, id) => {
state.userId = id state.userId = id
}, },
SET_IDENTITYUSERID: (state, id) => {
state.identityUserId = id
},
SET_ISTESTUSER: (state, isTestUser) => { SET_ISTESTUSER: (state, isTestUser) => {
state.isTestUser = eval(isTestUser) state.isTestUser = eval(isTestUser)
}, },
SET_IS_FIRST_SYSTEM_DOC_SIGN: (state, IsFirstSysDocNeedSign) => {
zzSessionStorage.setItem('IsFirstSysDocNeedSign', IsFirstSysDocNeedSign)
state.IsFirstSysDocNeedSign = IsFirstSysDocNeedSign
},
SET_NEED_SIGN_SYSTEM_DOC_COUNT: (state, TotalNeedSignSystemDocCount) => { SET_NEED_SIGN_SYSTEM_DOC_COUNT: (state, TotalNeedSignSystemDocCount) => {
/* eslint-disable */ /* eslint-disable */
if (eval(process.env.VUE_APP_WORD_FOR_PERMISSION) && !state.isTestUser) { if (eval(process.env.VUE_APP_WORD_FOR_PERMISSION) && !state.isTestUser) {
@ -219,6 +232,9 @@ const actions = {
setPermissions({ commit }, permissions) { setPermissions({ commit }, permissions) {
commit('SET_PERMISSIONS', permissions) commit('SET_PERMISSIONS', permissions)
}, },
setIsFirstSysDocNeedSign({ commit }, IsFirstSysDocNeedSign) {
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', IsFirstSysDocNeedSign)
},
setTotalNeedSignSystemDocCount({ commit }, TotalNeedSignSystemDocCount) { setTotalNeedSignSystemDocCount({ commit }, TotalNeedSignSystemDocCount) {
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', TotalNeedSignSystemDocCount) commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', TotalNeedSignSystemDocCount)
}, },
@ -255,7 +271,7 @@ const actions = {
return user return user
}, },
updateInfo({ commit, state }) { updateInfo({ commit, state }) {
commit('SET_NAME', zzSessionStorage.getItem('realName')) commit('SET_NAME', zzSessionStorage.getItem('Name'))
}, },
// user logout // user logout
async logout({ commit, state }) { async logout({ commit, state }) {

View File

@ -1,69 +1,78 @@
<template> <template>
<div class="hospital"> <el-tabs v-model="activeTab" style="position: relative;height: 100%;">
<el-form ref="hospitalForm" size="small" :model="hospital" :rules="hospitalFormRules" label-width="150px" <el-tab-pane name="hospital" :label="$t('system:hospital:tab:hospital')">
style="width: 800px"> <div class="hospital">
<el-card class="Basic" shadow="never" size="small"> <el-form ref="hospitalForm" size="small" :model="hospital" :rules="hospitalFormRules"
<el-form-item :label="$t('system:hospital:name')" prop="HospitalName"> label-width="150px" style="width: 800px">
<el-input v-model.trim="hospital.HospitalName" :disabled="disabled" clearable /> <el-card class="Basic" shadow="never" size="small">
</el-form-item> <el-form-item :label="$t('system:hospital:name')" prop="HospitalName">
<el-form-item :label="$t('system:hospital:code')" prop="HospitalCode"> <el-input v-model.trim="hospital.HospitalName" :disabled="disabled" clearable />
<el-input v-model.trim="hospital.HospitalCode" :disabled="disabled || hasPermi(['role:oa'])" </el-form-item>
clearable /> <el-form-item :label="$t('system:hospital:code')" prop="HospitalCode">
</el-form-item> <el-input v-model.trim="hospital.HospitalCode" :disabled="disabled || hasPermi(['role:oa'])"
clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:aliasName')" prop="HospitalAliasName"> <el-form-item :label="$t('system:hospital:aliasName')" prop="HospitalAliasName">
<el-input v-model="hospital.HospitalAliasName" :disabled="disabled" clearable /> <el-input v-model="hospital.HospitalAliasName" :disabled="disabled" clearable />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:hospital:country')" prop="Country">
<el-input v-model="hospital.Country" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:province')" prop="Province">
<el-input v-model="hospital.Province" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:city')" prop="City">
<el-input v-model="hospital.City" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:address')" prop="Address">
<el-input v-model="hospital.Address" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:phone')" prop="Phone">
<el-input v-model="hospital.Phone" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:trialKeepCount')" prop="TrialKeepCount">
<el-input v-model="hospital.TrialKeepCount" :disabled="disabled || hasPermi(['role:oa'])"
type="number" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:isCanConnectInternet')"
v-hasPermi="['system:hospital:connectInternet']">
<el-switch v-model="hospital.IsCanConnectInternet" active-color="#13ce66"
inactive-color="#ff4949" active-text="是" inactive-text="否" :disabled="disabled">
</el-switch>
</el-form-item>
<el-form-item :label="$t('system:hospital:logo')" prop="HospitalLogoPath">
<upload-logo :path.sync="hospital.HospitalLogoPath" :disabled="disabled" />
</el-form-item>
</el-card>
<el-form-item v-if="status === 'default' && hasPermi(['system:hospital:edit'])">
<el-button type="primary" size="small" style="margin: 10px 15px" :loading="btnLoading"
:disabled="btnLoading" @click="handleSave">{{ $t("system:hospital:save") }}</el-button>
</el-form-item>
</el-form>
<div class="btnBox" v-if="status !== 'default'">
<el-button type="primary" size="small" style="margin: 10px 15px" :loading="btnLoading"
:disabled="btnLoading" @click="handleSave">{{ $t("system:hospital:save") }}</el-button>
<el-button type="primary" size="small" style="margin: 10px 15px" @click="handleCancel">{{
$t("common:button:cancel") }}</el-button>
</div>
</div>
</el-tab-pane>
<el-tab-pane name="group" :label="$t('system:hospital:tab:group')">
<group-list v-if="activeTab === 'group'" />
</el-tab-pane>
</el-tabs>
<el-form-item :label="$t('system:hospital:country')" prop="Country">
<el-input v-model="hospital.Country" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:province')" prop="Province">
<el-input v-model="hospital.Province" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:city')" prop="City">
<el-input v-model="hospital.City" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:address')" prop="Address">
<el-input v-model="hospital.Address" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:phone')" prop="Phone">
<el-input v-model="hospital.Phone" :disabled="disabled" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:trialKeepCount')" prop="TrialKeepCount">
<el-input v-model="hospital.TrialKeepCount" :disabled="disabled || hasPermi(['role:oa'])"
type="number" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:isCanConnectInternet')"
v-hasPermi="['system:hospital:connectInternet']">
<el-switch v-model="hospital.IsCanConnectInternet" active-color="#13ce66" inactive-color="#ff4949"
active-text="是" inactive-text="否" :disabled="disabled">
</el-switch>
</el-form-item>
<el-form-item :label="$t('system:hospital:logo')" prop="HospitalLogoPath">
<upload-logo :path.sync="hospital.HospitalLogoPath" :disabled="disabled" />
</el-form-item>
</el-card>
<el-form-item v-if="status === 'default' && hasPermi(['system:hospital:edit'])">
<el-button type="primary" size="small" style="margin: 10px 15px" :loading="btnLoading"
:disabled="btnLoading" @click="handleSave">{{ $t("system:hospital:save") }}</el-button>
</el-form-item>
</el-form>
<div class="btnBox" v-if="status !== 'default'">
<el-button type="primary" size="small" style="margin: 10px 15px" :loading="btnLoading"
:disabled="btnLoading" @click="handleSave">{{ $t("system:hospital:save") }}</el-button>
<el-button type="primary" size="small" style="margin: 10px 15px" @click="handleCancel">{{
$t("common:button:cancel") }}</el-button>
</div>
</div>
</template> </template>
<script> <script>
import { getHospital } from "@/api/hospital.js"; import { getHospital } from "@/api/hospital.js";
import { addOrUpdateHIRHospital } from '@/api/admin' import { addOrUpdateHIRHospital } from '@/api/admin'
import uploadLogo from "./uploadLogo.vue"; import uploadLogo from "./uploadLogo.vue";
import groupList from "./groupList.vue";
export default { export default {
name: "systemHospital", name: "systemHospital",
components: { "upload-logo": uploadLogo }, components: { "upload-logo": uploadLogo, groupList },
props: { props: {
status: { status: {
type: String, type: String,
@ -78,6 +87,7 @@ export default {
}, },
data() { data() {
return { return {
activeTab: 'hospital',
hospital: { hospital: {
HospitalName: null, HospitalName: null,
HospitalAliasName: null, HospitalAliasName: null,
@ -140,6 +150,11 @@ export default {
}, },
}, },
methods: { methods: {
clickTab(tab, event) {
this.activeTab = tab
console.log(this.activeTab)
// this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` });
},
async handleSave() { async handleSave() {
if (this.btnLoading) return; if (this.btnLoading) return;
try { try {
@ -184,6 +199,24 @@ export default {
margin-bottom: 40px; margin-bottom: 40px;
} }
::v-deep .el-tabs__header {
position: absolute;
top: 0;
left: 0;
z-index: 999;
width: 100%;
}
::v-deep .el-tabs__content {
padding-top: 50px;
height: 100%;
}
::v-deep .el-tab-pane {
height: 100%;
}
.hospital { .hospital {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@ -0,0 +1,289 @@
<template>
<div class="groupList">
<div ref="leftContainer" class="left">
<el-form :inline="true">
<el-form-item :label="$t('system:hospital:group:Code')" prop="Code">
<el-input v-model="searchData.Code" size="small" clearable style="width:100px" />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:Name')" prop="Name">
<el-input v-model="searchData.Name" size="small" clearable style="width:100px" />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:Affiliation')" prop="Affiliation">
<el-input v-model="searchData.Affiliation" size="small" clearable style="width:100px" />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:ContactName')" prop="ContactName">
<el-input v-model="searchData.ContactName" size="small" clearable style="width:100px" />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:ContactPhone')" prop="ContactPhone">
<el-input v-model="searchData.ContactPhone" size="small" clearable style="width:100px" />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:State')" prop="IsEnable">
<el-select v-model="searchData.IsEnable" size="small" clearable style="width:100px">
<el-option v-for="item in $d.IsEnable" :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" size="mini" @click="getList">
查询
</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">
新增
</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 65 }" height="100" :data="list" class="table"
@sort-change="handleSortByColumn" :default-sort="{ prop: 'CreateTime', order: 'descending' }">
<el-table-column type="index" width="50" />
<el-table-column :label="$t('system:hospital:group:Code')" prop="Code" min-width="80"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('system:hospital:group:Name')" prop="Name" min-width="120"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('system:hospital:group:Affiliation')" prop="Affiliation" min-width="120"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('system:hospital:group:ContactName')" prop="ContactName" min-width="120"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('system:hospital:group:ContactPhone')" prop="ContactPhone" min-width="120"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('system:hospital:group:IdentityUserIdList')" prop="IdentityUserIdList"
min-width="80" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<span>{{scope.row.GAUserList && scope.row.GAUserList.length > 0
? scope.row.GAUserList.map(item => item.UserName).join(", ") : ''}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('system:hospital:group:State')" prop="IsEnable" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="!scope.row.IsEnable ? 'danger' : ''">
<span>{{ $fd("IsEnable", scope.row.IsEnable) }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('system:hospital:table:createTime')" prop="CreateTime" min-width="150"
sortable="custom" show-overflow-tooltip />
<el-table-column :label="$t('system:hospital:table:updateTime')" prop="UpdateTime" min-width="150"
sortable="custom" show-overflow-tooltip />
<el-table-column :label="$t('common:action:action')" fixed="right" prop="" min-width="200"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleEdit(scope.row)">
{{ $t('common:button:edit') }}
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination" style="text-align: right; margin-top: 5px">
<pagination :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</div>
</div>
<el-dialog top="3vh" :title="status === 'edit' ? '编辑' : '新增'" :visible.sync="visible" width="450px"
:append-to-body="true">
<el-form ref="hospitalGroupForm" size="small" :model="from" :rules="rules" label-width="100px">
<el-form-item :label="$t('system:hospital:group:Code')" prop="Code">
<el-input v-model.trim="from.Code" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:Name')" prop="Name">
<el-input v-model.trim="from.Name" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:Affiliation')" prop="Affiliation">
<el-input v-model="from.Affiliation" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:ContactName')" prop="ContactName">
<el-input v-model="from.ContactName" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:ContactPhone')" prop="ContactPhone">
<el-input v-model="from.ContactPhone" clearable />
</el-form-item>
<el-form-item :label="$t('system:hospital:group:IdentityUserIdList')" prop="IdentityUserIdList">
<el-select ref="userType" v-model="from.IdentityUserIdList" size="small" placeholder="Please select"
multiple style="width: 100%">
<template v-for="user of GAUserList">
<el-option :key="user.Id" :label="user.UserName" :value="user.Id" />
</template>
</el-select>
</el-form-item>
<el-form-item :label="$t('system:hospital:group:State')" prop="isEnable">
<el-switch v-model="from.isEnable" :active-value="true" :inactive-value="false" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCancel" size="small">{{ $t('common:button:cancel') }}</el-button>
<el-button type="primary" size="small" @click="handleSave" :loading="loading">{{
$t('common:button:save')
}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getHospitalGroupPageList, deleteHospitalGroup, addOrUpdateHospitalGroup, getGAUserList } from '@/api/admin'
import Pagination from '@/components/Pagination'
const searchDataDefault = () => {
return {
Name: null,
ContactPhone: null,
ContactName: null,
Code: null,
Affiliation: null,
Asc: false,
SortField: 'CreateTime',
PageIndex: 1,
PageSize: 20,
}
}
export default {
name: "groupList",
components: { Pagination },
data() {
return {
searchData: searchDataDefault(),
list: [],
total: 0,
loading: false,
visible: false,
from: {
Id: null,
Affiliation: null,
Code: null,
ContactName: null,
ContactPhone: null,
Name: null,
isEnable: true,
IdentityUserIdList: []
},
rules: {
Affiliation: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
Code: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
ContactName: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
ContactPhone: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
Name: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
IdentityUserIdList: [
{ required: true, type: 'array', message: 'Please select', trigger: 'blur' },
],
},
GAUserList: [],
status: 'add'
}
},
mounted() {
this.getList()
},
methods: {
async handleSave() {
try {
let validate = await this.$refs.hospitalGroupForm.validate()
if (!validate) return false
this.loading = true
let res = await addOrUpdateHospitalGroup(this.from)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t("common:message:savedSuccessfully"))
this.handleCancel()
this.getList()
}
} catch (err) {
console.log(err)
this.loading = false
}
},
handleCancel() {
this.visible = false
Object.keys(this.from).forEach(key => {
this.from[key] = null
})
this.from.IdentityUserIdList = []
},
async getGAUserList() {
try {
let res = await getGAUserList()
if (res.IsSuccess) {
this.GAUserList = res.Result
}
} catch (err) {
console.log(err)
}
},
getList() {
this.loading = true
getHospitalGroupPageList(this.searchData)
.then((res) => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false
})
},
handleAdd() {
this.getGAUserList()
this.status = 'add'
this.visible = true
},
handleEdit(row) {
this.getGAUserList()
this.status = 'edit'
Object.keys(this.from).forEach(key => {
this.from[key] = row[key]
})
this.visible = true
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
},
//
handleDelete(row) {
this.$confirm('是否确认删除?', {
type: 'warning',
distinguishCancelAndClose: true,
}).then(() => {
this.loading = true
deleteHospitalGroup(row.Id)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.getList()
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
}
})
.catch(() => {
this.loading = false
})
})
},
//
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></style>

View File

@ -84,10 +84,9 @@
@pagination="getList" /> @pagination="getList" />
</div> </div>
</div> </div>
<el-dialog top="3vh" :title="status === 'edit' ? '编辑' : '新增'" :visible.sync="visible" width="850px"> <el-dialog top="3vh" :title="status === 'edit' ? '编辑' : '新增'" :visible.sync="visible" :fullscreen="true">
<system-hospital v-if="visible" :status="status" :rowData="rowData" @getList="getList" @close="close" /> <system-hospital v-if="visible" :status="status" :rowData="rowData" @getList="getList" @close="close" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -134,7 +133,7 @@ export default {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}).then(async () => { }).then(async () => {
let res = await updateDefaultHospital({HirHospitalId:row.Id}) let res = await updateDefaultHospital({ HirHospitalId: row.Id })
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList() this.getList()
} }

View File

@ -2,96 +2,100 @@
<el-form ref="userForm" size="small" :model="user" :rules="userFormRules" label-width="150px" style="width: 800px"> <el-form ref="userForm" size="small" :model="user" :rules="userFormRules" label-width="150px" style="width: 800px">
<el-card class="Basic" shadow="never" size="small"> <el-card class="Basic" shadow="never" size="small">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ $t("system:userlist:title:Information") }}</span> <span>{{ $t('system:userlist:title:Information') }}</span>
</div> </div>
<el-form-item v-if="user.UserCode" :label="$t('system:userlist:table:S/N')" prop="UserCode"> <el-form-item v-if="user.UserCode" :label="$t('system:userlist:table:S/N')" prop="UserCode">
<el-input v-model="user.UserCode" disabled /> <el-input v-model="user.UserCode" disabled />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:UserName')" class="my_new_pwd" prop="UserName"> <el-form-item :label="$t('system:userlist:table:UserName')" class="my_new_pwd" prop="UserName">
<el-input v-model="user.UserName" clearable /> <el-input v-model="user.UserName" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:LastName')" prop="LastName"> <el-form-item :label="$t('system:userlist:table:LastName')" prop="LastName">
<el-input v-model="user.LastName" clearable /> <el-input v-model="user.LastName" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:FirstName')" prop="FirstName"> <el-form-item :label="$t('system:userlist:table:FirstName')" prop="FirstName">
<el-input v-model="user.FirstName" clearable /> <el-input v-model="user.FirstName" />
</el-form-item> </el-form-item>
<!-- <el-form-item
:label="$t('system:userlist:table: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('system:userlist:table:Email')" prop="EMail"> <el-form-item :label="$t('system:userlist:table:Email')" prop="EMail">
<el-input v-model="user.EMail" clearable /> <el-input v-model="user.EMail" :disabled="!!user.UserCode" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:Phone')" prop="Phone"> <el-form-item :label="$t('system:userlist:table:Phone')" prop="Phone">
<el-input v-model="user.Phone" clearable /> <el-input v-model="user.Phone" />
</el-form-item> </el-form-item>
<el-form-item v-if="type == 1" :label="$t('system:userlist:table:Disable')"> <el-form-item :label="$t('system:userlist:table:HospitalGroupIdList')"
<el-switch v-model="user.Status" :active-value="1" :inactive-value="0" /> :prop="hasPermi(['role:ga']) ? 'HospitalGroupIdList' : ''">
<div style="display: flex; align-items: center">
<el-select ref="userType" v-model="user.HospitalGroupIdList" size="small" placeholder="Please select" multiple
style="width: 100%" :disabled="user.CanEditUserType === false">
<template v-for="group of hospitalGroupList">
<el-option :key="group.Id" :label="group.Name" :value="group.Id" />
</template>
</el-select>
</div>
</el-form-item> </el-form-item>
<!-- <el-form-item label="IsTestUser:"> <el-form-item :label="$t('system:userlist:table:UserType')" prop="Roles" v-if="type === 0">
<el-switch v-model="user.IsTestUser" /> <div style="display: flex; align-items: center">
</el-form-item> --> <el-select ref="userType" v-model="user.Roles" size="small" placeholder="Please select" multiple
<el-form-item :label="$t('system:userlist:table:UserType')" prop="UserTypeId"> style="width: 100%" :disabled="user.CanEditUserType === false || type === 1" @change="handleChange">
<el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="" style="width: 100%" <template v-for="userType of userTypeOptions">
:disabled="user.CanEditUserType === false" clearable @change="userTypeChange"> <el-option :key="userType.Id" :label="userType.UserType" :value="userType.Id" />
<template v-for="(userType, key) of userTypeOptions"> </template>
<el-option :key="key" :label="userType.UserType" :value="userType.Id" /> </el-select>
</template> </div>
</el-select> </el-form-item>
<el-form-item :label="$t('system:userlist:table:UserType')" prop="userTypeId" v-else>
<div style="display: flex; align-items: center">
<el-select ref="userType" v-model="Roles" size="small" placeholder="Please select" multiple
style="width: 100%" :disabled="user.CanEditUserType === false || type === 1" @change="handleChange">
<template v-for="userType of userTypeOptions">
<el-option :key="userType.Id" :label="userType.UserType" :value="userType.Id" />
</template>
</el-select>
<el-button type="primary" size="small" style="margin-left: 5px" v-if="type === 1" @click.stop="openRoleList">
{{ $t('system:userlist:button:roles') }}
</el-button>
</div>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<span>{{ $t('system:userlist:tip:defaultPassword') }}</span> <span>{{ $t('system:userlist:tip:defaultPassword') }}</span>
</el-form-item> </el-form-item>
<!-- <el-form-item <el-form-item v-if="type == 1" :label="$t('system:userlist:table:Disable')">
:label="$t('trials:researchForm:form:checkCode')" <el-switch v-model="user.Status" :active-value="1" :inactive-value="0" />
prop="checkCode" </el-form-item>
v-if="!IsCanConnectInternet"
>
<el-input v-model="user.checkCode" type="number" />
<span style="color: red"
>请输入校验码用于用户首次登录重置密码时的校验</span
>
</el-form-item> -->
</el-card> </el-card>
<el-card class="Affiliation" shadow="never" style="margin-top: 10px" size="small"> <el-card class="Affiliation" shadow="never" style="margin-top: 10px" size="small">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ $t("system:userlist:title:Affiliation") }}</span> <span>{{ $t('system:userlist:title:Affiliation') }}</span>
</div> </div>
<el-form-item prop="IsZhiZhun"> <el-form-item prop="IsZhiZhun">
<el-radio-group v-model="user.IsZhiZhun" @change="OrgnizationTypeChanged" :disabled="IsZhiZhunDisabled"> <el-radio-group v-model="user.IsZhiZhun" @change="OrgnizationTypeChanged">
<el-radio :label="true">{{ <el-radio :label="true">{{
$t("system:userlist:title:Internal") $t('system:userlist:title:Internal')
}}</el-radio> }}</el-radio>
<el-radio :label="false">{{ <el-radio :label="false">{{
$t("system:userlist:title:External") $t('system:userlist:title:External')
}}</el-radio> }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:OrganizationName')"> <el-form-item v-show="user.IsZhiZhun === false" :label="$t('system:userlist:table:OrganizationName')">
<el-input v-model="user.OrganizationName" :disabled="user.IsZhiZhun === true" clearable /> <el-input v-model="user.OrganizationName" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:Department')" prop="DepartmentName"> <el-form-item :label="$t('system:userlist:table:Department')" prop="DepartmentName">
<el-input v-model="user.DepartmentName" clearable /> <el-input v-model="user.DepartmentName" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:userlist:table:Position')" prop="PositionName"> <el-form-item :label="$t('system:userlist:table:Position')" prop="PositionName">
<el-input v-model="user.PositionName" clearable /> <el-input v-model="user.PositionName" />
</el-form-item> </el-form-item>
</el-card> </el-card>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" :disabled="isDisabled" style="margin: 10px 15px" @click="handleSave">{{ <el-button type="primary" size="small" :disabled="isDisabled" style="margin: 10px 15px" @click="handleSave">{{
$t("passwordReset:button:submit") }}</el-button> $t('common:button:save') }}</el-button>
</el-form-item> </el-form-item>
<roleList v-if="visible" :visible.sync="visible" :userId="userId" :list="userRoleList"
:userTypeOptions="userTypeOptions" @getRoleList="getRoleList" />
</el-form> </el-form>
</template> </template>
<script> <script>
@ -100,250 +104,292 @@ import {
addUser, addUser,
updateUser, updateUser,
getUserTypeListByUserType, getUserTypeListByUserType,
} from "@/api/admin.js"; getHospitalGroupList
import { getHospital } from "@/api/hospital.js"; } from '@/api/admin.js'
import roleList from './roleList.vue'
export default { export default {
name: "UserInfo", name: 'UserInfo',
props: { props: {
userId: { type: String, default: "" }, userId: { type: String, default: '' },
},
data() {
var validatePassword = (rule, value, callback) => {
var lang = zzSessionStorage.getItem("lang")
? zzSessionStorage.getItem("lang")
: "zh";
/* eslint-disable */
var reg1 = /^[a-zA-Z0-9_]{4,16}$/; //8
console.log(!reg1.test(value));
if (!reg1.test(value)) {
callback(
lang === "zh"
? new Error(
"1新建账号用户名字符长度最小为4个字符最大为16个字符只可使用字母、数字、下划线"
)
: new Error(
"For a new account, the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed."
)
);
} else {
callback();
}
};
return {
user: {
UserName: "",
LastName: "",
FirstName: "",
Sex: "9",
EMail: "",
Phone: "",
UserTypeId: "",
IsZhiZhun: "",
OrganizationName: "",
DepartmentName: "",
PositionName: "",
IsTestUser: false,
verifyCode: "",
checkCode: "",
},
userFormRules: {
checkCode: [
{
required: true,
message: "Please Input",
trigger: ["blur", "change"],
},
],
UserName: [
{ required: true, validator: validatePassword, trigger: "blur" },
],
UserTypeId: [
{
required: true,
message: "Please Select",
trigger: ["blur", "change"],
},
],
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",
trigger: ["blur"],
},
],
EMail: [
{
required: true,
message: "Please input the email address",
trigger: "blur",
},
{
type: "email",
message: "Please input the correct email address",
trigger: ["blur"],
},
{ max: 50, message: "The maximum length is 50" },
],
Sex: [{ required: true, message: "Please specify", trigger: "blur" }],
Status: [
{ required: true, message: "Please specify", trigger: "blur" },
],
DepartmentName: [{ max: 50, message: "The maximum length is 50" }],
PositionName: [{ max: 50, message: "The maximum length is 50" }],
},
userTypeOptions: [],
isDisabled: false,
type: 0, // 10
IsCanConnectInternet: true, //
hospitalName: null, //
IsZhiZhunDisabled: false,
};
}, },
components: { roleList },
created() { created() {
if (this.userId !== "") { this.getUserTypeList()
this.type = 1; if (this.userId !== '') {
this.getUserInfo()
this.type = 1
} else { } else {
this.type = 0; this.type = 0
} }
this.getUserTypeList(); this.getHospitalGroupList()
this.getInfo();
}, },
methods: { methods: {
// async getHospitalGroupList() {
userTypeChange() {
this.AffiliationChange();
},
//
AffiliationChange(isFirstInfo = false) {
if (this.user.UserTypeId) {
let name = this.getUserType(this.user.UserTypeId);
if (["PM", "PI", "SR", "OA"].includes(name)) {
if (!isFirstInfo) {
this.user.IsZhiZhun = true;
this.user.OrganizationName = this.hospitalName;
}
if (this.user.IsZhiZhun) {
// this.IsZhiZhunDisabled = true;
}
return;
}
if (!isFirstInfo) {
this.user.IsZhiZhun = false;
this.user.OrganizationName = null;
}
this.IsZhiZhunDisabled = false;
}
},
getUserType(id) {
let obj = this.userTypeOptions.find((item) => item.Id === id);
return obj.UserTypeShortName;
},
//
async getInfo() {
try { try {
let res = await getHospital(); let res = await getHospitalGroupList({})
if (res.IsSuccess) { if (res.IsSuccess) {
this.IsCanConnectInternet = res.Result.IsCanConnectInternet; this.hospitalGroupList = res.Result
this.hospitalName = res.Result.HospitalName;
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err)
}
},
openRoleList() {
this.userRoleList = []
this.user.UserRoleList.forEach((item) => {
this.userRoleList.push(Object.assign({}, item))
})
this.visible = true
},
handleChange(val) {
this.user.UserRoleList = []
val.forEach((item) => {
let data = this.userTypeOptions.find((d) => d.Id === item)
this.user.UserRoleList.push({
UserTypeEnum: data.UserTypeEnum,
UserTypeId: data.Id,
IsUserRoleDisabled: false,
})
})
},
updateQueryParam(param, newValue, wurl) {
// URL
let url = wurl || window.location.href
//
let regex = new RegExp('([?&])' + param + '=.*?(&|$)')
let separator = url.indexOf('?') !== -1 ? '&' : '?'
//
if (regex.test(url)) {
return url.replace(regex, '$1' + param + '=' + newValue + '$2')
} else {
return url + separator + param + '=' + newValue
} }
}, },
handleSave() { handleSave() {
this.$refs.userForm.validate((valid) => { this.$refs.userForm.validate((valid) => {
if (valid) { if (valid) {
this.isDisabled = true; this.isDisabled = true
const selectedUserType = this.userTypeOptions.filter( const selectedUserType = this.userTypeOptions.filter(
(item) => item.Id === this.user.UserTypeId (item) => item.Id === this.user.UserTypeId
); )
// let newUrl = this.updateQueryParam('userName', this.user.UserName)
// newUrl = this.updateQueryParam('email', this.user.EMail, newUrl)
// window.history.pushState({ path: newUrl }, '', newUrl)
if (selectedUserType.length > 0) { if (selectedUserType.length > 0) {
this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum; this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum
} }
this.user.BaseUrl = `${location.protocol}//${location.host}/login`; this.user.BaseUrl = `${location.protocol}//${location.host}/login`
this.user.RouteUrl = `${location.protocol}//${location.host}/email-recompose`; this.user.RouteUrl = `${location.protocol}//${location.host}/email-recompose`
if (this.user.Id) { if (this.user.Id) {
if (this.user.IsZhiZhun) {
this.user.OrganizationName = this.hospitalName;
}
updateUser(this.user) updateUser(this.user)
.then((res) => { .then((res) => {
this.isDisabled = false; this.isDisabled = false
this.$message.success(this.$t('common:message:savedSuccessfully')); this.$message.success('Updated successfully')
}) })
.catch(() => { .catch(() => {
this.isDisabled = false; this.isDisabled = false
}); })
} else { } else {
addUser(this.user) addUser(this.user)
.then((res) => { .then((res) => {
this.isDisabled = false; this.isDisabled = false
this.user.Id = res.Result.Id; this.user.Id = res.Result.Id
this.user.UserCode = res.Result.UserCode; this.user.UserCode = res.Result.UserCode
this.$emit("getUserId", res.Result.Id); this.$emit('getUserId', res.Result.Id)
this.$message.success("Added successfully"); this.$message.success('Added successfully')
this.$router.push({ path: "/system/user/list" }); this.$router.push({ path: '/system/user/list' })
}) })
.catch(() => { .catch(() => {
this.isDisabled = false; this.isDisabled = false
}); })
} }
} }
}); })
}, },
getUserTypeList() { getUserTypeList() {
getUserTypeListByUserType(0).then((res) => { getUserTypeListByUserType(0).then((res) => {
let arr = [2, 4, 5, 8, 9, 12, 14, 35];
if (this.hasPermi(["role:oa"])) {
arr = [4, 5, 8, 9, 12, 14, 35];
}
if (this.hasPermi(["role:ga"])) {
arr = [4, 5, 8, 9, 12, 35];
}
if (res.IsSuccess) { if (res.IsSuccess) {
let arr = [2, 4, 5, 8, 9, 12, 14]; this.userTypeOptions = []
if (this.hasPermi(["role:oa"])) {
arr = [4, 5, 8, 9, 12, 14];
}
this.userTypeOptions = res.Result.map((item) => { this.userTypeOptions = res.Result.map((item) => {
if (arr.includes(item.UserTypeEnum)) { if (arr.includes(item.UserTypeEnum)) {
return item; return item;
} }
}).filter((item) => item); }).filter((item) => item);
if (this.type === 1) {
this.getUserInfo();
}
} }
}); })
}, },
getUserInfo() { getUserInfo() {
getUser(this.userId).then((res) => { getUser({
this.user = res.Result; IdentityUserId: this.userId,
this.user.Status = parseFloat(this.user.Status); }).then((res) => {
this.AffiliationChange(true); this.user = res.Result
}); this.Roles = []
this.user.Roles = []
this.user.UserRoleList = []
res.Result.AccountList.forEach((item) => {
if (!item.IsUserRoleDisabled) {
this.Roles.push(item.UserTypeId)
this.user.Roles.push(item.UserTypeId)
}
this.user.UserRoleList.push({
UserTypeEnum: item.UserTypeEnum,
UserTypeId: item.UserTypeId,
IsUserRoleDisabled: item.IsUserRoleDisabled,
UserTypeShortName: item.UserTypeShortName,
})
})
})
},
getRoleList() {
getUser({
IdentityUserId: this.userId,
}).then((res) => {
this.Roles = []
this.user.Roles = []
this.user.UserRoleList = []
res.Result.AccountList.forEach((item) => {
if (!item.IsUserRoleDisabled) {
this.Roles.push(item.UserTypeId)
this.user.Roles.push(item.UserTypeId)
}
this.user.UserRoleList.push({
UserTypeEnum: item.UserTypeEnum,
UserTypeId: item.UserTypeId,
IsUserRoleDisabled: item.IsUserRoleDisabled,
UserTypeShortName: item.UserTypeShortName,
})
})
})
}, },
OrgnizationTypeChanged(val) { OrgnizationTypeChanged(val) {
if (val) { this.user.OrganizationName = ''
this.user.OrganizationName = this.hospitalName;
} else {
this.user.OrganizationName = "";
}
}, },
}, },
}; data() {
var validatePassword = (rule, value, callback) => {
var lang = zzSessionStorage.getItem('lang')
? zzSessionStorage.getItem('lang')
: 'zh'
/* eslint-disable */
var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //8
if (!reg1.test(value)) {
callback(
lang === 'zh'
? new Error(
'1新建账号用户名字符长度最小为4个字符最大为16个字符只可使用字母、数字、下划线'
)
: new Error(
'For a new account, the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed.'
)
)
} else {
callback()
}
}
return {
userRoleList: [],
Roles: [],
user: {
Roles: [],
UserRoleList: [],
UserName: '',
LastName: '',
FirstName: '',
Sex: '',
EMail: '',
Phone: '',
UserTypeId: '',
IsZhiZhun: '',
OrganizationName: '',
DepartmentName: '',
PositionName: '',
HospitalGroupIdList: [],
IsTestUser: false,
},
visible: false,
userFormRules: {
UserName: [
{ required: true, validator: validatePassword, trigger: 'blur' },
],
Roles: [
{
required: true,
type: 'array',
message: 'Please Select',
trigger: ['blur', 'change'],
},
],
HospitalGroupIdList: [
{
required: true,
type: 'array',
message: 'Please Select',
trigger: ['blur', 'change'],
},
],
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',
trigger: ['blur'],
},
],
EMail: [
{
required: true,
message: 'Please input the email address',
trigger: 'blur',
},
{
// type: 'email',
pattern: new RegExp(this.$reg().EmailRegexStr),
message: 'Please input the correct email address',
trigger: ['blur'],
},
{ max: 50, message: 'The maximum length is 50' },
],
Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }],
Status: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
DepartmentName: [{ max: 50, message: 'The maximum length is 50' }],
PositionName: [{ max: 50, message: 'The maximum length is 50' }],
},
userTypeOptions: [],
hospitalGroupList: [],
isDisabled: false,
type: 0, // 10
}
},
}
</script> </script>
<style scoped> <style scoped>
::v-deep .is-error.my_new_pwd { ::v-deep .is-error.my_new_pwd {

View File

@ -0,0 +1,212 @@
<template>
<el-dialog
v-if="visible"
:visible.sync="visible"
v-dialogDrag
width="540px"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
:title="$t('system:userlist:roleList:title')"
:before-close="cancel"
>
<el-button
size="mini"
type="primary"
@click.stop="openAdd"
style="float: right"
>
{{ $t('common:button:new') }}
</el-button>
<el-table
:data="list"
style="width: 100%"
max-height="300px"
v-loading="loading"
>
<el-table-column type="index" width="40" />
<el-table-column
prop="UserTypeShortName"
:label="$t('system:userlist:roleList:table:UserTypeShortName')"
/>
<el-table-column
prop="IsUserRoleDisabled"
:label="$t('system:userlist:roleList:table:IsUserRoleDisabled')"
>
<template slot-scope="scope">
<span> {{ $fd('IsEnable', !scope.row.IsUserRoleDisabled) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')" min-width="120px">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
:disabled="scope.row.IsUserRoleDisabled"
@click.stop="scope.row.IsUserRoleDisabled = true"
>
{{ $fd('IsEnable', false) }}
</el-button>
<el-button
size="mini"
type="text"
:disabled="!scope.row.IsUserRoleDisabled"
@click.stop="scope.row.IsUserRoleDisabled = false"
>
{{ $fd('IsEnable', true) }}
</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer">
<!-- 保存 -->
<el-button type="primary" :loading="loading" size="small" @click="save">
{{ $t('common:button:confirm') }}
</el-button>
<!-- 取消 -->
<el-button size="small" @click="cancel">
{{ $t('common:button:cancel') }}
</el-button>
</div>
<el-dialog
v-if="addVisible"
:visible.sync="addVisible"
v-dialogDrag
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
width="540px"
:title="$t('system:userlist:roleList:addTitle')"
>
<el-form ref="addForm" :model="form" :rules="rule" label-width="80px">
<el-form-item :label="$t('system:userlist:table:UserType')">
<el-select
v-model="form.roles"
size="small"
placeholder=""
multiple
style="width: 100%"
>
<template v-for="item of roleList">
<el-option
:key="item.Id"
:label="item.UserType"
:value="item.Id"
/>
</template>
</el-select>
</el-form-item>
</el-form>
<div slot="footer">
<!-- 保存 -->
<el-button type="primary" size="small" @click="saveAdd">
{{ $t('common:button:confirm') }}
</el-button>
<!-- 取消 -->
<el-button size="small" @click="addVisible = false">
{{ $t('common:button:cancel') }}
</el-button>
</div>
</el-dialog>
</el-dialog>
</template>
<script>
import { updateUserRoleInfo } from '@/api/admin.js'
export default {
name: 'roleList',
props: {
userId: { type: String, default: '' },
visible: {
type: Boolean,
default: false,
},
list: {
type: Array,
default: () => {
return []
},
},
userTypeOptions: {
type: Array,
default: () => {
return []
},
},
},
data() {
return {
addVisible: false,
loading: false,
form: {
roles: [],
},
rule: {
roles: [
{
required: true,
message: 'Please Select',
trigger: ['blur', 'change'],
},
],
},
}
},
computed: {
roleList() {
let arr = this.list.map((item) => item.UserTypeId)
return this.userTypeOptions.filter(
(item) =>
!arr.includes(item.Id) && ![4, 6, 20].includes(item.UserTypeEnum)
)
},
},
methods: {
cancel() {
this.$emit('update:visible', false)
},
openAdd() {
this.form.roles = []
this.addVisible = true
},
async save() {
try {
let data = {
Id: this.userId,
UserRoleList: this.list,
}
this.loading = true
let res = await updateUserRoleInfo(data)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:updatedSuccessfully'))
this.$emit('update:visible', false)
this.$emit('getRoleList')
}
} catch (err) {
this.loading = false
console.log(err)
}
},
async saveAdd() {
try {
let validate = await this.$refs.addForm.validate()
if (!validate) return
let arr = this.userTypeOptions.filter((item) =>
this.form.roles.includes(item.Id)
)
arr.forEach((item) => {
this.list.push({
UserTypeEnum: item.UserTypeEnum,
UserTypeId: item.Id,
IsUserRoleDisabled: false,
UserTypeShortName: item.UserTypeShortName,
})
})
this.addVisible = false
} catch (err) {
console.log(err)
}
},
},
}
</script>

View File

@ -1,34 +1,27 @@
<template> <template>
<box-content> <box-content>
<div class="search" style="position: relative"> <div class="search" style="position: relative">
<SearchForm <SearchForm size="mini" :that="this" :search-data="searchData" :search-form="searchForm"
size="mini" :search-handle="searchHandle" @search="handleSearch" @reset="handleReset" @new="handleAddUser" />
:that="this"
:search-data="searchData"
:search-form="searchForm"
:search-handle="searchHandle"
@search="handleSearch"
@reset="handleReset"
@new="handleAddUser"
/>
</div> </div>
<base-table <base-table v-loading="loading" :columns="columns" :list="users" :search-data="searchData" :total="total"
v-loading="loading" @getList="getList" @editCb="handleEditUser" @deleteCb="handleDeleteUser" @sortByColumn="sortByColumn">
:columns="columns"
:list="users"
:search-data="searchData"
:total="total"
@getList="getList"
@editCb="handleEditUser"
@deleteCb="handleDeleteUser"
@sortByColumn="sortByColumn"
>
<!-- 选择自定义slot --> <!-- 选择自定义slot -->
<template slot="genderSlot" slot-scope="{ scope }"> <template slot="genderSlot" slot-scope="{ scope }">
{{ scope.row.Sex ? "Male" : "Female" }} {{ scope.row.Sex ? "Male" : "Female" }}
</template> </template>
<template slot="UserTypeSlot" slot-scope="{ scope }">
{{
Array.isArray(scope.row.UserRoleList) &&
scope.row.UserRoleList.length > 0
? scope.row.UserRoleList.filter((item) => !item.IsUserRoleDisabled)
.map((item) => item.UserTypeShortName)
.join(', ')
: ''
}}
</template>
<template slot="roleSlot" slot-scope="{ scope }"> <template slot="roleSlot" slot-scope="{ scope }">
{{ scope.row.RoleNameList.map((role) => role.RoleName).join(",") }} {{scope.row.RoleNameList.map((role) => role.RoleName).join(",")}}
</template> </template>
<template slot="isZhiZhunSlot" slot-scope="{ scope }"> <template slot="isZhiZhunSlot" slot-scope="{ scope }">
{{ {{
@ -68,7 +61,7 @@ const searchDataDefault = () => {
return { return {
UserName: null, UserName: null,
Phone: null, Phone: null,
EMail:null, EMail: null,
OrganizationName: null, OrganizationName: null,
UserState: null, UserState: null,
UserType: null, UserType: null,
@ -145,6 +138,7 @@ export default {
prop: "UserType", prop: "UserType",
label: this.$t("system:userlist:table:UserType"), label: this.$t("system:userlist:table:UserType"),
minWidth: 100, minWidth: 100,
slot: 'UserTypeSlot',
sortable: "custom", sortable: "custom",
showOverflowTooltip: true, showOverflowTooltip: true,
}, },

View File

@ -61,7 +61,7 @@
$t('trials:trials-myinfo:title:accountInfo') $t('trials:trials-myinfo:title:accountInfo')
}}</el-menu-item> }}</el-menu-item>
<!-- 管理后台 --> <!-- 管理后台 -->
<el-menu-item v-if="hasPermi(['role:dev', 'role:oa', 'role:admin'])" index="4-4">{{ <el-menu-item v-if="hasPermi(['role:dev', 'role:oa', 'role:admin', 'role:ga'])" index="4-4">{{
$t('trials:trials-myinfo:title:system') }}</el-menu-item> $t('trials:trials-myinfo:title:system') }}</el-menu-item>
<!-- 切换角色 --> <!-- 切换角色 -->
<el-menu-item index="4-5" v-if="hasRole">{{ <el-menu-item index="4-5" v-if="hasRole">{{
@ -98,7 +98,7 @@ export default {
NODE_ENV: process.env.NODE_ENV, // process.env.NODE_ENV NODE_ENV: process.env.NODE_ENV, // process.env.NODE_ENV
activeIndex: '2', activeIndex: '2',
isReviewer: false, isReviewer: false,
userTypeShortName: zzSessionStorage.getItem('userTypeShortName'), // userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
notice: '', notice: '',
hospital: { hospital: {
HospitalLogoPath: null, HospitalLogoPath: null,
@ -116,6 +116,7 @@ export default {
'device', 'device',
'TotalNeedSignSystemDocCount', 'TotalNeedSignSystemDocCount',
'language', 'language',
'userTypeShortName'
]), ]),
roles() { roles() {
return this.$store.state.user.roles return this.$store.state.user.roles

View File

@ -90,7 +90,7 @@ export default {
.then(async (res) => { .then(async (res) => {
this.user = res.Result; this.user = res.Result;
/* eslint-disable */ /* eslint-disable */
zzSessionStorage.setItem("realName", this.user.RealName); zzSessionStorage.setItem("Name", this.user.FullName);
await store.dispatch("user/updateInfo"); await store.dispatch("user/updateInfo");
loading.close(); loading.close();
}) })

View File

@ -1,12 +1,6 @@
<template> <template>
<el-form <el-form v-if="isRender" ref="measurementForm" v-loading="loading" :model="questionForm" size="mini"
v-if="isRender" class="measurement-form">
ref="measurementForm"
v-loading="loading"
:model="questionForm"
size="mini"
class="measurement-form"
>
<div class="base-dialog-body"> <div class="base-dialog-body">
<div style="display: flex;justify-content: space-between;"> <div style="display: flex;justify-content: space-between;">
<h3 v-if="questionName" style="color: #ddd;padding: 5px 0px;margin: 0;"> <h3 v-if="questionName" style="color: #ddd;padding: 5px 0px;margin: 0;">
@ -19,169 +13,104 @@
</div> </div>
</div> </div>
<el-form-item <el-form-item :label="$t('trials:reading:title:lesionType')" prop="LesionType" :rules="[
:label="$t('trials:reading:title:lesionType')" { required: true, message: $t('common:ruleMessage:select'), trigger: ['blur'] },
prop="LesionType" ]">
:rules="[
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
]"
>
<!-- 下拉框 --> <!-- 下拉框 -->
<el-select <el-select v-model="questionForm.LesionType" filterable
v-model="questionForm.LesionType" :disabled="!isCurrentTask || readingTaskState >= 2 || !isBaseLineTask"
filterable @change="((val) => { lesionTypeChange(val) })">
:disabled="!isCurrentTask || readingTaskState>=2 || !isBaseLineTask"
@change="((val)=>{lesionTypeChange(val)})"
>
<el-option <el-option v-for="item of $d.LesionType" v-show="!(isBaseLineTask && item.value === 2)" :key="item.id"
v-for="item of $d.LesionType" :value="item.value" :label="item.label" />
v-show="!(isBaseLineTask && item.value === 2)"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- :rules="[ <el-form-item v-for="qs in questions" v-show="qs.ShowQuestion !== 2" :key="qs.Id" :label="`${qs.QuestionName}`"
{ required: (qs.IsRequired === 0 || (qs.IsRequired ===1 && qs.RelevanceId && (questionForm[qs.RelevanceId] === qs.RelevanceValue))) && qs.Type!=='group' && qs.Type!=='summary' && qs.QuestionMark !== 4 && qs.QuestionMark !== 6 && qs.QuestionMark !== 2, :prop="qs.Id" :rules="[
message: '请注明', trigger: ['blur']}, {
]" --> required: (qs.IsRequired === 0 || (qs.IsRequired === 1 && qs.RelevanceId && (questionForm[qs.RelevanceId] === qs.RelevanceValue)) || (qs.QuestionMark === 6 && questionForm.IsCanEditPosition === true) || (questionForm.IsCanEditPosition && qs.QuestionMark === 10) || (questionForm.IsCanEditPosition && qs.QuestionMark === 10) || (qs.QuestionMark === 21 && (questionForm.LesionOrgan === '肝脏' || questionForm.LesionOrgan === 'Liver') && (lesionType === 0 || lesionType === 1 || lesionType === 2))) && qs.Type !== 'group' && qs.Type !== 'summary',
<el-form-item message: ['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
v-for="qs in questions" },
v-show="qs.ShowQuestion!==2" ]">
:key="qs.Id" <span slot="label" style="display:inline-block;">
:label="`${qs.QuestionName}`" <el-tooltip
:prop="qs.Id" v-if="qs.QuestionMark === 0 && (questionForm.LesionOrgan === '肝脏' || questionForm.LesionOrgan === 'Liver') && (lesionType === 0 || lesionType === 1 || lesionType === 2) && questionForm.IntrahepaticLesion"
:rules="[ effect="dark" :content="$t('trials:mRecist:warnning:msg1')" placement="bottom">
{ required: (qs.IsRequired === 0 || (qs.IsRequired ===1 && qs.RelevanceId && (questionForm[qs.RelevanceId] === qs.RelevanceValue)) || (qs.QuestionMark === 6 && questionForm.IsCanEditPosition === true) || (questionForm.IsCanEditPosition && qs.QuestionMark === 10)) && qs.Type!=='group' && qs.Type!=='summary', <i class='el-icon-warning' />
message:['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']}, </el-tooltip>
]" {{ qs.QuestionName }}
> </span>
<!-- {{ isCurrentTaskAdd }}
{{ questionForm.IsCanEditPosition }} -->
<!-- 输入框 --> <!-- 输入框 -->
<template v-if="qs.Type==='input' || qs.Type==='number'"> <template v-if="qs.Type === 'input' || qs.Type === 'number'">
<!-- {{ ((qs.QuestionMark === 6 && isCurrentTaskAdd === 'False') || (qs.QuestionMark === 6 && isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition)) }} --> <el-input v-if="qs.Type === 'input' || qs.Type === 'number'" v-model="questionForm[qs.Id]"
<el-input :disabled="!isCurrentTask || readingTaskState >= 2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 || (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName)) || (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName) && lesionType !== 2) || (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName))"
v-if="qs.Type==='input' || qs.Type==='number'" @change="((val) => { formItemChange(val, qs) })">
v-model="questionForm[qs.Id]" <template v-if="(qs.QuestionMark === 0 || qs.QuestionMark === 1) && qs.Unit" slot="append">
:disabled="!isCurrentTask || readingTaskState>=2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 || (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))|| (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName) && lesionType !== 2) || (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName))"
@change="((val)=>{formItemChange(val, qs)})"
>
<template v-if="(qs.QuestionMark===0 || qs.QuestionMark===1) && qs.Unit" slot="append">
{{ $fd('ValueUnit', parseInt(qs.Unit)) }} {{ $fd('ValueUnit', parseInt(qs.Unit)) }}
</template> </template>
</el-input> </el-input>
</template> </template>
<!-- 多行文本输入框 --> <!-- 多行文本输入框 -->
<el-input <el-input v-if="qs.Type === 'textarea'" v-model="questionForm[qs.Id]" type="textarea"
v-if="qs.Type==='textarea'" :autosize="{ minRows: 2, maxRows: 4 }" :disabled="!isCurrentTask || readingTaskState >= 2"
v-model="questionForm[qs.Id]" @change="((val) => { formItemChange(val, qs) })" />
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
:disabled="!isCurrentTask || readingTaskState>=2"
@change="((val)=>{formItemChange(val, qs)})"
/>
<!-- 下拉框 --> <!-- 下拉框 -->
<!-- :disabled="!isCurrentTask || readingTaskState>=2 || (!isBaseLineTask && qs.QuestionMark === 5 && isCurrentTaskAdd === 'False') || qs.QuestionMark === 2 || (qs.QuestionMark === 8 && !isBaseLineTask && isCurrentTaskAdd === 'False')" --> <el-select v-if="qs.Type === 'select'" v-model="questionForm[qs.Id]" filterable
<el-select
v-if="qs.Type==='select'"
v-model="questionForm[qs.Id]"
filterable
:placeholder="qs.QuestionMark === 8 ? $t('common:placeholder:selectorsearch') : $t('common:placeholder:select')" :placeholder="qs.QuestionMark === 8 ? $t('common:placeholder:selectorsearch') : $t('common:placeholder:select')"
:disabled="!isCurrentTask || readingTaskState>=2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 || (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))|| (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False'|| !!answers.SplitOrMergeLesionName)) || (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))" :disabled="!isCurrentTask || readingTaskState >= 2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 ||
@change="((val)=>{formItemChange(val, qs)})" (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))
> || (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName))
|| (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))
|| (qs.QuestionMark === 21 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName))
|| (answers.LesionOrgan && answers.LesionOrgan !== '肝脏' && answers.LesionOrgan !== 'Liver' && qs.QuestionMark === 21)"
@change="((val) => { formItemChange(val, qs) })">
<template v-if="qs.QuestionMark === 8" #prefix> <template v-if="qs.QuestionMark === 8" #prefix>
<span style="padding-left: 5px;"> <span style="padding-left: 5px;">
<i class="el-icon-search" /> <i class="el-icon-search" />
</span> </span>
</template> </template>
<template v-if="qs.TableQuestionType === 1"> <template v-if="qs.TableQuestionType === 1">
<el-option <el-option v-for="item in organList" :key="item.Id" :label="item[qs.DataTableColumn]"
v-for="item in organList" :value="item[qs.DataTableColumn]" />
:key="item.Id"
:label="item[qs.DataTableColumn]"
:value="item[qs.DataTableColumn]"
/>
</template> </template>
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && isBaseLineTask"> <template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && isBaseLineTask">
<el-option <el-option v-for="item of $d[qs.DictionaryCode]"
v-for="item of $d[qs.DictionaryCode]" v-show="(lesionType === 0 && item.value === 0) || (lesionType === 1 && (item.value === 0))" :key="item.id"
v-show="(lesionType === 0 && item.value ===0) || (lesionType === 1 && (item.value ===0))" :value="item.value" :label="item.label" />
:key="item.id"
:value="item.value"
:label="item.label"
/>
</template> </template>
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && !isBaseLineTask"> <template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && !isBaseLineTask">
<el-option-group <el-option-group
:label="!isNaN(parseFloat(answers.LastTaskState)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(qs.DictionaryCode,parseFloat(answers.LastTaskState))}` : ''" :label="!isNaN(parseFloat(answers.LastTaskState)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(qs.DictionaryCode, parseFloat(answers.LastTaskState))}` : ''">
>
<!-- 首次分裂的病灶只能选择存在 --> <!-- 首次分裂的病灶只能选择存在 -->
<template v-if="answers.IsFristAdd=== 'True' && answers.SplitOrMergeType === '0'"> <template v-if="answers.IsFristAdd === 'True' && answers.SplitOrMergeType === '0'">
<el-option <el-option v-for="item of $d[qs.DictionaryCode]" v-show="item.value === 0" :key="item.id"
v-for="item of $d[qs.DictionaryCode]" :value="item.value" :label="item.label" />
v-show="item.value === 0"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</template> </template>
<!-- 首次添加的新病灶不能为无法评估和消失 --> <!-- 首次添加的新病灶不能为无法评估和消失 -->
<template v-else-if="isCurrentTaskAdd=== 'True' && lesionType === 2"> <template v-else-if="isCurrentTaskAdd === 'True' && lesionType === 2">
<el-option <el-option v-for="item of $d[qs.DictionaryCode]" v-show="item.value === 0 || item.value === 1"
v-for="item of $d[qs.DictionaryCode]" :key="item.id" :value="item.value" :label="item.label" />
v-show="item.value === 0 || item.value === 1"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</template> </template>
<template v-else> <template v-else>
<el-option <el-option v-for="item of filterState($d[qs.DictionaryCode])" :key="item.id" :value="item.value"
v-for="item of filterState($d[qs.DictionaryCode])" :label="item.label" />
:key="item.id"
:value="item.value"
:label="item.label"
/>
</template> </template>
</el-option-group> </el-option-group>
</template> </template>
<template v-else-if="qs.DictionaryCode && qs.QuestionMark !== 7"> <template v-else-if="qs.DictionaryCode && qs.QuestionMark !== 7">
<el-option <el-option v-for="item of $d[qs.DictionaryCode]" :key="item.id" :value="item.value" :label="item.label" />
v-for="item of $d[qs.DictionaryCode]"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</template> </template>
<template v-else> <template v-else>
<el-option <el-option v-for="val in qs.TypeValue.split('|')" :key="val" :label="val" :value="val" />
v-for="val in qs.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
</template> </template>
</el-select> </el-select>
<!-- 单选 --> <!-- 单选 -->
<el-radio-group <el-radio-group v-if="qs.Type === 'radio'" v-model="questionForm[qs.id]"
v-if="qs.Type==='radio'" :disabled="!isCurrentTask || readingTaskState >= 2">
v-model="questionForm[qs.id]" <el-radio v-for="val in qs.options.split('|')" :key="val" :label="val">
:disabled="!isCurrentTask || readingTaskState>=2"
>
<el-radio
v-for="val in qs.options.split('|')"
:key="val"
:label="val"
>
{{ val }} {{ val }}
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
@ -189,33 +118,19 @@
</div> </div>
<div <div v-if="isCurrentTask && readingTaskState < 2" class="base-dialog-footer"
v-if="isCurrentTask && readingTaskState<2" style="text-align:right;margin-top:10px;">
class="base-dialog-footer"
style="text-align:right;margin-top:10px;"
>
<!-- 清除标记 --> <!-- 清除标记 -->
<el-button <el-button v-if="questionForm.MeasureData" size="mini" @click="handleDeleteMeasureData">
v-if="questionForm.MeasureData"
size="mini"
@click="handleDeleteMeasureData"
>
{{ $t('trials:reading:button:removeMark') }} {{ $t('trials:reading:button:removeMark') }}
</el-button> </el-button>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button v-if="isCurrentTaskAdd !== 'False'" size="mini" @click="handleDelete">
v-if="isCurrentTaskAdd !== 'False'"
size="mini"
@click="handleDelete"
>
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button <el-button size="mini" @click="handleSave">
size="mini"
@click="handleSave"
>
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -327,7 +242,8 @@ export default {
this.$set(this.questionForm, 'RowIndex', this.answers.RowIndex ? this.answers.RowIndex : '') this.$set(this.questionForm, 'RowIndex', this.answers.RowIndex ? this.answers.RowIndex : '')
this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '') this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '')
this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '') this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '')
this.$set(this.questionForm, 'LesionOrgan', this.answers.LesionOrgan ? this.answers.LesionOrgan : '')
this.$set(this.questionForm, 'IntrahepaticLesion', this.answers.IntrahepaticLesion ? this.answers.IntrahepaticLesion : 0)
// saveTypeEnum 01访/2 // saveTypeEnum 01访/2
var lesionState = this.getQuestionVal(7) var lesionState = this.getQuestionVal(7)
if (this.questionForm.RowId) { if (this.questionForm.RowId) {
@ -352,12 +268,12 @@ export default {
await this.setMeasureData(this.answers.measureObj, true) await this.setMeasureData(this.answers.measureObj, true)
} else { } else {
if (this.questionForm.MeasureData) { if (this.questionForm.MeasureData) {
// 线 // 线
if (this.questionForm.MeasureData.type === 'Bidirectional') { if (this.questionForm.MeasureData.type === 'Bidirectional') {
this.organList = [] this.organList = []
await this.getOrganInfoList(1) await this.getOrganInfoList(1)
} else if (this.questionForm.MeasureData.type === 'Length') { } else if (this.questionForm.MeasureData.type === 'Length') {
// //
this.organList = [] this.organList = []
await this.getOrganInfoList(0) await this.getOrganInfoList(0)
} else { } else {
@ -469,8 +385,8 @@ export default {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true distinguishCancelAndClose: true
}) })
.then(() => {}) .then(() => { })
.catch(() => {}) .catch(() => { })
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType) this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
return return
} }
@ -483,7 +399,7 @@ export default {
this.$confirm(msg, { this.$confirm(msg, {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType) this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
return return
@ -543,16 +459,29 @@ export default {
var selected = this.organList[index] var selected = this.organList[index]
question.RelationQuestions.map(qs => { question.RelationQuestions.map(qs => {
var val = selected[qs.DataTableColumn] var val = selected[qs.DataTableColumn]
if (qs.DataTableColumn === 'TULOC' || qs.DataTableColumn === 'TULOCEN') {
this.$set(this.questionForm, 'LesionOrgan', val)
}
this.$set(this.questionForm, qs.Id, val) this.$set(this.questionForm, qs.Id, val)
}) })
this.$set(this.questionForm, 'OrganInfoId', selected.OrganInfoId) this.$set(this.questionForm, 'OrganInfoId', selected.OrganInfoId)
this.$set(this.questionForm, 'IsCanEditPosition', selected['IsCanEditPosition']) this.$set(this.questionForm, 'IsCanEditPosition', selected['IsCanEditPosition'])
let qs = this.questions.find(item => item.QuestionMark === 21)
this.$set(this.questionForm, qs.Id, 0)
// if (this.questionForm.LesionOrgan === '' || this.questionForm.LesionOrgan === 'Liver') {
// this.$set(this.questionForm, qs.Id, 0)
// }
} else { } else {
question.RelationQuestions.map(qs => { question.RelationQuestions.map(qs => {
this.$set(this.questionForm, qs.Id, '') this.$set(this.questionForm, qs.Id, '')
}) })
} }
} }
if (question.QuestionMark === 21) {
this.$set(this.questionForm, 'IntrahepaticLesion', this.questionForm[question.Id])
}
// saveTypeEnum 01访/2 // saveTypeEnum 01访/2
if (this.questionForm.RowId) { if (this.questionForm.RowId) {
this.$set(this.questionForm, 'saveTypeEnum', 1) this.$set(this.questionForm, 'saveTypeEnum', 1)
@ -655,9 +584,24 @@ export default {
var isLymphLesion = this.getQuestionVal(2) var isLymphLesion = this.getQuestionVal(2)
var lesionLength = this.getQuestionVal(0) var lesionLength = this.getQuestionVal(0)
var lesionShort = this.getQuestionVal(1) var lesionShort = this.getQuestionVal(1)
var lesionOrgan = this.getQuestionVal(5)
var IntrahepaticLesion = this.getQuestionVal(21)
// ,1cm0<1cm1
if (this.isCurrentTaskAdd === 'True') {
if ((lesionOrgan === '肝脏' || lesionOrgan === 'Liver') && IntrahepaticLesion) {
if (!this.isBaseLineTask && (measureData.type === 'Length' && lesionLength >= 10)) {
const stateId = this.getQuestionId(7)
this.$set(this.questionForm, stateId, 0)
}
if (!this.isBaseLineTask && (measureData.type === 'Length' && lesionLength < 10)) {
const stateId = this.getQuestionId(7)
this.$set(this.questionForm, stateId, 1)
}
}
}
// //
if (!(this.isCurrentTaskAdd === 'True')) { if (!(this.isCurrentTaskAdd === 'True')) {
// 线>=10mm>=10mm // 线>=10mm>=10mm
if (!this.isBaseLineTask && ((measureData.type === 'Length' && lesionLength >= 10) || (measureData.type === 'Bidirectional' && lesionShort >= 10))) { if (!this.isBaseLineTask && ((measureData.type === 'Length' && lesionLength >= 10) || (measureData.type === 'Bidirectional' && lesionShort >= 10))) {
const stateId = this.getQuestionId(7) const stateId = this.getQuestionId(7)
this.$set(this.questionForm, stateId, 0) this.$set(this.questionForm, stateId, 0)
@ -721,7 +665,7 @@ export default {
this.$set(this.questionForm, 'MeasureData', measureData) this.$set(this.questionForm, 'MeasureData', measureData)
const isLymph = this.getQuestionVal(2) const isLymph = this.getQuestionVal(2)
const lesionPart = this.getQuestionVal(8) const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6) // const lesionOrgan = this.getQuestionVal(6)
const lesionL = this.getQuestionVal(0) const lesionL = this.getQuestionVal(0)
const lesionS = this.getQuestionVal(1) const lesionS = this.getQuestionVal(1)
var lesionState = this.getQuestionVal(7) var lesionState = this.getQuestionVal(7)
@ -844,6 +788,26 @@ export default {
var lesionLength = this.getQuestionVal(0) var lesionLength = this.getQuestionVal(0)
var lesionShort = this.getQuestionVal(1) var lesionShort = this.getQuestionVal(1)
var lymphNodes = this.getQuestionVal(2) var lymphNodes = this.getQuestionVal(2)
var IntrahepaticLesion = this.getQuestionVal(21)
// <2
if (this.lesionType !== 0 && IntrahepaticLesion === 1) {
let questions = this.tableQuestions.find(item => item.QuestionEnName === 'Target Lesion' && item.QuestionName === '靶病灶')
let num = 0
if (questions.TableQuestions && Array.isArray(questions.TableQuestions.Answers)) {
questions.TableQuestions.Answers.forEach(item => {
if (item.IntrahepaticLesion && item.IntrahepaticLesion > 0) num++
})
}
if (num < 2) {
this.$confirm(this.$t('trials:reading:warnning:msg199'), {
type: 'warning',
showCancelButton: false,
callback: action => { }
})
loading.close()
return
}
}
if (this.isBaseLineTask) { if (this.isBaseLineTask) {
// 线 // 线
// 0 // 0
@ -855,7 +819,17 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg19'), { this.$confirm(this.$t('trials:reading:warnning:msg19'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
})
loading.close()
return
}
if (!(measureData && measureData.markTool === 'Bidirectional' && lesionShort >= 20)) {
// 2cm
this.$confirm(this.$t('trials:mRecist:warnning:msg2'), {
type: 'warning',
showCancelButton: false,
callback: action => { }
}) })
loading.close() loading.close()
return return
@ -867,7 +841,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg20'), { this.$confirm(this.$t('trials:reading:warnning:msg20'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -884,7 +858,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg21'), { this.$confirm(this.$t('trials:reading:warnning:msg21'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -896,7 +870,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg22'), { this.$confirm(this.$t('trials:reading:warnning:msg22'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -914,7 +888,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg23'), { this.$confirm(this.$t('trials:reading:warnning:msg23'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -926,7 +900,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg24'), { this.$confirm(this.$t('trials:reading:warnning:msg24'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -942,7 +916,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg25'), { this.$confirm(this.$t('trials:reading:warnning:msg25'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -958,7 +932,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg26'), { this.$confirm(this.$t('trials:reading:warnning:msg26'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -979,7 +953,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg27'), { this.$confirm(this.$t('trials:reading:warnning:msg27'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -991,7 +965,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg28'), { this.$confirm(this.$t('trials:reading:warnning:msg28'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1026,7 +1000,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg29'), { this.$confirm(this.$t('trials:reading:warnning:msg29'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1038,7 +1012,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg30'), { this.$confirm(this.$t('trials:reading:warnning:msg30'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1059,7 +1033,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg31'), { this.$confirm(this.$t('trials:reading:warnning:msg31'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1071,7 +1045,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg32'), { this.$confirm(this.$t('trials:reading:warnning:msg32'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1088,7 +1062,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg33'), { this.$confirm(this.$t('trials:reading:warnning:msg33'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1100,7 +1074,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg34'), { this.$confirm(this.$t('trials:reading:warnning:msg34'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1117,7 +1091,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg35'), { this.$confirm(this.$t('trials:reading:warnning:msg35'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1129,7 +1103,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg36'), { this.$confirm(this.$t('trials:reading:warnning:msg36'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1146,7 +1120,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg37'), { this.$confirm(this.$t('trials:reading:warnning:msg37'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1158,7 +1132,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg38'), { this.$confirm(this.$t('trials:reading:warnning:msg38'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1175,7 +1149,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg39'), { this.$confirm(this.$t('trials:reading:warnning:msg39'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1187,7 +1161,27 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg40'), { this.$confirm(this.$t('trials:reading:warnning:msg40'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
})
loading.close()
return
}
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
// 使
this.$confirm(this.$t('trials:reading:warnning:msg40'), {
type: 'warning',
showCancelButton: false,
callback: action => { }
})
loading.close()
return
}
if (measureData && measureData.type === 'Length' && this.questionForm.IntrahepaticLesion && lesionLength < 10) {
// 10mm
this.$confirm(this.$t('trials:mRecist:warnning:msg3'), {
type: 'warning',
showCancelButton: false,
callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1204,7 +1198,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg41'), { this.$confirm(this.$t('trials:reading:warnning:msg41'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1216,7 +1210,28 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg42'), { this.$confirm(this.$t('trials:reading:warnning:msg42'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
})
loading.close()
return
}
//
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
// `使`
this.$confirm(this.$t('trials:reading:warnning:msg42'), {
type: 'warning',
showCancelButton: false,
callback: action => { }
})
loading.close()
return
}
if (measureData && measureData.type === 'Length' && this.questionForm.IntrahepaticLesion && lesionLength >= 10) {
// 10mm
this.$confirm(this.$t('trials:mRecist:warnning:msg4'), {
type: 'warning',
showCancelButton: false,
callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1233,7 +1248,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg43'), { this.$confirm(this.$t('trials:reading:warnning:msg43'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1245,7 +1260,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg44'), { this.$confirm(this.$t('trials:reading:warnning:msg44'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1262,7 +1277,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg45'), { this.$confirm(this.$t('trials:reading:warnning:msg45'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1274,7 +1289,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg46'), { this.$confirm(this.$t('trials:reading:warnning:msg46'), {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
loading.close() loading.close()
return return
@ -1330,7 +1345,7 @@ export default {
} }
const res = await submitTableQuestion(params) const res = await submitTableQuestion(params)
if (res.IsSuccess) { if (res.IsSuccess) {
// //
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : '' this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 01访/2 // saveTypeEnum 01访/2
@ -1500,42 +1515,50 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.measurement-form{ .measurement-form {
/deep/ .el-form-item__label{ /deep/ .el-form-item__label {
color: #c3c3c3; color: #c3c3c3;
} }
/deep/ .el-input .el-input__inner{
/deep/ .el-input .el-input__inner {
background-color: transparent; background-color: transparent;
color: #ddd; color: #ddd;
border: 1px solid #5e5e5e; border: 1px solid #5e5e5e;
} }
/deep/ .el-form-item{
/deep/ .el-form-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
} }
/deep/ .el-form-item__content{
/deep/ .el-form-item__content {
flex: 1; flex: 1;
} }
/deep/ .el-input.is-disabled .el-input__inner{
/deep/ .el-input.is-disabled .el-input__inner {
background-color: #646464a1; background-color: #646464a1;
} }
/deep/ .el-select.is-disabled .el-input__inner{
/deep/ .el-select.is-disabled .el-input__inner {
background-color: #646464a1; background-color: #646464a1;
} }
/deep/ .el-button--mini, .el-button--mini.is-round {
/deep/ .el-button--mini,
.el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;
} }
.el-form-item__content
.el-select{ .el-form-item__content .el-select {
width: 100%; width: 100%;
} }
.input-width1{
width: calc(100% -60px)!important; .input-width1 {
width: calc(100% -60px) !important;
} }
.input-width2{
.input-width2 {
width: 100% !important; width: 100% !important;
} }
} }
</style> </style>

View File

@ -8,119 +8,117 @@
<span style="margin-left:5px;">{{ taskBlindName }}</span> <span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3> </h3>
<div v-if="readingTaskState < 2"> <div v-if="readingTaskState < 2">
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom"> <el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')"
<i placement="bottom">
class="el-icon-refresh-left" <i class="el-icon-refresh-left" @click="resetMeasuredData" />
@click="resetMeasuredData"
/>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<!-- 非测量问题 --> <!-- 非测量问题 -->
<div class="lesions"> <div class="lesions">
<Questions ref="ecrf" :question-form-change-state="questionFormChangeState" :question-form-change-num="questionFormChangeNum" /> <Questions ref="ecrf" :question-form-change-state="questionFormChangeState"
:question-form-change-num="questionFormChangeNum" />
</div> </div>
<!-- 测量问题 --> <!-- 测量问题 -->
<template v-if="questions.length > 0 && CriterionType !== 10"> <template v-if="questions.length > 0 && CriterionType !== 10">
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper"> <div v-for="(qs, index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper">
<h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;"> <h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;">
{{ language==='en'?qs.GroupEnName:qs.GroupName }} {{ language === 'en' ? qs.GroupEnName : qs.GroupName }}
</h4> </h4>
<div class="lesion_list"> <div class="lesion_list">
<div v-for="item in qs.Childrens" v-show="!(isBaseLineTask && item.LesionType === 2)" :key="item.Id"> <div v-for="item in qs.Childrens" v-show="!(isBaseLineTask && item.LesionType === 2)" :key="item.Id">
<div v-if="item.Type === 'table'" class="flex-row" style="margin:3px 0;"> <div v-if="item.Type === 'table'" class="flex-row" style="margin:3px 0;">
<div class="title">{{ item.QuestionName }}</div> <div class="title">{{ item.QuestionName }}</div>
<div v-if="readingTaskState<2 && (isBaseLineTask || item.LesionType === 2)" class="add-icon" @click.prevent="handleAdd(item)"> <div v-if="readingTaskState < 2 && (isBaseLineTask || item.LesionType === 2)" class="add-icon"
@click.prevent="handleAdd(item)">
<i class="el-icon-plus" /> <i class="el-icon-plus" />
</div> </div>
</div> </div>
<!-- @change="handleCollapseChange(qs.Childrens,item)" --> <!-- @change="handleCollapseChange(qs.Childrens,item)" -->
<el-collapse <el-collapse v-if="item.Type === 'table' && item.TableQuestions" v-model="activeName" accordion
v-if="item.Type === 'table' && item.TableQuestions" @change="handleCollapseChange">
v-model="activeName" <el-collapse-item v-for="(q, i) in item.TableQuestions.Answers" :key="`${item.Id}_${q.RowIndex}`"
accordion
@change="handleCollapseChange"
>
<el-collapse-item
v-for="(q,i) in item.TableQuestions.Answers"
:key="`${item.Id}_${q.RowIndex}`"
:name="`${item.Id}_${q.RowIndex}`" :name="`${item.Id}_${q.RowIndex}`"
@contextmenu.prevent.native="collapseRightClick($event,q,item.Id,q.RowIndex)" @contextmenu.prevent.native="collapseRightClick($event, q, item.Id, q.RowIndex)">
>
<template slot="title"> <template slot="title">
<div style="width:300px;position: relative;" :style="{color:(activeName===item.Id+q.RowIndex?'#ffeb3b':'#fff')}"> <div style="width:300px;position: relative;"
:style="{ color: (activeName === item.Id + q.RowIndex ? '#ffeb3b' : item.TableQuestions.Answers[i].IntrahepaticLesion && item.TableQuestions.Answers[i].IntrahepaticLesion > 0 ? '#5fb4ff' : '#fff') }"
:title="item.TableQuestions.Answers[i].IntrahepaticLesion && item.TableQuestions.Answers[i].IntrahepaticLesion > 0 ? $t('trials:mRecist:text:text1') : ''">
{{ getLesionName(item.OrderMark,q.RowIndex) }} {{ getLesionName(item.OrderMark, q.RowIndex) }}
<!-- 未保存 --> <!-- 未保存 -->
<el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) === 0" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom"> <el-tooltip
v-if="readingTaskState < 2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) === 0"
class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
<i class="el-icon-warning" style="color:red" /> <i class="el-icon-warning" style="color:red" />
</el-tooltip> </el-tooltip>
<!-- 信息不完整 --> <!-- 信息不完整 -->
<el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) ===1" class="item" effect="dark" :content="$t('trials:reading:button:incompleteInfor')" placement="bottom"> <el-tooltip
v-if="readingTaskState < 2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) === 1"
class="item" effect="dark" :content="$t('trials:reading:button:incompleteInfor')"
placement="bottom">
<i class="el-icon-warning" style="color:#ff9800" /> <i class="el-icon-warning" style="color:#ff9800" />
</el-tooltip> </el-tooltip>
<div style="position: absolute;left: 50px;top: 2px;"> <div style="position: absolute;left: 50px;top: 2px;"
:style="{ position: 'absolute', left: '50px', top: '2px', color: item.TableQuestions.Answers[i].IntrahepaticLesion && item.TableQuestions.Answers[i].IntrahepaticLesion > 0 ? '#5fb4ff' : '#fff' }">
<!-- white-space: nowrap;overflow: hidden;text-overflow: ellipsis; --> <!-- white-space: nowrap;overflow: hidden;text-overflow: ellipsis; -->
<div style="font-size: 11px;width:220px;height: 30px;"> <div style="font-size: 11px;width:220px;height: 30px;">
<div <div v-if="item.TableQuestions.Answers[i].lesionPart"
v-if="item.TableQuestions.Answers[i].lesionPart" style="margin-left:10px;display: inline-block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:90px">
style="margin-left:10px;display: inline-block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:90px" <el-tooltip v-if="!!item.TableQuestions.Answers[i].lesionPart" class="item" effect="dark"
> :content="item.TableQuestions.Answers[i].lesionPart" placement="bottom">
<el-tooltip v-if="!!item.TableQuestions.Answers[i].lesionPart" class="item" effect="dark" :content="item.TableQuestions.Answers[i].lesionPart" placement="bottom">
<span>{{ item.TableQuestions.Answers[i].lesionPart }}</span> <span>{{ item.TableQuestions.Answers[i].lesionPart }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
<div style="display: inline-block;margin-left:5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:50px"> <div
style="display: inline-block;margin-left:5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:50px">
<span v-if="item.LesionType === 0"> <span v-if="item.LesionType === 0">
{{ $fd('TargetState',parseInt(item.TableQuestions.Answers[i].lesionState)) }} {{ $fd('TargetState', parseInt(item.TableQuestions.Answers[i].lesionState)) }}
</span> </span>
<span v-else-if="item.LesionType === 1"> <span v-else-if="item.LesionType === 1">
{{ $fd('NoTargetState',parseInt(item.TableQuestions.Answers[i].lesionState)) }} {{ $fd('NoTargetState', parseInt(item.TableQuestions.Answers[i].lesionState)) }}
</span> </span>
<span v-else> <span v-else>
{{ $fd('NewLesionState',parseInt(item.TableQuestions.Answers[i].lesionState)) }} {{ $fd('NewLesionState', parseInt(item.TableQuestions.Answers[i].lesionState)) }}
</span> </span>
</div> </div>
<div style="display: inline-block;margin-left:5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:60px"> <div
<template v-if="item.TableQuestions.Answers[i].isLymphLesion && !isNaN(parseInt(item.TableQuestions.Answers[i].lesionShort))"> style="display: inline-block;margin-left:5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:60px">
<template
v-if="item.TableQuestions.Answers[i].isLymphLesion && !isNaN(parseInt(item.TableQuestions.Answers[i].lesionShort))">
{{ item.TableQuestions.Answers[i].lesionShort }}mm {{ item.TableQuestions.Answers[i].lesionShort }}mm
</template> </template>
<template v-else-if="!item.TableQuestions.Answers[i].isLymphLesion && !isNaN(parseInt(item.TableQuestions.Answers[i].lesionLength))"> <template
v-else-if="!item.TableQuestions.Answers[i].isLymphLesion && !isNaN(parseInt(item.TableQuestions.Answers[i].lesionLength))">
{{ item.TableQuestions.Answers[i].lesionLength }}mm {{ item.TableQuestions.Answers[i].lesionLength }}mm
</template> </template>
</div> </div>
</div> </div>
</div> </div>
<div v-if="((item.LesionType === 0 && parseInt(item.TableQuestions.Answers[i].lesionState) === 0) || (item.LesionType === 1 && [0,1].includes(parseInt(item.TableQuestions.Answers[i].lesionState))) || (item.LesionType === 2 && parseInt(item.TableQuestions.Answers[i].lesionState) === 0)) && item.TableQuestions.Answers[i].IsCurrentTaskAdd === 'False'" style="position: absolute;right: 5px;top: 2px;transform: rotateY(180deg);"> <div
v-if="((item.LesionType === 0 && parseInt(item.TableQuestions.Answers[i].lesionState) === 0) || (item.LesionType === 1 && [0, 1].includes(parseInt(item.TableQuestions.Answers[i].lesionState))) || (item.LesionType === 2 && parseInt(item.TableQuestions.Answers[i].lesionState) === 0)) && item.TableQuestions.Answers[i].IsCurrentTaskAdd === 'False'"
style="position: absolute;right: 5px;top: 2px;transform: rotateY(180deg);">
<!-- 分裂 --> <!-- 分裂 -->
<el-tooltip v-show="readingTaskState<2 && !!item.TableQuestions.Answers[i].RowId && !isBaseLineTask && item.TableQuestions.Answers[i].isDicomReading !== false" class="item" :content="$t('trials:reading:button:split')" placement="left"> <el-tooltip
<i class="iconfont icon-24gl-split" style="color:#fff;font-size: 16px;" @click.stop="handleSplit(item.TableQuestions.Answers[i].RowId,item.Id)" /> v-show="readingTaskState < 2 && !!item.TableQuestions.Answers[i].RowId && !isBaseLineTask && item.TableQuestions.Answers[i].isDicomReading !== false"
class="item" :content="$t('trials:reading:button:split')" placement="left">
<i class="iconfont icon-24gl-split" style="color:#fff;font-size: 16px;"
@click.stop="handleSplit(item.TableQuestions.Answers[i].RowId, item.Id)" />
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
</template> </template>
<QuestionForm <QuestionForm :ref="`${item.Id}_${q.RowIndex}`" :questions="item.TableQuestions.Questions"
:ref="`${item.Id}_${q.RowIndex}`" :answers="item.TableQuestions.Answers[i]" :lesion-type="item.LesionType"
:questions="item.TableQuestions.Questions" :order-mark="item.OrderMark" :table-questions="tableQuestions" :row-index="String(q.RowIndex)"
:answers="item.TableQuestions.Answers[i]" :question-name="item.QuestionName" :parent-qs-id="item.Id" :visit-task-id="visitTaskId"
:lesion-type="item.LesionType" :is-current-task="isCurrentTask" :reading-task-state="readingTaskState"
:order-mark="item.OrderMark" :is-base-line-task="isBaseLineTask" @getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
:table-questions="tableQuestions" @determineExistsUnsavedLession="determineExistsUnsavedLession" @resetQuestions="resetQuestions"
:row-index="String(q.RowIndex)" @close="close" />
:question-name="item.QuestionName"
:parent-qs-id="item.Id"
:visit-task-id="visitTaskId"
:is-current-task="isCurrentTask"
:reading-task-state="readingTaskState"
:is-base-line-task="isBaseLineTask"
@getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
@determineExistsUnsavedLession="determineExistsUnsavedLession"
@resetQuestions="resetQuestions"
@close="close"
/>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
@ -274,6 +272,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['ecrf'].getQuestions(this.visitTaskId) this.$refs['ecrf'].getQuestions(this.visitTaskId)
this.getTableQuestions() this.getTableQuestions()
this.getQuestions(this.tableQuestions)
this.tableQuestions.forEach(item => { this.tableQuestions.forEach(item => {
item.TableQuestions.Answers.forEach(i => { item.TableQuestions.Answers.forEach(i => {
var refName = `${item.Id}_${i.RowIndex}` var refName = `${item.Id}_${i.RowIndex}`
@ -288,6 +287,7 @@ export default {
await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId }) await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId })
this.getTableQuestions() this.getTableQuestions()
this.getQuestions(this.tableQuestions)
}, },
setQuestions(questions, obj) { setQuestions(questions, obj) {
questions.forEach(item => { questions.forEach(item => {
@ -324,6 +324,8 @@ export default {
this.$set(answerObj, 'loctation', this.getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj)) this.$set(answerObj, 'loctation', this.getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj))
this.$set(answerObj, 'lesionLength', this.getQuestionAnswer(item.TableQuestions.Questions, 0, answerObj)) this.$set(answerObj, 'lesionLength', this.getQuestionAnswer(item.TableQuestions.Questions, 0, answerObj))
this.$set(answerObj, 'lesionShort', this.getQuestionAnswer(item.TableQuestions.Questions, 1, answerObj)) this.$set(answerObj, 'lesionShort', this.getQuestionAnswer(item.TableQuestions.Questions, 1, answerObj))
this.$set(answerObj, 'LesionOrgan', this.getQuestionAnswer(item.TableQuestions.Questions, 5, answerObj))
this.$set(answerObj, 'IntrahepaticLesion', this.getQuestionAnswer(item.TableQuestions.Questions, 21, answerObj))
var isLymphLesion = this.getQuestionAnswer(item.TableQuestions.Questions, 2, answerObj) var isLymphLesion = this.getQuestionAnswer(item.TableQuestions.Questions, 2, answerObj)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
this.$set(answerObj, 'isLymphLesion', isLymphLesion) this.$set(answerObj, 'isLymphLesion', isLymphLesion)
@ -397,6 +399,7 @@ export default {
this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask
} }
this.getTableQuestions() this.getTableQuestions()
this.getQuestions(this.tableQuestions)
this.$nextTick(() => { this.$nextTick(() => {
this.tableQuestions.forEach(item => { this.tableQuestions.forEach(item => {
item.TableQuestions.Answers.forEach(i => { item.TableQuestions.Answers.forEach(i => {
@ -495,7 +498,7 @@ export default {
.then(() => { .then(() => {
this.split(rowId, questionId) this.split(rowId, questionId)
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
// //
this.$confirm(this.$t('trials:reading:warnning:msg4'), { this.$confirm(this.$t('trials:reading:warnning:msg4'), {
@ -505,7 +508,7 @@ export default {
.then(() => { .then(() => {
this.split(rowId, questionId) this.split(rowId, questionId)
}) })
.catch(() => {}) .catch(() => { })
} }
} }
} }
@ -631,7 +634,7 @@ export default {
this.$confirm(msg, { this.$confirm(msg, {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
return return
} }
@ -642,7 +645,7 @@ export default {
this.$confirm(msg, { this.$confirm(msg, {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: action => {} callback: action => { }
}) })
} else { } else {
// saveTypeEnum: 0 // saveTypeEnum: 0
@ -781,7 +784,7 @@ export default {
async changeLesionType(questionsObj) { async changeLesionType(questionsObj) {
await store.dispatch('reading/removeReadingQuestionAndAnswer', { lesionType: questionsObj.oldLesionType, rowIndex: questionsObj.rowIndex, visitTaskId: this.visitTaskId }) await store.dispatch('reading/removeReadingQuestionAndAnswer', { lesionType: questionsObj.oldLesionType, rowIndex: questionsObj.rowIndex, visitTaskId: this.visitTaskId })
// saveTypeEnum: 0 // saveTypeEnum: 0
var lesionObj = { } var lesionObj = {}
var questionObj = questionsObj.questionForm var questionObj = questionsObj.questionForm
// //
var targetObj = this.tableQuestions.find(item => item.LesionType === questionsObj.newLesionType) var targetObj = this.tableQuestions.find(item => item.LesionType === questionsObj.newLesionType)
@ -1058,23 +1061,26 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.measurement-wrapper{ .measurement-wrapper {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
// overflow: hidden; // overflow: hidden;
.container{ .container {
padding: 10px; padding: 10px;
.basic-info{
.basic-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
h3{
h3 {
color: #ddd; color: #ddd;
padding: 5px 0px; padding: 5px 0px;
margin: 0; margin: 0;
} }
i{
i {
color: #fff; color: #fff;
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
@ -1082,14 +1088,16 @@ export default {
} }
} }
} }
.title{
.title {
padding: 5px; padding: 5px;
font-weight: bold; font-weight: bold;
color: #ddd; color: #ddd;
font-size: 15px; font-size: 15px;
} }
.add-icon{
.add-icon {
padding: 5px; padding: 5px;
font-weight: bold; font-weight: bold;
color: #ddd; color: #ddd;
@ -1098,42 +1106,49 @@ export default {
margin-bottom: 2px; margin-bottom: 2px;
cursor: pointer; cursor: pointer;
} }
.add-icon:hover{
.add-icon:hover {
background-color: #607d8b; background-color: #607d8b;
} }
.flex-row{ .flex-row {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
background-color: #424242; background-color: #424242;
} }
.lesion_list{
.lesion_list {
position: relative; position: relative;
} }
.el-collapse{
border-bottom:none; .el-collapse {
border-top:none; border-bottom: none;
/deep/ .el-collapse-item{ border-top: none;
background-color: #000!important;
/deep/ .el-collapse-item {
background-color: #000 !important;
color: #ddd; color: #ddd;
} }
/deep/ .el-collapse-item__header{
background-color: #000!important; /deep/ .el-collapse-item__header {
background-color: #000 !important;
color: #ddd; color: #ddd;
border-bottom-color:#5a5a5a; border-bottom-color: #5a5a5a;
padding-left: 5px; padding-left: 5px;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
} }
/deep/ .el-collapse-item__wrap{
background-color: #000!important; /deep/ .el-collapse-item__wrap {
background-color: #000 !important;
color: #ddd; color: #ddd;
} }
/deep/ .el-collapse-item__content{
width:260px; /deep/ .el-collapse-item__content {
width: 260px;
position: absolute; position: absolute;
top: 0px; top: 0px;
right: 0px; right: 0px;
@ -1142,7 +1157,7 @@ export default {
z-index: 1; z-index: 1;
color: #ddd; color: #ddd;
padding: 5px; padding: 5px;
background-color:#1e1e1e; background-color: #1e1e1e;
} }
} }

View File

@ -261,7 +261,8 @@ export default {
ntLesionCount: null, ntLesionCount: null,
openWindow: null, openWindow: null,
reportBtnLoading: false, reportBtnLoading: false,
previewFileVisible: false previewFileVisible: false,
fileData: {}
} }
}, },
computed: { computed: {
@ -795,6 +796,9 @@ export default {
sysRes = this.$fd('OverallAssessment', this.tumorEvaluate) sysRes = this.$fd('OverallAssessment', this.tumorEvaluate)
curRes = this.$fd('OverallAssessment', this.currentEvaluateResult) curRes = this.$fd('OverallAssessment', this.currentEvaluateResult)
} }
if (!curRes) {
return ''
}
const msg = this.$t('trials:readingReport:message:msg9').replace('xxx', '<font color="red">' + sysRes + '</font>').replace('yyy', '<font color="red">' + curRes + '</font>') const msg = this.$t('trials:readingReport:message:msg9').replace('xxx', '<font color="red">' + sysRes + '</font>').replace('yyy', '<font color="red">' + curRes + '</font>')
return msg return msg
}, },