Compare commits
2 Commits
3138bbcb3b
...
15adb3611a
| Author | SHA1 | Date |
|---|---|---|
|
|
15adb3611a | |
|
|
216182f48e |
|
|
@ -279,6 +279,14 @@ export function batchAddInternationalization(param) {
|
|||
data: param
|
||||
})
|
||||
}
|
||||
// 管理端修改用户角色
|
||||
export function updateUserRoleInfo(data) {
|
||||
return request({
|
||||
url: `/User/updateUserRoleInfo`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取医院列表
|
||||
export function getHIRHospitalList(param) {
|
||||
return request({
|
||||
|
|
@ -310,4 +318,42 @@ export function updateDefaultHospital(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'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('自定义上传组件', this)
|
||||
// console.log('自定义上传组件', this)
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
14
src/main.js
14
src/main.js
|
|
@ -248,6 +248,20 @@ async function VueInit() {
|
|||
}()
|
||||
_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 = []
|
||||
var t = function (key) {
|
||||
// if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) {
|
||||
|
|
|
|||
|
|
@ -221,11 +221,11 @@ export const constantRoutes = [
|
|||
hidden: true,
|
||||
component: () => import('@/views/trials/trials-panel/setting/reading-unit/preview')
|
||||
},
|
||||
// {
|
||||
// path: '/activate',
|
||||
// component: () => import('@/views/trials/trials-list/components/activate-page.vue'),
|
||||
// hidden: true
|
||||
// },
|
||||
{
|
||||
path: '/activate',
|
||||
component: () => import('@/views/trials/trials-list/components/activate-page.vue'),
|
||||
hidden: true
|
||||
},
|
||||
// {
|
||||
// path: '/audit',
|
||||
// name: 'audit',
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@ const getters = {
|
|||
device: state => state.app.device,
|
||||
token: state => state.user.token,
|
||||
name: state => state.user.name,
|
||||
userTypeShortName: state => state.user.userTypeShortName,
|
||||
permissions: state => state.user.permissions,
|
||||
tree: state => state.user.tree,
|
||||
userName: state => state.user.userName,
|
||||
userId: state => state.user.userId,
|
||||
identityUserId: state => state.user.identityUserId,
|
||||
routes: state => state.permission.routes,
|
||||
asyncRoutes: state => state.permission.addRoutes,
|
||||
visitedViews: state => state.tagsView.visitedViews,
|
||||
|
|
@ -41,6 +43,7 @@ const getters = {
|
|||
lastCanvasTaskId: state => state.reading.lastCanvasTaskId,
|
||||
imageQuality: state => state.reading.imageQuality,
|
||||
imageQualityIssues: state => state.reading.imageQualityIssues,
|
||||
currentLoadIns: state => state.reading.currentLoadIns,
|
||||
language: state => state.lang.language,
|
||||
TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount,
|
||||
TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount,
|
||||
|
|
|
|||
|
|
@ -7,14 +7,17 @@ const getDefaultState = () => {
|
|||
return {
|
||||
token: getToken(),
|
||||
name: '',
|
||||
userTypeShortName: '',
|
||||
userName: '',
|
||||
userId: '',
|
||||
identityUserId: '',
|
||||
avatar: '',
|
||||
permissions: [],
|
||||
tree: [],
|
||||
/* eslint-disable */
|
||||
TotalNeedSignSystemDocCount: 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,
|
||||
isTestUser: false,
|
||||
roles: []
|
||||
|
|
@ -38,6 +41,9 @@ const mutations = {
|
|||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
},
|
||||
SET_USERTYPESHORTNAME: (state, userTypeShortName) => {
|
||||
state.userTypeShortName = userTypeShortName
|
||||
},
|
||||
SET_USERNAME: (state, name) => {
|
||||
state.userName = name
|
||||
},
|
||||
|
|
@ -53,9 +59,16 @@ const mutations = {
|
|||
SET_USERID: (state, id) => {
|
||||
state.userId = id
|
||||
},
|
||||
SET_IDENTITYUSERID: (state, id) => {
|
||||
state.identityUserId = id
|
||||
},
|
||||
SET_ISTESTUSER: (state, 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) => {
|
||||
/* eslint-disable */
|
||||
if (eval(process.env.VUE_APP_WORD_FOR_PERMISSION) && !state.isTestUser) {
|
||||
|
|
@ -219,6 +232,9 @@ const actions = {
|
|||
setPermissions({ commit }, permissions) {
|
||||
commit('SET_PERMISSIONS', permissions)
|
||||
},
|
||||
setIsFirstSysDocNeedSign({ commit }, IsFirstSysDocNeedSign) {
|
||||
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', IsFirstSysDocNeedSign)
|
||||
},
|
||||
setTotalNeedSignSystemDocCount({ commit }, TotalNeedSignSystemDocCount) {
|
||||
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', TotalNeedSignSystemDocCount)
|
||||
},
|
||||
|
|
@ -255,7 +271,7 @@ const actions = {
|
|||
return user
|
||||
},
|
||||
updateInfo({ commit, state }) {
|
||||
commit('SET_NAME', zzSessionStorage.getItem('realName'))
|
||||
commit('SET_NAME', zzSessionStorage.getItem('Name'))
|
||||
},
|
||||
// user logout
|
||||
async logout({ commit, state }) {
|
||||
|
|
|
|||
|
|
@ -1,69 +1,78 @@
|
|||
<template>
|
||||
<div class="hospital">
|
||||
<el-form ref="hospitalForm" size="small" :model="hospital" :rules="hospitalFormRules" label-width="150px"
|
||||
style="width: 800px">
|
||||
<el-card class="Basic" shadow="never" size="small">
|
||||
<el-form-item :label="$t('system:hospital:name')" prop="HospitalName">
|
||||
<el-input v-model.trim="hospital.HospitalName" :disabled="disabled" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:hospital:code')" prop="HospitalCode">
|
||||
<el-input v-model.trim="hospital.HospitalCode" :disabled="disabled || hasPermi(['role:oa'])"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-tabs v-model="activeTab" style="position: relative;height: 100%;">
|
||||
<el-tab-pane name="hospital" :label="$t('system:hospital:tab:hospital')">
|
||||
<div class="hospital">
|
||||
<el-form ref="hospitalForm" size="small" :model="hospital" :rules="hospitalFormRules"
|
||||
label-width="150px" style="width: 800px">
|
||||
<el-card class="Basic" shadow="never" size="small">
|
||||
<el-form-item :label="$t('system:hospital:name')" prop="HospitalName">
|
||||
<el-input v-model.trim="hospital.HospitalName" :disabled="disabled" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:hospital:code')" prop="HospitalCode">
|
||||
<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-input v-model="hospital.HospitalAliasName" :disabled="disabled" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:hospital:aliasName')" prop="HospitalAliasName">
|
||||
<el-input v-model="hospital.HospitalAliasName" :disabled="disabled" clearable />
|
||||
</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>
|
||||
<script>
|
||||
import { getHospital } from "@/api/hospital.js";
|
||||
import { addOrUpdateHIRHospital } from '@/api/admin'
|
||||
import uploadLogo from "./uploadLogo.vue";
|
||||
import groupList from "./groupList.vue";
|
||||
export default {
|
||||
name: "systemHospital",
|
||||
components: { "upload-logo": uploadLogo },
|
||||
components: { "upload-logo": uploadLogo, groupList },
|
||||
props: {
|
||||
status: {
|
||||
type: String,
|
||||
|
|
@ -78,6 +87,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'hospital',
|
||||
hospital: {
|
||||
HospitalName: null,
|
||||
HospitalAliasName: null,
|
||||
|
|
@ -140,6 +150,11 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
clickTab(tab, event) {
|
||||
this.activeTab = tab
|
||||
console.log(this.activeTab)
|
||||
// this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` });
|
||||
},
|
||||
async handleSave() {
|
||||
if (this.btnLoading) return;
|
||||
try {
|
||||
|
|
@ -184,6 +199,24 @@ export default {
|
|||
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 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -84,10 +84,9 @@
|
|||
@pagination="getList" />
|
||||
</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" />
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -134,7 +133,7 @@ export default {
|
|||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(async () => {
|
||||
let res = await updateDefaultHospital({HirHospitalId:row.Id})
|
||||
let res = await updateDefaultHospital({ HirHospitalId: row.Id })
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,96 +2,100 @@
|
|||
<el-form ref="userForm" size="small" :model="user" :rules="userFormRules" label-width="150px" style="width: 800px">
|
||||
<el-card class="Basic" shadow="never" size="small">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t("system:userlist:title:Information") }}</span>
|
||||
<span>{{ $t('system:userlist:title:Information') }}</span>
|
||||
</div>
|
||||
<el-form-item v-if="user.UserCode" :label="$t('system:userlist:table:S/N')" prop="UserCode">
|
||||
<el-input v-model="user.UserCode" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<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 :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 :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
|
||||
: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-input v-model="user.EMail" clearable />
|
||||
<el-input v-model="user.EMail" :disabled="!!user.UserCode" />
|
||||
</el-form-item>
|
||||
<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 v-if="type == 1" :label="$t('system:userlist:table:Disable')">
|
||||
<el-switch v-model="user.Status" :active-value="1" :inactive-value="0" />
|
||||
<el-form-item :label="$t('system:userlist:table:HospitalGroupIdList')"
|
||||
: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 label="IsTestUser:">
|
||||
<el-switch v-model="user.IsTestUser" />
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('system:userlist:table:UserType')" prop="UserTypeId">
|
||||
<el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="" style="width: 100%"
|
||||
:disabled="user.CanEditUserType === false" clearable @change="userTypeChange">
|
||||
<template v-for="(userType, key) of userTypeOptions">
|
||||
<el-option :key="key" :label="userType.UserType" :value="userType.Id" />
|
||||
</template>
|
||||
</el-select>
|
||||
<el-form-item :label="$t('system:userlist:table:UserType')" prop="Roles" v-if="type === 0">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-select ref="userType" v-model="user.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>
|
||||
</div>
|
||||
</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 label="">
|
||||
<span>{{ $t('system:userlist:tip:defaultPassword') }}</span>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
:label="$t('trials:researchForm:form:checkCode')"
|
||||
prop="checkCode"
|
||||
v-if="!IsCanConnectInternet"
|
||||
>
|
||||
<el-input v-model="user.checkCode" type="number" />
|
||||
<span style="color: red"
|
||||
>请输入,校验码用于用户首次登录、重置密码时的校验</span
|
||||
>
|
||||
</el-form-item> -->
|
||||
<el-form-item v-if="type == 1" :label="$t('system:userlist:table:Disable')">
|
||||
<el-switch v-model="user.Status" :active-value="1" :inactive-value="0" />
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
|
||||
<el-card class="Affiliation" shadow="never" style="margin-top: 10px" size="small">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t("system:userlist:title:Affiliation") }}</span>
|
||||
<span>{{ $t('system:userlist:title:Affiliation') }}</span>
|
||||
</div>
|
||||
<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">{{
|
||||
$t("system:userlist:title:Internal")
|
||||
$t('system:userlist:title:Internal')
|
||||
}}</el-radio>
|
||||
<el-radio :label="false">{{
|
||||
$t("system:userlist:title:External")
|
||||
$t('system:userlist:title:External')
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:userlist:table:OrganizationName')">
|
||||
<el-input v-model="user.OrganizationName" :disabled="user.IsZhiZhun === true" clearable />
|
||||
<el-form-item v-show="user.IsZhiZhun === false" :label="$t('system:userlist:table:OrganizationName')">
|
||||
<el-input v-model="user.OrganizationName" />
|
||||
</el-form-item>
|
||||
|
||||
<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 :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-card>
|
||||
<el-form-item>
|
||||
<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>
|
||||
<roleList v-if="visible" :visible.sync="visible" :userId="userId" :list="userRoleList"
|
||||
:userTypeOptions="userTypeOptions" @getRoleList="getRoleList" />
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -100,250 +104,292 @@ import {
|
|||
addUser,
|
||||
updateUser,
|
||||
getUserTypeListByUserType,
|
||||
} from "@/api/admin.js";
|
||||
import { getHospital } from "@/api/hospital.js";
|
||||
getHospitalGroupList
|
||||
} from '@/api/admin.js'
|
||||
import roleList from './roleList.vue'
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
name: 'UserInfo',
|
||||
props: {
|
||||
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, // 1为编辑,0为新增
|
||||
IsCanConnectInternet: true, // 是否连接互联网
|
||||
hospitalName: null, // 医院名称
|
||||
IsZhiZhunDisabled: false,
|
||||
};
|
||||
userId: { type: String, default: '' },
|
||||
},
|
||||
components: { roleList },
|
||||
created() {
|
||||
if (this.userId !== "") {
|
||||
this.type = 1;
|
||||
this.getUserTypeList()
|
||||
if (this.userId !== '') {
|
||||
this.getUserInfo()
|
||||
this.type = 1
|
||||
} else {
|
||||
this.type = 0;
|
||||
this.type = 0
|
||||
}
|
||||
this.getUserTypeList();
|
||||
this.getInfo();
|
||||
this.getHospitalGroupList()
|
||||
},
|
||||
methods: {
|
||||
// 用户类型变更
|
||||
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() {
|
||||
async getHospitalGroupList() {
|
||||
try {
|
||||
let res = await getHospital();
|
||||
let res = await getHospitalGroupList({})
|
||||
if (res.IsSuccess) {
|
||||
this.IsCanConnectInternet = res.Result.IsCanConnectInternet;
|
||||
this.hospitalName = res.Result.HospitalName;
|
||||
this.hospitalGroupList = res.Result
|
||||
}
|
||||
} 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() {
|
||||
this.$refs.userForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.isDisabled = true;
|
||||
this.isDisabled = true
|
||||
const selectedUserType = this.userTypeOptions.filter(
|
||||
(item) => item.Id === this.user.UserTypeId
|
||||
);
|
||||
)
|
||||
// let newUrl = this.updateQueryParam('userName', this.user.UserName)
|
||||
// newUrl = this.updateQueryParam('email', this.user.EMail, newUrl)
|
||||
// window.history.pushState({ path: newUrl }, '', newUrl)
|
||||
if (selectedUserType.length > 0) {
|
||||
this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum;
|
||||
this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum
|
||||
}
|
||||
this.user.BaseUrl = `${location.protocol}//${location.host}/login`;
|
||||
this.user.RouteUrl = `${location.protocol}//${location.host}/email-recompose`;
|
||||
this.user.BaseUrl = `${location.protocol}//${location.host}/login`
|
||||
this.user.RouteUrl = `${location.protocol}//${location.host}/email-recompose`
|
||||
if (this.user.Id) {
|
||||
if (this.user.IsZhiZhun) {
|
||||
this.user.OrganizationName = this.hospitalName;
|
||||
}
|
||||
updateUser(this.user)
|
||||
.then((res) => {
|
||||
this.isDisabled = false;
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'));
|
||||
this.isDisabled = false
|
||||
this.$message.success('Updated successfully')
|
||||
})
|
||||
.catch(() => {
|
||||
this.isDisabled = false;
|
||||
});
|
||||
this.isDisabled = false
|
||||
})
|
||||
} else {
|
||||
addUser(this.user)
|
||||
.then((res) => {
|
||||
this.isDisabled = false;
|
||||
this.user.Id = res.Result.Id;
|
||||
this.user.UserCode = res.Result.UserCode;
|
||||
this.$emit("getUserId", res.Result.Id);
|
||||
this.$message.success("Added successfully");
|
||||
this.$router.push({ path: "/system/user/list" });
|
||||
this.isDisabled = false
|
||||
this.user.Id = res.Result.Id
|
||||
this.user.UserCode = res.Result.UserCode
|
||||
this.$emit('getUserId', res.Result.Id)
|
||||
this.$message.success('Added successfully')
|
||||
this.$router.push({ path: '/system/user/list' })
|
||||
})
|
||||
.catch(() => {
|
||||
this.isDisabled = false;
|
||||
});
|
||||
this.isDisabled = false
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
getUserTypeList() {
|
||||
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) {
|
||||
let arr = [2, 4, 5, 8, 9, 12, 14];
|
||||
if (this.hasPermi(["role:oa"])) {
|
||||
arr = [4, 5, 8, 9, 12, 14];
|
||||
}
|
||||
this.userTypeOptions = []
|
||||
this.userTypeOptions = res.Result.map((item) => {
|
||||
if (arr.includes(item.UserTypeEnum)) {
|
||||
return item;
|
||||
}
|
||||
}).filter((item) => item);
|
||||
if (this.type === 1) {
|
||||
this.getUserInfo();
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
getUserInfo() {
|
||||
getUser(this.userId).then((res) => {
|
||||
this.user = res.Result;
|
||||
this.user.Status = parseFloat(this.user.Status);
|
||||
this.AffiliationChange(true);
|
||||
});
|
||||
getUser({
|
||||
IdentityUserId: this.userId,
|
||||
}).then((res) => {
|
||||
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) {
|
||||
if (val) {
|
||||
this.user.OrganizationName = this.hospitalName;
|
||||
} else {
|
||||
this.user.OrganizationName = "";
|
||||
}
|
||||
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, // 1为编辑,0为新增
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
::v-deep .is-error.my_new_pwd {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -1,34 +1,27 @@
|
|||
<template>
|
||||
<box-content>
|
||||
<div class="search" style="position: relative">
|
||||
<SearchForm
|
||||
size="mini"
|
||||
:that="this"
|
||||
:search-data="searchData"
|
||||
:search-form="searchForm"
|
||||
:search-handle="searchHandle"
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
@new="handleAddUser"
|
||||
/>
|
||||
<SearchForm size="mini" :that="this" :search-data="searchData" :search-form="searchForm"
|
||||
:search-handle="searchHandle" @search="handleSearch" @reset="handleReset" @new="handleAddUser" />
|
||||
</div>
|
||||
<base-table
|
||||
v-loading="loading"
|
||||
:columns="columns"
|
||||
:list="users"
|
||||
:search-data="searchData"
|
||||
:total="total"
|
||||
@getList="getList"
|
||||
@editCb="handleEditUser"
|
||||
@deleteCb="handleDeleteUser"
|
||||
@sortByColumn="sortByColumn"
|
||||
>
|
||||
<base-table v-loading="loading" :columns="columns" :list="users" :search-data="searchData" :total="total"
|
||||
@getList="getList" @editCb="handleEditUser" @deleteCb="handleDeleteUser" @sortByColumn="sortByColumn">
|
||||
<!-- 选择自定义slot -->
|
||||
<template slot="genderSlot" slot-scope="{ scope }">
|
||||
{{ scope.row.Sex ? "Male" : "Female" }}
|
||||
</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 }">
|
||||
{{ scope.row.RoleNameList.map((role) => role.RoleName).join(",") }}
|
||||
{{scope.row.RoleNameList.map((role) => role.RoleName).join(",")}}
|
||||
</template>
|
||||
<template slot="isZhiZhunSlot" slot-scope="{ scope }">
|
||||
{{
|
||||
|
|
@ -68,7 +61,7 @@ const searchDataDefault = () => {
|
|||
return {
|
||||
UserName: null,
|
||||
Phone: null,
|
||||
EMail:null,
|
||||
EMail: null,
|
||||
OrganizationName: null,
|
||||
UserState: null,
|
||||
UserType: null,
|
||||
|
|
@ -145,6 +138,7 @@ export default {
|
|||
prop: "UserType",
|
||||
label: this.$t("system:userlist:table:UserType"),
|
||||
minWidth: 100,
|
||||
slot: 'UserTypeSlot',
|
||||
sortable: "custom",
|
||||
showOverflowTooltip: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
$t('trials:trials-myinfo:title:accountInfo')
|
||||
}}</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>
|
||||
<!-- 切换角色 -->
|
||||
<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
|
||||
activeIndex: '2',
|
||||
isReviewer: false,
|
||||
userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
|
||||
// userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
|
||||
notice: '',
|
||||
hospital: {
|
||||
HospitalLogoPath: null,
|
||||
|
|
@ -116,6 +116,7 @@ export default {
|
|||
'device',
|
||||
'TotalNeedSignSystemDocCount',
|
||||
'language',
|
||||
'userTypeShortName'
|
||||
]),
|
||||
roles() {
|
||||
return this.$store.state.user.roles
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ export default {
|
|||
.then(async (res) => {
|
||||
this.user = res.Result;
|
||||
/* eslint-disable */
|
||||
zzSessionStorage.setItem("realName", this.user.RealName);
|
||||
zzSessionStorage.setItem("Name", this.user.FullName);
|
||||
await store.dispatch("user/updateInfo");
|
||||
loading.close();
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
<template>
|
||||
<el-form
|
||||
v-if="isRender"
|
||||
ref="measurementForm"
|
||||
v-loading="loading"
|
||||
:model="questionForm"
|
||||
size="mini"
|
||||
class="measurement-form"
|
||||
>
|
||||
<el-form v-if="isRender" ref="measurementForm" v-loading="loading" :model="questionForm" size="mini"
|
||||
class="measurement-form">
|
||||
<div class="base-dialog-body">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<h3 v-if="questionName" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
|
|
@ -19,169 +13,104 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<el-form-item
|
||||
:label="$t('trials:reading:title:lesionType')"
|
||||
prop="LesionType"
|
||||
:rules="[
|
||||
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
||||
]"
|
||||
>
|
||||
<el-form-item :label="$t('trials:reading:title:lesionType')" prop="LesionType" :rules="[
|
||||
{ required: true, message: $t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||
]">
|
||||
<!-- 下拉框 -->
|
||||
<el-select
|
||||
v-model="questionForm.LesionType"
|
||||
filterable
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 || !isBaseLineTask"
|
||||
@change="((val)=>{lesionTypeChange(val)})"
|
||||
>
|
||||
<el-select v-model="questionForm.LesionType" filterable
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2 || !isBaseLineTask"
|
||||
@change="((val) => { lesionTypeChange(val) })">
|
||||
|
||||
<el-option
|
||||
v-for="item of $d.LesionType"
|
||||
v-show="!(isBaseLineTask && item.value === 2)"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d.LesionType" v-show="!(isBaseLineTask && item.value === 2)" :key="item.id"
|
||||
:value="item.value" :label="item.label" />
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- :rules="[
|
||||
{ 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,
|
||||
message: '请注明', trigger: ['blur']},
|
||||
]" -->
|
||||
<el-form-item
|
||||
v-for="qs in questions"
|
||||
v-show="qs.ShowQuestion!==2"
|
||||
:key="qs.Id"
|
||||
:label="`${qs.QuestionName}`"
|
||||
:prop="qs.Id"
|
||||
:rules="[
|
||||
{ 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',
|
||||
message:['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||
]"
|
||||
>
|
||||
<!-- {{ isCurrentTaskAdd }}
|
||||
{{ questionForm.IsCanEditPosition }} -->
|
||||
|
||||
<el-form-item v-for="qs in questions" v-show="qs.ShowQuestion !== 2" :key="qs.Id" :label="`${qs.QuestionName}`"
|
||||
:prop="qs.Id" :rules="[
|
||||
{
|
||||
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',
|
||||
message: ['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||
},
|
||||
]">
|
||||
<span slot="label" style="display:inline-block;">
|
||||
<el-tooltip
|
||||
v-if="qs.QuestionMark === 0 && (questionForm.LesionOrgan === '肝脏' || questionForm.LesionOrgan === 'Liver') && (lesionType === 0 || lesionType === 1 || lesionType === 2) && questionForm.IntrahepaticLesion"
|
||||
effect="dark" :content="$t('trials:mRecist:warnning:msg1')" placement="bottom">
|
||||
<i class='el-icon-warning' />
|
||||
</el-tooltip>
|
||||
{{ qs.QuestionName }}
|
||||
</span>
|
||||
<!-- 输入框 -->
|
||||
<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]"
|
||||
: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">
|
||||
<template v-if="qs.Type === 'input' || qs.Type === 'number'">
|
||||
<el-input v-if="qs.Type === 'input' || qs.Type === 'number'" v-model="questionForm[qs.Id]"
|
||||
: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)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<!-- 多行文本输入框 -->
|
||||
<el-input
|
||||
v-if="qs.Type==='textarea'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
/>
|
||||
<el-input v-if="qs.Type === 'textarea'" v-model="questionForm[qs.Id]" 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')"
|
||||
: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))"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
>
|
||||
: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))
|
||||
|| (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>
|
||||
<span style="padding-left: 5px;">
|
||||
<i class="el-icon-search" />
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="qs.TableQuestionType === 1">
|
||||
<el-option
|
||||
v-for="item in organList"
|
||||
:key="item.Id"
|
||||
:label="item[qs.DataTableColumn]"
|
||||
:value="item[qs.DataTableColumn]"
|
||||
/>
|
||||
<el-option v-for="item in organList" :key="item.Id" :label="item[qs.DataTableColumn]"
|
||||
:value="item[qs.DataTableColumn]" />
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && isBaseLineTask">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="(lesionType === 0 && item.value ===0) || (lesionType === 1 && (item.value ===0))"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="(lesionType === 0 && item.value === 0) || (lesionType === 1 && (item.value === 0))" :key="item.id"
|
||||
:value="item.value" :label="item.label" />
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && !isBaseLineTask">
|
||||
<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
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d[qs.DictionaryCode]" v-show="item.value === 0" :key="item.id"
|
||||
:value="item.value" :label="item.label" />
|
||||
</template>
|
||||
<!-- 首次添加的新病灶不能为无法评估和消失 -->
|
||||
<template v-else-if="isCurrentTaskAdd=== 'True' && lesionType === 2">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0 || item.value === 1"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
<template v-else-if="isCurrentTaskAdd === 'True' && lesionType === 2">
|
||||
<el-option v-for="item of $d[qs.DictionaryCode]" v-show="item.value === 0 || item.value === 1"
|
||||
:key="item.id" :value="item.value" :label="item.label" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of filterState($d[qs.DictionaryCode])"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of filterState($d[qs.DictionaryCode])" :key="item.id" :value="item.value"
|
||||
:label="item.label" />
|
||||
</template>
|
||||
</el-option-group>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark !== 7">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d[qs.DictionaryCode]" :key="item.id" :value="item.value" :label="item.label" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="val in qs.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
:value="val"
|
||||
/>
|
||||
<el-option v-for="val in qs.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
||||
</template>
|
||||
|
||||
</el-select>
|
||||
<!-- 单选 -->
|
||||
<el-radio-group
|
||||
v-if="qs.Type==='radio'"
|
||||
v-model="questionForm[qs.id]"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
>
|
||||
<el-radio
|
||||
v-for="val in qs.options.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
>
|
||||
<el-radio-group v-if="qs.Type === 'radio'" v-model="questionForm[qs.id]"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2">
|
||||
<el-radio v-for="val in qs.options.split('|')" :key="val" :label="val">
|
||||
{{ val }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -189,33 +118,19 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="isCurrentTask && readingTaskState<2"
|
||||
class="base-dialog-footer"
|
||||
style="text-align:right;margin-top:10px;"
|
||||
>
|
||||
<div v-if="isCurrentTask && readingTaskState < 2" class="base-dialog-footer"
|
||||
style="text-align:right;margin-top:10px;">
|
||||
|
||||
<!-- 清除标记 -->
|
||||
<el-button
|
||||
v-if="questionForm.MeasureData"
|
||||
size="mini"
|
||||
@click="handleDeleteMeasureData"
|
||||
>
|
||||
<el-button v-if="questionForm.MeasureData" size="mini" @click="handleDeleteMeasureData">
|
||||
{{ $t('trials:reading:button:removeMark') }}
|
||||
</el-button>
|
||||
<!-- 删除 -->
|
||||
<el-button
|
||||
v-if="isCurrentTaskAdd !== 'False'"
|
||||
size="mini"
|
||||
@click="handleDelete"
|
||||
>
|
||||
<el-button v-if="isCurrentTaskAdd !== 'False'" size="mini" @click="handleDelete">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleSave"
|
||||
>
|
||||
<el-button size="mini" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -327,7 +242,8 @@ export default {
|
|||
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, '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 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
if (this.questionForm.RowId) {
|
||||
|
|
@ -352,12 +268,12 @@ export default {
|
|||
await this.setMeasureData(this.answers.measureObj, true)
|
||||
} else {
|
||||
if (this.questionForm.MeasureData) {
|
||||
// 十字线工具 且是靶病灶 器官只能是淋巴结类型
|
||||
// 十字线工具 且是靶病灶 器官只能是淋巴结类型
|
||||
if (this.questionForm.MeasureData.type === 'Bidirectional') {
|
||||
this.organList = []
|
||||
await this.getOrganInfoList(1)
|
||||
} else if (this.questionForm.MeasureData.type === 'Length') {
|
||||
// 直径测量工具 且是靶病灶 器官只能是非淋巴结类型
|
||||
// 直径测量工具 且是靶病灶 器官只能是非淋巴结类型
|
||||
this.organList = []
|
||||
await this.getOrganInfoList(0)
|
||||
} else {
|
||||
|
|
@ -469,8 +385,8 @@ export default {
|
|||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {})
|
||||
.catch(() => {})
|
||||
.then(() => { })
|
||||
.catch(() => { })
|
||||
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
|
||||
return
|
||||
}
|
||||
|
|
@ -483,7 +399,7 @@ export default {
|
|||
this.$confirm(msg, {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
|
||||
return
|
||||
|
|
@ -543,16 +459,29 @@ export default {
|
|||
var selected = this.organList[index]
|
||||
question.RelationQuestions.map(qs => {
|
||||
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, 'OrganInfoId', selected.OrganInfoId)
|
||||
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 {
|
||||
question.RelationQuestions.map(qs => {
|
||||
this.$set(this.questionForm, qs.Id, '')
|
||||
})
|
||||
}
|
||||
}
|
||||
if (question.QuestionMark === 21) {
|
||||
this.$set(this.questionForm, 'IntrahepaticLesion', this.questionForm[question.Id])
|
||||
}
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
|
|
@ -655,9 +584,24 @@ export default {
|
|||
var isLymphLesion = this.getQuestionVal(2)
|
||||
var lesionLength = this.getQuestionVal(0)
|
||||
var lesionShort = this.getQuestionVal(1)
|
||||
var lesionOrgan = this.getQuestionVal(5)
|
||||
var IntrahepaticLesion = this.getQuestionVal(21)
|
||||
// 新病灶的器官为肝脏时,如果是典型肝内病灶,当直径≥1cm时自动设置病灶状态为“明确”(0),当直径<1cm时,自动设置病灶状态为“疑似”(1);
|
||||
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')) {
|
||||
// 非基线时,非淋巴结病灶长径>=10mm,自动给“存在”状态,如果淋巴结病灶短径>=10mm,自动给“存在”状态。
|
||||
// 非基线时,非淋巴结病灶长径>=10mm,自动给“存在”状态,如果淋巴结病灶短径>=10mm,自动给“存在”状态。
|
||||
if (!this.isBaseLineTask && ((measureData.type === 'Length' && lesionLength >= 10) || (measureData.type === 'Bidirectional' && lesionShort >= 10))) {
|
||||
const stateId = this.getQuestionId(7)
|
||||
this.$set(this.questionForm, stateId, 0)
|
||||
|
|
@ -721,7 +665,7 @@ export default {
|
|||
this.$set(this.questionForm, 'MeasureData', measureData)
|
||||
const isLymph = this.getQuestionVal(2)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
// const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionL = this.getQuestionVal(0)
|
||||
const lesionS = this.getQuestionVal(1)
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
|
|
@ -844,6 +788,26 @@ export default {
|
|||
var lesionLength = this.getQuestionVal(0)
|
||||
var lesionShort = this.getQuestionVal(1)
|
||||
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) {
|
||||
// 基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
|
|
@ -855,7 +819,17 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg19'), {
|
||||
type: 'warning',
|
||||
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()
|
||||
return
|
||||
|
|
@ -867,7 +841,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg20'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -884,7 +858,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg21'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -896,7 +870,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg22'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -914,7 +888,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg23'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -926,7 +900,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg24'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -942,7 +916,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg25'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -958,7 +932,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg26'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -979,7 +953,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg27'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -991,7 +965,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg28'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1026,7 +1000,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg29'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1038,7 +1012,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg30'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1059,7 +1033,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg31'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1071,7 +1045,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg32'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1088,7 +1062,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg33'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1100,7 +1074,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg34'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1117,7 +1091,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg35'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1129,7 +1103,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg36'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1146,7 +1120,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg37'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1158,7 +1132,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg38'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1175,7 +1149,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg39'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1187,7 +1161,27 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg40'), {
|
||||
type: 'warning',
|
||||
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()
|
||||
return
|
||||
|
|
@ -1204,7 +1198,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg41'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1216,7 +1210,28 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg42'), {
|
||||
type: 'warning',
|
||||
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()
|
||||
return
|
||||
|
|
@ -1233,7 +1248,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg43'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1245,7 +1260,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg44'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1262,7 +1277,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg45'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1274,7 +1289,7 @@ export default {
|
|||
this.$confirm(this.$t('trials:reading:warnning:msg46'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
|
|
@ -1330,7 +1345,7 @@ export default {
|
|||
}
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// 保存成功!
|
||||
// 保存成功!
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.currentMarkTool = measureData ? measureData.type : ''
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
||||
|
|
@ -1500,42 +1515,50 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.measurement-form{
|
||||
/deep/ .el-form-item__label{
|
||||
.measurement-form {
|
||||
/deep/ .el-form-item__label {
|
||||
color: #c3c3c3;
|
||||
}
|
||||
/deep/ .el-input .el-input__inner{
|
||||
|
||||
/deep/ .el-input .el-input__inner {
|
||||
background-color: transparent;
|
||||
color: #ddd;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
/deep/ .el-form-item{
|
||||
|
||||
/deep/ .el-form-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
/deep/ .el-form-item__content{
|
||||
|
||||
/deep/ .el-form-item__content {
|
||||
flex: 1;
|
||||
}
|
||||
/deep/ .el-input.is-disabled .el-input__inner{
|
||||
|
||||
/deep/ .el-input.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
/deep/ .el-select.is-disabled .el-input__inner{
|
||||
|
||||
/deep/ .el-select.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
/deep/ .el-button--mini, .el-button--mini.is-round {
|
||||
|
||||
/deep/ .el-button--mini,
|
||||
.el-button--mini.is-round {
|
||||
padding: 7px 10px;
|
||||
}
|
||||
.el-form-item__content
|
||||
.el-select{
|
||||
|
||||
.el-form-item__content .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.input-width1{
|
||||
width: calc(100% -60px)!important;
|
||||
|
||||
.input-width1 {
|
||||
width: calc(100% -60px) !important;
|
||||
}
|
||||
.input-width2{
|
||||
|
||||
.input-width2 {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -8,119 +8,117 @@
|
|||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')"
|
||||
placement="bottom">
|
||||
<i class="el-icon-refresh-left" @click="resetMeasuredData" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 非测量问题 -->
|
||||
<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>
|
||||
<!-- 测量问题 -->
|
||||
<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;">
|
||||
{{ language==='en'?qs.GroupEnName:qs.GroupName }}
|
||||
{{ language === 'en' ? qs.GroupEnName : qs.GroupName }}
|
||||
</h4>
|
||||
<div class="lesion_list">
|
||||
<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 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" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- @change="handleCollapseChange(qs.Childrens,item)" -->
|
||||
<el-collapse
|
||||
v-if="item.Type === 'table' && item.TableQuestions"
|
||||
v-model="activeName"
|
||||
accordion
|
||||
@change="handleCollapseChange"
|
||||
>
|
||||
<el-collapse-item
|
||||
v-for="(q,i) in item.TableQuestions.Answers"
|
||||
:key="`${item.Id}_${q.RowIndex}`"
|
||||
<el-collapse v-if="item.Type === 'table' && item.TableQuestions" v-model="activeName" accordion
|
||||
@change="handleCollapseChange">
|
||||
<el-collapse-item v-for="(q, i) in item.TableQuestions.Answers" :key="`${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">
|
||||
<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" />
|
||||
</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" />
|
||||
</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; -->
|
||||
<div style="font-size: 11px;width:220px;height: 30px;">
|
||||
<div
|
||||
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"
|
||||
>
|
||||
<el-tooltip v-if="!!item.TableQuestions.Answers[i].lesionPart" class="item" effect="dark" :content="item.TableQuestions.Answers[i].lesionPart" placement="bottom">
|
||||
<div 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">
|
||||
<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>
|
||||
</el-tooltip>
|
||||
</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">
|
||||
{{ $fd('TargetState',parseInt(item.TableQuestions.Answers[i].lesionState)) }}
|
||||
{{ $fd('TargetState', parseInt(item.TableQuestions.Answers[i].lesionState)) }}
|
||||
</span>
|
||||
<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 v-else>
|
||||
{{ $fd('NewLesionState',parseInt(item.TableQuestions.Answers[i].lesionState)) }}
|
||||
{{ $fd('NewLesionState', parseInt(item.TableQuestions.Answers[i].lesionState)) }}
|
||||
</span>
|
||||
</div>
|
||||
<div 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))">
|
||||
<div
|
||||
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
|
||||
</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
|
||||
</template>
|
||||
</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">
|
||||
<i class="iconfont icon-24gl-split" style="color:#fff;font-size: 16px;" @click.stop="handleSplit(item.TableQuestions.Answers[i].RowId,item.Id)" />
|
||||
<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">
|
||||
<i class="iconfont icon-24gl-split" style="color:#fff;font-size: 16px;"
|
||||
@click.stop="handleSplit(item.TableQuestions.Answers[i].RowId, item.Id)" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<QuestionForm
|
||||
:ref="`${item.Id}_${q.RowIndex}`"
|
||||
:questions="item.TableQuestions.Questions"
|
||||
:answers="item.TableQuestions.Answers[i]"
|
||||
:lesion-type="item.LesionType"
|
||||
:order-mark="item.OrderMark"
|
||||
:table-questions="tableQuestions"
|
||||
:row-index="String(q.RowIndex)"
|
||||
: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"
|
||||
/>
|
||||
<QuestionForm :ref="`${item.Id}_${q.RowIndex}`" :questions="item.TableQuestions.Questions"
|
||||
:answers="item.TableQuestions.Answers[i]" :lesion-type="item.LesionType"
|
||||
:order-mark="item.OrderMark" :table-questions="tableQuestions" :row-index="String(q.RowIndex)"
|
||||
: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>
|
||||
|
|
@ -274,6 +272,7 @@ export default {
|
|||
this.$nextTick(() => {
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId)
|
||||
this.getTableQuestions()
|
||||
this.getQuestions(this.tableQuestions)
|
||||
this.tableQuestions.forEach(item => {
|
||||
item.TableQuestions.Answers.forEach(i => {
|
||||
var refName = `${item.Id}_${i.RowIndex}`
|
||||
|
|
@ -288,6 +287,7 @@ export default {
|
|||
await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId })
|
||||
|
||||
this.getTableQuestions()
|
||||
this.getQuestions(this.tableQuestions)
|
||||
},
|
||||
setQuestions(questions, obj) {
|
||||
questions.forEach(item => {
|
||||
|
|
@ -324,6 +324,8 @@ export default {
|
|||
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, '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)
|
||||
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
|
||||
this.$set(answerObj, 'isLymphLesion', isLymphLesion)
|
||||
|
|
@ -397,6 +399,7 @@ export default {
|
|||
this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask
|
||||
}
|
||||
this.getTableQuestions()
|
||||
this.getQuestions(this.tableQuestions)
|
||||
this.$nextTick(() => {
|
||||
this.tableQuestions.forEach(item => {
|
||||
item.TableQuestions.Answers.forEach(i => {
|
||||
|
|
@ -495,7 +498,7 @@ export default {
|
|||
.then(() => {
|
||||
this.split(rowId, questionId)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => { })
|
||||
} else {
|
||||
// 是否确认分裂
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg4'), {
|
||||
|
|
@ -505,7 +508,7 @@ export default {
|
|||
.then(() => {
|
||||
this.split(rowId, questionId)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => { })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -631,7 +634,7 @@ export default {
|
|||
this.$confirm(msg, {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
@ -642,7 +645,7 @@ export default {
|
|||
this.$confirm(msg, {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
callback: action => { }
|
||||
})
|
||||
} else {
|
||||
// saveTypeEnum: 0
|
||||
|
|
@ -781,7 +784,7 @@ export default {
|
|||
async changeLesionType(questionsObj) {
|
||||
await store.dispatch('reading/removeReadingQuestionAndAnswer', { lesionType: questionsObj.oldLesionType, rowIndex: questionsObj.rowIndex, visitTaskId: this.visitTaskId })
|
||||
// saveTypeEnum: 0
|
||||
var lesionObj = { }
|
||||
var lesionObj = {}
|
||||
var questionObj = questionsObj.questionForm
|
||||
// 切换到新的病灶集合
|
||||
var targetObj = this.tableQuestions.find(item => item.LesionType === questionsObj.newLesionType)
|
||||
|
|
@ -1058,23 +1061,26 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.measurement-wrapper{
|
||||
.measurement-wrapper {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
// overflow: hidden;
|
||||
|
||||
.container{
|
||||
.container {
|
||||
padding: 10px;
|
||||
.basic-info{
|
||||
|
||||
.basic-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3{
|
||||
|
||||
h3 {
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
i{
|
||||
|
||||
i {
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
|
|
@ -1082,14 +1088,16 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.title{
|
||||
|
||||
.title {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
color: #ddd;
|
||||
font-size: 15px;
|
||||
|
||||
}
|
||||
.add-icon{
|
||||
|
||||
.add-icon {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
color: #ddd;
|
||||
|
|
@ -1098,42 +1106,49 @@ export default {
|
|||
margin-bottom: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.add-icon:hover{
|
||||
|
||||
.add-icon:hover {
|
||||
background-color: #607d8b;
|
||||
}
|
||||
|
||||
.flex-row{
|
||||
.flex-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background-color: #424242;
|
||||
|
||||
}
|
||||
.lesion_list{
|
||||
|
||||
.lesion_list {
|
||||
position: relative;
|
||||
}
|
||||
.el-collapse{
|
||||
border-bottom:none;
|
||||
border-top:none;
|
||||
/deep/ .el-collapse-item{
|
||||
background-color: #000!important;
|
||||
|
||||
.el-collapse {
|
||||
border-bottom: none;
|
||||
border-top: none;
|
||||
|
||||
/deep/ .el-collapse-item {
|
||||
background-color: #000 !important;
|
||||
color: #ddd;
|
||||
|
||||
}
|
||||
/deep/ .el-collapse-item__header{
|
||||
background-color: #000!important;
|
||||
|
||||
/deep/ .el-collapse-item__header {
|
||||
background-color: #000 !important;
|
||||
color: #ddd;
|
||||
border-bottom-color:#5a5a5a;
|
||||
border-bottom-color: #5a5a5a;
|
||||
padding-left: 5px;
|
||||
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;
|
||||
}
|
||||
/deep/ .el-collapse-item__content{
|
||||
width:260px;
|
||||
|
||||
/deep/ .el-collapse-item__content {
|
||||
width: 260px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
|
|
@ -1142,7 +1157,7 @@ export default {
|
|||
z-index: 1;
|
||||
color: #ddd;
|
||||
padding: 5px;
|
||||
background-color:#1e1e1e;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,7 +261,8 @@ export default {
|
|||
ntLesionCount: null,
|
||||
openWindow: null,
|
||||
reportBtnLoading: false,
|
||||
previewFileVisible: false
|
||||
previewFileVisible: false,
|
||||
fileData: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -795,6 +796,9 @@ export default {
|
|||
sysRes = this.$fd('OverallAssessment', this.tumorEvaluate)
|
||||
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>')
|
||||
return msg
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue