Browse Source

pacs

master
pengjun 1 year ago
parent
commit
ad69e5adb2
  1. 3
      public/sysConfig.json
  2. 77
      src/api/hadoopApi.js
  3. 5
      src/components/doctorCheck/CheckItemList.vue
  4. 4
      src/components/doctorCheck/CheckPicture.vue
  5. 278
      src/components/doctorCheck/PacsTemplate.vue

3
public/sysConfig.json

@ -1,4 +1,5 @@
{
"apiurl": "http://140.143.162.39:9529",
"softName": "神豚体检管理系统"
"softName": "神豚体检管理系统",
"pacsApi":"http://140.143.162.39:9530"
}

77
src/api/hadoopApi.js

@ -0,0 +1,77 @@
import request from "@/api/request";
import store from "../store/index";
const sysConfig = getSysConfig()
function getSysConfig() {
console.log('store', store.state.sysConfig)
if (store.state.sysConfig && store.state.sysConfig.apiurl) {
window.sessionStorage.setItem('sysConfig', JSON.stringify(store.state.sysConfig))
return store.state.sysConfig
} else {
return JSON.parse(window.sessionStorage.getItem('sysConfig'))
}
}
export async function hadoopGet(node, url, params = {}, config) {
return new Promise((resolve, reject) => {
request
.get(`${sysConfig[node] || sysConfig.apiurl}${url}`, {
params: params,
...config,
})
.then((res) => {
resolve(res);
})
.catch((err) => {
reject(err.data);
})
.finally(() => { });
});
}
//axios封装post
export async function hadoopPost(node, url, paramsdata = {}, config) {
return new Promise((resolve, reject) => {
request
.post(`${sysConfig[node] || sysConfig.apiurl}${url}`, paramsdata, config)
.then((res) => {
resolve(res);
})
.catch((err) => {
reject(err.data);
})
.finally(() => { });
});
}
//axios封装deleteapi
export async function hadoopdDel(node, url, params = {}, config) {
return new Promise((resolve, reject) => {
request
.delete(`${sysConfig[node] || sysConfig.apiurl}${url}`, {
params: params,
...config,
})
.then((res) => {
resolve(res);
})
.catch((err) => {
reject(err.data);
})
.finally(() => { });
});
}
//axios封装Put方法
export async function hadoopPut(node, url, params = {}, config) {
return new Promise((resolve, reject) => {
request
.put(`${sysConfig[node] || sysConfig.apiurl}${url}`, params, config)
.then((res) => {
resolve(res);
})
.catch((err) => {
reject(err.data);
})
.finally(() => { });
});
}

5
src/components/doctorCheck/CheckItemList.vue

@ -84,7 +84,7 @@
</el-dialog>
<!--Pacs结果录入模版-->
<el-dialog title="Pacs结果录入模版" :visible.sync="dialogWin.PacsTemplate" width="800px" :close-on-click-modal="false">
<el-dialog title="Pacs结果录入模版" :visible.sync="dialogWin.PacsTemplate" fullscreen :close-on-click-modal="false">
<PacsTemplate />
</el-dialog>
</div>
@ -411,6 +411,7 @@ export default {
// pacs
btnPacsResult(row, index){
console.log('row, index',row, index)
this.dialogWin.PacsTemplate = true
},
@ -537,7 +538,7 @@ export default {
return (
restaurant["value"]
.toLowerCase()
.indexOf(queryString.toLowerCase()) === 0
.indexOf(queryString.toLowerCase()) > -1
);
};
},

4
src/components/doctorCheck/CheckPicture.vue

@ -229,7 +229,7 @@ export default {
this.$peisAPI.imageAcquisition(JSON.stringify(toOutShell))
.then(async (res) => {
let lres = JSON.parse(res)
// console.log('this.$peisAPI.imageAcquisition',lres)
console.log('this.$peisAPI.imageAcquisition',lres)
if (lres.code > -1) {
for (let i = 0; i < lres.data.length; i++) {
let item = lres.data[i];
@ -267,6 +267,8 @@ export default {
}
}
this.getCheckPictures(this.dataTransOpts.tableS.register_check.id)
}else{
console.log('this.$peisAPI.imageAcquisition',lres.message)
}
}).catch(err => {
this.$message.error(err)

278
src/components/doctorCheck/PacsTemplate.vue

@ -1,12 +1,13 @@
<template>
<div style="display: flex;">
<div style="width: 258px;height:520px;border: 1px solid #EEE;">
<div :style="`width: 258px;height:${mainHeight}px;border: 1px solid #EEE;`">
<div style="margin:2px 2px 2px 2px;">
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" />
</div>
<div>
<el-tree style="overflow: scroll;width: 200px;height:480px;" :data="pacsTemplateTree" :props="treeprops"
@node-click="handleNode" :filter-node-method="filterNode" ref="ref_tree">
<el-tree :style="`overflow: scroll;width: 200px;height:${mainHeight - 40}px;`" :data="pacsTemplateTree"
:props="treeprops" @node-click="handleNode" :filter-node-method="filterNode" :expand-on-click-node="false"
highlight-current ref="ref_tree">
<span class="custom-tree-node" slot-scope="{ node, data }">
<div>
<span class="treeicons">
@ -20,22 +21,42 @@
</el-tree>
</div>
</div>
<div :style="`display: block;width:580px; margin-left: 5px;`">
<el-table :data="description" border height="470" highlight-current-row @row-dblclick="rowClick" size="small">
<el-table-column prop="description" label="描述" min-width="450" />
<el-table-column prop="conclusion" label="结论" min-width="130">
<template slot-scope="scope">
<el-autocomplete style="width: 100%;" type="textarea" v-model="scope.row.result" placeholder="请输入结论"
:autosize="{ minRows: 1, maxRows: 1 }" :trigger-on-focus="false" :fetch-suggestions="querySearch">
</el-autocomplete>
</template>
</el-table-column>
</el-table>
<div style="display: flex;margin-top: 8px;margin-left: 15px;">
<div :style="`display: block;width:${window.pageWidth - 200 - 30}px; margin-left: 5px;`">
<div style="display: flex;">
<div :style="`width: ${window.pageWidth - 200 - 30 - 250}px;`">
<el-table :data="description" border :height="tableHeight" highlight-current-row
@selection-change="selectionChangeDes" size="small" ref="ref_description">
<el-table-column type="selection" width="40" align="center" />
<el-table-column prop="description" label="描述" min-width="400" />
<el-table-column prop="conclusion" label="结论" min-width="150" align="center" />
</el-table>
</div>
<div style="width: 240px;margin-left: 5px;">
<el-table :data="conclusionAll" border :height="tableHeight" highlight-current-row
@selection-change="selectionChangeCon" size="small" ref="ref_conclusion">
<el-table-column type="selection" width="40" align="center" />
<el-table-column prop="conclusion" label="结论" min-width="150" />
</el-table>
</div>
</div>
<div style="margin-top: 5px;">
<span>检查结果</span>
<el-input style="width: 100%;" type="textarea" v-model="result" placeholder="请输入描述"
:autosize="{ minRows: 6, maxRows: 6 }" />
</div>
<div style="margin-top: 5px;">
<span>检查结论</span>
<div style="display: flex;justify-content: space-between;">
<el-input style="width: 100%;" type="textarea" v-model="summary" placeholder="请输入结论"
:autosize="{ minRows: 4, maxRows: 4 }" />
</div>
</div>
<div style="display: flex;justify-content: space-between;margin-top: 10px;">
<div></div>
<div style="margin-left: 150px;margin-top: 5px;">
<div>
<el-button type="primary" @click="btnTest" class="commonbutton">测试</el-button>
<el-button type="primary" @click="btnClear" class="commonbutton">清除</el-button>
<el-button type="primary" @click="btnDefault" class="commonbutton">默认结果</el-button>
<el-button type="primary" @click="btnOk" class="commonbutton">确定</el-button>
</div>
</div>
@ -46,7 +67,8 @@
import moment from "moment";
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { hadoopGet, hadoopPost, hadoopPut, hadoopDel } from "../../api/hadoopApi"
import { arrayReduce, arrayExistObj, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { getTreePids, getTreeAllChildIdsById, madeTree } from "../../utlis/tree";
export default {
@ -55,56 +77,42 @@ export default {
data() {
return {
filterText: '',
preNodeId: '', //
curNodeId: '', //
dateType: 'medicalStartDate',
useCusOrg: false, //使
isUnitOption: false,//
//
dataCusOrgOCX: [{
id: '', //ID
customerOrgId: '', //
customerOrgName: '', //
customerOrgRegister: {}, //
customerOrgRegisterList: [], //
dateType: 'medicalStartDate', // creationTimemedicalStartDatesummaryDate
startDate: '',
endDate: '',
customerOrgGroupIds: [], //
customerOrgGroupList: [], //
}],
description: [], //
description: [], //
conclusion: [], //
descriptionChoosedPre: [], //
descriptionChoosed: [], //
conclusionChoosed: [], //
conclusionAll: [], //
result: '', //
summary: '', //
pacsTemplateTree: [], // +
treeprops: {
label: "displayName", // label/displayName
value: "id",
id: "id",
children: "children",
}, //
curDescription: {} //
}, //
newQuery: 0, // 0 selectionChangeDes
};
},
//<el-tree :data="$store.state.customerOrg.ref_tree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
computed: {
...mapState(["dict", "customerOrg", "patientRegister", "report", "diagnosis", "project"]),
...mapState(["dict", "window", "customerOrg", "patientRegister", "report", "diagnosis", "project"]),
mainHeight() {
return this.window.pageHeight - 78;
},
tableHeight() {
return this.mainHeight - 120 - 80 - 80;
},
},
//
created() {
this.dataCusOrgOCX = [];
if (this.useCustomerOrg) {
this.useCusOrg = true
}
if (this.initDateType) {
this.dateType = this.initDateType
}
if (this.isUnit) {
this.isUnitOption = true
}
this.changeUseOrg(this.useCusOrg)
},
//
mounted() {
//
@ -120,7 +128,7 @@ export default {
return data['displayName'].indexOf(value) > -1;
},
//
//pacs
getPacsTemplateTree() {
let resultType = [], resultTemplate = [], treeData = []
@ -143,40 +151,37 @@ export default {
})
},
//ID api/app/customer-org/parent/[CustomerOrgld
getCustomerOrgParentId(customerOrgld) {
if (customerOrgld == this.dict.personOrgId) {
this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId;
return;
}
getapi(`/api/app/customer-org/parent/${customerOrgld}`).then((res) => {
console.log("res.data", res.data);
if (res.code == 1) {
this.patientRegister.query.CustomerOrgParentId = res.data;
}
});
},
//
handleNode(data, node, prop) {
let ids = getTreeAllChildIdsById(this.pacsTemplateTree, "children", "id", data.id)
ids.unshift(data.id) //
postapi('/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail', { bigtextResultTemplateIds: ids })
hadoopPost('pacsApi','/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail', { bigtextResultTemplateIds: ids })
.then(res => {
if (res.code > -1) {
this.newQuery = 0
this.description = res.data.descriptionDetail
this.conclusion = res.data.conclusionDetail
this.description.forEach(e => {
let lfind = -1
this.description.forEach((e, i) => {
let conclusion = this.conclusion.filter(c => {
return c.bigtextResultTemplateId = e.bigtextResultTemplateId
return c.bigtextResultTemplateId == e.bigtextResultTemplateId
})
e["conclusion"] = ""
e["conclusionList"] = []
conclusion.forEach(c => {
e["conclusionList"].push({ value: c.conclusion })
e["conclusionList"].push(c)
});
if (conclusion.length == 1) e["conclusion"] = conclusion[0].conclusion
//
lfind = arrayExistObj(this.descriptionChoosed, "description", e.description)
if (lfind > -1) {
// console.log('this.descriptionChoosed refresh', deepCopy(this.descriptionChoosed))
this.$nextTick(() => {
this.$refs['ref_description'].toggleRowSelection(this.description[i],true)
})
}
});
}
@ -184,33 +189,124 @@ export default {
},
querySearch(queryString, cb) {
var restaurants = deepCopy(this.restaurants); // [{ value: '' },{ value: '' }]
restaurants.forEach((item) => {
return (item.value = item.result);
//
selectionChangeDes(v) {
this.newQuery++
let lfind = 0
v.forEach(e => {
lfind = arrayExistObj(this.descriptionChoosed, "description", e.description)
if (lfind == -1) {
this.descriptionChoosed.push(e)
}
e.conclusionList.forEach(c => {
lfind = arrayExistObj(this.conclusionAll, "conclusion", c.conclusion)
if (lfind == -1) this.conclusionAll.push(c)
});
//
if (e.conclusion) {
lfind = arrayExistObj(this.conclusionAll, "conclusion", e.conclusion)
// console.log(lfind, e)
if (lfind > -1) {
this.$refs['ref_conclusion'].toggleRowSelection(this.conclusionAll[lfind], true)
}
}
if (this.result) {
if (!this.result.includes(e.description)) this.result += ';' + e.description
} else {
this.result = e.description
}
});
//
if (this.newQuery > 1) {
let unChooseed = arrayReduce(deepCopy(this.description), v, "description=description")
// console.log('this.descriptionChoosedPre,unChooseed', deepCopy(this.descriptionChoosedPre), unChooseed)
unChooseed.forEach(e => {
lfind = arrayExistObj(this.descriptionChoosedPre, "description", e.description)
if (lfind > -1) {
lfind = arrayExistObj(this.descriptionChoosed, "description", e.description)
if (lfind > -1) this.descriptionChoosed.splice(lfind, 1)
if (this.result.includes(e.description)) this.result = this.result.replaceAll(e.description + ";", "").replaceAll(e.description, "")
if (e.conclusion) {
lfind = arrayExistObj(this.conclusionAll, "conclusion", e.conclusion)
if (lfind > -1) this.$refs['ref_conclusion'].toggleRowSelection(this.conclusionAll[lfind], false)
}
}
});
}
this.descriptionChoosedPre = deepCopy(v)
if(this.result){
if(this.result.substring(this.result.length - 1,this.result.length) == ";") this.result = this.result.substring(0,this.result.length - 1)
}
},
// ()
selectionChangeCon(v) {
let summarys = []
v.forEach(e => {
if (this.summary) {
summarys = this.summary.split(";")
if (summarys.indexOf(e.conclusion) == -1) this.summary += ';' + e.conclusion
} else {
this.summary = e.conclusion
}
});
// if(this.summary && this.summary.substring())
//
let lfind = -1
let unChooseed = arrayReduce(deepCopy(this.conclusionAll), v, "conclusion=conclusion")
unChooseed.forEach(e => {
if (this.summary) {
summarys = this.summary.split(";")
lfind = summarys.indexOf(e.conclusion)
if (lfind > -1) summarys.splice(lfind, 1)
this.summary = ''
summarys.forEach((c, i) => {
if (i == 0) {
this.summary = c
} else {
this.summary += ";" + c
}
});
}
});
// console.log("restaurants", restaurants);
var results = queryString
? restaurants.filter(this.createFilter(queryString))
: restaurants;
// callback
cb(results);
},
//
rowClick(row) {
this.curDescription = row;
this.restaurants = row.conclusionList;
btnTest() {
console.log('this.descriptionChoosed', this.descriptionChoosed)
console.log('this.conclusionChoosed', this.conclusionChoosed)
},
//
btnClear() {
this.result = ''
this.summary = ''
this.descriptionChoosed = []
this.$refs['ref_description'].clearSelection();
this.conclusionChoosed = []
this.conclusionAll = []
this.$refs['ref_conclusion'].clearSelection();
},
//
btnDefault() {
},
btnOk() {
this.dialogWin.PacsTemplate = false
//
btnOk() {
this.dialogWin.PacsTemplate = false
},
},
watch: {
"filterText"(newVal, oldVal) {
if(newVal != oldVal) this.$refs['ref_tree'].filter(newVal);
if (newVal != oldVal) this.$refs['ref_tree'].filter(newVal);
}
},
};

Loading…
Cancel
Save