Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
6714d2a3c2
|
@ -300,7 +300,9 @@ async function VueInit() {
|
|||
}
|
||||
let text = i18n.t(key)
|
||||
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')
|
||||
text = text.replace(test, item.TrialName)
|
||||
})
|
||||
|
|
|
@ -1323,6 +1323,35 @@ export default {
|
|||
this.form[k] = res[k]
|
||||
}
|
||||
}
|
||||
if (
|
||||
!this.form.TrialObjectNameList ||
|
||||
(Array.isArray(this.form.TrialObjectNameList) &&
|
||||
this.form.TrialObjectNameList.length <= 0)
|
||||
) {
|
||||
this.form.TrialObjectNameList = this.$d.Terminology.map((item) => {
|
||||
return {
|
||||
Name: item.label,
|
||||
TrialName: item.label,
|
||||
IsDefault: true,
|
||||
}
|
||||
})
|
||||
} else if (
|
||||
Array.isArray(this.form.TrialObjectNameList) &&
|
||||
this.form.TrialObjectNameList.length > 0
|
||||
) {
|
||||
this.$d.Terminology.forEach((item) => {
|
||||
if (
|
||||
!this.form.TrialObjectNameList.find((d) => d.Name === item.label)
|
||||
) {
|
||||
this.form.TrialObjectNameList.push({
|
||||
Name: item.label,
|
||||
TrialName: item.label,
|
||||
IsDefault: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let Modalitys = this.form.ModalityList.map((item) => {
|
||||
return this.$fd('Modality', item.trim())
|
||||
})
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
:before-close="handleColse"
|
||||
width="900px"
|
||||
>
|
||||
<div
|
||||
<!-- <div
|
||||
class="btnBox"
|
||||
style="width: 100%; display: flex; justify-content: flex-end"
|
||||
>
|
||||
<el-button type="primary" size="small" @click.stop="openEdit">
|
||||
{{ $t('common:button:add') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
<el-table :data="DATA" style="width: 100%">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
|
@ -42,6 +42,7 @@
|
|||
@click.stop="handleDelete(scope.$index)"
|
||||
circle
|
||||
:title="$t('common:button:delete')"
|
||||
v-if="!scope.row.IsDefault"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -72,7 +73,12 @@
|
|||
:label="$t('trials:logincCfg:form:terminologyName')"
|
||||
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
|
||||
v-for="item in $d.Terminology"
|
||||
:key="item.id"
|
||||
|
@ -81,6 +87,11 @@
|
|||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="form.Name"
|
||||
v-if="form.IsDefault"
|
||||
disabled
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:logincCfg:form:terminologyTrials')"
|
||||
|
@ -105,6 +116,7 @@ const defaultForm = () => {
|
|||
return {
|
||||
Name: null,
|
||||
TrialName: null,
|
||||
IsDefault: false,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
|
@ -134,6 +146,22 @@ export default {
|
|||
message: this.$t('common:ruleMessage:specify'),
|
||||
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: [
|
||||
{
|
||||
|
@ -158,7 +186,6 @@ export default {
|
|||
Object.keys(this.form).forEach((key) => {
|
||||
this.form[key] = row[key]
|
||||
})
|
||||
this.form.Id = row.Id
|
||||
}
|
||||
this.editVisible = true
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue