修改影像功能以及增加影像界面刷新分检数据按钮
This commit is contained in:
parent
129030f8e2
commit
9e606cf009
@ -82,10 +82,12 @@
|
||||
#dicom-list {
|
||||
background-color: black;
|
||||
width: 150px;
|
||||
height: 868px;
|
||||
/*height: 100%;*/
|
||||
display: flex;
|
||||
/* overflow: auto; */
|
||||
overflow-y: scroll;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
max-height:550px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
@ -102,12 +104,15 @@
|
||||
}*/
|
||||
|
||||
.series_img {
|
||||
border: 0px solid green;
|
||||
|
||||
border: 1px solid black;
|
||||
height:100%;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.series_img_active {
|
||||
border: 1px solid green;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.border-red {
|
||||
@ -300,6 +305,30 @@
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.process-div {
|
||||
position:absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
align-content:space-around;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
font-size:30px;
|
||||
color:red;
|
||||
}
|
||||
.icon-img-box {
|
||||
position:relative;
|
||||
width:100%;
|
||||
height:151px;
|
||||
}
|
||||
.icon-img-box > canvas {
|
||||
height:149px;
|
||||
width:149px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@ -330,7 +359,7 @@
|
||||
<button type="button" id="invert" class="btn btn-default" onclick="invert(1,this)">反转色</button>
|
||||
<button type="button" id="changeColorx" class="btn btn-default" onclick="changColor(1,this)">彩色对比</button>
|
||||
<button type="button" class="btn btn-default" onclick="resetTool()">重置</button>
|
||||
<input type="text" id='row-count' placeholder="行数" value='1' /> x <input type="text" id='column-count' placeholder="列数" value='1' /> <input type='button' onclick="doCreate()" value="多视窗" />
|
||||
<input type="text" id='row-count' placeholder="行数" value='1' /> x <input type="text" id='column-count' placeholder="列数" value='1' /> <input type='button' onclick="doCreate()" value="生成" />
|
||||
</div>
|
||||
|
||||
<div id="body-part">
|
||||
|
@ -18,7 +18,8 @@ var stateData = {
|
||||
imgIndex: 0,
|
||||
element: {},
|
||||
dicomInfo: {},
|
||||
showMapping: new Map()
|
||||
showMapping: new Map(),
|
||||
processMapping: new Map() //进度条映射 key为序列索引,value为加载完成数量
|
||||
}
|
||||
|
||||
/*切换工具*/
|
||||
@ -397,6 +398,7 @@ function initConerstoneAndData() {
|
||||
|
||||
// load images and set the stack
|
||||
cornerstone.loadImage(imageIds[0]).then((image) => {
|
||||
updateProcess(stateData.imgIndex,"initConerstoneAndData")
|
||||
initSlider(stateData.element);
|
||||
cornerstone.displayImage(stateData.element, image)
|
||||
cornerstoneTools.addStackStateManager(stateData.element, ['stack'])
|
||||
@ -427,6 +429,7 @@ $(document).ready(function () {
|
||||
setAllSliderValue();
|
||||
setAllTagsValue();
|
||||
});
|
||||
setImgListParentHeight();
|
||||
})
|
||||
|
||||
//初始化右侧图片列表
|
||||
@ -437,10 +440,10 @@ function initImgList(data) {
|
||||
if (stateData.imgIndex == i) {
|
||||
className += "_active";
|
||||
}
|
||||
|
||||
$("#dicom-list").append('<div style="height: 200px;" id="img_' + i + '" class="' + className + '" onclick="changeIndex(' + i + ')"> <img style=" width: 130px;height: 130px;" src="' + data.seriesList[i].thumbUrl + '"/> <h4 style="color: white; id="h_' + i + '" >"'+data.seriesList[i].SeriesDesc+'"</h4></div>');
|
||||
//$("#dicom-list").append('<img id="img_' + i + '" onclick="changeIndex(' + i + ')" class="' + className + '" src="' + data.seriesList[i].thumbUrl + '"/>');
|
||||
// $("#dicom-list").append('<h4 style="color: white; id="h_' + i + '" onclick="changeIndex(' + i + ')" >"'+data.seriesList[i].SeriesDesc+'"</h4>');
|
||||
//$("#dicom-list").append('<div class="icon-img-box" onclick="changeIndex(' + i + ')"><img id="img_' + i + '" class="' + className + '" src="' + data.seriesList[i].thumbUrl + '"/><div class="process-div" id="process-' + i + '"></div></div>');
|
||||
//$("#dicom-list").append('<div class="icon-img-box" id="icon-img-box-'+i+'" onclick="changeIndex(' + i + ')"><img id="img_' + i + '" class="' + className + '"/><div class="process-div" id="process-' + i + '"></div></div>');
|
||||
$("#dicom-list").append('<div class="icon-img-box ' + className + '" id="icon-img-box-' + i + '" onclick="changeIndex(' + i + ')"><div class="process-div" id="process-' + i + '"></div></div>');
|
||||
}
|
||||
}
|
||||
|
||||
@ -449,17 +452,22 @@ function changeIndex(i) {
|
||||
if (stateData.imgIndex == i && stateData.showMapping.get(stateData.element.id) == i) {
|
||||
return;
|
||||
}
|
||||
$("#img_" + stateData.imgIndex).removeClass("series_img_active");
|
||||
$("#img_" + stateData.imgIndex).addClass("series_img")
|
||||
$("#img_" + i).removeClass("series_img")
|
||||
$("#img_" + i).addClass("series_img_active")
|
||||
//$("#img_" + stateData.imgIndex).removeClass("series_img_active");
|
||||
//$("#img_" + stateData.imgIndex).addClass("series_img")
|
||||
//$("#img_" + i).removeClass("series_img")
|
||||
//$("#img_" + i).addClass("series_img_active")
|
||||
$("#icon-img-box-" + stateData.imgIndex).removeClass("series_img_active");
|
||||
$("#icon-img-box-" + stateData.imgIndex).addClass("series_img")
|
||||
$("#icon-img-box-" + i).removeClass("series_img")
|
||||
$("#icon-img-box-" + i).addClass("series_img_active")
|
||||
stateData.imgIndex = i
|
||||
clearProcess(i)
|
||||
initConerstone(stateData.element)
|
||||
initConerstoneAndData();
|
||||
stateData.showMapping.set(stateData.element.id, i);
|
||||
}
|
||||
|
||||
//获取数据 Handler/Service.ashx idx: idx, no: localData.no, orgId: localData.orgId, method: "getSeries"
|
||||
//获取数据
|
||||
function initData() {
|
||||
var idx = GetQueryString("idx");
|
||||
var localStorage = window.localStorage;
|
||||
@ -467,29 +475,18 @@ function initData() {
|
||||
var data= JSON.parse(localData.do);
|
||||
console.log("网页接受到数据"+data)
|
||||
stateData.dicomInfo = data;
|
||||
//初始化进度
|
||||
initProcess();
|
||||
initImgList(stateData.dicomInfo);
|
||||
//加载icon图片
|
||||
convertDicom2Img();
|
||||
//缓存文件
|
||||
setTimeout(function () {
|
||||
cacheImages();
|
||||
}, 500)
|
||||
initConerstoneAndData();
|
||||
/* alert(localData.regid) */
|
||||
/* $.getJSON("http://127.0.0.1:5000/get-data", {
|
||||
|
||||
},
|
||||
function (data) {
|
||||
if ("failed" == data.status) {
|
||||
alert("获取数据失败")
|
||||
}
|
||||
else {
|
||||
console.log(data)
|
||||
stateData.dicomInfo = data;
|
||||
initImgList(stateData.dicomInfo);
|
||||
initConerstoneAndData();
|
||||
}
|
||||
}); */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//初始化滚动条
|
||||
function initSlider(element) {
|
||||
@ -584,7 +581,7 @@ function renderTagText(e, i) {
|
||||
leftTop.empty();
|
||||
leftTop.append("<div class='tag-item'>" + tagsInfo.patientId + "</div>");//体检编号
|
||||
leftTop.append("<div class='tag-item'>姓名:" + stateData.dicomInfo.patientname + "</div>");//患者姓名
|
||||
leftTop.append("<div class='tag-item'>" + tagsInfo.patientBirthDate + " " + (tagsInfo.patientGender == 'F' ? "男":"女") + "</div>");
|
||||
leftTop.append("<div class='tag-item'>" + tagsInfo.patientBirthDate + " " + (tagsInfo.patientGender == 'F' ? "女" : "男") + "</div>");
|
||||
leftTop.append("<div class='tag-item'>" + tagsInfo.imageDate + "</div>");
|
||||
|
||||
//左下角
|
||||
@ -656,3 +653,101 @@ function doCreate() {
|
||||
stateData.element = null;
|
||||
stateData.showMapping = new Map()
|
||||
}
|
||||
|
||||
function cacheImages() {
|
||||
cacheImageIndex(0);
|
||||
}
|
||||
|
||||
var cacheInterval = setInterval(
|
||||
function () {
|
||||
let size = stateData.dicomInfo.seriesList.length;
|
||||
for (var i = 0; i < size; i++) {
|
||||
let p = stateData.processMapping.get(i);
|
||||
if (p >= stateData.dicomInfo.seriesList[i].instanceList.length) {
|
||||
cacheImageIndex(i + 1)
|
||||
}
|
||||
}
|
||||
}, 200
|
||||
);
|
||||
|
||||
function cacheImageIndex(a) {
|
||||
if (a >= stateData.dicomInfo.seriesList.length) {
|
||||
clearInterval(cacheInterval);
|
||||
return;
|
||||
}
|
||||
var series = stateData.dicomInfo.seriesList[a].instanceList
|
||||
const scheme = 'wadouri'
|
||||
const baseUrl = ''
|
||||
const imageIds = series.map(seriesImage => `${scheme}:${baseUrl}${seriesImage.imageid}`)
|
||||
for (var j = 0; j < imageIds.length; j++) {
|
||||
cornerstone.loadImage(imageIds[j]).then(() => {
|
||||
updateProcess(a, "cacheImages");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//初始化进度信息
|
||||
function initProcess() {
|
||||
console.log("初始化进度 stateData.dicomInfo", stateData.dicomInfo);
|
||||
var size = stateData.dicomInfo.seriesList.length;
|
||||
for (var i = 0; i < size; i++) {
|
||||
stateData.processMapping.set(i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
//更新进度信息
|
||||
function updateProcess(i, fun) {
|
||||
stateData.processMapping.set(i, stateData.processMapping.get(i) + 1)
|
||||
renderProcess();
|
||||
}
|
||||
|
||||
function clearProcess(i) {
|
||||
return;
|
||||
stateData.processMapping.set(i, 0)
|
||||
}
|
||||
|
||||
//渲染进度
|
||||
function renderProcess() {
|
||||
var length = stateData.dicomInfo.seriesList.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
var totalSize = stateData.dicomInfo.seriesList[i].instanceList.length;
|
||||
var currentSize = stateData.processMapping.get(i);
|
||||
if (totalSize > currentSize) {
|
||||
$("#process-" + i).show();
|
||||
$("#process-" + i).text(currentSize + "/" + totalSize);
|
||||
}
|
||||
else {
|
||||
$("#process-" + i).text("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//生成图片
|
||||
function convertDicom2Img() {
|
||||
var length = stateData.dicomInfo.seriesList.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
loadDicomShowIcom(i);
|
||||
}
|
||||
}
|
||||
//加载dicom文件,转换为base64格式
|
||||
function loadDicomShowIcom(i) {
|
||||
console.log("加载icon-" + i);
|
||||
const scheme = 'wadouri'
|
||||
const baseUrl = ''
|
||||
const imageId = `${scheme}:${baseUrl}${stateData.dicomInfo.seriesList[i].instanceList[0].imageid}`
|
||||
console.log("imgId:", imageId);
|
||||
const imgElement = document.getElementById('icon-img-box-' + i);
|
||||
cornerstone.loadAndCacheImage(imageId).then(function (image) {
|
||||
cornerstone.enable(imgElement);
|
||||
cornerstone.displayImage(imgElement, image);
|
||||
});
|
||||
}
|
||||
|
||||
function setImgListParentHeight() {
|
||||
const height = $(window).height() - $("#top-menu").height()
|
||||
$("#dicom-list").css("max-height", height + "px")
|
||||
|
||||
console.log("window的高度",$(window).height());
|
||||
console.log("topMenu的高度", $("#top-menu").height());
|
||||
console.log("dicom-list高度", $("#dicom-list").height());
|
||||
}
|
@ -49,6 +49,9 @@ export interface DicomworklistVO {
|
||||
startTime: string // 1
|
||||
orgId: string // 1
|
||||
registrant: string // 登记医生
|
||||
examItemName:string
|
||||
examItemCode:string
|
||||
devname:string
|
||||
}
|
||||
|
||||
// 申请登记记录 API
|
||||
|
@ -85,4 +85,9 @@ export const PatientexamlistApi = {
|
||||
dicomDataSync: async () => {
|
||||
return await request.get({ url: `/tblist/patientexamlist/dicomDataSync` })
|
||||
},
|
||||
|
||||
// 分检数据刷新
|
||||
dicomDataRefresh: async () => {
|
||||
return await request.get({ url: `/tblist/patientexamlist/dicomDataRefresh` })
|
||||
},
|
||||
}
|
||||
|
@ -130,6 +130,8 @@ const submitForm = async () => {
|
||||
if (!fordevicemValue.value) {
|
||||
await message.alert('请选择分检设备')
|
||||
} else {
|
||||
// 拿到设备名称
|
||||
let devname = fordevicemValue.value.split('|')[0]
|
||||
// 拿到设备类型
|
||||
let devtype = fordevicemValue.value.split('|')[2]
|
||||
// 拿到设备AET
|
||||
@ -169,9 +171,12 @@ const submitForm = async () => {
|
||||
modality: devtype,
|
||||
scheduledA: devAET,
|
||||
startDate: formatDate(datePart),
|
||||
startTime: formatDate(datePart),
|
||||
startTime: formatDate(timePart),
|
||||
orgId: '',
|
||||
registrant: ''
|
||||
registrant: '',
|
||||
examItemName:item.examItemName,
|
||||
examItemCode:item.examItemCode,
|
||||
devname:devname
|
||||
}
|
||||
array.push(worklistvo)
|
||||
|
||||
@ -212,7 +217,10 @@ const submitForm = async () => {
|
||||
startDate: formatDate(datePart),
|
||||
startTime: formatTime(timePart),
|
||||
orgId: '',
|
||||
registrant: ''
|
||||
registrant: '',
|
||||
examItemName:uprow.value.examItemName,
|
||||
examItemCode:uprow.value.examItemCode,
|
||||
devname:devname
|
||||
})
|
||||
console.log(worklistarrayvo.value)
|
||||
await ApplyformApi.updateFJApplyform({
|
||||
|
@ -175,7 +175,7 @@
|
||||
<el-input
|
||||
v-model="sj"
|
||||
style="width: 95%; font-size: 20px; margin-left: 40px; margin-bottom: 3px"
|
||||
:rows="5"
|
||||
:rows="4"
|
||||
type="textarea"
|
||||
placeholder="影像所见"
|
||||
/>
|
||||
@ -184,7 +184,7 @@
|
||||
<el-input
|
||||
v-model="zdjl"
|
||||
style="width: 95%; font-size: 20px; margin-left: 40px; margin-bottom: 3px"
|
||||
:rows="5"
|
||||
:rows="4"
|
||||
type="textarea"
|
||||
placeholder="影像结论"
|
||||
/>
|
||||
|
@ -51,6 +51,7 @@
|
||||
v-model="examDate_radio_value"
|
||||
@change="examDate_radio_change"
|
||||
>
|
||||
<el-radio style="margin-right: 15px" :value="0">全部</el-radio>
|
||||
<el-radio style="margin-right: 15px" :value="1">今天</el-radio>
|
||||
<el-radio style="margin-right: 15px" :value="2">昨天</el-radio>
|
||||
<el-radio style="margin-right: 15px" :value="3">三天内</el-radio>
|
||||
@ -266,6 +267,7 @@
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
<el-button @click="dicomDataSync"><Icon icon="ep:refresh" class="mr-5px" /> 同步</el-button>
|
||||
<el-button @click="dicomDataRefresh"><Icon icon="ep:refresh" class="mr-5px" /> 刷新</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
@ -473,7 +475,7 @@ function handleEdit(row) {
|
||||
/** aaaaa **/
|
||||
const examDate_picker = ref(null)
|
||||
const examDate_radio = ref(null)
|
||||
const examDate_radio_value = ref(1)
|
||||
const examDate_radio_value = ref(3)
|
||||
|
||||
const examDate_radio_change = () => {
|
||||
if ([1, 2, 3, 4].includes(examDate_radio_value.value)) {
|
||||
@ -497,6 +499,11 @@ const examDate_radio_change = () => {
|
||||
} else if (5 === examDate_radio_value.value) {
|
||||
queryParams.examDate = []
|
||||
}
|
||||
else if(0===examDate_radio_value.value)
|
||||
{
|
||||
queryParams.examDate = []
|
||||
handleQuery()
|
||||
}
|
||||
}
|
||||
|
||||
///转换时间格式
|
||||
@ -527,6 +534,12 @@ const dicomDataSync = async () => {
|
||||
await PatientexamlistApi.dicomDataSync()
|
||||
message.success('同步成功')
|
||||
}
|
||||
// 分检数据刷新
|
||||
const dicomDataRefresh=async ()=>
|
||||
{
|
||||
await PatientexamlistApi.dicomDataRefresh()
|
||||
examDate_radio_change()
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
|
@ -51,6 +51,7 @@
|
||||
v-model="examDate_radio_value"
|
||||
@change="examDate_radio_change"
|
||||
>
|
||||
<el-radio style="margin-right: 15px" :value="0">全部</el-radio>
|
||||
<el-radio style="margin-right: 15px" :value="1">今天</el-radio>
|
||||
<el-radio style="margin-right: 15px" :value="2">昨天</el-radio>
|
||||
<el-radio style="margin-right: 15px" :value="3">三天内</el-radio>
|
||||
@ -495,7 +496,12 @@ const examDate_radio_change = () => {
|
||||
handleQuery()
|
||||
} else if (5 === examDate_radio_value.value) {
|
||||
queryParams.examDate = []
|
||||
}else if(0 === examDate_radio_value.value)
|
||||
{
|
||||
queryParams.examDate = []
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///转换时间格式
|
||||
|
Loading…
Reference in New Issue
Block a user