dicomAE页面接口对接调试
parent
06883d2e86
commit
75a8d2c869
|
@ -0,0 +1,35 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取dicomAE列表
|
||||||
|
export function getDicomAEList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DicomAE/getDicomAEList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增或编辑dicomAE
|
||||||
|
export function setDiicomAE(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DicomAE/addOrUpdateDicomAE',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除dicomAE
|
||||||
|
export function deleteDiicomAE(id) {
|
||||||
|
return request({
|
||||||
|
url: `/DicomAE/deleteDicomAE/${id}`,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 测试scp server是否可以连接
|
||||||
|
export function testConnect(id) {
|
||||||
|
return request({
|
||||||
|
url: `/DicomAE/testSCPServerConnect/${id}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
|
@ -12,28 +12,28 @@
|
||||||
:model="form"
|
:model="form"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
size="small"
|
size="small"
|
||||||
label-width="100px"
|
label-width="150px"
|
||||||
>
|
>
|
||||||
<div class="base-dialog-body">
|
<div class="base-dialog-body">
|
||||||
<!--AE Title-->
|
<!--AE Title-->
|
||||||
<el-form-item label="AE Title" prop="calledAE">
|
<el-form-item label="AE Title" prop="CalledAE">
|
||||||
<el-input v-model="form.calledAE" />
|
<el-input v-model="form.CalledAE" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--IP-->
|
<!--IP-->
|
||||||
<el-form-item label="IP" prop="ip">
|
<el-form-item label="IP" prop="IP">
|
||||||
<el-input v-model="form.ip" />
|
<el-input v-model="form.IP" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--Port-->
|
<!--Port-->
|
||||||
<el-form-item label="Port" prop="port">
|
<el-form-item label="Port" prop="Port">
|
||||||
<el-input v-model="form.port" type="number" />
|
<el-input v-model="form.Port" type="number" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--Modality-->
|
<!--Modality-->
|
||||||
<el-form-item label="Modality" prop="modality">
|
<el-form-item label="Modality" prop="Modality">
|
||||||
<el-input v-model="form.modality" />
|
<el-input v-model="form.Modality" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--Description-->
|
<!--Description-->
|
||||||
<el-form-item label="Description" prop="description">
|
<el-form-item label="Description" prop="Description">
|
||||||
<el-input v-model="form.description" />
|
<el-input v-model="form.Description" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="btnLoading"
|
:loading="btnLoading"
|
||||||
@click="handleSave"
|
@click="setAE"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:save") }}
|
{{ $t("common:button:save") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -63,6 +63,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { setDiicomAE } from "@/api/dicomAE.js";
|
||||||
export default {
|
export default {
|
||||||
name: "editDicom",
|
name: "editDicom",
|
||||||
props: {
|
props: {
|
||||||
|
@ -76,25 +77,77 @@ export default {
|
||||||
},
|
},
|
||||||
dicom: {
|
dicom: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {},
|
default: () => {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {
|
||||||
|
CalledAE: null,
|
||||||
|
IP: null,
|
||||||
|
Port: null,
|
||||||
|
Modality: null,
|
||||||
|
Description: null,
|
||||||
|
Id: null,
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
calledAE: [
|
CalledAE: [
|
||||||
{ required: true, message: "请输入AE Title", trigger: "blur" },
|
{ required: true, message: "请输入AE Title", trigger: "blur" },
|
||||||
],
|
],
|
||||||
ip: [{ required: true, message: "请输入IP", trigger: "blur" }],
|
IP: [{ required: true, message: "请输入IP", trigger: "blur" }],
|
||||||
port: [{ required: true, message: "请输入pORT", trigger: "blur" }],
|
Port: [{ required: true, message: "请输入pORT", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
dicom: {
|
||||||
|
handler() {
|
||||||
|
Object.keys(this.form).forEach((key) => {
|
||||||
|
this.form[key] = this.dicom[key];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleCancel() {},
|
handleCancel() {
|
||||||
handleSave() {},
|
Object.keys(this.form).forEach((key) => {
|
||||||
|
this.form[key] = null;
|
||||||
|
});
|
||||||
|
this.$refs.editVisitForm.clearValidate();
|
||||||
|
this.$emit("update:visible", false);
|
||||||
|
},
|
||||||
|
// 新增或修改
|
||||||
|
async setAE() {
|
||||||
|
try {
|
||||||
|
let validate = await this.$refs.editVisitForm.validate();
|
||||||
|
console.log(validate);
|
||||||
|
if (!validate) return;
|
||||||
|
this.btnLoading = true;
|
||||||
|
let res = await setDiicomAE(this.form);
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
if (this.form.Id) {
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("common:message:updatedSuccessfully")
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message.success(this.$t("common:message:addedSuccessfully"));
|
||||||
|
}
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.handleCancel();
|
||||||
|
this.$emit("getList");
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.errorMessage);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.btnLoading = false;
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
|
@ -4,15 +4,19 @@
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<!--AE Title-->
|
<!--AE Title-->
|
||||||
<el-form-item label="AE Title" prop="CalledAE">
|
<el-form-item label="AE Title" prop="CalledAE">
|
||||||
<el-input v-model="searchData.CalledAE" style="width: 140px" />
|
<el-input
|
||||||
|
v-model="searchData.CalledAE"
|
||||||
|
style="width: 140px"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--IP-->
|
<!--IP-->
|
||||||
<el-form-item label="IP" prop="IP">
|
<el-form-item label="IP" prop="IP">
|
||||||
<el-input v-model="searchData.IP" style="width: 140px" />
|
<el-input v-model="searchData.IP" style="width: 140px" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--Port-->
|
<!--Port-->
|
||||||
<el-form-item label="Port" prop="Port">
|
<el-form-item label="Port" prop="Port">
|
||||||
<el-input v-model="searchData.Port" style="width: 140px" />
|
<el-input v-model="searchData.Port" style="width: 140px" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" size="mini" @click="getList"
|
<el-button type="primary" size="mini" @click="getList"
|
||||||
|
@ -34,40 +38,40 @@
|
||||||
<!--AE Title-->
|
<!--AE Title-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="AE Title"
|
label="AE Title"
|
||||||
prop="calledAE"
|
prop="CalledAE"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!--IP-->
|
<!--IP-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="IP"
|
label="IP"
|
||||||
prop="ip"
|
prop="IP"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!--Port-->
|
<!--Port-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="Port"
|
label="Port"
|
||||||
prop="port"
|
prop="Port"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!--Modality-->
|
<!--Modality-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="Modality"
|
label="Modality"
|
||||||
prop="modality"
|
prop="Modality"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!--Description-->
|
<!--Description-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="Description"
|
label="Description"
|
||||||
prop="description"
|
prop="Description"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="actions"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
prop="UserTypeShortName"
|
prop="UserTypeShortName"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
|
@ -81,6 +85,20 @@
|
||||||
@click="openDialog('edit', scope.row)"
|
@click="openDialog('edit', scope.row)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
|
@click="delAE(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
|
@click="test(scope.row)"
|
||||||
|
>测试</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -93,13 +111,21 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<editDicom
|
||||||
|
:visible.sync="editDicomVisible"
|
||||||
|
:title="editDicomTitle"
|
||||||
|
:dicom="DICOM"
|
||||||
|
@getList="getList"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
|
import editDicom from "./components/edit-dicom";
|
||||||
|
import { getDicomAEList, deleteDiicomAE, testConnect } from "@/api/dicomAE.js";
|
||||||
export default {
|
export default {
|
||||||
name: "dicomAE",
|
name: "dicomAE",
|
||||||
components: { Pagination },
|
components: { Pagination, editDicom },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 查询
|
// 查询
|
||||||
|
@ -114,15 +140,85 @@ export default {
|
||||||
// 列表
|
// 列表
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [],
|
list: [],
|
||||||
|
// 弹窗
|
||||||
|
editDicomVisible: false,
|
||||||
|
editDicomTitle: "添加",
|
||||||
|
DICOM: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getList() {},
|
async getList() {
|
||||||
|
let data = {};
|
||||||
|
Object.keys(this.searchData).forEach((key) => {
|
||||||
|
data[key] = this.searchData[key];
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
this.loading = true;
|
||||||
|
let res = await getDicomAEList(data);
|
||||||
|
this.loading = false;
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.list = res.Result.CurrentPageData;
|
||||||
|
this.total = res.Result.TotalCount;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 重置
|
// 重置
|
||||||
reset() {},
|
reset() {
|
||||||
|
Object.keys(this.searchData).forEach((key) => {
|
||||||
|
this.searchData[key] = null;
|
||||||
|
});
|
||||||
|
this.searchData.PageIndex = 1;
|
||||||
|
this.searchData.PageIndex = 10;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
// 打开弹框
|
// 打开弹框
|
||||||
openDialog(key, item) {},
|
openDialog(key, item = {}) {
|
||||||
|
this.editDicomVisible = true;
|
||||||
|
this.editDicomTitle = "编辑";
|
||||||
|
if (key === "add") {
|
||||||
|
this.editDicomTitle = "添加";
|
||||||
|
}
|
||||||
|
this.DICOM = JSON.parse(JSON.stringify(item));
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
async delAE(item) {
|
||||||
|
try {
|
||||||
|
let confirm = await this.$confirm(
|
||||||
|
this.$t("trials:staffResearch:message:confirmDel"),
|
||||||
|
this.$t("trials:uploadDicomList:label:prompt"),
|
||||||
|
{
|
||||||
|
confirmButtonText: this.$t("trials:reviewTrack:impactList:save"),
|
||||||
|
cancelButtonText: this.$t("common:button:cancel"),
|
||||||
|
type: "warning",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (confirm !== "confirm") return;
|
||||||
|
let res = await deleteDiicomAE(item.Id);
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("trials:crcUpload:message:deleteVisitSuccessfully")
|
||||||
|
);
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 测试连通性
|
||||||
|
async test(item) {
|
||||||
|
let res = await testConnect(item.Id);
|
||||||
|
if (res.IsSuccess && res.Result) {
|
||||||
|
this.$message.success(this.$t("system:dicomAE:connect:success"));
|
||||||
|
} else {
|
||||||
|
this.$message.error(this.$t("system:dicomAE:connect:error"));
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue