术语配置修改
parent
093cffa298
commit
8c5297e401
|
@ -300,7 +300,9 @@ async function VueInit() {
|
||||||
}
|
}
|
||||||
let text = i18n.t(key)
|
let text = i18n.t(key)
|
||||||
if (Array.isArray(store.state.trials.config.TrialObjectNameList) && store.state.trials.config.TrialObjectNameList.length > 0) {
|
if (Array.isArray(store.state.trials.config.TrialObjectNameList) && store.state.trials.config.TrialObjectNameList.length > 0) {
|
||||||
store.state.trials.config.TrialObjectNameList.forEach(item => {
|
let arr = JSON.parse(JSON.stringify(store.state.trials.config.TrialObjectNameList))
|
||||||
|
arr.sort((a, b) => b.Name.length - a.Name.length)
|
||||||
|
arr.forEach(item => {
|
||||||
let test = new RegExp(item.Name, 'ig')
|
let test = new RegExp(item.Name, 'ig')
|
||||||
text = text.replace(test, item.TrialName)
|
text = text.replace(test, item.TrialName)
|
||||||
})
|
})
|
||||||
|
|
|
@ -767,6 +767,35 @@ import ClinicalDataForm from './clinicalDataForm'
|
||||||
import terminology from './terminology'
|
import terminology from './terminology'
|
||||||
import const_ from '@/const/sign-code'
|
import const_ from '@/const/sign-code'
|
||||||
import BaseModel from '@/components/BaseModel'
|
import BaseModel from '@/components/BaseModel'
|
||||||
|
const defaultDATA = () => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
Name: '受试者编号',
|
||||||
|
TrialName: '受试者编号',
|
||||||
|
IsDefault: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: '访视基准日期',
|
||||||
|
TrialName: '访视基准日期',
|
||||||
|
IsDefault: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: '拍片日期',
|
||||||
|
TrialName: '拍片日期',
|
||||||
|
IsDefault: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: '阅片人',
|
||||||
|
TrialName: '阅片人',
|
||||||
|
IsDefault: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: '独立阅片人',
|
||||||
|
TrialName: '独立阅片人',
|
||||||
|
IsDefault: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'LogicalConfig',
|
name: 'LogicalConfig',
|
||||||
components: { SignForm, ClinicalDataForm, BaseModel, terminology },
|
components: { SignForm, ClinicalDataForm, BaseModel, terminology },
|
||||||
|
@ -1323,6 +1352,20 @@ export default {
|
||||||
this.form[k] = res[k]
|
this.form[k] = res[k]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
!this.form.TrialObjectNameList ||
|
||||||
|
(Array.isArray(this.form.TrialObjectNameList) &&
|
||||||
|
this.form.TrialObjectNameList.length <= 0)
|
||||||
|
) {
|
||||||
|
// this.form.TrialObjectNameList = defaultDATA()
|
||||||
|
this.form.TrialObjectNameList = this.$d.Terminology.map((item) => {
|
||||||
|
return {
|
||||||
|
Name: item.label,
|
||||||
|
TrialName: item.label,
|
||||||
|
IsDefault: true,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
let Modalitys = this.form.ModalityList.map((item) => {
|
let Modalitys = this.form.ModalityList.map((item) => {
|
||||||
return this.$fd('Modality', item.trim())
|
return this.$fd('Modality', item.trim())
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
:before-close="handleColse"
|
:before-close="handleColse"
|
||||||
width="900px"
|
width="900px"
|
||||||
>
|
>
|
||||||
<div
|
<!-- <div
|
||||||
class="btnBox"
|
class="btnBox"
|
||||||
style="width: 100%; display: flex; justify-content: flex-end"
|
style="width: 100%; display: flex; justify-content: flex-end"
|
||||||
>
|
>
|
||||||
<el-button type="primary" size="small" @click.stop="openEdit">
|
<el-button type="primary" size="small" @click.stop="openEdit">
|
||||||
{{ $t('common:button:add') }}
|
{{ $t('common:button:add') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div> -->
|
||||||
<el-table :data="DATA" style="width: 100%">
|
<el-table :data="DATA" style="width: 100%">
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
@click.stop="handleDelete(scope.$index)"
|
@click.stop="handleDelete(scope.$index)"
|
||||||
circle
|
circle
|
||||||
:title="$t('common:button:delete')"
|
:title="$t('common:button:delete')"
|
||||||
|
v-if="!scope.row.IsDefault"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -72,7 +73,12 @@
|
||||||
:label="$t('trials:logincCfg:form:terminologyName')"
|
:label="$t('trials:logincCfg:form:terminologyName')"
|
||||||
prop="Name"
|
prop="Name"
|
||||||
>
|
>
|
||||||
<el-select v-model="form.Name" placeholder="" style="width: 100%">
|
<el-select
|
||||||
|
v-model="form.Name"
|
||||||
|
placeholder=""
|
||||||
|
style="width: 100%"
|
||||||
|
v-if="!form.IsDefault"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in $d.Terminology"
|
v-for="item in $d.Terminology"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -81,6 +87,11 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-input
|
||||||
|
v-model="form.Name"
|
||||||
|
v-if="form.IsDefault"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:logincCfg:form:terminologyTrials')"
|
:label="$t('trials:logincCfg:form:terminologyTrials')"
|
||||||
|
@ -105,6 +116,7 @@ const defaultForm = () => {
|
||||||
return {
|
return {
|
||||||
Name: null,
|
Name: null,
|
||||||
TrialName: null,
|
TrialName: null,
|
||||||
|
IsDefault: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
@ -134,6 +146,22 @@ export default {
|
||||||
message: this.$t('common:ruleMessage:specify'),
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (
|
||||||
|
value &&
|
||||||
|
this.DATA.find((item) => item.Name === value) &&
|
||||||
|
this.status === 'add'
|
||||||
|
) {
|
||||||
|
callback(
|
||||||
|
new Error(this.$t('trials:uploadDicomList:table:Existed'))
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
TrialName: [
|
TrialName: [
|
||||||
{
|
{
|
||||||
|
@ -158,7 +186,6 @@ export default {
|
||||||
Object.keys(this.form).forEach((key) => {
|
Object.keys(this.form).forEach((key) => {
|
||||||
this.form[key] = row[key]
|
this.form[key] = row[key]
|
||||||
})
|
})
|
||||||
this.form.Id = row.Id
|
|
||||||
}
|
}
|
||||||
this.editVisible = true
|
this.editVisible = true
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue