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"
|
||||
:rules="rules"
|
||||
size="small"
|
||||
label-width="100px"
|
||||
label-width="150px"
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<!--AE Title-->
|
||||
<el-form-item label="AE Title" prop="calledAE">
|
||||
<el-input v-model="form.calledAE" />
|
||||
<el-form-item label="AE Title" prop="CalledAE">
|
||||
<el-input v-model="form.CalledAE" clearable />
|
||||
</el-form-item>
|
||||
<!--IP-->
|
||||
<el-form-item label="IP" prop="ip">
|
||||
<el-input v-model="form.ip" />
|
||||
<el-form-item label="IP" prop="IP">
|
||||
<el-input v-model="form.IP" clearable />
|
||||
</el-form-item>
|
||||
<!--Port-->
|
||||
<el-form-item label="Port" prop="port">
|
||||
<el-input v-model="form.port" type="number" />
|
||||
<el-form-item label="Port" prop="Port">
|
||||
<el-input v-model="form.Port" type="number" clearable />
|
||||
</el-form-item>
|
||||
<!--Modality-->
|
||||
<el-form-item label="Modality" prop="modality">
|
||||
<el-input v-model="form.modality" />
|
||||
<el-form-item label="Modality" prop="Modality">
|
||||
<el-input v-model="form.Modality" clearable />
|
||||
</el-form-item>
|
||||
<!--Description-->
|
||||
<el-form-item label="Description" prop="description">
|
||||
<el-input v-model="form.description" />
|
||||
<el-form-item label="Description" prop="Description">
|
||||
<el-input v-model="form.Description" clearable />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div
|
||||
|
@ -53,7 +53,7 @@
|
|||
size="small"
|
||||
type="primary"
|
||||
:loading="btnLoading"
|
||||
@click="handleSave"
|
||||
@click="setAE"
|
||||
>
|
||||
{{ $t("common:button:save") }}
|
||||
</el-button>
|
||||
|
@ -63,6 +63,7 @@
|
|||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { setDiicomAE } from "@/api/dicomAE.js";
|
||||
export default {
|
||||
name: "editDicom",
|
||||
props: {
|
||||
|
@ -76,25 +77,77 @@ export default {
|
|||
},
|
||||
dicom: {
|
||||
type: Object,
|
||||
default: {},
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
form: {
|
||||
CalledAE: null,
|
||||
IP: null,
|
||||
Port: null,
|
||||
Modality: null,
|
||||
Description: null,
|
||||
Id: null,
|
||||
},
|
||||
rules: {
|
||||
calledAE: [
|
||||
CalledAE: [
|
||||
{ required: true, message: "请输入AE Title", trigger: "blur" },
|
||||
],
|
||||
ip: [{ required: true, message: "请输入IP", trigger: "blur" }],
|
||||
port: [{ required: true, message: "请输入pORT", trigger: "blur" }],
|
||||
IP: [{ required: true, message: "请输入IP", trigger: "blur" }],
|
||||
Port: [{ required: true, message: "请输入pORT", trigger: "blur" }],
|
||||
},
|
||||
btnLoading: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
dicom: {
|
||||
handler() {
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
this.form[key] = this.dicom[key];
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleCancel() {},
|
||||
handleSave() {},
|
||||
handleCancel() {
|
||||
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>
|
|
@ -4,15 +4,19 @@
|
|||
<el-form :inline="true">
|
||||
<!--AE Title-->
|
||||
<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>
|
||||
<!--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>
|
||||
<!--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-button type="primary" size="mini" @click="getList"
|
||||
|
@ -34,40 +38,40 @@
|
|||
<!--AE Title-->
|
||||
<el-table-column
|
||||
label="AE Title"
|
||||
prop="calledAE"
|
||||
prop="CalledAE"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!--IP-->
|
||||
<el-table-column
|
||||
label="IP"
|
||||
prop="ip"
|
||||
prop="IP"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!--Port-->
|
||||
<el-table-column
|
||||
label="Port"
|
||||
prop="port"
|
||||
prop="Port"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!--Modality-->
|
||||
<el-table-column
|
||||
label="Modality"
|
||||
prop="modality"
|
||||
prop="Modality"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!--Description-->
|
||||
<el-table-column
|
||||
label="Description"
|
||||
prop="description"
|
||||
prop="Description"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
label="actions"
|
||||
fixed="right"
|
||||
prop="UserTypeShortName"
|
||||
min-width="200"
|
||||
|
@ -81,6 +85,20 @@
|
|||
@click="openDialog('edit', scope.row)"
|
||||
>编辑</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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -93,13 +111,21 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<editDicom
|
||||
:visible.sync="editDicomVisible"
|
||||
:title="editDicomTitle"
|
||||
:dicom="DICOM"
|
||||
@getList="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from "@/components/Pagination";
|
||||
import editDicom from "./components/edit-dicom";
|
||||
import { getDicomAEList, deleteDiicomAE, testConnect } from "@/api/dicomAE.js";
|
||||
export default {
|
||||
name: "dicomAE",
|
||||
components: { Pagination },
|
||||
components: { Pagination, editDicom },
|
||||
data() {
|
||||
return {
|
||||
// 查询
|
||||
|
@ -114,15 +140,85 @@ export default {
|
|||
// 列表
|
||||
loading: false,
|
||||
list: [],
|
||||
// 弹窗
|
||||
editDicomVisible: false,
|
||||
editDicomTitle: "添加",
|
||||
DICOM: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue