中心添加AE标题修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
36ffd8b371
commit
57a8bb4e24
|
@ -109,7 +109,10 @@ export default {
|
||||||
this.TrialSiteId = row.TrialSiteId
|
this.TrialSiteId = row.TrialSiteId
|
||||||
this.config.title = this.$t(
|
this.config.title = this.$t(
|
||||||
'trials:trials-panel:setting:personnel-manage:dicomAETitle'
|
'trials:trials-panel:setting:personnel-manage:dicomAETitle'
|
||||||
).replace('xxx', `${row.TrialSiteCode}、${row.TrialSiteAliasName}`)
|
)
|
||||||
|
.replace('xxx', `${row.TrialSiteCode}`)
|
||||||
|
.replace('yyy', `${row.TrialSiteAliasName}`)
|
||||||
|
|
||||||
this.siteData = row
|
this.siteData = row
|
||||||
this.config.visible = true
|
this.config.visible = true
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|
|
@ -47,26 +47,26 @@
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
@click="config.visible = false"
|
@click="config.visible = false"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:cancel") }}
|
{{ $t('common:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" size="small" :loading="loading" @click="save">
|
<el-button type="primary" size="small" :loading="loading" @click="save">
|
||||||
{{ $t("common:button:save") }}
|
{{ $t('common:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addOrUpdateTrialSiteDicomAE } from "@/api/trials";
|
import { addOrUpdateTrialSiteDicomAE } from '@/api/trials'
|
||||||
import BaseModel from "@/components/BaseModel";
|
import BaseModel from '@/components/BaseModel'
|
||||||
export default {
|
export default {
|
||||||
name: "dicomForm",
|
name: 'dicomForm',
|
||||||
components: { BaseModel },
|
components: { BaseModel },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
config: {
|
config: {
|
||||||
visible: false,
|
visible: false,
|
||||||
title: null,
|
title: null,
|
||||||
width: "600px",
|
width: '600px',
|
||||||
appendToBody: true,
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
|
@ -80,128 +80,127 @@ export default {
|
||||||
CallingAE: [
|
CallingAE: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("common:ruleMessage:specify"),
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: /[a-zA-Z0-9]/,
|
pattern: /[a-zA-Z0-9]/,
|
||||||
message: this.$t("common:ruleMessage:CallingAEPattern"),
|
message: this.$t('common:ruleMessage:CallingAEPattern'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
min: 1,
|
min: 1,
|
||||||
max: 16,
|
max: 16,
|
||||||
message: this.$t("common:ruleMessage:CallingAEPattern"),
|
message: this.$t('common:ruleMessage:CallingAEPattern'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
Ip: [
|
Ip: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("common:ruleMessage:specify"),
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
if (
|
if (
|
||||||
value === "" ||
|
value === '' ||
|
||||||
typeof value === "undefined" ||
|
typeof value === 'undefined' ||
|
||||||
value == null
|
value == null
|
||||||
) {
|
) {
|
||||||
callback(new Error(this.$t("common:ruleMessage:ipPattern")));
|
callback(new Error(this.$t('common:ruleMessage:ipPattern')))
|
||||||
} else {
|
} else {
|
||||||
const reg =
|
const reg =
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
|
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
|
||||||
if (!reg.test(value) && value !== "") {
|
if (!reg.test(value) && value !== '') {
|
||||||
callback(new Error(this.$t("common:ruleMessage:ipPattern")));
|
callback(new Error(this.$t('common:ruleMessage:ipPattern')))
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
message: this.$t("common:ruleMessage:ipPattern"),
|
message: this.$t('common:ruleMessage:ipPattern'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
Port: [
|
Port: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("common:ruleMessage:specify"),
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "number",
|
type: 'number',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 65535,
|
max: 65535,
|
||||||
message: this.$t("common:ruleMessage:portPattern"),
|
message: this.$t('common:ruleMessage:portPattern'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
if (
|
if (
|
||||||
value &&
|
value &&
|
||||||
(String(value).includes(".") ||
|
(String(value).includes('.') ||
|
||||||
new RegExp(/\D/g).test(String(value)))
|
new RegExp(/\D/g).test(String(value)))
|
||||||
) {
|
) {
|
||||||
callback(new Error(this.$t("common:ruleMessage:portPattern")));
|
callback(new Error(this.$t('common:ruleMessage:portPattern')))
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
siteData: {},
|
siteData: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
status: "add",
|
status: 'add',
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(siteData, data = null, status = "add") {
|
open(siteData, data = null, status = 'add') {
|
||||||
this.siteData = siteData;
|
this.siteData = siteData
|
||||||
this.status = status;
|
this.status = status
|
||||||
Object.keys(this.form).forEach((key) => {
|
Object.keys(this.form).forEach((key) => {
|
||||||
this.form[key] = null;
|
this.form[key] = null
|
||||||
});
|
})
|
||||||
if (data && status === "edit") {
|
if (data && status === 'edit') {
|
||||||
Object.keys(this.form).forEach((key) => {
|
Object.keys(this.form).forEach((key) => {
|
||||||
this.form[key] = data[key];
|
this.form[key] = data[key]
|
||||||
});
|
})
|
||||||
this.form.Ip = data.IP;
|
this.form.Ip = data.IP
|
||||||
}
|
}
|
||||||
this.config.title = this.$t(
|
this.config.title = this.$t(
|
||||||
"trials:trials-panel:setting:personnel-manage:dicomAETitle"
|
'trials:trials-panel:setting:personnel-manage:dicomAETitle'
|
||||||
).replace(
|
)
|
||||||
"xxx",
|
.replace('xxx', `${siteData.TrialSiteCode}`)
|
||||||
`${siteData.TrialSiteCode}、${siteData.TrialSiteAliasName}`
|
.replace('yyy', `${siteData.TrialSiteAliasName}`)
|
||||||
);
|
this.config.visible = true
|
||||||
this.config.visible = true;
|
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
async save() {
|
async save() {
|
||||||
try {
|
try {
|
||||||
let validate = await this.$refs.dicomForm.validate();
|
let validate = await this.$refs.dicomForm.validate()
|
||||||
if (!validate) return false;
|
if (!validate) return false
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.form.TrialSiteId = this.siteData.TrialSiteId;
|
this.form.TrialSiteId = this.siteData.TrialSiteId
|
||||||
this.form.TrialId = this.$route.query.trialId;
|
this.form.TrialId = this.$route.query.trialId
|
||||||
let res = await addOrUpdateTrialSiteDicomAE(this.form);
|
let res = await addOrUpdateTrialSiteDicomAE(this.form)
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.status === "add"
|
this.status === 'add'
|
||||||
? this.$t("common:message:savedSuccessfully")
|
? this.$t('common:message:savedSuccessfully')
|
||||||
: this.$t("common:message:savedFail");
|
: this.$t('common:message:savedFail')
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
this.$emit("save");
|
this.$emit('save')
|
||||||
this.config.visible = false;
|
this.config.visible = false
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
Loading…
Reference in New Issue