中心的AE添加时的交互缺陷
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
8a46adf96f
commit
802870f3b4
|
@ -1,30 +1,66 @@
|
|||
<template>
|
||||
<base-model v-if="config.visible" :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="openAdd" style="float: right" v-if="status === 'add'">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="openAdd"
|
||||
style="float: right"
|
||||
v-if="status === 'add'"
|
||||
>
|
||||
{{ $t("common:button:add") }}
|
||||
</el-button>
|
||||
<el-table v-loading="loading" :data="list" stripe>
|
||||
<!-- AE 名称 -->
|
||||
<el-table-column prop="CallingAE" :label="$t('trials:sitesList:dicomAEList:table:AEName')" show-overflow-tooltip
|
||||
min-width="120" />
|
||||
<el-table-column
|
||||
prop="CallingAE"
|
||||
:label="$t('trials:sitesList:dicomAEList:table:AEName')"
|
||||
show-overflow-tooltip
|
||||
min-width="120"
|
||||
/>
|
||||
<!-- IP地址 -->
|
||||
<el-table-column prop="IP" :label="$t('trials:sitesList:dicomAEList:table:ip')" show-overflow-tooltip
|
||||
min-width="120" />
|
||||
<el-table-column
|
||||
prop="IP"
|
||||
:label="$t('trials:sitesList:dicomAEList:table:ip')"
|
||||
show-overflow-tooltip
|
||||
min-width="120"
|
||||
/>
|
||||
<!-- 端口 -->
|
||||
<el-table-column prop="Port" :label="$t('trials:sitesList:dicomAEList:table:port')" show-overflow-tooltip
|
||||
min-width="120" />
|
||||
<el-table-column
|
||||
prop="Port"
|
||||
:label="$t('trials:sitesList:dicomAEList:table:port')"
|
||||
show-overflow-tooltip
|
||||
min-width="120"
|
||||
/>
|
||||
<!-- 说明 -->
|
||||
<el-table-column prop="Description" :label="$t('trials:sitesList:dicomAEList:table:description')"
|
||||
show-overflow-tooltip min-width="120" />
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
:label="$t('trials:sitesList:dicomAEList:table:description')"
|
||||
show-overflow-tooltip
|
||||
min-width="120"
|
||||
/>
|
||||
<!-- 操作 -->
|
||||
<!-- <el-table-column prop="action" :label="$t('trials:sitesList:dicomAEList:table:action')" min-width="120">
|
||||
<el-table-column
|
||||
prop="action"
|
||||
:label="$t('trials:sitesList:dicomAEList:table:action')"
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button circle :title="$t('trials:sitesList:dicomAEList:action:del')" icon="el-icon-delete"
|
||||
:disabled="scope.row.IsDeleted" @click="delDicom(scope.row)" />
|
||||
<el-button
|
||||
circle
|
||||
:title="$t('trials:sitesList:dicomAEList:action:edit')"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="editDicom(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
circle
|
||||
:title="$t('trials:sitesList:dicomAEList:action:del')"
|
||||
icon="el-icon-delete"
|
||||
:disabled="scope.row.IsDeleted"
|
||||
@click="delDicom(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<dicomForm ref="dicomForm" @getList="getList" @save="save" />
|
||||
</template>
|
||||
|
@ -33,10 +69,7 @@
|
|||
<script>
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
import dicomForm from "./dicomForm.vue";
|
||||
import {
|
||||
getTrialSiteDicomAEList,
|
||||
deleteTrialSiteDicomAE
|
||||
} from "@/api/trials";
|
||||
import { getTrialSiteDicomAEList, deleteTrialSiteDicomAE } from "@/api/trials";
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
TrialSiteId: null,
|
||||
|
@ -55,7 +88,7 @@ export default {
|
|||
visible: false,
|
||||
title: null,
|
||||
width: "800px",
|
||||
appendToBody: true
|
||||
appendToBody: true,
|
||||
},
|
||||
status: "add",
|
||||
TrialSiteId: null,
|
||||
|
@ -93,10 +126,14 @@ export default {
|
|||
},
|
||||
// 新增
|
||||
openAdd() {
|
||||
this.$refs.dicomForm.open(this.siteData, null, 'add');
|
||||
this.$refs.dicomForm.open(this.siteData, null, "add");
|
||||
},
|
||||
save() {
|
||||
this.$emit('getList')
|
||||
this.$emit("getList");
|
||||
},
|
||||
// 修改dicom
|
||||
editDicom(row) {
|
||||
this.$refs.dicomForm.open(this.siteData, row, "edit");
|
||||
},
|
||||
// 删除dicom
|
||||
async delDicom(row) {
|
||||
|
@ -115,12 +152,12 @@ export default {
|
|||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
this.save();
|
||||
this.$t('common:message:deletedSuccessfully');
|
||||
this.$t("common:message:deletedSuccessfully");
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -3,33 +3,50 @@
|
|||
<template slot="dialog-body">
|
||||
<el-form ref="dicomForm" :model="form" label-width="100px" :rules="rules">
|
||||
<!-- 中心编号 -->
|
||||
<el-form-item :label="$t('trials:sitesList:table:siteId')" prop="TrialSiteCode">
|
||||
<el-form-item
|
||||
:label="$t('trials:sitesList:table:siteId')"
|
||||
prop="TrialSiteCode"
|
||||
>
|
||||
<el-input v-model="siteData.TrialSiteCode" disabled />
|
||||
</el-form-item>
|
||||
<!-- 中心别称 -->
|
||||
<el-form-item :label="$t('trials:sitesList:table:siteName')" prop="TrialSiteAliasName">
|
||||
<el-form-item
|
||||
:label="$t('trials:sitesList:table:siteName')"
|
||||
prop="TrialSiteAliasName"
|
||||
>
|
||||
<el-input v-model="siteData.TrialSiteAliasName" disabled />
|
||||
</el-form-item>
|
||||
<!-- AE -->
|
||||
<el-form-item :label="$t('trials:setting:siteList:dicomForm:dicomAE')" prop="CallingAE">
|
||||
<el-form-item
|
||||
:label="$t('trials:setting:siteList:dicomForm:dicomAE')"
|
||||
prop="CallingAE"
|
||||
>
|
||||
<el-input v-model="form.CallingAE" clearable maxlength="16" />
|
||||
</el-form-item>
|
||||
<!-- IP -->
|
||||
<el-form-item :label="$t('trials:setting:siteList:dicomForm:ip')" prop="Ip">
|
||||
<el-form-item :label="$t('trials:setting:siteList:dicomForm:ip')">
|
||||
<el-input v-model="form.Ip" clearable />
|
||||
</el-form-item>
|
||||
<!-- PORT -->
|
||||
<el-form-item :label="$t('trials:setting:siteList:dicomForm:port')" prop="Port">
|
||||
<el-form-item :label="$t('trials:setting:siteList:dicomForm:port')">
|
||||
<el-input v-model.number="form.Port" type="number" clearable />
|
||||
</el-form-item>
|
||||
<!-- 说明 -->
|
||||
<el-form-item :label="$t('trials:setting:siteList:dicomForm:description')" prop="Description">
|
||||
<el-form-item
|
||||
:label="$t('trials:setting:siteList:dicomForm:description')"
|
||||
prop="Description"
|
||||
>
|
||||
<el-input v-model="form.Description" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button type="primary" size="small" :disabled="loading" @click="config.visible = false">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="loading"
|
||||
@click="config.visible = false"
|
||||
>
|
||||
{{ $t("common:button:cancel") }}
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" :loading="loading" @click="save">
|
||||
|
@ -39,9 +56,7 @@
|
|||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
addOrUpdateTrialSiteDicomAE,
|
||||
} from "@/api/trials";
|
||||
import { addOrUpdateTrialSiteDicomAE } from "@/api/trials";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
export default {
|
||||
name: "dicomForm",
|
||||
|
@ -59,7 +74,7 @@ export default {
|
|||
CallingAE: null,
|
||||
Ip: null,
|
||||
Port: null,
|
||||
Description: null
|
||||
Description: null,
|
||||
},
|
||||
rules: {
|
||||
CallingAE: [
|
||||
|
@ -139,21 +154,25 @@ export default {
|
|||
},
|
||||
siteData: {},
|
||||
loading: false,
|
||||
status: 'add'
|
||||
status: "add",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
open(siteData, data = null, status = 'add') {
|
||||
open(siteData, data = null, status = "add") {
|
||||
this.siteData = siteData;
|
||||
this.status = status;
|
||||
if (data) {
|
||||
Object.keys(this.form).forEach(key => {
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
this.form[key] = data[key];
|
||||
})
|
||||
});
|
||||
this.form.Ip = data.IP;
|
||||
}
|
||||
this.config.title = this.$t(
|
||||
"trials:trials-panel:setting:personnel-manage:dicomAETitle"
|
||||
).replace("xxx", `${siteData.TrialSiteCode}、${siteData.TrialSiteAliasName}`);
|
||||
).replace(
|
||||
"xxx",
|
||||
`${siteData.TrialSiteCode}、${siteData.TrialSiteAliasName}`
|
||||
);
|
||||
this.config.visible = true;
|
||||
},
|
||||
// 保存
|
||||
|
@ -167,8 +186,10 @@ export default {
|
|||
let res = await addOrUpdateTrialSiteDicomAE(this.form);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.status === 'add' ? this.$t('common:message:savedSuccessfully') : this.$t('common:message:savedFail');
|
||||
this.$emit('getList');
|
||||
this.status === "add"
|
||||
? this.$t("common:message:savedSuccessfully")
|
||||
: this.$t("common:message:savedFail");
|
||||
this.$emit("getList");
|
||||
this.$emit("save");
|
||||
this.config.visible = false;
|
||||
}
|
||||
|
@ -176,8 +197,8 @@ export default {
|
|||
console.log(err);
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
Loading…
Reference in New Issue