项目配置修改

uat
wangxiaoshuang 2025-02-27 15:13:56 +08:00
parent 4ba4d7cf00
commit 858a650986
2 changed files with 364 additions and 1 deletions

View File

@ -103,6 +103,7 @@
<el-form-item
:label="$t('trials:logincCfg:form:subjectAge')"
prop="IsHaveSubjectAge"
v-if="showMore"
>
<el-radio-group
v-model="form.IsHaveSubjectAge"
@ -121,6 +122,7 @@
<el-form-item
:label="$t('trials:logincCfg:form:subjectGender')"
prop="IsSubjectSexView"
v-if="showMore"
>
<el-radio-group
v-model="form.IsSubjectSexView"
@ -152,6 +154,7 @@
<el-form-item
:label="$t('trials:logincCfg:form:imageCopy')"
prop="IsImageReplicationAcrossTrial"
v-if="showMore"
>
<el-radio-group
v-model="form.IsImageReplicationAcrossTrial"
@ -203,6 +206,45 @@
@click="handleSetModality"
/>
</el-form-item>
<!--展示检查名称-->
<el-form-item
:label="$t('trials:logincCfg:form:IsShowStudyName ')"
prop="IsShowStudyName"
v-if="showMore"
>
<el-radio-group
v-model="form.IsShowStudyName"
:disabled="form.IsTrialBasicLogicConfirmed && !isEdit"
@input="IsShowStudyNameChange"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 检查名称 -->
<el-form-item
:label="$t('trials:logincCfg:form:StudyNameList')"
prop="StudyNameTypes"
v-if="form.IsShowStudyName && showMore"
>
<el-input
v-model="form.StudyNameTypes"
type="textarea"
:autosize="{ minRows: 2, maxRows: 8 }"
style="width: 80%"
disabled
/>
<el-button
:disabled="form.IsTrialBasicLogicConfirmed && !isEdit"
icon="el-icon-plus"
circle
@click="handleSetStudyName"
/>
</el-form-item>
<!-- 影像质疑超限天数 -->
<el-form-item
:label="$t('trials:logincCfg:form:exceededDays')"
@ -215,6 +257,19 @@
:disabled="form.IsTrialBasicLogicConfirmed && !isEdit"
/>
</el-form-item>
<el-form-item>
<div
:class="{ showMore: true, isCheck: showMore }"
@click.stop="showMore = !showMore"
>
<i class="el-icon-arrow-down"></i>
<span>{{
showMore
? $t('trials:logincCfg:button:packUp')
: $t('trials:logincCfg:button:more')
}}</span>
</div>
</el-form-item>
<el-form-item>
<!-- 保存 -->
<el-button
@ -279,7 +334,8 @@
v-if="
(form.IsTrialBasicLogicConfirmed === false ||
(form.IsTrialBasicLogicConfirmed === true && isEdit)) &&
hasPermi(['trials:trials-panel:setting:trial-config:save'])
hasPermi(['trials:trials-panel:setting:trial-config:save']) &&
showMore
"
>
{{ $t('common:button:terminology') }}
@ -748,6 +804,121 @@
:visible.sync="terminologyVisible"
:DATA.sync="form.TrialObjectNameList"
/>
<el-dialog
v-if="studyNameListVisible"
:visible.sync="studyNameListVisible"
:close-on-click-modal="false"
:title="$t('trials:logincCfg:form:studyName')"
custom-class="base-dialog-wrapper"
width="400px"
>
<div class="base-dialog-body" style="position: relative">
<el-button
size="small"
type="primary"
@click="addStudyName_model.visible = true"
style="position: absolute; top: 10px; right: 10px; z-index: 9"
>
{{ $t('common:button:add') }}
</el-button>
<el-table
ref="studyNameTable"
v-loading="listLoading"
:data="trialStudyNameList"
stripe
height="400"
row-key="Name"
@selection-change="handleStudyNameSelectionChange"
>
<el-table-column
type="selection"
align="left"
width="45"
:reserve-selection="true"
/>
<el-table-column
prop="Name"
:label="$t('trials:logincCfg:form:studyName')"
>
<template slot-scope="scope">
<div class="bodyPartName">
<span :title="isEN ? scope.row.EnName : scope.row.Name">{{
isEN ? scope.row.EnName : scope.row.Name
}}</span>
<el-button
circle
icon="el-icon-delete"
:title="$t('trials:logincCfg:form:StudyName:del')"
@click.stop="handleDelStudyName(scope.row)"
/>
</div>
</template>
</el-table-column>
</el-table>
</div>
<div
class="base-dialog-footer"
style="text-align: right; margin-top: 10px"
>
<el-button
size="small"
type="primary"
:disabled="listLoading"
@click="studyNameListVisible = false"
>
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
:disabled="listLoading"
@click="handleConfirmStudyName"
>
{{ $t('common:button:confirm') }}
</el-button>
</div>
</el-dialog>
<!--新增检查名称-->
<base-model v-if="addStudyName_model.visible" :config="addStudyName_model">
<template slot="dialog-body">
<el-form
ref="addStudyNameForm"
:inline="true"
:model="addStudyNameForm"
class="demo-form-inline"
:rules="addStudyNamerules"
>
<el-form-item
:label="$t('trials:setting:form:studyName')"
prop="Name"
label-width="150px"
>
<el-input
v-model.trim="addStudyNameForm.Name"
clearable
type="textarea"
:rows="2"
></el-input>
</el-form-item>
<el-form-item
:label="$t('trials:setting:form:bodyPart')"
style="display: none"
prop="bodyPartStr"
label-width="150px"
>
<el-input clearable :maxlength="50"></el-input>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button type="primary" @click="addOrUpdateTrialStudyName">
{{ $t('common:button:confirm') }}
</el-button>
<el-button @click="addStudyName_model.visible = false">
{{ $t('common:button:cancel') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
@ -772,6 +943,7 @@ export default {
components: { SignForm, ClinicalDataForm, BaseModel, terminology },
data() {
return {
showMore: false,
form: {
TrialId: '',
IsNoticeSubjectCodeRule: false,
@ -785,6 +957,9 @@ export default {
// ClinicalInformationTransmissionEnum: 1,
IsImageReplicationAcrossTrial: false,
BodyPartTypes: '',
StudyNameTypes: '',
IsShowStudyName: null,
StudyNameList: [],
BodyPartTypeList: [],
Modalitys: '',
ModalityList: [],
@ -855,6 +1030,13 @@ export default {
trigger: 'blur',
},
],
StudyNameTypes: [
{
required: true,
message: this.$t('trials:trialCfg:formRule:bodyPart'),
trigger: 'blur',
},
],
// Modalitys: [
// { required: true, message: this.$t('trials:trialCfg:formRule:modality'), trigger: 'blur' },
// { max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500` }
@ -894,19 +1076,32 @@ export default {
listLoading: false,
modalityListVisible: false,
bodyPartListVisible: false,
studyNameListVisible: false,
selectedList: [],
selectedBodyParts: [],
trialBodyPartList: [],
trialStudyNameList: [],
addBodyPart_model: {
visible: false,
title: this.$t('trials:setting:button:add'),
width: '500px',
appendToBody: true,
},
addStudyName_model: {
visible: false,
title: this.$t('trials:setting:button:add'),
width: '500px',
appendToBody: true,
},
addBodyPartForm: {
bodyPartStr: null,
Id: null,
},
addStudyNameForm: {
Name: null,
EnName: null,
IeChoose: false,
},
addBodyPartrules: {
bodyPartStr: [
{
@ -932,6 +1127,31 @@ export default {
},
],
},
addStudyNamerules: {
Name: [
{
required: true,
message: this.$t('trials:setting:format:notStudyName'),
trigger: ['blur', 'change'],
},
{
validator: (rule, value, callback) => {
let flag = this.trialStudyNameList.some(
(item) => item.Name === value
)
if (flag) {
callback(
new Error(this.$t('trials:setting:format:hasStudyName'))
)
} else {
callback()
}
},
message: this.$t('trials:setting:format:hasStudyName'),
trigger: ['blur', 'change'],
},
],
},
errMessage: null,
renderFunc(h, option) {
@ -947,6 +1167,11 @@ export default {
// created() {
// this.getTrialBodyPartList();
// },
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
},
methods: {
openTerminology() {
this.terminologyVisible = true
@ -1003,6 +1228,30 @@ export default {
handleBodyPartSelectionChange(val) {
this.selectedBodyParts = val
},
IsShowStudyNameChange(val) {
// if (!val) {
// if (this.form.StudyNameList && this.form.StudyNameList.length > 0) {
// this.form.StudyNameList.forEach((item) => {
// item.IsChoose = false
// })
// } else {
// this.form.StudyNameList = []
// }
// thiss.form.StudyNameTypes = null
// }
},
handleStudyNameSelectionChange(val) {
let data = []
if (val) {
data = val.map((item) => item.Name)
}
this.trialStudyNameList.forEach((item) => {
item.IsChoose = false
if (data.includes(item.Name)) {
item.IsChoose = true
}
})
},
//
async getTrialBodyPartList(data) {
try {
@ -1073,6 +1322,19 @@ export default {
}
}
},
async addOrUpdateTrialStudyName() {
let validate = await this.$refs.addStudyNameForm.validate()
if (!validate) return
this.addStudyNameForm.EnName = this.addStudyNameForm.Name
let data = { ...this.addStudyNameForm }
this.trialStudyNameList.push(data)
this.addStudyNameForm = {
EnName: null,
Name: null,
IsChoose: false,
}
this.addStudyName_model.visible = false
},
//
handleEditBodyPart(item) {
this.addBodyPartForm.bodyPartStr = item.Name
@ -1081,6 +1343,12 @@ export default {
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
this.addBodyPart_model.visible = true
},
handleDelStudyName(item) {
let index = this.trialStudyNameList.findIndex(
(data) => item.Name === data.Name
)
this.trialStudyNameList.splice(index, 1)
},
handleSetBodyPart() {
this.bodyPartListVisible = true
this.$nextTick(() => {
@ -1092,6 +1360,19 @@ export default {
this.toggleBodyPartSelection(a)
})
},
handleSetStudyName() {
this.studyNameListVisible = true
this.trialStudyNameList = []
this.form.StudyNameList.forEach((item) => {
this.trialStudyNameList.push({
...item,
})
})
this.$nextTick(() => {
let select = this.trialStudyNameList.filter((item) => item.IsChoose)
this.toggleStudyNameSelection(select)
})
},
toggleBodyPartSelection(rows) {
if (rows) {
rows.forEach((row) => {
@ -1101,6 +1382,15 @@ export default {
this.$refs.bodyPartTable.clearSelection()
}
},
toggleStudyNameSelection(rows) {
if (rows) {
rows.forEach((row) => {
this.$refs.studyNameTable.toggleRowSelection(row)
})
} else {
this.$refs.studyNameTable.clearSelection()
}
},
handleConfirmBodyParts() {
this.form.BodyPartTypeList = Object.assign(
[],
@ -1112,6 +1402,14 @@ export default {
this.form.BodyPartTypes = bodyPartTypes.join(' | ')
this.bodyPartListVisible = false
},
handleConfirmStudyName() {
var studyNameTypes = this.trialStudyNameList.filter((i) => i.IsChoose)
this.form.StudyNameTypes = this.isEN
? studyNameTypes.map((item) => item.EnName).join(', ')
: studyNameTypes.map((item) => item.Name).join(', ')
this.form.StudyNameList = this.trialStudyNameList
this.studyNameListVisible = false
},
//
handleSave() {
this.$refs['logicalConfigForm'].validate((valid) => {
@ -1305,6 +1603,16 @@ export default {
NewVal: this.form.ModalityListStr,
OldVal: this.initialForm.ModalityListStr,
},
{
Name: this.$t('trials:logincCfg:form:IsShowStudyName '),
NewVal: this.$fd('YesOrNo', this.form.IsShowStudyName),
OldVal: this.$fd('YesOrNo', this.initialForm.IsShowStudyName),
},
{
Name: this.$t('trials:logincCfg:form:StudyNameList'),
NewVal: this.form.StudyNameTypes,
OldVal: this.initialForm.StudyNameTypes,
},
{
Name: this.$t('trials:logincCfg:form:exceededDays'),
NewVal: this.form.ChangeDefalutDays,
@ -1355,6 +1663,16 @@ export default {
let BodyPartTypes = res.BodyPartTypes
this.form.BodyPartTypes = ''
this.form.BodyPartTypeList = BodyPartTypes.split('|')
let StudyNameTypes = this.form.StudyNameList.filter(
(item) => item.IsChoose
)
this.form.StudyNameTypes = ''
if (StudyNameTypes && StudyNameTypes.length > 0) {
this.form.StudyNameTypes = this.isEN
? StudyNameTypes.map((item) => item.EnName).join(', ')
: StudyNameTypes.map((item) => item.Name).join(', ')
}
let r = await this.getTrialBodyPartList()
if (r) {
var bodyPartTypes = this.form.BodyPartTypeList.map((i) => {
@ -1596,4 +1914,16 @@ export default {
margin: 0;
}
}
.showMore {
cursor: pointer;
color: #409eff;
i {
transition: 0.3s;
}
}
.showMore.isCheck {
i {
transform: rotate(180deg);
}
}
</style>

View File

@ -139,6 +139,25 @@
</el-radio>
</el-radio-group>
</el-form-item>
<!--图像格式-->
<el-form-item
:label="$t('trials:processCfg:form:ImageFormatList')"
prop="ImageFormatList"
v-if="[0, 2].includes(form.CollectImagesEnum)"
>
<el-checkbox-group
v-model="form.ImageFormatList"
:disabled="form.IsTrialProcessConfirmed && !isEdit"
>
<el-checkbox
v-for="item in $d.ImageFormat"
:label="item.value"
:key="item.id"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<!-- 修约小数位数 -->
<!-- <el-form-item
:label="$t('trials:processCfg:form:digitPlaces')"
@ -1179,6 +1198,7 @@ export default {
ClinicalDataSetNamesStr: '',
QCProcessEnum: null,
CollectImagesEnum: null,
ImageFormatList: [],
IsImageConsistencyVerification: null,
ReadingMode: null,
// ImagePlatform: null,
@ -1218,6 +1238,14 @@ export default {
trigger: ['blur', 'change'],
},
],
ImageFormatList: [
{
type: 'array',
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: ['blur', 'change'],
},
],
QCProcessEnum: [
{
required: true,
@ -1492,6 +1520,11 @@ export default {
this.initialForm.CollectImagesEnum
),
},
{
Name: this.$t('trials:processCfg:form:ImageFormatList'), //
NewVal: this.form.ImageFormatList.join(', '),
OldVal: this.initialForm.ImageFormatList.join(', '),
},
// {
// Name: this.$t('trials:processCfg:form:criterion'), //
// NewVal: criterions.length > 0 ? criterions.join(', ') : '',